Multi-target detection method, device and equipment suitable for service queue and medium

By acquiring the trajectory coordinates of surveillance video in the service queue, constructing a spatial distribution model and identifying the commander, and combining differentiated detection rules and buffer filtering noise, the subjectivity and misjudgment problems of traditional detection methods are solved, and efficient, accurate and stable uniformity detection of the service queue is achieved.

CN122073009APending Publication Date: 2026-05-22HANGZHOU DAYUE ZHIQING TECHNOLOGY CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HANGZHOU DAYUE ZHIQING TECHNOLOGY CO LTD
Filing Date
2026-04-21
Publication Date
2026-05-22

AI Technical Summary

Technical Problem

In security and related fields, traditional queue orderliness detection relies on manual on-site supervision or monitoring playback. This is subject to strong subjectivity, inconsistent evaluation standards, and difficulty in quantifying results. Furthermore, existing target detection algorithms cannot effectively distinguish between commanders and team members, are prone to misjudgment, have weak anti-interference capabilities, poor state adaptability, and are difficult to accurately determine both static and marching orderliness at the same time.

Method used

By acquiring the trajectory coordinates of personnel in surveillance videos, a spatial distribution model is constructed. Commanders are identified and eliminated using Mahalanobis distance. Kalman filtering and filter denoising are combined with differential detection rules to detect queue neatness. Noise is filtered using topology graphs and buffers to achieve automated and standardized detection of queue status.

Benefits of technology

It enables efficient and accurate detection of service formations in both stationary and marching states, avoids misjudgment by commanders, improves the stability and accuracy of detection results, adapts to different movement states, and realizes automated and standardized evaluation of formation neatness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122073009A_ABST
    Figure CN122073009A_ABST
Patent Text Reader

Abstract

The application discloses a multi-target detection method and device suitable for a service queue, equipment and a medium, relates to the technical field of computer vision, and comprises the following steps: determining the trajectory coordinates of each person in the initial queue; determining the commander based on the Mahalanobis distance between the trajectory coordinates of each person and the distribution center; the commander is a person who can deviate from the initial queue; the commander is removed from the initial queue to obtain a target queue; the state of the target queue is detected based on a preset detection rule corresponding to the motion state to obtain a current state detection result; the state detection result is a preset neat state or a preset disordered state; the state detection result is saved to a preset buffer area; if the target proportion of the same state detection result in the preset buffer area exceeds a preset proportion threshold, the state detection result corresponding to the target proportion is determined as a target state detection result of the target queue. The application can efficiently and accurately detect the neat state of the service queue when the service queue is stationary and moving.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer vision technology, and in particular to a method, apparatus, equipment and medium for multi-target detection applicable to service queues. Background Technology

[0002] In security and related fields, the standardization of queue formation is a crucial indicator of discipline and professionalism. Traditional queue formation detection relies on manual on-site supervision or monitoring playback scoring, which suffers from strong subjectivity, inconsistent evaluation standards, difficulty in quantifying results, and the inability of manual monitoring to achieve fatigue-free monitoring throughout the entire period. Furthermore, using YOLO (You Only Look Once) target detection algorithms to identify people and assess queue status by calculating the geometric positional relationship of the detection frame's center point also has significant technical shortcomings: it lacks role differentiation capabilities, cannot effectively eliminate legitimate out-of-group personnel such as commanders and leaders, and is prone to false alarms due to out-of-group points; it has weak anti-interference capabilities, relying solely on geometric calculations based on a single frame image, making it susceptible to frequent misjudgments due to detection frame jitter or minor physiological movements of personnel; and it has poor state adaptability, making it difficult to accurately determine both "stationary formation" and "marching formation" using the same logic simultaneously.

[0003] In summary, how to efficiently and accurately detect the orderly state of a service queue when it is stationary and in motion is a technical problem that urgently needs to be solved. Summary of the Invention

[0004] In view of this, the purpose of this invention is to provide a multi-target detection method, apparatus, device, and medium suitable for service formations, capable of efficiently and accurately detecting the orderly state of service formations both when they are stationary and in motion. The specific solution is as follows: Firstly, this application provides a multi-target detection method suitable for service queues, including: Acquire the monitoring video of the initial queue, and determine the trajectory coordinates of each person in the initial queue based on the monitoring video; The distribution center of the spatial distribution model corresponding to the initial queue is determined based on the trajectory coordinates of each person, and the commander in the initial queue is determined based on the Mahalanobis distance between the trajectory coordinates of each person and the distribution center; the commander is a person who can deviate from the initial queue. The commander is removed from the initial queue to obtain the target queue, and the movement state of the target queue is determined in real time. The current state detection result is obtained by detecting the state of the target queue based on the preset detection rules corresponding to the movement state. The movement state is either stationary or in motion, and the state detection result is either a preset orderly state or a preset disordered state. The state detection results are saved to a preset buffer. If the target proportion of the same state detection result in the preset buffer exceeds a preset proportion threshold, the state detection result corresponding to the target proportion is determined as the target state detection result of the target queue, and the target state detection result is output.

[0005] Optionally, determining the trajectory coordinates of each person in the initial queue based on the surveillance video includes: Human targets are detected in the surveillance video using a preset target detection network to obtain corresponding human target detection results. Then, the ByteTrack association algorithm is used to generate the initial time-series trajectory sequence of each person in the initial queue based on the human target detection results. Noise in the initial time-series trajectory sequence is removed using a preset filter to obtain the target time-series trajectory sequence. The target time-series trajectory sequence is then smoothed and corrected using Kalman filtering. Finally, the trajectory coordinates of each person are determined based on the smoothed and corrected time-series trajectory sequence.

[0006] Optionally, determining the distribution center of the spatial distribution model corresponding to the initial queue based on the trajectory coordinates of each person includes: The spatial distribution model of the initial queue is constructed based on the trajectory coordinates of each person, and the number of people in the initial queue is determined. The target abscissa of the distribution center is determined by the ratio of the sum of the abscissas of the trajectory coordinates of each person to the number of people, and the target ordinate of the distribution center is determined by the ratio of the sum of the ordinates of the trajectory coordinates of each person to the number of people. The distribution center is determined based on the target's x-coordinate and y-coordinate.

[0007] Optionally, determining the commander in the initial queue based on the Mahalanobis distance between the trajectory coordinates of each person and the distribution center includes: Based on the trajectory coordinates of each person and the coordinates of the distribution center, the Mahalanobis distance between each person and the distribution center is determined; If the Mahalanobis distance corresponding to the person is greater than a preset distance threshold, then the person is identified as a person to be verified, and the commander in the initial queue is identified from the persons to be verified. If the Mahalanobis distance corresponding to the person is not greater than a preset distance threshold, then the person is determined as the first member in the initial queue; the first member is a preset normal member who has not deviated from the initial queue.

[0008] Optionally, determining the commander in the initial queue from the personnel to be verified includes: Identify the neighboring person with the smallest distance from the person to be verified from the initial queue, and calculate the Euclidean distance between the person to be verified and the neighboring person; Determine the average distance between each of the first members in the initial queue, and determine the target product between the average distance and a preset coefficient; If the Euclidean distance to the person to be verified is greater than the target product, then the person to be verified is determined to be the commander in the initial queue; If the Euclidean distance to the person to be verified is not greater than the target product, then the person to be verified is determined to be the second member in the initial queue; the second member is a preset abnormal member who has deviated from the initial queue. Accordingly, removing the commander from the initial queue to obtain the target queue includes: The commander is removed from the initial queue to obtain the target team members in the initial queue, and the target queue is determined based on the target team members; the target team members include the first team member and the second team member.

[0009] Optionally, detecting the state of the target queue based on a preset detection rule corresponding to the motion state includes: If the motion state is stationary, the trajectory coordinates of each target member in the target queue are prefitted to obtain a prefit line, and the initial Euclidean distance residual from the trajectory coordinates of each target member to the prefit line is determined. If the initial Euclidean distance residual corresponding to the target player is greater than the first preset residual threshold, then the weight of the trajectory coordinates of the target player is reduced, and the prefit line is adjusted based on the weight reduction result to obtain the baseline, and the target Euclidean distance residual from the trajectory coordinates of each target player to the baseline is determined. If the target Euclidean distance residual corresponding to the target team member is greater than the second preset residual threshold, then the target team member's position is determined to be abnormal and output. If the target Euclidean distance residual corresponding to the target team member is not greater than the second preset residual threshold, then the target team member is determined to be in a normal position, and the current state detection result of the target queue is generated based on each target team member in a normal position.

[0010] Optionally, detecting the state of the target queue based on a preset detection rule corresponding to the motion state includes: If the motion state is motion, then construct a topological graph corresponding to each target member of the target queue; the topological graph is a Delaunay triangulation or a fully connected graph. Based on the topological relationship diagram, determine the first rate of change of the geodesic distance and the second rate of change of the velocity vector angle corresponding to the adjacent target team members; Based on the comparison results between each of the first change rates and the first preset change rate threshold, and the comparison results between each of the second change rates and the second preset change rate threshold, the current state detection result of the target queue is generated.

[0011] Secondly, this application provides a multi-target detection device suitable for service queues, comprising: The trajectory coordinate determination module is used to acquire the collected monitoring video of the initial queue and determine the trajectory coordinates of each person in the initial queue based on the monitoring video. The commander determination module is used to determine the distribution center of the spatial distribution model corresponding to the initial queue based on the trajectory coordinates of each person, and to determine the commander in the initial queue based on the Mahalanobis distance between the trajectory coordinates of each person and the distribution center; the commander is a person who can deviate from the initial queue; The state detection module is used to remove the commander from the initial queue to obtain the target queue, and to determine the movement state of the target queue in real time. Based on the preset detection rules corresponding to the movement state, the module detects the state of the target queue to obtain the current state detection result. The movement state is either stationary or in motion, and the state detection result is either a preset orderly state or a preset disordered state. The state detection result saving module is used to save the state detection result to a preset buffer. If the target proportion of the same state detection result in the preset buffer exceeds a preset proportion threshold, the state detection result corresponding to the target proportion is determined as the target state detection result of the target queue, and the target state detection result is output.

[0012] Thirdly, this application provides an electronic device, comprising: Memory, used to store computer programs; A processor is used to execute the computer program to implement the aforementioned multi-target detection method applicable to service queues.

[0013] Fourthly, this application provides a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned multi-target detection method applicable to service queues.

[0014] In this application, firstly, monitoring video of the initial queue is acquired, and the trajectory coordinates of each person in the initial queue are determined based on the monitoring video; then, the distribution center of the spatial distribution model corresponding to the initial queue is determined based on the trajectory coordinates of each person, and the commander in the initial queue is determined based on the Mahalanobis distance between the trajectory coordinates of each person and the distribution center; the commander is a person who can deviate from the initial queue; subsequently, the commander is removed from the initial queue to obtain the target queue, and the motion state of the target queue is determined in real time. The current state detection result is obtained by detecting the state of the target queue based on a preset detection rule corresponding to the motion state; the motion state is either stationary or moving, and the state detection result is a preset orderly state or a preset disordered state; finally, the state detection result is saved to a preset buffer. If the target proportion of the same state detection result in the preset buffer exceeds a preset proportion threshold, the state detection result corresponding to the target proportion is determined as the target state detection result of the target queue, and the target state detection result is output. As can be seen from the above, this application determines the trajectory coordinates of personnel in the initial queue through monitoring video of the initial queue, constructs a spatial distribution model of the initial queue based on the trajectory coordinates, and determines the distribution center. Commanders who can legally deviate from the queue are identified based on the Mahalanobis distance between the personnel's trajectory coordinates and the distribution center, and are removed from the initial queue to obtain the target queue. The motion state of the target queue is then determined in real time (stationary or moving), and a preset detection rule corresponding to the motion state is determined. The neatness state of the target queue is detected based on the preset detection rule, and the current state detection result is obtained. Simultaneously, the state detection result is stored in a preset buffer. When the proportion of the same detection result in the buffer exceeds a preset threshold, it is determined as the final target detection result and output. In this way, this application can accurately distinguish between commanders and team members in the detection of duty queues, effectively avoiding detection errors caused by non-inspected targets. Furthermore, it adapts differentiated detection rules according to different queue motion states, making the queue standardization judgment more in line with actual scenario requirements. The proportion judgment mechanism of the buffer filters out instantaneous detection noise, significantly improving the stability and accuracy of the detection results, and achieving automated, standardized, efficient, and accurate detection of queue neatness. Attached Figure Description

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

[0016] Figure 1A flowchart of a multi-target detection method applicable to service queues is provided in this application; Figure 2 This application provides a specific service queue role diagram; Figure 3 This application provides a specific service queue role diagram; Figure 4 This application provides a specific schematic diagram for detecting the neatness of a service queue in a static state; Figure 5 This application provides a specific schematic diagram for detecting the orderliness of a service formation under motion conditions. Figure 6 This application provides a specific flowchart for detecting the neatness of duty formations; Figure 7 This application provides a schematic diagram of a multi-target detection device suitable for service platoons; Figure 8 This application provides a structural diagram of an electronic device. Detailed Implementation

[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0018] In security and related fields, the standardization of queue formation is a crucial indicator of discipline and professionalism. Traditional queue formation detection relies on manual on-site supervision or monitoring playback scoring, which suffers from strong subjectivity, inconsistent evaluation standards, difficulty in quantifying results, and the inability of manual monitoring to achieve fatigue-free monitoring throughout the entire period. Furthermore, using YOLO series target detection algorithms to identify human bodies and assess queue status by calculating the geometric positional relationship of the detection frame's center point also has significant technical shortcomings: a lack of role differentiation ability, failing to effectively eliminate legitimate out-of-group personnel such as commanders and leaders, and prone to false alarms due to out-of-group points; weak anti-interference capability, relying solely on geometric calculations based on a single frame image, making it susceptible to frequent misjudgments due to detection frame jitter or minor physiological movements of personnel; and poor state adaptability, making it difficult to accurately determine "stationary formation" and "marching formation" simultaneously using the same logic. Therefore, this application provides a multi-target detection scheme suitable for duty queues, capable of efficiently and accurately detecting the formation's formation status when the queue is stationary or in motion.

[0019] See Figure 1 As shown in the figure, this invention discloses a multi-target detection method suitable for service queues, which may include: Step S11: Obtain the monitoring video of the initial queue, and determine the trajectory coordinates of each person in the initial queue based on the monitoring video.

[0020] In this embodiment, the monitoring video of the initial queue is first acquired, and the trajectory coordinates of each person in the initial queue are determined based on the accessed monitoring video stream. The specific process may include: firstly, using a preset target detection network to perform human target detection on the monitoring video to obtain the corresponding human target detection results, and then using the ByteTrack association algorithm to generate the initial temporal trajectory sequence of each person in the initial queue based on the human target detection results; then, using a preset filter to remove noise from the initial temporal trajectory sequence to obtain the target temporal trajectory sequence, and then using Kalman filtering to smooth and correct the target temporal trajectory sequence, and finally determining the trajectory coordinates of each person based on the smoothed and corrected temporal trajectory sequence.

[0021] Specifically, this embodiment employs an improved anchor-free target detection network, such as the YOLO series, to extract human target features in real time for human target detection. Then, using the ByteTrack association algorithm, combined with the IoU (Intersection over Union) matching degree between the predicted bounding boxes and the detected bounding boxes corresponding to the human target detection results, discrete detected bounding boxes are associated into an initial temporal trajectory sequence with a unique ID. Subsequently, to eliminate the jitter noise of the detected bounding boxes themselves, a Savitzky-Golay filter is introduced to perform local polynomial least squares fitting on the initial temporal trajectory sequence within a time sliding window, obtaining the target temporal trajectory sequence. Finally, the state prediction function of the Kalman filter can be combined to smoothly correct positional jumps in the target temporal trajectory sequence caused by brief occlusion or missed detection, obtaining high-confidence center point coordinates for each person. Since the center of gravity (center point) of a human body is relatively stable, the center point coordinates are the trajectory coordinates of the person.

[0022] Step S12: Determine the distribution center of the spatial distribution model corresponding to the initial queue based on the trajectory coordinates of each person, and determine the commander in the initial queue based on the Mahalanobis distance between the trajectory coordinates of each person and the distribution center; the commander is a person who can deviate from the initial queue.

[0023] In this embodiment, to address the challenge of distinguishing between commanders (legitimate outcasts) and team members with positioning deviations (illegal outcasts) in a single feature space during shift changes, this embodiment proposes a dual discrimination mechanism of "global statistical distribution + local topological density" to achieve accurate role identification and anomaly classification.

[0024] It should be noted that the first step is to perform a first-level global anomaly screening based on Mahalanobis distance. This involves determining the distribution center of the spatial distribution model corresponding to the initial queue based on the trajectory coordinates of each person. The specific process may include: first, constructing the spatial distribution model of the initial queue based on the trajectory coordinates of each person, and determining the number of people in the initial queue; then, determining the target abscissa of the distribution center based on the ratio of the sum of the abscissas of each person's trajectory coordinates to the number of people, and determining the target ordinate of the distribution center based on the ratio of the sum of the ordinates of each person's trajectory coordinates to the number of people; finally, determining the distribution center based on the target abscissa and the target ordinate.

[0025] Specifically, first construct a Gaussian field: select the valid trajectory coordinates of all personnel within the current time window. Construct a two-dimensional spatial distribution model of the queue; where, Let n be the position vector of the nth person, usually represented as a two-dimensional column vector. Then, determine the target x-coordinate of the distribution center based on the ratio of the sum of the x-coordinates of each person's trajectory coordinates to the number of people, and determine the target y-coordinate of the distribution center based on the ratio of the sum of the y-coordinates of each person's trajectory coordinates to the number of people, thus obtaining the position mean vector. The distribution center is the centroid of the queue, which is also the physical "center" of the queue. Next, the covariance matrix of the spatial distribution model can be calculated. The covariance matrix is ​​a 2x2 matrix that describes the distribution shape of the queue. If the queue is arranged horizontally, then the variance in the x-direction is larger.

[0026] Next, statistical distance calculations are performed to determine the Mahalanobis distance from each person to the distribution center. To determine the commander in the initial queue, the specific process may include: first, determining the Mahalanobis distance between each person and the distribution center based on the trajectory coordinates of each person and the coordinates of the distribution center; if the Mahalanobis distance corresponding to the person is greater than a preset distance threshold, then the person is determined as a person to be verified, and the commander in the initial queue is determined from the persons to be verified; if the Mahalanobis distance corresponding to the person is not greater than the preset distance threshold, then the person is determined as the first member in the initial queue; the first member is a preset normal member who has not deviated from the initial queue.

[0027] Specifically, the Mahalanobis distance formula is as follows: ; in, For the trajectory coordinates of the personnel, The inverse of the covariance matrix is ​​the core of Mahalanobis distance, used for normalization. In simpler terms: if the queue itself is very long (large variance in the x-direction), then being further from the center in the x-direction isn't considered an outlier; however, if the queue is very narrow in the y-direction, then deviations in the y-direction are very noticeable. It is used to automatically adjust weights and eliminate misjudgments caused by "queue shape".

[0028] Next, set a preset distance threshold. And make the following judgment: like If so, it is determined to be a core queue member in a normal position, and is designated as the first member, that is, a preset normal member who has not deviated from the initial queue; like If a person is identified as a potential outlier, they will be considered as a person to be verified. This person could be a commander or a team member who is standing at a significant angle.

[0029] Next, a second-level topological break determination based on local density is performed to identify the commander in the initial queue from the personnel to be verified. The specific process may include: first, identifying the adjacent personnel with the smallest distance from the personnel to be verified in the initial queue, and calculating the Euclidean distance between the personnel to be verified and the adjacent personnel; then, determining the average distance between each of the first team members in the initial queue, and determining the target product between the average distance and a preset coefficient; if the Euclidean distance corresponding to the personnel to be verified is greater than the target product, then the personnel to be verified is identified as the commander in the initial queue; if the Euclidean distance corresponding to the personnel to be verified is not greater than the target product, then the personnel to be verified is identified as the second team member in the initial queue; the second team member is a preset abnormal team member deviating from the initial queue. Specifically, to distinguish the properties of the potential outliers mentioned above, the minimum spanning tree (MST) neighborhood distance can be introduced as a local density indicator. The potential outliers, i.e., the individuals to be verified, are calculated using the Euclidean distance between themselves and their nearest neighbors. Real-time calculation of the average spacing between core queue members, i.e., the first member. Set the topological breakage coefficient K, with a recommended value of K=2.2~2.5, and perform the following judgments: (1) Situation A (Legitimate departure - Commander) like If the result is positive, it indicates that the person to be verified is statistically out of the group and has a "density break" from the queue in physical space, belonging to an independent topological cluster. The system marks this person as a "commander / leader" and automatically removes them from subsequent neatness calculation sequences to avoid false alarms.

[0030] (2) Situation B (Violation of rules and leaving the group - abnormal team member)

[0031] like This indicates that although the person to be verified is statistically off-center, they are still physically within the "gravitational range" of the main queue and have not broken away. The system determines them as "severely off-center members," i.e., the second member, and retains them in the calculation sequence, deducting points and issuing alarms with high weight in subsequent steps.

[0032] In one specific implementation, see Figure 2 As shown, the commander can legally deviate from the queue, while members who deviate from the queue are considered abnormal members. Within the queue, abnormal members exhibit global deviation but do not experience a density break with the queue, while the commander exhibits global deviation but experiences a density break with the queue. Furthermore, the commander within the queue can be determined through a pre-defined heterogeneous role topology decoupling mechanism, see [link to relevant documentation]. Figure 3 As shown, the black solid dots represent the distribution center. The Mahalanobis distances from team member 1, team member 2... team member N to the distribution center do not exceed the preset distance threshold, while the Mahalanobis distance from the commander to the distribution center exceeds the preset distance threshold. It can be seen that the commander in the queue is spatially isolated and the movement trend is not coordinated.

[0033] In this way, by employing the aforementioned "global first, local later" logic, this embodiment effectively solves the misjudgment problem caused by the "one-size-fits-all" approach of traditional algorithms, ensuring that only the team members to be evaluated are assessed, and only the commanders to be removed are eliminated. It is evident that this embodiment differs from traditional exclusion methods based on region division, proposing an adaptive outlier removal algorithm. By constructing a spatial distribution model of real-time trajectory points and dynamically calculating the deviation of personnel, it can automatically separate the team leader / commander from the inspected queue in complex scenarios without the need for predefined "commander regions," thus solving the misjudgment problem caused by non-fixed personnel positions.

[0034] Step S13: Remove the commander from the initial queue to obtain the target queue, and determine the motion state of the target queue in real time. Detect the state of the target queue based on a preset detection rule corresponding to the motion state to obtain the current state detection result; the motion state is either stationary or in motion, and the state detection result is either a preset orderly state or a preset disordered state.

[0035] It should be noted that since the commander can legally deviate from the queue, the commander needs to be removed from the initial queue to obtain the target team members in the initial queue, and the target queue to be tested for neatness is determined based on the target team members; the target team members include the first team member and the second team member.

[0036] In this embodiment, the magnitude of the average velocity vector of the target queue can be calculated in real time, automatically determining whether it is currently stationary or moving, and activating the corresponding neatness detection model.

[0037] In one specific implementation, the state of a target queue is detected based on a preset detection rule corresponding to the motion state. The specific process may include: if the motion state is stationary, prefitting the trajectory coordinates of each target member in the target queue to obtain a prefit line, and determining the initial Euclidean distance residual from the trajectory coordinates of each target member to the prefit line; if the initial Euclidean distance residual corresponding to the target member is greater than a first preset residual threshold, reducing the weight of the trajectory coordinates of the target member, adjusting the prefit line based on the weight reduction result to obtain a baseline, and determining the target Euclidean distance residual from the trajectory coordinates of each target member to the baseline; if the target Euclidean distance residual corresponding to the target member is greater than a second preset residual threshold, determining and outputting that the target member's position is abnormal; if the target Euclidean distance residual corresponding to the target member is not greater than the second preset residual threshold, determining that the target member's position is normal, and generating the current state detection result of the target queue based on each target member with a normal position.

[0038] Specifically, if the target queue is stationary, a robust weighted least squares-based neatness detection is performed. In calculating individual deviations, this embodiment introduces an M-estimate iterative mechanism based on the Tukey weight function. First, prefitting is performed to obtain a prefit line. Then, the Euclidean distance residual from each target member to the prefit line is calculated. If the initial Euclidean distance residual of a target member is greater than a first preset residual threshold, it is identified as a high-residual member. Subsequently, a weighting function is used to reduce the weight of high-residual members, weakening the influence of outliers on the prefit line, thereby generating a baseline. Then, the Euclidean distance residual from each target member to the baseline is calculated again. If it exceeds a second preset residual threshold, such as the standard deviation of the main queue position, the target member is marked as having an abnormal position and highlighted in red in the output, without affecting the neatness score of the entire queue. If it does not exceed the second preset residual threshold, the target member is marked as having a normal position, and the current state detection result of the target queue is generated based on the target members with normal positions. See also... Figure 4 As shown, the dashed line represents the baseline obtained through fitting. Since team member X deviates from the queue, the weight is reduced, and the deviating team member X is automatically ignored when fitting the baseline. It can be seen that in this embodiment, when the service queue is in a static state, robust weighted least squares method is used to fit the queue's baseline, and the neatness is detected through residual distribution, effectively suppressing the influence of individual extreme positions on the overall score.

[0039] Furthermore, let's explain the scenario of performing neatness detection on a stationary target queue in detail: Imagine the fitted line as a magnetic elastic band, and each team member as a nail.

[0040] 1. First attempt: The elastic band is thrown in and is attracted by all the nails. At this time, the elastic band is crooked because the team members who are standing crooked are also attracting the elastic band.

[0041] 2. Measurement and Weighting: The system measures the distance (residual) from each nail to the elastic band. The system detected that all team members were very close together, except for team member A, who was particularly far away. Punishment mechanism: The system considers team member A to be unreliable and reduces team member A's magnetism (weight) from 1.0 to 0.1, while the magnetism of other team members remains at 1.0.

[0042] 3. Refitting: The elastic band contracts again. Because the magnetic force of player A has weakened, the elastic band no longer considers player A and instead adheres tightly to the straight line formed by most of the players.

[0043] 4. Final Decision: At this point, the fitted line has been corrected, and the baseline is obtained. The system measures the distance again: Most team members were less than 5cm from the baseline, which was considered acceptable. Team member A is more than 50cm away from the baseline. Therefore, team member A is not in line with the queue.

[0044] In another implementation, the state of the target queue is detected based on a preset detection rule corresponding to the motion state, including: if the motion state is motion, constructing a topological relationship graph corresponding to each target member of the target queue; the topological relationship graph is a Delaunay triangulation or a fully connected graph; determining a first rate of change of geodesic distance and a second rate of change of velocity vector angle corresponding to adjacent target members according to the topological relationship graph; and generating the current state detection result of the target queue based on the comparison results between each of the first rate of change and a first preset rate of change threshold, and the comparison results between each of the second rate of change and a second preset rate of change threshold.

[0045] Specifically, if the target queue is stationary, a cooperative neatness detection based on vector spectrum consistency is performed. That is, for common non-linear and straight-line movement scenarios in shift change queues, such as turns and detours, this embodiment abandons a single linearity criterion and instead uses topological rigidity preservation as the core detection method: a Delaunay triangulation or fully connected graph is constructed among the members of the target queue, and the rate of change of geodesic distance and the rate of change of velocity vector angle between adjacent nodes are monitored in real time. See also... Figure 5As shown, the queue is turning right. The arrows indicate the direction of the members' marching speed. The direction of each member's marching speed changes smoothly. The dashed lines represent the distance d between adjacent members. The criteria for judging the queue's neatness are: 1. The distance d between adjacent members remains constant, which is a rigid criterion; 2. The arrow directions change smoothly and gradually, i.e., the vectors are consistent. Therefore, in this embodiment, when the service queue is in motion, covariance analysis of the velocity vector field is introduced to calculate the "spectral consistency" of the queue members' movement directions and the "rigidity maintenance" of the distances, thereby accurately quantifying the neatness of the marching queue.

[0046] 1. Rigid Criterion: Even if the curvature of the overall trajectory of the formation changes, such as turning, if the variance of the relative distance between the members remains at a low level, that is, if there is no stretching, compression or discontinuity, the formation of the formation is still considered to be intact.

[0047] 2. Vector Manifold Criterion: Calculate the local consistency of the velocity vector field. During turning, smooth gradient changes in the vector direction are allowed, but if a high-frequency abrupt change in the vector angle between adjacent targets is detected, such as chaotic interweaving, it is judged as a violation of the driving rules.

[0048] Furthermore, the scenario of performing alignment detection on a moving target queue is explained in detail: when turning, instead of checking if the queue members form a straight line, the focus is on whether the relationships between the members change. This embodiment introduces the concept of an "invisible spring": (1) Rigid constraint (distance lock): Regardless of whether the formation moves in a straight line or turns, the distance between members A and B in the front and back rows should remain constant, as should the distance between members C and D in the left and right rows. If someone jumps ahead (cuts into the inside lane) or falls behind (runs slower in the outside lane) when turning, the distance between members will increase or decrease.

[0049] Algorithm logic: Calculate the distance matrix between all adjacent people in real time. If the standard deviation (fluctuation) of these distances is extremely small, it means that the queue is moving like a whole (rigid body), and even if the shape is curved into an S-shape, the queue is still orderly.

[0050] (2) Vector flow field (smoothness): When turning, all team members will be moving at different speeds and in different directions; some will be heading east, and some southeast. However, the change in direction between adjacent team members should be smooth. For example, if team member A turns 10 degrees, team member B should immediately turn 10 degrees as well. If team member A turns but team member B does not, such as team member B walking erratically or team member C suddenly walking backwards, then the formation is considered disordered.

[0051] Step S14: Save the state detection result to a preset buffer. If the target proportion of the same state detection result in the preset buffer exceeds a preset proportion threshold, then the state detection result corresponding to the target proportion is determined as the target state detection result of the target queue, and the target state detection result is output.

[0052] It should be noted that, in order to address the problem of frequent jumps between neat and irregular state detection results under critical conditions, this embodiment designs a dual-threshold hysteresis logic, as shown below: 1. State Buffer: Establish a FIFO (First Input First Output) state buffer with a length of N frames.

[0053] 2. Hysteresis Detection: State switching is only performed when the cumulative proportion of a certain state detection result in the buffer exceeds a preset threshold, such as 80%. If only a single frame or occasional fluctuation in the state detection result occurs, the output state of the previous moment will be maintained.

[0054] 3. Results Feedback: The final output can be a smoothed “neat / unneat” target state detection result, and a visualized fitting baseline, outlier identifier and status alarm information can be overlaid on the monitoring video stream.

[0055] As can be seen, in this embodiment, the determination result of "neat / unneat" is smoothed in time. The state flip is only triggered when the state confidence of consecutive frames exceeds the threshold. This effectively eliminates the jump in detection results caused by video frame loss, light flicker, or human physiological micro-movements.

[0056] In one specific implementation, see Figure 6As shown, firstly, video sequences of the queue are acquired. Human targets in the video are identified using the YOLOX Anchor-free object detection network. Then, the ByteTrack algorithm is used to establish temporal correlations between targets across multiple frames, assigning a unique ID to each person and generating an original trajectory sequence. Next, a high-order trajectory smoothing method combining SG filtering and Kalman prediction is employed to eliminate noise caused by detection box jitter and brief occlusions, outputting continuous and stable trajectory coordinates of the personnel. Subsequently, a Gaussian distribution field is constructed based on the trajectory coordinates. A pre-defined heterogeneous role topology decoupling mechanism is used to identify and remove legitimate outliers, resulting in the target queue to be detected. Then, the target queue is judged as either dynamic or static. If the velocity is less than a threshold, a robust least squares fitting model in the static state is activated, and queue neatness is detected using a robust baseline, while simultaneously performing adaptive calibration of the virtual baseline. If the velocity is greater than or equal to a threshold, a velocity vector spectrum consistency model in the moving state is activated, detecting queue neatness from both topological rigidity and vector smoothness dimensions. Subsequently, based on a preset hysteresis state filter and an N-frame continuous confirmation mechanism, the results of each state detection are stored in a buffer and their proportion is statistically analyzed. Only when the proportion of the same result exceeds a threshold is the final standardized result output, effectively filtering out instantaneous noise interference and ensuring the stability and reliability of the detection results. In this way, this embodiment completely solves the industry pain point of traditional algorithms misclassifying "commanders" as "stragglers," significantly reducing the false alarm rate. Simultaneously, this embodiment can achieve full-scene adaptability, automatically adapting to two drastically different physical processes: "assembling and lining up (static)" and "leading back in motion (dynamic)," without requiring manual intervention to switch modes. Furthermore, compared to wearable sensors, this embodiment relies on vision, resulting in extremely low deployment costs, and the scoring results are objective and traceable.

[0057] As can be seen from the above, in this embodiment, the monitoring video of the initial queue is first acquired, and the trajectory coordinates of each person in the initial queue are determined based on the monitoring video. Then, the distribution center of the spatial distribution model corresponding to the initial queue is determined according to the trajectory coordinates of each person, and the commander in the initial queue is determined based on the Mahalanobis distance between the trajectory coordinates of each person and the distribution center. The commander is a person who can deviate from the initial queue. Subsequently, the commander is removed from the initial queue to obtain the target queue, and the motion state of the target queue is determined in real time. The current state detection result is obtained by detecting the state of the target queue based on the preset detection rules corresponding to the motion state. The motion state is either stationary or moving, and the state detection result is either a preset orderly state or a preset disordered state. Finally, the state detection result is saved to a preset buffer. If the target proportion of the same state detection result in the preset buffer exceeds a preset proportion threshold, the state detection result corresponding to the target proportion is determined as the target state detection result of the target queue, and the target state detection result is output. As can be seen from the above, this embodiment determines the trajectory coordinates of personnel in the initial queue through monitoring video of the initial queue, constructs a spatial distribution model of the initial queue based on the trajectory coordinates, and determines the distribution center. Commanders who can legally deviate from the queue are identified based on the Mahalanobis distance between the personnel's trajectory coordinates and the distribution center, and are removed from the initial queue to obtain the target queue. The movement state of the target queue is then determined in real time (stationary or moving), and a preset detection rule corresponding to the movement state is determined. The neatness state of the target queue is detected based on the preset detection rule, and the current state detection result is obtained. Simultaneously, the state detection result is stored in a preset buffer. When the proportion of the same detection result in the buffer exceeds a preset threshold, it is determined as the final target detection result and output. In this way, this embodiment can accurately distinguish between commanders and team members in the detection of duty queues, effectively avoiding detection errors caused by non-inspected targets. Furthermore, it adapts differentiated detection rules according to different movement states of the queue, making the queue standardization judgment more in line with actual scenario requirements. The proportion judgment mechanism of the buffer filters out instantaneous detection noise, significantly improving the stability and accuracy of the detection results, and achieving automated, standardized, efficient, and accurate detection of queue neatness.

[0058] Accordingly, see Figure 7 As shown in the embodiments of this application, a multi-target detection device suitable for service queues is also provided, which may include: The trajectory coordinate determination module 11 is used to acquire the collected monitoring video of the initial queue and determine the trajectory coordinates of each person in the initial queue based on the monitoring video. The commander determination module 12 is used to determine the distribution center of the spatial distribution model corresponding to the initial queue based on the trajectory coordinates of each person, and to determine the commander in the initial queue based on the Mahalanobis distance between the trajectory coordinates of each person and the distribution center; the commander is a person who can deviate from the initial queue. The state detection module 13 is used to remove the commander from the initial queue to obtain the target queue, and to determine the motion state of the target queue in real time. Based on the preset detection rules corresponding to the motion state, the state of the target queue is detected to obtain the current state detection result; the motion state is stationary or moving, and the state detection result is a preset orderly state or a preset disordered state. The state detection result storage module 14 is used to save the state detection result to a preset buffer. If the target proportion of the same state detection result in the preset buffer exceeds a preset proportion threshold, the state detection result corresponding to the target proportion is determined as the target state detection result of the target queue, and the target state detection result is output.

[0059] In some specific embodiments, the trajectory coordinate determination module 11 may include: The time-series trajectory sequence generation unit is used to perform human target detection on the surveillance video using a preset target detection network, obtain the corresponding human target detection results, and use the ByteTrack association algorithm to generate the initial time-series trajectory sequence of each person in the initial queue based on the human target detection results; The trajectory coordinate determination unit is used to remove noise from the initial time-series trajectory sequence using a preset filter to obtain a target time-series trajectory sequence, and to smooth and correct the target time-series trajectory sequence based on Kalman filtering, and to determine the trajectory coordinates of each person based on the smoothed and corrected time-series trajectory sequence.

[0060] In some specific embodiments, the commander determination module 12 may include: The personnel quantity determination unit is used to construct the spatial distribution model of the initial queue based on the trajectory coordinates of each person, and to determine the number of people in the initial queue. A coordinate determination unit is used to determine the target abscissa of the distribution center based on the ratio of the sum of the abscissas of the trajectory coordinates of each person to the number of people, and to determine the target ordinate of the distribution center based on the ratio of the sum of the ordinates of the trajectory coordinates of each person to the number of people. The distribution center determination unit is used to determine the distribution center based on the target horizontal coordinate and the target vertical coordinate.

[0061] In some specific embodiments, the commander determination module 12 may include: The Mahalanobis distance determination unit is used to determine the Mahalanobis distance between each person and the distribution center based on the trajectory coordinates of each person and the coordinates of the distribution center. The personnel to be verified unit is used to determine the personnel to be verified if the Mahalanobis distance corresponding to the personnel is greater than a preset distance threshold, and to determine the commander in the initial queue from the personnel to be verified. The first member determination unit is used to determine the person as the first member in the initial queue if the Mahalanobis distance corresponding to the person is not greater than a preset distance threshold; the first member is a preset normal member who has not deviated from the initial queue.

[0062] In some specific implementations, the commander determining submodule may include: The Euclidean distance calculation unit is used to determine the neighboring person with the smallest distance to the person to be verified from the initial queue, and to calculate the Euclidean distance between the person to be verified and the neighboring person. The target product determination unit is used to determine the average distance between each of the first members in the initial queue, and to determine the target product between the average distance and a preset coefficient; The commander determination unit is used to determine the person to be verified as the commander in the initial queue if the Euclidean distance corresponding to the person to be verified is greater than the target product. The second member determination unit is used to determine the person to be verified as the second member in the initial queue if the Euclidean distance corresponding to the person to be verified is not greater than the target product; the second member is a preset abnormal member who deviates from the initial queue. Accordingly, the state detection module 13 may include: The target queue determination unit is used to remove the commander from the initial queue to obtain the target team members in the initial queue, and to determine the target queue based on the target team members; the target team members include the first team member and the second team member.

[0063] In some specific embodiments, the state detection module 13 may include: The prefitting line determination unit is used to prefit the trajectory coordinates of each target member in the target queue to obtain a prefitting line if the motion state is stationary, and to determine the initial Euclidean distance residual from the trajectory coordinates of each target member to the prefitting line. The baseline determination unit is used to reduce the weight of the trajectory coordinates of the target team member if the initial Euclidean distance residual corresponding to the target team member is greater than a first preset residual threshold, and adjust the prefit line based on the weight reduction result to obtain the baseline, and determine the target Euclidean distance residual from the trajectory coordinates of each target team member to the baseline. The position anomaly determination unit is used to determine and output that the target team member's position is abnormal if the target Euclidean distance residual corresponding to the target team member is greater than a second preset residual threshold. The normal position determination unit is used to determine that the target member's position is normal if the target Euclidean distance residual corresponding to the target member is not greater than a second preset residual threshold, and to generate the current state detection result of the target queue based on each target member with a normal position.

[0064] In some specific embodiments, the state detection module 13 may include: The topology graph construction unit is used to construct a topology graph corresponding to each target member of the target queue if the motion state is motion; the topology graph is a Delaunay triangulation or a fully connected graph. The rate of change determination unit is used to determine, based on the topological relationship diagram, the first rate of change of the geodesic distance between adjacent target team members and the second rate of change of the velocity vector angle. The state detection result generation unit is used to generate the current state detection result of the target queue based on the comparison results between each of the first change rates and the first preset change rate threshold, and the comparison results between each of the second change rates and the second preset change rate threshold.

[0065] Furthermore, embodiments of this application also disclose an electronic device, Figure 8 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application. Specifically, the electronic device 20 may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the multi-target detection method for service queues disclosed in any of the foregoing embodiments. Furthermore, the electronic device 20 in this embodiment may specifically be an electronic computer.

[0066] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.

[0067] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon can include operating system 221, computer program 222, etc., and the storage method can be temporary storage or permanent storage.

[0068] The operating system 221 is used to manage and control the various hardware devices on the electronic device 20 and the computer program 222, which may be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program capable of performing the multi-target detection method for service queues disclosed in any of the foregoing embodiments, which is executed by the electronic device 20, the computer program 222 may further include computer programs capable of performing other specific tasks.

[0069] Furthermore, this application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned multi-target detection method applicable to service queues. Specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.

[0070] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.

[0071] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0072] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0073] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0074] The technical solutions provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A multi-target detection method suitable for service queues, characterized in that, include: Acquire the monitoring video of the initial queue, and determine the trajectory coordinates of each person in the initial queue based on the monitoring video; The distribution center of the spatial distribution model corresponding to the initial queue is determined based on the trajectory coordinates of each person, and the commander in the initial queue is determined based on the Mahalanobis distance between the trajectory coordinates of each person and the distribution center; the commander is a person who can deviate from the initial queue. The commander is removed from the initial queue to obtain the target queue, and the movement state of the target queue is determined in real time. The current state detection result is obtained by detecting the state of the target queue based on the preset detection rules corresponding to the movement state. The movement state is either stationary or in motion, and the state detection result is either a preset orderly state or a preset disordered state. The state detection results are saved to a preset buffer. If the target proportion of the same state detection result in the preset buffer exceeds a preset proportion threshold, the state detection result corresponding to the target proportion is determined as the target state detection result of the target queue, and the target state detection result is output.

2. The multi-target detection method for service queues according to claim 1, characterized in that, Determining the trajectory coordinates of each person in the initial queue based on the surveillance video includes: Human targets are detected in the surveillance video using a preset target detection network to obtain corresponding human target detection results. Then, the ByteTrack association algorithm is used to generate the initial time-series trajectory sequence of each person in the initial queue based on the human target detection results. Noise in the initial time-series trajectory sequence is removed using a preset filter to obtain the target time-series trajectory sequence. The target time-series trajectory sequence is then smoothed and corrected using Kalman filtering. Finally, the trajectory coordinates of each person are determined based on the smoothed and corrected time-series trajectory sequence.

3. The multi-target detection method for service queues according to claim 1, characterized in that, The step of determining the distribution center of the spatial distribution model corresponding to the initial queue based on the trajectory coordinates of each person includes: The spatial distribution model of the initial queue is constructed based on the trajectory coordinates of each person, and the number of people in the initial queue is determined. The target abscissa of the distribution center is determined by the ratio of the sum of the abscissas of the trajectory coordinates of each person to the number of people, and the target ordinate of the distribution center is determined by the ratio of the sum of the ordinates of the trajectory coordinates of each person to the number of people. The distribution center is determined based on the target's x-coordinate and y-coordinate.

4. The multi-target detection method applicable to service queues according to any one of claims 1 to 3, characterized in that, The determination of the commander in the initial queue based on the Mahalanobis distance between the trajectory coordinates of each person and the distribution center includes: Based on the trajectory coordinates of each person and the coordinates of the distribution center, the Mahalanobis distance between each person and the distribution center is determined; If the Mahalanobis distance corresponding to the person is greater than a preset distance threshold, then the person is identified as a person to be verified, and the commander in the initial queue is identified from the persons to be verified. If the Mahalanobis distance corresponding to the person is not greater than a preset distance threshold, then the person is determined as the first member in the initial queue; the first member is a preset normal member who has not deviated from the initial queue.

5. The multi-target detection method for service queues according to claim 4, characterized in that, The step of determining the commander in the initial queue from the personnel to be verified includes: Identify the neighboring person with the smallest distance from the person to be verified from the initial queue, and calculate the Euclidean distance between the person to be verified and the neighboring person; Determine the average distance between each of the first members in the initial queue, and determine the target product between the average distance and a preset coefficient; If the Euclidean distance to the person to be verified is greater than the target product, then the person to be verified is determined to be the commander in the initial queue; If the Euclidean distance to the person to be verified is not greater than the target product, then the person to be verified is determined to be the second member in the initial queue; the second member is a preset abnormal member who has deviated from the initial queue. Accordingly, removing the commander from the initial queue to obtain the target queue includes: The commander is removed from the initial queue to obtain the target team members in the initial queue, and the target queue is determined based on the target team members; the target team members include the first team member and the second team member.

6. The multi-target detection method for service queues according to claim 5, characterized in that, The detection of the target queue's state based on a preset detection rule corresponding to the motion state includes: If the motion state is stationary, the trajectory coordinates of each target member in the target queue are prefitted to obtain a prefit line, and the initial Euclidean distance residual from the trajectory coordinates of each target member to the prefit line is determined. If the initial Euclidean distance residual corresponding to the target player is greater than the first preset residual threshold, then the weight of the trajectory coordinates of the target player is reduced, and the prefit line is adjusted based on the weight reduction result to obtain the baseline, and the target Euclidean distance residual from the trajectory coordinates of each target player to the baseline is determined. If the target Euclidean distance residual corresponding to the target team member is greater than the second preset residual threshold, then the target team member's position is determined to be abnormal and output. If the target Euclidean distance residual corresponding to the target team member is not greater than the second preset residual threshold, then the target team member is determined to be in a normal position, and the current state detection result of the target queue is generated based on each target team member in a normal position.

7. The multi-target detection method for service queues according to claim 5, characterized in that, The detection of the target queue's state based on a preset detection rule corresponding to the motion state includes: If the motion state is motion, then construct a topological graph corresponding to each target member of the target queue; the topological graph is a Delaunay triangulation or a fully connected graph. Based on the topological relationship diagram, determine the first rate of change of the geodesic distance and the second rate of change of the velocity vector angle corresponding to the adjacent target team members; Based on the comparison results between each of the first change rates and the first preset change rate threshold, and the comparison results between each of the second change rates and the second preset change rate threshold, the current state detection result of the target queue is generated.

8. A multi-target detection device suitable for service platoons, characterized in that, include: The trajectory coordinate determination module is used to acquire the collected monitoring video of the initial queue and determine the trajectory coordinates of each person in the initial queue based on the monitoring video. The commander determination module is used to determine the distribution center of the spatial distribution model corresponding to the initial queue based on the trajectory coordinates of each person, and to determine the commander in the initial queue based on the Mahalanobis distance between the trajectory coordinates of each person and the distribution center; the commander is a person who can deviate from the initial queue; The state detection module is used to remove the commander from the initial queue to obtain the target queue, and to determine the movement state of the target queue in real time. Based on the preset detection rules corresponding to the movement state, the module detects the state of the target queue to obtain the current state detection result. The movement state is either stationary or in motion, and the state detection result is either a preset orderly state or a preset disordered state. The state detection result saving module is used to save the state detection result to a preset buffer. If the target proportion of the same state detection result in the preset buffer exceeds a preset proportion threshold, the state detection result corresponding to the target proportion is determined as the target state detection result of the target queue, and the target state detection result is output.

9. An electronic device, characterized in that, The electronic device includes a processor and a memory; wherein the memory is used to store a computer program, which is loaded and executed by the processor to implement the multi-target detection method for service queues as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, Used to store a computer program, which, when executed by a processor, implements the multi-target detection method for service queues as described in any one of claims 1 to 7.