CN115994147B - Track library construction method and device, electronic equipment and medium - Google Patents

Track library construction method and device, electronic equipment and medium Download PDF

Info

Publication number
CN115994147B
CN115994147B CN202310287198.5A CN202310287198A CN115994147B CN 115994147 B CN115994147 B CN 115994147B CN 202310287198 A CN202310287198 A CN 202310287198A CN 115994147 B CN115994147 B CN 115994147B
Authority
CN
China
Prior art keywords
track
sequence
coincident
adjacent
points
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
CN202310287198.5A
Other languages
Chinese (zh)
Other versions
CN115994147A (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.)
Zhejiang Uniview Technologies Co Ltd
Original Assignee
Zhejiang Uniview Technologies 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 Zhejiang Uniview Technologies Co Ltd filed Critical Zhejiang Uniview Technologies Co Ltd
Priority to CN202310287198.5A priority Critical patent/CN115994147B/en
Publication of CN115994147A publication Critical patent/CN115994147A/en
Application granted granted Critical
Publication of CN115994147B publication Critical patent/CN115994147B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Signal Processing For Digital Recording And Reproducing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the application discloses a track library construction method, a track library construction device, electronic equipment and a track library construction medium. The method comprises the following steps: determining space coincidence data according to the coincidence track points of the target track sequence and the similar track sequence; determining the time deviation according to the time interval between the first adjacent track points and the time interval between the second adjacent track points of the coincident track sequence formed by the continuous coincident track points; determining whether the target track sequence and the similar track sequence belong to the same type of track according to the space coincidence data and the time deviation degree; and storing the target track sequence into a track library according to the determination result. By the scheme, the space coincidence data and the time deviation degree of the track sequence in the track library can be comprehensively considered, whether the tracks are the same type or not is further determined, whether the tracks need to be combined or not is conveniently judged subsequently, the accuracy of the tracks in the track library is improved, and the tracks are prevented from being repeatedly stored.

Description

Track library construction method and device, electronic equipment and medium
Technical Field
The present disclosure relates to the field of track data processing technologies, and in particular, to a track library construction method, apparatus, electronic device, and medium.
Background
At present, along with the development of scientific technology, a track tracking technology for a target is widely applied. In many application scenarios, the track of the target needs to be analyzed, so that the track of the target can be stored in a track library for storage, and the track of the target can be conveniently obtained from the track library at any time for analysis.
In the process of warehousing and storing the track of the target, the acquired track is often directly stored at present, so that the storage capacity of a track library is occupied, and the track can be stored repeatedly. Or for the acquired track, carrying out similarity analysis on the acquired track and the track stored in the track library according to the coincident track points to determine whether the acquired track is the same track, wherein the acquired track is lower than the accuracy, and the problem of repeated storage is possibly caused.
Disclosure of Invention
The application provides a track library construction method, a track library construction device, electronic equipment and a track library construction medium, which are used for accurately determining whether a target track sequence and a similar track sequence are similar sequences or not and accurately updating tracks in a track library.
According to an aspect of the present application, there is provided a track library construction method, the method including:
determining space coincidence data of a target track sequence and a similar track sequence according to coincident track points of the target track sequence and the similar track sequence; wherein the similar track sequence is selected from a track library;
Determining the time deviation degree of the second adjacent track points and the first adjacent track points according to the time interval between the first adjacent track points of the continuous coincident track points and the time interval between the second adjacent track points of the coincident track sequence; wherein the first adjacent track points are adjacent track points belonging to the same coincident track sequence; the second adjacent track points are adjacent track points belonging to adjacent different coincident track sequences;
determining whether the target track sequence and the similar track sequence belong to the same type of track according to the space coincidence data and the time deviation;
and according to the determination result, storing the target track sequence into a track library.
According to another aspect of the present application, there is provided a track library construction apparatus, the apparatus including:
the space coincidence data determining module is used for determining space coincidence data of the target track sequence and the similar track sequence according to the coincidence track points of the target track sequence and the similar track sequence; wherein the similar track sequence is selected from a track library;
the time deviation determining module is used for determining the time deviation between the second adjacent track points and the first adjacent track points according to the time interval between the first adjacent track points of the continuous coincident track point sequence and the time interval between the second adjacent track points of the coincident track sequence; wherein the first adjacent track points are adjacent track points belonging to the same coincident track sequence; the second adjacent track points are adjacent track points belonging to adjacent different coincident track sequences;
The similar track judging module is used for determining whether the target track sequence and the similar track sequence belong to similar tracks according to the space coincidence data and the time deviation degree;
and the warehousing module is used for carrying out processing of storing the target track sequence into a track library according to the determination result.
According to another aspect of the present application, there is provided an electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the track library construction method of any one of the embodiments of the present application.
According to another aspect of the present application, there is provided a computer readable storage medium storing computer instructions for causing a processor to execute a track library construction method of any embodiment of the present application.
According to the technical scheme, according to the overlapping track points of the target track sequence and the similar track sequence, the spatial overlapping data of the target track sequence and the similar track sequence are determined; wherein the similar track sequence is selected from a track library; determining the time deviation degree of the second adjacent track points and the first adjacent track points according to the time interval between the first adjacent track points of the continuous coincident track points and the time interval between the second adjacent track points of the coincident track sequence; wherein the first adjacent track points are adjacent track points belonging to the same coincident track sequence; the second adjacent track points are adjacent track points belonging to adjacent different coincident track sequences; determining whether the target track sequence and the similar track sequence belong to the same type of track according to the space coincidence data and the time deviation; and according to the determination result, storing the target track sequence into a track library. According to the technical scheme, the spatial coincidence data and the time deviation degree of the target track sequence and the similar track sequence are considered, so that whether the target track sequence and the similar track sequence belong to the same type of track or not is estimated more accurately, merging and deduplication are conveniently carried out when the target track sequence and the similar track sequence are stored in the track library later, the accuracy and the storage standardization of the track library are improved, and repeated storage of the track sequence is avoided.
It should be understood that the description of this section is not intended to identify key or critical features of the embodiments of the application or to delineate the scope of the application. Other features of the present application will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a track library construction method according to a first embodiment of the present application;
FIG. 2 is a schematic diagram of a target track sequence provided according to an embodiment of the present application;
FIG. 3 is a schematic view of a target track sequence segmentation according to a first embodiment of the present application;
fig. 4 is a flowchart of a track library construction method according to a second embodiment of the present application;
FIG. 5 is a schematic diagram of a dotting matrix provided according to a second embodiment of the present application;
FIG. 6 is a first schematic diagram of a search provided according to a second embodiment of the present application;
FIG. 7 is a second schematic diagram of a search provided according to a second embodiment of the present application;
FIG. 8 is a schematic diagram of parallel lines of coincident elements provided in accordance with a second embodiment of the present application;
FIG. 9 is a schematic view of a projection provided according to a second embodiment of the present application;
FIG. 10 is a time interval ratio diagram provided according to a second embodiment of the present application;
FIG. 11 is a flowchart of a track library construction method according to a third embodiment of the present application;
FIG. 12 is a schematic diagram of track merging provided according to a third embodiment of the present application;
FIG. 13 is a schematic diagram of time interval computation provided according to a third embodiment of the present application;
fig. 14 is a schematic structural diagram of a track library construction device according to a fourth embodiment of the present application;
fig. 15 is a schematic structural diagram of an electronic device implementing a track library construction method provided in a fifth embodiment of the present application.
Detailed Description
In order to make the present application solution better understood by those skilled in the art, the following description will be made in detail and with reference to the accompanying drawings in the embodiments of the present application, it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," "third," "fourth," "actual," "preset," and the like in the description and the claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that embodiments of the present application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
Fig. 1 is a flowchart of a track library construction method according to an embodiment of the present application, which is applicable to a track library construction situation. The method may be performed by a track library construction device, which may be implemented in hardware and/or software, which may be configured in an electronic apparatus. As shown in fig. 1, the method includes:
S110, determining spatial coincidence data of the target track sequence and the similar track sequence according to the coincidence track points of the target track sequence and the similar track sequence.
The target track sequence may be obtained by arranging track points acquired by an image acquisition device or a positioning device according to a time sequence. The target track sequence is a track sequence that has been acquired but not stored in the track library. The similar track sequence may be selected from track sequences already stored in the track library, and the selection manner is not particularly limited, and may be, for example, selecting a track sequence belonging to the same object as the target track sequence, and/or selecting a track sequence belonging to the same time period, and the like. The similar track sequence may also be a track sequence acquired in real time, for example, a track sequence belonging to the same tracking object as the target track sequence in the same time period, and the like. The coincident track points can be track points with the same longitude and latitude. The spatial coincidence data may be used to represent the spatial coincidence of the target track sequence and the similar track sequence.
Specifically, track points with the same longitude and latitude in the target track sequence and similar track sequences, namely coincident track points, can be determined, and the spatial coincident data of the target track sequence and the similar track sequences are determined according to the total number of the coincident track points, the distribution condition, whether the track points are continuous, the number of the continuous coincident track points and the like. For example, if the total number of coincident track points is relatively large, the distribution characteristics are relatively uniform, there are continuous coincident track points, continuous coincident track points are relatively large, etc., the spatial coincidence data may be determined to be a larger value to indicate that the spatial coincidence of the target track sequence and the similar track sequence is higher. Otherwise, the spatial coincidence data may be determined to be a smaller value to indicate that the spatial coincidence of the target track sequence and the similar track sequence is lower.
In an embodiment of the present application, the specific determining process of the target track sequence may include: a preset period is set according to specific conditions, such as a day, a week, a month, etc., and the track is periodically acquired and analyzed. For example, as shown in fig. 2, a target track sequence of the tracked object is obtained by taking a next track point of the last end point of the last track of the tracked object as a starting point and a last track point after a preset period as a terminal. If the analysis task is the first analysis task and the last end point of the last track does not exist, the first track point is the starting point of the analysis. The ending time of the analysis task is the ending time of the last analysis task plus a preset period. After the target track sequence is acquired, the target track sequence is further required to be preprocessed, and illustratively, the stay time of each track point in the same place is determined according to the occurrence time corresponding to each track point in the target track sequence, so that the stay point in the track point is determined. And dividing the target track sequence by taking the stay points as boundaries, so as to divide the target track sequence into a plurality of target track sequences according to different behaviors. As illustrated by way of example in fig. 3. Assuming that the interval time between the track point F and the track point G is longer, it can be determined that the tracking object stays at the track point F for a longer time and starts a new motion behavior from the track point G, so that the track point F can be used as an end point of the previous behavior, the track point G can be used as a start point of the next behavior, and the target track sequence is divided into two track sequences. Similarly, if a dwell point still exists in the subsequent track points, for example, the interval between the track point N and the track point O is longer, it is determined that the dwell time of the tracking object at the track point N is longer, and the target track sequence may be segmented based on the track point N. Through the segmentation, the tracks of the same tracking object can be segmented according to the behaviors, and a target track sequence belonging to the same behavior is obtained. For example, from track point a to track point F are behavior tracks from home to company, and from track point G to track point N are behavior tracks from entrance to restaurant of company. The target track sequence is segmented according to the behaviors, so that the track similarity comparison is convenient to carry out later, and the accuracy of the comparison is improved. In addition, short trajectory alignment for the same behavior can improve alignment efficiency.
S120, determining the time deviation degree of a second adjacent track point and a first adjacent track point according to the time interval between the first adjacent track points of the continuous coincident track point formed by the continuous coincident track points and the time interval between the second adjacent track points of the coincident track sequence; wherein the first adjacent track points are adjacent track points belonging to the same coincident track sequence; the second adjacent track points are adjacent track points belonging to adjacent different coincident track sequences.
The overlapping track sequence is formed by overlapping track points in the target track sequence and the similar track sequence, and the target track sequence is GHIJKLMN, and the similar track sequence is GHIJKLNS, so that the overlapping track sequences are GH, JKL and N. The first adjacent track points are adjacent track points belonging to the same coincident track sequence, for example, the first adjacent track points are track points G and H, track points J and K, and track points K and L aiming at coincident track sequences GH, JKL and N. The second adjacent track points are adjacent track points belonging to adjacent different coincident track sequences. Adjacent different overlapping track sequences refer to arrangements in the target track sequence being adjacent, e.g. overlapping track sequence GH and overlapping track sequence JKL are adjacent different overlapping track sequences, and overlapping track sequence GH and overlapping track sequence N are non-adjacent different overlapping track sequences. The adjacent track points belonging to the adjacent different coincident track sequences are adjacent track points without other track points in the adjacent different coincident track sequences. For example, the track point H in the coincident track sequence GH and the track point J in the coincident track sequence JKL are adjacent track points of different adjacent coincident track sequences, and the track point G and the track point J are not adjacent track points. In the embodiment of the application, since track interruption exists between different coincident track sequences, the time deviation degree can be determined according to the time interval between interrupted track points and the time interval between continuous track points, so that whether the behavior characteristics of the tracked object between the interrupted track points are similar to the behavior characteristics of the tracked object between the continuous track points or not is determined, and further the similarity between the target track sequence and the similar track sequence is assisted to be judged.
S130, determining whether the target track sequence and the similar track sequence belong to the same type of track according to the space coincidence data and the time deviation degree.
For example, whether the target track sequence and the detailed track sequence belong to the same type of track can be determined according to the size of the spatial coincidence data and the time deviation degree. In one implementation, whether the target track sequence and the similar track sequence belong to the same kind of track may be determined based on a preset track sequence classification model according to the spatial coincidence data and the time deviation degree. The preset track sequence classification model is constructed in advance. The preset track sequence classification model is used for determining whether the target track sequence and the similar track sequence are similar tracks or not. The predetermined trajectory sequence classification model may be a classification model. The construction process of the preset track sequence classification model may include: and acquiring a plurality of track sequences of a plurality of tracking objects in advance, determining labels of the track sequences, and determining whether the track sequences are similar tracks or not. And processing any two track sequences according to the S110 and the S120, and determining the space coincidence data and the time deviation degree of the two track sequences. And training the classification model by taking the space coincidence data, the time deviation degree and the track sequence with the label as training samples to obtain a preset track sequence classification model. Classification algorithms include, but are not limited to: logistic regression, decision trees, XGB, etc. In the embodiment of the application, the spatial coincidence data and the time deviation degree are input into a preset track sequence classification model, and whether the target track sequence and the similar track sequence belong to the same type of track is determined.
S140, according to the determination result, the target track sequence is stored in a track library.
The processing and warehousing mode of the target track sequence is determined according to the determination result of whether the target track sequence and the similar track sequence belong to the same type of track. For example, if the target track sequence and the similar track sequence belong to the same type of track, the target track sequence and the similar track sequence may be processed according to a preset rule, and stored after being processed, so as to avoid repeated storage of the target track sequence and occupy a storage space. If the target track sequence and the similar track sequence do not belong to the same class of tracks, the target track sequence can be directly stored.
In the embodiment of the application, according to the coincident track points of a target track sequence and a similar track sequence, determining the spatial coincident data of the target track sequence and the similar track sequence; wherein the similar track sequence is selected from a track library; determining the time deviation degree of the second adjacent track points and the first adjacent track points according to the time interval between the first adjacent track points of the continuous coincident track points and the time interval between the second adjacent track points of the coincident track sequence; wherein the first adjacent track points are adjacent track points belonging to the same coincident track sequence; the second adjacent track points are adjacent track points belonging to adjacent different coincident track sequences; determining whether the target track sequence and the similar track sequence belong to the same type of track according to the space coincidence data and the time deviation; and according to the determination result, storing the target track sequence into a track library. According to the technical scheme, the spatial coincidence data and the time deviation degree of the target track sequence and the similar track sequence are considered, so that the similarity of the target track sequence and the similar track sequence is evaluated more accurately, merging and deduplication are conveniently carried out when the target track sequence and the similar track sequence are stored in the track library later, the accuracy and the storage standardization of the track library are improved, and repeated storage of the track sequence is avoided.
Example two
Fig. 4 is a flowchart of a track library construction method according to a second embodiment of the present application, where the track library construction method is optimized based on the foregoing embodiments, and a scheme not described in detail in the embodiments of the present application is shown in the foregoing embodiments. As shown in fig. 4, the method in the embodiment of the application specifically includes the following steps:
s210, comparing the target track sequence with the similar track sequence by adopting a dotting method to determine a dotting matrix; and setting elements corresponding to the coincident track points as a first preset value and setting other elements as a second preset value in a dotting matrix.
Exemplary, a schematic diagram of a scheme for comparing a target track sequence with a similar track sequence by using a dotting method is shown in fig. 5. For example, assuming that the target track sequence is GHIJKLMN and the similar track sequence is GHJKLNS, the target track sequence GHIJKLMN may be placed above the dotting matrix as a head row, the similar track sequence GHJKLNS may be placed on the left side of the dotting matrix as a head column, or vice versa, the similar track sequence GHJKLNS may be placed above the dotting matrix as a head row, and the target track sequence GHIJKLMN may be placed on the left side of the dotting matrix as a head column. The first preset value and the second preset value may be determined according to practical situations, for example, in the embodiment of the present application, the first preset value is determined to be 1, and the second preset value is determined to be 0.
Specifically, as shown in fig. 5, if there is a coincident track point in the target track sequence and the similar track sequence, an element in a dotting matrix corresponding to the coincident track point is set to 1, and other elements are set to 0, so as to obtain values of elements of the dotting matrix, so as to reflect the coincident track points in the target track sequence and the similar track sequence.
S220, determining space coincidence data of the target track sequence and the similar track sequence according to element characteristics of the dotting matrix.
By way of example, the spatial coincidence data of the target track sequence and the similar track sequence may be determined based on the element characteristics of the dotting matrix, such as the succession of elements of value 1 in fig. 5, the number of succession, the distance separating successive elements of value 1, etc. Specifically, if the target track sequence and the similar track sequence are identical, the number of rows and columns of the dotting matrix should be identical, and the values of the main diagonal elements should be all 1. If the two track sequences are not identical, the more consecutive elements of value 1 and/or the closer the consecutive elements of value 1 are to the main diagonal element, the closer the two track sequences are indicated. Therefore, according to the scheme, the element characteristics in the dotting matrix can be analyzed, so that the spatial coincidence data of the target track sequence and the similar track sequence can be determined.
In the embodiment of the present application, the spatial coincidence data includes spatial similarity between the target track sequence and the similar track sequence; according to the element characteristics of the dotting matrix, determining the space coincidence data of the target track sequence and the similar track sequence, wherein the space coincidence data comprises the steps A1-A2:
step A1: and connecting elements corresponding to continuous coincident track points in the dotting matrix and/or making a preset length line segment parallel to a main diagonal line of the dotting matrix by using singly-interrupted coincident track points to obtain parallel lines of the coincident elements.
Step A2: determining the spatial similarity of the target track sequence and the similar track sequence according to the length of the parallel lines of the coincident elements and the vertical distance corresponding to the parallel lines of the coincident elements; the perpendicular distance corresponding to the parallel lines of the coincident elements is the perpendicular distance between the parallel lines of the coincident elements and the main diagonal of the dotting matrix.
For example, as shown in fig. 6, in a specific implementation, to implement step A1, a search may be performed starting from an element in the first row and first column of the dotting matrix, searching for an element to the right and lower side of the element if the currently searched element is zero, and searching for an element to the lower right of the element if the currently searched element is 1. Specifically, as shown in fig. 7, the element in the first row and the first column of the dotting matrix is 1, the element on the lower right side of the element is searched, the searched element is still 1, the element on the lower right side of the element is continuously searched, the element 0 is searched, the element on the right side of the element and the element on the lower side of the element are searched, and the like, so that the element with the value of 1 in the dotting matrix is searched to be the element corresponding to the continuous overlapping track point, and the elements are connected to obtain the parallel line of the overlapping elements. If the coincident track points are discontinuous and are a discontinuous coincident track point, the discontinuous coincident estimated points are used as preset length line segments parallel to the main diagonal line to obtain coincident element parallel lines. The preset length can be determined according to practical situations, for example, half of parallel lines of the coincident elements, which are obtained by connecting two adjacent coincident track points, are taken.
The length of the parallel lines of overlapping elements may be a relative length, and may be expressed by the number of elements passed by the line, or may be expressed by the length of the path passed by the line. Similarly, the vertical distance corresponding to the parallel lines of overlapping elements may be the relative length, and may be represented by the number of elements passed by the line, or may be represented by the length of the path passed by the line. In the embodiment of the application, if the two track sequences are completely coincident, the parallel lines of the coincident elements should be coincident with the main diagonal, so that the degree of deviation between the parallel lines of the coincident elements and the length of the parallel lines of the coincident elements can be used for determining the spatial similarity of the target track sequence and the similar track sequence.
As shown in fig. 8, the parallel line of the coincident element corresponding to the continuous coincident track point GH is l1, the parallel line of the coincident element corresponding to the continuous coincident track point JKL is l2, and the parallel line of the coincident element corresponding to the intermittent coincident track point is l3. As can be determined from fig. 8, L1 may have a length of 2, L2 may have a length of 3, and L3 may have a length of 1, which may be expressed in terms of the number of elements through which the line passes. The vertical distance corresponding to l1 is the distance between l1 and the main diagonal, the vertical distance corresponding to l2 may be the distance between l2 and the main diagonal, and the vertical distance corresponding to l3 may be the distance between l3 and the main diagonal.
In this embodiment of the present application, determining the spatial similarity between the target track sequence and the similar track sequence according to the length of the parallel lines of the coincident elements and the vertical distance corresponding to the parallel lines of the coincident elements, includes steps B1 to B4:
step B1: and determining the maximum value of the distances from each element in the dotting matrix to the main diagonal as a unit distance, and taking the value of the distance between the parallel lines of the coincident elements and the main diagonal of the dotting matrix relative to the unit distance as the vertical distance corresponding to the parallel lines of the coincident elements.
Step B2: and if the coincident element parallel line contains the element corresponding to the first coincident track point, taking the vertical distance corresponding to the coincident element parallel line as the reference distance corresponding to the coincident element parallel line.
Step B3: otherwise, taking the vertical distance difference value corresponding to the parallel lines of the coincident elements and the parallel lines of the previous coincident elements as a reference distance; and the coincident track point corresponding to the last coincident element parallel line is before the track point corresponding to the coincident element parallel line.
Step B4: and determining the spatial similarity of the target track sequence and the similar track sequence according to the length of the parallel lines of the coincident elements and the reference distance corresponding to the parallel lines of the coincident elements.
For example, as shown in fig. 8, the distance between each element and the main diagonal may be determined in a dotting matrix, with the maximum value being the unit distance. In fig. 8, a may be the lower left corner vertex of the cell where the element of the last column of the first row in the dotting matrix is located, b is the foot of a to the main diagonal, d may be the upper right corner vertex of the cell where the element of the last column of the first row in the dotting matrix is located, and c is the foot of d to the main diagonal. The distance from a to the main diagonal is the length of the line segment ab, and the distance from the point d to the main diagonal, i.e., the length of the line segment cd is longest, and the length is set as a unit distance, for example, 1. The value of the distance between the parallel lines of the coincident elements and the main diagonal with respect to the unit distance is determined, for example, as shown in fig. 8, the value of l1 to the main diagonal with respect to the unit distance is 0, the value of l2 to the main diagonal with respect to the unit distance is 1/8, and the value of l3 to the main diagonal with respect to the unit distance is 2/8. It should be noted that the above manner only represents that the distance from the parallel lines of the overlapping elements to the main diagonal is normalized, and specific values may be determined according to practical situations, and are not limited to the above exemplified values. In this embodiment of the present application, if the first coincident track point is the track point G, the connection line including the element corresponding to the first coincident track point is l 1. The reference distance corresponding to l1 is the vertical distance corresponding to l, and is 0. For other coincident element parallel lines, taking the difference value of the vertical distance corresponding to the coincident element parallel line and the last coincident element parallel line as a reference distance, for example, for l2, taking the difference value of the vertical distance corresponding to l2 and the vertical distance corresponding to l1 as the reference distance corresponding to l2, namely 1/8-0=1/8. For l3, the difference between the vertical distance corresponding to l3 and the vertical distance corresponding to l2 is taken as the reference distance corresponding to l3, namely 2/8-1/8=1/8. For the coincident element parallel line l2, the coincident track point corresponding to the last coincident element parallel line l1 is GH, the coincident track point corresponding to l2 is JKL, and GH is before JKL. And determining the spatial similarity of the target track sequence and the similar track sequence according to the length of the parallel lines of the coincident elements and the corresponding reference distance.
In another implementation manner, the determination manner of the vertical distance corresponding to the parallel lines of the coincident elements may be: and determining the distance between the parallel lines of the coincident elements and the main diagonal of the dotting matrix, and normalizing the distance to obtain the vertical distance corresponding to the parallel lines of the coincident elements. The specific normalization method may include dividing the distance between the parallel lines of the coincident elements and the principal diagonal of the dotting matrix by the length corresponding to the target track sequence or by the length corresponding to the similar track sequence. The determination standard of the length corresponding to the target track sequence and the length corresponding to the similar track sequence is the same as the determination standard of the distance between the parallel lines of the coincident elements and the main diagonal of the dotting matrix. For example, as shown in FIG. 8, if the distance from l2 to the main diagonal is determined to be 1, the space occupied by each track point can be determinedSide length is
Figure SMS_1
That is, the side length of the space occupied by each trace point of G, H, I, J, K, M, N at the top of FIG. 8 is +.>
Figure SMS_2
The length of the whole target track sequence is +.>
Figure SMS_3
. Similarly, the length of the similar track sequence GHJKLNS is +.>
Figure SMS_4
. Can be +.>
Figure SMS_5
As the vertical distance corresponding to l 2. Can also be +.>
Figure SMS_6
As the vertical distance corresponding to l 2. The vertical distance corresponding to the parallel lines of each coincident element is determined in the same way.
In this embodiment of the present application, determining, according to the length of the parallel lines of the coincident elements and the reference distance corresponding to the parallel lines of the coincident elements, the spatial similarity between the target track sequence and the similar track sequence includes:
for each coincident element parallel line, determining the weight of the coincident element parallel line according to the reference distance corresponding to the coincident element parallel line;
determining the total length of the parallel lines of the coincident elements according to the weight of the parallel lines of the coincident elements and the length of the parallel lines of the coincident elements;
and determining the spatial similarity of the target track sequence and the similar track sequence by combining the total length of the parallel lines of the coincident elements with the number of the coincident track points.
The length of the parallel lines of the coincident elements can reflect the coincidence degree of the target track sequence and the similar track sequence, the reference distance corresponding to the parallel lines of the coincident elements can reflect the fracture degree between the parallel lines of the coincident elements, and the smaller the reference distance corresponding to the parallel lines of the coincident elements is, the smaller the fracture degree between the parallel lines of the coincident elements is, and the higher the coincidence degree between the target track sequence and the similar track sequence is. Therefore, the length of the parallel lines of the coincident elements and the reference distance corresponding to the parallel lines of the coincident elements can be comprehensively considered, the weight is determined according to the reference distance corresponding to the parallel lines of the coincident elements, and the total length of the parallel lines of the coincident elements is determined according to the weight and the length of the parallel lines of the coincident elements. Because the total length of the parallel lines of the coincident elements is related to the number of the coincident track points, the spatial similarity of the target track sequence and the similar track sequence can be determined according to the total length of the parallel lines of the coincident elements and the number of the coincident track points, so that the target track sequence and the similar track sequence with different track points and different numbers of the coincident track points can be evaluated under the same standard in a relatively consistent spatial similarity determination mode, and the accuracy of the spatial similarity calculation is improved.
In this embodiment of the present application, determining the spatial similarity between the target track sequence and the similar track sequence according to the length of the parallel lines of the coincident elements and the reference distance corresponding to the parallel lines of the coincident elements, includes steps C1 to C3:
step C1: for each coincident element parallel line, taking a result of subtracting the reference distance as the weight of the coincident element parallel line.
Step C2: and carrying out weighted summation on the lengths of the parallel lines of the coincident elements according to the weights of the parallel lines of the coincident elements to obtain the total length of the parallel lines of the coincident elements.
Step C3: and taking the ratio of the total length of the parallel lines of the coincident elements to the number of the coincident track points as the spatial similarity of the target track sequence and the similar track sequence.
For example, for l1, the reference distance corresponding to l1 is 0, then 1-0=1 is taken as the weight of l 1. For l2, the reference distance corresponding to l2 is 1/8, and then 1-1/8=7/8 is taken as the weight corresponding to l 2. For l3, the reference distance corresponding to l3 is 1/8, and then 1-1/8=7/8 is taken as the weight corresponding to l 3. Exemplary, will
Figure SMS_7
As the total length of the parallel lines of coincident elements, wherein +.>
Figure SMS_8
Length of parallel lines of the ith coincident element, +. >
Figure SMS_9
And n is the number of parallel lines of the coincident elements for the reference distance corresponding to the ith parallel line of the coincident elements. Spatial similarity->
Figure SMS_10
Wherein m is the number of the combined track points. Taking the above example as an example, the spatial similarity is calculated to be 68.75%.
In an embodiment of the present application, the spatial coincidence data includes element projection data; according to the element characteristics of the dotting matrix, determining the space coincidence data of the target track sequence and the similar track sequence, wherein the space coincidence data comprises the steps D1-D4:
step D1: for each row element or each column element of the dotting matrix, if a first preset value exists in the row element or the column element, taking the first preset value as a projection value of the row element or the column element;
step D2: if all the elements of the row or the column are second preset values, taking the second preset values as projection values of the row or the column;
step D3: if the projection values of each row or each column have the second preset value, taking the third preset value as the element projection data;
step D4: and if the projection values of each row or each column are all the first preset values, taking the fourth preset value as the element projection data.
Illustratively, as shown in FIG. 9, each row of elements in the dotting matrix is projected. If there is an element of a row of elements that is a first preset value, i.e. there is an element of 1, the projection value of the row is the first preset value, i.e. 1. Otherwise, the projection value of the row is a second preset value, namely 0. For column theory, projection values of columns are obtained. The elemental projection data is set to a third preset value, e.g. 0, if there is a second preset value of 0 in the projection values of the rows or columns, and to a fourth preset value, e.g. 1, if the projection values of the rows or columns are all the first preset value of 1.
S230, determining a first time interval of each adjacent track point in the target track sequence and a second time interval of each adjacent track point in the similar track sequence aiming at each adjacent track point; the adjacent track points include the first adjacent track point and the second adjacent track point.
For example, adjacent track points GH, which occur in the target track sequence and also in the similar estimation sequence, are shown, with the time intervals of adjacent track points GH in the target track sequence being a first time interval and the time intervals in the similar track sequence being a second time interval. Other adjacent track points are similarly treated to determine a first time interval thereof in the target track sequence and a second time interval thereof in the similar track sequence respectively.
S240, determining the time interval ratio of the adjacent track points according to the first time interval and the second time interval.
In this embodiment of the present application, the ratio of the first time interval to the second time interval may be used as the time interval ratio of the adjacent track points, or the ratio of the second time interval to the first time interval may be used as the time interval ratio of the adjacent track points, which is not limited herein, so long as the time interval ratio determination manners of the adjacent track points are unified.
In this embodiment of the present application, an implementation manner is taken as an example, where the ratio of the smaller value time interval to the larger value time interval in the first time interval and the second time interval is taken as the time interval ratio of the adjacent track points. For example, for adjacent track point GH, assume a first time interval of t1 and a second time interval of t2, if t1>t2, then t2/t1 is taken as the time interval ratio of the adjacent track points GH. If it is
Figure SMS_11
T1/t2 is taken as the time interval ratio of the adjacent track points GH.
S250, determining the time deviation degree of the second adjacent track point and the first adjacent track point according to the time interval ratio of the first adjacent track point and the time interval ratio of the second adjacent track point.
For example, the ratio of the time interval of the second adjacent track point to the time interval of the first adjacent track point may be taken as the time deviation degree.
In this embodiment of the present application, determining, according to the time interval ratio of the first adjacent track point and the time interval ratio of the second adjacent track point, a time deviation degree between the second adjacent track point and the first adjacent track point includes: determining a standard deviation of the time interval ratio of the second adjacent track point relative to the time interval ratio of the first adjacent track point according to the time interval ratio of the first adjacent track point and the time interval ratio of the second adjacent track point; and determining the time deviation degree of the second adjacent track point and the first adjacent track point according to the time interval ratio of the standard deviation to the second adjacent track point.
The first adjacent track points are adjacent track points in the same coincident track sequence, and the time interval ratio of the first adjacent track points has stability and can reflect the stable behavior habit of the user. The second adjacent track points are adjacent track points in different coincident track sequences, the behavior of the user in the period is unpredictable, and the time characteristic of the movement of the user between the second adjacent track points is reflected through the standard deviation of the time interval ratio of the second adjacent track points relative to the time interval ratio of the first adjacent track points and the time interval ratio of the second adjacent track points, so that whether the behavior characteristic of the user between the second adjacent track points is similar to the behavior characteristic of the user between the first adjacent track points is determined. In particular, the median or average between the time interval ratios of the first adjacent track points may be determined, and the standard deviation may be calculated based on the median or average and the second adjacent time interval ratio. The time deviation degree is determined according to the ratio of the standard deviation to the time interval ratio of the second adjacent track point or according to the ratio of the time interval ratio of the second adjacent track point to the standard deviation.
Specifically, determining the time deviation degree of the second adjacent track point and the first adjacent track point according to the time interval ratio of the first adjacent track point and the time interval ratio of the second adjacent track point, wherein the time deviation degree comprises the steps of E1-E2:
step E1: determining a median in the time interval ratio of the first adjacent track points, and determining a minimum in the time interval ratio of the second adjacent track points;
step E2: determining a standard deviation of the minimum value relative to the median;
step E3: and taking the ratio of the standard deviation to the minimum value as the time deviation degree of the second adjacent track point and the first adjacent track point.
Illustratively, the degree of time deviation is determined according to the following formula:
Figure SMS_12
wherein,,
Figure SMS_13
for the degree of time deviation, +.>
Figure SMS_14
For the median in the time interval ratio of the first adjacent track points, < >>
Figure SMS_15
For standard deviation>
Figure SMS_16
Is the minimum value in the time interval ratio of the second adjacent track points.
As shown in FIG. 10, the first adjacent track points have GH, JK and KL, and the time interval ratios are respectively0.93, 0.99 and 0.97, the median was taken to be 0.97. The second adjacent track points have HJ and KL, the time interval ratio is 0.96 and 0.93, and the minimum value is 0.93, so that the time deviation degree can be calculated as
Figure SMS_17
. If the difference between the behavior characteristic (such as average speed) of the tracked object between the second adjacent track points and the behavior characteristic (such as average speed) of the tracked object between the first adjacent track points is smaller, the smaller the time deviation degree is, which is used for indicating that the similarity between the target track sequence and the similar track sequence is higher.
And S260, determining whether the target track sequence and the similar track sequence belong to the same type of track according to the space coincidence data and the time deviation degree.
S270, according to the determined result, the target track sequence is stored in a track library.
The embodiment of the application provides a track library construction method, which adopts a dotting method to compare a target track sequence with a similar track sequence, and determines a dotting matrix; determining space coincidence data of a target track sequence and a similar track sequence according to element characteristics of a dotting matrix, so as to accurately and efficiently analyze the space coincidence data between the target track sequence and the similar track sequence, and determining a first time interval of each adjacent track point in the target track sequence and a second time interval of the adjacent track point in the similar track sequence by aiming at each adjacent track point; the adjacent track points comprise a first adjacent track point and a second adjacent track point; taking the ratio of the time interval with smaller value to the time interval with larger value in the first time interval and the second time interval as the time interval ratio of the adjacent track points; according to the time interval ratio of the first adjacent track points and the time interval ratio of the second adjacent track points, the time deviation degree of the second adjacent track points and the first adjacent track points is determined, so that whether the behavior characteristics of the tracked object are similar or not is analyzed by considering the time deviation between the reconstructed track sequences, and further the accurate determination of whether the target track sequence and the similar track sequence are similar or not is facilitated.
Example III
Fig. 11 is a flowchart of a track library construction method according to a second embodiment of the present application, where the track library construction method is optimized based on the foregoing embodiments, and a scheme not described in detail in the embodiments of the present application is shown in the foregoing embodiments. As shown in fig. 11, the method in the embodiment of the application specifically includes the following steps:
s310, determining spatial coincidence data of the target track sequence and the similar track sequence according to the coincidence track points of the target track sequence and the similar track sequence.
S320, determining the time deviation degree of the second adjacent track points and the first adjacent track points according to the time interval between the first adjacent track points of the continuous coincident track points and the time interval between the second adjacent track points of the coincident track sequence; wherein the first adjacent track points are adjacent track points belonging to the same coincident track sequence; the second adjacent track points are adjacent track points belonging to adjacent different coincident track sequences.
S330, determining whether the target track sequence and the similar track sequence belong to the same type of track according to the space coincidence data and the time deviation degree.
S340, according to the determined result, the target track sequence is stored in a track library.
According to the determined result, the target track sequence is stored in a track library, and the method comprises the steps of F1-F2:
step F1: if the target track sequence and the similar track sequence belong to the same type of track, combining the target track sequence and the similar track sequence and storing the target track sequence and the similar track sequence into the track library;
step F2: otherwise, the target track sequence is used as a new track sequence and is stored in the track library.
For example, as shown in fig. 12, if the target track sequence and the similar track sequence are similar tracks, the target track sequence and the similar track sequence are combined, that is, the same track point is unchanged, different track points are combined to obtain a combined track sequence, and the combined track sequence is stored in a track library. And if the target track sequence and the similar track sequence do not belong to the same type of track, storing the target track sequence as a new track sequence into the track library. If at least two similar track sequences belonging to the same track as the target track sequence exist in the track library, selecting the similar track sequence with highest confidence coefficient belonging to the same track and output in the preset track sequence classification model, and carrying out merging treatment.
S350, aiming at the historical track sequences in the track library, determining that the track library has the historical track sequences belonging to the same type of track according to the historical space similarity and the historical time interval of each historical track sequence.
In the embodiment of the present application, the process of determining whether any two historical track sequences in the track library belong to the same kind of track is the same as S110-S130.
S360, combining the history track sequences belonging to the same track, and obtaining a new history track sequence for storage.
For example, in the process that the target track sequence is continuously stored in the database, there may be a change of the historical track sequence in the track library caused by track merging, and the historical track sequence originally not belonging to the same kind of track may belong to the same kind of track currently. Therefore, in the embodiment of the application, the track sequences belonging to the same track are combined, so that a new historical track sequence is obtained for storage, storage space is saved, and storage efficiency is improved.
S370, taking the historical track sequence which does not belong to the same kind of track with other historical track sequences in the track library and is positioned at the current time interval of the last positioning time interval within a preset time interval as a target historical track sequence.
For example, if the historical track sequence and any other historical track sequence in the track library do not belong to the same kind of track, and the time interval of the current moment of the last positioning time of the historical track sequence is within a preset time interval, the historical track sequence is taken as the target historical track sequence. The preset time interval can be determined according to actual conditions.
S380, according to the identification of the target historical track sequence, acquiring a behavior track sequence matched with the identification from a behavior library; wherein all acquired track sequences are stored in the behavior library.
In the embodiment of the application, as long as the track sequence is obtained, the track sequence is stored in a behavior library, and if the track sequence and the historical track sequence in the track library belong to the same kind of track, the same mark is given. Therefore, all the obtained track sequences are stored in the behavior library, and the track sequences in the behavior library are the behavior track sequences. And acquiring a behavior track sequence matched with the identification from a behavior library according to the identification of the target historical track sequence.
S390, updating the time interval of the adjacent track points of the target historical track sequence recorded in the track library according to the time interval of the adjacent track points in the behavior track sequence.
For example, the time intervals of the adjacent track points of the target historical track sequence recorded in the track library can be updated according to the time intervals of the adjacent track points in the behavior track sequence, such as averaging, median taking and the like. For example, m% of the maximum time intervals may be removed, n% of the minimum time intervals may be removed, and the average or median of the remaining time intervals may be taken as the time intervals of adjacent track points of the target historical track sequence recorded in the track library. If the number of remaining time intervals is even, an average value may be taken, and if the number of remaining time intervals is odd, a median may be taken. m% or n% of the non-integers may be rounded off, rounded up, or rounded down. As shown in fig. 13, in one possible implementation, there is a behavior trace sequence ABCDEFG, ABCDFG, ABCDEFG, ABCDEG in the behavior library that matches the target history trace sequence identity, and the time intervals in the four behavior trace sequences are 218 seconds, 209 seconds, 163 seconds, and 298 seconds, respectively, for the adjacent trace point AB. The maximum time interval of 218 seconds is removed, the minimum time interval of 163 seconds is removed, and 218 seconds and 209 seconds are even numbers, and the average value is 213 seconds, which are taken as the time intervals of adjacent track points of the target history track sequence recorded in the track library. The standard deviation was 4.5. The same applies for other adjacent track points.
In this embodiment of the present application, if the time interval between the current time and the positioning time of the historical track sequence in the track library exceeds the preset time interval, it is determined that the time of occurrence of the historical track sequence is earlier and does not occur within a recent period of time, which indicates that the tracked object does not act along the track any more, the historical track sequence may be deleted from the track library, so as to eliminate the redundant track sequence and save the storage space. The execution order of S360 and S370 is not limited, and the execution order of S360 to S370 and S380 to S390 is not limited.
The embodiment of the application provides a track library construction method, which aims at historical track sequences in a track library, and determines that the track library has the historical track sequences belonging to the same kind of track according to the historical space similarity and the historical time interval of each historical track sequence; and combining the historical track sequences belonging to the same type of track to obtain a new historical track sequence for storage, so that the track library is tidied in time, the repeated track sequences are prevented from being stored in the form of two track sequences, the storage space is occupied, and the track library is difficult to search. The method comprises the steps that a historical track sequence which is different from other historical track sequences in a track library and is located at the current time of the last time is taken as a target historical track sequence within a preset time interval; according to the identification of the target historical track sequence, a behavior track sequence matched with the identification is obtained from a behavior library; all acquired track sequences are stored in the behavior library; according to the time intervals of adjacent track points in the behavior track sequence, the time intervals of the adjacent track points of the target history track sequence recorded in the track library are updated, so that the time intervals of the adjacent track points in the track library are updated in time, and the accuracy and the instantaneity of the track library are ensured.
Example IV
Fig. 14 is a schematic structural diagram of a track library construction device according to a fourth embodiment of the present application, where the track library construction device may execute the track library construction method according to any embodiment of the present application, and has functional modules and beneficial effects corresponding to the execution method. As shown in fig. 14, the apparatus includes:
the spatial coincidence data determining module 410 is configured to determine spatial coincidence data of the target track sequence and the similar track sequence according to coincident track points of the target track sequence and the similar track sequence.
A time deviation determining module 420, configured to determine a time deviation between a second adjacent track point and a first adjacent track point of the continuous overlapping track point according to a time interval between the first adjacent track points of the overlapping track sequence formed by the continuous overlapping track points and a time interval between the second adjacent track points of the overlapping track sequence; wherein the first adjacent track points are adjacent track points belonging to the same coincident track sequence; the second adjacent track points are adjacent track points belonging to adjacent different coincident track sequences.
The similar track judging module 430 is configured to determine whether the target track sequence and the similar track sequence belong to similar tracks according to the spatial coincidence data and the time deviation degree.
And the warehousing module 440 is used for storing the target track sequence into a track library according to the determination result.
In the embodiment of the present application, the spatial coincidence data determining module 410 includes:
the dotting matrix determining unit is used for comparing the target track sequence with the similar track sequence by adopting a dotting method to determine a dotting matrix; setting elements corresponding to the coincident track points as a first preset value and setting other elements as a second preset value in a dotting matrix;
and the determining unit is used for determining the space coincidence data of the target track sequence and the similar track sequence according to the element characteristics of the dotting matrix.
The spatial coincidence data comprises the spatial similarity of the target track sequence and the similar track sequence;
in the embodiment of the present application, the determining unit is specifically configured to:
connecting elements corresponding to continuous coincident track points in the dotting matrix and/or making a preset length line segment parallel to a main diagonal of the dotting matrix by using singly-interrupted coincident track points to obtain parallel lines of the coincident elements; determining the spatial similarity of the target track sequence and the similar track sequence according to the length of the parallel lines of the coincident elements and the vertical distance corresponding to the parallel lines of the coincident elements; the perpendicular distance corresponding to the parallel lines of the coincident elements is the perpendicular distance between the parallel lines of the coincident elements and the main diagonal of the dotting matrix.
In the embodiment of the present application, the determining unit is specifically configured to:
determining the maximum value of the distances from each element in the dotting matrix to the main diagonal as a unit distance, and taking the value of the distance between the parallel lines of the coincident elements and the main diagonal of the dotting matrix relative to the unit distance as the corresponding vertical distance of the parallel lines of the coincident elements; if the coincident element parallel line contains the element corresponding to the first coincident track point, taking the vertical distance corresponding to the coincident element parallel line as the reference distance corresponding to the coincident element parallel line; otherwise, taking the vertical distance difference value corresponding to the parallel lines of the coincident elements and the parallel lines of the previous coincident elements as a reference distance; wherein, the coincident track point corresponding to the last coincident element parallel line is before the track point corresponding to the coincident element parallel line; and determining the spatial similarity of the target track sequence and the similar track sequence according to the length of the parallel lines of the coincident elements and the reference distance corresponding to the parallel lines of the coincident elements.
In the embodiment of the present application, the determining unit is specifically configured to:
for each coincident element parallel line, determining the weight of the coincident element parallel line according to the reference distance corresponding to the coincident element parallel line; determining the total length of the parallel lines of the coincident elements according to the weight of the parallel lines of the coincident elements and the length of the parallel lines of the coincident elements; and determining the spatial similarity of the target track sequence and the similar track sequence by combining the total length of the parallel lines of the coincident elements with the number of the coincident track points.
In an embodiment of the present application, the spatial coincidence data includes element projection data; the determining unit is specifically configured to:
for each row element or each column element of the dotting matrix, if a first preset value exists in the row element or the column element, taking the first preset value as a projection value of the row element or the column element; if all the elements of the row or the column are second preset values, taking the second preset values as projection values of the row or the column; if the projection values of each row or each column have the second preset value, taking the third preset value as the element projection data; and if the projection values of each row or each column are all the first preset values, taking the fourth preset value as the element projection data.
In the embodiment of the present application, the time deviation determining module 420 includes:
a time interval determining unit, configured to determine, for each adjacent track point, a first time interval of the adjacent track point in the target track sequence, and a second time interval of the adjacent track point in the similar track sequence; the adjacent track points comprise the first adjacent track point and the second adjacent track point;
a time interval ratio determining unit, configured to determine a time interval ratio of the adjacent track points according to the first time interval and the second time interval;
And the deviation degree determining unit is used for determining the time deviation degree of the second adjacent track point and the first adjacent track point according to the time interval ratio of the first adjacent track point and the time interval ratio of the second adjacent track point.
In this embodiment of the present application, the deviation degree determining unit is specifically configured to:
determining a standard deviation of the time interval ratio of the second adjacent track points relative to the median according to the time interval ratio of the first adjacent track points and the time interval ratio of the second adjacent track points; and determining the time deviation degree of the second adjacent track point and the first adjacent track point according to the time interval ratio of the standard deviation to the second adjacent track point.
In the embodiment of the present application, the binning module 440 includes:
the merging unit is used for merging the target track sequence and the similar track sequence if the target track sequence and the similar track sequence belong to the same track, and storing the target track sequence and the similar track sequence into the track library;
and the storing unit is used for storing the target track sequence as a new track sequence into the track library if not.
In an embodiment of the present application, the apparatus further includes:
The judging module is used for determining that the historical track sequences belonging to the same type of track exist in the track library according to the historical space similarity and the historical time interval of each historical track sequence aiming at the historical track sequences in the track library;
and the storage module is used for merging the history track sequences belonging to the same type of track to obtain a new history track sequence for storage.
In an embodiment of the present application, the apparatus further includes:
the target historical track sequence determining module is used for taking a historical track sequence which does not belong to the same type of track with other historical track sequences in the track library and is positioned at the current time interval of the last positioning time interval within a preset time interval as a target historical track sequence;
the matching module is used for acquiring a behavior track sequence matched with the identification from a behavior library according to the identification of the target history track sequence; wherein, all acquired track sequences are stored in the behavior library;
and the updating module is used for updating the time intervals of the adjacent track points of the target historical track sequence recorded in the track library according to the time intervals of the adjacent track points in the behavior track sequence.
The track library construction device provided by the embodiment of the application can execute the track library construction method provided by any embodiment of the application, and has the corresponding functional modules and beneficial effects of the execution method.
Example five
Fig. 15 shows a schematic diagram of the structure of an electronic device 10 that may be used to implement embodiments of the present application. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the application described and/or claimed herein.
As shown in fig. 15, the electronic device 10 includes at least one processor 11, and a memory, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, in which the memory stores a computer program executable by the at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 may also be stored. The processor 11, the ROM 12 and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
Various components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, etc.; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as the track library construction method.
In some embodiments, the track library construction method may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the track library construction method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the track library construction method in any other suitable way (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out the methods of the present application may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable track library construction device, such that the computer programs, when executed by the processor, cause the functions/operations specified in the flowchart and/or block diagram block or blocks to be performed. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this application, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present application may be performed in parallel, sequentially, or in a different order, so long as the information desired in the technical solution of the present application can be achieved, and the present application is not limited herein.
The above embodiments do not limit the scope of the application. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present application are intended to be included within the scope of the present application.

Claims (13)

1. A track library construction method, the method comprising:
determining space coincidence data of a target track sequence and a similar track sequence according to coincident track points of the target track sequence and the similar track sequence;
determining the time deviation degree of a second adjacent track point and a first adjacent track point according to the time interval between the first adjacent track points of the continuous coincident track point formed by the coincident track points and the time interval between the second adjacent track points of the coincident track sequence; wherein the first adjacent track points are adjacent track points belonging to the same coincident track sequence; the second adjacent track points are adjacent track points belonging to adjacent different coincident track sequences;
Determining whether the target track sequence and the similar track sequence belong to the same type of track according to the space coincidence data and the time deviation;
and according to the determination result, storing the target track sequence into a track library.
2. The method of claim 1, wherein determining spatial coincidence data of a target track sequence and a similar track sequence from coincident track points of the target track sequence and the similar track sequence comprises:
comparing the target track sequence with the similar track sequence by adopting a dotting method to determine a dotting matrix; setting elements corresponding to the coincident track points as a first preset value and setting other elements as a second preset value in a dotting matrix;
and determining the space coincidence data of the target track sequence and the similar track sequence according to the element characteristics of the dotting matrix.
3. The method of claim 2, wherein the spatial coincidence data comprises spatial similarities of the target track sequence and the similar track sequence;
according to the element characteristics of the dotting matrix, determining the space coincidence data of the target track sequence and the similar track sequence comprises the following steps:
Connecting elements corresponding to continuous coincident track points in the dotting matrix and/or making a preset length line segment parallel to a main diagonal of the dotting matrix by using singly-interrupted coincident track points to obtain coincident element parallel lines;
determining the spatial similarity of the target track sequence and the similar track sequence according to the length of the parallel lines of the coincident elements and the vertical distance corresponding to the parallel lines of the coincident elements; the perpendicular distance corresponding to the parallel lines of the coincident elements is the perpendicular distance between the parallel lines of the coincident elements and the main diagonal of the dotting matrix.
4. A method according to claim 3, wherein determining the spatial similarity of the target track sequence and the similar track sequence based on the lengths of the parallel lines of coincident elements and the corresponding vertical distances of the parallel lines of coincident elements comprises:
determining the maximum value of the distances from each element in the dotting matrix to the main diagonal as a unit distance, and taking the value of the distance between the parallel lines of the coincident elements and the main diagonal of the dotting matrix relative to the unit distance as the corresponding vertical distance of the parallel lines of the coincident elements;
If the coincident element parallel line contains the element corresponding to the first coincident track point, taking the vertical distance corresponding to the coincident element parallel line as the reference distance corresponding to the coincident element parallel line;
otherwise, taking the vertical distance difference value corresponding to the parallel lines of the coincident elements and the parallel lines of the previous coincident elements as a reference distance; wherein, the coincident track point corresponding to the last coincident element parallel line is before the track point corresponding to the coincident element parallel line;
and determining the spatial similarity of the target track sequence and the similar track sequence according to the length of the parallel lines of the coincident elements and the reference distance corresponding to the parallel lines of the coincident elements.
5. The method of claim 4, wherein determining the spatial similarity of the target track sequence and the similar track sequence based on the lengths of the parallel lines of coincident elements and the reference distances corresponding to the parallel lines of coincident elements comprises:
for each coincident element parallel line, determining the weight of the coincident element parallel line according to the reference distance corresponding to the coincident element parallel line;
determining the total length of the parallel lines of the coincident elements according to the weight of the parallel lines of the coincident elements and the length of the parallel lines of the coincident elements;
And determining the spatial similarity of the target track sequence and the similar track sequence by combining the total length of the parallel lines of the coincident elements with the number of the coincident track points.
6. The method of claim 1, wherein determining the degree of temporal deviation of a second adjacent track point from a first adjacent track point of a sequence of overlapping track points of the sequence of overlapping track points based on a time interval between the second adjacent track points of the sequence of overlapping track points, comprises:
determining, for each adjacent track point, a first time interval of the adjacent track point in the target track sequence and a second time interval of the adjacent track point in the similar track sequence; the adjacent track points comprise the first adjacent track point and the second adjacent track point;
determining the time interval ratio of adjacent track points according to the first time interval and the second time interval;
and determining the time deviation degree of the second adjacent track point and the first adjacent track point according to the time interval ratio of the first adjacent track point and the time interval ratio of the second adjacent track point.
7. The method of claim 6, wherein determining the degree of time offset between the second adjacent track point and the first adjacent track point based on the time interval ratio of the first adjacent track point to the time interval ratio of the second adjacent track point comprises:
determining a standard deviation of the time interval ratio of the second adjacent track point relative to the time interval ratio of the first adjacent track point according to the time interval ratio of the first adjacent track point and the time interval ratio of the second adjacent track point;
and determining the time deviation degree of the second adjacent track point and the first adjacent track point according to the time interval ratio of the standard deviation to the second adjacent track point.
8. The method according to claim 1, wherein the processing of the target track sequence into the track library according to the determination result includes:
if the target track sequence and the similar track sequence belong to the same type of track, combining the target track sequence and the similar track sequence and storing the target track sequence and the similar track sequence into the track library;
otherwise, the target track sequence is used as a new track sequence and is stored in the track library.
9. The method according to claim 1, wherein the method further comprises:
aiming at the historical track sequences in the track library, determining that the track library has the historical track sequences belonging to the same kind of track according to the historical space similarity and the historical time interval of each historical track sequence;
and merging the historical track sequences belonging to the same kind of track to obtain a new historical track sequence for storage.
10. The method according to claim 9, wherein the method further comprises:
the method comprises the steps that a historical track sequence which is different from other historical track sequences in a track library and is located at the current time of the last time is taken as a target historical track sequence within a preset time interval;
according to the identification of the target historical track sequence, acquiring a behavior track sequence matched with the identification from a behavior library; wherein, all acquired track sequences are stored in the behavior library;
and updating the time interval of the adjacent track points of the target historical track sequence recorded in the track library according to the time interval of the adjacent track points in the behavior track sequence.
11. A track library construction device, the device comprising:
The space coincidence data determining module is used for determining space coincidence data of the target track sequence and the similar track sequence according to the coincidence track points of the target track sequence and the similar track sequence; wherein the similar track sequence is selected from a track library;
the time deviation determining module is used for determining the time deviation between the second adjacent track points and the first adjacent track points according to the time interval between the first adjacent track points of the coincident track sequence formed by the continuous coincident track points and the time interval between the second adjacent track points of the coincident track sequence; wherein the first adjacent track points are adjacent track points belonging to the same coincident track sequence; the second adjacent track points are adjacent track points belonging to adjacent different coincident track sequences;
the similar track judging module is used for determining whether the target track sequence and the similar track sequence belong to similar tracks according to the space coincidence data and the time deviation degree;
and the warehousing module is used for carrying out processing of storing the target track sequence into a track library according to the determination result.
12. An electronic device, the device comprising:
At least one processor; and
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the track library construction method of any one of claims 1-10.
13. A computer readable storage medium storing computer instructions for causing a processor to implement the track library construction method of any one of claims 1-10 when executed.
CN202310287198.5A 2023-03-23 2023-03-23 Track library construction method and device, electronic equipment and medium Active CN115994147B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310287198.5A CN115994147B (en) 2023-03-23 2023-03-23 Track library construction method and device, electronic equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310287198.5A CN115994147B (en) 2023-03-23 2023-03-23 Track library construction method and device, electronic equipment and medium

Publications (2)

Publication Number Publication Date
CN115994147A CN115994147A (en) 2023-04-21
CN115994147B true CN115994147B (en) 2023-05-30

Family

ID=85993860

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310287198.5A Active CN115994147B (en) 2023-03-23 2023-03-23 Track library construction method and device, electronic equipment and medium

Country Status (1)

Country Link
CN (1) CN115994147B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114511816A (en) * 2020-11-16 2022-05-17 杭州海康威视系统技术有限公司 Data processing method and device, electronic equipment and machine-readable storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11508140B2 (en) * 2020-10-09 2022-11-22 Sensormatic Electronics, LLC Auto-configuring a region of interest (ROI) associated with a camera

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114511816A (en) * 2020-11-16 2022-05-17 杭州海康威视系统技术有限公司 Data processing method and device, electronic equipment and machine-readable storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"A Trajectory Clustering Method Based on Moving Index Analysis and Modeling";YUQING YANG等;《 IEEE Access ( Volume: 10)》;第1-5页 *
"基于遍历法的开放曲面铺丝轨迹规划";胡斌等;《基于遍历法的开放曲面铺丝轨迹规划》;第20-24页 *

Also Published As

Publication number Publication date
CN115994147A (en) 2023-04-21

Similar Documents

Publication Publication Date Title
CN113222942A (en) Training method of multi-label classification model and method for predicting labels
CN113095336A (en) Method for training key point detection model and method for detecting key points of target object
CN114741544B (en) Image retrieval method, retrieval library construction method, device, electronic equipment and medium
CN114090601B (en) Data screening method, device, equipment and storage medium
CN113657249A (en) Training method, prediction method, device, electronic device, and storage medium
CN115994147B (en) Track library construction method and device, electronic equipment and medium
CN116309963B (en) Batch labeling method and device for images, electronic equipment and storage medium
CN115953434B (en) Track matching method, track matching device, electronic equipment and storage medium
CN115329748B (en) Log analysis method, device, equipment and storage medium
CN115794473A (en) Root cause alarm positioning method, device, equipment and medium
CN112926613A (en) Method and device for positioning time sequence training start node
CN113408661B (en) Method, apparatus, device and medium for determining mismatching
CN117746069B (en) Graph searching model training method and graph searching method
CN114625747B (en) Wind control updating method and system based on information security
CN115964637A (en) Data processing method and device, electronic equipment and storage medium
CN117574087A (en) Model determining method, memory fault predicting device, medium and equipment
CN116975653A (en) Sample information determining method and device, electronic equipment and storage medium
CN112559886A (en) Method, device, equipment, storage medium and product for sorting historical record documents
CN115222986A (en) Method, device, equipment and medium for updating article display information
CN117609723A (en) Object identification method and device, electronic equipment and storage medium
CN113420781A (en) Brand identification method, apparatus, device, storage medium and program product
CN116662788A (en) Vehicle track processing method, device, equipment and storage medium
CN114821208A (en) Target object detection model training method, device, equipment and storage medium
CN114897073A (en) Model iteration method and device for intelligent industry and electronic equipment
CN116720186A (en) Malicious code identification method and device, electronic equipment and storage medium

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