Passenger flow batch statistics method, electronic device, and storage medium
By acquiring and analyzing the trajectory information of target objects, the problem of inaccurate identification of overlapping target objects in existing passenger flow batch statistics methods has been solved, and more accurate batch statistics results have been achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHEJIANG DAHUA TECH CO LTD
- Filing Date
- 2026-02-14
- Publication Date
- 2026-06-30
AI Technical Summary
Existing methods for counting passenger flow batches cannot accurately identify whether multiple target objects appearing in a venue at the same time belong to the same batch, resulting in inaccurate statistical results.
By traversing each target object in the batch of objects to be counted, their initial trajectory information is obtained, and the target objects within the overlapping time period are determined based on the trajectory information to determine whether they belong to the same statistical batch. The accuracy of the statistical results is improved by using time and space filtering methods.
By determining the batches of target objects using trajectory point locations and time information within overlapping time periods, the accuracy of passenger flow batch statistics is improved.
Smart Images

Figure CN122309909A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing, and in particular to a method for passenger flow batch statistics, electronic equipment, and storage medium. Background Technology
[0002] Currently, the commonly used method for passenger flow batch statistics is to identify target individuals entering a venue at the same time as belonging to the same batch of passengers. However, this method can only identify target individuals appearing at the venue entrance at the same time. Multiple target individuals appearing at the venue entrance at the same time may not necessarily belong to the same batch of passengers. Therefore, this method of passenger flow batch statistics, which relies solely on the dimension of being in a specific spatial location at the same time, is inaccurate.
[0003] Therefore, there is an urgent need for an effective method for passenger flow batch statistics. Summary of the Invention
[0004] This application provides at least one method, electronic device, and storage medium for passenger flow batch statistics, which can improve the accuracy of passenger flow batch statistics results.
[0005] This application provides a passenger flow batch statistics method, which includes: traversing each target object in the batch of objects to be counted, obtaining the initial trajectory information of the currently traversed first target object and the second target objects in the batch of objects to be counted (excluding the first target object), the initial trajectory information including the position information of the target object at each trajectory point and the time when it travels to each trajectory point; determining at least one third target object from each of the second target objects that has an overlapping time with the first target object based on the initial trajectory information between the first target object and each of the second target objects; determining a fourth target object from each of the third target objects that belongs to the same statistical batch as the first target object based on the first target object's trajectory information during the overlapping time and the second target trajectory information of each of the third target objects during the overlapping time; until all target objects in the batch of objects to be counted have been traversed, and obtaining the batch statistics result of each target object.
[0006] This application provides a passenger flow batch statistics device, comprising: an acquisition module, a first determination module, a second determination module, and a third determination module; the acquisition module is used to traverse each target object in the batch of objects to be counted, and acquire the initial trajectory information of the currently traversed first target object and the second target objects in the batch of objects to be counted, excluding the first target object, the initial trajectory information including the position information of the target object at each trajectory point and the time when it travels to each trajectory point; the first determination module is used to determine at least one third target object from each of the second target objects that has an overlapping time with the first target object based on the initial trajectory information between the first target object and each of the second target objects; the second determination module is used to determine a fourth target object from each of the third target objects that belongs to the same statistical batch as the first target object based on the first target trajectory information of the first target object during the overlapping time and the second target trajectory information of each of the third target objects during the overlapping time; the third determination module is used to obtain the batch statistics result of each target object until all target objects in the batch of objects to be counted have been traversed.
[0007] This application provides an electronic device, including a memory and a processor, wherein the processor is used to execute program instructions stored in the memory to implement the above-described passenger flow batch statistics method.
[0008] This application provides a computer-readable storage medium storing program instructions thereon, which, when executed by a processor, implement the above-described passenger flow batch statistics method.
[0009] The above scheme obtains the initial trajectory information of the first target object and the second target objects in the batch of objects to be counted by traversing each target object in the batch. Based on the initial trajectory information between the first target object and each second target object, at least one third target object with overlapping time with the first target object is determined from each second target object. Based on the first target trajectory information of the first target object during the overlapping time and the second target trajectory information of each third target object during the overlapping time, a fourth target object belonging to the same statistical batch as the first target object is determined from each third target object. This process continues until all target objects in the batch of objects to be counted have been traversed, resulting in the batch statistical results for each target object. By using the position information of each trajectory point of the first target object and the third target object during the overlapping time, as well as the time taken to travel to each trajectory point, it is determined whether the third target object is the fourth target object belonging to the same statistical batch as the first target object. After traversing all target objects, the batch statistical results for each target object are obtained by time and space filtering, thereby improving the accuracy of the batch statistical results for each target object.
[0010] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this application. Attached Figure Description
[0011] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with this application and, together with the specification, serve to explain the technical solutions of this application.
[0012] Figure 1 This is a first flowchart illustrating an exemplary embodiment of the passenger flow batch statistics method of this application; Figure 2 This is a schematic diagram of the second process of an exemplary embodiment of the passenger flow batch statistics method of this application; Figure 3 This is a schematic diagram of the third process of an exemplary embodiment of the passenger flow batch statistics method of this application; Figure 4 This is a schematic diagram of the fourth process of an exemplary embodiment of the passenger flow batch statistics method of this application; Figure 5a This is a schematic diagram of the fifth process of an exemplary embodiment of the passenger flow batch statistics method of this application; Figure 5b This is a first schematic diagram of overlapping time in an exemplary embodiment of the passenger flow batch statistics method of this application; Figure 5c This is a second schematic diagram of overlapping time in an exemplary embodiment of the passenger flow batch statistics method of this application; Figure 5d This is a schematic diagram of several initial times in an exemplary embodiment of the passenger flow batch statistics method of this application; Figure 5e This is a first schematic diagram of several target times in an exemplary embodiment of the passenger flow batch statistics method of this application; Figure 5f This is a second schematic diagram of several target times in an exemplary embodiment of the passenger flow batch statistics method of this application; Figure 6 This is a schematic diagram of the structure of an embodiment of the passenger flow batch statistics device of this application; Figure 7 This is a schematic diagram of the structure of an embodiment of the electronic device of this application; Figure 8 This is a schematic diagram of the structure of an embodiment of the computer-readable storage medium of this application. Detailed Implementation
[0013] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It is understood that the specific embodiments described herein are only for explaining this application and not for limiting it. Furthermore, it should be noted that, for ease of description, only the parts related to this application are shown in the accompanying drawings, not all structures. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0014] In the following description, specific details such as particular system architectures, interfaces, and technologies are presented for illustrative purposes rather than for limiting purposes, in order to provide a thorough understanding of this application.
[0015] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus. The term "and / or" is merely a description of the association of related objects, indicating that three relationships can exist; for example, A and / or B can represent: A alone, A and B simultaneously, and B alone. Additionally, the character " / " in this document generally indicates that the preceding and following related objects are in an "or" relationship. Furthermore, "many" in this document means two or more. Furthermore, the term "at least one" in this document means any combination of at least two of any one or more of a plurality of elements, for example, including at least one of A, B, and C, which can mean including any one or more elements selected from the set consisting of A, B, and C. Additionally, the term "several" in this document means one or more.
[0016] This application provides several methods and devices for passenger flow batch statistics. The application scenarios for these passenger flow batch statistics methods include, but are not limited to, image acquisition scenarios or passenger flow batch statistics scenarios. The executing entity of the passenger flow batch statistics method can be a passenger flow batch statistics device, such as an image acquisition device. For example, the passenger flow batch statistics device can be located in a terminal device, server, or other processing device. The terminal device can be a user equipment (UE), mobile device, user terminal, terminal, cellular phone, cordless phone, personal digital assistant (PDA), handheld device, computing device, vehicle-mounted device, etc. In some possible implementations, the passenger flow batch statistics method can be implemented by a processor calling computer-readable instructions stored in memory.
[0017] Please see Figure 1 , Figure 1 This is a first flowchart illustrating an exemplary embodiment of the passenger flow batch statistics method of this application. Specifically, the passenger flow batch statistics method may include the following steps: Step S11: Traverse each target object in the batch of objects to be counted, and obtain the initial trajectory information of the first target object currently being traversed and the second target object in the batch of objects to be counted, excluding the first target object.
[0018] The batch of objects to be counted can be information on several objects to be counted, collected by at least one image acquisition device from a target area within a preset time. The information on objects to be counted includes several target objects to be counted. The information on objects to be counted is associated with the image data of the target objects to be counted and the initial trajectory information corresponding to the image data. The image data to be counted consists of image data of at least two target objects. Each image data corresponds to a unique trajectory point and the time taken to reach that trajectory point. The initial trajectory information is the trajectory information connecting all the trajectory points corresponding to the target objects in all existing image data to be counted. The trajectory point is the center point of the detection box of the target object in the image data to be counted or other preset points.
[0019] The number of image acquisition devices can be one or more. In the case of multiple image acquisition devices, the batch of objects to be analyzed consists of image data collected by multiple image acquisition devices from the same target area within a preset time period. To facilitate the determination of the initial trajectory, the image data collected by different image acquisition devices can be projected onto the same coordinate system to plan the initial trajectory information for each target object to be analyzed.
[0020] The preset time represents the time for passenger flow batch statistics. The preset time can be flexibly set according to the needs of passenger flow batch statistics, for example, it can be set to 1 hour, 12 hours, or 24 hours. The target area can be the area where passenger flow statistics are performed. For example, the target area can include areas such as buses, subways, airports, train stations, museums, large shopping malls, shopping centers, chain stores, and scenic spots. This application does not limit the target area. The associated area has a relationship with the target area, and the target object enters or leaves the target area through the associated area. For example, the associated area is the entrance / exit area of the target area, or the associated area overlaps with the target area. This application does not limit this. The target object can be animals, objects, etc., and can be set according to the specific application scenario. This application does not limit this.
[0021] Step S11 above can involve traversing the batch of objects to be statistically analyzed, comparing the currently traversed object with other target objects in the batch to be statistically analyzed to determine whether the currently traversed object and other target objects belong to the same statistical batch. To conserve computing resources, other target objects can also be target objects that have not been traversed among the target objects other than the currently traversed object. The first target object can be the currently traversed object in the batch to be statistically analyzed. The second target object can be other target objects in the batch to be statistically analyzed besides the currently traversed object, or other target objects in the batch to be statistically analyzed besides the currently traversed object that have not been traversed.
[0022] The initial trajectory information includes the target object's position at each trajectory point and the time taken to reach each trajectory point. The position information of each trajectory point is within the same coordinate system. When the target object stops moving, any trajectory point in the initial trajectory information can correspond to a trajectory point in different image data to be analyzed.
[0023] In some application scenarios, step S11 above may be: acquiring the image data to be statistically analyzed for each target object in the batch of objects to be statistically analyzed; for each target object, performing path planning processing based on the trajectory points corresponding to the image data to be statistically analyzed for the target object and the acquisition time of the image data to be statistically analyzed, to obtain the initial trajectory information of the target object. In other application scenarios, step S11 above may also be: retrieving the initial trajectory information of each target object in the batch of objects to be statistically analyzed from a preset database.
[0024] Step S12: Based on the initial trajectory information between the first target object and each of the second target objects, determine at least one third target object from among the second target objects that has an overlap time with the first target object.
[0025] The initial trajectory information of the first target object is the first initial trajectory information. The initial trajectory information of the second target object is the second initial trajectory information.
[0026] The overlap time can be the intersection between the times of each trajectory point in the first initial trajectory information and the times of each trajectory point in the second initial trajectory information. For example, if the first target object first enters the target area at 9:00 and last leaves the target area at 12:00; or if the first target object first enters the target area at 10:00 and last leaves the target area at 11:00, then the overlap time between the first target object and the second target object is the time between 10:00 and 11:00.
[0027] For each second target object, if there is an overlap in the initial trajectory information between the first target object and the second target object, the second target object is designated as the third target object. For each second target object, if there is no overlap in the initial trajectory information between the first target object and the second target object, the second target object is discarded, or it is confirmed that the first target object and the second target object do not belong to the same statistical batch.
[0028] Step S13: Based on the first target trajectory information of the first target object within the overlapping time and the second target trajectory information of each third target object within the overlapping time, determine the fourth target object from each third target object that belongs to the same statistical batch as the first target object.
[0029] The first target trajectory information represents the trajectory information within the overlapping time period of the first initial trajectory information. The first target trajectory information includes the position information of each trajectory point of the first target object within the overlapping time period and the time when it passes each trajectory point.
[0030] The second target trajectory information represents the trajectory information within the overlapping time period of the second initial trajectory information. The second target trajectory information includes the position information of each trajectory point of the second target object within the overlapping time period, as well as the time taken to reach each trajectory point.
[0031] In some application scenarios, for each third target object, based on the position information of each trajectory point of the first target object within the overlapping time and the time when it travels to each trajectory point, and the position information of each trajectory point of the second target object within the overlapping time and the time when it travels to each trajectory point, it is determined whether the third target object is the fourth target object in the same statistical batch as the first target object.
[0032] In some application scenarios, the following steps are performed for each third target object: the first target trajectory information includes the first trajectory points of the first target object at each time point within the overlapping time; the second target trajectory information includes the second trajectory points of the third target object at each time point within the overlapping time; the distance between the position information of the first trajectory points and the position information of the second trajectory points at each time point is used as the initial distance for each time point; the total time within the overlapping time point when the initial distance is less than a distance threshold is counted; in response to the total time being greater than a duration threshold, the third target object is directly confirmed to be a fourth target object in the same statistical batch as the first target object. For the first target object, this process continues until all third target objects have been traversed, obtaining all fourth target objects corresponding to the first target object, and using all fourth target objects corresponding to the first target object as the batch statistical result of the first target object during this traversal of the first target object.
[0033] Step S14: Continue until all target objects in the batch of objects to be counted have been traversed to obtain the batch statistics results for each target object.
[0034] The batch statistics results for each target object represent at least one set of statistical batches into which each target object is divided based on the statistical batch relationship.
[0035] The process continues until each target object in the batch of objects to be statistically analyzed is taken as the first target object, and the batch statistical results of the first target object are obtained. These first target object batch statistical results are then used as candidate statistical results for the first target object. Based on the statistical batch relationship, the candidate statistical results of each target object in the batch of objects to be statistically analyzed are merged to obtain the batch statistical results of each target object. The statistical batch relationship can be defined as follows: if any two target objects and the same other target object belong to the same statistical batch, then when the statistical batch relationship is satisfied, the two target objects and the other target objects can be identified as belonging to the same statistical batch.
[0036] For example, each target object in the batch of objects to be counted includes object A, object B, and object C; if object A is the first target object, then object B is the fourth target object of object A, that is, the candidate statistical result of object A is that object B is the fourth target object in the same statistical batch as object A; if object C is the first target object, then object B is the fourth target object of object C, that is, the candidate statistical result of object C is that object B is the fourth target object in the same statistical batch as object C; in response to object A and object C being in the same statistical batch as object B respectively, object A, object B, and object C are confirmed as being in the same statistical batch.
[0037] The above scheme obtains the initial trajectory information of the first target object and the second target objects in the batch of objects to be counted by traversing each target object in the batch. Based on the initial trajectory information between the first target object and each second target object, at least one third target object with overlapping time with the first target object is determined from each second target object. Based on the first target trajectory information of the first target object during the overlapping time and the second target trajectory information of each third target object during the overlapping time, a fourth target object belonging to the same statistical batch as the first target object is determined from each third target object. This process continues until all target objects in the batch of objects to be counted have been traversed, resulting in the batch statistical results for each target object. By using the position information of each trajectory point of the first target object and the third target object during the overlapping time, as well as the time taken to travel to each trajectory point, it is determined whether the third target object is the fourth target object belonging to the same statistical batch as the first target object. After traversing all target objects, the batch statistical results for each target object are obtained by time and space filtering, thereby improving the accuracy of the batch statistical results for each target object.
[0038] Please see Figure 2 , Figure 2 This is a schematic diagram of the second process of an exemplary embodiment of the passenger flow batch statistics method of this application.
[0039] In some embodiments, step S13 above may include the following steps: performing the following for each third target object: Figure 2 The following steps are shown: Step S21: Based on the trajectory information of the first target and the trajectory information of the second target, divide the overlapping time corresponding to the third target object into several initial times.
[0040] Several initial times can be one or more initial times. An initial time is a sub-time within an overlapping time period. The number of trajectory points traveled by the same target object at each initial time is a preset threshold. The preset threshold can be set to one. In some application scenarios, if the first target object and the third target object have completely identical trajectories, then several initial times are considered as one initial time, and this initial time is the same as the overlapping time.
[0041] In some application scenarios, step S21 above can be: during the overlapping time, in response to the changes in the trajectory points of the first target object and the third target object, the overlapping time is divided into an initial time, wherein the same target object travels different trajectory points in adjacent initial times.
[0042] In other application scenarios, step S21 above may be: during the overlap time, in response to changes in the trajectory points of the first target object, dividing the overlap time into at least one first time period. During the overlap time, in response to changes in the trajectory points of the third target object, dividing the overlap time into at least one second time period. The first and second times are grouped to obtain several initial times, including: taking the earliest of the start times of the first first time and the first second time as the start time of the first initial time, and taking the earliest of the end times of the first first time and the first second time as the end time of the first initial time; starting from the end time of the first initial time, taking the start and end times of the first or second time closest to the end time of the first initial time as the start time of the next initial time, which is later than the end time of the first initial time; starting from the start time of the next initial time, taking the start and end times of the first or second time closest to the start time of the next initial time as the end time of the next initial time, which is later than the start time of the next initial time; until all first and second times have been traversed, several initial times are obtained, where the end time of the last initial time is the earliest of the start times of the last first time and the last second time.
[0043] Step S22: Determine the spatiotemporal relationship between the first target object and the third target object at each initial time based on the distance between the first trajectory point of the first target object at each initial time and the second trajectory point of the third target object at the corresponding initial time.
[0044] The first trajectory point is the trajectory point of the first target object at any initial time. The second trajectory point is the trajectory point of the third target object at any initial time. The spatiotemporal correlation at the initial time represents the correlation between the first target object and the third target object at the same initial time. Specifically, for the same initial time, if the position information of the first trajectory point and the position information of the second trajectory point at that initial time are less than a distance threshold, the spatiotemporal correlation at the initial time indicates that the first target object and the third target object are correlated at the same initial time. For the same initial time, if the position information of the first trajectory point and the position information of the second trajectory point at that initial time are greater than or equal to a distance threshold, the spatiotemporal correlation at the initial time indicates that the first target object and the third target object are not correlated at the same initial time.
[0045] In some embodiments, the spatiotemporal correlation includes the correlation result between the first target object and the third target object at an initial time. The correlation result indicates whether there is a correlation between the first target object and the third target object at the initial time. Step S22 above may include the following steps: For each initial time, perform the following steps: take the distance between the first trajectory point of the first target object at each initial time and the second trajectory point of the third target object at the corresponding initial time as the distance to be compared. In response to the distance to be compared between the first target object and the third target object at the initial time being greater than or equal to a second distance threshold, determine that the correlation result corresponding to the initial time indicates that there is no correlation between the first target object and the third target object. In response to the distance to be compared between the first target object and the third target object at the initial time being less than the second distance threshold, determine that the correlation result corresponding to the initial time indicates that there is a correlation between the first target object and the third target object.
[0046] Step S23: In response to the fact that the spatiotemporal correlation of the third target object at each initial time and the duration of each initial time meet the preset requirements, confirm that the third target object is the fourth target object in the same statistical batch as the first target object.
[0047] In some application scenarios, step S23 above can be: for each initial time, in response to the association result corresponding to the initial time indicating that the first target object and the third target object are associated, the duration of the initial time is determined as the duration to be merged; the sum of the durations to be merged is taken as the total time when the initial distance is less than the distance threshold within the overlapping time; in response to the total time being greater than the duration threshold, the third target object is directly confirmed to be the fourth target object in the same statistical batch as the first target object.
[0048] In other application scenarios, step S23 above can also be: in response to at least one duration to be merged being greater than a duration threshold, confirming that the third target object is a fourth target object belonging to the same statistical batch as the first target object. In response to each duration to be merged being less than or equal to the duration threshold, performing the step of using the sum of the durations to be merged as the total time during which the initial distance is less than the distance threshold within the overlapping time.
[0049] Please see Figure 3 , Figure 3 This is a schematic diagram of the third process of an exemplary embodiment of the passenger flow batch statistics method of this application.
[0050] In some embodiments, the spatiotemporal correlation corresponding to the initial time includes the correlation result between the first target object and the third target object at the initial time. Step S23 above may include the following steps: Step S31: In response to the association result corresponding to the initial time indicating that the first target object and the third target object are associated, the initial time is used as a candidate time.
[0051] Candidate time represents the initial time when the first target object and the third target object are related in terms of initial time.
[0052] If the distance between the first target object and the third target object at the initial time is less than the second distance threshold, the initial time is used as the candidate time.
[0053] Step S32: Combine the candidate times according to the time continuity condition to obtain at least one target time.
[0054] The time continuity condition indicates that the end time of the preceding candidate time and the start time of the following candidate time are the same among adjacent candidate times. The preceding candidate time is earlier than the following candidate time during the overlapping time.
[0055] In some application scenarios, step S32 above can be: in response to each candidate time satisfying the time continuity condition, merging each candidate time into at least one target time. Wherein, the first target object and the third target object in the target time are related. The target time includes at least one candidate time.
[0056] Step S33: For each target time, in response to the target time duration being greater than the first duration threshold, confirm that the third target object is the fourth target object in the same statistical batch as the first target object.
[0057] In some application scenarios, in response to at least one target time having a duration greater than a duration threshold, the third target object is confirmed to be a fourth target object belonging to the same statistical batch as the first target object. In other application scenarios, in response to each target time having a duration less than or equal to a duration threshold, the step described above, which sums the durations to be merged as the total time during which the initial distance is less than a distance threshold within the overlapping time, is performed. The first duration threshold can be flexibly set according to passenger flow batch statistics; it can be the same as or greater than the aforementioned duration threshold.
[0058] In some embodiments, after step S32, the passenger flow batch statistics method may further include the following steps: In response to the fact that the duration of each target time is less than or equal to a first duration threshold, each target time is extended to obtain an adjusted time corresponding to each target time. Based on the first adjusted trajectory information of the first target object within each adjusted time and the second adjusted trajectory information of the third target object within each adjusted time, the association result between the first target object and the third target object at each adjusted time is determined. In response to the association result corresponding to at least one adjusted time indicating that the first target object and the third target object are associated, it is confirmed that the third target object is a fourth target object belonging to the same statistical batch as the first target object.
[0059] In some application scenarios, the adjusted time corresponding to the target time includes a first adjusted time that extends the target time forward and a second adjusted time that extends the target time backward. The steps described above for extending each target time to obtain the adjusted time corresponding to each target time include: for each target time, performing the following steps: extending the target time forward by a first extension time to obtain a first adjusted time, wherein the duration of the first adjusted time is less than or equal to a first duration threshold; extending the target time backward by a second extension time to obtain a second adjusted time, wherein the duration of the second adjusted time is less than or equal to the first duration threshold.
[0060] In some application scenarios, extending the target time forward by a first extension time to obtain the first adjusted time includes: when extending the current target time forward, in response to the extension time being equal to the difference between a first duration threshold and the current target time, the extended time is taken as the first extension time, and the start time of the second extension time is the end time of the current target time. Alternatively, when extending the current target time forward, in response to the extension time being equal to the difference between the first duration threshold and the current target time, and the start time of the current target time minus the extension time being earlier than the end time of the previous target time, the end time of the previous target time is taken as the start time of the first extension time, and the end time of the first extension time is the start time of the current target time. Here, the previous target time is an adjacent target time that is earlier than the current target time.
[0061] In other application scenarios, extending the target time forward by a first extension time to obtain the first adjusted time includes: when extending the current target time forward, iterating through all initial times earlier than the current target time, and using the initial times that start earlier than the current target time as candidate initial times; for each candidate initial time, using the start time of the candidate initial time as the start time of the first candidate time, and using the time corresponding to the first duration threshold added to the start time of the first candidate time as the end time of the first candidate time; in response to the first candidate time including at least the current target time, using the first candidate time as the first adjusted time; until all candidate initial times have been traversed, all first adjusted times corresponding to the current target time are obtained. In other application scenarios, for the current target time, the condition for ending the traversal of each candidate initial time can be set as follows: if the start time of a candidate initial time is earlier than the end time of the previous target time, then the traversal of each candidate initial time ends; or, if the start time of a candidate initial time is earlier than the end time of the current target time minus the time corresponding to the first duration threshold, then the traversal of each candidate initial time ends.
[0062] In some application scenarios, a second adjusted time is obtained by extending the target time backward by a second extension time. This includes: when extending the current target time backward, in response to the extension time being equal to the difference between the first duration threshold and the current target time, the extended time is used as the second extension time, where the start time of the second extension time is the end time of the current target time. Alternatively, when extending the current target time backward, in response to the extension time being equal to the difference between the first duration threshold and the current target time, and the time corresponding to the increase in the extension time from the start time of the current target time being earlier than the start time of the next target time, the start time of the next target time is used as the end time of the second extension time, where the start time of the second extension time is the end time of the current target time. Here, the next target time is an adjacent target time that is later than the current target time.
[0063] In other application scenarios, extending the target time backward by a second extension time to obtain a second adjusted time includes: when extending the current target time backward, iterating through all initial times earlier than the current target time, and using initial times later than the end time of the current target time as candidate initial times; for each candidate initial time, using the end time of the candidate initial time as the end time of the first candidate time, and subtracting the first duration threshold from the end time of the first candidate time as the start time of the first candidate time; in response to the first candidate time including at least the current target time, using the first candidate time as the second adjusted time; until all candidate initial times have been traversed, all second adjusted times corresponding to the current target time are obtained. In other application scenarios, for the current target time, the condition for ending the traversal of each candidate initial time can be set as follows: if the end time of a candidate initial time is later than the end time of the next target time, then the traversal of each candidate initial time ends; or, if the end time of a candidate initial time is later than the end time of the current target time plus the time corresponding to the first duration threshold, then the traversal of each candidate initial time ends.
[0064] The first adjusted trajectory information represents the trajectory information within the adjusted time period from the first initial trajectory information. The first adjusted trajectory information includes the position information of each trajectory point of the first adjusted object within the adjusted time period, as well as the time when it travels to each trajectory point.
[0065] The second adjusted trajectory information represents the trajectory information within the adjusted time period from the second initial trajectory information. The second adjusted trajectory information includes the position information of each trajectory point of the second adjusted object within the adjusted time period, as well as the time taken to reach each trajectory point.
[0066] In some application scenarios, the step of determining the association result between the first target object and the third target object in the adjusted time based on the first adjusted trajectory information of the first target object in the adjusted time and the second adjusted trajectory information of the third target object in the adjusted time may include the following steps: obtaining the association result corresponding to the first extended time in the first adjusted time and / or the association result corresponding to the second extended time in the second adjusted time; in response to the association result between the first target object and the third target object in the first extended time and / or the second extended time indicating that there is an association between the first target object and the third target object, determining that the association result between the first target object and the third target object in the adjusted time indicates that there is an association between the first target object and the third target object.
[0067] In some application scenarios, obtaining the association result corresponding to the first extended time within the first adjusted time can be as follows: The first extended time includes at least one initial time. The distance between the position information of the first trajectory point and the position information of the second trajectory point at each initial time within the first extended time is taken as the first distance to be counted; the weighted average of the first distances to be counted corresponding to each initial time within the first extended time is taken as the distance corresponding to the first extended time. The weight of the first distance to be counted corresponding to each initial time can be flexibly set according to the accuracy of passenger flow batch statistics. It can be set to the same weight, or it can be determined according to the distance between the initial time and the current target time. The closer the initial time is to the current target time, the greater the weight of the first distance to be counted corresponding to the initial time. In response to the distance corresponding to the first extended time being less than or equal to a preset distance threshold, it is determined that the association result between the first target object and the third target object within the first extended time indicates that there is an association between the first target object and the third target object.
[0068] In other application scenarios, obtaining the association result corresponding to the second extended time within the first adjusted time can be as follows: the second extended time includes at least one initial time. The distance between the position information of the first trajectory point and the position information of the second trajectory point at each initial time within the second extended time is taken as the second distance to be counted; the weighted average of the second distances to be counted corresponding to each initial time within the second extended time is taken as the distance corresponding to the second extended time. The weight of the second distance to be counted corresponding to each initial time can be flexibly set according to the accuracy of passenger flow batch statistics. It can be set to the same weight, or it can be determined according to the distance between the initial time and the current target time. The closer the initial time is to the current target time, the greater the weight of the second distance to be counted corresponding to the initial time. In response to the distance corresponding to the second extended time being less than or equal to a preset distance threshold, the association result between the first target object and the third target object in the second extended time indicates that there is an association between the first target object and the third target object.
[0069] Please see Figure 4 , Figure 4 This is a schematic diagram of the fourth process of an exemplary embodiment of the passenger flow batch statistics method of this application.
[0070] In some embodiments, the step of determining the association result between the first target object and the third target object over the adjusted time based on the first adjustment trajectory information of the first target object over the adjusted time and the second adjustment trajectory information of the third target object over the adjusted time may include the following steps: performing the following steps for each adjusted time: Figure 4 The following steps are shown: Step S41: Divide the adjusted time into at least two times to be compared.
[0071] In some application scenarios, the time to be compared can be the initial time in the adjusted time. Step S41 above can be: the adjusted time includes at least two initial times, and each initial time in the adjusted time is used as a unit to take each initial time in the adjusted time as a time to be compared in the adjusted time.
[0072] In some application scenarios, the time to be compared can be the target time in the adjusted time and each initial time other than the target time in the adjusted time. Step S41 above can also be: the adjusted time includes the target time and at least one initial time, and each initial time other than the target time in the adjusted time is used as a unit to take each initial time other than the target time in the adjusted time as a time to be compared in the adjusted time, and the target time in the adjusted time is used as the time to be compared.
[0073] Step S42: Based on the position information of the trajectory points of the first target object in each time path to be compared and the position information of the trajectory points of the third target object in the corresponding time path to be compared, determine the target distance between the first target object and the third target object within the adjusted time.
[0074] The distance between the location information of the first trajectory point and the location information of the second trajectory point at each comparison time is taken as the third statistical distance at each comparison time. The weighted average of the third statistical distances at each comparison time is taken as the target distance between the first target object and the third target object within the adjusted time. The weight of the third statistical distance at each comparison time can be flexibly set according to the accuracy of passenger flow batch statistics. It can be set to the same weight or determined according to the distance between the comparison time and the target time in the adjusted time. The closer the comparison time is to the target time in the adjusted time, the greater the weight of the third statistical distance at the comparison time.
[0075] Step S43: In response to the target distance being greater than or equal to the first distance threshold, determine that the association result corresponding to the adjusted time is that the first target object and the third target object are not associated.
[0076] If the target distance is greater than or equal to the first distance threshold, the association result corresponding to the adjusted time is determined to be that the first target object and the third target object are not associated in the adjusted time.
[0077] Step S44: In response to the target distance being less than the first distance threshold, determine that the association result corresponding to the adjusted time is that the first target object and the third target object are associated.
[0078] If the target distance is less than the first distance threshold, the correlation result corresponding to the adjusted time is determined to be that the first target object and the third target object are correlated in the adjusted time.
[0079] In some embodiments, the time to be compared includes the target time and the extended time corresponding to the adjusted time. Step S42 may include the following steps: determining a first distance between the first target object and the third target object within the target time based on the position information of the first target object's trajectory point and the third target object's trajectory point within the target time; determining a second distance between the first target object and the third target object within the target time based on the position information of the first target object's trajectory point and the third target object's trajectory point within the extended time; and determining a target distance based on the first and second distances.
[0080] The first distance characterizes the distance between the positional information of the first target object's trajectory point at the target time and the positional information of the third target object's trajectory point at the target time. The target time in the adjusted time includes at least one candidate time. Specifically, if the target time in the adjusted time includes one candidate time, the distance between the positional information of the first target object's trajectory point at the candidate time and the positional information of the third target object's trajectory point at the candidate time is used as the first distance. Specifically, if the target time in the adjusted time includes multiple adjacent candidate times, the average distance between the positional information of the first target object's trajectory point at each candidate time and the positional information of the third target object's trajectory point at each candidate time is used as the first distance.
[0081] The second distance characterizes the distance between the position information of the first target object's trajectory point at the target time and the position information of the third target object's trajectory point at the target time. The target time in the adjusted time includes at least one initial time. Specifically, if the target time in the adjusted time includes one initial time, the distance between the position information of the first target object's trajectory point at the initial time and the position information of the third target object's trajectory point at the initial time is used as the second distance. Specifically, if the target time in the adjusted time includes multiple adjacent initial times, the average distance between the position information of the first target object's trajectory point at each initial time and the position information of the third target object's trajectory point at each initial time is used as the second distance.
[0082] In some application scenarios, the above steps for determining the target distance based on the first distance and the second distance include: taking the average distance between the first distance and the second distance as the target distance; or, performing a weighted average of the first distance and the second distance to obtain a processing result, and taking the processing result as the target distance, wherein the weight of the first distance is less than the weight of the second distance.
[0083] In other application scenarios, the correlation results corresponding to each adjusted time all indicate that the first target object and the third target object are not related, directly determining that the first target object and the third target object do not belong to the same statistical batch.
[0084] In some embodiments, the spatiotemporal correlation corresponding to the initial time includes the correlation weight between the first target object and the third target object at the initial time, and the correlation weight is inversely proportional to the distance between the first target object and the third target object at the initial time. The above-described passenger flow batch statistics method may further include the following steps: In response to the correlation results corresponding to each adjusted time indicating that the first target object and the third target object are not correlated, the total target duration for which a correlation exists between the first target object and the third target object is determined based on the duration of each candidate time and the correlation weight corresponding to each candidate time. In response to the total target duration being greater than a second duration threshold, the third target object is confirmed to be a fourth target object belonging to the same statistical batch as the first target object.
[0085] Here, the distance between the first and third target objects at the initial time is the distance between the position information of the first trajectory point and the position information of the second trajectory point at that initial time. The total target duration represents the total duration of all candidate times after representation.
[0086] Specifically, if the association results corresponding to each adjusted time indicate that there is no association between the first target object and the third target object, the following steps are performed: For each candidate time, the product between the duration of the candidate time and the association weight of the candidate time is taken as the candidate product of the candidate time; the sum of the candidate products of each candidate time is taken as the target total duration.
[0087] If the total target duration exceeds the second duration threshold, the third target object is confirmed to be the fourth target object in the same statistical batch as the first target object.
[0088] In some embodiments, the above-described passenger flow batch statistics method may further include the following steps: In response to the total duration of overlapping time being less than a third duration threshold, adjusting the second duration threshold to obtain a target duration threshold. In response to the target total duration being greater than the target duration threshold, confirming that the third target object is a fourth target object belonging to the same statistical batch as the first target object.
[0089] If the total duration of the overlapping time is less than the third duration threshold, the second duration threshold is adjusted to obtain the target duration threshold. Specifically, adjusting the second duration threshold to obtain the target duration threshold can be done by reducing the second duration threshold according to a preset ratio. The preset ratio can be a preset value that is flexibly set according to the accuracy of passenger flow batch statistics, or it can be the ratio between the total duration of the overlapping time and the third duration threshold.
[0090] If the total target duration exceeds the target duration threshold, the third target object is confirmed to be the fourth target object in the same statistical batch as the first target object.
[0091] It is understood that the first duration threshold, the second duration threshold, and the third duration threshold can be set to the same parameter or different parameters, and this application is not limited thereto. This application uses the example of setting the first duration threshold, the second duration threshold, and the third duration threshold to the same parameter. Similarly, the first distance threshold and the second distance threshold can be set to the same parameter or different parameters, and this application is not limited thereto. This application uses the example of setting the first distance threshold and the second distance threshold to the same parameter.
[0092] Please see Figure 5a , Figure 5a This is a schematic diagram of the fifth process of an exemplary embodiment of the passenger flow batch statistics method of this application.
[0093] For each third target object, execute the following sequentially: Figure 5a The steps shown are to determine whether the third target object is a fourth target object that is in the same statistical batch as the first target object.
[0094] Step S501: In response to the association result corresponding to the initial time indicating that the first target object and the third target object are associated, the initial time is used as a candidate time.
[0095] Step S502: Combine the candidate times according to the time continuity condition to obtain at least one target time.
[0096] Step S503: For each target time, in response to the target time duration being greater than the first duration threshold, confirm that the third target object is the fourth target object in the same statistical batch as the first target object.
[0097] Step S504: In response to the fact that the duration of each target time is less than or equal to the first duration threshold, the target time is extended to obtain the adjusted time corresponding to each target time.
[0098] Step S505: Based on the first adjustment trajectory information of the first target object in each adjusted time period and the second adjustment trajectory information of the third target object in each adjusted time period, determine the association result between the first target object and the third target object in each adjusted time period.
[0099] Step S506: In response to the association result corresponding to at least one adjusted time indicating that the first target object and the third target object are associated, confirm that the third target object is the fourth target object in the same statistical batch as the first target object.
[0100] Step S507: In response to the fact that the association results corresponding to each adjusted time all indicate that there is no association between the first target object and the third target object, the total target duration for which there is an association between the first target object and the third target object is determined based on the duration of each candidate time and the association weight corresponding to each candidate time.
[0101] Step S508: In response to the total target duration being greater than the second duration threshold, confirm that the third target object is the fourth target object in the same statistical batch as the first target object.
[0102] Step S509: In response to the total duration of the overlapping time being less than the third duration threshold, the second duration threshold is adjusted to obtain the target duration threshold.
[0103] Step S510: In response to the total target duration being greater than the target duration threshold, confirm that the third target object is the fourth target object in the same statistical batch as the first target object.
[0104] For example, step S11 above can be to use a target detection method (such as a preset model) to detect target boxes in each image data to be statistically analyzed. The preset model can be a face, head, shoulder, or body detection model such as the YOLO model, used to detect faces, heads, shoulders, and bodies in each frame of the video captured by the image acquisition device. For multiple consecutive frames, a multi-part correlation tracking algorithm for the target object is used to track the target object and create its ID. The trajectory information Trj of each target object in each frame is recorded, including the absolute value of the current time, the target's position, and other necessary information, until the target leaves the target area.
[0105] Among them, the image acquisition device is installed in a top-mounted or diagonal-mounted manner. Different installation methods are adopted according to the actual scenario. For cameras with an installation height greater than H (for example, set to 2.5 meters), diagonal installation is recommended. If the installation height is less than H, top installation is recommended for cameras. Multiple cameras are installed to ensure that the monitoring range of large scenarios can be covered. The installed image acquisition devices can be classified into entrance / exit cameras and in-store cameras according to the monitoring location (i.e., the target area); the duration threshold TT and the distance threshold LL are set through the user interface (i.e., the web interface) associated with the passenger flow batch statistics device. When in the batch of objects to be counted, and only when the time when two target objects coexist is greater than the duration threshold, and the position relationship of the trajectory points of the two at the same time meets the distance position requirement, the batch result of the target object is calculated. See the following steps for details.
[0106] Traverse the input targets. For example Figure 5b As shown, let the currently traversed target object (i.e., the first target object) be target A. Search for the trajectory information of target A. If there is trajectory information within the area of target A, record the entry time of target A , and the departure time . If the time that target A stays within the target area is less than the duration threshold TT, that is <TT, then traverse the next target A. If the time that target A stays within the target area is greater than or equal to the duration threshold, then perform the following step 1). Step 1) includes the following content: Traverse the targets in the batch of objects to be counted that have not been calculated for batches with target A, and set them as target B. Record the entry time of target B , and the departure time of target B . If the time that target B stays within the area is less than the duration threshold TT, that is , then determine whether there is a time overlap between target A and target B, that is, whether there is an overlapping time. If there is no overlapping time, then traverse the next target B.
[0107] In some other application scenarios, if there is an overlapping time, then perform the following step 2). Step 2) includes the following content: If , for example Figure 5c As shown Figure 5c the black part in , represents that there is a time overlap between target A and target B, and the overlapping time period of target A and target B is ( , At this point, target A and target B may be from the same batch, proceeding to step 2). Otherwise, target A and target B do not overlap in time. If the times of target A and target B do not overlap or the overlap period is less than the duration threshold TT, then A and B are considered not to be from the same batch, and the next target B is traversed. Then, after step 2), step 3) is executed. Step 3) may include the following: traversing the first target trajectory information of target A and the second target trajectory information of target B, determining the distance between target A and target B at each time node based on the trajectory information, and recording this information as the "time scale," i.e., the time scale is the aforementioned initial time, as shown in the figure. Figure 5d Each node on the "time scale" It includes the current time point T and the position information L between target A and target B. The information recorded in the "time scale" and the recording method are as follows: find the position within the time range of the initial trajectory information of target A ( , The trajectory within the area is recorded on an actual ruler at each time point. (i.e., as) Figure 5d The coordinates of T1, T3, T7, and T8 in the bounding box and the center point of the target bounding box of the current node target A are denoted as T1, T3, T7, and T8. Find the trajectory within the time range (Tinit, Tend) in the trajectory information of target B, and record each time node on the actual scale. (i.e., as) Figure 5d The coordinates of the target bounding box center points of the target B at the current node (T0, T2, T4, T5, T6, etc.) are denoted as T0, T2, T4, T5, T6, etc. .
[0108] At each "mark" of the "time scale" The above supplements the trajectory information for each current time point: if the current node only records the trajectory of one target, then the trajectory information of the other target is taken from the previously recorded trajectory. (e.g.) Figure 5d At node R2 (i.e., time T2), only the trajectory information of target B is available. Then the trajectory of A is taken from the previously recorded trajectory of A. As Specifically, at each "marker" of the "time scale". The above records the Euclidean distance between the center points of the trajectories of target A and target B at the current time point. You can refer to the following formula (1): Formula (1); in,( , This represents the x-axis and y-axis coordinates of the trajectory points of the first target object (e.g., target A) at the same initial time (i.e., the "time scale"). , This represents the x-axis and y-axis coordinates of the trajectory points of a third target object (such as target B) at the same initial time (i.e., the "time scale"). This represents the distance between the first and second trajectory points at the initial time. Iterate through each "scale" on the "time scale". Find the time period in which the distance between target A and target B is less than the distance threshold LL at the same initial time (i.e., the time scale mentioned above), and record the association result as... This association result indicates that the first target object and the third target object are associated within the initial time period. If the distance between target A and target B within the same initial time period is greater than or equal to the distance threshold LL, then the association result of the node corresponding to that initial time period is recorded as... This association result indicates that the first target object and the third target object are not associated in the initial time. If the distance between target A and target B in this "scale" is less than the width of the bounding box of target A or target B in the same initial time, then the two targets are considered to be highly adjacent targets, and the association weight corresponding to this initial time is recorded as . If the distance between target A and target B in the same initial time period is less than the distance threshold LL but greater than the bounding box width, the association weight corresponding to that initial time period is recorded as... In other application scenarios, a "scale" that only records time information is added to the end of the last node of each initial time. (Right now Figure 5d (R8 in the middle) All other information is recorded as 0. This node serves as the termination node for traversal and does not participate in the calculation.
[0109] Figure 5d Target A has 4 trajectory records, and target B has 6 trajectory records. Based on the time relationship between them, a "time scale" R is obtained, which represents the initial time. R records the distance between the two targets and the validity of the distance. Information such as distance weights, etc.
[0110] Then, after step 3), step 4) is executed. Step 4) may include the following: traversing the "time scale" R, i.e., each initial time, first combining each candidate time according to the time continuity condition to obtain at least one target time, and determining the batch relationship between target A and target B at each target time. If any of the following conditions are met, target A and target B are considered to belong to the same batch, the traversal of the current target B ends, and the next target B is calculated: Condition ①: If the correlation result of the target time is ,and If the distance between target A and target B is less than the distance threshold and the target time is greater than the duration threshold, then target A and target B are considered to belong to the same batch. The duration represents the target time, and i represents any target time.
[0111] Condition ②: If the correlation result of the target time is and That is, if the distance between target A and target B is less than the distance threshold and the target time is less than the duration threshold, then the time period is calculated. , Extending the time interval to a length of TT, we obtain at least two adjusted times. We calculate the average distance between target A and target B at each adjusted time. If the average distance is less than the distance threshold LL, A and B are considered to belong to the same batch. It is understandable that within a time interval consisting of several time periods with an average distance less than LL, there must be at least one interval with an average distance less than LL. Therefore, if such an interval exists, it can be obtained by extending the time interval with an average distance less than LL to a length of TT.
[0112] The average distance calculation method can be as follows: the time length of the j-th target time whose average distance is less than LL at the initial time is... The start and end times of the target time are respectively , Then its time span It can be written as .
[0113] In some application scenarios, the current target time Extend forward to the maximum boundary The duration is the time threshold minus the target time, but due to the previous target time... Calculated The time interval is delayed, so to save computation, for the current target time, we only need to extend it backward to the end of the previous target time. That is, the process of determining the first adjusted time can be referred to the following formula (2): Formula (2); in, This represents the start time of the current target time. This represents the duration of the current target time. TT represents the duration threshold. The starting point of the first adjusted time representing the current target time. This represents the end time of the previous target time. (Record) The node corresponding to each moment on the "time scale" R is .
[0114] In other application scenarios, the current target time Extended time To extend the maximum boundary backward, similarly, we only need to calculate up to the front end of the next node. Therefore, the process of determining the second adjusted time can be referred to the following formula (3): Formula (3); in, This represents the end time of the current target time. This represents the duration of the current target time. TT represents the duration threshold. The end time of the second adjusted time representing the current target time. Represents the start time of the next target time. Record. The node corresponding to each moment on the "time scale" R is .
[0115] The intention of extending the front and back is shown in the image. Figure 5e and Figure 5f , Figure 5e and Figure 5f The black patch (target time) in the image represents the association result. The part. With Figure 5f Taking TR3 as an example, TR3 should originally extend forward to the TT time period to be RTR,1 below. However, since TR2 has already been calculated as the previous target time, there is no interval containing TR2 that meets the time requirement. Therefore, the time period before the end time of TR2 can be completely excluded, i.e., applying the above formula. back The value is relatively large, so the starting time of the first adjustment can be selected. Figure 5f The RTR,1 above the middle (i.e., the start time is the end time of the previous target time TR2.end) can be used to save computation.
[0116] Then, iterate through from arrive The adjusted times for all time intervals of length TT are denoted as follows: .by Figure 5f For example, we can see that the adjusted times that meet the conditions are RTR,1 and RTR,3 above the time scale, and RTR,2 below. The distance between the first and second target objects within the adjusted time can be calculated using the following formula (4): Formula (4); in, This represents the average distance between target A and target B across all time points within each adjusted time period. Depending on the situation, it represents any initial time within the adjusted time period, if the current initial time... The interval is completely contained within a complete initial time. Within the interval, then If the current initial time The interval was not fully contained within a complete initial time. Within the interval, such as Figure 5e middle and If only a portion of each is contained within a complete initial time interval, then its corresponding The value is equal to TT minus a complete initial time. The difference after the total time for the remaining intervals. If any... satisfy If the average distance is less than the distance threshold LL, it can be determined that target A and target B belong to the same batch, and the calculation of target B for this time can be completed.
[0117] If condition ② is not met, determine whether condition ③ is met. Condition ③ includes the following: record the total time (i.e., the total duration of the target) when the distance between target A and target B is less than the distance threshold LL. The total duration of the target can be represented as TAB. This refers to the process of determining the total duration of the target that is associated with the first target object and the third target object, based on the duration of each candidate time and the associated weight corresponding to each candidate time. If TAB > TT, meaning the total duration of the target within the overlapping time period between target A and target B in the target area is greater than the time threshold, then A and B are considered to belong to the same batch. When A and B are very close in distance within the area, the statistical value for this period is calculated with a weight of 3 (i.e., Ri.Weight).
[0118] If condition ③ is not met, determine whether condition ④ is met. Condition ④ includes the following: Considering that the overlapping time periods of A and B are very close to the time threshold TT, it is difficult for any single time segment on the "time scale" to meet the requirements of condition ① or condition ②. For example, when the total overlapping time of A and B is less than 1.5 times the time threshold (i.e., the third duration threshold is set to 1.5 times the first duration threshold), if the proportion of the total duration of the overlapping time period between target A and target B is higher than the target duration threshold, target A and target B are also considered to belong to the same batch. The target duration threshold can be set to 70% of the first duration threshold or 70% of the third duration threshold.
[0119] If, based on conditions ① to ④ above, target A and target B belong to the same batch, then target A is added to the batch target sequence of target B, and target B is added to the batch sequence of target A. The process then proceeds to the next target traversal.
[0120] For example, step S14 above can be to merge all the results belonging to the same batch and output them as the final result to obtain the batch statistics results of each target object.
[0121] The above scheme obtains the initial trajectory information of the first target object and the second target objects in the batch of objects to be counted by traversing each target object in the batch. Based on the initial trajectory information between the first target object and each second target object, at least one third target object with overlapping time with the first target object is determined from each second target object. Based on the first target trajectory information of the first target object during the overlapping time and the second target trajectory information of each third target object during the overlapping time, a fourth target object belonging to the same statistical batch as the first target object is determined from each third target object. This process continues until all target objects in the batch of objects to be counted have been traversed, resulting in the batch statistical results for each target object. By using the position information of each trajectory point of the first target object and the third target object during the overlapping time, as well as the time taken to travel to each trajectory point, it is determined whether the third target object is the fourth target object belonging to the same statistical batch as the first target object. After traversing all target objects, the batch statistical results for each target object are obtained by time and space filtering, thereby improving the accuracy of the batch statistical results for each target object.
[0122] Please see Figure 6 , Figure 6 This is a schematic diagram of an embodiment of the passenger flow batch statistics device of this application. The passenger flow batch statistics device 60 includes an acquisition module 61, a first determination module 62, a second determination module 63, and a third determination module 64. The acquisition module 61 is used to traverse each target object in the batch of objects to be counted, and acquire the initial trajectory information of the currently traversed first target object and the second target objects in the batch of objects to be counted, excluding the first target object. The initial trajectory information includes the position information of the target object at each trajectory point and the time when it travels to each trajectory point. The first determination module 62 is used to determine at least one third target object from each of the second target objects that has an overlapping time with the first target object based on the initial trajectory information between the first target object and each of the second target objects. The second determination module 63 is used to determine a fourth target object from each of the third target objects that belongs to the same statistical batch as the first target object based on the first target trajectory information of the first target object during the overlapping time and the second target trajectory information of each of the third target objects during the overlapping time. The third determination module 64 is used to obtain the batch statistics result of each target object until all target objects in the batch of objects to be counted have been traversed.
[0123] Please refer to the passenger flow batch statistics method for the functions performed by each module; they will not be repeated here.
[0124] The above scheme obtains the initial trajectory information of the first target object and the second target objects in the batch of objects to be counted by traversing each target object in the batch. Based on the initial trajectory information between the first target object and each second target object, at least one third target object with overlapping time with the first target object is determined from each second target object. Based on the first target trajectory information of the first target object during the overlapping time and the second target trajectory information of each third target object during the overlapping time, a fourth target object belonging to the same statistical batch as the first target object is determined from each third target object. This process continues until all target objects in the batch of objects to be counted have been traversed, resulting in the batch statistical results for each target object. By using the position information of each trajectory point of the first target object and the third target object during the overlapping time, as well as the time taken to travel to each trajectory point, it is determined whether the third target object is the fourth target object belonging to the same statistical batch as the first target object. After traversing all target objects, the batch statistical results for each target object are obtained by time and space filtering, thereby improving the accuracy of the batch statistical results for each target object.
[0125] Please see Figure 7 , Figure 7 This is a schematic diagram of the structure of an embodiment of the electronic device of this application. The electronic device 70 includes a memory 71 and a processor 72. The processor 72 is used to execute program instructions stored in the memory 71 to implement the steps in the above-described passenger flow batch statistics method embodiment. In a specific implementation scenario, the electronic device 70 may include, but is not limited to, a microcomputer or a server. In addition, the electronic device 70 may also include mobile devices such as laptops and tablets, which are not limited here.
[0126] Specifically, processor 72 controls itself and memory 71 to implement the steps in the above-described passenger flow batch statistics method embodiment. Processor 72 can also be referred to as a CPU (Central Processing Unit). Processor 72 may be an integrated circuit chip with signal processing capabilities. Processor 72 can also be a general-purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor can be a microprocessor or any conventional processor. Furthermore, processor 72 can be implemented using integrated circuit chips.
[0127] The above scheme obtains the initial trajectory information of the first target object and the second target objects in the batch of objects to be counted by traversing each target object in the batch. Based on the initial trajectory information between the first target object and each second target object, at least one third target object with overlapping time with the first target object is determined from each second target object. Based on the first target trajectory information of the first target object during the overlapping time and the second target trajectory information of each third target object during the overlapping time, a fourth target object belonging to the same statistical batch as the first target object is determined from each third target object. This process continues until all target objects in the batch of objects to be counted have been traversed, resulting in the batch statistical results for each target object. By using the position information of each trajectory point of the first target object and the third target object during the overlapping time, as well as the time taken to travel to each trajectory point, it is determined whether the third target object is the fourth target object belonging to the same statistical batch as the first target object. After traversing all target objects, the batch statistical results for each target object are obtained by time and space filtering, thereby improving the accuracy of the batch statistical results for each target object.
[0128] Please see Figure 8 , Figure 8 This is a schematic diagram of a computer-readable storage medium according to an embodiment of the present application. The computer-readable storage medium 80 stores program instructions 801 thereon, which, when executed by a processor, implement the steps in any of the above-described passenger flow batch statistics method embodiments.
[0129] The above scheme obtains the initial trajectory information of the first target object and the second target objects in the batch of objects to be counted by traversing each target object in the batch. Based on the initial trajectory information between the first target object and each second target object, at least one third target object with overlapping time with the first target object is determined from each second target object. Based on the first target trajectory information of the first target object during the overlapping time and the second target trajectory information of each third target object during the overlapping time, a fourth target object belonging to the same statistical batch as the first target object is determined from each third target object. This process continues until all target objects in the batch of objects to be counted have been traversed, resulting in the batch statistical results for each target object. By using the position information of each trajectory point of the first target object and the third target object during the overlapping time, as well as the time taken to travel to each trajectory point, it is determined whether the third target object is the fourth target object belonging to the same statistical batch as the first target object. After traversing all target objects, the batch statistical results for each target object are obtained by time and space filtering, thereby improving the accuracy of the batch statistical results for each target object.
[0130] In some embodiments, the functions or modules of the apparatus provided in this disclosure can be used to perform the methods described in the above method embodiments. The specific implementation can be referred to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.
[0131] The description of the various embodiments above tends to emphasize the differences between the various embodiments. The similarities or similarities between them can be referred to, and for the sake of brevity, they will not be repeated here.
[0132] In the several embodiments provided in this application, it should be understood that the disclosed methods and apparatus can be implemented in other ways. For example, the apparatus implementations described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection of devices or units may be electrical, mechanical, or other forms.
[0133] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0134] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods of various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0135] If the technical solution of this application involves personal information, the product using this technical solution has clearly informed the user of the personal information processing rules and obtained the user's voluntary consent before processing the personal information. If the technical solution of this application involves sensitive personal information, the product using this technical solution has obtained the user's separate consent before processing the sensitive personal information, and also meets the requirement of "express consent". For example, at personal information collection devices such as cameras, clear and prominent signs are set up to inform users that they have entered the scope of personal information collection and that personal information will be collected. If an individual voluntarily enters the collection scope, it is deemed that they have agreed to the collection of their personal information; or on the personal information processing device, with clear signs / information informing users of the personal information processing rules, authorization is obtained from the individual through pop-up information or by asking the individual to upload their personal information; wherein, the personal information processing rules may include information such as the personal information processor, the purpose of personal information processing, the processing method, and the types of personal information processed.
Claims
1. A passenger flow batch counting method characterized by, The method includes: Traverse each target object in the batch of objects to be counted, and obtain the initial trajectory information of the first target object currently being traversed and the second target object in the batch of objects to be counted, excluding the first target object. The initial trajectory information includes the position information of the target object at each trajectory point and the time when it travels to each trajectory point. Based on the initial trajectory information between the first target object and each second target object, at least one third target object that has an overlap time with the first target object is determined from each second target object; Based on the first target trajectory information of the first target object within the overlapping time and the second target trajectory information of each third target object within the overlapping time, a fourth target object that is in the same statistical batch as the first target object is determined from among the third target objects; The batch statistical results for each target object are obtained after traversing all the target objects in the batch to be statistically analyzed.
2. The method of claim 1, wherein, The step of determining a fourth target object from among the third target objects that belongs to the same statistical batch as the first target object based on the first target object's first target trajectory information within the overlapping time and the second target trajectory information of each third target object within the overlapping time includes: For each of the third target objects, perform the following steps: Based on the first target trajectory information and the second target trajectory information, the overlapping time corresponding to the third target object is divided into several initial times, and the number of trajectory points traveled by the same target object in each initial time is a preset threshold. Based on the distance between the first trajectory point of the first target object at each initial time and the second trajectory point of the third target object at the corresponding initial time, the spatiotemporal relationship between the first target object and the third target object at each initial time is determined. In response to the fact that the spatiotemporal correlation of the third target object at each initial time and the duration of each initial time meet the preset requirements, it is confirmed that the third target object is the fourth target object in the same statistical batch as the first target object.
3. The method of claim 2, wherein, The spatiotemporal correlation corresponding to the initial time includes the correlation result between the first target object and the third target object at the initial time; The step of confirming that the third target object is a fourth target object in the same statistical batch as the first target object, in response to the spatiotemporal correlation of the third target object at each initial time and the duration of each initial time meeting preset requirements, includes: In response to the association result corresponding to the initial time indicating that the first target object and the third target object are associated, the initial time is used as a candidate time; Based on the condition of temporal continuity, the candidate times are combined and processed to obtain at least one target time; For each target time, in response to the target time being longer than a first duration threshold, the third target object is confirmed to be a fourth target object in the same statistical batch as the first target object.
4. The method of claim 3, wherein, After the step of combining the candidate times according to the time continuity condition to obtain at least one target time, the method further includes: In response to the fact that the duration of each target time is less than or equal to the first duration threshold, each target time is extended to obtain the adjusted time corresponding to each target time. Based on the first adjustment trajectory information of the first target object in each adjusted time period and the second adjustment trajectory information of the third target object in each adjusted time period, the association result between the first target object and the third target object in each adjusted time period is determined. In response to at least one of the association results corresponding to the adjusted time indicating that the first target object and the third target object are associated, it is confirmed that the third target object is a fourth target object belonging to the same statistical batch as the first target object.
5. The method of claim 4, wherein, The step of determining the association result between the first target object and the third target object at each adjusted time based on the first adjustment trajectory information of the first target object at each adjusted time and the second adjustment trajectory information of the third target object at each adjusted time includes: For each of the adjusted times, perform the following steps: The adjusted time is divided to obtain at least two times to be compared corresponding to the adjusted time; Based on the position information of the trajectory points of the first target object in each time path to be compared and the position information of the trajectory points of the third target object in the corresponding time path to be compared, the target distance between the first target object and the third target object is determined within the adjusted time period; In response to the target distance being greater than or equal to a first distance threshold, the association result corresponding to the adjusted time is determined to be that the first target object and the third target object are not associated. In response to the target distance being less than a first distance threshold, it is determined that the association result corresponding to the adjusted time is that the first target object and the third target object are associated.
6. The method of claim 5, wherein, The time to be compared includes the target time and the extended time corresponding to the adjusted time. The step of determining the target distance between the first target object and the third target object within the adjusted time period based on the position information of the trajectory points of the first target object in each comparison time period and the position information of the trajectory points of the third target object in the corresponding comparison time period includes: Based on the position information of the first target object's trajectory point at the target time and the position information of the third target object's trajectory point at the target time, a first distance between the first target object and the third target object is determined at the target time. Based on the position information of the first target object's trajectory point during the extended time and the position information of the third target object's trajectory point during the extended time, a second distance between the first target object and the third target object is determined within the target time. The target distance is determined based on the first distance and the second distance.
7. The method of claim 4, wherein, The spatiotemporal correlation corresponding to the initial time includes the correlation weight between the first target object and the third target object at the initial time, and the correlation weight is inversely proportional to the distance between the first target object and the third target object at the initial time; the method further includes: Since the association results corresponding to each adjusted time all indicate that the first target object and the third target object are not associated, the total target duration for which there is an association between the first target object and the third target object is determined based on the duration of each candidate time and the association weight corresponding to each candidate time. In response to the total duration of the target being greater than the second duration threshold, it is confirmed that the third target object is the fourth target object in the same statistical batch as the first target object.
8. The method of claim 7, wherein, The method further includes: In response to the total duration of the overlapping time being less than the third duration threshold, the second duration threshold is adjusted to obtain the target duration threshold; In response to the total target duration exceeding the target duration threshold, it is confirmed that the third target object is the fourth target object belonging to the same statistical batch as the first target object.
9. An electronic device, comprising: include: A memory and a processor, wherein the memory stores program instructions, and the processor retrieves the program instructions from the memory to perform the method as claimed in any one of claims 1-8.
10. A computer-readable storage medium having stored thereon program instructions, wherein, When the program instructions are executed by the processor, they are used to implement the method as described in any one of claims 1-8.