A queuing simulation processing method and apparatus

By simulating customer arrival and service times, the queuing waiting time and filtering value under different queue numbers were calculated, solving the problem of setting the number of service windows, realizing the reasonable determination of the number of service windows, and improving the efficiency of determining the number of queues.

CN114329999BActive Publication Date: 2026-02-03INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111669380.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-31
Publication Date
2026-02-03
Estimated Expiration
2041-12-31

AI Technical Summary

Technical Problem

With a limited number of service windows, the problem of longer customer waiting times and idle windows leads to increased operating costs, making the rational setting of service windows an important issue.

Method used

By obtaining customer arrival time and service time, queuing simulation is performed to calculate the queuing waiting time for each customer under different queue numbers. Based on the waiting time threshold, a filtering value is obtained to determine the optimal queue number and optimize the number of service windows.

Benefits of technology

Determining the appropriate number of queues through numerical simulation improves the efficiency of determining the number of service windows and reduces customer waiting time and operating costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114329999B_ABST
    Figure CN114329999B_ABST
Patent Text Reader

Abstract

The application provides a queuing simulation processing method and device, which can be used in the financial field or other technical fields. The method comprises the following steps: obtaining the arrival time and service time of a preset number of customers; performing queuing simulation according to the arrival time and service time of the preset number of customers to obtain the queuing waiting time of each customer under different queue numbers; obtaining the screening value corresponding to the different queue numbers according to the queuing waiting time of each customer under the different queue numbers and the waiting time threshold; wherein the screening value is the proportion of customers less than the waiting time threshold or the proportion of customers greater than the waiting time threshold; and obtaining the optimal queue number according to the screening value corresponding to the different queue numbers. The device is used to execute the above method. The queuing simulation processing method and device provided by the embodiment of the application improve the efficiency of determining the appropriate queue number.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data processing, in particular to a queuing simulation processing method and device. BACKGROUND

[0002] At present, queuing for business is a common phenomenon, and there are customer queuing situations in various service industries such as train stations and supermarkets.

[0003] The queuing for business is caused by the large number of customers for business and the limited service windows, which cannot handle customer business in time. On the one hand, the fewer service windows will lead to the extension of customer queuing time, which is easy to cause customer complaints; on the other hand, increasing service windows will lead to the idle of service windows when there are fewer customers, which increases the operating cost. Therefore, how to reasonably set the service window becomes an important topic to be solved in the field. SUMMARY

[0004] In view of the problems in the prior art, the embodiments of the present application provide a queuing simulation processing method and device, which can at least partially solve the problems in the prior art.

[0005] On the one hand, the present application provides a queuing simulation processing method, comprising:

[0006] obtaining the arrival time and service time of a preset number of customers;

[0007] performing queuing simulation according to the arrival time and service time of the preset number of customers to obtain the queuing waiting time of each customer under different queue numbers;

[0008] obtaining the screening value corresponding to different queue numbers according to the queuing waiting time of each customer under different queue numbers and the waiting time threshold; wherein the screening value is the proportion of customers less than the waiting time threshold or the proportion of customers greater than the waiting time threshold;

[0009] obtaining the optimal queue number according to the screening value corresponding to different queue numbers.

[0010] On the other hand, the present application provides a queuing simulation processing device, comprising:

[0011] an obtaining module for obtaining the arrival time and service time of a preset number of customers;

[0012] a first obtaining module for performing queuing simulation according to the arrival time and service time of the preset number of customers to obtain the queuing waiting time of each customer under different queue numbers;

[0013] The second obtaining module is used to obtain a filtering value corresponding to different queue numbers based on the queuing waiting time of each customer under different queue numbers and the waiting time threshold; wherein, the filtering value is the proportion of customers whose waiting time is less than the waiting time threshold or the proportion of customers whose waiting time is greater than the waiting time threshold.

[0014] The third module is used to obtain the optimal number of queues based on the filtering values ​​corresponding to different queue numbers.

[0015] In another aspect, the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the queuing simulation processing method described in any of the above embodiments.

[0016] In another aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the queuing simulation processing method described in any of the above embodiments.

[0017] The queuing simulation processing method and apparatus provided in this invention can obtain the arrival time and service time of a preset number of customers, perform queuing simulation based on the arrival time and service time of the preset number of customers, obtain the queuing waiting time of each customer under different queue numbers, obtain the filtering value corresponding to different queue numbers based on the queuing waiting time of each customer under different queue numbers and the waiting time threshold, and obtain the optimal queue number based on the filtering value corresponding to different queue numbers. It can obtain the appropriate number of service windows through numerical simulation, thereby improving the efficiency of determining the appropriate queue number. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. In the drawings:

[0019] Figure 1 This is a flowchart illustrating the queuing simulation processing method provided in the first embodiment of the present invention.

[0020] Figure 2 This is a schematic diagram of the filtering value and queue number provided in the second embodiment of the present invention.

[0021] Figure 3 This is a flowchart illustrating the queuing simulation processing method provided in the third embodiment of the present invention.

[0022] Figure 4This is a flowchart illustrating the queuing simulation provided in the fourth embodiment of the present invention.

[0023] Figure 5 This is a schematic diagram of the queuing simulation processing device provided in the fifth embodiment of the present invention.

[0024] Figure 6 This is a schematic diagram of the queuing simulation processing device provided in the sixth embodiment of the present invention.

[0025] Figure 7 This is a schematic diagram of the queuing simulation processing device provided in the seventh embodiment of the present invention.

[0026] Figure 8 This is a schematic diagram of the physical structure of the electronic device provided in the eighth embodiment of the present invention. Detailed Implementation

[0027] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings. Here, the illustrative embodiments and descriptions of the present invention are used to explain the present invention, but are not intended to limit the present invention. It should be noted that, unless otherwise specified, the embodiments and features in the embodiments of this application can be arbitrarily combined with each other.

[0028] The following example, using a server as the execution subject, illustrates the specific implementation process of the queuing simulation processing method provided in this embodiment of the invention.

[0029] Figure 1 This is a flowchart illustrating the queuing simulation processing method provided in the first embodiment of the present invention, as shown below. Figure 1 As shown, the queuing simulation processing method provided in this embodiment of the invention includes:

[0030] S101. Obtain the arrival time and service time of a preset number of customers;

[0031] Specifically, the server can obtain a preset number of customer arrival times and service times, where the arrival time is the time when the customer arrives at the service location and the service time is the time spent by the customer in handling the business.

[0032] For example, a Poisson process can be used to randomly generate a preset number of customer arrival times and service times during a workday.

[0033] For example, when checking out at a supermarket, the customer's arrival time is the time it takes for the customer to arrive at the cashier, and the customer's service time is the checkout duration. When queuing to buy tickets at a train station, the customer's arrival time is the time it takes for the customer to arrive at the ticket window, and the customer's service time is the duration from when they start buying tickets at the ticket window to when they leave the ticket window.

[0034] S102. Perform queuing simulation based on the arrival time and service time of a preset number of customers to obtain the queuing waiting time for each customer under different queue numbers;

[0035] Specifically, the server arranges the arrival times of a preset number of customers in chronological order to obtain the customer arrival order. For each queue size, queuing simulation is performed one by one from the first customer to the last customer according to their arrival time, simulating the queuing process for the preset number of customers. Based on the arrival times and service times of the preset number of customers and the queuing process, the queuing waiting time for each customer under each queue size can be obtained. The number of queues can be set according to actual needs, and this embodiment of the invention does not limit the number of queues.

[0036] For example, a supermarket has a total of 10 checkout counters. It can open 1 to 10 checkout counters. Opening one checkout counter results in one queue, and opening 10 checkout counters results in 10 queues. When queuing is simulated, the simulation can be run for each of the 10 different queue sizes to obtain the waiting time for each customer.

[0037] S103. Based on the queuing waiting time of each customer under different queue numbers and the waiting time threshold, obtain the filtering value corresponding to different queue numbers; wherein, the filtering value is the proportion of customers whose waiting time is less than the waiting time threshold or the proportion of customers whose waiting time is greater than the waiting time threshold.

[0038] Specifically, the server can compare the queuing time of each customer under each queue number with a waiting time threshold to obtain the number of customers whose queuing time is less than or equal to the waiting time threshold. Then, it calculates the ratio of the number of customers whose queuing time is less than or equal to the waiting time threshold under each queue number to a preset number, obtaining the proportion of customers whose queuing time is less than the waiting time threshold for each queue number. Alternatively, the server can compare the queuing time of each customer under each queue number with a waiting time threshold to obtain the number of customers whose queuing time is greater than the waiting time threshold. Then, it calculates the ratio of the number of customers whose queuing time is greater than the waiting time threshold under each queue number to a preset number, obtaining the proportion of customers whose queuing time is greater than the waiting time threshold for each queue number. The server can use the proportion of customers whose queuing time is less than the waiting time threshold for each queue number as a filtering value for each queue number, or use the proportion of customers whose queuing time is greater than the waiting time threshold for each queue number as a filtering value for each queue number. The waiting time threshold is set based on practical experience, and this embodiment of the invention does not impose any limitations.

[0039] For example, if the queuing time of each customer in a queue of 10 is compared with the waiting time threshold, and the number of customers whose queuing time is less than or equal to the waiting time threshold is 490, and the preset number is 500, then the proportion of customers whose queuing time is less than the waiting time threshold corresponding to a queue of 10 is 490 / 500 = 98%.

[0040] S104. Obtain the optimal number of queues based on the filtering values ​​corresponding to different queue numbers.

[0041] Specifically, the server compares the filtering values ​​corresponding to different queue numbers and obtains the number of queues that causes the corresponding filtering value to change drastically when the number of queues increases, which is then taken as the preferred number of queues.

[0042] For example, the absolute value of the difference between the screening values ​​corresponding to the number of adjacent queues can be calculated to obtain multiple absolute values. By comparing these absolute values, the largest absolute value can be obtained, and the larger number of adjacent queues corresponding to the largest absolute value can be selected as the preferred number of queues.

[0043] For example, such as Figure 2 As shown, the horizontal axis represents the number of queues, and the vertical axis represents the proportion of customers whose waiting time exceeds the threshold. When the number of queues is 5, the corresponding proportion of customers whose waiting time exceeds the threshold is 86%; when the number of queues is 6, the corresponding proportion of customers whose waiting time exceeds the threshold is 8.7%. When the number of queues increases from 5 to 6, the proportion of customers whose waiting time exceeds the threshold decreases from 86% to 8.7%. The absolute value of the difference between the screening values ​​corresponding to adjacent queue numbers of 5 and 6 is the largest among all adjacent queue numbers. Therefore, queue number 6 is selected as the preferred queue number.

[0044] The queuing simulation processing method provided in this invention can obtain the arrival time and service time of a preset number of customers, perform queuing simulation based on the arrival time and service time of the preset number of customers, obtain the queuing waiting time of each customer under different queue numbers, obtain the filtering value corresponding to different queue numbers based on the queuing waiting time of each customer under different queue numbers and the waiting time threshold, obtain the optimal queue number based on the filtering value corresponding to different queue numbers, and obtain the appropriate number of service windows through numerical simulation, thereby improving the efficiency of determining the appropriate queue number.

[0045] Figure 3 This is a flowchart illustrating the queuing simulation processing method provided in the third embodiment of the present invention, as shown below. Figure 3 As shown, based on the above embodiments, the step of performing queuing simulation based on the arrival time and service time of a preset number of customers to obtain the queuing waiting time for each customer under different queue numbers includes:

[0046] S301. Based on the current arrival time of the customer and the estimated completion time of each customer in each queue, obtain the service status of each customer in each queue.

[0047] Specifically, during the queuing simulation, the server changes from the first customer to the last customer according to the arrival time of a preset number of customers. Each time the current customer changes, the service status of the corresponding customer in each queue is updated. Starting from the first customer in each queue, the server calculates the estimated completion time for each customer in each queue, and then compares the calculated estimated completion time for each customer in each queue with the arrival time of the current customer to determine the service status of each customer in each queue.

[0048] Customer service status can be categorized into Completed, In Service, and Queued. Completed indicates the customer has finished processing their transaction; In Service indicates the customer is currently processing their transaction; and Queued indicates the customer is waiting in line. Each queue corresponds to customers whose service status was either In Service or Queued when the previous customer was added to the queue. Due to the time interval between the arrival time of the current customer and the arrival time of the previous customer, the service status of customers in each queue may change upon the arrival of the current customer. Specifically, if a customer's service status is Queued, their waiting time will change subsequently; if their service status is In Service, their waiting time will remain unchanged.

[0049] For a queue, the estimated completion time of the first customer in the queue is equal to the sum of the customer's arrival time, waiting time, and service time. The estimated completion time of the second customer is equal to the sum of the customer's estimated start time and service time, and the estimated start time of the second customer is equal to the estimated completion time of the first customer. The estimated completion time of the third customer is equal to the sum of the customer's estimated start time and service time, and the estimated start time of the third customer is equal to the estimated completion time of the second customer. And so on, the estimated completion time of the i-th customer in the queue is equal to the sum of the customer's estimated start time and service time, and the estimated start time of the i-th customer is equal to the estimated completion time of the (i-1)-th customer. Therefore, the formula for calculating the estimated completion time of the i-th customer in the queue is as follows:

[0050]

[0051] in, This represents the estimated completion time of the i-th customer in the queue. This represents the arrival time of the i-th customer in the queue. This represents the waiting time of the i-th customer in the queue. This represents the service time of the i-th customer in the queue. This represents the estimated completion time for the (i-1)th customer in the queue, where i is a positive integer.

[0052] S302. Update the number of customers included in each queue and the number of customers in each queue according to the service status of each customer corresponding to each queue, and update the waiting time of each customer corresponding to the queue.

[0053] Specifically, after obtaining the service status of each customer corresponding to each queue, the server can update the customers included in each queue based on the service status of each customer in each queue. Customers with a service status of "completed" are removed from the queue, and customers with service statuses of "serving" and "queuing" are retained as customers included in each queue. The server calculates the number of customers with service statuses of "queuing" and "serving" in each queue as the queue size for each queue. The server also updates the waiting time for each customer corresponding to the queue. The specific process of updating the customer's waiting time is detailed below and will not be repeated here.

[0054] S303. Add the current customer to the queue with the fewest queues based on the queue length of each queue, and set the service status and waiting time of the current customer, as well as update the queue length of the queue to which the current customer is added.

[0055] Specifically, the server compares the queue lengths of each queue and adds the current customer to the queue with the shortest queue length. The server also sets the service status of the current customer and increments the queue length of the queue where the current customer is added by 1, thus updating the queue length of the queue where the current customer is added.

[0056] For example, the queue size equals the sum of the number of customers whose service status is "Service in Progress" and the number of customers in the queue. Before adding the current customer to the queue with the smallest queue size, if the queue size is 0, it means the queue is empty, the current customer does not need to wait and can directly process the business. The current customer's service status will be set to "Service in Progress", the current customer's arrival time will be the same as the current customer's service start time, and the current customer's waiting time will be 0. If the queue size is greater than or equal to 1, it means there are customers in the queue, the current customer needs to wait in the queue, the current customer's service status will be set to "Queued", and the current customer's waiting time will be set to 0.

[0057] Based on the above embodiments, further, obtaining the service status of each customer corresponding to each queue according to the current customer's arrival time and the estimated completion time of each customer corresponding to each queue includes:

[0058] If it is determined that there are no customers in the queue whose expected completion time is earlier than the current customer's arrival time, then the service status of all customers in the queue remains unchanged.

[0059] If it is determined that there is a customer in the queue whose expected completion time is earlier than or equal to the current customer's arrival time, then the service status of the corresponding customer is updated to "completed".

[0060] If it is determined that there are customers in the queue whose estimated completion time is later than the current customer's arrival time, then the service status of the customer whose estimated completion time differs from the current customer's arrival time the least is updated to "in service," while the service status of the remaining customers in the queue remains unchanged.

[0061] Specifically, the server compares the estimated completion time of each customer corresponding to the queue with the current customer's arrival time. If there is no customer whose estimated completion time is earlier than the current customer's arrival time, it means that no customer in the queue has completed their business at the current customer's arrival time, and the service status of all customers in the queue remains unchanged. If the estimated completion time of the first customer corresponding to the queue is later than the current customer's arrival time, then it can be determined that there is no customer whose estimated completion time is earlier than the current customer's arrival time.

[0062] If a customer's estimated completion time is earlier than their current arrival time, it means that the customer has already completed the transaction by the time they arrive, and the customer's service status can be updated to "completed". If a customer's estimated completion time is equal to their current arrival time, it means that the transaction has been completed exactly by the time they arrive, and the customer's service status can also be updated to "completed".

[0063] If a customer's estimated completion time is later than the current customer's arrival time, it means that the customer is either processing a transaction or waiting to process a transaction. The absolute value of the difference between the estimated completion time of each customer whose estimated completion time is later than the current customer's arrival time and the current customer's arrival time can be calculated. The customer with the smallest absolute value has the smallest difference between the estimated completion time and the current customer's arrival time. The service status of the customer with the smallest absolute value is updated to "Service in Progress", and the service status of the remaining customers in the queue remains unchanged.

[0064] Understandably, if there is only one customer in the queue whose estimated completion time is later than the current customer's arrival time, then the service status of that customer can be directly updated to "Service in Progress". If there are no customers in the queue whose estimated completion time is later than the current customer's arrival time, it means that no customer is processing business, then the queue is empty, and the queue size can be set to 0.

[0065] Based on the above embodiments, the step of updating the customers included in each queue and the queuing number of each queue according to the service status of each customer corresponding to each queue includes: removing customers whose service status is completed from the customers corresponding to the queue to obtain the customers included in the queue, and counting the number of customers whose service status is in queue or in service as the queuing number of the queue.

[0066] Specifically, the server removes customers whose service status is "completed" from the queue, and includes the remaining customers in the queue. The server counts the number of customers whose service status is "in queue" or "service in progress," and uses this count as the queue size.

[0067] For example, queue A corresponds to 7 customers, of which 3 customers have completed their service, 1 customer has been served, and 3 customers have been queued. Then, the 3 customers whose service status is completed are removed from queue A, and queue A includes the remaining 4 customers. The queue size of queue A is 4.

[0068] Based on the above embodiments, the further step of updating the waiting time for each customer corresponding to the queue includes:

[0069] If it is learned that the customer's service status has changed from "in service" to "completed", the customer's waiting time remains unchanged.

[0070] If it is known that the customer's service status has changed from queued to completed, then the customer's waiting time is equal to the difference between the service completion time of the customer's previous customer in the queue and the customer's arrival time.

[0071] If it is known that the customer's service status has changed from queued to serviced, then the customer's waiting time is equal to the difference between the service completion time of the previous customer in the queue and the customer's arrival time.

[0072] If it is known that the customer's service status remains unchanged, then the customer's waiting time remains unchanged;

[0073] If it is known that the customer's service status remains unchanged in the queue, then the customer's waiting time is updated to the time difference between the current customer's arrival time and the customer's arrival time.

[0074] Specifically, the server obtains the service status before and after the update for each customer corresponding to the queue. If the customer's service status before the update is "Service in Progress" and the service status after the update is "Completed," then the customer's service status changes from "Service in Progress" to "Completed," and the customer's waiting time remains unchanged, which is used as the customer's waiting time after the queuing simulation is completed. For customers with a service status of "Completed," the server can record the service start time and service completion time of the customer with the service status of "Completed."

[0075] If a customer's service status changed from "queued" to "completed" before the update, then the customer's service start time is obtained, and the time difference between the customer's service start time and arrival time is calculated as the customer's waiting time. If the customer's updated service status is "serviced," it means the previous customer in the queue had a "completed" service status, and the completion time of that previous customer is taken as the customer's service start time. The completion time of the previous customer in the queue is equal to the sum of the previous customer's arrival time, waiting time, and service time.

[0076] If a customer's service status changed from "queued" to "serviced" before the update, then the customer's service start time is obtained, and the time difference between the customer's service start time and arrival time is calculated as the customer's waiting time. Since the customer's updated service status is "serviced," it means the service status of the previous customer in the queue was "completed," and the completion time of that previous customer is taken as the customer's service start time. The completion time of the previous customer in the queue is equal to the sum of the previous customer's arrival time, waiting time, and service time.

[0077] If a customer's service status was "Service" before the update and remains "Service" after the update, it means that the customer's service status remains unchanged, and therefore the customer's waiting time remains unchanged.

[0078] If a customer's service status was queued before the update and remains queued after the update, it means that the customer's service status remains queued. In this case, the time difference between the current arrival time and the customer's arrival time is calculated as the customer's waiting time.

[0079] Based on the above embodiments, the queuing simulation processing method provided by the embodiments of the present invention further includes:

[0080] If an empty queue is detected, the current customer is assigned to the empty queue and the current customer's waiting time is set to 0 and the service status is set to "in service".

[0081] Specifically, the current customer is the customer who needs to be assigned a queue. Before assigning a queue to the current customer, it can be determined whether there is an empty queue. If the queue does not contain any customers, then the queue is an empty queue. The customer can be directly assigned to the empty queue, and the current customer's waiting time is set to 0 and the service status is set to "in service".

[0082] Based on the above embodiments, the step of obtaining the arrival time and service time of a preset number of customers further includes:

[0083] The arrival time and service time of the preset number of customers are randomly obtained based on a Poisson process.

[0084] Specifically, since it is difficult to collect customer arrival times and service times at service locations such as train stations and supermarkets, the arrival times and service times of the preset number of customers can be obtained through numerical simulation. Customer arrival times and service times can be randomly obtained based on a Poisson process.

[0085] For example, customer arrival times and service times follow a Poisson distribution. Given an arrival time interval, a mean arrival time, and a preset number of customers, the arrival time of a preset number of customers within that time interval can be obtained using the Poisson distribution formula. Similarly, given a service time interval, a service time, and a preset number of customers, the service time of a preset number of customers within that time interval can be obtained using the Poisson distribution formula. The time interval is set according to actual needs, and this embodiment of the invention does not impose any limitations.

[0086] The following queuing simulation aims to obtain a reasonable number of open checkout counters for supermarket X. Supermarket X has 8 checkout counters and is open from 9:00 to 21:00. Eight queuing simulations are conducted, ranging from queue size 1 to queue size 8.

[0087] The arrival times of M customers at the checkout counter between 9:00 and 21:00 are obtained using a Poisson process. Since customers have limited checkout time, a reasonable checkout time interval T1-T2 is set. The service time for the M customers within this interval is obtained using the Poisson process; this is the checkout duration, which is the time spent by each customer at checkout. The values ​​of T1 and T2 are set based on practical experience and are not limited in this embodiment. The specific value of M is also set based on practical experience and is not limited in this embodiment.

[0088] Figure 4 This is a flowchart illustrating the queuing simulation provided in the fourth embodiment of the present invention, as shown below. Figure 4 As shown, the queuing simulation process for supermarket X is as follows:

[0089] Step 1: Set the current queue size. The initial value of the current queue size is 1, and the current queue size is initialized to 8. The current queue size changes from 1 to 8.

[0090] The second step is to obtain the arrival time of the current customer. Sort the arrival times of the M customers in chronological order, and the current customer will change from the first customer to the last customer according to the order of their arrival times.

[0091] Step 3: Check if all queues are empty. If there is no corresponding customer in a queue, the queue is empty. If there is at least one non-empty queue, proceed to step 4. If all queues are empty, proceed to step 14.

[0092] Step 4: Set the queue loop variable. The initial value of the queue loop variable is 1, and the queue loop variable is less than or equal to the current queue size.

[0093] Step 5: Check if the queue is empty. Obtain a queue. If there is no corresponding customer in the queue, then the queue is empty. Return to step 4 and increment the value of the queue loop variable by 1. If the queue is not empty, proceed to step 6.

[0094] Step 6: Update the customer loop variable. Get the total number of customers corresponding to the queue and set the initial value of the customer loop variable to 1.

[0095] Step 7: Compare arrival time and estimated completion time. From the customers in the queue, obtain the estimated completion time of the first customer in the queue. Compare the estimated completion time of the first customer with the arrival time of the current customer at the checkout. If the estimated completion time of the first customer is later than the arrival time of the current customer, proceed to step 8; if the estimated completion time of the first customer is earlier than or equal to the arrival time of the current customer, proceed to step 9; if the estimated completion time of the first customer is later than the arrival time of the current customer and the customer is not the first customer in the queue, proceed to step 10.

[0096] Step 8: Maintain the service status of each customer. Keep the service status of the corresponding customer in the queue unchanged.

[0097] Step 9: Update the customer's service status. Update the customer's service status to "Completed".

[0098] Step 10: Update the customer's service status. Update the customer's service status to "Service in Progress".

[0099] Step 11: Maintain the service status of the remaining customers. Keep the service status of the remaining customers in the queue unchanged as "in queue".

[0100] Step 12: Update queue parameters and waiting time. Queue parameters include the customers included in the queue and the number of customers in the queue. Customers with a service status of "completed" are removed from the queue. Customers with service statuses of "serving" and "queuing" are retained as customers included in each queue. The number of customers with service statuses of "queuing" and "serving" in each queue is calculated as the number of customers in each queue.

[0101] Update the waiting time for each customer in the queue. If the customer's service status changes from "in queue" to "completed," the customer's waiting time is equal to the time difference between the customer's service start time and arrival time. If the customer's service status changes from "in queue" to "service," the customer's waiting time is equal to the time difference between the customer's service start time and arrival time. If the customer's service status remains "service," the customer's waiting time remains unchanged. If the customer's service status remains "in queue," update the customer's waiting time to the time difference between the current customer's arrival time and the customer's arrival time.

[0102] Step 13: Determine if the queue cycle threshold has been reached. Compare the value of the queue cycle variable with the current queue size. If the value of the queue cycle variable is less than the current queue size, return to step 4 and increment the value of the queue cycle variable by 1. If the value of the queue cycle variable is equal to the current queue size, proceed to step 13.

[0103] Step 14: Add the current customer to the queue. Compare the queue lengths of each queue and add the current customer to the queue with the shortest queue length. If all queues are empty, add the current customer to any queue. After adding the current customer to the queue, set the current customer's service status and increment the queue length of the queue where the current customer was added by 1.

[0104] Step 15: Determine if the current customer is the last customer. If the current customer is the last customer among M customers, proceed to step 16; if the current customer is not the last customer among M customers, obtain the next customer as the current customer and return to step 2.

[0105] Step 16: Clear the queue. Since no new customers are arriving, the waiting times for each customer in the queue will be updated when the queue is cleared. The waiting times for customers in the "Service in Progress" queue remain unchanged. The service completion time for customers in the "Service in Progress" queue is equal to the sum of the service start time and the service time. The waiting time for customers in the "Queued" queue is equal to their service completion time minus their service start time. Their service start time is equal to the service completion time of the previous customer in the queue.

[0106] Step 17: Determine if the queue size limit has been reached. Compare the current queue size with the queue size limit of 8. If the current queue size is less than 8, return to step 1 and increment the current queue size by 1. If the current queue size is equal to 8, the queuing simulation process for supermarket X ends.

[0107] After the queuing simulation process in supermarket X is completed, the waiting time for each customer under eight different queue numbers (1 to 8) can be obtained. The waiting time for each customer under each queue number is compared with a waiting time threshold to obtain the filtering value corresponding to each queue number.

[0108] Calculate the absolute value of the difference between the screening values ​​corresponding to each adjacent queue number among the screening thresholds corresponding to eight different queue numbers, obtain eight absolute values, compare the eight absolute values, obtain the largest absolute value, and take the larger queue number among the adjacent queue numbers corresponding to the largest absolute value as the preferred queue number.

[0109] Figure 5 This is a schematic diagram of the queuing simulation processing device provided in the fifth embodiment of the present invention, as shown below. Figure 5 As shown, based on the above embodiments, the queuing simulation processing device provided in this embodiment of the invention further includes an acquisition module 501, a first acquisition module 502, a second acquisition module 503, and a third acquisition module 504, wherein:

[0110] The acquisition module 501 is used to acquire the arrival time and service time of a preset number of customers; the first acquisition module 502 is used to perform queuing simulation based on the arrival time and service time of the preset number of customers to acquire the queuing waiting time of each customer under different queue numbers; the second acquisition module 503 is used to acquire the filtering value corresponding to different queue numbers based on the queuing waiting time of each customer under different queue numbers and the waiting time threshold; wherein, the filtering value is the proportion of customers less than the waiting time threshold or the proportion of customers greater than the waiting time threshold; the third acquisition module 504 is used to acquire the preferred queue number based on the filtering value corresponding to different queue numbers.

[0111] Specifically, the acquisition module 501 can acquire the arrival time and service time of a preset number of customers, wherein the arrival time is the time when the customer arrives at the service location, and the service time is the time spent by the customer in handling the business.

[0112] The first acquisition module 502 arranges the arrival times of a preset number of customers in chronological order to obtain the chronological order of customer arrival times. For each queue number, queuing simulation is performed one by one from the first customer to the last customer according to the chronological order of customer arrival times, simulating the queuing process for the preset number of customers. Based on the arrival times and service times of the preset number of customers and the queuing process, the queuing waiting time for each customer under each queue number can be obtained. The number of queues can be set according to actual needs, and this embodiment of the invention does not limit the number of queues.

[0113] The second obtaining module 503 can compare the queuing time of each customer under each queue number with a waiting time threshold to obtain the number of customers whose queuing time is less than or equal to the waiting time threshold. Then, it calculates the ratio of the number of customers whose queuing time is less than or equal to the waiting time threshold under each queue number to a preset number, thereby obtaining the proportion of customers whose queuing time is less than the waiting time threshold for each queue number. Alternatively, the second obtaining module 503 can compare the queuing time of each customer under each queue number with a waiting time threshold to obtain the number of customers whose queuing time is greater than the waiting time threshold. Then, it calculates the ratio of the number of customers whose queuing time is greater than the waiting time threshold under each queue number to a preset number, thereby obtaining the proportion of customers whose queuing time is greater than the waiting time threshold for each queue number. The second obtaining module 503 can use the proportion of customers whose queuing time is less than the waiting time threshold for each queue number as a filtering value for each queue number, or use the proportion of customers whose queuing time is greater than the waiting time threshold for each queue number as a filtering value for each queue number. The waiting time threshold is set based on practical experience, and this embodiment of the invention does not impose limitations.

[0114] The third obtaining module 504 compares the filtering values ​​corresponding to different queue numbers and obtains the number of queues that causes the corresponding filtering value to change drastically when the number of queues increases, and uses this as the preferred number of queues.

[0115] The queuing simulation processing device provided in this embodiment of the invention can obtain the arrival time and service time of a preset number of customers, perform queuing simulation based on the arrival time and service time of the preset number of customers, obtain the queuing waiting time of each customer under different queue numbers, obtain the filtering value corresponding to different queue numbers based on the queuing waiting time of each customer under different queue numbers and the waiting time threshold, obtain the optimal queue number based on the filtering value corresponding to different queue numbers, and obtain the appropriate number of service windows through numerical simulation, thereby improving the efficiency of determining the appropriate queue number.

[0116] Figure 6 This is a schematic diagram of the queuing simulation processing device provided in the sixth embodiment of the present invention, as shown below. Figure 6 As shown, based on the above embodiments, the first obtaining module 502 further includes a first updating unit 5021, a second updating unit 5022, and an adding unit 5023, wherein:

[0117] The first update unit 5021 updates the service status of each customer in each queue based on the current customer's arrival time and the estimated completion time of each customer in each queue. The second update unit 5022 updates the number of customers in each queue and the number of queues in each queue based on the service status of each customer in each queue, and updates the waiting time of each customer in each queue. The addition unit 5023 adds the current customer to the queue with the fewest queues based on the number of queues in each queue, and sets the service status of the current customer and updates the number of queues in the queue where the current customer is added.

[0118] Based on the above embodiments, the first updating unit 5021 is further specifically used for:

[0119] If it is determined that there are no customers in the queue whose expected completion time is earlier than the current customer's arrival time, then the service status of the corresponding customer in the queue remains unchanged.

[0120] If it is determined that there is a customer in the queue whose estimated completion time is earlier than or equal to the current customer's arrival time, then the service status of the corresponding customer in the queue is updated to "completed".

[0121] If it is determined that there are customers in the queue whose estimated completion time is later than the current customer's arrival time, then the service status of the customer whose estimated completion time differs from the current customer's arrival time the least is updated to "Serving," while the service status of the remaining customers in the queue remains unchanged.

[0122] Based on the above embodiments, the second update unit 5022 is further configured to: remove customers whose service status is completed from the customers corresponding to the queue, obtain the customers included in the queue, and count the number of customers whose service status is in the queue as the queue number.

[0123] Based on the above embodiments, the second updating unit 5022 is further specifically used for:

[0124] If it is learned that the customer's service status has changed from "in service" to "completed", the customer's waiting time remains unchanged.

[0125] If it is known that the customer's service status has changed from queued to completed, then the customer's waiting time is equal to the time difference between the customer's service start time and the customer's arrival time.

[0126] If it is known that the customer's service status has changed from queued to in service, then the customer's waiting time is equal to the time difference between the customer's service start time and the customer's arrival time.

[0127] If it is known that the customer's service status remains unchanged, then the customer's waiting time remains unchanged;

[0128] If it is known that the customer's service status remains unchanged in the queue, then the customer's waiting time is updated to the time difference between the current customer's arrival time and the customer's arrival time.

[0129] Figure 7 This is a schematic diagram of the queuing simulation processing device provided in the seventh embodiment of the present invention, as shown below. Figure 7 As shown, based on the above embodiments, the queuing simulation processing device provided in this embodiment of the invention further includes:

[0130] The setting module 505 is used to assign the current customer to the empty queue and set the current customer's waiting time to 0 and service status to "in service" after determining that an empty queue exists.

[0131] Based on the above embodiments, the acquisition module 501 is further specifically used for:

[0132] The arrival time and service time of the preset number of customers are randomly obtained based on a Poisson process.

[0133] The embodiments of the device provided in this invention can be used to execute the processing flow of the above-described method embodiments. Its functions will not be repeated here, but can be referred to the detailed description of the above-described method embodiments.

[0134] It should be noted that the queuing simulation processing method and apparatus provided in the embodiments of the present invention can be used in the financial field, or in any technical field other than the financial field. The embodiments of the present invention do not limit the application field of the queuing simulation processing method and apparatus.

[0135] Figure 8 This is a schematic diagram of the physical structure of the electronic device provided in the eighth embodiment of the present invention, as shown below. Figure 8 As shown, the electronic device may include: a processor 801, a communication interface 802, a memory 803, and a communication bus 804, wherein the processor 801, the communication interface 802, and the memory 803 communicate with each other through the communication bus 804. The processor 801 can call logical instructions in the memory 803 to execute the following methods: obtaining the arrival time and service time of a preset number of customers; performing queuing simulation based on the arrival time and service time of the preset number of customers to obtain the queuing waiting time for each customer under different queue numbers; obtaining a filtering value corresponding to different queue numbers based on the queuing waiting time of each customer under different queue numbers and a waiting time threshold; wherein the filtering value is the proportion of customers whose waiting time is less than the waiting time threshold or the proportion of customers whose waiting time is greater than the waiting time threshold; and obtaining an optimal queue number based on the filtering value corresponding to different queue numbers.

[0136] Furthermore, the logical instructions in the aforementioned memory 803 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0137] This embodiment discloses a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions, and when the program instructions are executed by a computer, the computer can execute the methods provided in the above-described method embodiments, such as: obtaining the arrival time and service time of a preset number of customers; performing queuing simulation based on the arrival time and service time of the preset number of customers to obtain the queuing waiting time for each customer under different queue numbers; obtaining a filtering value corresponding to different queue numbers based on the queuing waiting time of each customer under different queue numbers and a waiting time threshold; wherein the filtering value is the proportion of customers whose waiting time is less than the waiting time threshold or the proportion of customers whose waiting time is greater than the waiting time threshold; and obtaining an optimal queue number based on the filtering value corresponding to different queue numbers.

[0138] This embodiment provides a computer-readable storage medium storing a computer program that causes a computer to execute the methods provided in the above-described method embodiments. For example, the methods include: obtaining the arrival times and service times of a preset number of customers; performing queuing simulation based on the arrival times and service times of the preset number of customers to obtain the queuing waiting time for each customer under different queue numbers; obtaining a filtering value corresponding to different queue numbers based on the queuing waiting times of each customer under different queue numbers and a waiting time threshold; wherein the filtering value is the proportion of customers whose waiting time is less than the waiting time threshold or the proportion of customers whose waiting time is greater than the waiting time threshold; and obtaining an optimal queue number based on the filtering value corresponding to different queue numbers.

[0139] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0140] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxesFigure 1 A device that provides the functions specified in one or more boxes.

[0141] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0142] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0143] In the description of this specification, the references to terms such as "an embodiment," "a specific embodiment," "some embodiments," "for example," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0144] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A queuing simulation processing method, characterized in that, include: Obtain the arrival time and service time of a preset number of customers; Queue simulation is performed based on the arrival time and service time of a preset number of customers to obtain the queuing waiting time for each customer under different queue sizes; Based on the queuing wait time of each customer under different queue numbers and the wait time threshold, a filtering value corresponding to different queue numbers is obtained; wherein, the filtering value is the proportion of customers whose wait time is less than the wait time threshold or the proportion of customers whose wait time is greater than the wait time threshold. The preferred number of queues is obtained based on the filtering values ​​corresponding to different queue numbers; the preferred number of queues is the number of queues that causes the filtering values ​​to change drastically. The queuing simulation based on the arrival time and service time of a preset number of customers, to obtain the queuing waiting time for each customer under different queue sizes, includes: Update the service status of each customer in each queue based on the current arrival time of the customer and the estimated completion time of each customer in each queue. Update the number of customers included in each queue and the number of customers in each queue according to the service status of each customer corresponding to each queue, and update the waiting time of each customer corresponding to the queue. The current customer is added to the queue with the fewest queues based on the queue lengths of each queue, and the service status of the current customer is set and the queue length for adding the current customer is updated.

2. The method according to claim 1, characterized in that, The process of obtaining the service status of each customer for each queue based on the current customer's arrival time and the estimated completion time of each customer for each queue includes: If it is determined that there are no customers in the queue whose expected completion time is earlier than the current customer's arrival time, then the service status of all customers in the queue remains unchanged. If it is determined that there is a customer in the queue whose estimated completion time is earlier than or equal to the current customer's arrival time, then the service status of the corresponding customer is updated to "completed". If it is determined that there are customers in the queue whose estimated completion time is later than the current customer's arrival time, then the service status of the customer whose estimated completion time differs from the current customer's arrival time the least is updated to "Serving," while the service status of the remaining customers in the queue remains unchanged.

3. The method according to claim 1, characterized in that, The step of updating the number of customers included in each queue and the number of customers in each queue based on the service status of each customer corresponding to each queue includes: Remove customers whose service status is "completed" from the customers corresponding to the queue, obtain the customers included in the queue, and count the number of customers whose service status is "in queue" as the queue number.

4. The method according to claim 1, characterized in that, The step of updating the waiting time for each customer corresponding to the queue includes: If it is learned that the customer's service status has changed from "in service" to "completed", the customer's waiting time remains unchanged. If it is known that the customer's service status has changed from queued to completed, then the customer's waiting time is equal to the time difference between the customer's service start time and the customer's arrival time. If it is known that the customer's service status has changed from queued to in service, then the customer's waiting time is equal to the time difference between the customer's service start time and the customer's arrival time. If it is known that the customer's service status remains unchanged, then the customer's waiting time remains unchanged; If it is known that the customer's service status remains unchanged in the queue, then the customer's waiting time is updated to the time difference between the current customer's arrival time and the customer's arrival time.

5. The method according to claim 1, characterized in that, Also includes: If an empty queue is detected, the current customer is assigned to the empty queue and the current customer's waiting time is set to 0 and the service status is set to "in service".

6. The method according to any one of claims 1 to 5, characterized in that, The process of obtaining the arrival time and service time of a preset number of customers includes: The arrival time and service time of the preset number of customers are randomly obtained based on a Poisson process.

7. A queue simulation processing device, characterized in that, include: The acquisition module is used to acquire the arrival time and service time of a preset number of customers; The first acquisition module is used to perform queuing simulation based on the arrival time and service time of a preset number of customers, and to obtain the queuing waiting time of each customer under different queue numbers; The second obtaining module is used to obtain a filtering value corresponding to different queue numbers based on the queuing waiting time of each customer under different queue numbers and the waiting time threshold; wherein, the filtering value is the proportion of customers whose waiting time is less than the waiting time threshold or the proportion of customers whose waiting time is greater than the waiting time threshold. The third obtaining module is used to obtain the preferred queue number based on the filtering value corresponding to different queue numbers; the preferred queue number is the number of queues that causes the filtering value to change drastically. The first obtaining module includes a first updating unit, a second updating unit, and an adding unit, wherein the first updating unit updates the service status of each customer corresponding to each queue based on the current arrival time of the customer and the estimated completion time of each customer corresponding to each queue; The second update unit updates the number of customers included in each queue and the number of customers in each queue according to the service status of each customer corresponding to each queue, and updates the waiting time of each customer corresponding to the queue. The adding unit adds the current customer to the queue with the fewest queues based on the queue length of each queue, sets the service status of the current customer, and updates the queue length of the queue to which the current customer is added.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • An evaluation method of airport security inspection efficiency optimization scheme based on queuing theory

    CN109447385A