Service processing method and device based on video frame

Through user location parameter detection and feature clustering in video frames, the problems of queuing area changes and non-queuing guest interference in the existing technology are solved, and more accurate queuing length estimation and management are achieved.

CN118799775APending Publication Date: 2024-10-18CHINA MOBILE COMM GRP TERMINAL +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202311667726.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-06
Publication Date
2024-10-18

AI Technical Summary

Technical Problem

When existing technology identifies and estimates queue waiting time, it is difficult to adapt to queuing areas at different times, weather, seasons and temporary changes, and there are situations where non-queuing guests cross the queue, resulting in insufficient accuracy and increased management costs.

Method used

By collecting video streams of service scenarios, detecting user location parameters in video frames, calculating location changes, filtering out users whose location changes are less than the threshold as service waiting users, constructing location feature vectors for clustering, determining user queues, and processing according to services Parameter estimated queue duration.

Benefits of technology

It reduces the interference of users unrelated to the service scenario, improves the accuracy of queuing time calculation, adapts to changes in different scenarios, and reduces management costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118799775A_ABST
    Figure CN118799775A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a service processing method and device based on video frames, and the method comprises the steps: collecting a video stream of a service scene, detecting the position parameter of each user in each video frame contained in the video stream, calculating the position change according to the position parameter of each user in each video frame, and determining the position change according to the position change. Selecting the user whose position change is smaller than a position change threshold as a service waiting user of the service scene, constructing a position feature vector based on the position parameter of the service waiting user, performing position feature clustering according to the position feature vector, and determining a user queue of the service scene based on a clustering result; and finally, according to the service processing parameters of the service scene and the user number of the user queue, estimating the service processing duration of the user queue, thereby reducing the interference of users irrelevant to the service scene, and improving the accuracy of duration calculation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This document relates to the field of image processing, and in particular to a service processing method and device based on video frames. Background Art

[0002] Queue estimation is a key function of security cameras or security intelligent analysis terminals. It can identify the status of guests in the queue by analyzing the picture and estimate the waiting time in the queue. The existing technology mainly calculates the waiting time in the queue based on the number of people and the preset service time. However, in actual business, the queue area in the picture is diverse and changing at different times, weather, and seasons. It is difficult to calibrate the queue area by presetting the area of ​​interest. Frequent manual adjustments will also increase management costs. Especially for popular shops in shopping malls and railway stations, the queue area is mostly temporary and changes frequently, and non-queuing guests may cross the queue. This has led to the fact that the existing technology is difficult to deploy and cannot meet management requirements in terms of accuracy. Summary of the invention

[0003] An objective of an embodiment of the present specification is to provide a video frame-based service processing method and device to solve the problem of how to remove image noise.

[0004] To solve the above technical problems, an embodiment of this specification is implemented as follows:

[0005] In a first aspect, an embodiment of the present specification provides a service processing method based on a video frame, including:

[0006] Collecting a video stream of a service scene, and detecting a position parameter of each user in each video frame contained in the video stream;

[0007] Calculating the position change according to the position parameters of each user in each video frame, and screening out users whose position change is less than a position change threshold as service waiting users of the service scenario;

[0008] Constructing a location feature vector based on the location parameters of the user waiting for the service, performing location feature clustering according to the location feature vector, and determining a user queue of the service scenario based on the clustering result;

[0009] The service processing time of the user queue is estimated according to the service processing parameters of the service scenario and the number of users in the user queue.

[0010] In a second aspect, another embodiment of the present specification provides a service processing device based on a video frame, including:

[0011] A position detection module is configured to collect a video stream of a service scene and detect a position parameter of each user in each video frame included in the video stream;

[0012] a position change calculation module, configured to calculate the position change according to the position parameters of each user in each video frame, and screen out users whose position change is less than a position change threshold as service waiting users of the service scenario;

[0013] A user queue determination module is configured to construct a location feature vector based on location parameters of users waiting for the service, perform location feature clustering according to the location feature vector, and determine a user queue for the service scenario based on the clustering result;

[0014] The duration estimation module is configured to estimate the service processing duration of the user queue according to the service processing parameters of the service scenario and the number of users in the user queue.

[0015] In the third aspect, another embodiment of the present specification provides a video frame-based service processing device, comprising: a memory, a processor, and computer executable instructions stored on the memory and executable on the processor, wherein the computer executable instructions, when executed by the processor, implement the steps of the video frame-based service processing method as described in the first aspect above.

[0016] In a fourth aspect, another embodiment of the present specification provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store computer-executable instructions, and when the computer-executable instructions are executed by a processor, the steps of the video frame-based service processing method as described in the first aspect above are implemented.

[0017] The video frame-based service processing method provided in the present embodiment first collects the video stream of the service scene and detects the position parameters of each user in each video frame contained in the video stream, then calculates the position change according to the position parameters of each user in each video frame, and screens out users whose position change is less than the position change threshold as service waiting users of the service scene, constructs a position feature vector based on the position parameters of the service waiting users, performs position feature clustering based on the position feature vector, determines the user queue of the service scene based on the clustering result, and finally estimates the service processing time of the user queue according to the service processing parameters of the service scene and the number of users in the user queue, thereby reducing the interference of users irrelevant to the service scene and improving the accuracy of the time calculation. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in one or more embodiments of the present specification, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0019] Figure 1 A processing flow chart of a service processing method based on a video frame provided in one embodiment of this specification;

[0020] Figure 2 A diagram of a network provided for one embodiment of this specification;

[0021] Figure 3 A processing flow chart of a video frame-based service processing method applied to a station ticket purchase scenario provided by one embodiment of this specification;

[0022] Figure 4 A schematic diagram of a video frame-based service processing device provided in one embodiment of this specification;

[0023] Figure 5 A schematic diagram of the structure of a video frame-based service processing device provided in one embodiment of the present specification. DETAILED DESCRIPTION

[0024] In order to enable those skilled in the art to better understand the technical solutions in one or more embodiments of this specification, the following will be combined with the drawings in one or more embodiments of this specification to clearly and completely describe the technical solutions in one or more embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on one or more embodiments of this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this document.

[0025] This specification provides an embodiment of a service processing method based on a video frame:

[0026] Reference Figure 1 , which shows a processing flow chart of a service processing method based on a video frame provided in this embodiment, referring to Figure 3 , which shows a processing flow chart of a service processing method based on video frames applied to a station ticket purchasing scenario provided by this embodiment.

[0027] Reference Figure 1 The video frame-based service processing method provided in this embodiment specifically includes the following steps S102 to S108.

[0028] Step S102: collecting a video stream of a service scene, and detecting a position parameter of each user in each video frame included in the video stream.

[0029] In this embodiment, the service scene refers to a scene where a queue is required to participate in the service, such as a ticket queuing scene, a platform waiting scene, a human health detection scene, etc. In order to improve the management of queuing users in the service scene and instantly perceive the queuing status of users, cameras can be configured at multiple acquisition perspectives of the service scene to perform image acquisition.

[0030] The user position parameter refers to a parameter that can characterize the position of the user in the image. The user position parameter includes at least one of the following: the coordinate position of the user in the image, the coordinate position of the user's bounding box in the image and / or the height and width of the user's bounding box. In addition, the user position parameter may also include the user's confidence.

[0031] In specific implementation, position parameter detection may be performed on a video stream captured by any camera in the service scenario to identify the user position parameter of each user in each video frame. In an optional implementation provided in this embodiment, the position parameter of each user in each video frame contained in the video stream is detected in the following manner:

[0032] The video stream of the service scene is input into a position detector for position parameter detection to obtain the position parameter of each user in each video frame contained in the video stream.

[0033] Optionally, the position detector includes at least one of the following: a YOLO model and an SSD model. In the process of detecting the position parameters of each user in each video frame contained in the video stream, a position detector with a position parameter detection function is pre-trained, and after the video stream of the service scene is collected, the video stream is input into the trained position detector for position parameter detection to obtain the position parameters of each user in each video frame;

[0034] Among them, the training of the position detector can be achieved by obtaining video streams from multiple acquisition perspectives of the service scene as training data, forming a training set after annotation, constructing a corresponding convolutional neural network, and using the training set to train the neural network until the model converges to obtain the position detector.

[0035] It should be noted that, in the process of detecting the position parameters of each user in each video frame contained in the video stream, a full-body detection method can be adopted, that is, the user's whole body is taken as the detection target, and the position parameters of the user's whole body are identified. In addition, a head and shoulder detection method can also be adopted, in which only the user's head and shoulders are taken as the detection target, and the position parameters of the user's head and shoulders are identified. This embodiment is not limited here.

[0036] In addition, after the video stream of the service scene is input into the position detector for position parameter detection and the position parameters of each user in each video frame contained in the video stream are obtained, the position parameters can also be decoded to convert the position parameters into a bounding box representing the position of the object in the image, which is easy to understand and use; in addition, the position parameters can also be processed by non-maximum suppression to remove redundant position parameters. Specifically, all position parameters are sorted according to category confidence, and then starting from the position parameter with the highest confidence, the degree of overlap with other position parameters is determined in turn. If the overlap is higher than a certain threshold, it is removed. This can effectively reduce overlapping position parameters and obtain more accurate target detection results.

[0037] Step S104, calculating the position change according to the position parameters of each user in each video frame, and screening out users whose position change is less than a position change threshold as service waiting users of the service scenario.

[0038] After detecting the position parameters of each user in each video frame contained in the video stream, in this step, the position change is calculated according to the position parameters of each user in each video frame, and users whose position change is less than the position change threshold are screened out as service waiting users of the service scenario.

[0039] In actual applications, in addition to users queuing to participate in the service, there will also be non-queuing users in the service scenario. The existence of such users will affect the accuracy of the subsequent calculation of the service processing time of the user queue. Therefore, after detecting the position parameters of each user, it is necessary to calculate the position change based on the position parameters. If the position change is less than the threshold, it indicates that the user's current travel speed is low and is a queue user. If the position change is greater than or equal to the threshold, it indicates that the user is a fast-moving pedestrian outside the queue and cannot be used as a user waiting for service. Among them, the position change indicates the degree of change of the user's position parameters in two or more video frames. The position change includes the user's movement speed and the user's movement trajectory. In addition, the position change can also be the user's normalized movement speed. For example, after calculating the user's displacement through the user's coordinates in two video frames, the user's speed is calculated by calculating the ratio of displacement and time, and then the speed is taken as the ratio of the diagonal pixel length of the user's boundary box as the normalized speed.

[0040] The service waiting users refer to users who are waiting in line to participate in the service in the service scenario. Optionally, the service waiting users include queuing users.

[0041] During the specific execution process, after obtaining the position parameters of each user in each video frame, it is necessary to calculate the position change of each user according to the position parameters of each user in any two frames in each video frame. In an optional implementation manner provided in this embodiment, the position change of each user in each video frame is calculated in the following manner:

[0042] Taking any video frame among the video frames as a first video frame, and taking a video frame that differs from the first video frame by a preset number of frames as a second video frame;

[0043] The position change is calculated based on the position parameters of each user in the first video frame and the position parameters of each user in the second video frame.

[0044] Specifically, due to the movement of the user in the service scene, the values ​​of the user's position parameters are different in different video frames, so the position change can be calculated based on the user's position parameters in any video frame and the position parameters in other video frames. Optionally, any video frame in each video frame is taken as the first video frame, and a video frame that differs from the first video frame by a preset number of frames is taken as the second video frame, so as to calculate the user's movement speed and / or movement trajectory as the position change based on the position parameters of each user in the first video frame and the position parameters of each user in the second video frame, wherein the second video frame may be a video frame that is after the first video frame on a time scale.

[0045] For example, a video stream contains two video frames, where the coordinates of user a in video frame 1 are (x1, y1), and the coordinates of user a in video frame 2 are (x2, y2). Then the position change of user a is the speed

[0046] In addition, in the process of calculating the position change according to the position parameters of each user in each video frame, a target tracking model may be introduced to calculate the position change. In another optional implementation manner provided by this embodiment, the position change is calculated according to the position parameters of each user in each video frame in the following manner:

[0047] Inputting the position parameters of each user in each video frame into a target tracking model to perform target tracking, and obtaining the position change;

[0048] The relative position change is normalized to obtain the position change.

[0049] Optionally, the target tracking model includes at least one of the following: a Sort model and a DeepSort model, wherein if the target tracking model is a Sort model, the position parameter is used as input, the data association algorithm (Hungarian algorithm) is used for target matching, and Kalman is used for target prediction, and the relationship between targets is established through IOU to obtain the position change; if the target tracking model is a DeepSort model, the position parameter is used as input, the target data is associated using IOU, and the position change is calculated based on the distance relationship between the deep features by extracting the deep features. In order to improve the computational efficiency of the target tracking model, a stable label number can also be assigned to different targets. In continuous video frames, the label number for the same target remains stable, that is, the same target can be continuously tracked in continuous video frames, and the change in the user's position is characterized by the change in the label number in the video frame.

[0050] During the specific execution process, after calculating the position change based on the position parameters of each user in each video frame, the service waiting users can be screened out based on the position change. If the position change is less than the threshold, it means that the user is queuing in the queue and can be used as a service waiting user. If the position change is greater than or equal to the threshold, it means that the user is a fast-moving pedestrian outside the queue and cannot be used as a service waiting user.

[0051] In actual applications, there are also situations where fast-moving pedestrians are entering the queue in the service scene, that is, the position change of the user in the previous frame is greater than the position change threshold, and the position change of the user in the next frame is greater than or equal to the position change threshold. In this case, by storing the position parameters of the user whose position change in the previous frame is greater than or equal to the position change threshold in the cache storage medium, when calculating the position change of the user in the next frame, the user's position parameters are extracted from the cache storage medium to calculate the position change. If the position change of the user in the next frame is less than the position change threshold, the user is re-used as a service waiting user in the service scene. In addition, if the user in the cache storage medium has not been used and activated for more than a preset period of time, it will be removed.

[0052] Step S106: construct a location feature vector based on the location parameters of the user waiting for the service, perform location feature clustering according to the location feature vector, and determine the user queue of the service scenario based on the clustering result.

[0053] After calculating the position change according to the position parameters of each user in each video frame and selecting users whose position change is less than the position change threshold as the service waiting users of the service scene, in this step, a position feature vector is constructed based on the position parameters of the service waiting users, and position feature clustering is performed based on the position feature vector, and the user queue of the service scene is determined based on the clustering result. The user queue refers to the queue formed by users in the service scene to participate in the service, and the number of user queues can be one or more, which is not limited in this embodiment.

[0054] In actual applications, the waiting area for users in service scenarios may be temporary and change frequently. For example, during non-get off work hours, users can buy tickets at the station ticket office without waiting, but during get off work hours, users need to queue up to buy tickets, and the number of queues cannot be fixed. In this case, it is necessary to start from the location parameters of the waiting users, identify the differences and connections between user characteristics, and group users with consistent characteristics into one queue.

[0055] Specifically, in order to make the determination of the number of queues of user queues more accurate, location feature clustering is performed by constructing location feature vectors, and the user queue of the service scenario is determined based on the clustering results. In an optional implementation provided by this embodiment, the location feature vector is constructed based on the location parameters of the service waiting user in the following manner:

[0056] Generate nodes and edge vectors of the graph network based on the position parameters of each service waiting for the user;

[0057] The similarity weights between the nodes in the graph network are calculated, and the position feature vector is constructed based on the similarity weights.

[0058] Specifically, after obtaining each service waiting user, it is necessary to generate the nodes and edge vectors of the graph network according to the position parameters of the service waiting users, wherein the nodes of the graph network can be the center point coordinates of the service waiting users, and the center point coordinates of all service waiting users appearing in the image frame are used as the nodes of the graph network, and connected with edge vectors to obtain the graph network of the service waiting users in the image frame. After that, the Euclidean distance can be used to calculate the similarity weights between each network node. In addition, the Gaussian similarity function can also be used to calculate the similarity weights between each network node:

[0059] For example, Figure 2 In the graph network shown in Compute network nodes 1 to 4 The similarity weight between i is the coordinate of the previous node, x j is the coordinate of the next node, w ijis the similarity weight between two nodes. It should be noted that when the edge vector between each network node is greater than the preset threshold, w ij The value of is set to 0 to make the position feature vector constructed subsequently sparse and improve the calculation speed.

[0060] After the similarity weight is calculated, the position feature vector can be constructed according to the similarity weight. Optionally, the position feature vector includes a standardized Laplace matrix, such as L = ID -1 W, where I is the unit matrix, W is the weight matrix composed of the similarity weights obtained above, and D is the degree matrix, where the degree matrix D can be a diagonal matrix, each value on the diagonal is the corresponding degree, and the other values ​​are 0.

[0061] In the specific execution process, after obtaining the position feature vector, the position feature vector is clustered by position feature, and the users waiting for services in the video frame are clustered into several user queues. In an optional implementation provided by this embodiment, the position feature is clustered according to the position feature vector in the following manner:

[0062] Calculating the position feature value of the position feature vector, and screening the position feature value according to the feature dimension of the position feature value to obtain a target feature value;

[0063] The number of the target feature values ​​is used as the number of clustering clusters to perform position feature clustering to obtain the clustering result.

[0064] Specifically, when the position feature vector is a standardized Laplace matrix, the eigenvalues ​​of the standardized Laplace matrix are calculated as the position feature values, the position feature values ​​whose feature dimensions are less than a preset threshold are selected as target feature values, and the number of target feature values ​​is used as the number of clustering clusters for clustering to perform position feature clustering to obtain the clustering result.

[0065] For example, the eigenvalues ​​of the standardized Laplace matrix are calculated to be a, and the n-dimensional eigenvectors corresponding to the k position eigenvalues ​​with the smallest eigendimension are selected, and position feature clustering is performed using k as the number of clusters to obtain the clustering result.

[0066] Among them, in the process of position feature clustering, the Ncut graph cutting method in spectral clustering theory can be used to cluster position features. Each target feature value represents a valid sample. The K-means clustering algorithm is performed on it to obtain the final clustering result.

[0067] In addition, in the process of determining the number of clusters, a heuristic eigenvalue interpolation search algorithm can also be used. If the first k eigenvalues ​​are very small, and the k+1th eigenvalue is quite different from the previous eigenvalue, the number of clusters is selected as k. That is, there are k queues at the current moment. In addition, in one embodiment, for the scene of pedestrians queuing, in order to avoid the jitter problem of clustering clusters between consecutive video frames, the clustering clusters need to be filtered in the time domain. Preferably, an inertial filter can be used to smooth the k value; or a certain preset number of historical video frames can be used to calculate the k value, and then the mean or majority is calculated.

[0068] In specific implementation, each cluster in the clustering result obtained by performing location feature clustering according to the location feature vector, i.e., characterizing the queue feature where the service waiting user is located, can correspond each service waiting user to their respective user queue according to the degree of correlation between the location parameter of the service waiting user and the queue feature.

[0069] Step S108: estimating the service processing time of the user queue according to the service processing parameters of the service scenario and the number of users in the user queue.

[0070] After determining the user queue of the service scenario based on the clustering result, the service processing time of the user queue is estimated according to the service processing parameters of the service scenario and the number of users in the user queue. Optionally, the service processing parameters include unit service time.

[0071] During the specific execution process, the service processing time of the user queue may be estimated to perform user management of the service scenario. In an optional implementation provided in this embodiment, the service processing time of the user queue may be estimated according to the service processing parameters of the service scenario and the number of users in the user queue in the following manner:

[0072] The product of the unit service duration of the service scenario and the number of users in each user queue is used as the service processing duration corresponding to each user queue.

[0073] For example, suppose that the time required for each service to wait for users to buy train tickets is x. If the number of people in the current longest queue is m, then the estimated waiting time at this moment is mx.

[0074] In addition, based on target tracking, each service waiting user is detected in each video frame, and the appearance time of the service waiting user is calculated as the service processing time. That is, step S108 can also be replaced by: detecting each service waiting user in each video frame, and taking the video frame in which the service waiting user is detected as the target video frame; calculating the playback time of the target video frame as the service processing time of the service queue.

[0075] For example, based on target tracking, the timestamp tb when multiple or all target tracking markers appear in one, multiple, or all queues and the timestamp te when the target disappears can be calculated. The difference between the two is approximately the time a certain target lasts in the queue, that is, the queuing time. The queuing time of each queue can be obtained by taking the mean or weighted mean of the samples in each queue.

[0076] The following combination Figure 3 , taking the application of the video frame-based service processing method provided by this embodiment in the ticket purchase scenario at a station as an example, the video frame-based service processing method provided by this embodiment is further described. Figure 3 The video frame-based service processing method applied to the station ticket purchase scenario specifically includes steps S302 to S318.

[0077] Step S302: collect the video stream of the service scene, and input the video stream of the service scene into a position detector for position parameter detection to obtain the position parameter of each user in each video frame contained in the video stream.

[0078] Step S304: input the position parameters of each user in each video frame into a target tracking model to perform target tracking and obtain relative position changes.

[0079] Step S306, normalizing the relative position change to obtain the position change.

[0080] Step S308: Screen out users whose location changes are less than a location change threshold as service waiting users of the service scenario.

[0081] Step S310, generating nodes and edge vectors of a graph network based on the location parameters of each service waiting user.

[0082] Step S312, calculate the similarity weights between the nodes in the graph network, and construct a position feature vector based on the similarity weights.

[0083] Step S314, calculating the position feature value of the position feature vector, and screening the position feature value according to the feature dimension of the position feature value to obtain the target feature value.

[0084] Step S316: perform location feature clustering using the number of target feature values ​​as the number of clustering clusters to obtain a clustering result, and determine the user queue of the service scenario based on the clustering result.

[0085] Step S318: The product of the unit service duration of the service scenario and the number of users in each user queue is used as the service processing duration corresponding to each user queue.

[0086] The video frame-based service processing method provided in the present embodiment first collects the video stream of the service scene and detects the position parameters of each user in each video frame contained in the video stream, then calculates the position change according to the position parameters of each user in each video frame, and screens out users whose position change is less than the position change threshold as service waiting users of the service scene, constructs a position feature vector based on the position parameters of the service waiting users, performs position feature clustering based on the position feature vector, determines the user queue of the service scene based on the clustering result, and finally estimates the service processing time of the user queue according to the service processing parameters of the service scene and the number of users in the user queue, thereby reducing the interference of users irrelevant to the service scene and improving the accuracy of the time calculation.

[0087] Figure 4 A schematic diagram of a video frame-based service processing device provided by an embodiment of the present invention, such as Figure 4 As shown, the device comprises:

[0088] The position detection module 402 is configured to collect a video stream of a service scene and detect a position parameter of each user in each video frame included in the video stream;

[0089] The position change calculation module 404 is configured to calculate the position change according to the position parameters of each user in each video frame, and select the users whose position change is less than the position change threshold as the service waiting users of the service scenario;

[0090] The user queue determination module 406 is configured to construct a location feature vector based on the location parameters of the user waiting for the service, perform location feature clustering according to the location feature vector, and determine the user queue of the service scenario based on the clustering result;

[0091] The duration estimation module 408 is configured to estimate the service processing duration of the user queue according to the service processing parameters of the service scenario and the number of users in the user queue.

[0092] The video frame-based service processing device provided in this embodiment first runs the position detection module 402 to collect the video stream of the service scene and detect the position parameters of each user in each video frame contained in the video stream, then runs the position change calculation module 404 to calculate the position change according to the position parameters of each user in each video frame, and screens out users whose position change is less than the position change threshold as service waiting users of the service scene, then runs the user queue determination module 406 to construct a position feature vector based on the position parameters of the service waiting users, and performs position feature clustering according to the position feature vector, determines the user queue of the service scene based on the clustering result, and finally runs the duration estimation module 408 to estimate the service processing duration of the user queue according to the service processing parameters of the service scene and the number of users in the user queue, thereby reducing the interference of users irrelevant to the service scene and improving the accuracy of duration calculation.

[0093] The video frame-based service processing device provided in one embodiment of the present specification can implement each process in the aforementioned method embodiment and achieve the same functions and effects, which will not be repeated here.

[0094] Furthermore, an embodiment of the present specification also provides a service processing device based on a video frame, Figure 5 A schematic diagram of a video frame-based service processing device provided in an embodiment of the present specification is shown in FIG. Figure 5 As shown, the device includes: a memory 501, a processor 502, a bus 503 and a communication interface 504. The memory 501, the processor 502 and the communication interface 504 communicate through the bus 503, and the communication interface 504 may include an input and output interface, which includes but is not limited to a keyboard, a mouse, a display, a microphone, a loudspeaker, etc.

[0095] Figure 5 In the embodiment, the memory 501 stores computer executable instructions that can be run on the processor 502. When the computer executable instructions are executed by the processor 502, the following process is implemented:

[0096] Collecting a video stream of a service scene, and detecting a position parameter of each user in each video frame contained in the video stream;

[0097] Calculating the position change according to the position parameters of each user in each video frame, and screening out users whose position change is less than a position change threshold as service waiting users of the service scenario;

[0098] Constructing a location feature vector based on the location parameters of the user waiting for the service, performing location feature clustering according to the location feature vector, and determining a user queue of the service scenario based on the clustering result;

[0099] The service processing time of the user queue is estimated according to the service processing parameters of the service scenario and the number of users in the user queue.

[0100] The video frame-based service processing device provided in this embodiment, through the cooperation of the memory 501, the processor 502, the bus 503 and the communication interface 504, first collects the video stream of the service scene, and detects the position parameters of each user in each video frame contained in the video stream, then calculates the position change according to the position parameters of each user in each video frame, and screens out users whose position change is less than the position change threshold as service waiting users of the service scene, constructs a position feature vector based on the position parameters of the service waiting users, and performs position feature clustering based on the position feature vectors, determines the user queue of the service scene based on the clustering results, and finally estimates the service processing time of the user queue according to the service processing parameters of the service scene and the number of users in the user queue, thereby reducing the interference of users irrelevant to the service scene and improving the accuracy of the time calculation.

[0101] The video frame-based service processing device provided in an embodiment of this specification can implement each process in the aforementioned method embodiment and achieve the same functions and effects, which will not be repeated here.

[0102] Furthermore, another embodiment of the present specification provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store computer-executable instructions, and when the computer-executable instructions are executed by a processor, the following process is implemented:

[0103] Collecting a video stream of a service scene, and detecting a position parameter of each user in each video frame contained in the video stream;

[0104] Calculating the position change according to the position parameters of each user in each video frame, and screening out users whose position change is less than a position change threshold as service waiting users of the service scenario;

[0105] Constructing a location feature vector based on the location parameters of the user waiting for the service, performing location feature clustering according to the location feature vector, and determining a user queue of the service scenario based on the clustering result;

[0106] The service processing time of the user queue is estimated according to the service processing parameters of the service scenario and the number of users in the user queue.

[0107] The computer-readable storage medium provided in this embodiment first collects the video stream of the service scene and detects the position parameters of each user in each video frame contained in the video stream, then calculates the position change according to the position parameters of each user in each video frame, and screens out users whose position change is less than the position change threshold as service waiting users of the service scene, constructs a position feature vector based on the position parameters of the service waiting users, and performs position feature clustering according to the position feature vector, determines the user queue of the service scene based on the clustering result, and finally estimates the service processing time of the user queue according to the service processing parameters of the service scene and the number of users in the user queue, thereby reducing the interference of users not related to the service scene and improving the accuracy of the time calculation.

[0108] The computer-readable storage medium includes a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0109] The computer-readable storage medium provided in an embodiment of this specification can implement each process in the aforementioned method embodiment and achieve the same functions and effects, which will not be repeated here.

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

[0111] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0112] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0113] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0114] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0115] Memory may include non-permanent storage in a computer-readable storage medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable storage medium.

[0116] Computer-readable storage media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer-readable storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable storage media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0117] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0118] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0119] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims

1. A service processing method based on video frames, It is characterized in that include: Collecting a video stream of a service scene, and detecting a position parameter of each user in each video frame contained in the video stream; Calculating the position change according to the position parameters of each user in each video frame, and screening out users whose position change is less than a position change threshold as service waiting users of the service scenario; Constructing a location feature vector based on the location parameters of the user waiting for the service, performing location feature clustering according to the location feature vector, and determining a user queue of the service scenario based on the clustering result; The service processing time of the user queue is estimated according to the service processing parameters of the service scenario and the number of users in the user queue.

2. The video frame-based service processing method according to claim 1, It is characterized in that The detecting the position parameter of each user in each video frame included in the video stream includes: The video stream of the service scene is input into a position detector for position parameter detection to obtain the position parameter of each user in each video frame contained in the video stream.

3. The video frame-based service processing method according to claim 1, It is characterized in that The calculating the position change according to the position parameter of each user in each video frame includes: Taking any video frame among the video frames as a first video frame, and taking a video frame that differs from the first video frame by a preset number of frames as a second video frame; The position change is calculated based on the position parameters of each user in the first video frame and the position parameters of each user in the second video frame.

4. The video frame-based service processing method according to claim 1, It is characterized in that The calculating the position change according to the position parameter of each user in each video frame includes: Inputting the position parameters of each user in each video frame into a target tracking model to perform target tracking and obtain relative position changes; The relative position change is normalized to obtain the position change.

5. The video frame-based service processing method according to claim 1, It is characterized in that The step of constructing a location feature vector based on the location parameter of the service waiting user comprises: Generate nodes and edge vectors of the graph network based on the position parameters of each service waiting for the user; The similarity weights between the nodes in the graph network are calculated, and the position feature vector is constructed based on the similarity weights.

6. The video frame-based service processing method according to claim 1, It is characterized in that The performing position feature clustering according to the position feature vector comprises: Calculating the position feature value of the position feature vector, and screening the position feature value according to the feature dimension of the position feature value to obtain a target feature value; The number of the target feature values ​​is used as the number of clustering clusters to perform position feature clustering to obtain the clustering result.

7. The video frame-based service processing method according to claim 1, It is characterized in that The estimating the service processing time of the user queue according to the service processing parameter of the service scenario and the number of users in the user queue includes: The product of the unit service duration of the service scenario and the number of users in each user queue is used as the service processing duration corresponding to each user queue.

8. A service processing device based on video frames, It is characterized in that include: A position detection module is configured to collect a video stream of a service scene and detect a position parameter of each user in each video frame included in the video stream; a position change calculation module, configured to calculate the position change according to the position parameters of each user in each video frame, and screen out users whose position change is less than a position change threshold as service waiting users of the service scenario; A user queue determination module is configured to construct a location feature vector based on location parameters of users waiting for the service, perform location feature clustering according to the location feature vector, and determine a user queue for the service scenario based on the clustering result; The duration estimation module is configured to estimate the service processing duration of the user queue according to the service processing parameters of the service scenario and the number of users in the user queue.

9. A service processing device based on video frames, It is characterized in that The method comprises a memory and a processor, wherein the memory stores computer executable instructions, and when the computer executable instructions are executed on the processor, the steps of the method described in any one of claims 1 to 7 can be implemented.

10. A computer-readable storage medium having computer-executable instructions stored therein, It is characterized in that When the computer executable instructions are executed by a processor, the steps of the method described in any one of claims 1 to 7 can be implemented.

Citation Information

Patent Citations

  • Realtime video monitoring applied to reduce customer wait times

    US20200226523A1

  • Machine-vision person tracking in service environment

    US20230154224A1

  • Event generation and camera cluster analysis of multiple video streams in a pipeline architecture

    US7667732B1