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

Method and device for processing movement track Download PDF

Info

Publication number
CN111553732B
CN111553732B CN202010347241.9A CN202010347241A CN111553732B CN 111553732 B CN111553732 B CN 111553732B CN 202010347241 A CN202010347241 A CN 202010347241A CN 111553732 B CN111553732 B CN 111553732B
Authority
CN
China
Prior art keywords
coordinate point
track
coordinate
point combination
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.)
Active
Application number
CN202010347241.9A
Other languages
Chinese (zh)
Other versions
CN111553732A (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

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 method and a device for processing a moving track, which are used for obtaining the moving track to be processed; determining first coordinate point combinations of coordinate point combinations with missing tracks in the moving tracks to be processed, and screening matched reference tracks from a plurality of reference tracks of a historical track library according to a matching rule for each first coordinate point combination to serve as complement tracks of the first coordinate point combinations; the reference track is a complete track of two coordinate points comprising a first coordinate point combination; and complementing the missing track by using the coordinate points positioned between the two coordinate points of the first coordinate point combination in the complementing track of the first coordinate point combination, so as to obtain the complemented moving track. Therefore, the scheme can supplement the missing part of the to-be-processed moving track by 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 to-be-processed moving track with the missing can be complemented 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 track.
Background
Most sites (including but not limited to cells, campuses, and shopping malls, etc.) have monitoring equipment installed at multiple locations within the covered area to enable monitoring of the personnel active within the area. Based on this, the monitoring screen can be analyzed to obtain a plurality of coordinate points corresponding to positions passed by a person when moving within the area and time stamps for each coordinate point (for indicating the time points passed by the corresponding positions), and the positions are combined by the corresponding time stamps to obtain the movement trajectories of the corresponding person. Multiple track value mining tasks can be executed based on the moving track of the person, such as detecting suspicious persons through the moving track, judging the preference of the corresponding person to different stores, and the like.
In a practical environment, it is generally difficult to obtain a complete moving track of a person in a certain area, for example, in a situation with high personnel density (such as a mall), the position of a specific person cannot be determined within a period of time due to the fact that different persons are blocked, and the position of the specific person cannot be determined due to the fact that the factors can finally cause the moving track of the corresponding person to be lost, and the accuracy of the result output by a subsequent track value mining task is reduced due to the fact that the moving track is lost.
Disclosure of Invention
In order to solve the above problems, the present application provides a method and an apparatus for processing a movement track, so as to provide a solution capable of complementing a missing movement track.
The first aspect of the present application provides a method for processing a movement track, including:
obtaining a to-be-processed moving track generated by moving a target object in a target area; the to-be-processed moving track comprises a plurality of coordinate points used for representing the passing position of the target object and a time stamp corresponding to each coordinate point;
determining a first coordinate point combination of the movement track to be processed; wherein every two adjacent coordinate points of the movement track to be processed are used as a coordinate point combination; the first coordinate point combination refers to a coordinate point combination with a missing track in the moving track to be processed;
for each first coordinate point combination, screening a reference track matched with the first coordinate point combination from a plurality of reference tracks of a historical track library according to a preset matching rule, and taking the reference track as a complement track of the first coordinate point combination; the reference track refers to a moving track which comprises two coordinate points of the first coordinate point combination and has no missing track between the two coordinate points;
For each first coordinate point combination, using other coordinate points located between two coordinate points included in the first coordinate point combination in the complement track of the first coordinate point combination to complement the missing track corresponding to the first coordinate point combination of the to-be-processed moving track; and the combination of the complemented missing track corresponding to each first coordinate point combination and the to-be-processed moving track is used as a complemented moving track.
Optionally, the determining the first coordinate point combination of the movement track to be processed includes:
for each coordinate point combination of the to-be-processed moving track, 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 breakpoint refers to a coordinate point that the target object enters and leaves a monitoring blind zone;
and determining each coordinate point combination of the to-be-processed moving track as a first coordinate point combination if the time interval between two coordinate points of the coordinate point combination is larger than a first threshold value and the two coordinate points of the coordinate point combination are not all reasonable break points.
Optionally, 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 in a historical track library according to a preset matching rule, and the reference track is used as a complement track of the first coordinate point combination, and the method includes:
calculating a motion state parameter of the first coordinate point combination in the to-be-processed moving track aiming at each first coordinate point combination, and calculating a motion state parameter of the first coordinate point combination in each reference track;
judging whether reference tracks meeting matching conditions exist in a plurality of reference tracks corresponding to each first coordinate point combination or not according 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 to-be-processed moving track 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 plurality of reference tracks meeting the matching condition exist in the corresponding reference tracks of the first coordinate point combination, determining the reference track meeting the matching condition as a complement track of the first coordinate point combination.
Optionally, after determining, for each of the first coordinate point combinations, whether there is a reference track satisfying a matching condition in the plurality of reference tracks 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 on whether the reference tracks meeting the matching condition exist in the plurality of reference tracks corresponding to the first coordinate point combination 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 to-be-processed moving track with other coordinate points located between two coordinate points included in the first coordinate point combination in the complement track of the first coordinate point combination includes:
if the first coordinate point combination corresponds to one of the complement tracks, inserting other coordinate points located between the two coordinate points of the first coordinate point combination in the complement track of the first coordinate point combination between 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 the complement 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 points between the two coordinate points of the first coordinate point combination of the moving track to be processed; the coordinate point set comprises other coordinate points between two coordinate points of the first coordinate point combination in each complement track of the first coordinate point combination; the number of the selected coordinate points is determined according to the time interval between the two coordinate points of the first coordinate point combination;
and setting a corresponding time stamp for each coordinate point between the two coordinate points inserted into the first coordinate point combination of the to-be-processed moving track.
Optionally, before determining the first coordinate point combination of the movement track to be processed, the method further includes:
determining a coordinate point combination of each to-be-processed moving track meeting 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 combinations;
Inserting the plurality of key coordinate points corresponding to the second coordinate point combinations between two coordinate points of the second coordinate point combinations for each second coordinate point combination, and setting corresponding time stamps for each key coordinate point;
wherein, the determining the first coordinate point combination of the movement track to be processed includes:
and determining a first coordinate point combination of the to-be-processed moving track after the key coordinate points are inserted.
Optionally, for each second coordinate point combination, the 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 includes:
inserting a plurality of mask units between two coordinate points of the second coordinate point combinations for each of the second coordinate point combinations; wherein the number of the mask units is determined according to the time interval of the two coordinate points of the second coordinate point combination;
converting the coordinates of each coordinate point of the moving track to be processed and the mask unit into corresponding labels;
inputting a label sequence corresponding to each second coordinate point combination and comprising a plurality of labels into a pre-trained coordinate point prediction model 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, labels of each mask unit corresponding to the second coordinate point combination, and labels of coordinate points located before the second coordinate point combination and coordinate points located after the second coordinate point combination in the to-be-processed moving track.
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 utilizing 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, deleting the sample coordinate points from the complete tracks, and obtaining deleted moving tracks corresponding to each complete track;
inputting a plurality of deleted moving tracks into the pre-training model, and optimally training the pre-training model by taking the sample coordinate points, which are obtained by the pre-training model processing the deleted moving tracks, as targets, wherein the predicted coordinate points approach to the deleted sample coordinate points, so as to obtain the coordinate point predicted model.
Optionally, before determining the first coordinate point combination of the movement track to be processed, the method further includes:
dividing the distance between the coordinate point and the previous coordinate point of the coordinate point by the difference between the time stamp of the coordinate point and the time stamp of the previous coordinate point of the coordinate point for each coordinate point of the to-be-processed moving track to obtain the speed of the coordinate point;
And determining coordinate points of which each speed is greater than a preset speed threshold value of the to-be-processed moving track as abnormal coordinate points, and deleting the abnormal coordinate points.
Optionally, the method for determining whether any coordinate point of the movement track to be processed is a reasonable breakpoint includes:
judging whether the time interval between the coordinate point and the previous coordinate point of the coordinate point is larger than a third threshold value, judging whether the time interval between the coordinate point and the next coordinate point of the coordinate point is larger than the third threshold value, judging whether the coordinate point is the initial coordinate point of the movement track to be processed, and judging whether the coordinate point is the end coordinate point of the movement track to be processed;
if the judgment result of any one of the judgment is yes, determining the coordinate point as a breakpoint;
displaying a planar map of the target area on a display device, and displaying the breakpoint on the planar map of the target area;
and responding to a first labeling instruction of the user to the breakpoint, and determining the breakpoint as a reasonable breakpoint.
A second aspect of the present application provides a processing apparatus for a movement track, including:
the obtaining unit is used for obtaining a to-be-processed moving track generated by moving the target object in the target area; the to-be-processed moving track comprises a plurality of coordinate points used for representing the passing position of the target object and a time stamp corresponding to each coordinate point;
The determining unit is used for determining a first coordinate point combination of the movement track to be processed; wherein every two adjacent coordinate points of the movement track to be processed are used as a coordinate point combination; the first coordinate point combination refers to a coordinate point combination with a missing track in the moving track to be processed;
the matching unit is used for screening a reference track matched with the first coordinate point combination from a plurality of reference tracks of a historical track library according to a preset matching rule for each first coordinate point combination, and taking the reference track as a complement track of the first coordinate point combination; the reference track refers to a moving track which comprises two coordinate points of the first coordinate point combination and has no missing track between the two coordinate points;
the completion unit is used for completing the missing track corresponding to the first coordinate point combination of the to-be-processed moving track by 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; and the combination of the complemented missing track corresponding to each first coordinate point combination and the to-be-processed moving track is used as a complemented 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, where the program is executed, and is configured to implement a method for processing a movement track provided in any one of the first aspects of the present application.
A fourth aspect of the present application provides a computer storage medium storing a program for implementing the method for processing a movement trace provided in any one of the first aspects of the present application when the program is executed.
The application provides a method and a device for processing a moving track, which are used for obtaining a to-be-processed moving track generated by moving a target object in a target area and determining a first coordinate point combination of the to-be-processed moving track; each two adjacent coordinate points of the moving track to be processed are used as a coordinate point combination, the first coordinate point combination refers to a 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 to be used as a complement track of the first coordinate point combination; the reference track refers to a moving track which comprises two coordinate points of the first coordinate point combination and has no missing track between the two coordinate points; and for each first coordinate point combination, the other coordinate points positioned between the two coordinate points included in the first coordinate point combination in the complement track of the first coordinate point combination are used for complementing the missing track between the two coordinate points of the first coordinate point combination of the movement track to be processed, so that the complemented movement track is obtained. Therefore, for the to-be-processed moving track with partial deletion, 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 partial deletion of the to-be-processed moving track can be used for supplementing the deletion part of the to-be-processed moving track, so that the to-be-processed moving track with the deletion can be accurately complemented.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present invention, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a method for processing a movement track according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a result after rasterizing a target region according to an embodiment of the present disclosure;
FIG. 3 is a flowchart of a method for determining a reasonable breakpoint in a movement track 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 complement trajectory of a coordinate point combination according to an embodiment of the present application;
fig. 6 is a flowchart of a method for processing a movement track according to another embodiment of the present application;
fig. 7 is a schematic diagram of a movement track to be processed 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 application;
fig. 9 is a schematic structural diagram of a processing device for a movement track 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 following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the 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 the occasion of acquiring the moving track of a person so as to complement the missing coordinate point in the moving track, thereby ensuring that the subsequent track value excavation task based on the moving track can obtain an accurate result.
Referring to fig. 1, the method for processing a movement track provided in the present embodiment includes the following steps:
S101, obtaining a to-be-processed moving track generated by moving the target object in the target area.
Wherein the target object is any object which has entered the target area.
The moving track includes a plurality of coordinate points representing 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 represent a time when the target object passes the corresponding position.
The target area may be any area in life where monitoring devices covering a large area of the whole area are provided, for example, a large number of monitoring devices are arranged in a market, a school campus, a hospital or the like, and people moving in the area can be monitored in real time, and the area can be used as the target area in the embodiment of the application. The target object refers to any person entering the target area, specifically, each person entering the target area in a period of time may be determined as the target object, so that the processing method provided by the embodiment is executed on the moving track of each person entering the target area in the period of time in the target area.
It should be noted that, the method for processing a movement track provided in any embodiment of the present application may be performed in real time when the target object has entered the target area and is moving in the target area, that is, may obtain, by monitoring in real time, a coordinate point where the target object is located at each moment, on the one hand, when the target object moves in the target area, and on the other hand, the movement track formed by a plurality of coordinate points through which the target object has passed may be used as a movement track to be processed and the method provided in the embodiment is performed on the movement track.
Of course, the method for processing a movement track provided in any embodiment of the present application may be executed after the target object is moved out of the target area after the movement of the target object in the target area is completed. For example, assuming that the target area is a mall and the business hours of the mall are 8:00 to 22:00, the method for processing the movement track provided in the application can be executed after 22:00 of the day, so that the movement track of each consumer moving in the mall on the day is processed.
In addition, the method for processing 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 can be used as a target area.
The moving track of a person A in the target area can be identified by utilizing the existing various visual image-based identification algorithms (including but not limited to pedestrian detection, pedestrian re-identification and face identification), images at all times obtained by monitoring are identified, and then the plane position of the person A in the target area in the images is determined by utilizing a two-dimensional plane to three-dimensional coordinate space conversion algorithm aiming at the images with the person A identified, so that the positions of the person A at all times during the movement of the person A in the target area can be obtained by analyzing the monitoring images at all times during the movement of the person A in the target area. Then, the position of the personnel A at each moment can be converted into a corresponding coordinate point only by establishing a reasonable coordinate system in the target area, and the time stamp of the coordinate point is the moment when the monitoring equipment shoots and obtains a corresponding monitoring image.
One way to build a coordinate system is to rasterize the target area at certain distance intervals S. That is, in the horizontal direction and the vertical direction, each time a distance S passes, a grid line is set, so that the target area can be divided into a plurality of square grids with side length S, and then a vertex of a certain square grid is selected as an origin point, so that a coordinate system can be obtained. An alternative result of the rasterization may be represented by fig. 2, with the dots in fig. 2 representing coordinate points used to represent the location of personnel in the mall after rasterization.
On this basis, for the position of any person in each square grid, the vertex closest to the position among the four vertices of the square grid can be used as the coordinate point of the position. The coordinate value of each coordinate point can be expressed by the number of the corresponding grid lines starting from the origin. For example, the coordinate point a marked in fig. 2 may 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 this 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 passes after the monitoring device is started, where T may be preset to any value according to actual needs, for example, may be set to 1s or 0.5s. For example, when T is set to 1s, the current monitoring image may be stored every 1 second after the monitoring device in the target area is started, and the analysis described above may be performed on these monitoring images later, thereby determining the positions of the individual persons in the target area every 1 second.
S102, detecting the position of the 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 section of missing track in the movement track to be processed, and the position of the missing track can be represented by the 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, for each two adjacent coordinate points in the movement track to be processed (each two adjacent coordinate points may be marked as a coordinate point combination), whether one or more missing coordinate points exist between the two coordinate points, that is, whether a missing track exists between the two coordinate points, if it is determined that a missing track exists between the two coordinate points, marking a position between two coordinate points of the coordinate point combination target as a position where a section of the missing track exists in the movement track to be processed, and determining this coordinate point combination as a coordinate point combination where a missing track exists (a coordinate point combination where a missing track exists may also be marked as a first coordinate point combination in the present application).
It is understood that a movement track to be processed may have a plurality of first coordinate point combinations satisfying the above conditions, or may not have a first coordinate point combination satisfying the above conditions.
The method for judging whether the missing track exists between two coordinate points of one coordinate point combination can be as follows:
and subtracting the time stamps 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 larger than a first threshold value and the two coordinate points are not all reasonable break points, 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 be set to be slightly greater than the sampling time interval T, which is not limited in this application.
For example, the sampling time interval T may be set to be equal to 1s, the first threshold is equal to T, each coordinate point combination in the moving track to be processed is detected, two coordinate points (marked as a coordinate point a and a coordinate point B) included in a certain coordinate point combination are found, the time interval between a time stamp T0 corresponding to the coordinate point a and a time stamp T1 corresponding to the coordinate point B is 10s, and if neither the coordinate point a nor the coordinate point B is a reasonable breakpoint, it is determined that a missing track exists between the coordinate point a and the coordinate point B.
It will be appreciated that in the above example, there should be a plurality of corresponding coordinate points whose time stamps are located between T0 and T1 between the coordinate point a and the coordinate point B, however, there are no other coordinate points between the coordinate point a and the coordinate point B in the movement trajectory to be processed, and thus it may be determined that a plurality of continuous coordinate points between the coordinate point a and the coordinate point B are missing, in other words, it may be determined that there is a missing trajectory between the two coordinate points.
The reasonable breakpoint refers to a coordinate point at which a target object enters and leaves the monitoring blind area. The monitoring blind area is defined as an area which cannot be monitored by the monitoring equipment in the target area, and specifically can comprise an area outside the target area and some areas which are not configured with the monitoring equipment in the target area.
Taking a market as an example, the monitoring coverage range of the market is a public activity area of the market, for example, a passageway of the market is the public activity area, a plurality of shops are further arranged in the market, each shop occupies a certain area in the market, the monitoring of the market does not cover the space in each shop of the market, and therefore the area covered by the shops is a monitoring blind area in the market.
Similarly, the campus is monitored to cover the roads in the campus, but not the spaces in the buildings (such as teaching buildings and libraries), so that the area covered by the buildings is a monitoring blind area for the campus.
Further, for the monitoring device in the target area, the space outside the target area also belongs to a monitoring blind area, for example, roads outside a mall and a campus belong to the monitoring blind area.
Thus, if the target area is a mall, the reasonable break point may include coordinate points at which the target object enters and leaves the mall, and coordinate points at which the target object enters and leaves each store within the mall.
It will be appreciated that the blind areas are not limited to the above-described areas, and that the blind areas of a mall may also include a washroom, a dressing room, etc., as examples.
The specific method for determining the reasonable breakpoint is referred to the description of the following embodiments.
The fact that two coordinate points of a coordinate point combination are not all reasonable break points includes the following two cases, wherein in the first case, the two coordinate points of the coordinate point combination are not all reasonable break points; second, of the two coordinate points of the coordinate point combination, one coordinate point is a reasonable breakpoint, and the other coordinate point is not a reasonable breakpoint.
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 the outlier coordinate points is as follows:
and respectively calculating the distance between the coordinate point and the coordinate point before the coordinate point and the time interval between the coordinate point and the coordinate point before the coordinate point for each coordinate point of the moving track to be processed, and dividing the distance by the time interval to obtain the speed of the coordinate point. Judging whether the speed of the coordinate point is greater than a preset speed threshold value, 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 active in a mall, the speed threshold may be set to 5 meters/second.
If no abnormal coordinate point exists in the to-be-processed moving track and no missing track exists between the two coordinate points of each coordinate point combination, the to-be-processed moving track is a complete moving track, and no completion is needed, so that no subsequent step is executed.
S103, selecting a reference track matched with each coordinate point combination with the missing track from a plurality of reference tracks according to a preset matching rule, and taking the reference track as a complement track of the coordinate point combination.
For any one of the moving tracks to be processed, a coordinate point combination of a missing track exists, wherein a reference track of the coordinate point combination refers to a moving track which meets the condition that two coordinate points comprising the coordinate point combination are included in a historical track library and the missing track does not exist between the two coordinate points.
Assuming that a combination of coordinate points in which a missing track exists in one of the movement tracks to be processed includes a coordinate point a and a coordinate point B, respectively, for a plurality of movement tracks recorded in the history 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 combination of coordinate points.
For any coordinate point combination with a missing track, the preset matching rule refers to: in the moving track to be processed, the motion parameters when the target object is positioned around the coordinate point combination are matched with the motion parameters when the object corresponding to the reference track is positioned in a similar area in the reference track.
The motion parameters used for matching may include an average speed when reaching or leaving 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, and the like, which is not limited in this application. An alternative matching method may be performed by reference to the description of the following embodiments.
S104, for each coordinate point combination with the missing track, the missing track corresponding to the coordinate point combination is complemented by the complement track of the coordinate point combination.
The completion of the missing track of any coordinate point combination with the missing track refers to 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 the two coordinate points of the coordinate point combination in the moving track to be processed, so that the completion of the missing track corresponding to the coordinate point combination is completed.
For example, if one of the first coordinate point combinations in the to-be-processed moving track includes coordinate points X and Y, the complement track of the first coordinate point combination includes coordinate points X, a, B, C, D, E, Y, that is, 5 other coordinate points between the coordinate points X and Y, then the complement of step S104 is to insert 5 coordinate points a, B, C, D, E in the complement track into the coordinate points X and Y of the to-be-processed moving track, so that the to-be-processed moving track also includes X, a, B, C, D, E, and then the corresponding time stamps are set for the 5 coordinate points a, B, C, D, E inserted into the to-be-processed moving track according to the time stamps of the coordinate points X and Y in the to-be-processed moving track, and after the time stamps are set for the 5 coordinate points, the complement of the missing track corresponding to the first coordinate point combination of the coordinate points X and Y of the to-be-processed moving track is completed.
The time stamp of the coordinate point inserted into the movement track to be processed may be determined according to the time stamp of two coordinate points included in the combination of the coordinate points, a preset sampling time interval, and the number of the inserted coordinate points.
For example, a coordinate point combination where a missing track exists includes a first coordinate point, a corresponding time stamp is T0, and a second coordinate point, a corresponding time stamp 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 moving track to be processed when step S104 is performed, and a sampling time interval is 1S, then a time stamp located 1S after the time stamp T0, that is, t0+1s, may be set as the time stamp of the first inserted coordinate point, t0+2s may then be set as the time stamp of the second inserted coordinate point, and so on until t0+9s (that is, T1-1S) is set as the time stamp of the ninth inserted coordinate point.
In other words, when setting the time stamp, it is necessary to ensure that the time interval of each two adjacent coordinate points (i.e., the difference in 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 complement track originally.
For any one of the first coordinate point combinations in the movement track to be processed, if the first coordinate point combination corresponds to a plurality of complement tracks, other coordinate points between two coordinate points of the first coordinate point combination in each complement track can be formed into a coordinate point set, then the occurrence frequency of each coordinate point in the coordinate point set is counted, finally, the number N of coordinate points inserted between the two coordinate points of the first coordinate point combination is selected as the first N coordinate points in the coordinate point set from high to low according to the occurrence frequency to serve as the coordinate points inserted into the missing track of the movement track to be processed.
The number N of coordinate points to be inserted between two coordinate points of one first coordinate point combination may be determined based on the time interval of the two coordinate points of this first coordinate point combination and the above-described sampling time interval. For example, if the time interval between two coordinate points of one 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 quotient obtained 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, two coordinate points included in the first coordinate point combination in the movement track to be processed are marked as X and Y, where the coordinate point X is before, 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, and this first coordinate point combination corresponds to 5 complementary tracks, and there are 5 other coordinate points between the coordinate point X and the coordinate point Y in each complementary track. The coordinate point set composed of 5 coordinate points of the 5 complement trajectories can be represented by the following table 1:
TABLE 1
In table 1, coordinate point 1 represents a first coordinate point located after coordinate point X in a certain complement track, and symbols of cells in the table represent positions of each coordinate point in a certain complement track, and if 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, respectively, 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) in order from high to low. Therefore, the coordinate points A1, B2, C2, D1, and E2 can 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 one first coordinate point combination corresponds to a plurality of complement trajectories, a coordinate point having a higher frequency of occurrence among the complement trajectories may be selected as a coordinate point for inserting the movement trajectory to be processed.
After the missing track corresponding to each first coordinate point combination of the movement track to be processed is complemented in the above manner, the combination of a plurality of coordinate points inserted between two coordinate points of each first coordinate point combination and the movement track to be processed is the complemented movement track.
The application provides a processing method of a moving track, which comprises the steps of obtaining a to-be-processed moving track generated by moving a target object in a target area, and determining a first coordinate point combination of the to-be-processed moving track; each two adjacent coordinate points of the moving track to be processed are used as a coordinate point combination, the first coordinate point combination refers to a 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 to be used as a complement track of the first coordinate point combination; the reference track refers to a moving track which comprises two coordinate points of the first coordinate point combination and has no missing track between the two coordinate points; and for each first coordinate point combination, the other coordinate points positioned between the two coordinate points included in the first coordinate point combination in the complement track of the first coordinate point combination are used for complementing the missing track between the two coordinate points of the first coordinate point combination of the movement track to be processed, so that the complemented movement track is obtained. Therefore, for the to-be-processed moving track with partial deletion, 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 partial deletion of the to-be-processed moving track can be used for supplementing the deletion part of the to-be-processed moving track, so that the to-be-processed moving track with the deletion can be accurately complemented.
Further, the embodiment of the application distinguishes the reasonable coordinate point loss caused by the fact that the target object moves to the monitoring blind area and the unreasonable coordinate point loss caused by the fact that the recognition fails by recognizing the reasonable breakpoint in the to-be-processed moving track, so that the coordinate point of the target object in the monitoring blind area is prevented from being generated in the completed moving track, and the rationality of the time sequence is guaranteed.
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 for each coordinate point in a moving track to be processed, whether a reasonable breakpoint exists in the moving track to be processed, and when the reasonable breakpoint exists, which coordinate points are specific reasonable breakpoints can be identified.
The method comprises the following steps:
s301, judging whether the current coordinate point is a breakpoint.
The judgment in step S301 specifically includes the following four items:
judging whether the time interval between the current coordinate point and the coordinate point before the current coordinate point is larger than a third threshold value;
judging whether the time interval between the current coordinate point and the coordinate point which is the next coordinate point of the current coordinate point is larger 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.
If one or more of the four judgments are yes, determining the current coordinate point as 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 detecting the breakpoint in the movement track to be processed, starting from one end of the movement track to be processed, taking each coordinate point of the movement track to be processed as the current coordinate point one by one, and executing the method provided by the embodiment.
S302, displaying the current coordinate point on a planar map of the target area displayed by the display device.
The boundary of the target area, the entrance and exit of the communicated target area, the monitoring blind areas and the entrance and exit of the monitoring blind areas in the target area are displayed on the planar map of the target area.
For example, if the target area is a mall including a plurality of shops, the planar map of the target area may display the area occupied by each shop, and then the planar map of the mall may display the entrance and exit of the mall, the area covered by the monitoring blind areas of each shop, washroom, dressing room, etc. of the mall, and the entrance and exit of these areas.
S303, responding to a first labeling instruction of a user to the breakpoint, and determining the breakpoint as a reasonable breakpoint.
The user described in step S303 refers to a technician responsible for performing the labeling task of the reasonable breakpoint.
In combination with the planar 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 leaves the monitoring blind area by observing whether the breakpoint is at an entrance of the target area or an entrance of the monitoring blind area in the target area, if the breakpoint meets 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 just leaves the monitoring blind area, the user can trigger a first labeling instruction for the breakpoint so as to label the breakpoint as a reasonable breakpoint, and if the breakpoint does not meet any of the two conditions, the user can trigger a second labeling instruction for the breakpoint so as to label the breakpoint as an unreasonable breakpoint.
An alternative display interface of a planar map of a breakpoint and a target area may be shown in fig. 4, where both a breakpoint 1 and a breakpoint 2 are close to an entrance of a store 1, and may be considered as coordinate points when a person in the store is about to enter the store 1 and just leave the store 1, so that the two breakpoints are determined as reasonable breakpoints, and a breakpoint 3 is far from the entrance of any store, and is marked as an unreasonable breakpoint.
It will be appreciated that the method shown in fig. 3 may be applied to each coordinate point of the movement track to be processed, and may also be applied to each coordinate point of any one movement track other than the movement track to be processed.
Alternatively, when communication is impossible between the server for processing the monitor image to obtain each coordinate point and the display device for displaying the planar map to the user (i.e., in an offline state), it is also possible to determine whether a breakpoint is a reasonable breakpoint by:
first, for each breakpoint in the past period of time (for example, in the past year, or in the past month), determining whether the time interval between the breakpoint and the previous coordinate point of the breakpoint, and the time interval between the breakpoint and the next coordinate point of the breakpoint, are greater than a preset fourth threshold (optionally, the fourth threshold may be set to 15 s), if either or both of the time intervals are greater than the fourth threshold, recording the breakpoint in a local full-quantity breakpoint library, and otherwise, if neither of the time intervals is greater than the fourth threshold, not recording the breakpoint in the local full-quantity breakpoint library.
On the basis, if one breakpoint is detected in an offline state, density clustering is carried out on the breakpoint and all the breakpoints in the full-quantity breakpoint library, so that all the breakpoints recorded in the newly added breakpoint and the full-quantity 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 breakpoints belong is larger than the proportion of the unreasonable breakpoints, the newly added breakpoints are determined to be reasonable breakpoints, and if the proportion of the unreasonable breakpoints in the category to which the newly added breakpoints belong is larger than the proportion of the reasonable breakpoints, the newly added breakpoints are determined to be unreasonable breakpoints.
It can be appreciated that if there are multiple target areas (e.g., in a mall with multiple floors, each floor is a target area), each target area can establish a corresponding full-quantity breakpoint library for determining whether the newly added breakpoint is a reasonable breakpoint when there is a newly added breakpoint in the target area.
The embodiment of the application provides a method for screening a complement track, which is used for screening a reference track matched with a first coordinate point combination from a plurality of reference tracks according to a preset matching rule aiming at any first coordinate point combination as the complement track of the first coordinate point combination, referring to fig. 5, and specifically comprises the following steps:
s501, calculating the motion state parameters of the movement tracks to be processed and the motion state parameters of each reference track.
The motion state parameter of the moving track to be processed refers to the motion state parameter of the first coordinate point combination in the moving track to be processed, which is required to be screened for the completion track, and the motion state parameter of the corresponding reference track refers to the motion state parameter of the first coordinate point combination in the reference track, which is required to be screened for the completion track.
The motion state parameter of the first coordinate point combination in the moving track to be processed comprises a first speed value, a second speed value, 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 parameter of the first coordinate point combination in one reference track comprises a fourth speed value, a fifth speed value, a sixth speed value of the first coordinate point combination in the reference track 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 market, the moving track to be processed is a track of a customer A of the market when moving in the market, and a first coordinate point combination (comprising a coordinate point A and a coordinate point B, wherein a time stamp corresponding to the coordinate point A is earlier than a time stamp of the coordinate point B) of a missing track exists in the moving track to be processed, and a reference track of the first coordinate point combination is a track of a customer B when moving in the market.
The first velocity value is the average velocity before the first arrival at the coordinate point a, specifically, the average velocity of 10 coordinate points located before the coordinate point a in the movement track to be processed may be calculated, and the calculation result is taken as the first velocity value. For example, assuming that the coordinate point C is located before the coordinate point a in the movement trajectory to be processed and 10 coordinate points are spaced between the coordinate point C and the coordinate point a, the distance between the coordinate point C and the coordinate point a may be divided by the time interval between the coordinate point C and the coordinate point a, and the obtained result may be taken as the first velocity 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 combination with the above example, the second speed value is the average speed at which the customer a moves from the coordinate point a to the coordinate point B, and the second speed value may be obtained by dividing the distance between the coordinate point a and the coordinate point B by the time interval between the coordinate point a and the 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 one coordinate point D located after the coordinate point B in the movement track to be processed, 10 coordinate points are spaced between the coordinate point D and the coordinate point B, 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 taken as a third speed value.
The fourth speed value represents an average speed of the object corresponding to the reference trajectory before reaching the first coordinate point of the first coordinate point combination.
In combination with the above example, if the reference trajectory is the trajectory of the customer b moving in the mall, the fourth velocity value is the average velocity of the customer b before reaching the coordinate point a, and the specific calculation method is similar to the first velocity value, that is, the average velocity of 10 coordinate points located before the coordinate point a in the reference trajectory can be calculated, and the calculation result is taken as the first velocity value.
The fifth speed value represents an average speed at which an object corresponding to the reference trajectory moves from a first coordinate point of the first coordinate point combination to a second coordinate point.
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 is similar to that of the second speed value, and will not be described in detail.
The sixth velocity value represents an average velocity of the object corresponding to the reference trajectory after leaving the second coordinate point of the first coordinate point combination.
The sixth velocity value, that is, the average velocity of the object corresponding to the reference track (in the above example, the customer B of the mall) after leaving the coordinate point B, is similar to the third velocity value, and will not be described again.
S502, matching the motion state parameters of the to-be-processed moving track with the motion state parameters of each reference track.
If the motion state parameter of the first coordinate point combination in any one or more reference tracks and the motion state parameter of the first coordinate point combination in the to-be-processed moving track are successfully matched, step S503 is executed, otherwise, if the motion state parameter of the first coordinate point combination in each reference track and the motion state parameter of the first coordinate point combination in the to-be-processed moving track are not successfully matched, step S504 is executed.
For any one reference track, if the reference track meets 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 moving track to be processed is smaller than or equal to a first speed threshold value;
the absolute value of the difference value 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 moving track to be processed is smaller than or equal to the second speed threshold value;
the absolute value of the difference value 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 moving track to be processed is smaller than or equal to a third speed threshold value;
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 moving track to be processed is smaller than or equal to a fourth time threshold.
And determining that the motion state parameter of the first coordinate point combination in the reference track and the motion state parameter of the first coordinate point combination in the to-be-processed moving track are successfully matched.
If one reference track does not meet any one or more conditions, determining that the matching of 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 to-be-processed moving track fails.
Alternatively, the first speed threshold, the second speed threshold and the third speed threshold may each be set to 0.5m/s.
S503, determining the successfully matched reference track as a complement track of the first coordinate point combination.
S504, updating the motion state parameters of the reference track according to a preset updating strategy.
After the execution of step S504 is finished, the execution returns to step S502 until the completion track of one or more first coordinate point combinations is selected from the updated reference tracks.
The update policy described in 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 required screening complement track, and updating the motion state parameters of the selected reference track according to the following method:
And combining the first coordinate point with any one of the fourth speed value, the fifth speed value and the sixth speed value in the selected reference track, and increasing (or decreasing according to 50% probability random determination) the speed value by the corresponding speed threshold value, so as to complete the updating of the motion state parameter of the selected reference track.
For example, if a fourth velocity value is selected in which the first coordinate point is combined in the reference trajectory, a first velocity threshold may be added (or a first velocity threshold may be decreased) to this fourth velocity 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 be used to match the first coordinate point combination in the moving track to be processed and the reference track of the first coordinate point combination, which is not limited to the speed value and the time interval in the above method.
When a coordinate point combination of a missing track exists in any one of the movement tracks to be processed when the time interval between time stamps corresponding to two coordinate points of the coordinate point combination is larger than a preset second threshold (optionally, the second threshold can be set to be 5s, and other values can be set in other embodiments), the accuracy of completing the missing track corresponding to the coordinate point combination is lower by directly adopting the coordinate point in the completing track.
Referring to fig. 6, the method includes the steps of:
s601, obtaining a to-be-processed moving track generated by moving the target object in the target area.
S602, determining a coordinate point combination of each to-be-processed moving track meeting preset key coordinate point prediction conditions as a second coordinate point combination.
The first optional key coordinate point prediction condition may be that a missing track exists between two coordinate points included in the 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 of the two coordinate points is greater than the first threshold value, the coordinate point combination composed of the two coordinate points may be determined as the second coordinate point combination.
The second optional key coordinate point prediction condition may be that a missing track 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, where the second threshold is greater than the first threshold. That is, for any two adjacent coordinate points, if the two coordinate points are not all reasonable break points and the time interval of the two coordinate points is greater than the second threshold, the coordinate point combination composed of the two coordinate points may 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 the two coordinate points of the coordinate point combination.
S603, predicting the key coordinate points of each second coordinate point combination by using a pre-trained coordinate point prediction model.
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 according to the time interval between two coordinate points of the second coordinate point combination. An optional method for determining the number of key coordinate points corresponding to each second coordinate point combination is provided below:
for a second coordinate point combination having a missing track and a time interval greater than a second threshold value, the second coordinate point combination may be defined to have a key coordinate point if the time interval of the second coordinate point combination includes a second threshold value, and the second coordinate point combination may have n+1 key coordinate points if the time interval of the second coordinate point combination is greater than the sum of N second threshold values and less than the sum of n+1 second threshold values.
For example, if a second coordinate point combination having a missing track includes a coordinate point a and a coordinate point B, where the difference between the time stamp Ta of the coordinate point a and the time stamp Tb of the coordinate point B is 23 seconds, the second threshold is set to 5s, and the number of key coordinate points corresponding to the second coordinate point combination is 5.
If the time interval of one 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 key coordinate points of the second coordinate point combination may be determined as N.
If the time interval between two coordinate points of a second coordinate point combination is smaller than the second threshold value, the number of key coordinate points corresponding to the second coordinate point combination can be determined to be 1.
The above setting is only an optional setting of the present 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 the actual situation, 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 utilizing a plurality of movement tracks in a target area acquired in a past period of time. Alternatively, the neural network model may be a bidirectional coded representation (bidirectional encoder representation from transformers, bert) model based on a converter, or may be other neural network models capable of predicting key coordinate points of a section of missing track in the movement track to be processed based on other existing coordinate points in the movement track to be processed, and not necessarily 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 the missing track to be predicted, m mask units (which may be denoted as "mask") are inserted between the 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 previously.
Then, coordinate values of each coordinate point of the movement track to be processed and the mask unit are converted into corresponding labels (tokens).
The mask unit may directly use the mask as a corresponding tag, and for each coordinate point in the to-be-processed moving track, the coordinate values of the coordinate point may be spliced to obtain the tag of the coordinate point.
For example, the coordinate value of one coordinate point may be noted as (x, y), and then the label of this coordinate point may be "x_y". Specifically, if the target area is a floor of a mall, the coordinate value of each coordinate point may further include the number of floors (denoted floor), and the label of any coordinate point may be denoted as "x_y_floor".
Furthermore, in order to ensure that no coordinate points which are not in the shooting range of the monitoring equipment exist in the key coordinate points predicted by the coordinate point prediction model and prevent the feature from being sparse, the abscissa, the ordinate and the floor number of each coordinate point can be expressed in a form of independent heat 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, and the target area is a certain floor in a mall having Z floors, X, Y, and Z are positive integers, then the X binary digits may be used to form binary numbers to represent the abscissa of the coordinate point, the Y binary digits may be used to form binary numbers to represent the ordinate of the coordinate point, and the Z binary digits may be used to form binary numbers to represent the floor of the coordinate point.
Each binary bit of the abscissa corresponds to one vertical grid line, for example, each vertical grid line from left to right may sequentially correspond to each binary bit of the abscissa from left to right, if the coordinate point is located in the x-th vertical grid line, the x-th binary bit of the abscissa is set to 1, and other binary bits are all 0, so that the one-hot encoding of the abscissa of the coordinate point is obtained.
Similarly, if the coordinate point is located on the y-th horizontal grid line, the y-th binary bit of the ordinate is set to be 1, and other binary bits are all set to be 0, so that the one-hot encoding of the ordinate of the coordinate point is obtained.
The representation of the single thermal codes of the floors is similar and will not be described in detail.
Through the conversion, each coordinate point and the shade unit in the to-be-processed moving track 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 shade unit in the to-be-processed moving track.
And finally, aiming at each second coordinate point combination needing to determine the key coordinate point, 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 converted vector sequence consisting of a plurality of embedded vectors 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 the key coordinate point according to the method of splicing the coordinate values into the label to obtain the coordinate value of each key coordinate point corresponding to the second coordinate point combination, wherein the coordinate value is predicted by the coordinate point prediction model.
The label sequence corresponding to the second coordinate point combination comprises: the second coordinate point combination includes labels of two coordinate points, labels of a plurality of mask units interposed between the two coordinate points of the second coordinate point combination, labels of coordinate points located before the second coordinate point combination in the movement track to be processed, and labels of coordinate points located after the second coordinate point combination in the movement track to be processed.
The label sequence of the second coordinate point combination specifically comprises a plurality of coordinate points before and after the second coordinate point combination, and the label sequence 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 by the coordinate point prediction model at a time.
For example, assuming that the coordinate point prediction model allows the length of the inputted tag sequence to be N, which is a positive integer greater than m, at a time of determining the tag sequence of the second coordinate point combination, the total number of tags of coordinate points before and after the second coordinate point combination included in the tag sequence is equal to N-m-2, and if the number is an even number, the tag of (N-m-2)/2 coordinate points before the second coordinate point combination and the tag of (N-m-2)/2 coordinate points after the second coordinate point combination may be selected to constitute the tag sequence of the second coordinate point combination, respectively.
If N-m-2 is an odd number, the label of (N-m-3)/2 coordinate points before the second coordinate point combination and the label of (N-m-3)/2+1 coordinate points after the second coordinate point combination may be formed 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, so as to ensure that the last composed tag sequence has N tags.
S604, inserting the key coordinate point of each second coordinate point combination between two coordinate points of the corresponding second coordinate point combination.
When key coordinate points are inserted into one second coordinate point combination, the following method may be adopted to set a time stamp of each inserted key coordinate point:
and marking the coordinate point with the earlier corresponding time stamp as a first coordinate point, marking the corresponding time stamp as T0, marking the other coordinate point as a second coordinate point and marking the corresponding time stamp as T1 in the two coordinate points included in the second coordinate point combination. Thus, the predicted time stamp of the first key coordinate point is set equal to T0 plus the time stamp after the second threshold, for example, if the second threshold is equal to 5s, the predicted time stamp of the first key coordinate point is equal to t0+5s, the time stamp of the second key coordinate point is set equal to the time stamp of the first key coordinate point plus the second threshold, that is, t0+10s, and then the time stamp corresponding to each key coordinate point is equal to the time stamp of the previous key coordinate point plus the second threshold except the last key coordinate point 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 time stamp of the previous key coordinate point of the last key coordinate point and the time stamp of the second coordinate point is smaller than the second threshold value, the time stamp of the last key coordinate point may be set to be equal to the time stamp of the second coordinate point minus the first threshold value, for example, if the first threshold value is set to be 1s, the time stamp of the last key coordinate point is equal to T1-1s.
In this way, a plurality of key coordinate points can be inserted between each second coordinate point combination, and subsequent complementation can be performed for every two adjacent key coordinate points and the original coordinate points of the to-be-processed moving track adjacent to the key coordinate points. Therefore, the corresponding missing track with longer missing time can be split into a plurality of segments of corresponding missing tracks with shorter missing time, so that the completed moving track is ensured to be closer to the real moving track.
S605, detecting the position of a missing track in the to-be-processed moving track after the key coordinate points are inserted.
The execution of step S605 is identical to the execution 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 track to be processed after inserting a plurality of key coordinate points predicted by the coordinate point prediction model. Therefore, among the plurality of coordinate point combinations having the missing track detected in step S605, there may be a coordinate point combination entirely composed of two adjacent coordinate points of the original moving track to be processed, a coordinate point combination entirely composed of two adjacent key coordinate points predicted by the coordinate point prediction model, or a coordinate point combination composed of one coordinate point of the original moving track to be processed and a key coordinate point adjacent to the one coordinate point and predicted.
And, by the prediction and insertion of 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.
S606, selecting a reference track matched with each coordinate point combination with the missing track from a plurality of reference tracks according to a preset matching rule, and taking the reference track as a complement track of the coordinate point combination.
S607, for each coordinate point combination with the missing track, the missing track corresponding to the coordinate point combination is complemented by the complement track of the coordinate point combination.
The specific execution process of step S606 and step S607 is identical to step S103 and step S104 in the foregoing embodiments, and will not be described again.
In this embodiment, for a missing track with a corresponding missing track with an excessively long missing time (the missing time is greater than a preset second threshold value), 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 a plurality of missing tracks with shorter missing time, and the completion of the missing track is more accurate.
Finally, the implementation process of the method for processing the movement track provided by the embodiment of the application is described by combining a specific application scene.
Assuming that the destination area is a floor of a mall, the destination object is a customer c moving on the floor of the mall, the customer c enters the floor from one stairway entrance, and leaves from the other stairway entrance after the floor moves for a period of time, and the movement track of the customer c to be processed in the destination area is obtained by identifying and processing the image of the monitoring device as shown in fig. 7.
The dots in fig. 7 represent each coordinate point included in the movement track to be processed, and the arrow direction is the movement sequence of the customer c determined according to the time stamps corresponding to each coordinate point.
After the movement track to be processed shown in fig. 7 is obtained, the first threshold is set to be 1s, by calculating the difference value of the time stamps of the two coordinate points of each coordinate point combination, it can be found that 4 coordinate point combinations with time intervals greater than 1 second exist, the 4 coordinate point combinations comprise 8 coordinate points, the coordinate points 1 to 8 are marked according to the sequence of the corresponding time stamps, and the corresponding time stamps are marked as T1 to T8 in sequence.
By performing breakpoint labeling or clustering on the coordinate points in fig. 7, it can be determined that the coordinate point 3 and the coordinate point 4 are reasonable breakpoints, so that the coordinate point combination 1 formed by the coordinate point 1 and the coordinate point 2, the coordinate point combination 2 formed by the coordinate point 5 and the coordinate point 6, and the coordinate point combination 3 formed by the coordinate point 7 and the coordinate point 8 are finally determined as three coordinate point combinations with missing tracks in the movement track to be processed.
By adopting the second key coordinate point prediction condition, setting the second threshold equal to 5s, and finding the difference between the timestamp T1 corresponding to the coordinate point 1 and the timestamp T2 corresponding to the coordinate point 2 by the timestamps of the two coordinate points of the coordinate point combination with the missing track, where the difference is equal to 12s, it is determined that the coordinate point combination 1 has two or three key coordinate points to be predicted, and in this example, the two key coordinate points are determined.
After the number of key coordinate points is determined, two key coordinate points (i.e., two X-shaped points in fig. 7) shown in fig. 7 can be predicted to go in and out using the coordinate point prediction model.
After two illustrated key coordinate points are inserted into the movement track to be processed, the deletion track between the original coordinate point 1 and the coordinate point 2 is divided into three sections of deletion tracks, and the deletion time corresponding to each section of deletion track in fig. 7 is smaller than 5 seconds, so that the movement track of the customer C in the target area after completion can be obtained by using the method described in the step S103 and the step S104 in the embodiment corresponding to fig. 1 to complete the deletion track of each coordinate point combination with the deletion track obtained by screening and using the completion track obtained by screening to complete the deletion track of the coordinate point combination.
Finally, referring to fig. 8, the 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 utilizing the plurality of complete tracks to obtain a pre-training model.
It should be noted that, the complete track in step S801 refers to a moving track including the number of unreasonable break points less than the preset unreasonable break point threshold, and specifically, the unreasonable break point threshold may be set to 10, that is, for any moving track in the history track library, if the number of unreasonable break points of the moving track is less than or equal to 10, the moving track may be considered to be a complete track. The method for determining the break point and the unreasonable break point of the movement track can refer to the corresponding embodiment of fig. 3, and will not be described herein.
Alternatively, the pre-training stage may be performed directly by using a plurality of obtained complete tracks, or the method of complementing the embodiment corresponding to fig. 1 may be performed on each obtained complete track to complement the missing portion of the complete track, and then the pre-training is performed on the complemented track. Of course, the abnormal coordinate points may be further identified and deleted according to the method described in the corresponding embodiment of fig. 1 before completion.
Further, if detection and processing of movement trajectories are required for a mall including multiple floors, the pre-training stage may respectively obtain complete trajectories of multiple different floors, and respectively pre-train with the complete trajectories of the different floors.
The process of pre-training by using multiple complete tracks is to replace each breakpoint in the complete track with a [ MISS ] separator, and then, for each coordinate point in each complete track, splice the coordinate value of the coordinate point into a corresponding label according to the method described in the embodiment corresponding to fig. 6, for example, if only the complete track of one floor is used for pre-training, coordinate points with coordinate values of (x, y) may be spliced to obtain a label "x_y", and if the complete track of multiple floors is used for pre-training, the spliced label should include the floor number floor where the coordinate point is located, i.e. "x_y_floor". The [ MISS ] separator in the complete track may be replaced by a preset label, for example, a line feed symbol may be used as a label corresponding to the [ MISS ] separator, so that each complete track may be converted into a label sequence.
The tag sequences of all complete tracks obtained can then be combined into a 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 wrap-around symbols can be used as track separation tags.
Finally, a mask language model (masked language model, MLM) and sentence-in-sentence prediction (next sentence prediction, NSP) task is performed on the combined first tag sequence with a bi-directional coded representation (bert) model based on the converter, thereby implementing an unsupervised training procedure based on the first tag sequence for the bert model.
In the application, the training process based on the mask language model task is to obtain a sub-tag sequence composed of N continuous tags of a first tag sequence, randomly replace a certain tag of the sub-tag sequence with a tag corresponding to a mask unit [ mask ], then input the replaced sub-tag sequence into a to-be-trained bert model, finally the bert model outputs a tag sequence, then the tag corresponding to the mask unit [ mask ] in the output tag sequence and the tag replaced by the mask unit [ mask ] in the sub-tag sequence can be compared, and parameters in the bert model are adjusted based on the comparison result.
N is a positive integer, and N is the number of labels of each input model specified by the pre-built bert model.
The training process based on the following sentence prediction task is that a sub-tag sequence formed by continuous N-1 tags is selected from the first tag sequence, then the track separation tag is inserted in the middle of the sub-tag sequence, the replaced sub-tag sequence is input into the bert model, and finally the bert model outputs a judging result which is used for indicating whether the first tag after the track separation tag and the tag sequence before the track separation tag are continuous in the first tag sequence. Thus, the judgment result and the actual situation can be compared, 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 to serve as sample coordinate points, deleting the sample coordinate points from the complete tracks, and obtaining deleted moving tracks corresponding to each complete track.
Specifically, for each complete track, a plurality of reasonable break points and unreasonable break points (for example, 5 reasonable break points and 5 unreasonable break points may be selected respectively, although other selection manners may be adopted, and the number of the selected break points is not limited to 5) may be selected randomly as 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, the value range of n may be set to 5 to 120, and other ranges may also be set. For each reference point, a number may be randomly determined as the value of n in this range, and then n coordinate points before or after this reference point are deleted.
S803, inputting a plurality of missing tracks into a pre-training model, and performing fine tuning training on the pre-training model by taking a sample coordinate point, obtained by processing the missing tracks by the pre-training model, as a target, wherein the predicted coordinate point approaches to the deleted sample coordinate point, so as to obtain a coordinate point predicted model.
After the deleted moving track is obtained, the distance between the coordinate points at two ends of the deleted track can be divided by the average speed of the object corresponding to the deleted moving track on the moving track to obtain the deletion time corresponding to each deleted track, so that the number of key coordinate points corresponding to each deleted track can be determined by adopting the method described in step S604 in the embodiment corresponding to fig. 6.
After determining the number of key coordinate points corresponding to each segment of the deleted track, a number of deleted coordinate points in the deleted segment of the track may be designated as key coordinate points of the deleted segment of the track at certain time intervals (for example, the second threshold may be used as a time interval), and the number of designated key coordinate points is equal to the number of key coordinate points of the deleted segment of the track.
And finally, processing the deleted moving track by using the pre-training model, thereby obtaining a key coordinate point which corresponds to the deleted track and is predicted by the pre-training model. Therefore, the key coordinate points predicted by the pre-training model and the deleted key coordinate points which are appointed in advance can be compared, and based on the comparison result, the parameters of the pre-training model are circularly adjusted by taking the predicted key coordinate points approaching the deleted key coordinate points as targets.
If the loss function value of the pre-training model calculated according to the distance between each predicted key coordinate point and the designated deleted key coordinate point is smaller than a certain threshold value after a certain adjustment, at the moment, the fine-tuning training is finished, and the current pre-training model is output as a coordinate point prediction model after the training is finished.
In the training method of the coordinate point prediction model, based on an unsupervised training task, the model is pre-trained by utilizing a plurality of existing complete tracks in the historical track library, so that a large amount of track data in the historical track library is prevented from being artificially marked, and the training efficiency of the model is improved.
In combination with the method for processing a movement track provided in any embodiment of the present application, an embodiment of the present application further provides a device for processing a movement track, referring to fig. 9, where the device includes:
an obtaining unit 901, configured to obtain a movement track to be processed generated by moving the target object in the target area.
Wherein the target object is any object which enters the target area; the movement track includes a plurality of coordinate points representing positions through which the target object passes and a time stamp corresponding to each coordinate point.
And the determining unit 902 is configured to determine, as a coordinate point combination having a missing track, each coordinate point combination in the movement track to be processed, where a time interval between two coordinate points included in the movement track is greater than a first threshold and the two coordinate points are not all reasonable breakpoint conditions.
The coordinate point combination where the missing track exists can also be marked as the first coordinate point combination.
Every two adjacent coordinate points of the movement track to be processed are taken as a coordinate point combination, and the reasonable breakpoint refers to the coordinate point that the target object enters and leaves the monitoring blind area.
The matching unit 903 is configured to, for each first coordinate point combination, screen, according to a preset matching rule, a reference track matched with the first coordinate point combination from multiple reference tracks in the history track library, and use the reference track as a complement track of the first coordinate point combination.
The reference track refers to a moving track which comprises two coordinate points combined by the coordinate points and has no missing track between the two coordinate points.
And a complementing unit 904, configured to complement, for each first coordinate point combination, a missing track corresponding to the first coordinate point combination of the to-be-processed moving track with other coordinate points located between two coordinate points included in the first coordinate point combination in the complementing track of the first coordinate point combination.
And the combination of the complemented missing track and the to-be-processed moving track corresponding to each first coordinate point combination is used as the complemented moving track.
When the matching unit 903 screens the complement track, the matching unit is specifically configured to:
calculating a motion state parameter of the first coordinate point combination in the moving track to be processed according to each first coordinate point combination, and calculating a motion state parameter of the first coordinate point combination in each reference track;
judging whether a plurality of reference tracks corresponding to the first coordinate point combinations exist reference tracks meeting the matching condition or not according 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 to-be-processed moving track 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 plurality of reference tracks meeting the matching condition exist in the corresponding first coordinate point combination, determining the reference track meeting the matching condition as a complement track of the first coordinate point combination.
The matching unit 903 is further configured to: and updating the motion state parameters of the first coordinate point combinations in the reference tracks according to a preset updating strategy if each reference track corresponding to the first coordinate point combinations does not meet the matching condition aiming at each first coordinate point combination, and executing the judgment again to judge whether the plurality of reference tracks corresponding to the first coordinate point combinations have the reference tracks meeting the matching condition or not until the plurality of reference tracks corresponding to the first coordinate point combinations have the reference tracks meeting the matching condition.
Optionally, the processing apparatus for a movement track of the present embodiment further includes a key point prediction unit 905, configured to execute the following method after the obtaining unit 901 obtains the movement track to be processed, so as to insert a key coordinate point in the movement track to be processed:
determining each coordinate point combination of the to-be-processed moving tracks meeting preset key coordinate point prediction conditions as a second coordinate point combination;
processing a to-be-processed moving track 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 combinations;
and inserting a plurality of key coordinate points corresponding to the second coordinate point combinations between two coordinate points of the second coordinate point combinations aiming at each second coordinate point combination, and setting corresponding time stamps for each key coordinate point.
If the key point prediction unit 905 inserts a key coordinate point into the movement track to be processed, the determining unit 902 is configured to: and determining a first coordinate point combination of the to-be-processed moving track after the key coordinate points are inserted.
The key point prediction unit 905 processes the movement track to be processed by using a pre-trained coordinate point prediction model, and is specifically configured to:
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 mask units inserted in one second coordinate point combination is equal to the predetermined number of key coordinate points corresponding to the second coordinate point combination, and the number of key coordinate points of one second coordinate point combination can be determined according to the time interval between two coordinate points of the second coordinate point combination.
Converting the coordinates of each coordinate point of the moving track to be processed and the mask unit into corresponding labels;
and inputting a label sequence corresponding to the second coordinate point combination and comprising a plurality of labels into 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.
The label sequence corresponding to the second coordinate point combination comprises labels of two coordinate points of the second coordinate point combination, labels of each mask unit corresponding to the second coordinate point combination, and labels of coordinate points located before the second coordinate point combination and coordinate points located after the second coordinate point combination in the to-be-processed moving track.
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 utilizing 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, deleting the sample coordinate points from the complete tracks, and obtaining deleted moving tracks corresponding to each complete track;
inputting a plurality of deleted moving tracks into a pre-training model, taking a predicted coordinate point obtained by processing the deleted moving tracks by the pre-training model to approach to a deleted sample coordinate point as a target, and performing fine tuning training on the pre-training model to obtain a coordinate point predicted model.
The determining unit 902 is further configured to, before determining the first coordinate point combination in the movement track to be processed:
dividing the distance between the coordinate point and the previous coordinate point of the coordinate point by the time interval between the time stamp of the coordinate point and the time stamp of the previous coordinate point of the coordinate point for each coordinate point of the moving track to be processed to obtain the speed of the coordinate point;
and determining coordinate points of which each speed is greater than a preset speed threshold value of the movement track to be processed as abnormal coordinate points, and deleting the abnormal coordinate points.
The processing apparatus provided in this embodiment further includes a breakpoint marking unit 907 configured to:
judging whether the time interval between the coordinate point and the previous coordinate point of the coordinate point is larger than a third threshold value, judging whether the time interval between the coordinate point and the next coordinate point of the coordinate point is larger than the third threshold value, judging whether the coordinate point is the initial coordinate point of the moving track to be processed, and judging whether the coordinate point is the end coordinate point of the moving track to be processed;
if any one of the judgment results 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 responding to a first labeling instruction of the user to the breakpoint, and determining the breakpoint as a reasonable breakpoint.
The specific working principle of the device for processing a movement track provided by the embodiment of the present application may refer to the method for processing a movement track provided by any embodiment of the present application, which is not described in detail herein.
The application provides a processing device for a moving track, wherein an obtaining unit 901 obtains a moving track to be processed generated by moving a target object in a target area; the determining unit 902 determines a first coordinate point combination in the movement track to be processed; the matching unit 903 screens out a complete track matched with the first coordinate point combination from a plurality of reference tracks of a historical track library according to a preset matching rule aiming at each first coordinate point combination, so as to obtain a complement track of the first coordinate point combination; the reference track refers to a complete track of two coordinate points comprising a first coordinate point combination; the completion unit 904 completes, for each first coordinate point combination, a missing track between two coordinate points of the first coordinate point combination of the movement track to be processed with other coordinate points located between the two coordinate points included in the first coordinate point combination in the completion track of the first coordinate point combination, and obtains a completed movement track. Therefore, for the to-be-processed moving track with partial deletion, 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 partial deletion of the to-be-processed moving track can be used for supplementing the deletion part of the to-be-processed moving track, so that the to-be-processed moving track with the deletion can be accurately complemented.
Referring to fig. 10, the embodiment of the present application further provides an electronic device, including a memory 1001 and a processor 1002, where the memory 1001 is configured to store a computer program, and the processor 1002 is configured to execute the computer program, and when the computer program is executed, the processor is specifically configured to implement the method for processing a movement track provided in any embodiment of the present application.
The embodiment of the application also provides a computer storage medium for storing a computer program, and the stored computer program is specifically used for realizing the processing method of the movement track in any embodiment of the application when being executed.
Finally, it is further noted that relational terms such as first and second, and the like are 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. Moreover, 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 one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
It should be noted that the terms "first," "second," and the like herein are merely used for distinguishing between different devices, modules, or units and not for limiting the order or interdependence of the functions performed by such 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 method for processing a movement track, comprising:
obtaining a to-be-processed moving track generated by moving a target object in a target area; the to-be-processed moving track comprises a plurality of coordinate points used for representing the passing position of the target object and a time stamp corresponding to each coordinate point;
determining a first coordinate point combination of the movement track to be processed; wherein every two adjacent coordinate points of the movement track to be processed are used as a coordinate point combination; the first coordinate point combination refers to a coordinate point combination with a missing track in the moving track to be processed;
For each first coordinate point combination, screening a reference track matched with the first coordinate point combination from a plurality of reference tracks of a historical track library according to a preset matching rule, and taking the reference track as a complement track of the first coordinate point combination; the reference track refers to a moving track which comprises two coordinate points of the first coordinate point combination and has no missing track between the two coordinate points; the preset matching rule refers to: in the to-be-processed moving track, the motion parameters when the target object is positioned around the first coordinate point combination are matched with the motion parameters when the target object corresponding to the reference track is positioned in a similar area in the reference track;
for each first coordinate point combination, using other coordinate points located between two coordinate points included in the first coordinate point combination in the complement track of the first coordinate point combination to complement the missing track corresponding to the first coordinate point combination of the to-be-processed moving track; and the combination of the complemented missing track corresponding to each first coordinate point combination and the to-be-processed moving track is used as a complemented moving track.
2. The processing method according to claim 1, wherein the determining the first coordinate point combination of the movement trajectory to be processed includes:
for each coordinate point combination of the to-be-processed moving track, 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 breakpoint refers to a coordinate point that the target object enters and leaves a monitoring blind zone;
and determining each coordinate point combination of the to-be-processed moving track as a first coordinate point combination if the time interval between two coordinate points of the coordinate point combination is larger than a first threshold value and the two coordinate points of the coordinate point combination are not all reasonable break points.
3. The processing method according to claim 1, wherein the step of screening, for each of the first coordinate point combinations, a reference trajectory matching the first coordinate point combination from a plurality of reference trajectories in a history trajectory library according to a preset matching rule, as a complement trajectory of the first coordinate point combination, includes:
Calculating a motion state parameter of the first coordinate point combination in the to-be-processed moving track aiming at each first coordinate point combination, and calculating a motion state parameter of the first coordinate point combination in each reference track;
judging whether reference tracks meeting matching conditions exist in a plurality of reference tracks corresponding to each first coordinate point combination or not according 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 to-be-processed moving track 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 plurality of reference tracks meeting the matching condition exist in the corresponding reference tracks of the first coordinate point combination, determining the reference track meeting the matching condition as a complement 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 track satisfying a matching condition among the plurality of reference tracks corresponding to the first coordinate point combination, 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 on whether the reference tracks meeting the matching condition exist in the plurality of reference tracks corresponding to the first coordinate point combination 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, characterized in that the complementing the missing track corresponding to the first coordinate point combination of the movement track to be processed with other coordinate points 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 of the complement tracks, inserting other coordinate points located between the two coordinate points of the first coordinate point combination in the complement track of the first coordinate point combination between 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 the complement 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 points between the two coordinate points of the first coordinate point combination of the moving track to be processed; the coordinate point set comprises other coordinate points between two coordinate points of the first coordinate point combination in each complement track of the first coordinate point combination; the number of the selected coordinate points is determined according to the time interval between the two coordinate points of the first coordinate point combination;
and setting a corresponding time stamp for each coordinate point between the two coordinate points inserted into the first coordinate point combination of the to-be-processed moving track.
6. The processing method according to claim 1, wherein before the determining the first coordinate point combination of the movement trajectory to be processed, further comprising:
determining a coordinate point combination of each to-be-processed moving track meeting 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 combinations;
Inserting the plurality of key coordinate points corresponding to the second coordinate point combinations between two coordinate points of the second coordinate point combinations for each second coordinate point combination, and setting corresponding time stamps for each key coordinate point;
wherein, the determining the first coordinate point combination of the movement track to be processed includes:
and determining a first coordinate point combination of the to-be-processed moving track after the key coordinate points are inserted.
7. The processing method according to claim 6, wherein the processing the movement track to be processed by using a pre-trained coordinate point prediction model for each of the second coordinate point combinations to obtain a plurality of key coordinate points corresponding to the second coordinate point combinations includes:
inserting a plurality of mask units between two coordinate points of the second coordinate point combinations for each of the second coordinate point combinations; wherein the number of the mask units is determined according to the time interval of the two coordinate points of the second coordinate point combination;
converting the coordinates of each coordinate point of the moving track to be processed and the mask unit into corresponding labels;
Inputting a label sequence corresponding to each second coordinate point combination and comprising a plurality of labels into a pre-trained coordinate point prediction model 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, labels of each mask unit corresponding to the second coordinate point combination, and labels of coordinate points located before the second coordinate point combination and coordinate points located after the second coordinate point combination in the to-be-processed moving track.
8. The processing method according to claim 7, wherein the method of training the coordinate point prediction model includes:
pre-training a pre-constructed bidirectional coding representation model based on a converter by utilizing 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, deleting the sample coordinate points from the complete tracks, and obtaining deleted moving tracks corresponding to each complete track;
Inputting a plurality of deleted moving tracks into the pre-training model, and optimally training the pre-training model by taking the sample coordinate points, which are obtained by the pre-training model processing the deleted moving tracks, as targets, wherein the predicted coordinate points approach to the deleted sample coordinate points, so as to obtain the coordinate point predicted model.
9. The processing method according to claim 1, wherein before the determining the first coordinate point combination of the movement trajectory to be processed, further comprising:
dividing the distance between the coordinate point and the previous coordinate point of the coordinate point by the difference between the time stamp of the coordinate point and the time stamp of the previous coordinate point of the coordinate point for each coordinate point of the to-be-processed moving track to obtain the speed of the coordinate point;
and determining coordinate points of which each speed is greater than a preset speed threshold value of the to-be-processed moving track as abnormal coordinate points, and deleting the abnormal coordinate points.
10. The processing method according to claim 1, wherein the method for determining whether any one coordinate point of the movement trajectory to be processed is a reasonable breakpoint comprises:
judging whether the time interval between the coordinate point and the previous coordinate point of the coordinate point is larger than a third threshold value, judging whether the time interval between the coordinate point and the next coordinate point of the coordinate point is larger than the third threshold value, judging whether the coordinate point is the initial coordinate point of the movement track to be processed, and judging whether the coordinate point is the end coordinate point of the movement track to be processed;
If the judgment result of any one of the judgment is yes, determining the coordinate point as a breakpoint;
displaying a planar map of the target area on a display device, and displaying the breakpoint on the planar map of the target area;
and responding to a first labeling instruction of the user to the breakpoint, and determining the breakpoint as a reasonable breakpoint.
11. A processing apparatus for a movement trace, comprising:
the obtaining unit is used for obtaining a to-be-processed moving track generated by moving the target object in the target area; the to-be-processed moving track comprises a plurality of coordinate points used for representing the passing position of the target object and a time stamp corresponding to each coordinate point;
the determining unit is used for determining a first coordinate point combination of the movement track to be processed; wherein every two adjacent coordinate points of the movement track to be processed are used as a coordinate point combination; the first coordinate point combination refers to a coordinate point combination with a missing track in the moving track to be processed;
the matching unit is used for screening a reference track matched with the first coordinate point combination from a plurality of reference tracks of a historical track library according to a preset matching rule for each first coordinate point combination, and taking the reference track as a complement track of the first coordinate point combination; the reference track refers to a moving track which comprises two coordinate points of the first coordinate point combination and has no missing track between the two coordinate points; the preset matching rule refers to: in the to-be-processed moving track, the motion parameters when the target object is positioned around the first coordinate point combination are matched with the motion parameters when the target object corresponding to the reference track is positioned in a similar area in the reference track;
The completion unit is used for completing the missing track corresponding to the first coordinate point combination of the to-be-processed moving track by 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; and the combination of the complemented missing track corresponding to each first coordinate point combination and the to-be-processed moving track is used as a complemented 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 CN111553732A (en) 2020-08-18
CN111553732B true 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)

Families Citing this family (4)

* 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
CN112533031B (en) * 2020-11-23 2022-10-04 北京爱笔科技有限公司 Track video recommendation method and device, computer equipment and storage medium
CN114449336B (en) * 2022-01-20 2023-11-21 杭州海康威视数字技术股份有限公司 Vehicle track animation playing method, device and equipment
CN115659088B (en) * 2022-12-12 2023-04-14 亿海蓝(北京)数据技术股份公司 Navigation track display method and device and readable storage 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
Optimal analysis conditions for sperm motility parameters with a CASA system in a passerine bird, Passer montanus;Ying Yang;Yingmei Zhang;Jian Ding;Shiwei Ai;Rui Guo;Xiaojuan Bai;Wenzhi Yang;;Avian Research(第04期);113-122 *
基于轨迹坐标的异常行为检测;刘超等;《工业控制计算机》(第05期);第94-100页 *
真实场景运动目标轨迹有效性判断与自动聚类算法研究;潘奇明等;《计算机应用研究》(第04期);第158-161页 *

Also Published As

Publication number Publication date
CN111553732A (en) 2020-08-18

Similar Documents

Publication Publication Date Title
CN111553732B (en) Method and device for processing movement track
WO2022126669A1 (en) Subway pedestrian flow network fusion method based on video pedestrian recognition, and pedestrian flow prediction method
Kim et al. Vision-based nonintrusive context documentation for earthmoving productivity simulation
Saxena et al. Crowd behavior recognition for video surveillance
CN110533685B (en) Object tracking method and device, storage medium and electronic device
CN109543627A (en) A kind of method, apparatus and computer equipment judging driving behavior classification
KR20200071799A (en) object recognition and counting method using deep learning artificial intelligence technology
GB2502187A (en) Determining parking lot occupancy from digital camera images
EP2659456A2 (en) Scene activity analysis using statistical and semantic feature learnt from object trajectory data
EA018349B1 (en) Method for video analysis
CN109409238A (en) A kind of obstacle detection method, device and terminal device
CN110781818B (en) Video classification method, model training method, device and equipment
GB2443739A (en) Detecting image regions of salient motion
Guo et al. Evaluation-oriented façade defects detection using rule-based deep learning method
CN109389016B (en) Method and system for counting human heads
CN103577875A (en) CAD (computer-aided design) people counting method based on FAST (features from accelerated segment test)
JP2023536025A (en) Target detection method, device and roadside equipment in road-vehicle cooperation
Sairam et al. Automated vehicle parking slot detection system using deep learning
CN112070071B (en) Method and device for labeling objects in video, computer equipment and storage medium
IL257092A (en) A method and system for tracking objects between cameras
Roy et al. Defining traffic states using spatio-temporal traffic graphs
Alashban et al. Single convolutional neural network with three layers model for crowd density estimation
KR101675692B1 (en) Method and apparatus for crowd behavior recognition based on structure learning
CN111833115A (en) Operation identification method and device, storage medium and server
Basalamah et al. Deep learning framework for congestion detection at public places via learning from synthetic data

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