Method for obtaining waiting time, electronic device and storage medium
By detecting the user's facial image and determining its type, and combining it with the user identification list to calculate the waiting time, the problem of existing technologies failing to consider the impact of people who do not need to queue again is solved, achieving more accurate waiting time acquisition and improving user satisfaction.
Patent Information
- Application Number
- CN202510063559.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-15
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2045-01-15
AI Technical Summary
Existing technologies fail to effectively consider the impact of people who can re-enter the target area without having to queue again when calculating waiting time, resulting in inaccurate calculation of waiting time and potentially reducing user satisfaction.
By detecting the length of time a user enters and remains in the waiting area, their facial image is obtained, and the user type is determined using image similarity and a preset threshold to determine whether it is a key image. The waiting time is calculated based on the current user ID list, taking into account the number of users who can re-enter the target area without queuing.
Improves the accuracy of waiting time, improves user satisfaction, and ensures more accurate calculation of waiting time.
Smart Images

Figure CN119991384B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a method for obtaining a waiting time, an electronic device, and a storage medium. Background Art
[0002] Waiting time is an important factor affecting user satisfaction. In some service places (such as hospitals and banks), it is also an important indicator for measuring the management level of these places. Currently, most waiting time acquisition methods mainly predict the waiting time corresponding to each queue member based on the number of people waiting to enter the target area, the queueing order of the queue members, and the historical stay time of a single queue member in the target area. However, the method does not take into account those people who can re-enter the target area without having to queue again (for example, patients who return after temporarily leaving for examination or consultation). When the number of such people who can re-enter the target area without having to queue again reaches a certain amount, it will directly affect the actual waiting time of people who are waiting to enter the target area for the first time, and may cause the calculated waiting time to be less than the actual waiting time. Therefore, the waiting time obtained by the above method has a low accuracy, which may reduce user satisfaction. Summary of the Invention
[0003] In view of the above technical problems, the technical solution adopted by the present invention is:
[0004] According to a first aspect of the present invention, a method for obtaining a waiting time is provided, the method comprising the following steps:
[0005] S1. When a new user is detected to appear in the waiting area, and the duration of the new user's continuous appearance in the waiting area reaches a preset duration, and at the same time, the facial image of the new user can be obtained, the facial image of the new user is used as the target image E, wherein the new user is the user entering the waiting area, and each time a user enters the waiting area, it is regarded as a new user.
[0006] S2. Determine whether the target image E is a key image corresponding to the target area based on the target image E, the current first-category user identification list set A, the current second-category user identification list set B, and the current third-category user identification list set C, where A={A1, A2, ..., A i ,…,A m}, A i ={A i1 , A i2 ,…,A ij ,…,A in(i)}, A i D i The corresponding first category user identification list, A ij For the current Ai The jth first-class user ID in the , j value ranges from 1 to n(i), n(i) is the current A i The number of first-class user identifiers in D i is the i-th target area identifier in the target area identifier list D, D={D1, D2, ..., D i ,…,D m}, i ranges from 1 to m, m is the number of target area identifiers, the coverage of any two different target areas does not overlap, B = {B1, B2, ..., B i ,…,B m}, B i ={B i1 , B i2 ,…,B ie ,…,B if(i)}, B i D i The corresponding second category user identification list, B ie For the current B i The second category user ID of the eth user in the B, the value of e ranges from 1 to f(i), f(i) is the current B i The number of the second type of user identifiers, C = {C1, C2, ..., C i ,…,C m}, C i ={C i1 , C i2 ,…,C ir ,…,C is(i)}, C i D i The corresponding third category user identification list, C ir For the current C i The rth third-category user identifier in the , r value ranges from 1 to s(i), s(i) is the current C i The number of third-category user identifiers in the first category, the first category of users are users who are waiting in line to enter the target area for the first time, the second category of users are users who can re-enter the target area without queuing, and the third category of users are users who are waiting in line to re-enter the target area; step S2 includes the following steps S21-S24:
[0007] S21. If there is no F ij ≥F 0 , then get the target images E and B ie Image similarity G between corresponding facial images ie , F ij For target images E and A ij Image similarity between corresponding facial images, F 0 is the preset similarity threshold.
[0008] S22, if G ie ≥F 0 , then determine that the target image E is D i The corresponding target area corresponds to the key image, and B ie Insert into D i The corresponding fourth category user identification list; if G does not exist ie ≥F 0 , then get the target images E and C ir The image similarity H between corresponding facial images ir .
[0009] S23, if H ir ≥F 0 , then get the current time point and X ir The time difference K ir , X ir C ir The corresponding estimated task completion time.
[0010] S24, if K ir ≤K 0 , then determine that the target image E is D i The corresponding target area corresponds to the key image, and C ir Insert into D i The corresponding fourth category user identification list, where K 0 The preset time difference.
[0011] S3. If the target image E is D i The key image corresponding to the target area is obtained at the current time point D i The number L of fourth-category user identifiers in the fourth-category user identifier list corresponding to the target area identifier of the corresponding target area i .
[0012] S4, if L i ≥L 0 , then get A ij The corresponding waiting time P ij , L 0 is the preset number of user identifiers, P ij Meet the following conditions: P ij =(j-1)×t1+L i × t2, t1 is the first preset waiting time, and t2 is the second preset waiting time.
[0013] According to a second aspect of the present invention, a non-transitory computer-readable storage medium is provided, in which a computer program is stored. The computer program is loaded and executed by a processor to implement the aforementioned method.
[0014] According to a third aspect of the present invention, an electronic device is provided, comprising: a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor implements the aforementioned method when executing the computer program.
[0015] The present invention has at least the following beneficial effects:
[0016] The present invention provides a method for obtaining a waiting time, an electronic device, and a storage medium. The method, when detecting that a new user appears in a waiting area and the duration for which the new user continues to appear in the waiting area reaches a preset duration, and when a facial image of the new user can be obtained, uses the facial image of the new user as a target image, obtains a fourth-category user identifier corresponding to the target area based on the similarity between the target image and the facial image corresponding to the current first-category user identifier, the similarity between the target image and the facial image corresponding to the current second-category user identifier, and the similarity between the target image and the facial image corresponding to the current third-category user identifier, and determines whether the target image is a key image of the target area, wherein the first-category user is a user who queues to enter the target area for the first time; the second-category user is a user who can re-enter the target area without queuing; the third-category user is a user who queues to wait to re-enter the target area; and the fourth-category user is a user who is in the waiting area at the current time point and can re-enter the target area without queuing. When the target image is a key image for the target area, the number of fourth-category user identifiers in the fourth-category user identifier list corresponding to the target area is obtained. If the number of fourth-category user identifiers is not less than the preset number of user identifiers, the waiting time corresponding to the first-category user identifiers in the first-category user identifier list corresponding to the target area is calculated based on the order of the first-category user identifiers in the first-category user identifier list corresponding to the target area, the first preset waiting time, the second preset waiting time, and the number of fourth-category user identifiers. It can be seen that the present invention, in the process of obtaining the waiting time, takes into account the number of users who are currently in the waiting area and can re-enter the target area without queuing, which is conducive to improving the accuracy of the obtained waiting time and, in turn, improving user satisfaction. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0018] Figure 1 The present invention provides a flowchart of a method for obtaining a waiting time. DETAILED DESCRIPTION
[0019] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making any creative efforts shall fall within the scope of protection of the present invention.
[0020] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar tasks and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0021] The embodiment of the present invention provides a method for obtaining the waiting time. Figure 1 As shown, the method includes the following steps:
[0022] S1. When a new user is detected in the waiting area, and the duration of the new user's continuous appearance in the waiting area reaches a preset duration, and at the same time, a facial image of the new user can be obtained, the facial image of the new user is used as the target image E. It is known to those skilled in the art that the preset duration is a duration pre-set by those skilled in the art according to actual needs, for example: 30 seconds, 40 seconds, 50 seconds, which will not be repeated here.
[0023] In the above steps, the preset duration can be flexibly adjusted according to actual conditions, thereby avoiding the impact of misidentification due to a short passage.
[0024] Specifically, a new user is a user who enters the waiting area. Whenever a user enters the waiting area, he or she will be regarded as a new user, regardless of whether the user has entered the waiting area before. Even if the user leaves the waiting area halfway, when the user enters the waiting area again, he or she will still be regarded as a new user to avoid omissions.
[0025] Specifically, when a new user is detected to appear in the waiting area, and the new user continues to appear in the waiting area for a preset time period, but the facial image of the new user cannot be obtained, the new user is continuously monitored. Once the facial image of the new user can be obtained, the facial image of the new user is used as the target image E.
[0026] Specifically, a video acquisition device is provided in the waiting area, and the video acquisition device acquires the video in the waiting area in real time and continuously uploads the acquired video stream.
[0027] S2. Determine whether the target image E is a key image corresponding to the target area based on the target image E, the current first-category user identification list set A, the current second-category user identification list set B, and the current third-category user identification list set C, where A={A1, A2, ..., A i ,…,A m}, A i ={A i1 , A i2 ,…,A ij ,…,A in(i)}, A i D i The corresponding first category user identification list, A ij For the current A i The jth first-class user ID in the , j value ranges from 1 to n(i), n(i) is the current A i The number of first-class user identifiers in D i is the i-th target area identifier in the target area identifier list D, D={D1, D2, ..., D i ,…,D m}, i ranges from 1 to m, m is the number of target area identifiers, B={B1,B2,…,B i ,…,B m}, B i ={B i1 , B i2 ,…,B ie ,…,B if(i)}, B i D i The corresponding second category user identification list, B ie For the current B i The second category user ID of the eth user in the B, the value of e ranges from 1 to f(i), f(i) is the current B i The number of the second type of user identifiers, C = {C1, C2, ..., C i ,…,C m}, C i ={C i1 , Ci2 ,…,C ir ,…,C is(i)}, C i D i The corresponding third category user identification list, C ir For the current C i The rth third-category user identifier in the , r value ranges from 1 to s(i), s(i) is the current C i The number of third-category user identifiers in .
[0028] Specifically, the first type of user identification is the identity identification of the first type of user, and the first type of user is the user who is queuing and waiting to enter the target area for the first time; the second type of user identification is the identity identification of the second type of user, and the second type of user is the user who can enter the target area again without queuing; the third type of user identification is the identity identification of the third type of user, and the third type of user is the user who is queuing and waiting to enter the target area again.
[0029] Specifically, the target area identifier is a unique identifier of the target area.
[0030] Furthermore, the target area is adjacent to the waiting area, and the user needs to pass through the waiting area before entering the target area.
[0031] Furthermore, the coverage areas of any two different target areas do not overlap.
[0032] Specifically, before step S2, the following steps S01-S04 are also included to obtain A, B and C:
[0033] S01. When receiving user information uploaded by a smart terminal, the user identifier in the user information is used as a first-category user identifier, and the first-category user identifier is inserted into a first-category user identifier list corresponding to a target area identifier corresponding to the user identifier. The user information includes at least the user identifier, the user's facial image, the user's contact information, and the target area identifier corresponding to the user identifier. The above are only some examples, and there may be other user information, such as user name and user age, which will not be repeated here.
[0034] Specifically, the smart terminal is set outside the waiting area.
[0035] Specifically, after the first type of user identifier is inserted into the first type of user identifier list, the initial waiting time T corresponding to the first type of user identifier is obtained, where T meets the following conditions:
[0036] T=(SL-1)×t1, where SL is the number of first-category user identifiers in the first-category user identifier list after the first-category user identifier is inserted into the first-category user identifier list, and t1 is the first preset waiting time.
[0037] In a specific embodiment, the first preset waiting time is a time period preset by those skilled in the art according to actual needs, for example, 15 minutes, 20 minutes, which will not be described in detail here.
[0038] In a specific embodiment, the first preset waiting time can be calculated based on the average length of time that the first type of users stay in the target area during a historical period, which will not be described in detail here.
[0039] Furthermore, based on T, a notification text T corresponding to the first type of user identifier corresponding to T is generated. 0 , and use the contact information corresponding to the first type of user identifier to send T 0 Sent to the first type of users corresponding to the first type of user identifiers.
[0040] Specifically, T 0 To notify T 0 The corresponding first type of users has a current waiting time of T.
[0041] Specifically, after the first category user identifier is inserted into the first category user identifier list, the initial waiting time is obtained according to the number of the first category user identifiers in the first category user identifier list. It can be understood that when the first category users start to queue, an initial waiting time is obtained according to the number of people currently in the queue. When the target image is the key image of the target area, the number of the fourth category user identifiers in the fourth category user identifier list corresponding to the target area is obtained. When the number of the fourth category user identifiers is not less than the preset number of user identifiers, the order of the first category user identifiers in the first category user identifier list corresponding to the target area, the first preset waiting time, the second preset waiting time, etc. are calculated based on the order of the first category user identifiers in the first category user identifier list corresponding to the target area. The waiting time and the number of the fourth category user identifiers are used to calculate the waiting time corresponding to the first category user identifier corresponding to the target area. Otherwise, no processing is performed. Even if the number of the fourth category user identifiers in the fourth category user identifier list corresponding to the target area is not met, the waiting time can be obtained if the number of the fourth category user identifiers is not less than the preset number of user identifiers, thereby avoiding the situation where the waiting time cannot be obtained all the time. Based on the waiting time, a notification text corresponding to the first category user identifier corresponding to the waiting time is generated, and the notification text is sent to the first category user corresponding to the first category user identifier through the contact method corresponding to the first category user identifier, which is conducive to improving user satisfaction.
[0042] Specifically, the first user identification list is a first-in-first-out queue.
[0043] Specifically, after the smart terminal is started, it automatically generates the first category user identification list, the second category user identification list and the third category user identification list corresponding to the target area identification, and the first category user identification list, the second category user identification list and the third category user identification list are initially NULL.
[0044] Specifically, after the user completes information confirmation on the smart terminal, the smart terminal will upload the user information of the user.
[0045] S02, when receiving A ij When the corresponding task identifiers to be executed are combined, A ij From A i Delete it and set A ij Insert into C i The pending task identifier combination includes several pending task identifiers, and the pending task identifier is a unique identity identifier of the pending task.
[0046] Specifically, when A ij The corresponding first type of users enter D i After the corresponding target area, located at D i The task assignment personnel in the corresponding target area will assign A ij The corresponding first type of users are assigned several tasks to be executed, and the task identifier combination composed of the task identifiers of the tasks to be executed and A ij Input to set in D i Among the terminal devices in the corresponding target area, when D i The terminal device in the corresponding target area receives A ij and A ij When the corresponding pending task identification combination is uploaded ij and A ij The corresponding combination of task identifiers to be executed.
[0047] S03, according to C ir The corresponding pending task identification combination U ir And the preset task execution time mapping list V, get C ir The corresponding target task execution time W ir , V={V1,V2,…,V g ,…,V h}, V g ={V g1 , V g2}, V g is the gth preset task execution duration mapping combination, where g ranges from 1 to h, and h is the number of preset task execution duration mapping combinations. g1 V gThe preset task identification combination in the preset task identification combination includes several preset task identifications, V g2 V g1 The corresponding preset task execution time, where U ir All pending task identifiers and V g1 When all the preset task identifiers in are exactly the same, let W ir =V g2 ; For example: If U ir The tasks to be executed in the V g1 The tasks to be executed in are identified as ID 2, ID 3, ID 1 and ID 4, then W ir =V g2 .
[0048] In a specific embodiment, the preset task execution duration mapping list is a list pre-set by those skilled in the art according to actual needs, and will not be described in detail here.
[0049] In a specific embodiment, the preset task execution time mapping list can be calculated based on the average value of the combination of to-be-executed task identifiers corresponding to the third category of users and the task completion time corresponding to the third category of users within the historical time period. The task completion time corresponding to the third category of users is the time between the time point when the third category of users starts to execute their corresponding to-be-executed tasks and the time point when the task results of all their corresponding to-be-executed tasks are obtained. No further details will be given here.
[0050] S04. Get C ir The corresponding estimated task completion time point X ir , and in X ir Arrival C ir From C i Delete it and set C ir Insert into B i Among them, X ir Meet the following conditions:
[0051] X ir =DQ ir +W ir , DQ ir C ir Inserted into C i The time point in .
[0052] Through the above steps, the first category of users are users who are waiting in line to enter the target area for the first time; the second category of users are users who can enter the target area again without queuing; the third category of users are users who are waiting in line to enter the target area again. Based on the user information uploaded by the smart terminal, the combination of pending task identifiers corresponding to the first category of user identifiers, and the estimated task completion time points corresponding to the third category of user identifiers, the first category of user identifier lists, the second category of user identifier lists, and the third category of user identifier lists are continuously updated, and the user identifiers of users of the same category are divided into the same list. This lays the foundation for obtaining the fourth category of user identifier lists corresponding to the target area and determining whether the target image is the key image corresponding to the target area based on the target image, the current first category of user identifier list set, the current second category of user identifier list set, and the current third category of user identifier list set.
[0053] Specifically, step S2 includes the following steps S21-S24:
[0054] S21. If there is no F ij ≥F 0 , then get the target images E and B ie Image similarity G between corresponding facial images ie , F ij For target images E and A ij Image similarity between corresponding facial images, F 0 is the preset similarity threshold, if there is F ij ≥F 0 , it is determined that the target image E is not the key image corresponding to the target area. Those skilled in the art know that any method of obtaining the image similarity between two images in the prior art falls within the protection scope of the present invention and will not be described in detail here.
[0055] Specifically, F 0 The value range is [0.8, 1).
[0056] Specifically, the key image corresponding to the target area can be understood as a facial image of a user that may cause the waiting time of the first type of users in the target area to be prolonged.
[0057] Through the above steps, if the image similarity between the target image and the facial image corresponding to the first type of user identifier is not less than the preset similarity threshold, it means that the user corresponding to the target image and the first type of user corresponding to the first type of user identifier are the same user, that is, the new user entering the waiting area is the first type of user, and the entry of the user will not prolong the waiting time of the first type of users in the target area. Therefore, the target image is not the key image corresponding to the target area. If there is no target image and the image similarity corresponding to the first type of user identifier is less than the preset similarity threshold, it means that the user corresponding to the target image is not the first type of user. At this time, it is necessary to further determine whether the user corresponding to the target image is the second type of user.
[0058] S22, if G ie ≥F 0 , then determine that the target image E is D i The corresponding target area corresponds to the key image, and B ie Insert into D i The corresponding fourth category user identification list; if G does not exist ie ≥F 0 , then get the target images E and C ir The image similarity H between corresponding facial images ir .
[0059] Through the above steps, if the image similarity between the target image and the facial image corresponding to the second category user identifier is not less than the preset similarity threshold, it means that the user corresponding to the target image and the second category user corresponding to the second category user identifier are the same user, that is, the user entering the waiting area is a user who can enter the target area again without queuing, and the entry of the user may prolong the waiting time of the first category users in the target area. Therefore, the target image is the key image corresponding to the target area. If the image similarity between the target image and the facial image corresponding to the second category user identifier is less than the preset similarity threshold, it means that the user corresponding to the target image is not the second category user. At this time, it is necessary to further determine whether the user corresponding to the target image is the third category user.
[0060] S23, if H ir ≥F 0 , then get the current time point and X ir The time difference K ir If there is no H ir ≥F 0 , it is determined that the target image E is not the key image corresponding to the target area.
[0061] S24, if K ir ≤K 0 , then determine that the target image E is D iThe corresponding target area corresponds to the key image, and C ir Insert into D i The corresponding fourth category user identification list, where K 0 It is a preset time difference. Those skilled in the art know that the preset time difference is a time difference pre-set by those skilled in the art according to actual needs, for example: 1 minute, 2 minutes, which will not be repeated here.
[0062] Through the above steps, if the image similarity between the target image and the facial image corresponding to the third category user identifier is not less than the preset similarity threshold, it means that the user corresponding to the target image and the third category user corresponding to the third category user identifier are the same user. At this time, the time difference between the current time point and the estimated task completion time point corresponding to the third category user identifier is obtained. When the estimated task completion time point corresponding to the third category user identifier is reached, the third category user has already obtained the execution results of all tasks to be executed. At this time, the third category user will become a second category user. Therefore, if the time difference between the current time point and the estimated task completion time point corresponding to the third category user identifier is not greater than the preset time difference, This indicates that at this time, the third type of user corresponding to the third type of user identifier has most likely obtained the execution results of all the tasks to be executed and can enter the target area again without queuing. Therefore, the user corresponding to the target image entering the waiting area will most likely prolong the waiting time of the first type of users in the target area. Therefore, the target image is the key image corresponding to the target area; if the image similarity between the target image and the facial image corresponding to the third type of user identifier is less than the preset similarity threshold, it indicates that the user corresponding to the target image is not a third type of user either, and the user corresponding to the target image entering the waiting area will not prolong the waiting time of the first type of users in the target area. Therefore, the target image is not the key image corresponding to the target area.
[0063] Specifically, if the duration between the insertion time point corresponding to the fourth category user identifier and the current time point is not less than the preset duration, the fourth category user identifier is deleted from the fourth category user identifier list where the fourth category user identifier is located. The insertion time point corresponding to the fourth category user identifier is the time point when the fourth category user identifier is inserted into the fourth category user identifier list, wherein the preset duration is a duration pre-set by those skilled in the art according to actual needs, for example: 20 minutes, 30 minutes, which will not be repeated here.
[0064] Specifically, the fourth category user identification list includes several fourth category user identifications, where the fourth category user identifications are identity identifications of fourth category users, and the fourth category users are users who are in the waiting area at the current time point and can re-enter the target area without queuing.
[0065] Through the above steps, when the time length between the insertion time point corresponding to the fourth type of user identifier and the current time point is not less than the preset time length, the fourth type of user identifier is deleted to avoid the situation where the fourth type of user has left the target area and the waiting area, but the corresponding fourth type of user identifier still exists in the fourth type of user identifier list, which is conducive to improving the accuracy of obtaining the waiting time.
[0066] Specifically, after the smart terminal is started, it automatically generates a fourth category user identification list corresponding to the target area identification, and the fourth category user identification list is initially NULL.
[0067] In a specific embodiment, if K ir >K 0 , then the user corresponding to the target image is continuously monitored. If ir Before the target image arrives, if the user corresponding to the target image leaves the waiting area, no processing will be performed. Otherwise, ir When arriving, determine that the target image E is D i The corresponding target area corresponds to the key image, and C ir Insert into D i In the corresponding fourth category user identification list, the user corresponding to the target image is continuously monitored. When the user corresponding to the target image can affect the waiting time of the first category of users in the target area, the target image is used as a key image to avoid misjudgment.
[0068] S3. If the target image E is D i The key image corresponding to the target area is obtained at the current time point D i The number L of fourth-category user identifiers in the fourth-category user identifier list corresponding to the target area identifier of the corresponding target area i .
[0069] Specifically, if the target image E is not the key image corresponding to the target area, no processing is performed.
[0070] S4, if L i ≥L 0 , then get A ij The corresponding waiting time P ij , L 0 is the preset number of user identifiers, P ij Meet the following conditions:
[0071] P ij =(j-1)×t1+L i × t2, t2 is the second preset waiting time. Those skilled in the art know that the preset number of user identifiers is the number of user identifiers pre-set by those skilled in the art according to actual needs, for example: 3, 4, 5, which will not be repeated here.
[0072] Specifically, t2<t1.
[0073] In a specific embodiment, the second preset waiting time is a time length pre-set by a technician in this field according to actual needs. For example, if the first preset waiting time is 10 minutes, then the second preset waiting time is 5 minutes; if the first preset waiting time is 20 minutes, then the second preset waiting time is 10 minutes, which will not be repeated here.
[0074] Specifically, the first preset waiting time can be understood as: the predicted length of time that the first type of users stay in the target area; the second preset waiting time can be understood as: the predicted length of time that the fourth type of users stay in the target area. Since the first type of users are users waiting in line to enter the target area for the first time, and the fourth type of users are users who are in the waiting area at the current time point and can enter the target area again without queuing, that is, the fourth type of users have already entered the target area. Therefore, the length of time that the fourth type of users stay in the target area should be less than the length of time that the first type of users stay in the target area.
[0075] Specifically, if L i <L 0 , no processing is performed.
[0076] Specifically, based on P ij Generate A ij Corresponding notification text Q ij and through A ij The corresponding contact information will be Q ij Send to A ij The corresponding first type of users.
[0077] Specifically, Q ij To notify A ij The corresponding first type of users, whose current waiting time is P ij .
[0078] Through the above steps, when a new user is detected to appear in the waiting area, and the time for which the new user appears in the waiting area reaches a preset duration, and the facial image of the new user can be obtained, the facial image of the new user is used as the target image, and according to the similarity between the target image and the facial image corresponding to the current first-category user identifier, the similarity between the target image and the facial image corresponding to the current second-category user identifier, and the similarity between the target image and the facial image corresponding to the current third-category user identifier, the fourth-category user identifier corresponding to the target area is obtained, and it is determined whether the target image is the key image of the target area, wherein the first-category user is a user who is waiting in line to enter the target area for the first time; the second-category user is a user who can re-enter the target area without queuing; the third-category user is a user who is waiting in line to re-enter the target area; and the fourth-category user is a user who is in the waiting area at the current time point and can re-enter the target area without queuing. When the target image is a key image of the target area, the number of fourth-category user identifiers in the fourth-category user identifier list corresponding to the target area is obtained. When the number of the fourth-category user identifiers is not less than the preset number of user identifiers, the waiting time corresponding to the first-category user identifier corresponding to the target area is calculated based on the order of the first-category user identifiers in the first-category user identifier list corresponding to the target area, the first preset waiting time, the second preset waiting time, and the number of the fourth-category user identifiers. Based on the waiting time, a notification text corresponding to the first-category user identifier corresponding to the waiting time is generated, and the notification text is sent to the first-category user corresponding to the first-category user identifier via the contact information corresponding to the first-category user identifier. This takes into account the number of users who are in the waiting area at the current time point and can re-enter the target area without queuing, which is conducive to improving the accuracy of the obtained waiting time, and thus is conducive to improving user satisfaction.
[0079] In a specific application scenario, the waiting area can be a waiting area. The first type of users can be initial consultation personnel, the second type of users can be personnel who are currently available for follow-up consultation, and the third type of users can be personnel who are waiting in line to get the examination results before a follow-up consultation. The target area can be a clinic, the smart terminal can be a sign-in machine, the tasks to be executed can be items that need to be checked, the identifiers of the tasks to be executed can be the names of the items that need to be checked, the task assigners in the target area can be doctors in the clinic, and the fourth type of users can be personnel who are currently in the waiting area and who are currently available for a follow-up consultation. When someone enters the waiting area and continues to appear in the waiting area for a preset duration, the facial image of this person is used as the target image; when the user completes the sign-in on the sign-in machine, the user is regarded as the first type of user. When the first type of user completes the consultation in the clinic, the doctor will enter the name of the examination item into the computer, and the computer will send it to the server. At this time, the first type of user is regarded as the third type of user. When the third type of user has completed all the examination items and obtained the results of all the examination items, the The third category of users, acting as the second category of users, determines whether the target image is a key image corresponding to the target area based on the target image and the facial images of the first category of users, the facial images of the second category of users, and the facial images of the third category of users, and obtains the fourth category of users corresponding to the target area. When the target image is the key image of the target area, it indicates that the entry of the user corresponding to the target image will affect the waiting time of the first category of users in the target area. At this time, the waiting time corresponding to the first category of user identifier corresponding to the target area identifier is calculated based on the number of fourth category user identifiers corresponding to the target area identifier, the order of the first category user identifiers in the list of first category user identifiers corresponding to the target area identifier, the first preset waiting time, and the second preset waiting time. Based on the waiting time, a notification text corresponding to the first category user identifier is generated, and the notification text is sent to the first category user via the communication method corresponding to the first category user identifier. This takes into account the number of users who are in the waiting area at the current time point and can re-enter the target area without queuing, which is conducive to improving the accuracy of the obtained waiting time, and thus is conducive to improving user satisfaction.
[0080] An embodiment of the present invention also provides a non-transitory computer-readable storage medium, which can be set in an electronic device to store a computer program related to a method in the method embodiment. The computer program is loaded and executed by the processor to implement the method provided in the above embodiment.
[0081] An embodiment of the present invention further provides an electronic device, comprising: a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method provided in the above embodiment when executing the computer program.
[0082] An embodiment of the present invention further provides a computer program product comprising program code. When the program product is run on an electronic device, the program code is used to enable the electronic device to execute the steps of the method according to various exemplary embodiments of the present invention described above in this specification.
[0083] The present invention provides a method for obtaining a waiting time, an electronic device, and a storage medium. The method, when detecting that a new user appears in a waiting area and the duration for which the new user continues to appear in the waiting area reaches a preset duration, and when a facial image of the new user can be obtained, uses the facial image of the new user as a target image, obtains a fourth-category user identifier corresponding to the target area based on the similarity between the target image and the facial image corresponding to the current first-category user identifier, the similarity between the target image and the facial image corresponding to the current second-category user identifier, and the similarity between the target image and the facial image corresponding to the current third-category user identifier, and determines whether the target image is a key image of the target area, wherein the first-category user is a user who queues to enter the target area for the first time; the second-category user is a user who can re-enter the target area without queuing; the third-category user is a user who queues to wait to re-enter the target area; and the fourth-category user is a user who is in the waiting area at the current time point and can re-enter the target area without queuing. When the target image is a key image for the target area, the number of fourth-category user identifiers in the fourth-category user identifier list corresponding to the target area is obtained. If the number of fourth-category user identifiers is not less than the preset number of user identifiers, the waiting time corresponding to the first-category user identifiers in the first-category user identifier list corresponding to the target area is calculated based on the order of the first-category user identifiers in the first-category user identifier list corresponding to the target area, the first preset waiting time, the second preset waiting time, and the number of fourth-category user identifiers. It can be seen that the present invention, in the process of obtaining the waiting time, takes into account the number of users who are currently in the waiting area and can re-enter the target area without queuing, which is conducive to improving the accuracy of the obtained waiting time and, in turn, improving user satisfaction.
[0084] Although some specific embodiments of the present invention have been described in detail by way of examples, it should be understood by those skilled in the art that the above examples are for illustration only and are not intended to limit the scope of the present invention. It should also be understood by those skilled in the art that various modifications may be made to the embodiments without departing from the scope and spirit of the present invention.
Claims
1. A method for obtaining waiting time, characterized in that: The method comprises the following steps: S1. When a new user is detected to appear in the waiting area, and the duration of the new user's continuous presence in the waiting area reaches a preset duration, and a facial image of the new user is acquired, the facial image of the new user is used as a target image E. The new user is a user entering the waiting area, and each time a user enters the waiting area, the user is considered a new user. S2. Determine whether the target image E is a key image corresponding to the target area based on the target image E, the current first-category user identification list set A, the current second-category user identification list set B, and the current third-category user identification list set C, where A={A1, A2, ..., A i ,…,A m }, A i ={A i1 , A i2 ,…,A ij ,…,A in(i) }, A i D i The corresponding first category user identification list, A ij For the current A i The jth first-class user ID in the , j value ranges from 1 to n(i), n(i) is the current A i The number of first-class user identifiers in D i is the i-th target area identifier in the target area identifier list D, D={D1, D2, ..., D i ,…,D m }, i ranges from 1 to m, m is the number of target area identifiers, the coverage of any two different target areas does not overlap, B={B1, B2, ..., B i ,…,B m }, B i ={B i1 , B i2 ,…,B ie ,…,B if(i) }, B i D i The corresponding second category user identification list, B ie For the current B i The second category user ID of the eth user in the B, the value of e ranges from 1 to f(i), f(i) is the current B i The number of the second type of user identifiers, C={C1, C2, ..., C i ,…,C m }, C i ={C i1 , C i2 ,…,C ir ,…,C is(i) }, C i D i The corresponding third category user identification list, C ir For the current C i The rth third-category user identifier in the , r value ranges from 1 to s(i), s(i) is the current C i The number of third-category user identifiers in the first category, the first category of users are users who are waiting in line to enter the target area for the first time, the second category of users are users who can re-enter the target area without queuing, and the third category of users are users who are waiting in line to re-enter the target area; step S2 includes the following steps S21-S24: S21. If there is no F ij ≥F 0 , then get the target images E and B ie Image similarity G between corresponding facial images ie , F ij For target images E and A ij Image similarity between corresponding facial images, F 0 is the preset similarity threshold; S22, if G ie ≥F 0 , then determine that the target image E is D i The corresponding target area corresponds to the key image, and B ie Insert into D i The corresponding fourth category user identification list; if G does not exist ie ≥F 0 , then get the target images E and C ir The image similarity H between corresponding facial images ir The fourth category of users are those who are currently in the waiting area and can re-enter the target area without queuing; S23, if H ir ≥F 0 , then get the current time point and X ir The time difference K ir , X ir C ir The corresponding estimated task completion time; S24, if K ir ≤K 0 , then determine that the target image E is D i The corresponding target area corresponds to the key image, and C ir Insert into D i The corresponding fourth category user identification list, where K 0 is the preset time difference; S3. If the target image E is D i The key image corresponding to the target area is obtained at the current time point D i The number L of fourth-category user identifiers in the fourth-category user identifier list corresponding to the target area identifier of the corresponding target area i ; S4, if L i ≥L 0 , then get A ij The corresponding waiting time P ij , L 0 is the preset number of user identifiers, P ij Meet the following conditions: P ij =(j-1)×t1+L i × t2, t1 is the first preset waiting time, and t2 is the second preset waiting time.
2. The method for obtaining the waiting time according to claim 1, wherein: The target area identifier is the unique identity identifier of the target area. The target area is adjacent to the waiting area, and users need to pass through the waiting area to enter the target area.
3. The method for obtaining the waiting time according to claim 1, wherein: In step S21, it also includes: if there is F ij ≥F 0 , it is determined that the target image E is not the key image corresponding to the target area.
4. The method for obtaining the waiting time according to claim 1, wherein: In step S23, it also includes: if there is no H ir ≥F 0 , it is determined that the target image E is not the key image corresponding to the target area.
5. The method for obtaining the waiting time according to claim 1, wherein: F 0 The value range is [0.8, 1).
6. The method for obtaining the waiting time according to claim 1, wherein: The fourth category user identification list includes several fourth category user identifications, and the fourth category user identifications are identity identifications of fourth category users.
7. The method for obtaining the waiting time according to claim 1, wherein: The first preset waiting time is the predicted length of time that the first type of users stay in the target area, and the second preset waiting time is the predicted length of time that the fourth type of users stay in the target area.
8. The method for obtaining the waiting time according to claim 1, wherein: t2<t1。 9. A non-transitory computer-readable storage medium, characterized in that The storage medium stores a computer program, which is loaded and executed by a processor to implement the method for obtaining the waiting time according to any one of claims 1 to 8.
10. An electronic device comprising: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method for obtaining the waiting time as described in any one of claims 1 to 8 when executing the computer program.
Citation Information
Patent Citations
Taxi queuing management method and system, and computer readable storage medium
CN108492551A
Method and device for determining waiting duration
CN117314961A