An artificial intelligence method for passenger flow analysis, electronic device, and program product
Patent Information
- Application Number
- CN202611419803.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-14
- Publication Date
- 2026-10-16
AI Technical Summary
1、透视畸变导致绝对距离失效:摄像头拍摄存在近大远小的透视效应,画面远处的“同行像素距离”远小于近处的“同行像素距离”,固定阈值会导致远处漏判同行,近处误判同行
本发明利用了卡尔曼滤波器输出的位置不确定性信息,不确定性越大的帧“发言权”越小,配合加权中位数逻辑,使得算法像人类视觉一样能够“自动忽略遮挡时期的异常位移”,使同行精度提升显著。通过检测目标的位置坐标与人体尺度动态归一化距离,无论目标走到画面何处均能保持判定标准的一致性,有效解决透视形变导致的误判问题。
Smart Images

Figure CN122929510A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer vision and video analysis technology, and in particular to an artificial intelligence method, electronic device and program product for passenger flow analysis. Background Technology
[0002] In intelligent customer flow analysis within commercial retail scenarios, it's not enough to simply count individual customers entering the store; often, it's also necessary to aggregate customers traveling together into groups to accurately calculate conversion rates and the true customer base. Current technologies typically use a simple rule to determine whether multiple trajectories belong to the same group: "within a specific time window, the pixel Euclidean distance between two trajectories is less than a certain fixed threshold." However, such methods face the following technical bottlenecks in complex real-world scenarios: 1. Perspective distortion causes absolute distance to fail: Camera shooting has a perspective effect where objects appear larger when they are closer and smaller when they are farther away. The "pixel distance of the same object in the same field" in the distance is much smaller than that in the distance. A fixed threshold will cause objects in the same field to be missed in the distance and objects in the same field to be misjudged in the distance.
[0003] 2. Occlusion and detection box jitter cause distance calculation distortion: In crowded stores or showrooms, frequent occlusion can cause the target detection box to jump violently or deform. At this time, the average value based on Euclidean distance will be severely skewed by the abnormally jumping noise frames, resulting in peer judgment failure.
[0004] 3. Misaligned trajectory sampling time: The target tracking update frame rate or timestamp of different pedestrians may be misaligned due to missing frames detected. Directly calculating the distance between pedestrians will produce spatial position errors due to time differences.
[0005] Furthermore, existing methods typically do not utilize the positional uncertainty information output by the Kalman filter in multi-target tracking, nor do they normalize the distance by combining human scale and use robust statistical methods to aggregate temporal distances, resulting in insufficient accuracy in peer identification in complex scenarios.
[0006] Therefore, a new technical solution is urgently needed to solve the aforementioned technical problems existing in the current technology. Summary of the Invention
[0007] The purpose of this invention is to provide an artificial intelligence method, electronic device, and program product for passenger flow analysis, thereby overcoming the aforementioned limitations of the prior art. The numerous technical effects of the preferred solutions among the many technical solutions provided by this invention are detailed below.
[0008] To achieve the above objectives, the present invention provides the following technical solution: This invention provides an artificial intelligence method for passenger flow analysis, comprising: The human trajectories of multiple detected targets obtained by the multi-target tracking algorithm using target detection and Kalman filtering are transformed into a state sequence of trajectory points with positional uncertainty. The state sequence of each trajectory point at time t within the trajectory lifetime includes position coordinates, human body scale, and positional uncertainty value. For any two candidate body trajectories, calculate the time difference between their crossings and the effective time overlap interval of their trajectory lifecycles. Based on the time difference between their crossings and the effective time overlap interval, determine whether the corresponding detection targets of the two are likely to be traveling in the same direction. Align two possible candidate body trajectories that are in the same row to obtain a candidate body trajectory pair. Calculate the adaptive normalized distance of the candidate body trajectory pair at time t based on the position coordinates and human body scale of the candidate body trajectory pair. Based on the positional uncertainty value corresponding to the candidate body trajectory pair, calculate the confidence weight of the candidate body trajectory pair at time t, and determine whether the detection target corresponding to the candidate body trajectory pair is a peer-to-peer relationship based on the adaptive normalized distance and confidence weight. Traverse all candidate body trajectory pairs to obtain a Boolean matrix indicating whether each pair is in the same line. Treat the trajectory as a node and the line-in-line relationship as an edge. Aggregate the connected nodes into the final passenger flow group and output the total number of people in the group and the event timestamp. The event timestamp is the maximum value of the time when each group member crosses the line or the timestamp when the group first meets the line-in-line determination condition.
[0009] In some embodiments, the position coordinates are the coordinates of the corresponding trajectory point at... The center coordinates or landing point coordinates after Kalman filtering at any given moment; The human body scale corresponds to the detection frame within. The diagonal length after Kalman filtering at any given moment; The position uncertainty value is based on the corresponding trajectory point in The diagonal elements of the covariance matrix extracted from the Kalman filter at each time step are determined.
[0010] In some embodiments, the positional uncertainty value is based on the corresponding trajectory point in The diagonal elements of the covariance matrix extracted from the Kalman filter at each time step are determined, including: Extract the variances in the x and y directions from the diagonal elements of the covariance matrix. Summate the extracted x and y variances and take the square root to obtain the corresponding trajectory point. The uncertainty value of the position at any given time.
[0011] In some embodiments, determining whether the corresponding detection targets of the two are likely to be in the same lane based on the crossing time difference and the effective time overlap interval includes: If the time difference between the two crossing the line is greater than the set threshold, then the possibility that the detection targets corresponding to the two are in the same row is excluded; otherwise, the detection targets corresponding to the two are in the same row. Alternatively, if the proportion of the effective time overlap interval between the two to the total duration of the shorter candidate body trajectory is less than a preset proportion, then the possibility that the detection targets corresponding to the two are in the same direction is excluded; otherwise, the detection targets corresponding to the two are in the same direction.
[0012] In some embodiments, aligning two potentially corresponding candidate body trajectories that are in the same row includes: Using the timestamp of the candidate body trajectory with fewer sampling points among two potentially corresponding candidate body trajectories that coexist as a benchmark, the other trajectory is linearly interpolated at the same timestamp to obtain the candidate body trajectory pair.
[0013] In some embodiments, calculating the adaptive normalized distance of the candidate body trajectory pair at time t based on the corresponding position coordinates and human body scale includes: The adaptive normalized distance of the candidate body trajectory pair at time t is calculated by using the mean of the corresponding human body scale at time t as the denominator and the Euclidean distance between the corresponding position coordinates of the candidate body trajectory pair as the numerator.
[0014] In some embodiments, the confidence weights of the candidate body trajectories at time t are... The formula is as follows: ; in, For one of the candidate body trajectory pairs The corresponding position uncertainty value at time t, For another human body trajectory selection The corresponding position uncertainty value at time t.
[0015] In some embodiments, determining whether the candidate body trajectory pairs correspond to the detected targets as peer-to-peer relationships based on the adaptive normalized distance and confidence weight includes: The adaptive normalized distances at all times within the trajectory's lifecycle are sorted from largest to smallest, and the confidence weights corresponding to each time point are accumulated synchronously in the same order. When the accumulated confidence weights first reach the preset peak value of the total confidence weights, the adaptive normalized distance corresponding to the sorted position at this time is taken as the weighted median normalized distance. If the weighted median normalized distance is not greater than a set threshold, then the candidate body trajectory pair is determined to be a peer-to-peer relationship with the corresponding detection target.
[0016] According to another aspect of the invention, an electronic device is also provided, comprising: at least one processor; at least one memory for storing processor-executable instructions; wherein the at least one processor implements an artificial intelligence method for passenger flow analysis as described above by executing the executable instructions.
[0017] According to another aspect of the invention, a computer-readable storage medium is also provided, having stored thereon computer instructions that, when executed by at least one processor, implement an artificial intelligence method for passenger flow analysis as described above.
[0018] According to another aspect of the present invention, a computer program product is also provided, comprising a computer program or instructions that, when executed by a processor, implement an artificial intelligence method for passenger flow analysis as described above.
[0019] Implementing one of the above-described technical solutions of the present invention has the following advantages or beneficial effects: This invention utilizes the positional uncertainty information output by the Kalman filter. Frames with greater uncertainty have less "speaking power." Combined with weighted median logic, the algorithm can "automatically ignore abnormal displacements during occlusion," much like human vision, significantly improving peer accuracy. By detecting the target's position coordinates and dynamically normalized distance at human scale, the judgment standard remains consistent regardless of where the target is in the frame, effectively solving the problem of misjudgment caused by perspective distortion.
[0020] Meanwhile, this method relies purely on geometric kinematics and statistical logic for construction, and uses the Kalman filter in the tracking algorithm to update the results, resulting in a very low increase in computational cost. It does not require the collection of massive amounts of data to train a complex large-scale group behavior recognition model (black box). It has extremely high execution efficiency on edge computing boxes (such as RK3588 and Nvidia Jetson), and each step has interpretable intermediate quantities, which facilitates debugging and deployment, and the cost of troubleshooting is extremely low. Attached Figure Description
[0021] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. In the drawings: Figure 1 This is a flowchart of an artificial intelligence method for passenger flow analysis according to an embodiment of the present invention; Figure 2 This is a schematic diagram of an electronic device structure according to an embodiment of the present invention. Detailed Implementation
[0022] To make the objectives, technical solutions, and advantages of the present invention clearer, various exemplary embodiments described below will be referenced to the accompanying drawings, which constitute a part of the exemplary embodiments, illustrating various exemplary embodiments that may be used to implement the present invention. Unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. It should be understood that they are merely examples of processes, methods, and apparatuses consistent with some aspects of the present invention disclosed as detailed in the appended claims, and other embodiments may be used, or structural and functional modifications may be made to the embodiments listed herein without departing from the scope and spirit of the present invention.
[0023] In the description of this invention, it should be understood that the terms "center," "longitudinal," "lateral," etc., indicate the orientation or positional relationship based on the accompanying drawings, and are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the referred element must have a specific orientation, or be constructed and operated in a specific orientation. The terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. The term "multiple" means two or more. The terms "connected" and "linked" should be interpreted broadly, for example, they can be fixed connections, detachable connections, integral connections, mechanical connections, electrical connections, communication connections, direct connections, indirect connections through an intermediate medium, and can be the internal connection of two elements or the interaction relationship between two elements. The term "and / or" includes any and all combinations of one or more of the related listed items. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.
[0024] To illustrate the technical solution described in this invention, specific embodiments are described below, showing only the parts related to the embodiments of this invention.
[0025] Example 1: like Figure 1 As shown in this embodiment, an artificial intelligence method for passenger flow analysis includes: S100. The human body trajectories of multiple detected targets obtained by the multi-target tracking algorithm using target detection and Kalman filtering are transformed into a trajectory point state sequence with position uncertainty. The state sequence of each trajectory point at time t within the trajectory lifecycle includes position coordinates, human body scale, and position uncertainty value.
[0026] In a specific implementation, a video stream of the target is acquired, and the human trajectory is obtained through target detection and a multi-target tracking algorithm based on Kalman filtering. During the tracking survival period, the trajectory point state sequence of each target is cached. Each trajectory point not only contains position coordinates, but also records the target scale and position uncertainty.
[0027] It should be noted that the above trajectory lifecycle can be the tracking survival period, which consists of multiple moments (frames).
[0028] In some embodiments, the position coordinates are the coordinates of the corresponding trajectory point at... The center coordinates or landing point coordinates after Kalman filtering at any given time; the human body scale is the corresponding detection box within... The diagonal length after Kalman filtering at any given time.
[0029] The positional uncertainty value depends on the corresponding trajectory point. The diagonal elements of the covariance matrix extracted from the Kalman filter at each time step are determined.
[0030] Furthermore, the positional uncertainty value is determined based on the corresponding trajectory point in... The diagonal elements of the covariance matrix extracted from the Kalman filter at each time step are determined, including: Extract the variances in the x and y directions from the diagonal elements of the covariance matrix. Summate the extracted x and y variances and take the square root to obtain the corresponding trajectory point. The uncertainty value of the position at any given time.
[0031] In a specific implementation, the state sequence of each human trajectory point at time t within the trajectory's lifetime is... It can be represented as follows: , , , in, For the trajectory point at The position coordinates at that moment; ), ( The coordinates of the detection boxes for the corresponding trajectory points are shown below. Let be the variance in the x-direction of the diagonal elements of the covariance matrix at time t. Let be the variance in the y-direction of the diagonal elements of the covariance matrix at time t.
[0032] S200. For any two candidate body trajectories, calculate the time difference between their crossings and the effective time overlap interval of their trajectory lifecycles. Based on the time difference between their crossings and the effective time overlap interval, determine whether the corresponding detection targets of the two are likely to be traveling in the same direction.
[0033] The aforementioned crossing time refers to the moment when the target first crosses the preset counting line in the human trajectory of the detected target; the preset counting line is a virtual line segment configured in the video image to trigger the passenger flow counting event, such as the entrance line or the showroom entrance line. The crossing time difference is the absolute value of the difference between the crossing times of the two candidate human trajectories.
[0034] The effective time of the trajectory lifecycle refers to the start and end time interval during which the target is in an effective tracking state and located within the preset analysis area within the trajectory lifecycle. The effective time overlap interval is the intersection interval of the effective times of the two candidate trajectories.
[0035] In some embodiments, determining whether the corresponding detection targets of the two are likely to be in the same lane based on the time difference of crossing the line and the effective time overlap interval includes: If the time difference between the two crossing the line is greater than the set threshold, then the possibility that the detection targets corresponding to the two are in the same row is excluded; otherwise, the detection targets corresponding to the two are in the same row. Alternatively, if the length of the effective time overlap between the two is less than the total length of the shorter candidate body trajectory, then the possibility that the detection targets of the two are in the same direction is excluded (it can be determined as accidental overlap); otherwise, the detection targets of the two are in the same direction.
[0036] S300. Align the two candidate body trajectories that may correspond to each other in the same direction to obtain candidate body trajectory pairs. Calculate the adaptive normalized distance of the candidate body trajectory pairs at time t based on the position coordinates and human body scale of the candidate body trajectory pairs.
[0037] To make it easier to understand, due to the two candidate body trajectories, such as and Since the physical time points of sampling may not coincide, linear interpolation is required to... and Timing alignment.
[0038] In some embodiments, aligning two potentially corresponding candidate body trajectories that are in the same row includes: Using the timestamp of the candidate body trajectory with fewer sampling points among two potentially corresponding candidate body trajectories that exist in the same row as the benchmark, linear interpolation is performed on the other trajectory at the same timestamp to obtain the candidate body trajectory pair.
[0039] In a specific implementation, a trajectory with fewer sampling points (such as...) Using the timestamp of as a reference, binary search is used to search for another trajectory (such as ). At the same timestamp Perform linear interpolation at the point and align to obtain The resulting candidate body trajectory pairs are ( , ).
[0040] In some embodiments, calculating the adaptive normalized distance of the candidate body trajectory pair at time t based on the corresponding position coordinates and human body scale includes: The adaptive normalized distance of the candidate body trajectory pair at time t is calculated by using the mean of the corresponding human body scale at time t as the denominator and the distance between the corresponding position coordinates of the candidate body trajectory pair as the numerator.
[0041] In a specific implementation, for time t (each aligned frame), the absolute pixel distance is discarded, and the "adaptive normalized distance" is calculated. : .
[0042] In the above formula, the mean of the diagonals of the detection boxes of both cameras is used as the dynamic normalized denominator of the distance in that frame. This normalized distance completely decouples the effects of camera perspective distortion.
[0043] To understand this, existing technologies often use absolute pixel distance, which can easily misidentify pedestrians as fellow travelers at close range and miss them at greater distances. This method proposes an adaptive normalized distance, defining the threshold as "within N times the target's height," ensuring consistency in the judgment standard regardless of where the target is in the frame.
[0044] S400. Based on the positional uncertainty value of the candidate body trajectory pair, calculate the confidence weight of the candidate body trajectory pair at time t. Based on the adaptive normalized distance and confidence weight, determine whether the detection target corresponding to the candidate body trajectory pair is a peer-to-peer relationship.
[0045] In some embodiments, the confidence weights of candidate body trajectories at time t The formula is as follows: ; in, For one of the candidate body trajectories in the candidate body trajectory pair The corresponding position uncertainty value at time t, For another human body trajectory selection The corresponding position uncertainty value at time t.
[0046] In this embodiment, to overcome the detection box jitter error caused by occlusion, instead of using the mean calculation, a "weighted median based on uncertainty" calculation method is proposed. For each aligned frame, the confidence weight of the distance in that frame is calculated based on the sum of the Kalman position uncertainties of the two frames at that moment. If the target is occluded in a certain frame and the Kalman prediction uncertainty is extremely high, then the weight of the record at time t (frame) in the final decision approaches 0.
[0047] Furthermore, based on the adaptive normalized distance and confidence weight, it is determined whether the candidate body trajectory pairs with the corresponding detection targets are in a peer-to-peer relationship, including: The adaptive normalized distances at each time point within the trajectory's lifecycle are sorted from largest to smallest. The confidence weights at each time point are then accumulated synchronously in the same order. When the accumulated confidence weights first reach a preset peak value (e.g., 50%) of the total confidence weights, the adaptive normalized distance corresponding to that sorted position is taken as the weighted median normalized distance. If the weighted median normalized distance is not greater than a set threshold (e.g., 1.2), then the candidate trajectory pair is determined to be... , The corresponding detection target is peer-to-peer relationships.
[0048] S500: Traverse all candidate body trajectory pairs to obtain a Boolean matrix indicating whether each pair is in the same line. Treat the trajectory as a node and the line relationship as an edge. Aggregate the connected nodes into the final passenger flow group and output the total number of people in the group and the event timestamp.
[0049] In this step, a group topology can be constructed using a union-find algorithm. That is, the union-find algorithm is used to aggregate connected nodes into the final passenger flow group.
[0050] In summary, this embodiment utilizes an adaptive normalized distance calculation method for perspective elimination based on target scale: it does not rely on scene calibration or a fixed distance threshold, but instead extracts the average diagonal length of the target detection box in each frame as the denominator to calculate the normalized relative distance in real time, thereby achieving adaptation to near and far perspective distortion.
[0051] This embodiment breaks through the traditional Euclidean distance average framework and adopts a weighted median sorting and filtering mechanism to avoid interference from local extreme jitter frames on the overall peer judgment.
[0052] This method is based on geometric kinematics and statistical logic. It uses the Kalman filter in the tracking algorithm to update the results, which increases the computational cost by very little. It does not require the collection of massive amounts of data to train a complex group behavior recognition model (black box). It has extremely high execution efficiency on edge computing boxes (such as RK3588 and Nvidia Jetson). Moreover, each step has interpretable intermediate quantities, which facilitates debugging and deployment and reduces the cost of troubleshooting.
[0053] Example 2: like Figure 2 As shown, this embodiment also provides an electronic device, including: One or more processors; One or more memories for storing one or more computer programs, and one or more processors for executing the one or more computer programs stored in the memories, so that the one or more processors perform the features / steps of an artificial intelligence method for passenger flow analysis as described in Embodiment 1.
[0054] Furthermore, at the hardware level, the device includes a processor, an internal bus, a network interface, memory, and non-volatile memory, and may also include other necessary hardware. One or more embodiments of this application can be implemented in software, for example, by the processor reading the corresponding computer program from the non-volatile memory into memory and then running it.
[0055] Of course, in addition to the software implementation, one or more embodiments of this application do not exclude other implementation methods, such as logic devices or a combination of hardware and software. That is to say, the execution subject of the above processing flow is not limited to each logic module, but can also be hardware or logic devices.
[0056] Example 3: Those skilled in the art will understand that all or part of the features / steps of the above-described method embodiments can be implemented by methods, data processing systems, or computer programs. These features may be implemented without hardware, entirely in software, or in a combination of hardware and software. The aforementioned computer program may be stored in one or more computer-readable storage media. When the computer program is executed (e.g., by a processor), it performs the steps of the above-described embodiment of an artificial intelligence method for passenger flow analysis.
[0057] The aforementioned storage media capable of storing program code include: hard disk drives, solid-state drives, random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), optical storage devices, magnetic storage devices, flash memory, magnetic disks or optical disks, and / or combinations of the above devices, that is, they can be implemented by any type of volatile or non-volatile storage devices or combinations thereof.
[0058] Example 4: This embodiment provides a computer program product, including a computer program or instructions that, when executed by a processor, implement the steps of an artificial intelligence method for passenger flow analysis as described in Embodiment 1.
[0059] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the processes of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0060] The above description is merely a preferred embodiment of the present invention. Those skilled in the art will understand that various changes or equivalent substitutions can be made to these features and embodiments without departing from the spirit and scope of the present invention. Furthermore, under the teachings of the present invention, these features and embodiments can be modified to adapt to specific situations and materials without departing from the spirit and scope of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed herein, and all embodiments falling within the scope of the claims of this application are within the protection scope of the present invention.
Claims
1. An artificial intelligence method for passenger flow analysis, characterized in that, include: The human trajectories of multiple detected targets obtained by the multi-target tracking algorithm using target detection and Kalman filtering are transformed into a state sequence of trajectory points with positional uncertainty. The state sequence of each trajectory point at time t within the trajectory lifetime includes position coordinates, human body scale, and positional uncertainty value. For any two candidate body trajectories, calculate the time difference between their crossings and the effective time overlap interval of their trajectory lifecycles. Based on the time difference between their crossings and the effective time overlap interval, determine whether the corresponding detection targets of the two are likely to be traveling in the same direction. Align two possible candidate body trajectories that are in the same row to obtain a candidate body trajectory pair. Calculate the adaptive normalized distance of the candidate body trajectory pair at time t based on the position coordinates and human body scale of the candidate body trajectory pair. Based on the positional uncertainty value corresponding to the candidate body trajectory pair, calculate the confidence weight of the candidate body trajectory pair at time t, and determine whether the detection target corresponding to the candidate body trajectory pair is a peer-to-peer relationship based on the adaptive normalized distance and confidence weight. Traverse all candidate body trajectory pairs to obtain a Boolean matrix indicating whether each pair is in the same line. Treat the trajectory as a node and the line-in-line relationship as an edge. Aggregate the connected nodes into the final passenger flow group and output the total number of people in the group and the event timestamp. The event timestamp is the maximum value of the time when each group member crosses the line or the timestamp when the group first meets the line-in-line determination condition.
2. The artificial intelligence method for passenger flow analysis according to claim 1, characterized in that, The position coordinates are the coordinates of the corresponding trajectory point. The center coordinates or landing point coordinates after Kalman filtering at any given moment; The human body scale corresponds to the detection frame within. The diagonal length after Kalman filtering at any given moment; The position uncertainty value is based on the corresponding trajectory point in The diagonal elements of the covariance matrix extracted from the Kalman filter at each time step are determined.
3. The artificial intelligence method for passenger flow analysis according to claim 2, characterized in that, The position uncertainty value is based on the corresponding trajectory point in The diagonal elements of the covariance matrix extracted from the Kalman filter at each time step are determined, including: Extract the variances in the x and y directions from the diagonal elements of the covariance matrix. Summate the extracted x and y variances and take the square root to obtain the corresponding trajectory point. The uncertainty value of the position at any given time.
4. The artificial intelligence method for passenger flow analysis according to claim 1, characterized in that, The step of determining whether the corresponding detection targets of the two are likely to be in the same lane based on the crossing time difference and the effective time overlap interval includes: If the time difference between the two crossing the line is greater than the set threshold, then the possibility that the detection targets corresponding to the two are in the same row is excluded; otherwise, the detection targets corresponding to the two are in the same row. Alternatively, if the proportion of the effective time overlap interval between the two to the total duration of the shorter candidate body trajectory is less than a preset proportion, then the possibility that the detection targets corresponding to the two are in the same direction is excluded; otherwise, the detection targets corresponding to the two are in the same direction.
5. The artificial intelligence method for passenger flow analysis according to claim 1, characterized in that, The step of aligning two potentially corresponding candidate body trajectories that are in the same row includes: Using the timestamp of the candidate body trajectory with fewer sampling points among two potentially corresponding candidate body trajectories that coexist as a benchmark, the other trajectory is linearly interpolated at the same timestamp to obtain the candidate body trajectory pair.
6. The artificial intelligence method for passenger flow analysis according to claim 1, characterized in that, The step of calculating the adaptive normalized distance of the candidate body trajectory pair at time t based on the corresponding position coordinates and human body scale includes: The adaptive normalized distance of the candidate body trajectory pair at time t is calculated by using the mean of the corresponding human body scale at time t as the denominator and the Euclidean distance between the corresponding position coordinates of the candidate body trajectory pair as the numerator.
7. The artificial intelligence method for passenger flow analysis according to claim 1, characterized in that, The confidence weight of the candidate body trajectory at time t The formula is as follows: ; in, For one of the candidate body trajectory pairs The corresponding position uncertainty value at time t, For another human body trajectory selection The corresponding position uncertainty value at time t.
8. The artificial intelligence method for passenger flow analysis according to claim 1, characterized in that, The step of determining whether the candidate body trajectory pairs and their corresponding detection targets are in a peer-to-peer relationship based on the adaptive normalized distance and confidence weight includes: The adaptive normalized distances at each time point within the trajectory's lifecycle are sorted from largest to smallest, and the confidence weights corresponding to each time point are accumulated synchronously in the same order. When the accumulated confidence weights first reach the preset peak value of the total confidence weights, the adaptive normalized distance corresponding to the sorted position at this time is taken as the weighted median normalized distance. If the weighted median normalized distance is not greater than a set threshold, then the candidate body trajectory pair is determined to be a peer-to-peer relationship with the corresponding detection target.
9. An electronic device, characterized in that, include: At least one processor; At least one memory used to store processor-executable instructions; The at least one processor implements an artificial intelligence method for passenger flow analysis as described in any one of claims 1 to 8 by running the executable instructions.
10. A computer program product, characterized in that, It includes a computer program or instructions that, when executed by a processor, implement an artificial intelligence method for passenger flow analysis as described in any one of claims 1 to 8.