Trajectory data processing method, device and equipment

By processing pedestrian trajectories and adding points in the video stream, the accuracy problem of passenger flow data statistics in offline sales scenarios is solved, and the accuracy of identifying customers' in-store behavior and the comprehensiveness of passenger flow data are improved.

CN118470616BActive Publication Date: 2024-10-08ZHE JIANG SHEN XIANG ZHI NENG KE JI YOU XIAN GONG SI
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202410933671.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-12
Publication Date
2024-10-08
Estimated Expiration
2044-07-12

AI Technical Summary

Technical Problem

In offline sales scenarios, computer vision algorithms are not comprehensive and accurate in passenger flow data statistics due to complex actual scenarios and camera installation locations, and the recognition of customer entry behavior is not accurate enough.

Method used

By acquiring the video stream, pedestrian trajectories are collected, and pedestrian trajectories with target store entry events are distinguished from pedestrian trajectories without target store entry events, and point processing is performed to obtain target predicted trajectories, and finally the number of target store entry events is determined. , improve the accuracy of customer behavior recognition when entering the store.

Benefits of technology

It effectively avoids inaccurate recognition of customer entry behavior due to obstruction or camera installation position, and improves the comprehensiveness and accuracy of passenger flow data statistics.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118470616B_ABST
    Figure CN118470616B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a trajectory data processing method, device and equipment, the method comprising: obtaining a video stream, and collecting pedestrian trajectories corresponding to each pedestrian in the video stream; determining the pedestrian trajectory with a target store entry event as the first pedestrian trajectory, and determining the pedestrian trajectory without a target store entry event as the second pedestrian trajectory; the target store entry event is an event generated when the pedestrian trajectory enters the target area; performing point filling processing on the second pedestrian trajectory to obtain a target predicted trajectory corresponding to the second pedestrian trajectory; determining the number of target trajectories corresponding to the target store entry event according to the first number of the first pedestrian trajectory and the second number of target predicted trajectories with the target store entry event. In this way, it is possible to avoid the situation where the customer's store entry behavior is inaccurately identified due to occlusion or the camera is installed far away, which can improve the accuracy of customer store entry behavior identification and improve the comprehensiveness and accuracy of passenger flow data statistics.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a trajectory data processing method, device and equipment. Background Art

[0002] In offline sales scenarios, supermarkets or stores usually need to conduct statistical analysis on customer flow data in order to evaluate operational conditions and adjust sales strategies in a timely manner.

[0003] In related technologies, supermarkets or stores usually collect customer flow data based on computer vision algorithms. However, due to the complexity of actual offline scenarios, such as crowd obstruction and store decoration obstruction, and the long distance or inappropriate angle of camera installation, the recognition of customers' entry into the store is not accurate enough, resulting in low comprehensiveness and accuracy of customer flow data statistics. Summary of the invention

[0004] Multiple aspects of the present application provide a trajectory data processing method, device and equipment to improve the accuracy of customer entry behavior recognition in offline scenarios and improve the comprehensiveness and accuracy of customer flow data statistics.

[0005] In a first aspect, an embodiment of the present application provides a trajectory data processing method, including:

[0006] Obtaining a video stream, and collecting pedestrian trajectories corresponding to each pedestrian in the video stream;

[0007] Determine a pedestrian trajectory with a target store-entering event as a first pedestrian trajectory, and determine a pedestrian trajectory without the target store-entering event as a second pedestrian trajectory; the target store-entering event is an event generated when the pedestrian trajectory enters a target area;

[0008] Performing point filling processing on the second pedestrian trajectory to obtain a target predicted trajectory corresponding to the second pedestrian trajectory;

[0009] The number of target trajectories corresponding to the target store-entering event is determined according to a first number of the first pedestrian trajectories and a second number of target predicted trajectories having the target store-entering event.

[0010] In a possible implementation, collecting pedestrian trajectories corresponding to each pedestrian in the video stream includes:

[0011] For each image frame in the video stream, extracting human features and trajectory point information of each pedestrian in the image frame;

[0012] Perform tracking detection based on the human body features to determine the trajectory point information corresponding to the same pedestrian;

[0013] The pedestrian trajectory corresponding to the same pedestrian is determined according to the trajectory point information corresponding to the same pedestrian.

[0014] In a possible implementation, the method further includes:

[0015] Determining a target area in an image frame of the video stream;

[0016] Determining a target ground line corresponding to the target area in a target line segment of the target area;

[0017] If the pedestrian trajectory intersects the target ground line, it is determined that there is a target store entry event in the pedestrian trajectory;

[0018] If the pedestrian trajectory does not intersect the target ground line, it is determined that there is no target store entry event on the pedestrian trajectory.

[0019] In a possible implementation manner, determining a target ground line corresponding to the target area in a target line segment of the target area includes:

[0020] Get the historical pedestrian trajectories within a preset historical period;

[0021] Determine the historical traffic data corresponding to each target line segment according to the intersection of the historical pedestrian trajectory and the target line segment;

[0022] The target line segment whose historical flow data meets a preset condition is determined as the target ground line.

[0023] In a possible implementation, the method further includes:

[0024] For each of the pedestrian trajectories, if there is no trajectory point information located in the target area in the pedestrian trajectory, determining that the pedestrian trajectory does not intersect with the target ground line;

[0025] Determining target track point information in the pedestrian track that is located in the target area according to a positional relationship between the track point information and the target area;

[0026] If the dwell time corresponding to the target trajectory point information is greater than a preset time threshold, it is determined that the pedestrian trajectory intersects with the target ground line;

[0027] If the dwell time corresponding to the target trajectory point information is less than or equal to a preset time threshold, it is determined that the pedestrian trajectory does not intersect with the target ground line.

[0028] In a possible implementation manner, performing point-adding processing on the second pedestrian trajectory to obtain a target predicted trajectory corresponding to the second pedestrian trajectory includes:

[0029] Determine foot point orientation information of each track point information in the second pedestrian track;

[0030] Determine abnormal track point information in the second pedestrian track according to the foot point orientation information, and delete the abnormal track point information in the second pedestrian track to obtain an intermediate pedestrian track;

[0031] Determine a reference slope, a reference moving speed, and a reference foot point orientation corresponding to the intermediate pedestrian trajectory;

[0032] The intermediate pedestrian trajectory is supplemented according to the reference slope, the reference moving speed, and the reference foot point orientation to obtain the target predicted trajectory.

[0033] In a possible implementation, the method further includes:

[0034] Determining predicted trajectory point information in the target predicted trajectory and predicted foot point orientation of the predicted trajectory point information;

[0035] If the difference between the predicted foot point orientation and the foot point orientation information of the adjacent trajectory point information is greater than a preset angle threshold, the target predicted trajectory is deleted.

[0036] In a possible implementation, the method further includes:

[0037] Recording the trajectory identifier of the pedestrian trajectory and the target recognition result corresponding to the pedestrian trajectory; the target recognition result includes the existence of a target store entry event or the absence of a target store entry event;

[0038] If the trajectory identifier of the obtained pedestrian trajectory already has a corresponding target recognition result, the processing of the obtained pedestrian trajectory is stopped.

[0039] In a second aspect, an embodiment of the present application provides a trajectory data processing device, including:

[0040] A collection module, used to obtain a video stream and collect pedestrian trajectories corresponding to each pedestrian in the video stream;

[0041] a first determination module, configured to determine a pedestrian trajectory with a target store-entering event as a first pedestrian trajectory, and to determine a pedestrian trajectory without the target store-entering event as a second pedestrian trajectory; the target store-entering event is an event generated when the pedestrian trajectory enters a target area;

[0042] A point filling module, used for performing point filling processing on the second pedestrian trajectory to obtain a target predicted trajectory corresponding to the second pedestrian trajectory;

[0043] The second determination module is used to determine the number of target trajectories corresponding to the target store-entering event according to the first number of the first pedestrian trajectories and the second number of target predicted trajectories having the target store-entering event.

[0044] In a possible implementation manner, the acquisition module is specifically used to:

[0045] For each image frame in the video stream, extracting human features and trajectory point information of each pedestrian in the image frame;

[0046] Perform tracking detection based on the human body features to determine the trajectory point information corresponding to the same pedestrian;

[0047] The pedestrian trajectory corresponding to the same pedestrian is determined according to the trajectory point information corresponding to the same pedestrian.

[0048] In a possible implementation manner, the device is further used for:

[0049] Determining a target area in an image frame of the video stream;

[0050] Determining a target ground line corresponding to the target area in a target line segment of the target area;

[0051] If the pedestrian trajectory intersects the target ground line, it is determined that there is a target store entry event in the pedestrian trajectory;

[0052] If the pedestrian trajectory does not intersect the target ground line, it is determined that there is no target store entry event on the pedestrian trajectory.

[0053] In a possible implementation manner, the device is further used for:

[0054] Get the historical pedestrian trajectories within a preset historical period;

[0055] Determine the historical traffic data corresponding to each target line segment according to the intersection of the historical pedestrian trajectory and the target line segment;

[0056] The target line segment whose historical flow data meets a preset condition is determined as the target ground line.

[0057] In a possible implementation manner, the device is further used for:

[0058] For each of the pedestrian trajectories, if there is no trajectory point information located in the target area in the pedestrian trajectory, determining that the pedestrian trajectory does not intersect with the target ground line;

[0059] Determining target track point information in the pedestrian track that is located in the target area according to a positional relationship between the track point information and the target area;

[0060] If the dwell time corresponding to the target trajectory point information is greater than a preset time threshold, it is determined that the pedestrian trajectory intersects with the target ground line;

[0061] If the dwell time corresponding to the target trajectory point information is less than or equal to a preset time threshold, it is determined that the pedestrian trajectory does not intersect with the target ground line.

[0062] In a possible implementation manner, the point filling module is specifically used to:

[0063] Determine foot point orientation information of each track point information in the second pedestrian track;

[0064] Determine abnormal track point information in the second pedestrian track according to the foot point orientation information, and delete the abnormal track point information in the second pedestrian track to obtain an intermediate pedestrian track;

[0065] Determine a reference slope, a reference moving speed, and a reference foot point orientation corresponding to the intermediate pedestrian trajectory;

[0066] The intermediate pedestrian trajectory is supplemented according to the reference slope, the reference moving speed, and the reference foot point orientation to obtain the target predicted trajectory.

[0067] In a possible implementation manner, the device is further used for:

[0068] Determining predicted trajectory point information in the target predicted trajectory and predicted foot point orientation of the predicted trajectory point information;

[0069] If the difference between the predicted foot point orientation and the foot point orientation information of the adjacent trajectory point information is greater than a preset angle threshold, the target predicted trajectory is deleted.

[0070] In a possible implementation manner, the device is further used for:

[0071] Recording the trajectory identifier of the pedestrian trajectory and the target recognition result corresponding to the pedestrian trajectory; the target recognition result includes the existence of a target store entry event or the absence of a target store entry event;

[0072] If the trajectory identifier of the obtained pedestrian trajectory already has a corresponding target recognition result, the processing of the obtained pedestrian trajectory is stopped.

[0073] In a third aspect, an embodiment of the present application provides an electronic device, including: a memory and a processor;

[0074] The memory stores computer-executable instructions;

[0075] The processor executes the computer-executable instructions stored in the memory, so that the processor executes the trajectory data processing method described in any one of the first aspects.

[0076] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the trajectory data processing method described in any one of the first aspects.

[0077] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the trajectory data processing method shown in any one of the first aspects.

[0078] In an embodiment of the present application, a video stream is obtained, and pedestrian trajectories corresponding to each pedestrian in the video stream are collected; the pedestrian trajectory with a target store entry event is determined as a first pedestrian trajectory, and the pedestrian trajectory without a target store entry event is determined as a second pedestrian trajectory; the target store entry event is an event generated when the pedestrian trajectory enters the target area; the second pedestrian trajectory is supplemented with points to obtain a target predicted trajectory corresponding to the second pedestrian trajectory; according to the first number of the first pedestrian trajectory and the second number of target predicted trajectories with target store entry events, the number of target trajectories corresponding to the target store entry events is determined. In the present application, the electronic device determines the pedestrian trajectory with a target store entry event as the first pedestrian trajectory, and determines the pedestrian trajectory without a target store entry event as the second pedestrian trajectory, and then supplements the second pedestrian trajectory to obtain a target predicted trajectory, and further determines whether the target predicted trajectory has a target store entry event, which can avoid the inaccurate recognition of customer store entry behavior due to occlusion or the camera installation position is far away, can improve the accuracy of customer store entry behavior recognition, and improve the comprehensiveness and accuracy of passenger flow data statistics. BRIEF DESCRIPTION OF THE DRAWINGS

[0079] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0080] Figure 1 A schematic diagram of an application scenario provided for an exemplary embodiment of the present application;

[0081] Figure 2 A schematic flow chart of a trajectory data processing method provided for an exemplary embodiment of the present application;

[0082] Figure 3 A flowchart of another trajectory data processing method provided for an exemplary embodiment of the present application;

[0083] Figure 4 A schematic diagram of collecting pedestrian trajectories provided for an exemplary embodiment of the present application;

[0084] Figure 5 A schematic diagram of a ray intersection method for judging an exemplary embodiment of the present application;

[0085] Figure 6 A schematic diagram of an event in which a target enters a store in a pedestrian trajectory provided by an exemplary embodiment of the present application;

[0086] Figure 7 A schematic diagram of performing point-filling processing on a second pedestrian trajectory provided by an exemplary embodiment of the present application;

[0087] Figure 8 A logical schematic diagram of a second pedestrian trajectory prediction process provided for an exemplary embodiment of the present application;

[0088] Fig. 9 A schematic diagram of a system architecture for trajectory data processing provided for an exemplary embodiment of the present application;

[0089] Fig.10 A logical schematic diagram of trajectory data processing provided for an exemplary embodiment of the present application;

[0090] Fig.11 A schematic diagram of the structure of a trajectory data processing device provided for an exemplary embodiment of the present application;

[0091] Fig.12 A schematic structural diagram of an electronic device provided for an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0092] In order to make the purpose, technical solutions and advantages of the present application clearer, the technical solutions of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of them. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application. It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0093] With the continuous development of computer technology and Internet technology, offline retail scenarios are gradually moving towards digital operations. Store (or supermarket, store, etc.) customer flow, as an important customer flow data indicator, can actually reflect the store’s sales situation to a certain extent and can be used as auxiliary information for adjusting operational strategies.

[0094] In related technologies, supermarkets or stores in offline retail scenarios usually use algorithms or models such as computer vision to identify customers' store entry behavior in order to achieve customer flow data statistics. However, due to the complexity of actual offline scenarios, such as occlusion caused by dense crowds or occlusion caused by decorations outside the store, and the camera is installed too far away or the shooting angle is not suitable, the computer vision algorithm cannot accurately identify the customer's store entry behavior, or the trajectory disappears or breaks, resulting in customers entering the store but no store entry event is identified and generated, making the comprehensiveness and accuracy of customer flow data statistics low.

[0095] In order to solve the above problems, the present application provides a trajectory data processing method, device and equipment, wherein the electronic device obtains a video stream and collects the pedestrian trajectories of each pedestrian in the video stream; then the pedestrian trajectory with a target store entry event is determined as the first pedestrian trajectory, and the pedestrian trajectory without a target store entry event is determined as the second pedestrian trajectory; then the second pedestrian trajectory is processed to obtain a target predicted trajectory, and further determine whether the target predicted trajectory has a target store entry event. Finally, the electronic device can determine the number of target trajectories corresponding to the target store entry event based on the first number of the first pedestrian trajectory and the second number of the target predicted trajectory with the target store entry event. In this way, the electronic device can avoid the inaccurate recognition of the customer's store entry behavior due to occlusion or the camera installation position being far away, can improve the accuracy of the customer's store entry behavior recognition, and improve the comprehensiveness and accuracy of the passenger flow data statistics.

[0096] Figure 1 A schematic diagram of an application scenario provided by an exemplary embodiment of the present application. Figure 1 As shown, in the related art, stores or supermarkets usually identify customers' entry behavior based on computer vision algorithms. Since the actual offline scenes are relatively complex, such as crowd obstruction or store obstruction, and the camera is installed far away or the shooting angle is not suitable, the recognition of customers' entry behavior is not accurate enough, and the accuracy and comprehensiveness of customer flow data statistics are not high.

[0097] In the embodiment of the present application, the electronic device collects the pedestrian trajectory of each pedestrian in the video stream, and identifies the customer's store entry behavior, determines the pedestrian trajectory with the target store entry event as the first pedestrian trajectory, and determines the pedestrian trajectory without the target store entry event as the second pedestrian trajectory, and then fills in the second pedestrian trajectory to obtain the target predicted trajectory, and then further determines whether there is a target store entry event in the target predicted trajectory. Finally, the electronic device can determine the number of target trajectories corresponding to the target store entry event based on the first number of the first pedestrian trajectories and the second number of the target predicted trajectories with the target store entry event, so as to achieve comprehensive and accurate statistics of customer flow data.

[0098] The technical solution shown in the present application is described in detail below through specific embodiments. It should be noted that the following embodiments can exist independently or in combination with each other, and the same or similar contents will not be described repeatedly in different embodiments.

[0099] Figure 2 A flow chart of a trajectory data processing method provided by an exemplary embodiment of the present application. Figure 2 , the trajectory data processing method may include:

[0100] S201: Obtain a video stream, and collect pedestrian trajectories corresponding to each pedestrian in the video stream.

[0101] The execution subject of the embodiment of the present application may be an electronic device, or a trajectory data processing device provided in the electronic device. The trajectory data processing device may be implemented by software, or by a combination of software and hardware. For ease of understanding, the following description is made by taking the execution subject as an electronic device as an example, and the electronic device may specifically refer to a computer, a server, a cloud, a mobile phone, or a wearable device, etc. The embodiment of the present application does not limit the specific type of the electronic device.

[0102] In the embodiment of the present application, the video stream may refer to a video stream collected and uploaded by a shooting device. The shooting device may be connected to an electronic device for communication, and may specifically refer to a camera or an Internet Protocol Camera (IPC), etc. The video stream may refer to a surveillance video stream within a preset period, and the preset period may refer to one day, three days, or seven days, etc. A pedestrian may refer to a customer (or consumer, user, etc.) that appears in a video stream. A pedestrian trajectory may refer to a moving trajectory corresponding to each pedestrian, and the pedestrian trajectory may refer to a path formed by a series of foot points. A foot point specifically refers to a footprint point or a step point projected and mapped by a robot or a human on the ground. The foot point may also be referred to as trajectory point information, and the trajectory point information may specifically include information such as the coordinates of the pedestrian's foot point and the foot point time.

[0103] Specifically, when the electronic device needs to conduct customer flow data statistics, it can first obtain the video stream uploaded by the shooting device, and then detect and identify the video stream. Specifically, it can collect the pedestrian trajectory corresponding to each pedestrian in the video stream through human detection algorithm, human tracking algorithm and trajectory detection algorithm, and then determine whether the pedestrian has entered the store based on the pedestrian trajectory.

[0104] S202: Determine a pedestrian trajectory with a target store-entering event as a first pedestrian trajectory, and determine a pedestrian trajectory without a target store-entering event as a second pedestrian trajectory; the target store-entering event is an event generated when the pedestrian trajectory enters a target area.

[0105] In an embodiment of the present application, a target store entry event may refer to an event generated when a pedestrian enters a store, and the target store entry event may specifically include information such as the time point of entering the store or the time point of leaving the store. In actual offline scenarios, stores can be calibrated by target areas in image frames of video streams. For example, supermarkets or store staff can calibrate target areas by at least one line segment, and the target area can also be called a fence. When the pedestrian trajectory of a pedestrian enters the target area, the electronic device can generate a target store entry event corresponding to the pedestrian trajectory. The first pedestrian trajectory may refer to a pedestrian trajectory where the electronic device can determine that a target store entry event exists. The second pedestrian trajectory may refer to a pedestrian trajectory where the electronic device preliminarily determines that there is no target store entry event.

[0106] In this step, for each collected pedestrian trajectory of each pedestrian, the electronic device can first determine whether each pedestrian trajectory has a target store entry event, which can be determined specifically by whether the pedestrian trajectory enters the target area. In a possible implementation, the electronic device can determine the target ground line corresponding to the target area, and determine whether the pedestrian trajectory has a target store entry event based on the intersection between the pedestrian trajectory and the target ground line. Afterwards, the electronic device can determine the pedestrian trajectory with the target store entry event as the first pedestrian trajectory, and determine the pedestrian trajectory without the target store entry event as the second pedestrian trajectory. Due to the interference factors such as human occlusion, decoration occlusion, and inappropriate camera installation distance and shooting angle in the actual offline scene, the pedestrian trajectory may be broken or disappear. At this time, the electronic device may not be able to identify the target store entry event corresponding to the pedestrian trajectory. The electronic device can subsequently perform secondary recognition and judgment on the second pedestrian trajectory without the target store entry event by means of point filling processing, etc., which can improve the comprehensiveness and accuracy of passenger flow data statistics.

[0107] S203: Perform point-adding processing on the second pedestrian trajectory to obtain a target predicted trajectory corresponding to the second pedestrian trajectory.

[0108] In the embodiment of the present application, the target predicted trajectory may refer to the pedestrian trajectory obtained after the second pedestrian trajectory is supplemented with points. After determining the second pedestrian trajectory, the electronic device may supplement the second pedestrian trajectory according to the foot point orientation, movement speed, and trajectory slope of each track point information in the second pedestrian trajectory, and obtain a complete trajectory corresponding to the second pedestrian trajectory, which is the target predicted trajectory. Subsequently, it may be determined whether the target predicted trajectory enters the target area and whether there is a target store entry event in the target predicted trajectory.

[0109] S204: Determine the number of target trajectories corresponding to the target store-entering events according to the first number of first pedestrian trajectories and the second number of target predicted trajectories having target store-entering events.

[0110] In the embodiment of the present application, the first number may refer to the number of trajectories corresponding to the first pedestrian trajectory. The second number may refer to the number of trajectories of the target predicted trajectory with the target store entry event. The number of target trajectories may refer to the number of trajectories of all pedestrian trajectories with the target store entry event in the video stream, that is, the number of people entering the store in the video stream.

[0111] In this step, after determining the target predicted trajectory corresponding to the second pedestrian trajectory, the electronic device can further determine whether there is a target store entry event in the target predicted trajectory. Thereafter, the electronic device can determine the number of target trajectories corresponding to the target store entry event based on the first number of the first pedestrian trajectories and the second number of target predicted trajectories with target store entry events. In this way, the electronic device obtains the target predicted trajectory by completing the trajectory of the second pedestrian trajectory without the target store entry event, and again determines whether there is a target store entry event in the target predicted trajectory, and finally determines the number of target trajectories based on the first number of the first pedestrian trajectory and the second number of target predicted trajectories with the target store entry event, which can avoid the inaccurate recognition of the customer's store entry behavior caused by the breakage or disappearance of the pedestrian trajectory, and improves the comprehensiveness and accuracy of passenger flow data statistics.

[0112] In an embodiment of the present application, an electronic device obtains a video stream and collects pedestrian trajectories corresponding to each pedestrian in the video stream; determines the pedestrian trajectory with a target store entry event as a first pedestrian trajectory, and determines the pedestrian trajectory without a target store entry event as a second pedestrian trajectory; the target store entry event is an event generated when the pedestrian trajectory enters a target area; performs point-filling processing on the second pedestrian trajectory to obtain a target predicted trajectory corresponding to the second pedestrian trajectory; determines the number of target trajectories corresponding to the target store entry event according to the first number of the first pedestrian trajectory and the second number of target predicted trajectories with a target store entry event. In the present application, the electronic device determines the pedestrian trajectory with a target store entry event as a first pedestrian trajectory, determines the pedestrian trajectory without a target store entry event as a second pedestrian trajectory, and then performs point-filling processing on the second pedestrian trajectory to obtain a target predicted trajectory, and further determines whether the target predicted trajectory has a target store entry event, which can avoid the inaccurate recognition of customer store entry behavior due to occlusion or a distant camera installation position, can improve the accuracy of customer store entry behavior recognition, and improve the comprehensiveness and accuracy of passenger flow data statistics.

[0113] Based on the above embodiments, Figure 3 A flowchart of another trajectory data processing method provided by an exemplary embodiment of the present application. Figure 3 , the trajectory data processing method may include:

[0114] S301, obtaining a video stream, and extracting the human body features and trajectory point information of each pedestrian in each image frame in the video stream.

[0115] S302, performing tracking detection based on human body features to determine the trajectory point information corresponding to the same pedestrian; and determining the pedestrian trajectory corresponding to the same pedestrian based on the trajectory point information corresponding to the same pedestrian.

[0116] In the embodiment of the present application, human features may refer to the human features of each pedestrian in the image frame of the video stream, which may include the pedestrian's body shape, clothing, accessories (such as backpacks, jewelry, etc.), human posture, and facial features, etc., and may also include other types of features, which are not limited in the embodiment of the present application. Track point information may refer to the foot point information of each pedestrian in the image frame, which may include foot point coordinates, foot point time, and other information.

[0117] In this step, the electronic device obtains the video stream uploaded by the camera and can extract the human features and trajectory point information of each pedestrian from each image frame of the video stream. Then, pedestrian merging processing can be performed. Specifically, human feature merging processing can be performed based on algorithms such as pedestrian re-identification (REID). Tracking and detection are performed based on the human features to determine the trajectory point information of the same pedestrian. Then, based on the trajectory point information corresponding to the same pedestrian, the pedestrian trajectory of the same pedestrian is determined, thereby achieving comprehensive and accurate collection of pedestrian trajectories.

[0118] For example, Figure 4 A schematic diagram of collecting pedestrian trajectories provided by an exemplary embodiment of the present application. Figure 4 As shown, the electronic device obtains the video stream collected by the shooting device (such as a camera, etc.) and analyzes the video stream frame by frame. The electronic device can first extract the human features and trajectory point information of each pedestrian in the image frame based on the human detection model (or algorithm); then, based on the human features and tracking algorithm, the same pedestrian is continuously tracked to obtain the trajectory point information of the same pedestrian, and then the pedestrian trajectory of the same pedestrian can be determined based on the trajectory point information. Of course, the electronic device performs a quality score detection on the human features of each pedestrian during the human feature detection process. If the quality score is less than the preset score threshold, it means that the credibility of the human feature is not high, and the human feature can be discarded (or deleted), which can improve the accuracy of pedestrian trajectory determination. In addition, in the process of tracking and detecting the same pedestrian based on human features, the electronic device can also identify and judge the pedestrian's store entry behavior. If there is a store entry behavior, a target store entry event can be generated and reported accordingly.

[0119] S303, determining a target area in an image frame of a video stream; and determining a target ground line corresponding to the target area in a target line segment of the target area.

[0120] In the embodiment of the present application, the target ground line may refer to the target line segment crossed by pedestrians in the target area when they enter the store from the store entrance. In the offline sales scenario, pedestrians enter the store from the store entrance, and the target line segment corresponding to the pedestrian's crossing line behavior when entering the store is the target ground line. Specifically, the electronic device can respond to the configuration operation of the operation and maintenance personnel (store staff) to mark the target area corresponding to the store in the video stream. Specifically, the configuration data can be marked in the image frame of the video stream, and at least one target line segment can be configured to correspond to the target area. It should be noted that the operation and maintenance personnel can directly mark multiple target line segments through the configuration operation to enclose the target area, or at least one target line segment can be marked. The electronic device automatically performs calibration and completion based on the at least one target line segment and the store object detected in the video stream to obtain the target area corresponding to the target store. Since there are multiple target line segments in the enclosed target area, the electronic device can determine the target ground line corresponding to the target area in the multiple target line segments to ensure the rationality and accuracy of the subsequent pedestrian trajectory to determine whether there is a target store entry event.

[0121] In a possible implementation manner, the target ground line in step S303 may be determined in the following manner:

[0122] Obtain historical pedestrian trajectories within a preset historical period; determine the historical traffic data corresponding to each target segment based on the intersection of the historical pedestrian trajectory and the target segment; and determine the target segment whose historical traffic data meets the preset conditions as the target ground line.

[0123] In the embodiments of the present application, the preset historical period may refer to a preset historical cycle, specifically a historical period such as one day, three days or seven days. The historical pedestrian trajectory may refer to the pedestrian trajectory of each pedestrian within the preset historical period. The historical traffic data may refer to the pedestrian flow or the number of pedestrians intersecting the target segment. The preset condition may refer to the preset judgment condition of the target ground line. Exemplarily, the preset condition may specifically be that the historical traffic data of the target segment is ranked in the top N places (N is a positive integer), or that the proportion of the historical traffic data of the target segment is greater than a preset ratio threshold (for example, 80%, 90% or 95%, etc.), and of course, it may also be other conditions, which are not limited in the embodiments of the present application.

[0124] Specifically, the electronic device obtains the historical pedestrian trajectory within a preset historical period, and then can determine the historical flow data corresponding to each target line segment according to the intersection of the historical pedestrian trajectory and each target line segment in the target area. Afterwards, the electronic device can determine the target line segment whose historical flow data meets the preset conditions as the target ground line, for example, the target line segment with the largest historical flow data can be determined as the target ground line, etc., to achieve accurate judgment of the target ground line and ensure the accuracy of the subsequent determination of the target store entry event.

[0125] S304: If the pedestrian trajectory intersects with the target ground line, it is determined that the pedestrian trajectory has a target store entry event; if the pedestrian trajectory does not intersect with the target ground line, it is determined that the pedestrian trajectory does not have a target store entry event.

[0126] In the embodiment of the present application, after determining the target ground line, the electronic device can determine whether the pedestrian trajectory passes through the target ground line and whether the pedestrian trajectory intersects with the target ground line through cross-line calculation. If the pedestrian trajectory intersects with the target ground line, the electronic device can determine that there is a target store entry event on the pedestrian trajectory; if the pedestrian trajectory does not intersect with the target ground line, the electronic device can determine that there is no target store entry event on the pedestrian trajectory. In this way, the electronic device can accurately identify and detect the target store entry event by judging the intersection of the pedestrian trajectory and the target ground line, thereby improving the accuracy of identifying the customer's store entry behavior.

[0127] In a possible implementation manner, whether the pedestrian trajectory intersects with the target ground line in step S304 can be specifically implemented through the following steps (1) to (4):

[0128] (1) For each pedestrian trajectory, if there is no trajectory point information located in the target area in the pedestrian trajectory, it is determined that the pedestrian trajectory does not intersect with the target ground line.

[0129] In the embodiment of the present application, the pedestrian trajectory includes multiple trajectory point information. If the multiple trajectory point information is not within the target area, the electronic device can determine that the pedestrian trajectory has not entered the target area, that is, the pedestrian trajectory does not intersect the target ground line. In this step, the electronic device can determine whether each trajectory point information in the pedestrian trajectory is within the target area through algorithms such as ray intersection. The ray intersection method can also be called a border detection algorithm of a point on a line segment or an odd-even rule algorithm (Odd-Even Rule).

[0130] For example, the electronic device can first traverse the target line segment composed of any two consecutive calibration points in the target area. The calibration points included in the target area can be stored in the form of a calibration point list. The two endpoints in the line segment can be identified by calibration point i and calibration point j respectively. By traversing the values ​​​​i and j, the electronic device can realize the traversal of each line segment in the target area. Afterwards, for each line segment (pointi, pointj) and each track point information P to be judged in the pedestrian trajectory, the electronic device can first check whether the ordinates of the two endpoints of the line segment and the ordinate of point P meet the interlaced condition. Specifically, it can be judged in the following way:

[0131] (pointi.getY()>y)!= (pointj.getY()>y)

[0132] According to the above formula, y refers to the ordinate of the trajectory point information P to be judged. The ordinates of the two endpoints of the line segment need to be greater than the ordinate y of point P, and one needs to be less than the ordinate y of point P. For example, the ordinate of point i of the line segment can be greater than y and the ordinate of point j of the line segment can be less than y, or the ordinate of point j of the line segment can be less than y and the ordinate of point j of the line segment can be greater than y. In this way, the ordinates of the two endpoints of the line segment overlap with the ordinate of point P and are located on one side of the line segment. At this time, the trajectory point information P is below one endpoint of the line segment and above the other endpoint of the line segment.

[0133] After determining that the track point information P overlaps with the vertical coordinate of the line segment, the electronic device can further calculate the vertical distance (x-axis projection) from the track point information P to the line segment (pointi, pointj). Exemplarily, the electronic device can make the judgment in the following manner:

[0134] x<(pointj.getX()-pointi.getX())*(y-pointi.getY()) / (pointj.getY()-pointi.getY())+pointi.getX()

[0135] Among them, the part to the right of “<” in the above formula represents the horizontal coordinate of the intersection point of the ray and the line segment, and x represents the horizontal coordinate of the trajectory point information P. If the trajectory point information meets the above conditions, the electronic device can determine that point P is located on the left side of the line segment, and the ray emitted from the trajectory point information P intersects with the line segment.

[0136] If the track point information P meets the above two conditions, that is, there is an intersection (or overlap) between the ordinate of the track point information P and the ordinate of the line segment and the ray emitted from the track point P intersects the line segment, the electronic device can invert the Boolean variable c, that is, record c=!c, to record the number of ray intersections. After that, the electronic device can traverse the next target line segment. After all target line segments have been traversed, if the value of the Boolean variable c has changed an odd number of times, the track point information is located in the target area surrounded by the line segment. If the number of changes in the Boolean variable c is an even number, then point P is outside the target area.

[0137] For example, Figure 5 A schematic diagram of a ray intersection method for judging an exemplary embodiment of the present application is shown in FIG. Figure 5 As shown, the electronic device can send a ray from the trajectory point information P to be determined in any direction (usually along the negative direction of the y axis), and calculate the number of intersections between the ray and each side of the target area. Specifically, it can be the actual intersection point, or it can be indirectly determined by comparing the slope and the y coordinate. If the number of intersection points is an odd number ( Figure 5right part), the trajectory point information P is located in the target area; if the number of intersections is an even number ( Figure 5 left part), the trajectory point information P is outside the target area.

[0138] It should be noted that other judgment methods may be used to determine whether the trajectory point information is located within the target area, which may be flexibly set based on actual needs, and the embodiments of the present application do not limit this.

[0139] (2) According to the positional relationship between the trajectory point information and the target area, the target trajectory point information in the pedestrian trajectory that is located in the target area is determined.

[0140] In the embodiment of the present application, the target trajectory point information may refer to the trajectory point information located in the target area. Specifically, the electronic device may determine the target trajectory point information located in the target area based on the positional relationship between the trajectory point information and the target area. For example, the electronic device may determine whether the trajectory point information is located in the target area through a ray crossing algorithm for each trajectory point information in the pedestrian trajectory, and further determine the target trajectory point information located in the target area in the pedestrian trajectory.

[0141] (3) If the dwell time corresponding to the target trajectory point information is greater than the preset time threshold, it is determined that the pedestrian trajectory intersects with the target ground line.

[0142] (4) If the dwell time corresponding to the target trajectory point information is less than or equal to the preset time threshold, it is determined that the pedestrian trajectory does not intersect with the target ground line.

[0143] In the embodiment of the present application, the dwell time may refer to the dwell time of the pedestrian trajectory in the target area. The preset time threshold may refer to a preset critical value of the dwell time, and the preset time threshold may specifically be 1 second, 3 seconds or 5 seconds, etc., which is not limited in the embodiment of the present application. In the actual offline retail scene, there may be a situation where customers linger at the entrance of the store but do not actually enter the store. In order to ensure the accuracy of the recognition of the customer's store entry behavior, in addition to determining that the trajectory point information is within the target area corresponding to the store, the electronic device also needs to identify and judge the customer's store entry behavior in combination with the customer's dwell time in the store.

[0144] Specifically, after determining the target trajectory point information in the pedestrian trajectory, the electronic device can determine the customer's stay time in the target area based on the target trajectory point information. Specifically, it can determine the entry time corresponding to the first target trajectory point information in the pedestrian trajectory entering the target area, and at the same time determine the departure time corresponding to the last target trajectory point information when the pedestrian trajectory leaves the target area, and determine the stay time corresponding to the pedestrian trajectory based on the difference between the departure time and the entry time.

[0145] It should be noted that the first target trajectory point information may refer to the first trajectory point information in the pedestrian trajectory that is located in the target area and meets the preset distance condition. The preset distance condition may refer to the first distance between the target trajectory point information and the target ground line being greater than the preset distance threshold, wherein the distance between the target trajectory point information and the target ground line may refer to the vertical distance or projection distance from the target trajectory point information to the target ground line, and the preset distance threshold may refer to a preset distance critical value, such as 30 pixels, etc. That is, in this step, the electronic device may determine the first target trajectory point information whose distance from the target ground line is greater than the preset distance threshold as the first target trajectory point information of the pedestrian trajectory for the target trajectory point information located in the target area. In this way, based on the distance judgment, it is possible to avoid the situation where the customer wanders around the store entrance but does not enter the store, and the accuracy of the customer entry event recognition can be improved.

[0146] For example, Figure 6 A schematic diagram of an event in which a pedestrian trajectory contains a target entering a store is provided as an exemplary embodiment of the present application. Figure 6 As shown, the target area 601 corresponding to the store in the offline scene includes a target ground line 602, the pedestrian trajectory 603 contains target trajectory point information located in the target area 601, and the residence time of the pedestrian trajectory 603 in the target area 601 is greater than the preset time threshold. At this time, the electronic device can determine that the pedestrian trajectory 603 intersects with the target ground line 602, that is, there is a target store entry event in the pedestrian trajectory 603.

[0147] Exemplarily, Table 1 is a schematic table of a track point information status judgment provided by an exemplary embodiment of the present application, which is as follows:

[0148] Table 1

[0149]

[0150] As shown in Table 1, for each track point information in the pedestrian trajectory, the electronic device can determine whether the track point information is located in the target area according to the order of the footsteps. If it is located in the target area, the value of the "track point information is located in the target area" field is 1, and if it is not located in the target area, the value of the "track point information is located in the target area" field is 0. The electronic device can determine the first target track point information entering the target area based on the distance judgment, and can set the corresponding "status" field to "enter the target area", and the "status" field corresponding to the track point information after the first target track point information and still in the target area is "enter the target area and stay", and the "status" field corresponding to the track point information that leaves the target area first from the target area is "stay until leaving the target area", and the "status" field corresponding to the track point information after the first track point information leaving the target area is "leave". In addition, the electronic device can determine the track point information that triggers the generation of the target store entry event and the target store exit event according to the status and location information of the track point information in the pedestrian trajectory entering the target area and leaving the target area. It should be noted that the electronic device may also use other methods to determine whether the pedestrian trajectory intersects with the target ground line, such as through cross-line calculation, etc., which can be flexibly selected based on actual needs, and the embodiments of the present application are not limited to this.

[0151] S305, determining foot direction information of each track point information in the second pedestrian track; determining abnormal track point information in the second pedestrian track according to the foot direction information, and deleting the abnormal track point information in the second pedestrian track to obtain an intermediate pedestrian track.

[0152] In the embodiment of the present application, the foot point orientation information may refer to the foot point orientation corresponding to the pedestrian trajectory point information, for example, it may refer to the angle between the foot point direction and a fixed direction (for example, the north direction). Abnormal trajectory point information may refer to the trajectory point information with sharpening in the pedestrian trajectory. The intermediate pedestrian trajectory may refer to the pedestrian trajectory obtained after smoothing the second pedestrian trajectory.

[0153] In this step, in the process of collecting pedestrian trajectories, the electronic device may include sharpened trajectory point information in the second pedestrian trajectory due to occlusion and recognition errors of the recognition algorithm itself. The electronic device can first determine the foot point orientation information corresponding to each trajectory point information for each trajectory point information in the pedestrian trajectory, and then determine whether the current trajectory point information is abnormal based on the angle between the foot point orientation information of the current trajectory point information and the foot point orientation information of the previous trajectory point information adjacent to it. Specifically, since the foot point orientation will not change significantly during normal walking, if the angle is greater than a preset angle threshold (such as 90 degrees), the electronic device can determine that the current trajectory point information is abnormal trajectory point information, and can directly delete the current trajectory point; if the angle is less than or equal to the preset angle threshold, the electronic device can determine that the current trajectory point information is not abnormal trajectory point information, and no deletion processing is required. In this way, the electronic device can traverse each trajectory point information in the second pedestrian trajectory, identify and delete the abnormal trajectory point information therein, and finally obtain a smoother intermediate pedestrian trajectory, which can improve the accuracy and rationality of subsequent point filling processing.

[0154] S306, determining a reference slope, a reference moving speed, and a reference foot point orientation corresponding to the middle pedestrian trajectory; performing point filling processing on the middle pedestrian trajectory according to the reference slope, the reference moving speed, and the reference foot point orientation to obtain a target predicted trajectory.

[0155] In the embodiment of the present application, the reference slope may refer to the slope of the middle pedestrian trajectory within M seconds (M is a positive integer) adjacent to the endpoint to be completed, and of course it may refer to the slope corresponding to the middle pedestrian trajectory as a whole. The reference slope may be obtained by coordinate calculation based on the trajectory point information included in the middle pedestrian trajectory. The reference moving rate may refer to the average moving rate of the middle pedestrian trajectory within M seconds adjacent to the endpoint to be completed, and of course it may refer to the average moving rate corresponding to the middle pedestrian trajectory, which is not limited in the embodiment of the present application. The reference foot point orientation may refer to the average foot point orientation of each trajectory point information of the middle pedestrian trajectory within M seconds adjacent to the endpoint to be completed, and of course it may refer to the average foot point orientation corresponding to all trajectory point information of the middle pedestrian trajectory. In addition, the reference slope, reference moving rate and reference foot point orientation may also be determined in other ways, for example, they may be calculated based on the trajectory point information of X points connected to the endpoint to be completed, and X may be a positive integer such as 3, 5, 10, which is not limited in the embodiment of the present application.

[0156] Specifically, after the electronic device deletes the abnormal trajectory point information included in the second pedestrian trajectory to obtain the intermediate pedestrian trajectory, it can be based on the reference slope of the intermediate pedestrian trajectory, combined with the reference moving rate and reference foot point orientation of the intermediate pedestrian trajectory. For example, for the endpoint to be completed, the electronic device can determine the reference slope, reference moving rate and reference foot point orientation corresponding to each trajectory point information within 2 seconds close to the endpoint to be completed, and then perform point completion processing on the intermediate pedestrian trajectory starting from the endpoint to be completed based on the reference slope, reference moving rate and reference foot point orientation, and finally obtain the target predicted trajectory corresponding to the second pedestrian trajectory. In this way, the electronic device performs point completion processing on the intermediate pedestrian trajectory based on the slope, moving rate and foot point orientation corresponding to the intermediate pedestrian trajectory, which can improve the rationality and effectiveness of the generation of the target predicted trajectory, and thus can ensure the accuracy of the recognition of the customer's store entry behavior in the target predicted trajectory.

[0157] In an embodiment of the present application, when the electronic device performs point-adding processing on the second pedestrian trajectory, due to calculation errors or the complexity of the pedestrian trajectory itself, the trajectory prediction may be inaccurate, which will lead to inaccurate passenger flow data statistics. Therefore, after the electronic device performs point-adding processing on the second pedestrian trajectory and obtains the target predicted trajectory, it can perform a rationality check on the target predicted trajectory to ensure the accuracy of passenger flow data statistics. In a possible implementation, the trajectory data processing method also includes:

[0158] Determine the predicted trajectory point information and the predicted foot point orientation of the predicted trajectory point information in the target predicted trajectory; if the difference between the predicted foot point orientation and the foot point orientation information of the adjacent trajectory point information is greater than a preset angle threshold, delete the target predicted trajectory.

[0159] In the embodiment of the present application, the target predicted trajectory includes the predicted trajectory point information generated by the point filling process and the original trajectory point information in the second pedestrian trajectory. The predicted foot point orientation information may refer to the foot point orientation of the predicted trajectory point information. The preset angle threshold may refer to a preset foot point orientation deviation critical value, such as 90 degrees.

[0160] Specifically, the electronic device can determine the predicted foot point orientation information of the preset track point information in the target predicted track, and then determine the angle difference between the predicted foot point orientation information of the predicted track point information and the foot point orientation information of the track point information adjacent to the preset track point information. If the angle difference is greater than the preset angle threshold, the electronic device can determine that the credibility of the completed predicted track point information in the target predicted track is not high, and the target predicted track can be directly discarded; if the angle difference is less than or equal to the preset angle threshold, the electronic device can determine that the credibility of the completed predicted track point information in the target predicted track is high, and the secondary recognition and judgment of the target store entry event can be continued. In this way, the electronic device can realize the rationality verification of the target predicted track by calculating and judging the angle deviation between the predicted foot point orientation information of the preset track point information and the foot point orientation information of the adjacent track point information, which can improve the accuracy of passenger flow data statistics and avoid the loss of calculation caused by invalid track prediction data.

[0161] For example, Figure 7 A schematic diagram of performing point filling processing on a second pedestrian trajectory provided by an exemplary embodiment of the present application. Figure 7 As shown, the second pedestrian trajectory 701 (the trajectory composed of black filled dots) disappears due to crowd occlusion or store decorations. The electronic device can first perform a smoothing process on the second pedestrian trajectory 701, delete the abnormal trajectory point information with sharpening, and then complete the second pedestrian trajectory to obtain a complete target predicted trajectory 702, which includes the trajectory point information (black filled dots) in the second pedestrian trajectory 701 and the predicted trajectory point information (white filled dots) generated after the point completion process. After that, the electronic device can perform a rationality check on the target predicted trajectory 702 to determine whether the target predicted trajectory 702 is abnormal, which can be determined specifically based on whether the foot point orientation deviation between the last trajectory point information and the first predicted trajectory point information in the second pedestrian trajectory 701 is greater than a preset angle threshold. After the target prediction trajectory 702 passes the rationality check, the electronic device can further determine whether the target prediction trajectory 702 has a target store entry event, specifically, whether the target prediction trajectory 702 intersects with the target ground line 704 in the target area 703. If so, the electronic device can determine that the target prediction trajectory 702 has a target store entry event. Figure 7 As shown in , the target prediction trajectory 702 does not intersect with the target ground line 704 , and at this time the electronic device can determine that there is no target store entry event in the target prediction trajectory 702 .

[0162] S307, record the trajectory identifier of the pedestrian trajectory and the target recognition result corresponding to the pedestrian trajectory; the target recognition result includes the existence of a target entering the store event or the absence of a target entering the store event; if the trajectory identifier of the obtained pedestrian trajectory already has a corresponding target recognition result, stop processing the obtained pedestrian trajectory.

[0163] In the embodiment of the present application, the trajectory identifier may refer to a unique identifier of a pedestrian trajectory, or may refer to an identity document (ID) of the trajectory, etc. The target recognition result may refer to a recognition result of whether there is a target store entry event corresponding to each pedestrian trajectory.

[0164] In an embodiment of the present application, the electronic device may specifically include an edge server and a cloud server, etc., wherein the edge server may be used to collect pedestrian trajectories and identify target store entry events in a video stream, and then report the pedestrian trajectory and target store entry events to the cloud server respectively, and the cloud server performs trajectory prediction and quantity statistics. Due to network jitter or delay, etc., repeated reporting of pedestrian trajectories may occur during data transmission. In order to avoid repeated recognition and calculation of the same pedestrian trajectory, the electronic device may store the trajectory identifier of the pedestrian trajectory and the target recognition result corresponding to the pedestrian trajectory after performing trajectory data processing such as identification of the target store entry event and trajectory prediction and recognition of the pedestrian trajectory.

[0165] For the newly uploaded pedestrian trajectories, the electronic device can search and find based on the trajectory identifier of the newly uploaded pedestrian trajectory. If the trajectory identifier already has a corresponding target recognition result, the electronic device can determine that the pedestrian trajectory corresponding to the trajectory identifier has completed the recognition judgment and there is no need to process the trajectory data again; if the trajectory identifier does not have a corresponding target recognition result, the electronic device can execute the above trajectory data processing process to determine the target recognition result corresponding to the pedestrian trajectory corresponding to the trajectory identifier. In this way, by recording the trajectory identifier and the corresponding target recognition result, the electronic device can avoid the subsequent recalculation and processing of the pedestrian trajectory that is repeatedly uploaded due to network reasons, avoid the loss of computing resources, avoid repeated statistics of customers' store entry behaviors, and improve the accuracy of customer flow data statistics.

[0166] S308: Determine the number of target trajectories corresponding to the target store-entering events according to the first number of first pedestrian trajectories and the second number of target predicted trajectories having target store-entering events.

[0167] In the embodiment of the present application, after the electronic device performs point-filling processing on the second pedestrian trajectory to obtain the target predicted trajectory, it can perform secondary recognition and judgment on the target predicted trajectory to determine whether there is a target store entry event in the target predicted trajectory, and if so, generate the target store entry event corresponding to the target predicted trajectory. Finally, the electronic device can determine the target trajectory data corresponding to the target store entry event based on the first number of the first pedestrian trajectory and the second number of the target predicted trajectory with the target store entry event, so as to achieve accurate and comprehensive statistics of the passenger flow data.

[0168] For example, Figure 8 A logical diagram of a second pedestrian trajectory prediction process provided by an exemplary embodiment of the present application. Figure 8 As shown, for the second pedestrian trajectory that is initially determined to not have a target store entry event, the electronic device first optimizes the second pedestrian trajectory, specifically identifying and deleting the abnormal trajectory point information with sharpening in the second pedestrian trajectory, and obtaining a smooth intermediate pedestrian trajectory. The electronic device can then calculate the reference slope, reference moving speed, and reference foot point orientation corresponding to the intermediate pedestrian trajectory, and then perform point filling processing based on the reference slope, reference moving speed, and reference foot point orientation. Specifically, the moving distance corresponding to the predicted trajectory point information can be determined based on the reference moving speed, and the predicted foot point orientation corresponding to the predicted trajectory point information can be determined based on the reference slope and reference foot point orientation, etc., and then each predicted trajectory point information can be determined to obtain the target predicted trajectory corresponding to the second pedestrian trajectory.

[0169] After determining the target predicted trajectory, the electronic device can perform a rationality check on the target predicted trajectory. If the check fails, the electronic device can stop calculating the target predicted trajectory and delete the target predicted trajectory. At this time, the same second pedestrian trajectory can be supplemented with points again and subsequent identification processing can be performed, or it can be directly determined that there is no target store entry event on the second pedestrian trajectory. The embodiment of the present application does not limit this. If the rationality check of the target predicted trajectory passes, the electronic device can identify and detect the store entry behavior on the target predicted trajectory to determine whether there is a target store entry event on the target predicted trajectory. After all the second pedestrian trajectories are processed, the electronic device can calculate the number of target trajectories based on the first number of the first pedestrian trajectory and the second number of the target predicted trajectories with the target store entry event. In this way, the electronic device obtains the target predicted trajectory by performing point supplementation processing on the second pedestrian trajectory, and identifies the customer's store entry behavior on the target predicted trajectory, which can improve the accuracy of customer store entry behavior identification, and also improve the comprehensiveness and accuracy of passenger flow data statistics.

[0170] It should be understood that in the various embodiments of the present application, the size of the serial number of each process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0171] Based on any one of the above embodiments, Fig. 9 A schematic diagram of a system architecture for trajectory data processing provided by an exemplary embodiment of the present application. Fig. 9 As shown, the system architecture of trajectory data processing may include cameras, edge servers, network management clusters, message queue (MQ) middleware clusters, cloud microservice clusters, databases, REID servers, and offline data computing platforms. Among them, 0.0 means that the shooting device (i.e., camera) is connected to the IoT platform through triple login registration to build a communication channel. Among them, the triple can refer to the unique identifier of a device in the IoT, usually including three elements: device ID, product ID, and device secret key. Device ID is the unique identifier of the device, product ID is the unique identifier of the product to which the device belongs, and device secret key is the key for encrypted communication between the device and the server. Through the device triple, the IoT platform can accurately identify and manage each device and ensure the security and reliability of communication between devices.

[0172] 0.1 means that the cloud microservice application cluster can send configurations through the Message Queuing Telemetry Transport (MQTT) or Hypertext Transfer Protocol (HTTP) channel, such as the calibration information of the target area. 0.2 means that the edge computing server can report data to the server through the MQTT or HTTP channel, such as MQTT reporting data (such as pedestrian trajectory data), HTTP uploading pictures, etc. 0.3 means that after the gateway receives the request, it can forward it to the cloud microservice cluster for processing.

[0173] 1.1 indicates that the edge server pulls the stream from the camera for calculation and processing, calls the algorithm model for recognition and adds analysis and calculation logic to obtain the pedestrian trajectory and the target store entry event corresponding to the pedestrian trajectory. 1.2 indicates that the edge server reports various data through the MQTT channel. 1.3 indicates that the service is asynchronously buffered through the MQ middleware and forwarded to the cloud microservice cluster for processing. 1.4, 1.5, and 1.6 indicate that the cloud microservice cluster processes the data and asynchronously stores the sampled data for REID merging. 1.7 and 1.8 indicate that REID pulls the sampled data, performs REID merging, and persists the data in the warehouse. 1.9 and 1.10 indicate that the offline data computing cluster performs some data analysis and synchronizes the results to the database. Of course, it should be noted that the system architecture for trajectory data processing may also include other devices or adopt other structures, and the embodiments of the present application are not limited to this.

[0174] Based on any one of the above embodiments, Fig.10 A logical diagram of trajectory data processing provided by an exemplary embodiment of the present application. Fig.10 As shown, after the shooting device captures the video stream, it can report the video stream to the edge server. The edge server (i.e., edge end) detects and identifies the video stream, determines the pedestrian trajectory of each pedestrian, and identifies the customer's store entry behavior for each pedestrian trajectory, determines whether there is a corresponding target store entry event for the pedestrian trajectory, and reports the pedestrian trajectory data and the target store entry event data to the server (server end). During the data transmission process, there may be a certain transmission delay or network fluctuation between the edge end and the server, and because the pedestrian trajectory data and the target store entry event data are reported separately, in order to avoid repeated calculations, the server can wait for a certain period of time after receiving the reported data for delayed processing, such as waiting for 3 minutes or 5 minutes, and then predict the reported data. This can ensure the comprehensiveness of data reception and avoid the consumption of computing resources caused by repeated calculations.

[0175] Afterwards, the server can determine the pedestrian trajectory with the target store entry event as the first pedestrian trajectory, and determine the pedestrian trajectory without the target store entry event as the second pedestrian trajectory. Then the server can perform point-filling processing on the second pedestrian trajectory to obtain the target predicted trajectory, and further determine whether the target predicted trajectory has the target store entry event. The server can store the trajectory identifier and the target recognition result corresponding to the trajectory identifier. When receiving new reported data later, the server can search for the trajectory identifier of the pedestrian trajectory in the reported data. If there is a corresponding target recognition result, the trajectory data processing is no longer performed. In this way, the idempotent check of the target recognition result corresponding to the trajectory representation can avoid repeated processing of the pedestrian trajectory data. Finally, the electronic device can determine the number of target trajectories corresponding to the target store entry event based on the first number of the first pedestrian trajectory and the second number of the target predicted trajectory with the target store entry event, and then the number of target trajectories can be stored in the database to achieve persistent storage, so that comprehensive and accurate statistics of passenger flow data can be achieved.

[0176] In related technologies, when conducting customer flow statistics based on computer vision algorithms, electronic devices usually need to collect data to obtain specific data sets, and then go through complex processes such as model training and model integration to obtain a usable recognition model. It is not very universal, and is highly dependent on hardware costs and has high computing resource costs. In addition, electronic devices need to use historical trajectory data for model training, but the actual offline scenarios are more complex, resulting in inaccurate recognition of customer entry behavior.

[0177] In the embodiment of the present application, the electronic device realizes the prediction processing of the second pedestrian trajectory based on the basic atomic algorithm capabilities such as the foot coordinates and the foot orientation, and can accurately judge the complete trajectory of the pedestrian without training a specific model, with low implementation cost and short cycle; and the electronic device outputs the foot points and the body orientation through the algorithm atomic model, with stronger generalization ability; in actual calculation, it is mainly based on the trajectory point information of the pedestrian trajectory for calculation, supports cloud computing, requires fewer computing resources and the computing logic is relatively simple, reduces the dependence on hardware, and has lower computing resource cost; in addition, real-time prediction based on the second pedestrian trajectory of the pedestrian can ensure the rationality and accuracy of the trajectory prediction, avoid the distortion of passenger flow data due to trajectory breakage or loss, and improve the comprehensiveness and accuracy of passenger flow data statistics.

[0178] Fig.11 For a structural diagram of a trajectory data processing device provided by an exemplary embodiment of the present application, see Fig.11 , the trajectory data processing device 110 includes:

[0179] The acquisition module 111 is used to acquire the video stream and collect the pedestrian trajectory corresponding to each pedestrian in the video stream;

[0180] The first determination module 112 is used to determine the pedestrian trajectory with the target store-entering event as the first pedestrian trajectory, and determine the pedestrian trajectory without the target store-entering event as the second pedestrian trajectory; the target store-entering event is an event generated when the pedestrian trajectory enters the target area;

[0181] A point filling module 113 is used to fill in the second pedestrian trajectory to obtain a target prediction trajectory corresponding to the second pedestrian trajectory;

[0182] The second determining module 114 is configured to determine the number of target trajectories corresponding to the target store-entering event according to the first number of the first pedestrian trajectories and the second number of the target predicted trajectories having the target store-entering event.

[0183] In a possible implementation, the acquisition module 111 is specifically configured to:

[0184] For each image frame in the video stream, extract the human features and trajectory point information of each pedestrian in the image frame;

[0185] Tracking and detection based on human body features to determine the trajectory point information corresponding to the same pedestrian;

[0186] The pedestrian trajectory corresponding to the same pedestrian is determined according to the trajectory point information corresponding to the same pedestrian.

[0187] In a possible implementation manner, the device 110 is further configured to:

[0188] Determining a target region in an image frame of a video stream;

[0189] Determine a target ground line corresponding to the target area in a target line segment of the target area;

[0190] If the pedestrian trajectory intersects with the target ground line, it is determined that there is a target store entry event in the pedestrian trajectory;

[0191] If the pedestrian trajectory does not intersect the target ground line, it is determined that there is no target store entry event in the pedestrian trajectory.

[0192] In a possible implementation manner, the device 110 is further configured to:

[0193] Get the historical pedestrian trajectories within a preset historical period;

[0194] According to the intersection of historical pedestrian trajectories and target segments, the historical traffic data corresponding to each target segment is determined;

[0195] The target line segment whose historical traffic data meets the preset conditions is determined as the target ground line.

[0196] In a possible implementation manner, the device 110 is further configured to:

[0197] For each pedestrian trajectory, if there is no trajectory point information located in the target area in the pedestrian trajectory, it is determined that the pedestrian trajectory does not intersect with the target ground line;

[0198] According to the positional relationship between the trajectory point information and the target area, the target trajectory point information in the pedestrian trajectory that is located in the target area is determined;

[0199] If the dwell time corresponding to the target trajectory point information is greater than the preset time threshold, it is determined that the pedestrian trajectory intersects with the target ground line;

[0200] If the dwell time corresponding to the target trajectory point information is less than or equal to the preset time threshold, it is determined that the pedestrian trajectory does not intersect with the target ground line.

[0201] In a possible implementation manner, the point filling module 113 is specifically configured to:

[0202] Determine foot point orientation information of each track point information in the second pedestrian track;

[0203] Determine the abnormal track point information in the second pedestrian track according to the foot point orientation information, and delete the abnormal track point information in the second pedestrian track to obtain the middle pedestrian track;

[0204] Determine the reference slope, reference moving speed, and reference foot direction corresponding to the middle pedestrian trajectory;

[0205] According to the reference slope, reference moving speed and reference foot direction, the intermediate pedestrian trajectory is supplemented to obtain the target predicted trajectory.

[0206] In a possible implementation manner, the device 110 is further configured to:

[0207] Determine predicted track point information in the target predicted track and predicted foot point orientation of the predicted track point information;

[0208] If the difference between the predicted foot point orientation and the foot point orientation information of the adjacent track point information is greater than a preset angle threshold, the target predicted track is deleted.

[0209] In a possible implementation manner, the device 110 is further configured to:

[0210] Recording the trajectory identifier of the pedestrian trajectory and the target recognition result corresponding to the pedestrian trajectory; the target recognition result includes the existence of the target entering the store event or the absence of the target entering the store event;

[0211] If the trajectory identifier of the obtained pedestrian trajectory already has a corresponding target recognition result, the processing of the obtained pedestrian trajectory is stopped.

[0212] The trajectory data processing device 110 provided in the embodiment of the present application can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.

[0213] Fig.12 For a schematic diagram of the structure of an electronic device provided by an exemplary embodiment of the present application, see Fig.12 The electronic device 120 may include a processor 121 and a memory 122. Exemplarily, the processor 121 and the memory 122 are interconnected via a bus 123.

[0214] Memory 122 stores computer executable instructions;

[0215] The processor 121 executes the computer-executable instructions stored in the memory 122 , so that the processor 121 executes the trajectory data processing method as shown in the above method embodiment.

[0216] Accordingly, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the trajectory data processing method of the above method embodiment.

[0217] Accordingly, an embodiment of the present application may also provide a computer program product, including a computer program. When the computer program is executed by a processor, the trajectory data processing method shown in the above method embodiment can be implemented.

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

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

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

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

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

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

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

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

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

Claims

1. A trajectory data processing method, It is characterized in that include: Obtaining a video stream, and collecting pedestrian trajectories corresponding to each pedestrian in the video stream; Determine a pedestrian trajectory with a target store-entering event as a first pedestrian trajectory, and determine a pedestrian trajectory without the target store-entering event as a second pedestrian trajectory; The target store entry event is an event generated when the pedestrian trajectory enters the target area; Performing point filling processing on the second pedestrian trajectory to obtain a target predicted trajectory corresponding to the second pedestrian trajectory; Determine the number of target trajectories corresponding to the target store-entering event according to a first number of the first pedestrian trajectories and a second number of target predicted trajectories having the target store-entering event; The performing point-adding processing on the second pedestrian trajectory to obtain a target predicted trajectory corresponding to the second pedestrian trajectory includes: Determine foot point orientation information of each track point information in the second pedestrian track; Determine abnormal track point information in the second pedestrian track according to the foot point orientation information, and delete the abnormal track point information in the second pedestrian track to obtain an intermediate pedestrian track; Determine a reference slope, a reference moving speed, and a reference foot point orientation corresponding to the intermediate pedestrian trajectory; The intermediate pedestrian trajectory is supplemented according to the reference slope, the reference moving speed, and the reference foot point orientation to obtain the target predicted trajectory.

2. The method according to claim 1, It is characterized in that The collecting of pedestrian trajectories corresponding to each pedestrian in the video stream includes: For each image frame in the video stream, extracting human features and trajectory point information of each pedestrian in the image frame; Perform tracking detection based on the human body features to determine the trajectory point information corresponding to the same pedestrian; The pedestrian trajectory corresponding to the same pedestrian is determined according to the trajectory point information corresponding to the same pedestrian.

3. The method according to claim 1, It is characterized in that The method further comprises: Determining a target area in an image frame of the video stream; Determining a target ground line corresponding to the target area in a target line segment of the target area; If the pedestrian trajectory intersects the target ground line, it is determined that there is a target store entry event in the pedestrian trajectory; If the pedestrian trajectory does not intersect the target ground line, it is determined that there is no target store entry event on the pedestrian trajectory.

4. The method according to claim 3, It is characterized in that The step of determining a target ground line corresponding to the target area in a target line segment of the target area includes: Get the historical pedestrian trajectories within a preset historical period; Determine the historical traffic data corresponding to each target line segment according to the intersection of the historical pedestrian trajectory and the target line segment; The target line segment whose historical flow data meets a preset condition is determined as the target ground line.

5. The method according to claim 3, It is characterized in that The method further comprises: For each of the pedestrian trajectories, if there is no trajectory point information located in the target area in the pedestrian trajectory, determining that the pedestrian trajectory does not intersect with the target ground line; Determining target track point information in the pedestrian track that is located in the target area according to a positional relationship between the track point information and the target area; If the dwell time corresponding to the target trajectory point information is greater than a preset time threshold, it is determined that the pedestrian trajectory intersects with the target ground line; If the dwell time corresponding to the target trajectory point information is less than or equal to a preset time threshold, it is determined that the pedestrian trajectory does not intersect with the target ground line.

6. The method according to claim 1, It is characterized in that The method further comprises: Determining predicted trajectory point information in the target predicted trajectory and predicted foot point orientation of the predicted trajectory point information; If the difference between the predicted foot point orientation and the foot point orientation information of the adjacent trajectory point information is greater than a preset angle threshold, the target predicted trajectory is deleted.

7. The method according to any one of claims 1 to 6, It is characterized in that The method further comprises: Recording the trajectory identifier of the pedestrian trajectory and the target recognition result corresponding to the pedestrian trajectory; the target recognition result includes the existence of a target store entry event or the absence of a target store entry event; If the trajectory identifier of the obtained pedestrian trajectory already has a corresponding target recognition result, the processing of the obtained pedestrian trajectory is stopped.

8. A trajectory data processing device, It is characterized in that include: A collection module, used to obtain a video stream and collect pedestrian trajectories corresponding to each pedestrian in the video stream; A first determination module is used to determine the pedestrian trajectory with the target store-entering event as the first pedestrian trajectory, and determine the pedestrian trajectory without the target store-entering event as the second pedestrian trajectory; The target store entry event is an event generated when the pedestrian trajectory enters the target area; A point filling module, used for performing point filling processing on the second pedestrian trajectory to obtain a target predicted trajectory corresponding to the second pedestrian trajectory; A second determination module is used to determine the number of target trajectories corresponding to the target store-entering event according to the first number of the first pedestrian trajectories and the second number of target predicted trajectories having the target store-entering event; The point filling module is specifically used for: Determine foot point orientation information of each track point information in the second pedestrian track; Determine abnormal track point information in the second pedestrian track according to the foot point orientation information, and delete the abnormal track point information in the second pedestrian track to obtain an intermediate pedestrian track; Determine a reference slope, a reference moving speed, and a reference foot point orientation corresponding to the intermediate pedestrian trajectory; The intermediate pedestrian trajectory is supplemented according to the reference slope, the reference moving speed, and the reference foot point orientation to obtain the target predicted trajectory.

9. An electronic device, It is characterized in that include: Memory and processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor executes the trajectory data processing method according to any one of claims 1 to 7.

10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer-executable instructions, which are used to implement the trajectory data processing method according to any one of claims 1 to 7 when the computer-executable instructions are executed by a processor.

11. A computer program product, It is characterized in that The method comprises a computer program, and when the computer program is executed by a computer, the trajectory data processing method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • A pedestrian behavior identification and trajectory tracking method

    CN109784162A

  • Passenger flow statistical method, system, device and medium

    CN114627155A

  • Statistical method and device of passenger flow volume, electronic equipment and storage medium

    CN115546944A

  • Operation control method, device and equipment for carrier rocket

    CN116627157A

  • Trajectory prediction method, vehicle, device and storage medium

    CN118129756A