CN111553732A - Method and device for processing movement track - Google Patents

Method and device for processing movement track Download PDF

Info

Publication number
CN111553732A
CN111553732A CN202010347241.9A CN202010347241A CN111553732A CN 111553732 A CN111553732 A CN 111553732A CN 202010347241 A CN202010347241 A CN 202010347241A CN 111553732 A CN111553732 A CN 111553732A
Authority
CN
China
Prior art keywords
coordinate point
coordinate
track
combination
point combination
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010347241.9A
Other languages
Chinese (zh)
Other versions
CN111553732B (en
Inventor
邓范鑫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Aibee Technology Co Ltd
Original Assignee
Beijing Aibee Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Aibee Technology Co Ltd filed Critical Beijing Aibee Technology Co Ltd
Priority to CN202010347241.9A priority Critical patent/CN111553732B/en
Publication of CN111553732A publication Critical patent/CN111553732A/en
Application granted granted Critical
Publication of CN111553732B publication Critical patent/CN111553732B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0201Market modelling; Market analysis; Collecting market data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/215Improving data quality; Data cleansing, e.g. de-duplication, removing invalid entries or correcting typographical errors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases

Abstract

The application provides a processing method and a processing device of a movement track, which are used for obtaining the movement track to be processed; determining a first coordinate point combination by the coordinate point combination with missing track in the moving track to be processed, and screening out a matched reference track from a plurality of reference tracks in a historical track library according to a matching rule for each first coordinate point combination to be used as a completion track of the first coordinate point combination; the reference trajectory is a complete trajectory of two coordinate points including the first combination of coordinate points; and (4) completing the missing track by using a coordinate point positioned between two coordinate points of the first coordinate point combination in the completing track of the first coordinate point combination to obtain a completed moving track. Therefore, the missing part of the movement track to be processed can be supplemented by the complete track which comprises the partial coordinate points of the movement track to be processed and is matched with the missing part of the movement track to be processed, so that the missing movement track to be processed is supplemented based on the co-occurrence principle.

Description

Method and device for processing movement track
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a method and an apparatus for processing a movement trajectory.
Background
Most locations (including but not limited to cells, campuses, superstores, etc.) have monitoring equipment installed at multiple locations within the covered area to enable monitoring of active personnel within the area. Based on this, the monitoring screen may be analyzed to obtain a plurality of coordinate points corresponding to positions that the person passes through while moving within the area and a time stamp (for indicating a time point at which the corresponding position passes) for each coordinate point, and the movement trajectory of the corresponding person is obtained by combining the positions according to the corresponding time stamps. Various track value mining tasks can be executed based on the movement track of the person, for example, suspicious persons are detected through the movement track, the preference of the corresponding person to different shops is judged, and the like.
In an actual environment, it is generally difficult to obtain a complete movement track of a person in a certain area, for example, in an occasion (such as a mall) with a high person density, the occlusion of different persons and the failure of re-identification of the person can cause that the position of a specific person cannot be determined within a period of time, these factors can finally cause the loss of the movement track of the corresponding person, and the loss of the movement track will cause the accuracy of the result output by the subsequent track value mining task to be reduced.
Disclosure of Invention
In view of the above problems, the present application provides a method and an apparatus for processing a movement trajectory, so as to provide a scheme capable of completing a missing movement trajectory.
The first aspect of the present application provides a method for processing a movement trajectory, including:
obtaining a movement track to be processed generated by the movement of a target object in a target area; the movement track to be processed comprises a plurality of coordinate points used for representing the passing position of the target object and a timestamp corresponding to each coordinate point;
determining a first coordinate point combination of the movement track to be processed; taking every two adjacent coordinate points of the movement track to be processed as a coordinate point combination; the first coordinate point combination refers to a coordinate point combination with a missing track in the movement track to be processed;
for each first coordinate point combination, screening out a reference track matched with the first coordinate point combination from a plurality of reference tracks in a historical track library according to a preset matching rule, and taking the reference track as a completion track of the first coordinate point combination; wherein the reference trajectory refers to a movement trajectory including two coordinate points of the first coordinate point combination and having no missing trajectory between the two coordinate points;
for each first coordinate point combination, using other coordinate points positioned between two coordinate points included in the first coordinate point combination in the completion track of the first coordinate point combination to complete the missing track corresponding to the first coordinate point combination of the movement track to be processed; and combining the supplemented missing track corresponding to each first coordinate point combination and the to-be-processed moving track to serve as the supplemented moving track.
Optionally, the determining a first coordinate point combination of the movement trajectory to be processed includes:
for each coordinate point combination of the movement track to be processed, judging whether the time interval of two coordinate points of the coordinate point combination is larger than a first threshold value or not, and judging whether the two coordinate points of the coordinate point combination are reasonable break points or not; wherein the reasonable break points refer to coordinate points when the target object enters and leaves a monitoring blind area;
and aiming at each coordinate point combination of the moving track to be processed, if the time interval of two coordinate points of the coordinate point combination is greater than a first threshold value and the two coordinate points of the coordinate point combination are not all reasonable breakpoints, determining the coordinate point combination as a first coordinate point combination.
Optionally, for each first coordinate point combination, screening, according to a preset matching rule, a reference trajectory matched with the first coordinate point combination from a plurality of reference trajectories in a historical trajectory library, as a completion trajectory of the first coordinate point combination, including:
for each first coordinate point combination, calculating a motion state parameter of the first coordinate point combination in the movement track to be processed, and calculating a motion state parameter of the first coordinate point combination in each reference track;
for each first coordinate point combination, judging whether a reference track meeting a matching condition exists in a plurality of reference tracks corresponding to the first coordinate point combination; the matching condition is that the difference value between the motion state parameter of the first coordinate point combination in the movement track to be processed and the motion state parameter of the first coordinate point combination in the reference track is smaller than a corresponding threshold value;
and for each first coordinate point combination, if a reference track meeting the matching condition exists in a plurality of reference tracks corresponding to the first coordinate point combination, determining the reference track meeting the matching condition as a completion track of the first coordinate point combination.
Optionally, after determining, for each first coordinate point combination, whether there is a reference trajectory that satisfies a matching condition in the multiple reference trajectories corresponding to the first coordinate point combination, the method further includes:
and for each first coordinate point combination, if each reference track corresponding to the first coordinate point combination does not meet the matching condition, updating the motion state parameters of the first coordinate point combination in the reference tracks according to a preset updating strategy, and returning to execute the judgment of whether a plurality of reference tracks corresponding to the first coordinate point combination have reference tracks meeting the matching condition or not until the reference tracks meeting the matching condition exist in the plurality of reference tracks corresponding to the first coordinate point combination.
Optionally, the complementing the missing track corresponding to the first coordinate point combination of the movement track to be processed with another coordinate point located between two coordinate points included in the first coordinate point combination in the complementing track of the first coordinate point combination includes:
if the first coordinate point combination corresponds to one completion track, inserting other coordinate points positioned between the two coordinate points of the first coordinate point combination in the completion track of the first coordinate point combination into the two coordinate points of the first coordinate point combination of the movement track to be processed;
if the first coordinate point combination corresponds to a plurality of completion tracks, selecting a plurality of coordinate points from high to low according to the occurrence frequency of each coordinate point in the coordinate point set, and inserting the selected coordinate point between the two coordinate points of the first coordinate point combination of the movement track to be processed; wherein the set of coordinate points includes, in each of the completion trajectories of the first combination of coordinate points, other coordinate points located between two coordinate points of the first combination of coordinate points; the number of the selected coordinate points is determined according to the time interval between two coordinate points of the first coordinate point combination;
setting a corresponding time stamp for each coordinate point between the two coordinate points of the first coordinate point combination inserted into the movement track to be processed.
Optionally, before determining the first coordinate point combination of the movement trajectory to be processed, the method further includes:
determining each coordinate point combination of the movement track to be processed, which meets preset key coordinate point prediction conditions, as a second coordinate point combination;
processing the movement track to be processed by utilizing a pre-trained coordinate point prediction model aiming at each second coordinate point combination to obtain a plurality of key coordinate points corresponding to the second coordinate point combination;
for each second coordinate point combination, inserting the plurality of key coordinate points corresponding to the second coordinate point combination between two coordinate points of the second coordinate point combination, and setting a corresponding timestamp for each key coordinate point;
wherein the determining of the first coordinate point combination of the movement trajectory to be processed comprises:
and determining a first coordinate point combination of the movement track to be processed after the key coordinate points are inserted.
Optionally, for each second coordinate point combination, processing the movement trajectory to be processed by using a pre-trained coordinate point prediction model to obtain a plurality of key coordinate points corresponding to the second coordinate point combination, including:
for each second coordinate point combination, inserting a plurality of mask units between two coordinate points of the second coordinate point combination; wherein the number of the mask units is determined according to a time interval of the two coordinate points of the second coordinate point combination;
converting the coordinates of each coordinate point of the movement track to be processed and the mask unit into corresponding labels;
for each second coordinate point combination, inputting a label sequence which comprises a plurality of labels and corresponds to the second coordinate point combination into a coordinate point prediction model which is trained in advance, and obtaining a plurality of key coordinate points corresponding to the second coordinate point combination; the label sequence corresponding to the second coordinate point combination comprises labels of two coordinate points of the second coordinate point combination, a label of each mask unit corresponding to the second coordinate point combination, and labels of a coordinate point before the second coordinate point combination and a coordinate point after the second coordinate point combination in the movement track to be processed.
Optionally, the method for training the coordinate point prediction model includes:
pre-training a pre-constructed bidirectional coding representation model based on a converter by using a plurality of complete tracks to obtain a pre-training model;
randomly selecting a plurality of coordinate points from each complete track as sample coordinate points, and deleting the sample coordinate points from the complete tracks to obtain deleted moving tracks corresponding to each complete track;
inputting a plurality of deleted movement tracks into the pre-training model, and performing optimization training on the pre-training model to obtain the coordinate point prediction model by taking a prediction coordinate point obtained by processing the deleted movement tracks by the pre-training model to approach to the deleted sample coordinate point as a target.
Optionally, before determining the first coordinate point combination of the movement trajectory to be processed, the method further includes:
for each coordinate point of the movement track to be processed, dividing the distance between the coordinate point and the coordinate point which is one coordinate point before the coordinate point by the difference between the timestamp of the coordinate point and the timestamp of the coordinate point which is one coordinate point before the coordinate point to obtain the speed of the coordinate point;
and determining each coordinate point of the movement track to be processed, wherein the speed of each coordinate point is greater than a preset speed threshold value, as an abnormal coordinate point, and deleting the abnormal coordinate points.
Optionally, the method for determining whether any coordinate point of the movement trajectory to be processed is a reasonable breakpoint includes:
judging whether the time interval between the coordinate point and a coordinate point before the coordinate point is greater than a third threshold value, judging whether the time interval between the coordinate point and a coordinate point after the coordinate point is greater than the third threshold value, judging whether the coordinate point is a starting coordinate point of the movement track to be processed, and judging whether the coordinate point is an ending coordinate point of the movement track to be processed;
if the judgment result of any judgment is yes, determining the coordinate point as a breakpoint;
displaying a plane map of the target area on a display device, and displaying the breakpoint on the plane map of the target area;
and responding to a first marking instruction of the user for the breakpoint, and determining the breakpoint as a reasonable breakpoint.
A second aspect of the present application provides a processing apparatus for a movement trajectory, including:
the acquisition unit is used for acquiring a movement track to be processed, which is generated by the movement of the target object in the target area; the movement track to be processed comprises a plurality of coordinate points used for representing the passing position of the target object and a timestamp corresponding to each coordinate point;
the determining unit is used for determining a first coordinate point combination of the movement track to be processed; taking every two adjacent coordinate points of the movement track to be processed as a coordinate point combination; the first coordinate point combination refers to a coordinate point combination with a missing track in the movement track to be processed;
the matching unit is used for screening out a reference track matched with the first coordinate point combination from a plurality of reference tracks in a historical track library according to a preset matching rule for each first coordinate point combination to serve as a completion track of the first coordinate point combination; wherein the reference trajectory refers to a movement trajectory including two coordinate points of the first coordinate point combination and having no missing trajectory between the two coordinate points;
a completion unit, configured to, for each first coordinate point combination, complete a missing trajectory corresponding to the first coordinate point combination of the movement trajectory to be processed with another coordinate point located between two coordinate points included in the first coordinate point combination in a completion trajectory of the first coordinate point combination; and combining the supplemented missing track corresponding to each first coordinate point combination and the to-be-processed moving track to serve as the supplemented moving track.
A third aspect of the present application provides an electronic device comprising a memory and a processor;
the memory is used for storing programs;
the processor is configured to execute the program, and when the program is executed, the program is configured to implement the processing method for the movement trajectory provided in any one of the first aspect of the present application.
A fourth aspect of the present application provides a computer storage medium for storing a program, which when executed, is configured to implement the processing method for a movement trajectory provided in any one of the first aspects of the present application.
The application provides a processing method and a processing device of a moving track, which are used for obtaining a to-be-processed moving track generated by a target object moving in a target area and determining a first coordinate point combination of the to-be-processed moving track; every two adjacent coordinate points of the movement track to be processed serve as a coordinate point combination, the first coordinate point combination refers to the coordinate point combination with a missing track, and for each first coordinate point combination, a reference track matched with the first coordinate point combination is screened out from a plurality of reference tracks of a historical track library according to a preset matching rule and serves as a completion track of the first coordinate point combination; a reference trajectory refers to two coordinate points including a first combination of coordinate points, and a movement trajectory of a missing trajectory does not exist between the two coordinate points; and for each first coordinate point combination, using other coordinate points positioned between two coordinate points included in the first coordinate point combination in the completion track of the first coordinate point combination to complete the missing track between the two coordinate points of the first coordinate point combination of the movement track to be processed, and obtaining the completed movement track. Therefore, for the to-be-processed moving track with partial deletion, the scheme can supplement the missing part of the to-be-processed moving track with the coordinate points in the complete track which comprises the partial coordinate points of the to-be-processed moving track and is matched with the missing part of the to-be-processed moving track, so that the missing to-be-processed moving track is accurately supplemented.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a method for processing a movement trajectory according to an embodiment of the present application;
FIG. 2 is a diagram illustrating a result after rasterizing a target region according to an embodiment of the present application;
fig. 3 is a flowchart of a method for determining a reasonable breakpoint in a moving trajectory according to an embodiment of the present application;
fig. 4 is a schematic diagram of an interface for displaying a breakpoint in a planar map of a target area according to an embodiment of the present application;
fig. 5 is a flowchart of a method for determining a completion trajectory of a coordinate point combination according to an embodiment of the present disclosure;
fig. 6 is a flowchart of a method for processing a movement trajectory according to another embodiment of the present application;
fig. 7 is a schematic diagram of a to-be-processed movement track and a completed movement track according to an embodiment of the present application;
fig. 8 is a flowchart of a training method of a coordinate point prediction model according to an embodiment of the present disclosure;
fig. 9 is a schematic structural diagram of a device for processing a movement trajectory according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the application provides a processing method of a moving track, which is used for processing the acquired moving track with partial deletion in an occasion where the moving track of a person needs to be acquired so as to complement the missing coordinate points in the moving track, so that accurate results can be obtained for subsequent track value mining tasks performed based on the moving track.
Referring to fig. 1, the method for processing a moving track provided in this embodiment includes the following steps:
s101, obtaining a movement track to be processed, generated by the movement of the target object in the target area.
Wherein the target object is any object that has entered the target area.
The movement trajectory includes a plurality of coordinate points indicating positions where the target object passes, and each coordinate point corresponds to a time stamp, and the time stamp corresponding to the coordinate point may indicate a time when the target object passes the corresponding position.
The target area may be any area in life where monitoring devices covering most of the whole area are arranged, for example, a large number of monitoring devices are arranged in a shopping mall, a school campus, a hospital, and the like, and people moving in the area can be monitored in real time, and such an area can be used as the target area in the embodiment of the present application. The target object refers to any person who enters the target area, and specifically, each person who enters the target area within a period of time may be determined as the target object, so that the processing method provided in this embodiment is performed on the movement trajectory of each person who enters the target area within the period of time within the target area.
It should be noted that the method for processing the movement trajectory provided in any embodiment of the present application may be executed in real time when the target object enters the target area and is moving in the target area, that is, when the target object moves in the target area, on one hand, the coordinate point where the target object is located at each moment is obtained through real-time monitoring, on the other hand, a movement trajectory formed by a plurality of coordinate points that the target object has passed through may be used as the movement trajectory to be processed, and the method provided in this embodiment may be executed accordingly.
Of course, the processing method of the movement trajectory provided in any embodiment of the present application may also be executed after the target object moves in the target area and leaves from the target area. For example, assuming that the target area is a shopping mall with business hours of 8:00 to 22:00, the processing method of the movement track provided by the present application may be executed after 22:00 of the day, so as to process the movement track of each consumer who is moving in the shopping mall on the day.
In addition, the processing method of the movement track to be processed provided in any embodiment of the present application is mainly used for processing the movement track in one plane, and for a place with a multi-layer structure, for example, a large mall with multiple floors, each floor of the mall may be used as a target area.
The moving track of a certain person a in the target area can be recognized by using various existing recognition algorithms (including but not limited to pedestrian detection, pedestrian re-recognition and face recognition) based on visual images, and then, for the image in which the person a is recognized to exist, the planar position of the person a in the target area in the image is determined by using a two-dimensional plane-to-three-dimensional coordinate space conversion algorithm, so that the position of the person a at each moment during the movement of the person a in the target area can be obtained by analyzing the monitored image at each moment in the period of the movement of the person a in the target area. Then, only a reasonable coordinate system needs to be established in the target area, the position of the person A at each moment can be converted into a corresponding coordinate point, and the time stamp of the coordinate point is the moment when the monitoring equipment shoots to obtain a corresponding monitoring image.
One way to establish a coordinate system is to rasterize the target area at certain distance intervals S. That is, in the horizontal direction and the vertical direction, a grid line is set every time a distance interval S is passed, so that the target area can be divided into a plurality of square grids with the side length S, and then a vertex of a certain square grid is selected as an origin, so that a coordinate system can be obtained. The result of an optional rasterization can be represented by fig. 2, where the dots in fig. 2 represent coordinate points used to represent the location of a person in a mall after rasterization.
On the basis, for the position of any one person in each square grid, the vertex closest to the position in the four vertexes of the square grid can be used as the coordinate point of the position. The coordinate values of each coordinate point can be represented by the corresponding grid line as the second grid line from the origin. For example, the coordinate value of the labeled coordinate point a in fig. 2 can be represented as (1, 2).
The distance interval may be set to 1m or 0.5m, or may be set to other values, which is not limited in the present application.
The foregoing analysis of the monitoring image refers to intercepting and analyzing the current monitoring image once every time a sampling time interval T elapses after the monitoring device is started, where T may be preset to any value according to actual needs, and may be set to 1s or 0.5s, for example. For example, when T is set to 1s, the current monitoring images may be stored every 1 second after the monitoring device in the target area is started, and the above analysis may be subsequently performed on these monitoring images, thereby determining the positions of the respective persons in the target area every 1 second passes.
S102, detecting the position of a missing track in the movement track to be processed.
One or more continuous missing coordinate points in the movement track to be processed are called a segment of missing track in the movement track to be processed, and the positions of the missing tracks can be represented by coordinate points which exist in the movement track to be processed and are positioned at two ends of the missing track.
In other words, step S102 may also be understood as determining whether one or more missing coordinate points exist between two adjacent coordinate points in the movement trajectory to be processed (each two adjacent coordinate points may be referred to as one coordinate point combination), that is, determining whether a missing trajectory exists between the two coordinate points, and if it is determined that a missing trajectory exists between the two coordinate points, then recording a position between the two coordinate points in the combination as a position where a segment of the missing trajectory exists in the movement trajectory to be processed, and determining the combination of the coordinate points as a combination of coordinate points in which a missing trajectory exists (the combination of coordinate points in which a missing trajectory exists may also be referred to as a first coordinate point combination in this application).
It is understood that a movement trajectory to be processed may or may not have a plurality of first coordinate point combinations satisfying the above conditions.
The method for determining whether a missing track exists between two coordinate points of one coordinate point combination may be:
and subtracting the timestamps of the two coordinate points to obtain the time interval of the two coordinate points, and if the time interval of the two coordinate points is greater than a first threshold and the two coordinate points are not all reasonable breakpoints, determining that a missing track exists between the two coordinate points.
The value of the first threshold depends on the sampling time interval T, and specifically, the first threshold may be set to be equal to the sampling time interval T, or may also be set to be slightly larger than the sampling time interval T, which is not limited in this application.
For example, a sampling time interval T may be set to be equal to 1s, a first threshold value may be equal to T, each coordinate point combination in the movement trajectory to be processed is detected, two coordinate points (denoted as coordinate point a and coordinate point B) included in a certain coordinate point combination are found, a time interval between a timestamp T0 corresponding to coordinate point a and a timestamp T1 corresponding to coordinate point B is 10s, and neither coordinate point a nor coordinate point B is a reasonable breakpoint, and it is determined that a missing trajectory exists between coordinate point a and coordinate point B.
It is to be understood that, in the above example, there should be a plurality of coordinate points between coordinate point a and coordinate point B whose corresponding time stamps are located between T0 and T1, however, there is no other coordinate point between coordinate point a and coordinate point B in the movement locus to be processed, and therefore it can be determined that a plurality of consecutive coordinate points are missing between coordinate point a and coordinate point B, in other words, it can be determined that there is a missing locus between the two coordinate points.
Reasonable breakpoints refer to coordinate points where a target object enters and leaves the monitoring blind zone. The monitoring blind area is defined as an area that cannot be monitored by the monitoring device in the target area, and may specifically include areas outside the target area and some areas in the target area where the monitoring device is not configured.
Taking a mall as an example, the monitoring coverage area of the mall is a public activity area of the mall, for example, an aisle of the mall is the public activity area, a plurality of shops are further arranged in the mall, each shop occupies a certain area in the mall, and the monitoring of the mall does not cover the space in each shop of the mall, so that the area covered by the shops is a monitoring blind area in the mall.
Similarly, the monitoring area of the campus covers roads in the campus, but does not cover spaces in buildings (such as teaching buildings and libraries), so that the area covered by each building is a monitoring blind area for the campus.
Further, for the monitoring devices in the target area, the space outside the target area also belongs to the monitoring blind area, for example, roads outside shopping malls and campuses all belong to the monitoring blind area.
Thus, if the target area is a mall, then reasonable breakpoints may include coordinate points when the target object enters and leaves the mall, and coordinate points when the target object enters and leaves each store within the mall.
It can be understood that the monitoring blind area is not limited to the above area, and taking a shopping mall as an example, the monitoring blind area of the shopping mall may further include a washroom, a changing room, and the like.
The specific method for determining the reasonable breakpoint refers to the description of the following embodiments.
The two coordinate points of one coordinate point combination are not all reasonable breakpoints, and the first condition is that neither of the two coordinate points of the coordinate point combination is a reasonable breakpoint; second, one of the two coordinate points of the combination of coordinate points is a reasonable break point, and the other coordinate point is not a reasonable break point.
Optionally, before executing step S102, the abnormal coordinate point in the movement track to be processed may be deleted, and then step S102 may be executed on the movement track to be processed after the abnormal coordinate point is deleted.
An alternative method of determining an anomaly coordinate point is as follows:
and respectively calculating the distance between the coordinate point and the coordinate point which is before the coordinate point and the time interval between the coordinate point and the coordinate point which is before the coordinate point for each coordinate point of the movement track to be processed, and then dividing the distance by the time interval to obtain the speed of the coordinate point. And judging whether the speed of the coordinate point is greater than a preset speed threshold value or not, and if the speed of the coordinate point is greater than the speed threshold value, determining the coordinate point as an abnormal coordinate point. The speed threshold may be determined based on the target object. For example, if the target object is a person moving within a mall, the speed threshold may be set to 5 meters/second.
If the abnormal coordinate points do not exist in the movement track to be processed and missing tracks do not exist between the two coordinate points of each coordinate point combination, the movement track to be processed is a complete movement track, and completion is not needed, so that subsequent steps are not executed.
S103, aiming at each coordinate point combination with the missing track, screening out a reference track matched with the coordinate point combination from a plurality of reference tracks according to a preset matching rule to be used as a completion track of the coordinate point combination.
And for any coordinate point combination with a missing track in the movement tracks to be processed, the reference track of the coordinate point combination refers to a movement track which meets the conditions that two coordinate points comprising the coordinate point combination are included in the historical track library and no missing track exists between the two coordinate points.
Assuming that a coordinate point combination with a missing track in a to-be-processed movement track respectively includes a coordinate point a and a coordinate point B, for a plurality of movement tracks recorded in a historical track library, if a certain movement track also includes the coordinate point a and the coordinate point B, and there is no missing track between the coordinate point a and the coordinate point B in the movement track, the movement track may be determined as a reference track of the coordinate point combination.
For any coordinate point combination with a missing track, the preset matching rule is as follows: in the movement track to be processed, the motion parameters when the target object is located around the coordinate point combination are matched with the motion parameters when the object corresponding to the reference track is located in the similar area in the reference track.
The motion parameters for matching may include an average speed when reaching or being away from a coordinate point of the coordinate point combination, a time when moving from one coordinate point of the coordinate point combination to another coordinate point of the coordinate point combination, and the like, which is not limited in the present application. The flow of performing an alternative matching method may refer to the description of the following embodiments.
And S104, for each coordinate point combination with the missing track, and using a completion track of the coordinate point combination to complete the missing track corresponding to the coordinate point combination.
For any coordinate point combination with a missing track, the completion of the missing track of the coordinate point combination means that other coordinate points located between two coordinate points included in the coordinate point combination in the completion track of the coordinate point combination are inserted between two coordinate points of the coordinate point combination in the movement track to be processed, so that the completion of the missing track corresponding to the coordinate point combination is completed.
For example, if a first coordinate point combination in the movement track to be processed includes coordinate points X and Y, and the completion track of the first coordinate point combination includes coordinate points X, a, B, C, D, E and Y, i.e. there are 5 other coordinate points between coordinate point X and coordinate point Y, then the completion of step S104 is to insert 5 coordinate points a, B, C, D and E in the completion track into the coordinate points X and Y of the movement track to be processed, so that the movement track to be processed also includes X, a, B, C, D, E and Y, and then corresponding timestamps are set for the 5 coordinate points a, B, C, D and E inserted into the movement track to be processed according to the timestamps of coordinate point X and coordinate point Y in the movement track to be processed, and after the timestamps are set for the 5 coordinate points, the completion track of the movement track to be processed is completed by setting the timestamps for the missing track corresponding to the first coordinate point combination consisting of coordinate point X and coordinate point Y .
The timestamp of the coordinate point inserted into the movement track to be processed can be determined according to the timestamps of the two coordinate points included in the coordinate point combination, the preset sampling time interval and the number of the inserted coordinate points.
For example, a combination of coordinate points where a missing trajectory exists includes a first coordinate point, a corresponding timestamp is T0, and a second coordinate point, a corresponding timestamp is T1, a time interval between T1 and T0 is 10S, 9 coordinate points are inserted between the first coordinate point and the second coordinate point of the movement trajectory to be processed when step S104 is performed, and a sampling time interval is 1S, then a timestamp 1S after the timestamp T0, i.e., T0+1S, may be set as the timestamp of the first inserted coordinate point, then T0+2S may be set as the timestamp of the second inserted coordinate point, and so on until T0+9S (i.e., T1-1S) is set as the timestamp of the ninth inserted coordinate point.
In other words, when setting the time stamps, it is necessary to ensure that the time interval between every two adjacent coordinate points (i.e., the difference between the time stamps corresponding to the two coordinate points) is not greater than the sampling time interval.
The sequence of the inserted coordinate points is consistent with the sequence of the coordinate points in the corresponding completion track.
For any first coordinate point combination in the movement track to be processed, if the first coordinate point combination corresponds to a plurality of completion tracks, firstly, other coordinate points which are positioned between two coordinate points of the first coordinate point combination in each completion track can form a coordinate point set, then, the frequency of each coordinate point in the coordinate point set is counted, and finally, the first N coordinate points in the coordinate point set are selected as the coordinate points which are inserted into the missing track of the movement track to be processed according to the number N of the coordinate points which are inserted between the two coordinate points of the first coordinate point combination from high to low according to the occurrence frequency.
The number N of coordinate points to be inserted between two coordinate points of a first coordinate point combination may be determined based on the time interval between two coordinate points of the first coordinate point combination and the above-mentioned sampling time interval. For example, if the time interval between two coordinate points of a first coordinate point combination is 6 seconds and the sampling time interval is set to 1 second, the time interval between the two coordinate points may be divided by the sampling time interval, and then the obtained quotient is subtracted by 1, so as to obtain the number N of coordinate points to be inserted between the two coordinate points of the first coordinate point combination of the movement track to be processed.
For example, there is a first coordinate point combination in the movement track to be processed, and two coordinate points included in the first coordinate point combination in the movement track to be processed are recorded as X and Y, where the coordinate point X is previous, and it has been determined that 5 coordinate points need to be inserted between the coordinate point X and the coordinate point Y of the movement track to be processed, there are 5 completion tracks corresponding to the first coordinate point combination, and there are 5 other coordinate points between the coordinate point X and the coordinate point Y in each completion track. The set of coordinate points formed by the 5 coordinate points of the 5 completion tracks can be represented by the following table 1:
TABLE 1
Figure BDA0002470570830000131
Figure BDA0002470570830000141
In table 1, coordinate point 1 represents the first coordinate point after coordinate point X in a certain completion track, coordinate points 2,3,4 and 5 are analogized, the symbol of the cell in the table represents the position of each coordinate point in a certain completion track, the positions of different symbols are different, and if the positions of two coordinate points are the same, the two coordinate points can be considered to be the same coordinate point.
As can be seen from table 1, for the above-described coordinate point set, the first 5 coordinate points are coordinate point a1 (appearing 3 times), coordinate point B2 (appearing 3 times), coordinate point C2 (appearing 4 times), coordinate point D1 (appearing 4 times), and coordinate point E2 (appearing 5 times), respectively, in order from high to low in the frequency of appearance. Therefore, the coordinate points a1, B2, C2, D1, and E2 may be determined as 5 coordinate points between the coordinate point X and the coordinate point Y for inserting the movement trajectory to be processed.
In summary, when a plurality of completion tracks correspond to one first coordinate point combination, a coordinate point having a higher frequency of appearance among the completion tracks may be selected as a coordinate point for inserting the movement track to be processed.
After the missing track corresponding to each first coordinate point combination of the movement track to be processed is completed in the above manner, the combination of the plurality of coordinate points inserted between the two coordinate points of each first coordinate point combination and the movement track to be processed becomes the completed movement track.
The application provides a processing method of a movement track, which comprises the steps of obtaining a movement track to be processed generated by a target object moving in a target area, and determining a first coordinate point combination of the movement track to be processed; every two adjacent coordinate points of the movement track to be processed serve as a coordinate point combination, the first coordinate point combination refers to the coordinate point combination with a missing track, and for each first coordinate point combination, a reference track matched with the first coordinate point combination is screened out from a plurality of reference tracks of a historical track library according to a preset matching rule and serves as a completion track of the first coordinate point combination; a reference trajectory refers to two coordinate points including a first combination of coordinate points, and a movement trajectory of a missing trajectory does not exist between the two coordinate points; and for each first coordinate point combination, using other coordinate points positioned between two coordinate points included in the first coordinate point combination in the completion track of the first coordinate point combination to complete the missing track between the two coordinate points of the first coordinate point combination of the movement track to be processed, and obtaining the completed movement track. Therefore, for the to-be-processed moving track with partial deletion, the scheme can supplement the missing part of the to-be-processed moving track with the coordinate points in the complete track which comprises the partial coordinate points of the to-be-processed moving track and is matched with the missing part of the to-be-processed moving track, so that the missing to-be-processed moving track is accurately supplemented.
Furthermore, the embodiment of the application distinguishes reasonable coordinate point missing caused by moving the target object to the monitoring blind area and unreasonable coordinate point missing caused by identification failure by identifying reasonable breakpoints in the moving track to be processed, avoids the coordinate point of the target object in the monitoring blind area in the moving track after completion, and guarantees the reasonability of the time sequence.
Referring to fig. 3, fig. 3 shows a flow of a method for determining whether a certain coordinate point is a reasonable breakpoint, and by executing the method on each coordinate point in the movement track to be processed, whether a reasonable breakpoint exists in the movement track to be processed can be identified, and when a reasonable breakpoint exists, which coordinate points are reasonable breakpoints can be identified.
The method comprises the following steps:
s301, judging whether the current coordinate point is a breakpoint.
The judgment of the step S301 specifically includes the following four items:
judging whether the time interval between the current coordinate point and a coordinate point before the current coordinate point is greater than a third threshold value or not;
judging whether the time interval between the current coordinate point and a coordinate point next to the current coordinate point is greater than a third threshold value or not;
judging whether the current coordinate point is the first coordinate point of the moving track;
and judging whether the current coordinate point is the last coordinate point of the moving track.
And if one or more judgment results are yes in the four judgment items, determining that the current coordinate point is a breakpoint.
If the current coordinate point is a breakpoint, step S302 is executed, and if the current coordinate point is not a breakpoint, the method ends.
When a breakpoint in the movement track to be processed is detected, each coordinate point of the movement track to be processed may be used as a current coordinate point one by one from one end of the movement track to be processed, and the method provided in this embodiment is executed.
And S302, displaying the current coordinate point on the plane map of the target area displayed by the display device.
The plane map of the target area displays the boundary of the target area, and the boundary is communicated with the entrance and the exit of the target area, each monitoring blind area in the target area and the entrance and the exit of the monitoring blind area.
For example, if the target area is a mall including a plurality of stores, the planar map of the target area may show the area occupied by each store, and the planar map of the mall may show the entrance and exit of the mall, each store of the mall, the area covered by the monitoring blind area such as the washroom and the changing room, and the entrance and exit of these areas.
S303, responding to a first marking instruction of the user to the breakpoint, and determining the breakpoint as a reasonable breakpoint.
The user in step S303 refers to a technician responsible for executing the labeling task of the reasonable breakpoint.
By combining the plane map of the target area, a user can judge whether a breakpoint is a coordinate point where a corresponding object is about to enter the monitoring blind area or just leave the monitoring blind area by observing whether the breakpoint is at the entrance or the exit of the monitoring blind area in the target area, if the breakpoint satisfies one of the two conditions, namely the breakpoint is the coordinate point where the corresponding object is about to enter the monitoring blind area or the breakpoint is the coordinate point where the corresponding object is just left from the monitoring blind area, the user can trigger a first marking instruction for the breakpoint, so that the breakpoint is marked as a reasonable breakpoint, and if the breakpoint does not satisfy any of the two conditions, the user can trigger a second marking instruction for the breakpoint, so that the breakpoint is marked as an unreasonable breakpoint.
A display interface of a planar map of an optional breakpoint and a target area can be shown in fig. 4, and it can be found that, where a breakpoint 1 and a breakpoint 2 are both close to the entrance of the store 1, the two breakpoints can be considered as coordinate points when a person in a mall is about to enter the store 1 and just leaves the store 1, and therefore the two breakpoints are determined as reasonable breakpoints, and a breakpoint 3 is far from the entrance of any store, so that the two breakpoints are marked as unreasonable breakpoints.
It is understood that the method shown in fig. 3 may be applied to each coordinate point of the movement trajectory to be processed, and may also be applied to each coordinate point of any movement trajectory other than the movement trajectory to be processed.
Alternatively, when communication between the server for processing the monitoring image to obtain the coordinate points and the display device for displaying the planar map to the user is not possible (i.e., when the server is in an off-line state), it may be determined whether or not a breakpoint is a reasonable breakpoint by:
firstly, for each breakpoint within a past period of time (for example, within the past year or the past month), determining whether a time interval between the breakpoint and a coordinate point before the breakpoint and a time interval between the breakpoint and a coordinate point after the breakpoint are greater than a preset fourth threshold (optionally, the fourth threshold may be set to 15s), if any one or two of the time intervals are greater than the fourth threshold, recording the breakpoint in a local full breakpoint library, otherwise, if neither of the time intervals is greater than the fourth threshold, not recording the breakpoint in the local full breakpoint library.
On the basis, if a breakpoint is detected in an off-line state, density clustering is performed on the breakpoint and all breakpoints in the full breakpoint library, so that the newly added breakpoint and all breakpoints recorded in the full breakpoint library are divided into a plurality of categories, each category comprises a plurality of breakpoints, if the proportion of the reasonable breakpoints in the category to which the newly added breakpoint belongs is greater than the proportion of the unreasonable breakpoints, the newly added breakpoint is determined as the reasonable breakpoint, and if the proportion of the unreasonable breakpoints in the category to which the newly added breakpoint belongs is greater than the proportion of the reasonable breakpoints, the newly added breakpoint is determined as the unreasonable breakpoint.
It can be understood that, if a plurality of target areas exist (for example, in a mall with a plurality of floors, each floor is a target area), each target area may establish a corresponding full breakpoint library for determining whether a newly added breakpoint is a reasonable breakpoint when the newly added breakpoint exists in the target area.
The embodiment of the present application provides a method for screening a completion track, which is used for screening a reference track matched with a first coordinate point combination from multiple reference tracks according to a preset matching rule for any first coordinate point combination, and taking the reference track as the completion track of the first coordinate point combination, please refer to fig. 5, and the method specifically includes the following steps:
s501, calculating motion state parameters of the movement tracks to be processed and motion state parameters of each reference track.
The motion state parameter of the movement track to be processed refers to the motion state parameter of the first coordinate point combination in the movement track to be processed, which needs to be subjected to the screening of the completion track currently, and correspondingly, the motion state parameter of a reference track refers to the motion state parameter of the first coordinate point combination in the reference track, which needs to be subjected to the screening of the completion track currently.
The motion state parameters of the first coordinate point combination in the moving track to be processed comprise a first speed value, a second speed value and a third speed value of the first coordinate point combination in the moving track to be processed, and a time interval between two coordinate points of the first coordinate point combination in the moving track to be processed.
The motion state parameters of the first coordinate point combination in a reference track comprise a fourth speed value, a fifth speed value, a sixth speed value and a time interval between two coordinate points of the first coordinate point combination in the reference track.
Wherein the first velocity value represents an average velocity of the target object before reaching a first coordinate point of the first combination of coordinate points.
Assuming that the target area is a shopping mall, the movement track to be processed is a track of a customer a in the shopping mall when moving in the shopping mall, and a reference track of a first coordinate point combination (including a coordinate point a and a coordinate point B, where a timestamp corresponding to the coordinate point a is earlier than a timestamp of the coordinate point B) having a missing track is a track of a customer B when moving in the shopping mall.
The first speed value is the average speed of the nail before reaching the coordinate point a, and specifically, the average speed of 10 coordinate points before the coordinate point a in the movement locus to be processed may be calculated, and the calculation result is taken as the first speed value. For example, assuming that coordinate point C is located before coordinate point a in the movement trajectory to be processed and there are 10 coordinate points spaced apart from coordinate point a, the distance between coordinate point C and coordinate point a may be divided by the time interval between coordinate point C and coordinate point a, and the result may be taken as the first speed value.
The second velocity value represents an average velocity of the target object moving from the first coordinate point to the second coordinate point of the first coordinate point combination.
In connection with the above example, the second speed value is an average speed at which customer a moves from coordinate point a to coordinate point B, and the second speed value may be obtained by dividing a distance between coordinate point a and coordinate point B by a time interval between coordinate point a and coordinate point B.
The third velocity value represents an average velocity of the target object after leaving the second coordinate point of the first coordinate point combination.
The third speed value is the average speed of the customer a after leaving the coordinate point B, and the third speed value may be calculated by: assuming that there is a coordinate point D located behind the coordinate point B in the movement trajectory to be processed, there are 10 coordinate points between the coordinate point D and the coordinate point B, and the distance between the coordinate point D and the coordinate point B may be divided by the time interval between the coordinate point D and the coordinate point B, and the obtained result is used as a third speed value.
The fourth velocity value represents an average velocity of the object corresponding to the reference trajectory before reaching the first coordinate point of the first combination of coordinate points.
With reference to the above example, if the reference trajectory is a trajectory of the customer b moving in the mall, the fourth speed value is an average speed of the customer b before reaching the coordinate point a, and the specific calculation method is similar to the first speed value, that is, the average speed of 10 coordinate points in the reference trajectory before the coordinate point a can be calculated, and the calculation result is used as the first speed value.
The fifth velocity value represents an average velocity at which the object corresponding to the reference trajectory moves from the first coordinate point to the second coordinate point of the first coordinate point combination.
In the above example, the fifth speed value is the average speed of the customer B moving from the coordinate point a to the coordinate point B, and the specific calculation method thereof is similar to that of the second speed value, and is not described in detail.
The sixth speed value represents an average speed after the object corresponding to the reference trajectory leaves the second coordinate point of the first coordinate point combination.
The sixth speed value, that is, the average speed after the object (in the above example, the customer B in the market) corresponding to the reference track leaves the coordinate point B, is similar to the third speed value in the specific calculation method, and is not described again.
And S502, matching the motion state parameters of the movement track to be processed with the motion state parameters of each reference track.
If the motion state parameters of the first coordinate point combination in any one or more reference tracks are successfully matched with the motion state parameters of the first coordinate point combination in the movement track to be processed, step S503 is executed, otherwise, if the motion state parameters of the first coordinate point combination in each reference track are not successfully matched with the motion state parameters of the first coordinate point combination in the movement track to be processed, step S504 is executed.
For any reference track, if the reference track satisfies the following four conditions:
the absolute value of the difference between the fourth speed value of the first coordinate point combination in the reference track and the first speed value of the first coordinate point combination in the movement track to be processed is less than or equal to a first speed threshold value;
the absolute value of the difference between the fifth speed value of the first coordinate point combination in the reference track and the second speed value of the first coordinate point combination in the movement track to be processed is less than or equal to a second speed threshold value;
the absolute value of the difference between the sixth speed value of the first coordinate point combination in the reference track and the third speed value of the first coordinate point combination in the movement track to be processed is less than or equal to a third speed threshold;
the difference between the time interval of the first coordinate point combination in the reference track and the time interval of the first coordinate point combination in the movement track to be processed is smaller than or equal to a fourth time threshold.
And determining that the motion state parameters of the first coordinate point combination in the reference track and the motion state parameters of the first coordinate point combination in the movement track to be processed are successfully matched.
And if one reference track does not meet any one or more conditions, determining that the motion state parameters of the first coordinate point combination in the reference track and the motion state parameters of the first coordinate point combination in the movement track to be processed fail to be matched.
Optionally, the first speed threshold, the second speed threshold, and the third speed threshold may be set to 0.5 m/s.
And S503, determining the successfully matched reference track as a completion track of the first coordinate point combination.
And S504, updating the motion state parameters of the reference track according to a preset updating strategy.
After the step S504 is executed, the step S502 is executed again until the completion track of the combination of the one or more first coordinate points is screened out from the updated reference track.
The update policy of step S504 may be:
randomly selecting a reference track from a plurality of reference tracks corresponding to the first coordinate point combination of the current completion track to be screened, and then updating the motion state parameters of the selected reference track according to the following method:
and (3) selecting any speed value from the fourth speed value, the fifth speed value and the sixth speed value which are combined in the selected reference track by the first coordinate point, and increasing (or decreasing, randomly determined according to the probability of 50%) the speed value by a corresponding speed threshold, thereby completing the updating of the motion state parameter of the selected reference track.
For example, if a fourth speed value of the first coordinate point combination in the reference trajectory is selected, the first speed threshold may be increased (or decreased) for this fourth speed value, thereby completing the update of the motion state parameter.
Finally, it should be noted that, in the screening method provided in other embodiments of the present application, other parameters may also be used to match the first coordinate point combination in the movement trajectory to be processed and the reference trajectory of the first coordinate point combination, and the method is not limited to the velocity value and the time interval in the foregoing method.
When completing a movement track to be processed, for any one coordinate point combination with a missing track in the movement track to be processed, when a time interval between time stamps corresponding to two coordinate points of the coordinate point combination is greater than a preset second threshold (optionally, the second threshold may be set to 5s, or may be set to other values in other embodiments), the accuracy of completing the missing track corresponding to the coordinate point combination by directly using the coordinate points in the completing track is low, therefore, another embodiment of the present application provides a processing method of a movement track, which predicts key points of the missing track with long missing time (i.e., the missing time is greater than the second threshold) in the movement track to be processed by using a pre-trained coordinate point prediction model, and then divides a missing track with long missing time into a plurality of missing tracks with short missing time based on the key coordinate points, and then completing, thereby improving the accuracy of completing the missing track with longer missing time.
Referring to fig. 6, the method includes the following steps:
s601, obtaining a movement track to be processed generated by the movement of the target object in the target area.
And S602, determining each coordinate point combination of the movement track to be processed, which meets the preset key coordinate point prediction condition, as a second coordinate point combination.
A first alternative key coordinate point prediction condition may be that a missing locus exists between two coordinate points included in a coordinate point combination. In other words, for any two adjacent coordinate points, as long as the two coordinate points are not all reasonable break points, and the time interval between the two coordinate points is greater than the first threshold, the coordinate point combination composed of the two coordinate points can be determined as the second coordinate point combination.
A second alternative key coordinate point prediction condition may be that a missing trajectory exists between two coordinate points included in the coordinate point combination, and a time interval between the two coordinate points included in the coordinate point combination is greater than a second threshold value, which is greater than the first threshold value. That is, for any two adjacent coordinate points, if the two coordinate points are not all reasonable break points and the time interval between the two coordinate points is greater than the second threshold, the coordinate point combination composed of the two coordinate points can be determined as the second coordinate point combination.
For a coordinate point combination with a missing track, the time interval between two coordinate points of the coordinate point combination is equivalent to the missing time corresponding to the missing track between two coordinate points of the coordinate point combination.
And S603, predicting and obtaining the key coordinate point of each second coordinate point combination by using a coordinate point prediction model trained in advance.
Any one of the second coordinate point combinations may correspond to one or more key coordinate points. The number of key coordinate points corresponding to a second coordinate point combination may be determined based on the time interval between two coordinate points of the second coordinate point combination. The following provides an alternative method for determining the number of key coordinate points corresponding to each second coordinate point combination:
it may be specified that, for a second coordinate point combination having a missing trajectory and a time interval greater than a second threshold, the time interval of the second coordinate point combination includes each second threshold, the second coordinate point combination corresponds to one key coordinate point, and if the time interval of the second coordinate point combination is greater than the sum of N second thresholds and less than the sum of N +1 second thresholds, the second coordinate point combination corresponds to N +1 key coordinate points.
For example, if a second coordinate point combination having a missing trajectory includes coordinate point a and coordinate point B, where the difference between timestamp Ta of coordinate point a and timestamp Tb of coordinate point B is 23 seconds, and the second threshold is set to 5s, the number of key coordinate points corresponding to this second coordinate point combination is 5.
If the time interval of a second coordinate point combination is greater than the sum of the N second thresholds and less than the sum of the N +1 second thresholds, the number of the key coordinate points of the second coordinate point combination may also be determined as N.
If the time interval between two coordinate points of a second coordinate point combination is smaller than the second threshold, the number of key coordinate points corresponding to the second coordinate point combination may be determined as 1.
The above setting is only an optional setting of this embodiment, and the relationship between the time interval of the coordinate point combination and the number of the corresponding key coordinate points may be determined according to practical situations, and is not limited to the above setting.
The coordinate point prediction model in the embodiment of the application is a neural network model trained by using a plurality of movement tracks in a target area acquired within a past period of time. Optionally, the neural network model may be a bidirectional encoding representation (bert) model based on a converter, or may be another neural network model capable of predicting a key coordinate point of a missing trajectory in the trajectory to be processed based on other coordinate points existing in the trajectory to be processed, and need not be the bert model.
The method for predicting a plurality of key coordinate points of a section of missing track by using the coordinate point prediction model comprises the following steps:
first, for a missing track to be predicted, m mask units (which may be denoted as "mask") are inserted between second coordinate point combinations corresponding to the missing track, where m is equal to the number of key coordinate points of the second coordinate point combinations determined above.
Then, the coordinate value of each coordinate point of the movement track to be processed and the mask unit are converted into a corresponding label (token).
The mask unit can directly use the mask as a corresponding label, and for each coordinate point in the movement track to be processed, the coordinate values of the coordinate points can be spliced to obtain the label of the coordinate point.
For example, the coordinate value of one coordinate point may be denoted as (x, y), and the label of this coordinate point may be "x _ y". Specifically, if the target area is a floor of the mall, the coordinate value of each coordinate point may further include the floor (denoted as floor), and correspondingly, the label of any one coordinate point may be represented as "x _ y _ floor".
Furthermore, in order to ensure that no coordinate point which is not in the shooting range of the monitoring equipment exists in the key coordinate points obtained by the prediction of the coordinate point prediction model and prevent characteristic sparsity, the abscissa, the ordinate and the floor number of each coordinate point can be represented in a form of independent hot coding on the basis of rasterizing the target area.
For example, assuming that there are X vertical grid lines and Y horizontal grid lines in the target area after rasterization, the target area is a floor in a mall having Z floors, and X, Y and Z are positive integers, the abscissa of the coordinate point may be represented by a binary number formed by combining X binary bits, the ordinate of the coordinate point may be represented by a binary number formed by combining Y binary bits, and the floor of the coordinate point may be represented by a binary number formed by combining Z binary bits.
For example, each vertical grid line from left to right may sequentially correspond to each binary bit from left to right in the abscissa, if the coordinate point is located in the xth vertical grid line, the xth binary bit of the abscissa is set to 1, and the other binary bits are all set to 0, thereby obtaining the unique thermal code of the abscissa of the coordinate point.
Similarly, if the coordinate point is located on the y-th horizontal grid line, the y-th binary digit of the ordinate is set to 1, and the other binary digits are all set to 0, thereby obtaining the one-hot encoding of the ordinate of the coordinate point.
The floor is represented in a similar manner and will not be described in detail.
Through the conversion, each coordinate point and the mask unit in the movement track to be processed are converted into a label sequence, and the sequence of each label in the label sequence is consistent with the sequence of the corresponding coordinate point or the mask unit in the movement track to be processed.
And finally, aiming at each second coordinate point combination needing to determine the key coordinate points, constructing a label sequence corresponding to the second coordinate point combination, converting each label in the label sequence of the second coordinate point combination into a corresponding embedded vector according to a preset embedding algorithm, inputting the vector sequence consisting of a plurality of embedded vectors obtained by conversion into a coordinate point prediction model, predicting the label of each key coordinate point corresponding to the second coordinate point combination by the coordinate point prediction model, and analyzing the label of each key coordinate point according to the method for splicing the coordinate values into the labels, so that the coordinate value of each key coordinate point corresponding to the second coordinate point combination can be obtained.
A tag sequence corresponding to a second coordinate point combination includes: the second coordinate point combination comprises two coordinate point labels, a plurality of mask unit labels inserted between the two coordinate points of the second coordinate point combination, a label of a coordinate point in the movement track to be processed before the second coordinate point combination, and a label of a coordinate point in the movement track to be processed after the second coordinate point combination.
The label sequence of the second coordinate point combination specifically comprises several coordinate points before and after the second coordinate point combination, and is determined by the number m of mask units between two coordinate points of the second coordinate point combination and the length of the label sequence which is allowed to be input at a single time by the coordinate point prediction model.
For example, assuming that the coordinate point prediction model allows the input of the label sequence of a single time to have a length N, where N is a positive integer greater than m, when determining the label sequence of the second coordinate point combination, the total number of labels of the coordinate points before and after the second coordinate point combination included in the label sequence is equal to N-m-2, if the number is an even number, then the labels of (N-m-2)/2 coordinate points before the second coordinate point combination may be respectively selected, and the labels of (N-m-2)/2 coordinate points after the second coordinate point combination constitute the label sequence of the second coordinate point combination.
If N-m-2 is an odd number, the labels of (N-m-3)/2 coordinate points before the second coordinate point combination and the labels of (N-m-3)/2+1 coordinate points after the second coordinate point combination may be combined into a label sequence of the second coordinate point combination.
Further, if the number of coordinate points before or after the second coordinate point combination is insufficient, more coordinate points may be selected in another direction to ensure that the finally composed tag sequence has N tags.
And S604, inserting the key coordinate point of each second coordinate point combination between two coordinate points of the corresponding second coordinate point combination.
When a key coordinate point is inserted into a second coordinate point combination, the following method may be adopted to set the timestamp of each inserted key coordinate point:
of the two coordinate points included in the second coordinate point combination, the coordinate point whose corresponding timestamp is earlier is denoted as a first coordinate point, the corresponding timestamp is denoted as T0, the other coordinate point is denoted as a second coordinate point, and the corresponding timestamp is denoted as T1. Thus, the timestamp of the first predicted key coordinate point is set to be equal to the timestamp after T0 plus the second threshold, for example, if the second threshold is equal to 5s, the timestamp of the first predicted key coordinate point is equal to T0+5s, the timestamp of the second key coordinate point is set to be equal to the timestamp of the first key coordinate point plus the second threshold, that is, T0+10s, and then the timestamps corresponding to each key coordinate point except the last key coordinate point are equal to the timestamp of the previous key coordinate point plus the second threshold until the last key coordinate point.
For the last key coordinate point, if the timestamp of the previous key coordinate point of the last key coordinate point and the timestamp of the second coordinate point are greater than the second threshold, the timestamp of the last key coordinate point is still determined according to the method.
If the difference between the timestamp of the key coordinate point immediately preceding the last key coordinate point and the timestamp of the second coordinate point is less than the second threshold, the timestamp of the last key coordinate point may be set equal to the timestamp of the second coordinate point minus the first threshold, e.g., if the first threshold is set to 1s, then the timestamp of the last key coordinate point is equal to T1-1 s.
By the method, a plurality of key coordinate points can be inserted between each second coordinate point combination, and subsequent completion can be performed on every two adjacent key coordinate points and the original coordinate point of the movement track to be processed adjacent to the key coordinate point. Therefore, the corresponding missing track with longer missing time can be split into multiple sections of corresponding missing tracks with shorter missing time, so that the completed moving track is ensured to be closer to the real moving track.
And S605, detecting the position of the missing track in the to-be-processed moving track after the key coordinate point is inserted.
The execution process of step S605 is identical to the execution process of step S102 in the foregoing embodiment, and will not be described in detail here.
It should be noted that what is detected in step S605 is a movement trajectory to be processed after inserting the plurality of key coordinate points predicted by the coordinate point prediction model. Therefore, among the coordinate point combinations detected in step S605 having missing tracks, there may be a coordinate point combination completely composed of two adjacent original coordinate points of the movement track to be processed, a coordinate point combination completely composed of two adjacent key coordinate points predicted by the coordinate point prediction model, or a coordinate point combination composed of one original coordinate point of the movement track to be processed and a key coordinate point predicted to be adjacent to the coordinate point.
Further, by the prediction and insertion in step S603 and step S604, the time stamps of the two coordinate points included in each coordinate point combination detected in step S605 are each less than or equal to the second threshold value.
And S606, aiming at each coordinate point combination with the missing track, screening out a reference track matched with the coordinate point combination from the multiple reference tracks according to a preset matching rule to serve as a completion track of the coordinate point combination.
S607, for each coordinate point combination having a missing trajectory, the missing trajectory corresponding to the coordinate point combination is complemented by the complementing trajectory of the coordinate point combination.
The specific execution process of step S606 and step S607 is the same as step S103 and step S104 in the foregoing embodiment, and is not described again.
In this embodiment, for a missing track with an excessively long missing time (which means that the missing time is greater than a preset second threshold), a coordinate point prediction model is used to predict a key coordinate point in the missing track, and the predicted key coordinate point is inserted into the position of the missing track, so that the missing track with the excessively long missing time is divided into multiple missing tracks with shorter missing times, and the missing track is supplemented more accurately.
Finally, the implementation process of the processing method for the movement trajectory provided by the embodiment of the present application is described with reference to a specific application scenario.
Assuming that the target area is a certain floor of a shopping mall, the target object is a customer C who moves on the floor of the shopping mall, the customer C enters the floor from one stair entrance, and leaves from another stair entrance after the floor moves for a period of time, and the image of the monitoring device is identified and processed to obtain the movement track of the customer C to be processed in the target area as shown in fig. 7.
The dots in fig. 7 represent each coordinate point included in the movement trajectory to be processed, and the arrow direction is the movement sequence of the customer according to the order of the timestamps corresponding to each coordinate point.
After the movement trajectory to be processed shown in fig. 7 is obtained, the first threshold is set to 1s, and a difference value between timestamps of two coordinate points of each coordinate point combination is calculated, so that it can be found that there are 4 coordinate point combinations with a time interval greater than 1 second, the 4 coordinate point combinations include 8 coordinate points, the coordinate points are sequentially recorded as coordinate points 1 to 8 according to the sequence of the corresponding timestamps, and the corresponding timestamps are sequentially recorded as T1 to T8.
By performing breakpoint labeling or clustering on the coordinate points in fig. 7, it can be determined that the coordinate points 3 and 4 therein are reasonable breakpoints, and therefore, the coordinate point combination 1 formed by the coordinate points 1 and 2, the coordinate point combination 2 formed by the coordinate points 5 and 6, and the coordinate point combination 3 formed by the coordinate points 7 and 8 are three coordinate point combinations having missing tracks in the movement track to be processed.
With the second key coordinate point prediction condition set to 5s, the difference between the timestamp T1 corresponding to coordinate point 1 and the timestamp T2 corresponding to coordinate point 2 is found to be equal to 12s by using the timestamps of two coordinate points of the three coordinate point combinations having missing tracks, and at this time, it can be determined that there are two or three key coordinate points to be predicted in coordinate point combination 1, which are determined to be two key coordinate points in this example.
After the number of key coordinate points is determined, the coordinate point prediction model can predict the two key coordinate points (i.e., the two X-shaped points in fig. 7) shown in fig. 7.
After two key coordinate points shown in the drawing are inserted into the movement track to be processed, the original deletion track between the coordinate point 1 and the coordinate point 2 is divided into three deletion tracks, at this time, the deletion time corresponding to each deletion track in fig. 7 is less than 5 seconds, so that the deletion track of each coordinate point combination can be completed by the selected completion track according to the method described in step S103 and step S104 in the embodiment corresponding to fig. 1, and the coordinate points inserted during completion are represented by square points in fig. 7, so that the movement track of the completed customer in the target area is obtained.
Finally, referring to fig. 8, an embodiment of the present application further provides a method for training the coordinate point prediction model, where the method specifically includes the following steps:
s801, obtaining a plurality of complete tracks from a historical track library, and pre-training a pre-constructed bidirectional coding representation model based on a converter by using the plurality of complete tracks to obtain a pre-training model.
It should be noted that the complete trajectory described in step S801 refers to a moving trajectory in which the number of the unreasonable breakpoints is smaller than a preset unreasonable breakpoint threshold, specifically, the unreasonable breakpoint threshold may be set to 10, that is, for any moving trajectory in the historical trajectory library, if the number of the unreasonable breakpoints of the moving trajectory is less than or equal to 10, the moving trajectory may be considered as a complete trajectory. The method for determining the break point and the unreasonable break point in the moving track may refer to the embodiment corresponding to fig. 3, and will not be described herein again.
Optionally, in the pre-training stage, the obtained multiple complete trajectories may be directly used for pre-training, or the completion method of the embodiment corresponding to fig. 1 may be performed on each obtained complete trajectory to complete the missing part in the complete trajectory, and then the completed trajectory is used for pre-training. Of course, before completion, the abnormal coordinate point may be further identified and deleted according to the method described in the corresponding embodiment of fig. 1.
Furthermore, if the moving track of a mall including multiple floors needs to be detected and processed, the complete tracks of the multiple different floors can be obtained in the pre-training stage, and the complete tracks of the different floors are used for pre-training.
The pre-training process using multiple complete tracks includes replacing each breakpoint in a complete track with a [ MISS ] delimiter, and then, for each coordinate point in each complete track, splicing the coordinate values of the coordinate point into a corresponding label according to the method described in the embodiment corresponding to fig. 6, for example, if the complete track of only one floor is used for pre-training, the coordinate point with the coordinate value of (x, y) may be spliced to obtain a label "x _ y", and if the complete tracks of multiple floors are used for pre-training, the spliced label should include the floor where the coordinate point is located, that is, "x _ y _ floor". The [ MISS ] separators in the complete tracks can be replaced by preset labels, for example, a line break symbol can be used as the label corresponding to the [ MISS ] separators, so that each complete track can be converted into a label sequence.
The obtained tag sequences of all complete tracks can then be combined into one first tag sequence, wherein a new track separation tag is inserted between every two adjacent tag sequences corresponding to different complete tracks, for example, two consecutive line feed symbols can be used as track separation tags.
Finally, a converter-based bidirectional coding representation (bert) model is used for respectively executing a Mask Language Model (MLM) task and a Next Sentence Prediction (NSP) task on the combined first label sequence, so that the unsupervised training process of the bert model based on the first label sequence is realized.
Specifically, in the application, the training process based on the mask language model task includes obtaining a sub-label sequence composed of N continuous labels of a first label sequence, randomly replacing some labels of the sub-label sequence with labels corresponding to a mask unit [ mask ], inputting the replaced sub-label sequence into a bert model to be trained, finally outputting a label sequence by the bert model, comparing the labels corresponding to the mask unit [ mask ] in the output label sequence with the labels replaced by the mask unit [ mask ] in the sub-label sequence, and adjusting parameters in the bert model based on the comparison result.
N is a positive integer, and N is the number of labels per input model specified by the pre-constructed bert model.
The training process of the prediction task based on the next sentence is to select a sub-label sequence consisting of continuous N-1 labels from the first label sequence, insert the track separation label in the middle of the sub-label sequence, input the replaced sub-label sequence into the bert model, and finally the bert model outputs a judgment result which is used for indicating whether the first label after the track separation label and the label sequence before the track separation label are continuous in the first label sequence. Thereby, the result of the determination can be compared with the actual situation and then the parameters in the bert model are adjusted based on the comparison result.
The pre-training process of the bert model can be realized by repeatedly executing the two tasks on the first label sequence.
S802, randomly selecting a plurality of coordinate points from each complete track as sample coordinate points, and deleting the sample coordinate points from the complete tracks to obtain deleted moving tracks corresponding to each complete track.
Specifically, for each complete trajectory, a plurality of reasonable breakpoints and unreasonable breakpoints (for example, 5 reasonable breakpoints and 5 unreasonable breakpoints may be selected respectively, and certainly other selection manners may also be adopted, and the number of the selected breakpoints is not limited to 5) may be selected randomly as the reference points, then, for each reference point, n coordinate points before or after the reference point are selected randomly as sample coordinate points, and the sample coordinate points are deleted, where n is a positive integer, and a value range of n may be set to 5 to 120, or other ranges may be set. For each reference point, a value can be randomly determined in the range as the value of n, and then n coordinate points before or after the reference point are deleted.
And S803, inputting the plurality of missing tracks into a pre-training model, and performing fine tuning training on the pre-training model by taking a predicted coordinate point obtained by processing the missing tracks by the pre-training model to approach to the deleted sample coordinate point as a target to obtain a coordinate point prediction model.
After the deleted movement trajectory is obtained, for each deleted trajectory, the distance between the coordinate points at the two ends of the deleted trajectory is divided by the average speed of the object corresponding to the deleted movement trajectory on the movement trajectory, so as to obtain the missing time corresponding to each deleted trajectory, and thus, the number of the key coordinate points corresponding to each deleted trajectory may be determined by using the method described in step S604 in the embodiment corresponding to fig. 6.
After determining the number of key coordinate points corresponding to each deleted trajectory, a number of deleted coordinate points in the deleted trajectory may be designated as the key coordinate points of the deleted trajectory at a certain time interval (for example, a second threshold may be used as the time interval), where the number of designated key coordinate points is equal to the number of key coordinate points of the deleted trajectory.
And finally, processing the deleted moving track by using a pre-training model so as to obtain a key coordinate point which is corresponding to the deleted track and is obtained by prediction of the pre-training model. Therefore, the key coordinate points predicted by the pre-training model can be compared with a plurality of deleted key coordinate points which are specified in advance, and the parameters of the pre-training model are adjusted in a circulating mode by taking the predicted key coordinate points approaching the deleted key coordinate points as targets based on the comparison result.
And if the loss function value of the pre-training model obtained by calculation according to the distance between each predicted key coordinate point and the appointed deleted key coordinate point is smaller than a certain threshold value after the adjustment of a certain time, finishing fine tuning training and outputting the current pre-training model as a trained coordinate point prediction model.
According to the coordinate point prediction model training method, the model is pre-trained by utilizing the existing multiple complete tracks in the historical track library based on an unsupervised training task, so that manual marking of a large amount of track data in the historical track library is avoided, and the training efficiency of the model is improved.
With reference to fig. 9, the apparatus for processing a moving trajectory according to an embodiment of the present application further includes:
an obtaining unit 901, configured to obtain a movement trajectory to be processed, generated by the target object moving in the target area.
Wherein the target object is any one object which enters the target area; the movement trajectory includes a plurality of coordinate points representing positions where the target object passes and a time stamp corresponding to each coordinate point.
A determining unit 902, configured to determine, as a coordinate point combination with a missing trajectory, each coordinate point combination in the to-be-processed moving trajectory, where a time interval between two coordinate points included in the to-be-processed moving trajectory is greater than a first threshold and the two coordinate points are not all reasonable breakpoint conditions.
The combination of coordinate points where a missing trajectory exists may also be referred to as a first combination of coordinate points.
Every two adjacent coordinate points of the movement track to be processed are used as a coordinate point combination, and the reasonable break points refer to coordinate points when the target object enters and leaves the monitoring blind area.
A matching unit 903, configured to, for each first coordinate point combination, screen, according to a preset matching rule, a reference trajectory matched with the first coordinate point combination from multiple reference trajectories in the historical trajectory library, and use the reference trajectory as a completion trajectory of the first coordinate point combination.
The reference trajectory refers to a moving trajectory which comprises two coordinate points combined by the coordinate points and has no missing trajectory between the two coordinate points.
A complementing unit 904, configured to, for each first coordinate point combination, complement the missing track corresponding to the first coordinate point combination of the movement track to be processed with another coordinate point located between two coordinate points included in the first coordinate point combination in the complementing track of the first coordinate point combination.
And combining the supplemented missing track and the to-be-processed moving track corresponding to each first coordinate point combination to serve as the supplemented moving track.
When the matching unit 903 screens the completion track, it is specifically configured to:
calculating the motion state parameters of the first coordinate point combinations in the movement tracks to be processed and calculating the motion state parameters of the first coordinate point combinations in each reference track aiming at each first coordinate point combination;
judging whether a reference track meeting a matching condition exists in a plurality of reference tracks corresponding to each first coordinate point combination; the matching condition is that the difference value between the motion state parameter of the first coordinate point combination in the movement track to be processed and the motion state parameter of the first coordinate point combination in the reference track is smaller than a corresponding threshold value;
and for each first coordinate point combination, if a reference track meeting the matching condition exists in a plurality of reference tracks corresponding to the first coordinate point combination, determining the reference track meeting the matching condition as a completion track of the first coordinate point combination.
The matching unit 903 is further configured to: and for each first coordinate point combination, if each reference track corresponding to the first coordinate point combination does not meet the matching condition, updating the motion state parameters of the first coordinate point combination in the reference tracks according to a preset updating strategy, and judging whether a reference track meeting the matching condition exists in a plurality of reference tracks corresponding to the first coordinate point combination again until a reference track meeting the matching condition exists in the plurality of reference tracks corresponding to the first coordinate point combination.
Optionally, the processing apparatus of the movement trajectory of the embodiment further includes a key point predicting unit 905, configured to execute the following method after the obtaining unit 901 obtains the movement trajectory to be processed, so as to insert a key coordinate point into the movement trajectory to be processed:
determining each coordinate point combination of the movement tracks to be processed, which meets preset key coordinate point prediction conditions, as a second coordinate point combination;
aiming at each second coordinate point combination, processing the movement track to be processed by using a pre-trained coordinate point prediction model to obtain a plurality of key coordinate points corresponding to the second coordinate point combination;
and aiming at each second coordinate point combination, inserting a plurality of key coordinate points corresponding to the second coordinate point combination between two coordinate points of the second coordinate point combination, and setting a corresponding timestamp for each key coordinate point.
If the key point prediction unit 905 inserts a key coordinate point into the movement trajectory to be processed, the determination unit 902 is configured to: and determining a first coordinate point combination of the movement track to be processed after the key coordinate points are inserted.
The key point prediction unit 905 is configured to, when processing the movement trajectory to be processed by using the pre-trained coordinate point prediction model to obtain a plurality of key coordinate points corresponding to the second coordinate point combination, specifically:
for each second coordinate point combination, a plurality of mask units are inserted between two coordinate points of the second coordinate point combination.
The number of the mask units inserted into one second coordinate point combination is equal to the number of the predetermined key coordinate points corresponding to the second coordinate point combination, and the number of the key coordinate points of one second coordinate point combination can be determined according to the time interval of two coordinate points of the second coordinate point combination.
Converting the coordinates of each coordinate point of the movement track to be processed and the mask unit into corresponding labels;
and inputting a label sequence which comprises a plurality of labels and corresponds to each second coordinate point combination into a coordinate point prediction model trained in advance to obtain a plurality of key coordinate points corresponding to the second coordinate point combinations.
The label sequence corresponding to the second coordinate point combination comprises labels of two coordinate points of the second coordinate point combination, a label of each mask unit corresponding to the second coordinate point combination, and a label of a coordinate point before the second coordinate point combination and a label of a coordinate point after the second coordinate point combination in the movement track to be processed.
The processing apparatus provided in this embodiment further includes a training unit 906, configured to train the coordinate point prediction model, and specifically configured to:
obtaining a plurality of complete tracks from a historical track library, and pre-training a pre-constructed bidirectional coding representation model based on a converter by using the plurality of complete tracks to obtain a pre-training model;
randomly selecting a plurality of coordinate points from each complete track as sample coordinate points, and deleting the sample coordinate points from the complete tracks to obtain deleted moving tracks corresponding to each complete track;
inputting the plurality of deleted movement tracks into a pre-training model, taking a predicted coordinate point obtained by processing the deleted movement tracks by the pre-training model and approaching the deleted sample coordinate point as a target, and performing fine tuning training on the pre-training model to obtain a coordinate point prediction model.
Before the determining unit 902 determines the first coordinate point combination in the movement trajectory to be processed, it is further configured to:
for each coordinate point of the movement track to be processed, dividing the distance between the coordinate point and the coordinate point which is one coordinate point before the coordinate point by the time interval between the timestamp of the coordinate point and the timestamp of the coordinate point which is one coordinate point before the coordinate point to obtain the speed of the coordinate point;
and determining each coordinate point of the movement track to be processed, wherein the speed of each coordinate point is greater than a preset speed threshold value, as an abnormal coordinate point, and deleting the abnormal coordinate points.
The processing apparatus provided in this embodiment further includes a breakpoint labeling unit 907, configured to:
judging whether the time interval between the coordinate point and the former coordinate point of the coordinate point is greater than a third threshold value, judging whether the time interval between the coordinate point and the latter coordinate point of the coordinate point is greater than the third threshold value, judging whether the coordinate point is an initial coordinate point of the movement track to be processed, and judging whether the coordinate point is an end coordinate point of the movement track to be processed;
if the judgment result of any judgment is yes, determining the coordinate point as a breakpoint;
displaying a planar map of the target area on the display device, and displaying a breakpoint on the planar map of the target area;
and in response to a first marking instruction of the user on the breakpoint, determining the breakpoint as a reasonable breakpoint.
The specific working principle of the processing device for the movement track provided in the embodiments of the present application may refer to the processing method for the movement track provided in any embodiment of the present application, and details thereof are not described here.
The application provides a processing device of a movement track, an obtaining unit 901 obtains a movement track to be processed generated by a target object moving in a target area; the determining unit 902 determines a first coordinate point combination in the movement trajectory to be processed; each two adjacent coordinate points of the movement track to be processed are used as a coordinate point combination, and the matching unit 903 screens out a complete track matched with the first coordinate point combination from a plurality of reference tracks in the historical track library according to a preset matching rule aiming at each first coordinate point combination to obtain a complete track of the first coordinate point combination; reference trajectory refers to a complete trajectory of two coordinate points including a first combination of coordinate points; the completion unit 904 completes, for each first coordinate point combination, the missing trajectory between two coordinate points of the first coordinate point combination of the movement trajectory to be processed with another coordinate point located between two coordinate points included in the first coordinate point combination in the completion trajectory of the first coordinate point combination, to obtain a completed movement trajectory. Therefore, for the to-be-processed moving track with partial deletion, the scheme can supplement the missing part of the to-be-processed moving track with the coordinate points in the complete track which comprises the partial coordinate points of the to-be-processed moving track and is matched with the missing part of the to-be-processed moving track, so that the missing to-be-processed moving track is accurately supplemented.
Referring to fig. 10, an electronic device according to an embodiment of the present application further includes a memory 1001 and a processor 1002, where the memory 1001 is used for storing a computer program, the processor 1002 is used for executing the computer program, and when the computer program is executed, the computer program is specifically used for implementing the method for processing a movement trajectory according to any embodiment of the present application.
The embodiment of the present application further provides a computer storage medium, which is used for storing a computer program, and when the stored computer program is executed, the computer storage medium is specifically used for implementing the processing method of the movement trajectory according to any embodiment of the present application.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
It should be noted that the terms "first", "second", and the like in the present invention are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
Those skilled in the art can make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (11)

1. A processing method of a moving track is characterized by comprising the following steps:
obtaining a movement track to be processed generated by the movement of a target object in a target area; the movement track to be processed comprises a plurality of coordinate points used for representing the passing position of the target object and a timestamp corresponding to each coordinate point;
determining a first coordinate point combination of the movement track to be processed; taking every two adjacent coordinate points of the movement track to be processed as a coordinate point combination; the first coordinate point combination refers to a coordinate point combination with a missing track in the movement track to be processed;
for each first coordinate point combination, screening out a reference track matched with the first coordinate point combination from a plurality of reference tracks in a historical track library according to a preset matching rule, and taking the reference track as a completion track of the first coordinate point combination; wherein the reference trajectory refers to a movement trajectory including two coordinate points of the first coordinate point combination and having no missing trajectory between the two coordinate points;
for each first coordinate point combination, using other coordinate points positioned between two coordinate points included in the first coordinate point combination in the completion track of the first coordinate point combination to complete the missing track corresponding to the first coordinate point combination of the movement track to be processed; and combining the supplemented missing track corresponding to each first coordinate point combination and the to-be-processed moving track to serve as the supplemented moving track.
2. The processing method according to claim 1, wherein the determining a first combination of coordinate points of the movement trajectory to be processed comprises:
for each coordinate point combination of the movement track to be processed, judging whether the time interval of two coordinate points of the coordinate point combination is larger than a first threshold value or not, and judging whether the two coordinate points of the coordinate point combination are reasonable break points or not; wherein the reasonable break points refer to coordinate points when the target object enters and leaves a monitoring blind area;
and aiming at each coordinate point combination of the moving track to be processed, if the time interval of two coordinate points of the coordinate point combination is greater than a first threshold value and the two coordinate points of the coordinate point combination are not all reasonable breakpoints, determining the coordinate point combination as a first coordinate point combination.
3. The processing method according to claim 1, wherein for each of the first coordinate point combinations, screening out a reference trajectory matched with the first coordinate point combination from a plurality of reference trajectories in a historical trajectory library according to a preset matching rule, as a complementary trajectory of the first coordinate point combination, comprises:
for each first coordinate point combination, calculating a motion state parameter of the first coordinate point combination in the movement track to be processed, and calculating a motion state parameter of the first coordinate point combination in each reference track;
for each first coordinate point combination, judging whether a reference track meeting a matching condition exists in a plurality of reference tracks corresponding to the first coordinate point combination; the matching condition is that the difference value between the motion state parameter of the first coordinate point combination in the movement track to be processed and the motion state parameter of the first coordinate point combination in the reference track is smaller than a corresponding threshold value;
and for each first coordinate point combination, if a reference track meeting the matching condition exists in a plurality of reference tracks corresponding to the first coordinate point combination, determining the reference track meeting the matching condition as a completion track of the first coordinate point combination.
4. The processing method according to claim 3, wherein after determining, for each of the first coordinate point combinations, whether there is a reference trajectory that satisfies a matching condition in the plurality of reference trajectories corresponding to the first coordinate point combination, the method further comprises:
and for each first coordinate point combination, if each reference track corresponding to the first coordinate point combination does not meet the matching condition, updating the motion state parameters of the first coordinate point combination in the reference tracks according to a preset updating strategy, and returning to execute the judgment of whether a plurality of reference tracks corresponding to the first coordinate point combination have reference tracks meeting the matching condition or not until the reference tracks meeting the matching condition exist in the plurality of reference tracks corresponding to the first coordinate point combination.
5. The processing method according to any one of claims 1 to 4, wherein the complementing the missing trajectory corresponding to the first coordinate point combination of the movement trajectory to be processed with another coordinate point located between two coordinate points included in the first coordinate point combination in the complementing trajectory of the first coordinate point combination comprises:
if the first coordinate point combination corresponds to one completion track, inserting other coordinate points positioned between the two coordinate points of the first coordinate point combination in the completion track of the first coordinate point combination into the two coordinate points of the first coordinate point combination of the movement track to be processed;
if the first coordinate point combination corresponds to a plurality of completion tracks, selecting a plurality of coordinate points from high to low according to the occurrence frequency of each coordinate point in the coordinate point set, and inserting the selected coordinate point between the two coordinate points of the first coordinate point combination of the movement track to be processed; wherein the set of coordinate points includes, in each of the completion trajectories of the first combination of coordinate points, other coordinate points located between two coordinate points of the first combination of coordinate points; the number of the selected coordinate points is determined according to the time interval between two coordinate points of the first coordinate point combination;
setting a corresponding time stamp for each coordinate point between the two coordinate points of the first coordinate point combination inserted into the movement track to be processed.
6. The processing method according to claim 1, wherein before determining the first combination of coordinate points of the movement trajectory to be processed, further comprising:
determining each coordinate point combination of the movement track to be processed, which meets preset key coordinate point prediction conditions, as a second coordinate point combination;
processing the movement track to be processed by utilizing a pre-trained coordinate point prediction model aiming at each second coordinate point combination to obtain a plurality of key coordinate points corresponding to the second coordinate point combination;
for each second coordinate point combination, inserting the plurality of key coordinate points corresponding to the second coordinate point combination between two coordinate points of the second coordinate point combination, and setting a corresponding timestamp for each key coordinate point;
wherein the determining of the first coordinate point combination of the movement trajectory to be processed comprises:
and determining a first coordinate point combination of the movement track to be processed after the key coordinate points are inserted.
7. The processing method according to claim 6, wherein the processing the movement trajectory to be processed by using a pre-trained coordinate point prediction model for each second coordinate point combination to obtain a plurality of key coordinate points corresponding to the second coordinate point combination comprises:
for each second coordinate point combination, inserting a plurality of mask units between two coordinate points of the second coordinate point combination; wherein the number of the mask units is determined according to a time interval of the two coordinate points of the second coordinate point combination;
converting the coordinates of each coordinate point of the movement track to be processed and the mask unit into corresponding labels;
for each second coordinate point combination, inputting a label sequence which comprises a plurality of labels and corresponds to the second coordinate point combination into a coordinate point prediction model which is trained in advance, and obtaining a plurality of key coordinate points corresponding to the second coordinate point combination; the label sequence corresponding to the second coordinate point combination comprises labels of two coordinate points of the second coordinate point combination, a label of each mask unit corresponding to the second coordinate point combination, and labels of a coordinate point before the second coordinate point combination and a coordinate point after the second coordinate point combination in the movement track to be processed.
8. The process of claim 7, wherein the method of training the coordinate point prediction model comprises:
pre-training a pre-constructed bidirectional coding representation model based on a converter by using a plurality of complete tracks to obtain a pre-training model;
randomly selecting a plurality of coordinate points from each complete track as sample coordinate points, and deleting the sample coordinate points from the complete tracks to obtain deleted moving tracks corresponding to each complete track;
inputting a plurality of deleted movement tracks into the pre-training model, and performing optimization training on the pre-training model to obtain the coordinate point prediction model by taking a prediction coordinate point obtained by processing the deleted movement tracks by the pre-training model to approach to the deleted sample coordinate point as a target.
9. The processing method according to claim 1, wherein before determining the first combination of coordinate points of the movement trajectory to be processed, further comprising:
for each coordinate point of the movement track to be processed, dividing the distance between the coordinate point and the coordinate point which is one coordinate point before the coordinate point by the difference between the timestamp of the coordinate point and the timestamp of the coordinate point which is one coordinate point before the coordinate point to obtain the speed of the coordinate point;
and determining each coordinate point of the movement track to be processed, wherein the speed of each coordinate point is greater than a preset speed threshold value, as an abnormal coordinate point, and deleting the abnormal coordinate points.
10. The processing method according to claim 1, wherein the method for determining whether any coordinate point of the movement trajectory to be processed is a reasonable breakpoint comprises:
judging whether the time interval between the coordinate point and a coordinate point before the coordinate point is greater than a third threshold value, judging whether the time interval between the coordinate point and a coordinate point after the coordinate point is greater than the third threshold value, judging whether the coordinate point is a starting coordinate point of the movement track to be processed, and judging whether the coordinate point is an ending coordinate point of the movement track to be processed;
if the judgment result of any judgment is yes, determining the coordinate point as a breakpoint;
displaying a plane map of the target area on a display device, and displaying the breakpoint on the plane map of the target area;
and responding to a first marking instruction of the user for the breakpoint, and determining the breakpoint as a reasonable breakpoint.
11. A device for processing a movement trajectory, comprising:
the acquisition unit is used for acquiring a movement track to be processed, which is generated by the movement of the target object in the target area; the movement track to be processed comprises a plurality of coordinate points used for representing the passing position of the target object and a timestamp corresponding to each coordinate point;
the determining unit is used for determining a first coordinate point combination of the movement track to be processed; taking every two adjacent coordinate points of the movement track to be processed as a coordinate point combination; the first coordinate point combination refers to a coordinate point combination with a missing track in the movement track to be processed;
the matching unit is used for screening out a reference track matched with the first coordinate point combination from a plurality of reference tracks in a historical track library according to a preset matching rule for each first coordinate point combination to serve as a completion track of the first coordinate point combination; wherein the reference trajectory refers to a movement trajectory including two coordinate points of the first coordinate point combination and having no missing trajectory between the two coordinate points;
a completion unit, configured to, for each first coordinate point combination, complete a missing trajectory corresponding to the first coordinate point combination of the movement trajectory to be processed with another coordinate point located between two coordinate points included in the first coordinate point combination in a completion trajectory of the first coordinate point combination; and combining the supplemented missing track corresponding to each first coordinate point combination and the to-be-processed moving track to serve as the supplemented moving track.
CN202010347241.9A 2020-04-24 2020-04-24 Method and device for processing movement track Active CN111553732B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010347241.9A CN111553732B (en) 2020-04-24 2020-04-24 Method and device for processing movement track

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010347241.9A CN111553732B (en) 2020-04-24 2020-04-24 Method and device for processing movement track

Publications (2)

Publication Number Publication Date
CN111553732A true CN111553732A (en) 2020-08-18
CN111553732B CN111553732B (en) 2024-02-23

Family

ID=72005917

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010347241.9A Active CN111553732B (en) 2020-04-24 2020-04-24 Method and device for processing movement track

Country Status (1)

Country Link
CN (1) CN111553732B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112002030A (en) * 2020-08-31 2020-11-27 浙江知水信息技术有限公司 Method for perfecting trace loss of patrolman
CN112533031A (en) * 2020-11-23 2021-03-19 北京爱笔科技有限公司 Track video recommendation method and device, computer equipment and storage medium
CN114449336A (en) * 2022-01-20 2022-05-06 杭州海康威视数字技术股份有限公司 Vehicle track animation playing method, device and equipment
CN115659088A (en) * 2022-12-12 2023-01-31 亿海蓝(北京)数据技术股份公司 Navigation track display method and device and readable storage medium
CN115655301A (en) * 2022-11-11 2023-01-31 北京中交兴路车联网科技有限公司 Vehicle navigation route selection method and device, electronic equipment and medium

Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5355326A (en) * 1990-11-30 1994-10-11 U.S. Philips Corporation Method of effecting a motion filtering for slow targets, and an apparatus for executing the method
CN1936912A (en) * 1995-02-13 2007-03-28 英特特拉斯特技术公司 Systems and methods for secure transaction management and electronic rights protection
WO2015110762A1 (en) * 2014-01-23 2015-07-30 Université Claude Bernard Lyon 1 Method for determining the trajectory of a point of a moving object
CN105894323A (en) * 2016-03-29 2016-08-24 乐视控股(北京)有限公司 User evaluation method, index model training method and apparatus
WO2017117857A1 (en) * 2016-01-08 2017-07-13 中兴通讯股份有限公司 Movement trajectory matching method and apparatus for mobile terminal
CN107248009A (en) * 2017-06-05 2017-10-13 亿海蓝(北京)数据技术股份公司 A kind of heuristic airline generation method and device based on track language identification
CN108346083A (en) * 2018-01-29 2018-07-31 维沃移动通信有限公司 A kind of information processing method and mobile terminal
CN108416376A (en) * 2018-02-27 2018-08-17 北京东方天得科技有限公司 It is a kind of that system and method is managed in way logistics people's vehicle tracing and monitoring based on SVM
CN109068268A (en) * 2018-08-13 2018-12-21 四川科道芯国智能技术股份有限公司 Student's trajectory analysis method and device
CN109508471A (en) * 2018-09-21 2019-03-22 长安通信科技有限责任公司 Motion profile complementing method and device, readable storage medium storing program for executing
CN109840504A (en) * 2019-02-01 2019-06-04 腾讯科技(深圳)有限公司 Article picks and places Activity recognition method, apparatus, storage medium and equipment
CN110058276A (en) * 2019-02-27 2019-07-26 北京三快在线科技有限公司 Abnormal point judgment method and device
CN110210604A (en) * 2019-05-21 2019-09-06 北京邮电大学 A kind of terminal device movement pattern method and device
CN110727757A (en) * 2019-10-22 2020-01-24 北京卡路里信息技术有限公司 Track data processing method and device and electronic equipment
CN110825833A (en) * 2019-11-11 2020-02-21 杭州数澜科技有限公司 Method for predicting user moving track point
CN110852342A (en) * 2019-09-26 2020-02-28 京东城市(北京)数字科技有限公司 Road network data acquisition method, device, equipment and computer storage medium
CN110858338A (en) * 2018-08-24 2020-03-03 阿里巴巴集团控股有限公司 Destination prediction method, device and equipment

Patent Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5355326A (en) * 1990-11-30 1994-10-11 U.S. Philips Corporation Method of effecting a motion filtering for slow targets, and an apparatus for executing the method
CN1936912A (en) * 1995-02-13 2007-03-28 英特特拉斯特技术公司 Systems and methods for secure transaction management and electronic rights protection
WO2015110762A1 (en) * 2014-01-23 2015-07-30 Université Claude Bernard Lyon 1 Method for determining the trajectory of a point of a moving object
WO2017117857A1 (en) * 2016-01-08 2017-07-13 中兴通讯股份有限公司 Movement trajectory matching method and apparatus for mobile terminal
CN105894323A (en) * 2016-03-29 2016-08-24 乐视控股(北京)有限公司 User evaluation method, index model training method and apparatus
CN107248009A (en) * 2017-06-05 2017-10-13 亿海蓝(北京)数据技术股份公司 A kind of heuristic airline generation method and device based on track language identification
CN108346083A (en) * 2018-01-29 2018-07-31 维沃移动通信有限公司 A kind of information processing method and mobile terminal
CN108416376A (en) * 2018-02-27 2018-08-17 北京东方天得科技有限公司 It is a kind of that system and method is managed in way logistics people's vehicle tracing and monitoring based on SVM
CN109068268A (en) * 2018-08-13 2018-12-21 四川科道芯国智能技术股份有限公司 Student's trajectory analysis method and device
CN110858338A (en) * 2018-08-24 2020-03-03 阿里巴巴集团控股有限公司 Destination prediction method, device and equipment
CN109508471A (en) * 2018-09-21 2019-03-22 长安通信科技有限责任公司 Motion profile complementing method and device, readable storage medium storing program for executing
CN109840504A (en) * 2019-02-01 2019-06-04 腾讯科技(深圳)有限公司 Article picks and places Activity recognition method, apparatus, storage medium and equipment
CN110058276A (en) * 2019-02-27 2019-07-26 北京三快在线科技有限公司 Abnormal point judgment method and device
CN110210604A (en) * 2019-05-21 2019-09-06 北京邮电大学 A kind of terminal device movement pattern method and device
CN110852342A (en) * 2019-09-26 2020-02-28 京东城市(北京)数字科技有限公司 Road network data acquisition method, device, equipment and computer storage medium
CN110727757A (en) * 2019-10-22 2020-01-24 北京卡路里信息技术有限公司 Track data processing method and device and electronic equipment
CN110825833A (en) * 2019-11-11 2020-02-21 杭州数澜科技有限公司 Method for predicting user moving track point

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
YING YANG;YINGMEI ZHANG;JIAN DING;SHIWEI AI;RUI GUO;XIAOJUAN BAI;WENZHI YANG;: "Optimal analysis conditions for sperm motility parameters with a CASA system in a passerine bird, Passer montanus", AVIAN RESEARCH, no. 04, pages 113 - 122 *
刘超等: "基于轨迹坐标的异常行为检测", 《工业控制计算机》, no. 05, pages 94 - 100 *
潘奇明等: "真实场景运动目标轨迹有效性判断与自动聚类算法研究", 《计算机应用研究》, no. 04, pages 158 - 161 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112002030A (en) * 2020-08-31 2020-11-27 浙江知水信息技术有限公司 Method for perfecting trace loss of patrolman
CN112533031A (en) * 2020-11-23 2021-03-19 北京爱笔科技有限公司 Track video recommendation method and device, computer equipment and storage medium
CN112533031B (en) * 2020-11-23 2022-10-04 北京爱笔科技有限公司 Track video recommendation method and device, computer equipment and storage medium
CN114449336A (en) * 2022-01-20 2022-05-06 杭州海康威视数字技术股份有限公司 Vehicle track animation playing method, device and equipment
CN114449336B (en) * 2022-01-20 2023-11-21 杭州海康威视数字技术股份有限公司 Vehicle track animation playing method, device and equipment
CN115655301A (en) * 2022-11-11 2023-01-31 北京中交兴路车联网科技有限公司 Vehicle navigation route selection method and device, electronic equipment and medium
CN115659088A (en) * 2022-12-12 2023-01-31 亿海蓝(北京)数据技术股份公司 Navigation track display method and device and readable storage medium

Also Published As

Publication number Publication date
CN111553732B (en) 2024-02-23

Similar Documents

Publication Publication Date Title
CN111553732B (en) Method and device for processing movement track
WO2022247677A1 (en) Urban-region road network vehicle-passage flow prediction method and system based on hybrid deep learning model
US8855361B2 (en) Scene activity analysis using statistical and semantic features learnt from object trajectory data
Kim et al. Vision-based nonintrusive context documentation for earthmoving productivity simulation
Saxena et al. Crowd behavior recognition for video surveillance
CN103577875B (en) A kind of area of computer aided CAD demographic method based on FAST
CN110533685B (en) Object tracking method and device, storage medium and electronic device
AU2014240669B2 (en) Object monitoring system, object monitoring method, and monitoring target extraction project
CN104254873A (en) Alert volume normalization in a video surveillance system
JP2013196684A (en) Object counting method and object counting device
CN110781818B (en) Video classification method, model training method, device and equipment
GB2443739A (en) Detecting image regions of salient motion
CN113660225A (en) Network attack event prediction method, system, device and medium based on time sequence point
US20230144809A1 (en) Model operation support system and method
Martani et al. Pedestrian monitoring techniques for crowd-flow prediction
CN114332778B (en) Intelligent alarm work order generation method and device based on people stream density and related medium
EP4097577A1 (en) Systems and methods for resource analysis, optimization, or visualization
Chong et al. Hierarchical crowd analysis and anomaly detection
Dino et al. Vision-based estimation of the number of occupants using video cameras
CN117292321A (en) Motion detection method and device based on video monitoring and computer equipment
Mahajan et al. Analyzing Traffic Signal Performance Measures to Automatically Classify Signalized Intersections.
Girgensohn et al. Determining activity patterns in retail spaces through video analysis
KR20150005863A (en) Method and apparatus for counting pedestrians by moving directions
CN113486754B (en) Event evolution prediction method and system based on video
CN115857413A (en) Intelligent building safety monitoring system and method based on Internet of things

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant