[go: up one dir, main page]

CN112131325A - Track determination method, device and equipment and storage medium - Google Patents

Track determination method, device and equipment and storage medium Download PDF

Info

Publication number
CN112131325A
CN112131325A CN201910555349.4A CN201910555349A CN112131325A CN 112131325 A CN112131325 A CN 112131325A CN 201910555349 A CN201910555349 A CN 201910555349A CN 112131325 A CN112131325 A CN 112131325A
Authority
CN
China
Prior art keywords
data
target
data attribute
index
attribute
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.)
Pending
Application number
CN201910555349.4A
Other languages
Chinese (zh)
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.)
Hangzhou Hikvision Digital Technology Co Ltd
Original Assignee
Hangzhou Hikvision Digital Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Hikvision Digital Technology Co Ltd filed Critical Hangzhou Hikvision Digital Technology Co Ltd
Priority to CN201910555349.4A priority Critical patent/CN112131325A/en
Publication of CN112131325A publication Critical patent/CN112131325A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Remote Sensing (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a track determination method, a device and equipment and a storage medium, wherein the track determination method comprises the following steps: extracting data attributes from different data sources, the data attributes including at least: the method comprises the following steps of (1) identifying an object ID of an object, acquiring time information of the object and position information of a data source; storing each extracted data attribute to a designated data storage system; receiving an inquiry condition input from the outside, inquiring a target data attribute meeting the inquiry condition from the specified data storage system according to the inquiry condition, and sequencing data source position information in the target data attribute comprising the same object ID according to time information in the target data attribute comprising the same object ID to obtain a moving track corresponding to the object ID. The mobile track is generated by using the position information of the data source, and the method is suitable for scenes without GPS data receiving equipment, such as a garden.

Description

Track determination method, device and equipment and storage medium
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a method, an apparatus, and a device for determining a trajectory, and a storage medium.
Background
In some closed scenes such as a garden, in order to standardize the access management of objects and prevent unsafe factors brought by lawless persons, the objects in the garden are tracked on all-day tracks, and the action tracks of the objects in the garden are accurately mastered.
In the related track determining method, a track of an object is generated mainly based on GPS data of the object reported by a user (for example, reported by a mobile phone), and then the track is stored in a file or a relational database. However, in some special scenes such as a campus, there is generally no receiving device for receiving GPS data reported by a user, and a track cannot be generated in the above manner.
Disclosure of Invention
In view of the above, the present invention provides a trajectory determination method, apparatus, device, and storage medium, which generate a movement trajectory using location information of a data source, and are applicable to a scenario without a GPS data receiving device, such as a campus.
The first aspect of the present invention provides a trajectory determination method, including:
extracting data attributes from different data sources, the data attributes including at least: the method comprises the following steps of (1) identifying an object ID of an object, acquiring time information of the object and position information of a data source;
storing each extracted data attribute to a designated data storage system;
receiving an inquiry condition input from the outside, inquiring a target data attribute meeting the inquiry condition from the specified data storage system according to the inquiry condition, and sequencing data source position information in the target data attribute comprising the same object ID according to time information in the target data attribute comprising the same object ID to obtain a moving track corresponding to the object ID.
According to an embodiment of the present invention, each data attribute stored in the specified data storage system has a corresponding index, and the index corresponding to the data attribute includes time information included in the data attribute;
the query conditions include: a target time period; inquiring the target data attribute meeting the inquiry condition from the specified data storage system according to the inquiry condition, wherein the inquiring comprises the following steps:
inquiring a target index in a specified data storage system according to the target time period, wherein time information in the target index is in the target time period;
determining the data attribute corresponding to the target index as a reference data attribute;
and determining the target data attribute from the reference data attributes.
According to an embodiment of the present invention, determining the target data attribute from the reference data attributes includes:
selecting a target object ID from object IDs contained in all reference data attributes, wherein the number of the reference data attributes containing the target object ID in all the reference data attributes is larger than a preset number;
and pulling the reference data attribute containing the target object ID from the specified data storage system by adopting a Scroll mode to serve as the target data attribute.
According to one embodiment of the invention, the designated data storage system comprises at least two index storage segments, each index storage segment has a corresponding time period, and each index storage segment is used for storing indexes of which the time information is in the corresponding time period;
querying a target index in a specified data storage system according to the target time period, comprising:
determining a target index storage segment from the designated data storage system, wherein the time segment corresponding to the target index storage segment has an intersection with the target time segment;
and querying the target index from the target index storage segment.
In accordance with one embodiment of the present invention,
the method still further comprises:
acquiring an externally input reference object ID, determining a reference movement track corresponding to the reference object ID, and calculating the similarity between the movement track corresponding to each object ID and the reference movement track;
and selecting at least one movement track with the maximum similarity with the reference movement track from the movement tracks corresponding to the object IDs.
According to an embodiment of the present invention, the calculating a similarity between the movement trajectory corresponding to each object ID and the reference movement trajectory includes:
aiming at the moving track corresponding to each object ID, determining a data attribute pair and a data attribute sum N according to the moving track and a reference moving track, calculating the ratio of the number of the data attribute pairs to the N, and determining the similarity between the moving track and the reference moving track according to the ratio;
the data source position information included by one data attribute in each pair of data attribute pairs is in the moving track, the data source position information included by the other data attribute is in the reference moving track, the difference value of the time information in each pair of data attribute pairs is less than or equal to the specified time information, and the area identifications corresponding to the data source position information in each pair of data attribute pairs are the same; the sum of the data attributes is the sum of the number of the data attributes of the position information of each data source in the moving track and the reference moving track.
A second aspect of the present invention provides a trajectory determination device, including:
a data attribute extraction module, configured to extract data attributes from different data sources, where the data attributes at least include: the method comprises the following steps of (1) identifying an object ID of an object, acquiring time information of the object and position information of a data source;
the data attribute storage module is used for storing each extracted data attribute to a specified data storage system;
and the moving track generating module is used for receiving an inquiry condition input from the outside, inquiring the target data attribute meeting the inquiry condition from the specified data storage system according to the inquiry condition, and sequencing the data source position information in the target data attribute comprising the same object ID according to the time information in the target data attribute comprising the same object ID to obtain a moving track corresponding to the object ID.
According to an embodiment of the present invention, each data attribute stored in the specified data storage system has a corresponding index, and the index corresponding to the data attribute includes time information included in the data attribute;
the query conditions include: a target time period; the movement track generation module comprises:
the target index query unit is used for querying a target index in a specified data storage system according to the target time period, and the time information in the target index is in the target time period;
a reference data attribute determining unit, configured to determine a data attribute corresponding to the target index as a reference data attribute;
and the target data attribute determining unit is used for determining the target data attribute from the reference data attributes.
According to an embodiment of the present invention, the target data attribute determining unit includes:
the selection subunit is used for selecting a target object ID from object IDs contained in all reference data attributes, wherein the number of the reference data attributes containing the target object ID in all the reference data attributes is greater than a preset number;
and the pulling subunit is configured to pull, from the specified data storage system, the reference data attribute including the target object ID in a Scroll manner as the target data attribute.
According to one embodiment of the invention, the designated data storage system comprises at least two index storage segments, each index storage segment has a corresponding time period, and each index storage segment is used for storing indexes of which the time information is in the corresponding time period;
the target index query unit comprises:
the index storage segment determining subunit is used for determining a target index storage segment from the specified data storage system, wherein the time segment corresponding to the target index storage segment has an intersection with the target time segment;
and the target index inquiring subunit is used for inquiring the target index from the target index storage segment.
In accordance with one embodiment of the present invention,
the apparatus still further comprises:
the similarity calculation module is used for acquiring an externally input reference object ID, determining a reference movement track corresponding to the reference object ID, and calculating the similarity between the movement track corresponding to each object ID and the reference movement track;
and the moving track selecting module is used for selecting at least one moving track with the maximum similarity with the reference moving track from the moving tracks corresponding to the object IDs.
According to an embodiment of the present invention, the similarity calculation module includes:
the similarity calculation unit is used for determining a data attribute pair and a data attribute sum N according to the movement track and a reference movement track aiming at the movement track corresponding to each object ID, calculating the ratio of the number of the data attribute pairs to the N, and determining the similarity between the movement track and the reference movement track according to the ratio;
the data source position information included by one data attribute in each pair of data attribute pairs is in the moving track, the data source position information included by the other data attribute is in the reference moving track, the difference value of the time information in each pair of data attribute pairs is less than or equal to the specified time information, and the area identifications corresponding to the data source position information in each pair of data attribute pairs are the same; the sum of the data attributes is the sum of the number of the data attributes of the position information of each data source in the moving track and the reference moving track.
A third aspect of the invention provides an electronic device comprising a processor and a memory; the memory stores a program that can be called by the processor; wherein the processor, when executing the program, implements the trajectory determination method as described in the foregoing embodiments.
A fourth aspect of the present invention provides a machine-readable storage medium on which a program is stored, which, when executed by a processor, implements the trajectory determination method as described in the foregoing embodiments.
The embodiment of the invention has the following beneficial effects:
in the embodiment of the invention, the data attributes extracted from different data sources are stored in the specified data storage system, when the query condition input from the outside is received, the target data attributes can be searched from the specified data storage system, the moving track corresponding to the object ID can be generated by sequencing the position information in the target data attributes of the same object ID according to the time information, and because the position information of the data source in the scene is known, when the data source acquires the object, the object passes through the data source, the position information of the data source can be regarded as a track point of the object, the moving track of the object can be generated by using the position information of the data source, and the method can be applied to scenes without GPS data receiving equipment, such as a garden and the like.
Drawings
FIG. 1 is a schematic flow chart diagram of a trajectory determination method according to an embodiment of the invention;
FIG. 2 is a block diagram of a trajectory determination device according to an embodiment of the present invention;
fig. 3 is a block diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in this specification and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It will be understood that, although the terms first, second, third, etc. may be used herein to describe various elements, these elements should not be limited by these terms. These terms are only used to distinguish one type of device from another. For example, a first device may also be referred to as a second device, and similarly, a second device may also be referred to as a first device, without departing from the scope of the present invention. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
In order to make the description of the present invention clearer and more concise, some technical terms in the present invention are explained below:
ES: the system is called an elastic search, and is an open-source and real-time distributed search and analysis engine, and indexes in the elastic search are non-relational databases and are used for storing data.
LCSS: all known as the Longest Common Subsequence algorithm.
Kafka: a high throughput, distributed publish-subscribe messaging system.
Scroll method: in the elastic search, a method for traversing large-scale data is similar to a cursor of a database, and the traversing speed is obviously faster than that of a paging method.
The following describes the trajectory determination method according to the embodiment of the present invention more specifically, but not limited thereto.
The track determining method can be used in closed scenes such as a park, and the like, the fixed points of the scenes are originally provided with the acquisition equipment for acquiring the object, when the acquisition equipment acquires the object, the corresponding data attribute can be generated, the track of the object can be generated by using the position information of different acquisition equipment acquiring the same object, the old resources in the scenes such as the park, a parking lot, a traffic road section and the like are fully utilized, and any equipment related to a GPS is not needed.
Taking the garden as an example, the garden is the most common regional category of current social organization production official working, along with the continuous deepening of wisdom city construction, this theory of "wisdom garden" has also got into public's field of vision, and the garden quantity of various forms presents explosive growth to the continuous development of video monitoring technique and the continuous improvement of people's security protection consciousness in recent years, the application to the garden control is also constantly increasing.
In order to ensure the safety of the campus, acquisition devices such as access control devices, face snapshot cameras, video monitoring devices and the like are usually arranged in the campus, and the devices usually have fixed point positions, namely the position information of the devices is fixed.
In one embodiment, referring to fig. 1, a trajectory determination method includes the steps of:
s100: extracting data attributes from different data sources, the data attributes including at least: the method comprises the following steps of (1) identifying an object ID of an object, acquiring time information of the object and position information of a data source;
s200: storing each extracted data attribute to a designated data storage system;
s300: receiving an inquiry condition input from the outside, inquiring a target data attribute meeting the inquiry condition from the specified data storage system according to the inquiry condition, and sequencing data source position information in the target data attribute comprising the same object ID according to time information in the target data attribute comprising the same object ID to obtain a moving track corresponding to the object ID.
The execution subject of the trajectory determination method in the embodiment of the present invention may be an electronic device, for example, a server composed of computer devices, and the performance of the computer devices may be configured as needed.
In step S100, data attributes are extracted from different data sources, where the data attributes at least include: the object identification ID of the object, the time information of acquiring the object and the position information of the data source.
The data source is the collection equipment in closed scenes such as gardens for example, and collection equipment can include entrance guard's equipment, people's face snapshot camera, video monitoring equipment etc. specifically have entrance guard's card reader, camera etc.. Because the data source has fixed point positions in the scene, the position information of the data source can be configured in the data source in advance, the data source can generate corresponding data when acquiring the object, and the data attribute can be extracted from the data source.
The data formats of different data sources may be different, in other words, the data generated by different data sources may be heterogeneous data, and the required data attributes may be extracted from the heterogeneous data by Kafka. The data attribute at least includes an object identification ID of the object, time information of acquiring the object, and location information of the data source, but is not limited thereto, and may further include more information as needed.
The object may refer to a person, a motor vehicle, a non-motor vehicle, and the like, and the object ID is used to represent the object, and the object ID may be, for example, a name, an identification number, and the like of the person, and is not limited thereto. The time information may include information indicating year, month, day, hour, minute, second. The location information of the data source may be a point location identification of the data source in the scene or may be a geographic location.
The data source collects the object, which shows that the object passes through the data source, so that the position information of the data source can be regarded as the current position information of the object, and the movement track of the object can be constructed by collecting the position information of different data sources of the same object.
In step S200, each extracted data attribute is stored in a designated data storage system.
The designated data storage system is preferably an ES, and may implement data access in a distributed environment, although this is merely an example, and other data storage systems may be used. In one mode, after data attributes are extracted from a data source through Kafka, the data attributes can be sent to the ES in batches, and timely and rapid storage of the data attributes is achieved.
When the data attribute is stored in the ES, an index may be assigned to the data attribute in the ES, and the data attribute may be subsequently queried according to the index of the data attribute. The data attributes are stored in the ES, so that the data attributes can be rapidly stored, a large-scale data volume scene can be dealt with, and the efficiency of extracting the track is further ensured.
In step S300, an externally input query condition is received, a target data attribute satisfying the query condition is queried from the specified data storage system according to the query condition, and data source location information in the target data attribute including the same object ID is sorted according to time information in the target data attribute including the same object ID to obtain a movement trajectory corresponding to the object ID.
The query condition may be carried in an externally input query request, and the required data attribute may be queried according to the query condition, for example, the data attribute within a period of time may be queried, or the data attribute corresponding to some object ID may be queried, and so on.
And generating a moving track corresponding to the same object ID in the target data attributes by using the inquired target data attributes, and sequencing the data source position information in the target data attributes including the same object ID according to the time information in the target data attributes including the same object ID to obtain the moving track corresponding to the object ID.
And the position information in the target data attribute of the same object ID is in the same moving track, and the position information is in the sequence of the time information. The sequence may be from morning to evening, or from evening to morning, and the specific sequence is not limited.
The moving track corresponding to each object ID can be used as the moving track of the object identified by the object ID, so that the moving track of the object is generated by using the position information of the data source.
In the embodiment of the invention, the data attributes extracted from different data sources are stored in the specified data storage system, when the query condition input from the outside is received, the target data attributes can be searched from the specified data storage system, the moving track corresponding to the object ID can be generated by sequencing the position information in the target data attributes of the same object ID according to the time information, and because the position information of the data source in the scene is known, when the data source acquires the object, the object passes through the data source, the position information of the data source can be regarded as a track point of the object, the moving track of the object can be generated by using the position information of the data source, and the method can be applied to scenes without GPS data receiving equipment, such as a garden and the like.
In one embodiment, each data attribute stored in the specified data storage system has a corresponding index, and the index corresponding to the data attribute comprises time information contained in the data attribute;
the query conditions include: a target time period; in step S300, querying the target data attribute satisfying the query condition from the specified data storage system according to the query condition includes:
s301: inquiring a target index in a specified data storage system according to the target time period, wherein time information in the target index is in the target time period;
s302: determining the data attribute corresponding to the target index as a reference data attribute;
s303: and determining the target data attribute from the reference data attributes.
The query conditions are, for example: start _ time < time < end _ time; the start _ time is the start time of the target period and the end _ time is the end time of the target period.
In this way, the index in the target time period from the start time to the end time of the time information can be found according to the query condition, and the target index can be found by traversing all indexes in the specified data storage system, for example, judging whether the time information in the traversed index is in the target time period, and if so, the traversed index is the target index.
And determining the data attributes corresponding to the target index as reference data attributes, further screening the reference data attributes, and determining the target data attributes which are more in line with the requirements from the reference data attributes. Of course, the data attribute corresponding to the target index may also be directly determined as the target data attribute. By using the index to query the data attribute, the query speed is faster.
In one embodiment, in step S303, determining the target data attribute from the reference data attributes includes:
s3031: selecting a target object ID from object IDs contained in all reference data attributes, wherein the number of the reference data attributes containing the target object ID in all the reference data attributes is larger than a preset number;
s3032: and pulling the reference data attribute containing the target object ID from the specified data storage system by adopting a Scroll mode to serve as the target data attribute.
In step S3031, the preset number may be determined according to the situation, taking the preset number as 1 as an example, if the number of the reference data attributes of the same object ID is only 1, the object ID is not the target object ID, and if the number of the reference data attributes of the same object ID is greater than 1, the object ID is the target object ID.
The operation of selecting the target object ID can be controlled to be executed by the specified data storage system, the reference data attribute with less reference data attribute quantity of the same object ID is abandoned, the data attribute quantity really pulled from the specified data storage system is reduced, and the processing quantity required by the server can be reduced.
In step S3032, after the target object ID is determined, a Scroll method may be adopted to pull data, and a reference data attribute including the target object ID is pulled to the server as the target data attribute.
The Scroll mode is adopted to pull data, so that the problem of deep paging can be avoided, and the method is very suitable for the condition of large data volume. Of course, after the data is pulled, the memory data used for implementing the Scroll function in the server may be deleted to avoid occupying the memory.
In one embodiment, the designated data storage system comprises at least two index storage segments, each index storage segment has a corresponding time period, and each index storage segment is used for storing indexes of which the time information is in the corresponding time period;
in step S301, querying a target index in a specified data storage system according to the target time period includes:
s3011: determining a target index storage segment from the designated data storage system, wherein the time segment corresponding to the target index storage segment has an intersection with the target time segment;
s3012: and querying the target index from the target index storage segment.
In order to prevent the problem that the index performance of a single data attribute is reduced due to excessive data, a new index storage segment (which can be distributed on a plurality of fragments) can be established at intervals of, for example, 7 days, and the newly acquired data attribute is stored in the new index storage segment, so that the data can be stored to the maximum extent and the performance can be improved.
Each index storage segment has a corresponding time period, can store the data attributes acquired in the corresponding time period, and determines the index storage segment where the data attributes are located according to the time period.
In step S3011, a target index storage segment may be determined from the specified data storage system according to a target time period.
For example, the time period corresponding to one index storage segment is 2018-08-28-00 to 2018-09-04-00 (the index storage segment stores the data attributes acquired in the time period), and if the target time period is 2018-08-30-00 to 2018-09-06-00, the index storage segment is the target index segment. Of course, another target index storage segment may be found, and the time periods corresponding to the another target index storage segment are 2018-09-04-00 to 2018-09-11-00, so that all target index storage segments in the specified data storage system, which have intersections between the corresponding time periods and the target time periods, may be found.
In step S3012, the target index is queried from the target index storage segment. Each target index in each target index storage segment can be traversed, whether the time information in the traversed index is in the target time period or not is judged, and if yes, the traversed index is the target index.
In one embodiment, the method further comprises the steps of:
s400: acquiring an externally input reference object ID, determining a reference movement track corresponding to the reference object ID, and calculating the similarity between the movement track corresponding to each object ID and the reference movement track;
s500: and selecting at least one movement track with the maximum similarity with the reference movement track from the movement tracks corresponding to the object IDs.
Steps S400 and S500 may be performed after step S300.
The reference object ID may be one of object IDs (i.e., object IDs of objects for which the movement trajectory is determined), and in this case, the reference movement trajectory corresponding to the reference object ID may be obtained from the movement trajectory corresponding to each object ID; of course, the reference object ID may also be an object ID of another object, and in this case, the reference object ID may be acquired from a locally preset movement track.
The similarity between the moving track corresponding to each object ID and the reference moving track may be calculated through a track similarity algorithm, and the specific track similarity algorithm is not limited, for example, an lcs algorithm, etc.
And after calculating the similarity between the moving track corresponding to each object ID and the reference moving track, selecting at least one moving track with the maximum similarity with the reference moving track from the moving tracks corresponding to each object ID. The movement tracks may be sorted in order of similarity from large to small, and the top M movement tracks are used as target movement tracks, where M may be an integer greater than or equal to 1.
In order to standardize the in-and-out management of park personnel and prevent unsafe factors brought by lawless persons, the personnel in the park are tracked on all-day tracks, the action track of each employee in the park is accurately mastered, corresponding pedestrians are searched out according to the track of target personnel, and the method has important significance for the safety of the park.
In this embodiment, the selected movement track is the target movement track, and since the similarity between the target movement track and the reference movement track is high, it can be considered that the object corresponding to the target movement track is the peer object of the object corresponding to the reference movement track, and accordingly, whether the peer object is legal can be further determined, and the security of the scenes such as the garden can be ensured.
In step S400, the calculating the similarity between the movement trajectory corresponding to each object ID and the reference movement trajectory includes:
aiming at the moving track corresponding to each object ID, determining a data attribute pair and a data attribute sum N according to the moving track and a reference moving track, calculating the ratio of the number of the data attribute pairs to the N, and determining the similarity between the moving track and the reference moving track according to the ratio;
the data source position information included by one data attribute in each pair of data attribute pairs is in the moving track, the data source position information included by the other data attribute is in the reference moving track, the difference value of the time information in each pair of data attribute pairs is less than or equal to the specified time information, and the area identifications corresponding to the data source position information in each pair of data attribute pairs are the same; the sum of the data attributes is the sum of the number of the data attributes of the position information of each data source in the moving track and the reference moving track.
And determining a data attribute pair according to the movement track and the reference movement track, namely determining the longest common subsequence of the movement track and the reference movement track.
Suppose that the movement locus is X, and the reference movement locus is Y. The most conceivable algorithm when solving the problem of the longest common subsequence is an exhaustive search, i.e. for each subsequence of X, it is checked whether it is also a subsequence of Y, thereby determining whether it is a common subsequence of X and Y, and the longest common subsequence is selected in the checking. After all the subsequences of X and Y have been examined, the longest common subsequence of X and Y can be determined.
To reduce the amount of computation required, the LCSS algorithm can be used to find the longest common subsequence of X and Y. Assuming that a longest common subsequence Z ═ Z1, Z2, …, zk > of the movement trajectories X ═ X1, X2, …, xm > and Y ═ Y1, Y2, …, yn >, the lcs algorithm has the following recursive definitions:
if Xm-Yn, Zk-Xm-Yn and Zk-1 is the longest common subsequence of Xm-1 and Yn-1;
if Xm ≠ yn and zk ≠ Xm, then Z is the longest common subsequence of Xm-1 and Y;
if xm ≠ Yn and zk ≠ Yn, then Z is the longest common subsequence of X and Yn-1.
Wherein m is the length of X, n is the length of Y, and k is the length of Z.
xm ≠ yn denotes that xm is similar to yn, xm ≠ yn denotes that xm is not similar to yn, and other similar cases are the same. In the embodiment, the conditions of n and n in the LCSS algorithm are defined, wherein xm is similar to yn, and xm is not similar to yn.
Taking the position information xm in X and the position information yn in Y as an example, if the area identifier corresponding to xm is the same as the area identifier corresponding to yn and the difference between the time information corresponding to xm and the time information corresponding to yn is not greater than the specified time information, xm is similar to yn, that is, xm ≠ yn, otherwise xm ≠ yn. The specified time information is, for example, 3 minutes, 5 minutes, or the like, but specific values are not limited thereto.
The region identification may also be extracted from the data source and included in the data attributes. Each data source may be preconfigured with the area identifier of the area where the data source is located, and the area identifiers of the data sources located in the same area are the same, for example, the area identifiers of the data sources in the same canteen in the campus are the same. If the area identifications corresponding to the two pieces of position information are the same, it is indicated that the two objects appear in the same block area, such as a canteen.
Based on the above definitions, the problem can be regarded as a dynamic programming problem, a matrix C [ m, n ] is constructed, and the following recursion relationship is established to solve the matrix:
Figure BDA0002106733170000131
wherein i is less than or equal to m, and j is less than or equal to n.
The length recording element C [ m, n ] of the longest common subsequence of C [ m, n ], X and Y, solved according to the above recursive relationship, C [ m, n ] is the element of the m-th row and n-th column in the matrix C [ m, n ].
The length of the obtained longest common subsequence of X and Y is the number of data attribute pairs determined according to the movement track and the reference movement track. The longer the length, the higher the similarity of the movement trajectory to the reference movement trajectory.
In this embodiment, the time interval of the object information acquired by the acquisition device and the spatial distance of each acquisition device are considered, and when the area identifiers corresponding to xm and yn are the same and the corresponding time information has a small difference, xm and yn are similar, so that the recall ratio of similar tracks is improved.
Then, a ratio between the number of data attribute pairs and the N may be calculated, and a similarity between the movement trajectory and the reference movement trajectory may be determined according to the ratio, for example, a product of the ratio and a preset value may be used as the similarity.
Taking a preset value as 2 as an example, the similarity calculation formula is as follows:
S=2*(c[m,n])/(m+n)
m is the number of data attributes where each data source location information is located in the moving track, N is the number of data attributes where each data source location information is located in the reference moving track, and m + N is the number of N.
In the following, a specific example is used to describe a calculation method of the similarity between the movement trajectory and the reference movement trajectory, and assuming that the designated time information is 5 minutes, and the time information and the position information of the first object in the movement trajectory X are:
2018-09-28 12:00:00 A,
2018-09-28 12:10:00 B,
2018-09-28 12:20:00 C;
2018-09-28 12:30:00 E;
in the reference movement trajectory Y, the time information and the position information of the reference object are:
2018-09-28 12:00:00 A,
2018-09-28 12:16:00 B,
2018-09-28 12:20:00 D;
2018-09-28 12:30:00 E;
where A, B, C, D, E is position information, similar position information is a and E, and corresponding time information is the same, and accordingly, the similarity is 2 × 2/(3+3) ═ 66%.
The present invention also provides a trajectory determination device, and referring to fig. 2, in one embodiment, the trajectory determination device 100 includes:
a data attribute extracting module 101, configured to extract data attributes from different data sources, where the data attributes at least include: the method comprises the following steps of (1) identifying an object ID of an object, acquiring time information of the object and position information of a data source;
the data attribute storage module 102 is used for storing each extracted data attribute to a specified data storage system;
a moving track generating module 103, configured to receive an externally input query condition, query, according to the query condition, a target data attribute satisfying the query condition from the specified data storage system, and sort, according to time information in the target data attribute including the same object ID, data source location information in the target data attribute including the same object ID to obtain a moving track corresponding to the object ID.
In one embodiment, each data attribute stored in the specified data storage system has a corresponding index, and the index corresponding to the data attribute comprises time information contained in the data attribute;
the query conditions include: a target time period; the movement track generation module comprises:
the target index query unit is used for querying a target index in a specified data storage system according to the target time period, and the time information in the target index is in the target time period;
a reference data attribute determining unit, configured to determine a data attribute corresponding to the target index as a reference data attribute;
and the target data attribute determining unit is used for determining the target data attribute from the reference data attributes.
In one embodiment, the target data attribute determining unit includes:
the selection subunit is used for selecting a target object ID from object IDs contained in all reference data attributes, wherein the number of the reference data attributes containing the target object ID in all the reference data attributes is greater than a preset number;
and the pulling subunit is configured to pull, from the specified data storage system, the reference data attribute including the target object ID in a Scroll manner as the target data attribute.
In one embodiment, the designated data storage system comprises at least two index storage segments, each index storage segment has a corresponding time period, and each index storage segment is used for storing indexes of which the time information is in the corresponding time period;
the target index query unit comprises:
the index storage segment determining subunit is used for determining a target index storage segment from the specified data storage system, wherein the time segment corresponding to the target index storage segment has an intersection with the target time segment;
and the target index inquiring subunit is used for inquiring the target index from the target index storage segment.
In one embodiment of the present invention,
the apparatus still further comprises:
the similarity calculation module is used for acquiring an externally input reference object ID, determining a reference movement track corresponding to the reference object ID, and calculating the similarity between the movement track corresponding to each object ID and the reference movement track;
and the moving track selecting module is used for selecting at least one moving track with the maximum similarity with the reference moving track from the moving tracks corresponding to the object IDs.
In one embodiment, the similarity calculation module includes:
the similarity calculation unit is used for determining a data attribute pair and a data attribute sum N according to the movement track and a reference movement track aiming at the movement track corresponding to each object ID, calculating the ratio of the number of the data attribute pairs to the N, and determining the similarity between the movement track and the reference movement track according to the ratio;
the data source position information included by one data attribute in each pair of data attribute pairs is in the moving track, the data source position information included by the other data attribute is in the reference moving track, the difference value of the time information in each pair of data attribute pairs is less than or equal to the specified time information, and the area identifications corresponding to the data source position information in each pair of data attribute pairs are the same; the sum of the data attributes is the sum of the number of the data attributes of the position information of each data source in the moving track and the reference moving track.
The implementation process of the functions and actions of each unit in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, wherein the units described as separate parts may or may not be physically separate, and the parts shown as units may or may not be physical units.
The invention also provides an electronic device, which comprises a processor and a memory; the memory stores a program that can be called by the processor; wherein the processor, when executing the program, implements the trajectory determination method as described in the foregoing embodiments.
The embodiment of the track determination device can be applied to electronic equipment. Taking a software implementation as an example, as a logical device, the device is formed by reading, by a processor of the electronic device where the device is located, a corresponding computer program instruction in the nonvolatile memory into the memory for operation. From a hardware aspect, as shown in fig. 3, fig. 3 is a hardware structure diagram of an electronic device where the trajectory determination apparatus 100 is located according to an exemplary embodiment of the present invention, and except for the processor 510, the memory 530, the interface 520, and the nonvolatile memory 540 shown in fig. 3, the electronic device where the apparatus 100 is located in the embodiment may also include other hardware generally according to the actual function of the electronic acquisition device, which is not described again.
The present invention also provides a machine-readable storage medium on which a program is stored, which when executed by a processor implements a trajectory determination method as described in any one of the preceding embodiments.
The present invention may take the form of a computer program product embodied on one or more storage media including, but not limited to, disk storage, CD-ROM, optical storage, and the like, having program code embodied therein. Machine-readable storage media include both permanent and non-permanent, removable and non-removable media, and the storage of information may be accomplished by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of machine-readable storage media include, but are not limited to: phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technologies, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic tape storage or other magnetic storage devices, or any other non-transmission medium, may be used to store information that may be accessed by a computing device.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (14)

1. A trajectory determination method, comprising:
extracting data attributes from different data sources, the data attributes including at least: the method comprises the following steps of (1) identifying an object ID of an object, acquiring time information of the object and position information of a data source;
storing each extracted data attribute to a designated data storage system;
receiving an inquiry condition input from the outside, inquiring a target data attribute meeting the inquiry condition from the specified data storage system according to the inquiry condition, and sequencing data source position information in the target data attribute comprising the same object ID according to time information in the target data attribute comprising the same object ID to obtain a moving track corresponding to the object ID.
2. The trajectory determination method of claim 1, wherein each data attribute stored in the specified data storage system has a corresponding index, and the index corresponding to the data attribute includes time information included in the data attribute;
the query conditions include: a target time period; inquiring the target data attribute meeting the inquiry condition from the specified data storage system according to the inquiry condition, wherein the inquiring comprises the following steps:
inquiring a target index in a specified data storage system according to the target time period, wherein time information in the target index is in the target time period;
determining the data attribute corresponding to the target index as a reference data attribute;
and determining the target data attribute from the reference data attributes.
3. The trajectory determination method of claim 2, wherein determining target data attributes from the reference data attributes comprises:
selecting a target object ID from object IDs contained in all reference data attributes, wherein the number of the reference data attributes containing the target object ID in all the reference data attributes is larger than a preset number;
and pulling the reference data attribute containing the target object ID from the specified data storage system by adopting a Scroll mode to serve as the target data attribute.
4. The trajectory determination method of claim 2, wherein the designated data storage system includes at least two index storage segments, each index storage segment having a corresponding time period, each index storage segment for storing an index having time information within the corresponding time period;
querying a target index in a specified data storage system according to the target time period, comprising:
determining a target index storage segment from the designated data storage system, wherein the time segment corresponding to the target index storage segment has an intersection with the target time segment;
and querying the target index from the target index storage segment.
5. The trajectory determination method of claim 1, further comprising:
acquiring an externally input reference object ID, determining a reference movement track corresponding to the reference object ID, and calculating the similarity between the movement track corresponding to each object ID and the reference movement track;
and selecting at least one movement track with the maximum similarity with the reference movement track from the movement tracks corresponding to the object IDs.
6. The trajectory determination method according to claim 5, wherein the calculating of the similarity between the movement trajectory corresponding to each object ID and the reference movement trajectory includes:
aiming at the moving track corresponding to each object ID, determining a data attribute pair and a data attribute sum N according to the moving track and a reference moving track, calculating the ratio of the number of the data attribute pairs to the N, and determining the similarity between the moving track and the reference moving track according to the ratio;
the data source position information included by one data attribute in each pair of data attribute pairs is in the moving track, the data source position information included by the other data attribute is in the reference moving track, the difference value of the time information in each pair of data attribute pairs is less than or equal to the specified time information, and the area identifications corresponding to the data source position information in each pair of data attribute pairs are the same; the sum of the data attributes is the sum of the number of the data attributes of the position information of each data source in the moving track and the reference moving track.
7. A trajectory determination device, comprising:
a data attribute extraction module, configured to extract data attributes from different data sources, where the data attributes at least include: the method comprises the following steps of (1) identifying an object ID of an object, acquiring time information of the object and position information of a data source;
the data attribute storage module is used for storing each extracted data attribute to a specified data storage system;
and the moving track generating module is used for receiving an inquiry condition input from the outside, inquiring the target data attribute meeting the inquiry condition from the specified data storage system according to the inquiry condition, and sequencing the data source position information in the target data attribute comprising the same object ID according to the time information in the target data attribute comprising the same object ID to obtain a moving track corresponding to the object ID.
8. The trajectory determination device of claim 7, wherein each data attribute stored in the specified data storage system has a corresponding index, the index corresponding to a data attribute including time information included in the data attribute;
the query conditions include: a target time period; the movement track generation module comprises:
the target index query unit is used for querying a target index in a specified data storage system according to the target time period, and the time information in the target index is in the target time period;
a reference data attribute determining unit, configured to determine a data attribute corresponding to the target index as a reference data attribute;
and the target data attribute determining unit is used for determining the target data attribute from the reference data attributes.
9. The trajectory determination device of claim 8, wherein the target data attribute determination unit includes:
the selection subunit is used for selecting a target object ID from object IDs contained in all reference data attributes, wherein the number of the reference data attributes containing the target object ID in all the reference data attributes is greater than a preset number;
and the pulling subunit is configured to pull, from the specified data storage system, the reference data attribute including the target object ID in a Scroll manner as the target data attribute.
10. The trajectory determination device of claim 8, wherein the designated data storage system includes at least two index storage segments, each index storage segment having a corresponding time period, each index storage segment for storing an index having time information within the corresponding time period;
the target index query unit comprises:
the index storage segment determining subunit is used for determining a target index storage segment from the specified data storage system, wherein the time segment corresponding to the target index storage segment has an intersection with the target time segment;
and the target index inquiring subunit is used for inquiring the target index from the target index storage segment.
11. The trajectory determination device of claim 7,
the apparatus still further comprises:
the similarity calculation module is used for acquiring an externally input reference object ID, determining a reference movement track corresponding to the reference object ID, and calculating the similarity between the movement track corresponding to each object ID and the reference movement track;
and the moving track selecting module is used for selecting at least one moving track with the maximum similarity with the reference moving track from the moving tracks corresponding to the object IDs.
12. The trajectory determination device of claim 11, wherein the similarity calculation module comprises:
the similarity calculation unit is used for determining a data attribute pair and a data attribute sum N according to the movement track and a reference movement track aiming at the movement track corresponding to each object ID, calculating the ratio of the number of the data attribute pairs to the N, and determining the similarity between the movement track and the reference movement track according to the ratio;
the data source position information included by one data attribute in each pair of data attribute pairs is in the moving track, the data source position information included by the other data attribute is in the reference moving track, the difference value of the time information in each pair of data attribute pairs is less than or equal to the specified time information, and the area identifications corresponding to the data source position information in each pair of data attribute pairs are the same; the sum of the data attributes is the sum of the number of the data attributes of the position information of each data source in the moving track and the reference moving track.
13. An electronic device comprising a processor and a memory; the memory stores a program that can be called by the processor; wherein the processor, when executing the program, implements the trajectory determination method as defined in any one of claims 1 to 6.
14. A machine-readable storage medium, having stored thereon a program which, when executed by a processor, carries out the trajectory determination method according to any one of claims 1 to 6.
CN201910555349.4A 2019-06-25 2019-06-25 Track determination method, device and equipment and storage medium Pending CN112131325A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910555349.4A CN112131325A (en) 2019-06-25 2019-06-25 Track determination method, device and equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910555349.4A CN112131325A (en) 2019-06-25 2019-06-25 Track determination method, device and equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112131325A true CN112131325A (en) 2020-12-25

Family

ID=73849566

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910555349.4A Pending CN112131325A (en) 2019-06-25 2019-06-25 Track determination method, device and equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112131325A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112925948A (en) * 2021-02-05 2021-06-08 上海依图网络科技有限公司 Video processing method and device, medium, chip and electronic equipment thereof
CN112948531A (en) * 2021-04-02 2021-06-11 方正国际软件(北京)有限公司 Massive track query method, retrieval server and system
CN113312360A (en) * 2021-07-28 2021-08-27 阿里云计算有限公司 Index establishing method, device, equipment, storage medium and computer program product
CN113421064A (en) * 2021-06-30 2021-09-21 中国航空油料有限责任公司 Control method, device, equipment and medium for aircraft refueling truck
CN115795115A (en) * 2023-02-11 2023-03-14 云南师范大学 Multi-track set similarity searching method based on graph storage
WO2023050785A1 (en) * 2021-09-30 2023-04-06 京东城市(北京)数字科技有限公司 Trajectory data processing method and apparatus, and computer device and storage medium
CN116824866A (en) * 2023-08-29 2023-09-29 武汉中科通达高新技术股份有限公司 Analysis methods, systems and media for accompanying vehicles based on time and geographical factors

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105006031A (en) * 2015-06-18 2015-10-28 深圳市润安科技发展有限公司 Supervisor motion trail inquiry method and system
CN105242882A (en) * 2015-10-13 2016-01-13 东方网力科技股份有限公司 Frame storage method and apparatus for timing data and query method and apparatus for timing data
CN109165215A (en) * 2018-07-27 2019-01-08 苏州视锐信息科技有限公司 Construction method, device and the electronic equipment of temporal index under a kind of cloud environment
CN109542997A (en) * 2018-11-23 2019-03-29 成都四方伟业软件股份有限公司 Motion profile display methods and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105006031A (en) * 2015-06-18 2015-10-28 深圳市润安科技发展有限公司 Supervisor motion trail inquiry method and system
CN105242882A (en) * 2015-10-13 2016-01-13 东方网力科技股份有限公司 Frame storage method and apparatus for timing data and query method and apparatus for timing data
CN109165215A (en) * 2018-07-27 2019-01-08 苏州视锐信息科技有限公司 Construction method, device and the electronic equipment of temporal index under a kind of cloud environment
CN109542997A (en) * 2018-11-23 2019-03-29 成都四方伟业软件股份有限公司 Motion profile display methods and device

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112925948A (en) * 2021-02-05 2021-06-08 上海依图网络科技有限公司 Video processing method and device, medium, chip and electronic equipment thereof
CN112948531A (en) * 2021-04-02 2021-06-11 方正国际软件(北京)有限公司 Massive track query method, retrieval server and system
CN112948531B (en) * 2021-04-02 2023-12-15 方正国际软件(北京)有限公司 Massive track query method, retrieval server and system
CN113421064A (en) * 2021-06-30 2021-09-21 中国航空油料有限责任公司 Control method, device, equipment and medium for aircraft refueling truck
CN113312360A (en) * 2021-07-28 2021-08-27 阿里云计算有限公司 Index establishing method, device, equipment, storage medium and computer program product
CN113312360B (en) * 2021-07-28 2022-01-04 阿里云计算有限公司 Index establishing method, device, equipment, storage medium and computer program product
WO2023050785A1 (en) * 2021-09-30 2023-04-06 京东城市(北京)数字科技有限公司 Trajectory data processing method and apparatus, and computer device and storage medium
CN115795115A (en) * 2023-02-11 2023-03-14 云南师范大学 Multi-track set similarity searching method based on graph storage
CN115795115B (en) * 2023-02-11 2023-05-02 云南师范大学 Multi-track set similarity searching method based on graph storage
CN116824866A (en) * 2023-08-29 2023-09-29 武汉中科通达高新技术股份有限公司 Analysis methods, systems and media for accompanying vehicles based on time and geographical factors
CN116824866B (en) * 2023-08-29 2024-01-02 武汉中科通达高新技术股份有限公司 Companion vehicle analysis method, system and medium based on time and geographic factors

Similar Documents

Publication Publication Date Title
CN112131325A (en) Track determination method, device and equipment and storage medium
US9542620B1 (en) Locating persons of interest based on license plate recognition information
US9542653B1 (en) Vehicle prediction and association tool based on license plate recognition
Ta et al. Signature-based trajectory similarity join
Garcıa et al. CrimAnalyzer: Understanding crime patterns in são paulo
CN111930868A (en) Big data behavior trajectory analysis method based on multi-dimensional data acquisition
CN111476183A (en) Passenger flow information processing method and device
Yan et al. Towards Semantic Trajectory Data Analysis: A Conceptual and Computational Approach.
Witayangkurn et al. Anomalous event detection on large-scale gps data from mobile phones using hidden markov model and cloud platform
CN111738558B (en) Visualization method, device, equipment and storage medium for behavior risk identification
EP3479270B1 (en) Incident response analytic maps
CN113094388B (en) Method and related device for detecting user workplace and residence
CN109376178A (en) Space-time big data trajectory analysis platform, method, server and storage medium
CN107749164B (en) Vehicle aggregation analysis method and device
CN111008255A (en) Method and device for identifying violation location, electronic equipment and storage medium
CN105760548A (en) Vehicle first appearance analysis method and system based on big data cross-domain comparison
CN114970621A (en) Method and device for detecting abnormal aggregation event, electronic equipment and storage medium
CN110322688A (en) A kind of method of data processing, the method for data query and relevant device
Wu et al. GLUE: a parameter-tuning-free map updating system
CN110851431A (en) Data processing method and device for data center station
Bakkal et al. Modeling and querying trajectories using Neo4j spatial and TimeTree for carpool matching
Ying et al. Cluster-based congestion outlier detection method on trajectory data
CN109471907B (en) Traffic law analysis system and method based on checkpoint data
Muller et al. City-wide perceptions of neighbourhood quality using street view images
CN116610849A (en) Method, device, equipment and storage medium for acquiring moving objects with similar trajectories

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