Service task scheduling method, device and electronic equipment
By receiving service requests for restaurant target tables and determining the service provider and task queue, the problem of low service scheduling efficiency during peak dining in restaurants is solved, globally optimized service scheduling is achieved, and service efficiency is improved.
Patent Information
- Application Number
- CN201910032897.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-01-14
- Publication Date
- 2024-11-01
- Estimated Expiration
- 2039-01-14
AI Technical Summary
During peak restaurant dining periods, when customers frequently call for services, it is difficult for waiters to effectively schedule from a global perspective, resulting in reduced service efficiency.
By receiving service requests from the target table, determine the target service provider and the target task queue, optimize service scheduling according to the table and service type, and ensure that the service provider is idle or the task type matches priority.
It realizes service scheduling from a global perspective, avoids service scheduling chaos and improves service efficiency.
Smart Images

Figure CN109858782B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet application technology, and in particular to a method, device and electronic device for scheduling service tasks. Background Art
[0002] When customers dine in a restaurant, they usually need waiters to provide various services, such as adding tableware, ordering food, adding soup, refilling water, paying the bill, etc. At present, when customers need waiters to provide services, they usually call the waiters through the pager installed on the table. However, during the peak dining period, customers call for service frequently, and it is difficult for waiters to schedule services from a global perspective, which is prone to confusion in service scheduling, thereby reducing service efficiency. Summary of the invention
[0003] In order to solve one of the above technical problems, the present application provides a method, device and electronic device for scheduling a service task.
[0004] According to a first aspect of an embodiment of the present application, a method for scheduling a service task is provided, comprising:
[0005] receiving a service request for a target table, wherein the service request carries information of a target service type;
[0006] Based on the target table, determining a target service provider;
[0007] Based on the target service type, a target task queue of the target service provider is determined, wherein the target task queue is composed of one or more task groups arranged in an execution order, each of the task groups includes one or more tasks, and each of the task groups corresponds to a service type, and the target task queue includes a target task group corresponding to the target service type.
[0008] Optionally, determining a target service provider based on the target table seat includes:
[0009] Determine a target service area corresponding to the target table seat among a plurality of pre-divided service areas; wherein each of the service areas corresponds to a preset service provider;
[0010] If the first service provider corresponding to the target service area meets the preset condition, determining the first service provider as the target service provider;
[0011] If the first service provider does not meet the preset condition, determining one or more candidate service areas corresponding to the target table;
[0012] Determining a second service provider corresponding to each of the candidate service areas;
[0013] If there is at least one second service provider that meets the preset condition, determining any second service provider that meets the preset condition as a target service provider;
[0014] If the second service provider corresponding to each of the candidate service areas does not meet the preset condition, the first service provider is determined as the target service provider.
[0015] Optionally, the satisfying the preset condition includes any one of the following:
[0016] is currently idle; or
[0017] The service type corresponding to the currently executed task is the same as the target service type.
[0018] Optionally, the candidate service area is a service area corresponding to a table adjacent to the target table, and a path between the target table and the adjacent table is less than a preset distance.
[0019] Optionally, determining a target task queue of the target service provider based on the target service type includes:
[0020] If the target task group exists in the current task queue of the target service provider, inserting the target task for the service request into the target task group to obtain a target task queue;
[0021] If the target task group does not exist in the current task queue of the target service provider, the target task group is created, the target task is added to the target task group, and the target task group is inserted into the current task queue according to the preset priority corresponding to the target service type to obtain the target task queue.
[0022] Optionally, inserting a target task for the service request into the target task group includes:
[0023] Determine the table position corresponding to each task in the target task group;
[0024] Determine a target path according to a preset rule, wherein the target path passes through the table corresponding to each task in the target task group and the target table;
[0025] The target tasks are inserted into the target task group according to the order in which the target path passes through the tables.
[0026] Optionally, the method further includes:
[0027] If it is determined that there is a timeout task group in the target task queue, the execution order of the timeout task group is advanced, and the duration of the timeout task group from the creation time to the current time exceeds the preset duration.
[0028] According to a second aspect of an embodiment of the present application, a scheduling device for a service task is provided, including:
[0029] A receiving module, configured to receive a service request for a target table, wherein the service request carries information about a target service type;
[0030] A first determination module, configured to determine a target service provider based on the target table;
[0031] The second determination module is used to determine the target task queue of the target service provider based on the target service type, the target task queue is composed of one or more task groups arranged in execution order, each of the task groups includes one or more tasks, and each of the task groups corresponds to a service type, and the target task queue includes a target task group corresponding to the target service type.
[0032] According to a third aspect of an embodiment of the present application, a computer-readable storage medium is provided, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the method described in any one of the first aspects is implemented.
[0033] According to a fourth aspect of an embodiment of the present application, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method described in any one of the first aspects is implemented.
[0034] The technical solution provided by the embodiments of the present application may have the following beneficial effects:
[0035] The scheduling method and device of the service task provided by the embodiment of the present application, by receiving a service request for a target table, the service request carries information of a target service type, determines a target service provider based on the target table, and determines a target task queue of the target service provider based on the target service type. The target task queue is composed of one or more task groups arranged in an execution order, each task group includes one or more tasks, and each task group corresponds to a service type, and the target task queue includes a target task group corresponding to the target service type. Since the present embodiment can determine the target service provider according to the target table, and determine the target task queue of the target service provider according to the target service type, therefore, when performing the scheduling of the service task, a variety of factors that affect the service efficiency are fully considered, so that the service scheduling can be performed from a global perspective, avoiding the confusion of the service scheduling, and improving the service efficiency.
[0036] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0038] Figure 1 A schematic diagram of an exemplary system architecture for applying an embodiment of the present application;
[0039] Figure 2A is a flow chart of a method for scheduling a service task according to an exemplary embodiment of the present application;
[0040] Figure 2B is a schematic diagram of a scenario of scheduling a service task according to an exemplary embodiment of the present application;
[0041] Figure 3 is a flowchart of another method for scheduling service tasks according to an exemplary embodiment of the present application;
[0042] Figure 4 is a flowchart of another method for scheduling service tasks according to an exemplary embodiment of the present application;
[0043] Figure 5 is a block diagram of a scheduling device for a service task according to an exemplary embodiment of the present application;
[0044] Figure 6 is a block diagram of another service task scheduling device according to an exemplary embodiment of the present application;
[0045] Figure 7 It is a schematic diagram of the structure of an electronic device according to an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0046] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0047] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0048] It should be understood that although the terms first, second, third, etc. may be used in the present application to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0049] See also Figure 1 , is a schematic diagram of an exemplary system architecture for applying an embodiment of the present application:
[0050] like Figure 1 As shown, the system architecture 100 may include terminal devices 101, 102, a network 103 and a server 104. It should be understood that Figure 1 The number or type of terminal devices, networks, and servers in the embodiment are merely illustrative. Any number or type of terminal devices, networks, and servers may be provided as required.
[0051] The network 103 is used to provide a medium for communication links between terminal devices and servers. The network 103 may include various connection types, such as wired or wireless communication links or optical fiber cables.
[0052] The terminal devices 101 and 102 may interact with the server through the network 103 to receive or send requests or information, etc. The terminal devices 101 and 102 may include but are not limited to smart phones, tablet computers, smart wearable devices, personal digital assistants, laptop portable computers, desktop computers, etc.
[0053] The server 104 may be a server that provides a platform for catering services. The server may store, analyze, and process the received data, or send control commands or requests to terminal devices or other servers. The server may provide services in response to user service requests. It is understood that a server may provide one or more services, and the same service may be provided by multiple servers.
[0054] The present application will be described in detail below with reference to specific embodiments.
[0055] like Figure 2A As shown, Figure 2A The flowchart of a method for scheduling a service task according to an exemplary embodiment is shown, and the method can be applied to a server. The method includes the following steps:
[0056] In step 201, a service request for a target table is received, and the service request carries information of a target service type.
[0057] In this embodiment, the target table is the table corresponding to the customer who needs service. The customer can send a service request to the server through a terminal device to request the target service type to be provided. The service request can carry the table number of the target table and information about the target service type. The target service type is the service type requested by the customer, and the service type may include but is not limited to ordering, adding tableware, adding soup, refilling water, consulting, paying the bill, etc.
[0058] In step 202, a target service provider is determined based on the target table.
[0059] In this embodiment, the target service provider is a service provider that is about to provide services to customers, wherein the service provider may be a waiter or an intelligent robot, and this application does not limit the specific type of the service provider.
[0060] In this embodiment, in response to receiving the above service request, a target service provider can be determined based on the target table. Specifically, the restaurant can be divided into multiple service areas in advance according to the layout of the restaurant tables, and each service area is assigned a service provider, which is mainly responsible for providing services to customers at any table in the service area. The path between the tables in each service area is less than the preset length, such as Figure 2B As shown, the tables numbered 1-16 can be divided into four service areas: A, B, C and D.
[0061] When the above service request is received, the target table can be first determined, and the target service area corresponding to the target table can be determined. If it is determined that the first service provider corresponding to the target service area meets the preset conditions, the first service provider is determined as the target service provider. If the first service provider does not meet the preset conditions, one or more alternative service areas corresponding to the target table are determined, and the second service provider corresponding to each alternative service area is determined. If there is at least one second service provider that meets the preset conditions, any second service provider that meets the preset conditions is determined as the target service provider. If the second service provider corresponding to each alternative service area does not meet the preset conditions, the first service provider is determined as the target service provider. Among them, meeting the preset conditions may include any one of the following: currently being in an idle state, or the service type corresponding to the currently executed task is the same as the target service type.
[0062] In step 203, based on the target service type, a target task queue of the target service provider is determined.
[0063] In this embodiment, the target task queue can be composed of one or more task groups arranged in execution order, each task group includes one or more tasks, and each task group corresponds to a service type, and the target task queue includes a target task group corresponding to the target service type. The target task queue can record the information of each task group. For any task group, the information of the task group may include but is not limited to the identification of the service type corresponding to the task group, the priority of the service type, the creation time of the task group, the identification of the tasks included in the task group, the identification of the service provider, etc.
[0064] In this embodiment, the target task queue of the target service provider can be determined based on the target service type in the following manner: first, find out whether there is a target task group corresponding to the target service type in the current task queue of the target service provider. If so, insert the target task for the above service request into the target task group to obtain the target task queue. If not, create a target task group corresponding to the target service type, add the target task for the above service request into the target task group, and insert the target task group into the current task queue according to the preset priority corresponding to the target service type to obtain the target task queue.
[0065] In this embodiment, after determining the target task queue of the target service provider, service instruction information can be sent to the target device, which can be a terminal device held by a waiter or an intelligent robot. The service instruction information is used to instruct the target service provider to provide corresponding services to the customer according to the target task queue.
[0066] The scheduling method of service tasks provided by the above-mentioned embodiment of the present application receives a service request for a target table, and the service request carries information of a target service type. Based on the target table, a target service provider is determined, and based on the target service type, a target task queue of the target service provider is determined. The target task queue is composed of one or more task groups arranged in an execution order, each task group includes one or more tasks, and each task group corresponds to a service type, and the target task queue includes a target task group corresponding to the target service type. Since the present embodiment can determine the target service provider according to the target table, and determine the target task queue of the target service provider according to the target service type, therefore, when performing the scheduling of service tasks, a variety of factors that affect the service efficiency are fully considered, so that service scheduling can be performed from a global perspective, avoiding confusion in service scheduling, and improving service efficiency.
[0067] like Figure 3 As shown, Figure 3 According to a flowchart of another method for scheduling a service task according to an exemplary embodiment, the embodiment describes a process of determining a target service provider. The method can be applied to a server and includes the following steps:
[0068] In step 301, a service request for a target table is received, and the service request carries information of a target service type.
[0069] In step 302, a target service area corresponding to the target table seat among a plurality of pre-divided service areas is determined, wherein each service area corresponds to a preset service provider.
[0070] In this embodiment, the restaurant can be divided into multiple service areas in advance according to the layout of the restaurant tables, each service area corresponds to multiple tables, and a service provider can be assigned to each service area, which is mainly responsible for providing services to customers at any table in the service area. The correspondence between the table and the service area can be stored in advance, and when a service request for a target table is received, the target service area corresponding to the target table can be determined according to the stored correspondence.
[0071] In step 303, if the first service provider corresponding to the target service area meets the preset condition, the first service provider is determined as the target service provider.
[0072] In this embodiment, the first service provider may be a service provider assigned to the target service area. If it is determined that the first service provider is currently in an idle state, or the service type corresponding to the currently executed task is the same as the target service type, it can be determined that the first service provider meets the preset conditions, and the first service provider can be directly determined as the target service provider.
[0073] In step 304, if the first service provider does not meet the preset conditions, one or more candidate service areas corresponding to the target table are determined.
[0074] In this embodiment, if it is determined that the service type corresponding to the task currently executed by the first service provider is different from the target service type, it can be determined that the first service provider does not meet the preset condition, and the candidate service area corresponding to the target table can be further determined. The candidate service area corresponding to the target table is the service area corresponding to the adjacent table of the target table, and the path between the adjacent table of the target table and the target table is less than the preset distance. For example, see Figure 2B , the adjacent tables of table No. 6 may include table No. 7, table No. 10, and table No. 11. Therefore, the corresponding candidate service areas of table No. 6 may include service area B, service area C, and service area D. The adjacent tables of table No. 8 may include table No. 12. Therefore, the corresponding candidate service area of table No. 8 may include service area D.
[0075] In step 305, a second service provider corresponding to each candidate service area is determined.
[0076] In step 306, if there is at least one second service provider that meets the preset condition, any second service provider that meets the preset condition is determined as a target service provider.
[0077] In this embodiment, each candidate service area corresponds to a second service provider, so one or more second service providers can be determined. If at least one second service provider among the one or more second service providers meets the preset condition, any second service provider that meets the preset condition can be selected as the target service provider.
[0078] In step 307, if the second service provider corresponding to each candidate service area does not meet the preset condition, the first service provider is determined as the target service provider.
[0079] In step 308, based on the target service type, a target task queue of the target service provider is determined.
[0080] In this embodiment, the target task queue can be composed of one or more task groups arranged in execution order, each task group includes one or more tasks, and each task group corresponds to a service type, and the target task queue includes a target task group corresponding to the target service type. The target task queue can record the information of each task group. For any task group, the information of the task group may include but is not limited to the identification of the service type corresponding to the task group, the priority of the service type, the creation time of the task group, the identification of the tasks included in the task group, the identification of the service provider, etc.
[0081] It should be noted that Figure 2A The same steps as in the embodiment, in the above Figure 3 The embodiments will not be described in detail. For related contents, please refer to Figure 2A Example.
[0082] The scheduling method of the service task provided by the above embodiment of the present application, by receiving a service request for a target table, the service request carries information of the target service type, and determines the target service area corresponding to the target table in a plurality of pre-divided service areas, wherein each service area corresponds to a preset service provider. If the first service provider corresponding to the target service area meets the preset conditions, the first service provider is determined as the target service provider. If the first service provider does not meet the preset conditions, one or more alternative service areas corresponding to the target table are determined, and the second service provider corresponding to each alternative service area is determined. If there is at least one second service provider that meets the preset conditions, any second service provider that meets the preset conditions is determined as the target service provider, and if the second service provider corresponding to each alternative service area does not meet the preset conditions, the first service provider is determined as the target service provider, and based on the target service type, the target task queue of the target service provider is determined. Thus, service scheduling can be further performed from a global perspective, so that service scheduling is more optimized and service efficiency is improved.
[0083] like Figure 4 As shown, Figure 4 According to a flowchart of another method for scheduling a service task according to an exemplary embodiment, the embodiment describes in detail the process of determining a target task queue of a target service provider. The method can be applied to a server and includes the following steps:
[0084] In step 401, a service request for a target table is received, and the service request carries information of a target service type.
[0085] In step 402, a target service provider is determined based on the target table.
[0086] In step 403, if a target task group exists in the current task queue of the target service provider, a target task for the service request is inserted into the target task group to obtain a target task queue.
[0087] In this embodiment, after determining the target service provider, the current task queue of the target service provider can be obtained. It is checked whether there is a target task group corresponding to the target service type in the current task queue of the target service provider. If there is a target task group corresponding to the target service type, the target task for the service request can be inserted into the target task group to obtain the target task queue.
[0088] Specifically, in one implementation, the target task may be inserted at the end of the target task group, so that the tasks in the target task group are arranged in the order of task generation time.
[0089] In another implementation, the table corresponding to each task in the target task group can also be determined, and a target path is determined according to a preset rule, the target path passes through the table corresponding to each task in the target task group and the target table, and finally, the target task is inserted into the target task group according to the order in which the target path passes through the tables. This implementation can guide the service provider to perform the service tasks in a more reasonable and optimized order, which helps to improve the service efficiency of the service provider.
[0090] In step 404, if there is no target task group corresponding to the target service type in the current task queue of the target service provider, a target task group can be created, the target task can be added to the target task group, and the target task group can be inserted into the current task queue according to the preset priority corresponding to the target service type to obtain the target task queue.
[0091] In the present embodiment, if there is no target task group corresponding to the target service type in the current task queue of the target service provider (including the situation that the current task queue is empty), then the target task group corresponding to the target service type can be created, and the target task is added to the target task group. And the target task group is inserted into the current task queue to obtain the target task queue. The target service type can be set as a priority in advance, and the target task group is inserted into the current task queue according to the preset priority. The arrangement order of the task groups in the target task queue is made to meet the preset priority order.
[0092] It should be noted that Figure 2A-Figure 3 The same steps as in the embodiment, in the above Figure 4 The embodiments will not be described in detail. For related contents, please refer to Figure 2A-Figure 3 Example.
[0093] The scheduling method of service tasks provided by the above-mentioned embodiment of the present application, by receiving a service request for a target table, the service request carries the information of the target service type, and based on the target table, determines the target service provider. If there is a target task group corresponding to the target service type in the current task queue of the target service provider, the target task for the service request is inserted in the target task group to obtain the target task queue. If there is no target task group corresponding to the target service type in the current task queue of the target service provider, then the target task group can be created, the target task is added to the target task group, and according to the preset priority corresponding to the target service type, the target task group is inserted in the current task queue to obtain the target task queue. Thereby it helps to carry out service scheduling from a global perspective, and further improves service efficiency.
[0094] In some optional implementations, the service task scheduling method may further include: when it is determined that there is a timeout task group in the target task queue, advancing the execution order of the timeout task group, and the duration of the timeout task group from the creation time to the current time exceeds the preset duration.
[0095] Specifically, in this embodiment, when the duration of any task group in the target task queue from the creation time to the current time exceeds the preset duration, the task group can be used as a timeout task group, and the target task queue can be adjusted to advance the execution order of the timeout task group in the target task queue. Therefore, this implementation can avoid the situation where some task groups with lower execution priority cannot always be executed due to the continuous insertion of new tasks before them, thereby optimizing the scheduling of service tasks.
[0096] It should be noted that although the operations of the method of the present application are described in a specific order in the above embodiments, this does not require or imply that the operations must be performed in this specific order, or that all the operations shown must be performed to achieve the desired results. On the contrary, the steps depicted in the flow chart can be changed in the order of execution. Additionally or alternatively, some steps can be omitted, multiple steps can be combined into one step for execution, and / or one step can be decomposed into multiple steps for execution.
[0097] The present application scheme is schematically illustrated below in conjunction with a complete application example.
[0098] The application scenario may be: when customer A goes to a restaurant to dine, he calls for service.
[0099] Specifically, customer A sits at table number B, browses the menu, and then logs into the restaurant's service interface through his mobile phone. The service interface displays multiple service options, for example, multiple services may include but are not limited to ordering service, adding tableware service, consulting service, adding soup service, refilling water service, and paying bill service, etc. Customer A can select the option of ordering service, and after confirming the operation, the mobile phone can send a service request to the server for managing restaurant services, and the service request carries the table number B of the table where customer A is seated and the ordering service (i.e., service type) selected by customer A.
[0100] After receiving the service request, the server determines that table number B corresponds to service area C1, and determines that intelligent robot D1 is currently responsible for serving area C1. First, the server can determine the current service status of intelligent robot D1. If intelligent robot D1 is currently idle, or the task currently being performed is the same as the type of service requested by customer A, which is also a food ordering service, then intelligent robot D1 can be assigned to provide service to customer A.
[0101] If the task currently performed by the intelligent robot D1 is different from the type of service requested by customer A, and if the intelligent robot D2 in the service area C2 corresponding to the adjacent table of table number B is currently idle, or the task currently performed is the same as the type of service requested by customer A, then the intelligent robot D2 can be assigned to provide service to customer A. However, if the task currently performed by the intelligent robot D2 is different from the type of service requested by customer A, then the intelligent robot D1 is assigned to provide service to customer A.
[0102] The intelligent robot that provides ordering service for customer A can be used as the target intelligent robot. Then, the server can first check whether there is an ordering service task group in the current task queue of the target intelligent robot. If there is an ordering service task group, the service task for table number B can be inserted into the ordering service task group. If there is no ordering service task group, an ordering service task group can be created, which includes the service task for table number B. And according to the priority of the service type, the ordering service task group is inserted into the current task queue of the target intelligent robot to obtain the target task queue. For example, the current task queue of the target intelligent robot includes a payment service task group and an adding tableware task group. If the priority of the ordering service task group is higher than that of the payment service task group and lower than that of the adding tableware task group, the ordering service task group can be inserted between the payment service task group and the adding tableware task group.
[0103] Finally, the server sends control instructions to the target intelligent robot according to the target task queue of the target intelligent robot to instruct the target intelligent robot to provide services to the customer according to the target task queue.
[0104] It can be seen that by applying the above solution, when scheduling service tasks, various factors that affect service efficiency are fully considered, so that service scheduling can be performed from a global perspective, avoiding confusion in service scheduling and improving service efficiency.
[0105] Corresponding to the aforementioned service task scheduling method embodiment, the present application also provides an embodiment of a service task scheduling device.
[0106] like Figure 5 As shown, Figure 5 It is a block diagram of a scheduling device for a service task according to an exemplary embodiment of the present application. The device may include: a receiving module 501, a first determining module 502 and a second determining module 503.
[0107] The receiving module 501 is used to receive a service request for a target table, and the service request carries information of a target service type.
[0108] The first determination module 502 is used to determine a target service provider based on a target table.
[0109] The second determination module 503 is used to determine the target task queue of the target service provider based on the target service type, the target task queue is composed of one or more task groups arranged in execution order, each task group includes one or more tasks, and each task group corresponds to a service type, and the target task queue includes a target task group corresponding to the target service type.
[0110] In some optional implementations, the first determination module 502 is configured to: determine a target service area corresponding to the target table among a plurality of pre-divided service areas, wherein each service area corresponds to a preset service provider. If the first service provider corresponding to the target service area meets the preset conditions, the first service provider is determined as the target service provider. If the first service provider does not meet the preset conditions, one or more alternative service areas corresponding to the target table are determined. The second service provider corresponding to each alternative service area is determined, and if there is at least one second service provider that meets the preset conditions, any second service provider that meets the preset conditions is determined as the target service provider. If the second service providers corresponding to each alternative service area do not meet the preset conditions, the first service provider is determined as the target service provider.
[0111] In some other optional implementations, satisfying the preset condition may include any one of the following: currently being in an idle state, or the service type corresponding to the currently executed task is the same as the target service type.
[0112] In some other optional implementations, the candidate service area is a service area corresponding to a table adjacent to the target table, and a path between the table adjacent to the target table and the target table is less than a preset distance.
[0113] In some other optional implementations, the second determination module 503 is configured to: if there is a target task group in the current task queue of the target service provider, insert the target task for the service request in the target task group to obtain the target task queue. If there is no target task group in the current task queue of the target service provider, create a target task group, add the target task to the target task group, and insert the target task group in the current task queue according to the preset priority corresponding to the target service type to obtain the target task queue.
[0114] In some other optional implementations, the second determination module 503 inserts the target task for the service request into the target task group in the following manner: determining the table corresponding to each task in the target task group. Determining the target path according to a preset rule, the target path passes through the table corresponding to each task in the target task group and the target table. Inserting the target task into the target task group according to the order in which the target path passes through the tables.
[0115] like Figure 6 As shown, Figure 6 is a block diagram of another service task scheduling device according to an exemplary embodiment of the present application. Figure 5 On the basis of the illustrated embodiment, the device may further include: an adjustment module 504 .
[0116] The adjustment module 504 is used to advance the execution order of the timeout task group when it is determined that there is a timeout task group in the target task queue, and the duration of the timeout task group from the creation time to the current time exceeds the preset duration.
[0117] It should be understood that the above device can be pre-set in the server, or loaded into the server by downloading, etc. The corresponding modules in the above device can cooperate with the modules in the server to implement the scheduling scheme of the service task.
[0118] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present application scheme. A person of ordinary skill in the art can understand and implement it without paying any creative work.
[0119] The present application also provides a computer-readable storage medium, which stores a computer program, which can be used to execute the above Figures 2A to 4 A method for scheduling service tasks provided by any embodiment.
[0120] Corresponding to the above-mentioned scheduling method for service tasks, the present application embodiment also proposes Figure 7 The schematic structural diagram of an electronic device according to an exemplary embodiment of the present application is shown in FIG. Figure 7 At the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, and of course may also include hardware required for other services. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it, forming a scheduling device for service tasks at the logical level. Of course, in addition to software implementations, this application does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0121] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.
[0122] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A method for scheduling restaurant service tasks. It is characterized in that The method comprises: receiving a service request for a target table, wherein the service request carries information of a target service type; Determining a target service provider based on the target table includes: determining a target service area corresponding to the target table from among a plurality of pre-divided service areas; wherein each of the service areas corresponds to a preset service provider; if a first service provider corresponding to the target service area satisfies a preset condition, the first service provider is determined as the target service provider; if the first service provider does not satisfy the preset condition, one or more candidate service areas corresponding to the target table are determined; determining a second service provider corresponding to each of the candidate service areas; if there is at least one second service provider satisfying the preset condition, any second service provider satisfying the preset condition is determined as the target service provider; if none of the second service providers corresponding to the candidate service areas satisfies the preset condition, the first service provider is determined as the target service provider; Based on the target service type, determining a target task queue of the target service provider, the target task queue being composed of one or more task groups arranged in execution order, each of the task groups including one or more tasks, and each of the task groups corresponding to a service type, and the target task queue including the target task group corresponding to the target service type; The determining, based on the target service type, a target task queue of the target service provider includes: if the target task group exists in the current task queue of the target service provider, inserting the target task for the service request into the target task group to obtain a target task queue; if the target task group does not exist in the current task queue of the target service provider, creating the target task group, adding the target task into the target task group, and inserting the target task group into the current task queue according to a preset priority corresponding to the target service type to obtain the target task queue.
2. The method according to claim 1, It is characterized in that The preset condition includes any one of the following: is currently idle; or The service type corresponding to the currently executed task is the same as the target service type.
3. The method according to claim 1, It is characterized in that The candidate service area is a service area corresponding to a table adjacent to the target table, and a path between the table adjacent to the target table and the target table is less than a preset distance.
4. The method according to claim 1, It is characterized in that The inserting the target task for the service request into the target task group includes: Determine the table position corresponding to each task in the target task group; Determine a target path according to a preset rule, wherein the target path passes through the table corresponding to each task in the target task group and the target table; The target tasks are inserted into the target task group according to the order in which the target path passes through the tables.
5. The method according to any one of claims 1 to 4, It is characterized in that The method further comprises: If it is determined that there is a timeout task group in the target task queue, the execution order of the timeout task group is advanced, and the duration of the timeout task group from the creation time to the current time exceeds the preset duration.
6. A scheduling device for restaurant service tasks, It is characterized in that The device comprises: A receiving module, configured to receive a service request for a target table, wherein the service request carries information about a target service type; A first determination module, for determining a target service provider based on the target table, comprising: determining a target service area corresponding to the target table from a plurality of pre-divided service areas; wherein each of the service areas corresponds to a preset service provider; if a first service provider corresponding to the target service area satisfies a preset condition, the first service provider is determined as the target service provider; if the first service provider does not satisfy the preset condition, one or more candidate service areas corresponding to the target table are determined; a second service provider corresponding to each of the candidate service areas is determined; if there is at least one second service provider satisfying the preset condition, any second service provider satisfying the preset condition is determined as the target service provider; if none of the second service providers corresponding to each of the candidate service areas satisfies the preset condition, the first service provider is determined as the target service provider; A second determination module is used to determine a target task queue of the target service provider based on the target service type, wherein the target task queue is composed of one or more task groups arranged in execution order, each of the task groups includes one or more tasks, and each of the task groups corresponds to a service type, and the target task queue includes a target task group corresponding to the target service type; The determining, based on the target service type, a target task queue of the target service provider includes: if the target task group exists in the current task queue of the target service provider, inserting the target task for the service request into the target task group to obtain a target task queue; if the target task group does not exist in the current task queue of the target service provider, creating the target task group, adding the target task into the target task group, and inserting the target task group into the current task queue according to a preset priority corresponding to the target service type to obtain the target task queue.
7. A computer-readable storage medium, It is characterized in that The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the program, the method according to any one of claims 1 to 5 is implemented.
