Data processing method and device, computer readable storage medium and computer equipment

文档序号:1963839 发布日期:2021-12-14 浏览:23次 中文

阅读说明:本技术 数据处理方法、装置、计算机可读存储介质及计算机设备 (Data processing method and device, computer readable storage medium and computer equipment ) 是由 杨帆 于 2021-09-09 设计创作,主要内容包括:本发明实施例公开了一种数据处理方法、装置、计算机可读存储介质及计算机设备,本方法可以使用于地图领域,通过获取目标对象的相关信息以及获取地块单元数据;根据相关信息生成目标对象的多个停留点簇;基于定位数据确定每一停留点簇对应的地块单元集合;对地块单元集合中的地块单元进行联合处理,得到目标对象对应的目标区域。以此,通过从目标对象的相关信息自动确定目标对象的停留区域对应的信息,并结合停留区域对应的信息和按照地理画像信息进行划分的地块单元确定目标对象对应的目标区域。该方法可以提高数据处理的效率。(The embodiment of the invention discloses a data processing method, a data processing device, a computer readable storage medium and computer equipment, wherein the method can be used in the field of maps and can be used for acquiring relevant information of a target object and acquiring plot unit data; generating a plurality of stop point clusters of the target object according to the related information; determining a plot unit set corresponding to each stop point cluster based on the positioning data; and carrying out joint processing on the plot units in the plot unit set to obtain a target area corresponding to the target object. Therefore, the information corresponding to the staying area of the target object is automatically determined from the related information of the target object, and the target area corresponding to the target object is determined by combining the information corresponding to the staying area and the plot unit divided according to the geographic portrait information. The method can improve the efficiency of data processing.)

1. A method of data processing, the method comprising:

acquiring track data of a target object and acquiring plot unit data, wherein the track data comprises positioning data and time data corresponding to a plurality of track points of the target object;

generating a plurality of stop point clusters of the target object according to the track data, wherein the stop point clusters are composed of a plurality of track points with aggregation density larger than a preset threshold value;

determining a plot unit set corresponding to each stop point cluster based on the positioning data and the plot unit data;

and carrying out joint processing on the plot units in the plot unit set to obtain a target area corresponding to the target object.

2. The method of claim 1, wherein generating a plurality of clusters of dwell points for the target object from the trajectory data comprises:

determining a plurality of track point sets consisting of time-continuous track points according to a preset time threshold and the time data, wherein the maximum time span between the track points in the track point sets is larger than the preset time threshold;

calculating the spatial distance between any two track points in each track point set to obtain a spatial distance data set corresponding to each track point set;

determining the characteristic length of each track point set according to the maximum value in each space distance data set;

and determining a track point set with the characteristic length smaller than a preset length threshold value as a stop point cluster of the target object to obtain a plurality of stop point clusters.

3. The method according to claim 2, wherein the calculating a spatial distance between any two trace points in each trace point set to obtain a spatial distance data set corresponding to each trace point set includes:

acquiring the number of trace points in each trace point set;

when the number of the track points in the track point set is smaller than a preset number threshold, calculating the spatial distance between any two track points in the track point set to obtain a spatial distance data set corresponding to the track point set;

when the number of the track points in the track point set is larger than or equal to a preset number threshold, determining a minimum convex polygon containing each track point in the track point set in space, calculating a space distance between any two track points at the edge of the convex polygon, and obtaining a space distance data set corresponding to the track point set.

4. The method of claim 1, wherein the determining the set of parcel units corresponding to each cluster of stop points based on the positioning data and the parcel unit data comprises:

generating a minimum convex polygon which spatially contains each track point in the corresponding stop point cluster based on the positioning data of the track point contained in each stop point cluster to obtain a convex hull corresponding to each stop point cluster;

searching a plurality of land parcel units intersected with any one target convex hull to obtain a first land parcel unit set corresponding to each convex hull;

calculating the intersection area between each block unit in the first block unit set and the corresponding convex hull;

and determining the land units with the intersection areas meeting the preset conditions as target land units corresponding to the stop point clusters to obtain a land unit set corresponding to each stop point cluster.

5. The method according to claim 4, wherein the determining the block units with intersection areas meeting the preset condition as the target block units of the corresponding stop point clusters to obtain the block unit set corresponding to each stop point cluster comprises:

when a target block unit with the ratio of the intersection area to the reference area larger than a preset ratio exists, generating a block unit set corresponding to the stop point cluster according to the target block unit, wherein the reference area is the minimum value of the area of the block unit and the area of the corresponding convex hull;

and when no plot unit with the ratio of the intersection area to the reference area larger than the preset ratio exists, determining the plot unit with the largest intersection area with the corresponding convex hull as a target plot unit, and generating a plot unit set corresponding to the stop point cluster according to the target plot unit.

6. The method according to claim 1, wherein the jointly processing the parcel units in the parcel unit set to obtain the target area corresponding to the target object comprises:

calculating a union set of the plot unit sets to obtain a target plot unit set corresponding to the target object;

extracting continuously communicated plot units from the target plot unit set to obtain a plurality of sub-target plot unit sets;

and performing combined processing on the plot units in each sub-target plot unit set to obtain a plurality of target areas corresponding to the target object.

7. The method of claim 6, wherein the extracting the contiguous set of parcel units from the target set of parcel units to obtain a plurality of sub-target sets of parcel units comprises:

amplifying each plot unit in the target plot unit set according to a preset size to obtain an amplified plot unit;

generating an adjacent matrix corresponding to the target plot unit set according to the intersection relation among the enlarged plot units;

generating an adjacency relation graph among the land units in the target land unit set based on the adjacency matrix;

extracting a plurality of maximum connected subgraphs from the adjacency graph;

and determining a plurality of sub-target block unit sets according to the plurality of maximum connected subgraphs.

8. The method of claim 7, wherein the jointly processing the parcel units in each sub-target parcel unit set to obtain a plurality of target areas corresponding to the target object comprises:

amplifying each plot unit in each sub-target plot unit set according to a preset size to obtain an amplified plot unit corresponding to each sub-target plot unit set;

overlapping the amplified plot units corresponding to each sub-target plot unit set on the space to obtain a plurality of space areas;

and reducing each space area according to a preset size to obtain a plurality of target areas corresponding to the target object.

9. A data processing apparatus, characterized in that the apparatus comprises:

the system comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring track data of a target object and acquiring plot unit data, and the track data comprises positioning data and time data corresponding to a plurality of track points of the target object;

the generating unit is used for generating a plurality of stop point clusters of the target object according to the track data, wherein the stop point clusters are composed of a plurality of track points with aggregation density larger than a preset threshold value;

a determining unit, configured to determine, based on the positioning data and the block unit data, a block unit set corresponding to each stop point cluster;

and the combining unit is used for performing combining processing on the plot units in the plot unit set to obtain a target area corresponding to the target object.

10. The apparatus of claim 9, wherein the generating unit comprises:

the first determining subunit is configured to determine, according to a preset time threshold and the time data, a plurality of track point sets composed of track points that are continuous in time, where a maximum time span between track points in the track point sets is greater than the time threshold;

the first calculating subunit is used for calculating the spatial distance between any two track points in each track point set to obtain a spatial distance data set corresponding to each track point set;

the second determining subunit is used for determining the representation length of each track point set according to the maximum value in each spatial distance data set;

and the third determining subunit is used for determining the track point set with the characteristic length smaller than the preset length as the stop point cluster of the target object to obtain a plurality of stop point clusters.

11. The apparatus of claim 10, wherein the computing subunit comprises:

the acquisition module is used for acquiring the number of the track points in each track point set;

the calculating module is used for calculating the spatial distance between any two track points in the track point set when the number of the track points in the track point set is smaller than a preset number threshold value, so as to obtain a spatial distance data set corresponding to the track point set;

and the determining module is used for determining the minimum convex polygon containing each track point in the track point set in space when the number of the track points in the track point set is greater than or equal to a preset number threshold, calculating the space distance between any two track points at the edge of the convex polygon, and obtaining a space distance data set corresponding to the track point set.

12. The apparatus of claim 9, wherein the determining unit comprises:

the generating subunit is used for generating a minimum convex polygon which spatially contains each trace point in the corresponding stop point cluster based on the positioning data of the trace point contained in each stop point cluster, so as to obtain a convex hull corresponding to each stop point cluster;

the searching subunit is used for searching a plurality of land parcel units intersected with any one target convex hull to obtain a first land parcel unit set corresponding to each convex hull;

the second calculating subunit is used for calculating the intersection area between each land block unit in the first land block unit set and the corresponding convex hull;

and the fourth determining subunit is used for determining the land units with the intersection areas meeting the preset conditions as the target land units of the corresponding stop point clusters to obtain a land unit set corresponding to each stop point cluster.

13. A computer-readable storage medium, characterized in that it stores a plurality of instructions adapted to be loaded by a processor for performing the steps of the data processing method according to any one of claims 1 to 8.

14. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the data processing method of any one of claims 1 to 8 when executing the computer program.

15. A computer program, characterized in that it comprises computer instructions stored in a storage medium, which computer instructions are read from by a processor of a computer device, the processor executing the computer instructions, causing the computer device to carry out the steps of the data processing method according to any one of claims 1 to 8.

Technical Field

The present invention relates to the field of data processing technologies, and in particular, to a data processing method and apparatus, a computer-readable storage medium, and a computer device.

Background

Determining a target area corresponding to an object Based on related information of the object is a common task in a Service (Location Based Service) that is deployed around a geographic Location, and has an important meaning for characterizing the geographic image of the object and the area.

Currently, to determine a target area corresponding to an object, related information of the object is generally marked on a map or an electronic map, and then the target area corresponding to the object is manually determined according to the related information of the object marked on the map.

However, the target area corresponding to the object is determined manually according to the related information of the object marked on the map, which is poor in accuracy and low in efficiency.

Disclosure of Invention

Embodiments of the present application provide a data processing method, an apparatus, a computer-readable storage medium, and a computer device, which can improve data processing efficiency, and further can improve determination efficiency of a target area corresponding to a target object.

A first aspect of the present application provides a data processing method, including:

acquiring track data of a target object and acquiring plot unit data, wherein the track data comprises positioning data and time data corresponding to a plurality of track points of the target object;

generating a plurality of stop point clusters of the target object according to the track data, wherein the stop point clusters are composed of a plurality of track points with aggregation density larger than a preset threshold value;

determining a plot unit set corresponding to each stop point cluster based on the positioning data and the plot unit data;

and carrying out joint processing on the plot units in the plot unit set to obtain a target area corresponding to the target object.

Accordingly, a second aspect of the present application provides a data processing apparatus comprising:

the system comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring track data of a target object and acquiring plot unit data, and the track data comprises positioning data and time data corresponding to a plurality of track points of the target object;

the generating unit is used for generating a plurality of stop point clusters of the target object according to the track data, wherein the stop point clusters are composed of a plurality of track points with aggregation density larger than a preset threshold value;

a determining unit, configured to determine, based on the positioning data, a set of parcel units corresponding to each of the stop point clusters;

and the combining unit is used for performing combining processing on the plot units in the plot unit set to obtain a target area corresponding to the target object.

In some embodiments, the generating unit includes:

the first determining subunit is configured to determine, according to a preset time threshold and the time data, a plurality of track point sets composed of track points that are continuous in time, where a maximum time span between track points in the track point sets is greater than the preset time threshold;

the first calculating subunit is used for calculating the spatial distance between any two track points in each track point set to obtain a spatial distance data set corresponding to each track point set;

the second determining subunit is used for determining the representation length of each track point set according to the maximum value in each spatial distance data set;

and the third determining subunit is used for determining the track point set with the characteristic length smaller than the preset length threshold as the stop point cluster of the target object to obtain a plurality of stop point clusters.

In some embodiments, the calculation subunit includes:

the acquisition module is used for acquiring the number of the track points in each track point set;

the calculating module is used for calculating the spatial distance between any two track points in the track point set when the number of the track points in the track point set is smaller than a preset number threshold value, so as to obtain a spatial distance data set corresponding to the track point set;

the first determining module is used for determining a minimum convex polygon containing each track point in the track point set in space when the number of the track points in the track point set is larger than or equal to a preset number threshold, calculating the space distance between any two track points at the edge of the convex polygon, and obtaining a space distance data set corresponding to the track point set.

In some embodiments, the determining unit includes:

the generating subunit is used for generating a minimum convex polygon which spatially contains each trace point in the corresponding stop point cluster based on the positioning data of the trace point contained in each stop point cluster, so as to obtain a convex hull corresponding to each stop point cluster;

the searching subunit is used for searching a plurality of land parcel units intersected with any one target convex hull to obtain a first land parcel unit set corresponding to each convex hull;

the second calculating subunit is used for calculating the intersection area between each land block unit in the first land block unit set and the corresponding convex hull;

and the fourth determining subunit is used for determining the land units with the intersection areas meeting the preset conditions as the target land units of the corresponding stop point clusters to obtain a land unit set corresponding to each stop point cluster.

In some embodiments, the fourth determining subunit includes:

the system comprises a first generation module, a second generation module and a third generation module, wherein the first generation module is used for generating a plot unit set corresponding to a stop point cluster according to a target plot unit when the target plot unit exists, and the ratio of an intersection area to a reference area is larger than a preset ratio, and the reference area is the minimum value of the area of the plot unit and the area of a corresponding convex hull;

and the second determining module is used for determining the block unit with the largest intersection area corresponding to the convex hull as a target block unit when the block unit with the ratio of the intersection area to the reference area larger than the preset ratio does not exist, and generating a block unit set corresponding to the stop point cluster according to the target block unit.

In some embodiments, the union unit comprises:

the third calculation subunit is used for calculating a union set of the plot unit sets to obtain a target plot unit set corresponding to the target object;

the extraction subunit is used for extracting the continuously communicated plot units from the target plot unit set to obtain a plurality of sub-target plot unit sets;

and the joint subunit is used for performing joint processing on the plot units in each sub-target plot unit set to obtain a plurality of target areas corresponding to the target object.

In some embodiments, the extraction subunit includes:

the first amplification module is used for amplifying each plot unit in the target plot unit set according to a preset size to obtain an amplified plot unit;

the second generation module is used for generating an adjacent matrix corresponding to the target block unit set according to the intersection relation among the amplified block units;

a third generation module, configured to generate an adjacency relation graph between the block units in the target block unit set based on the adjacency matrix;

the extraction module is used for extracting a plurality of maximum connected subgraphs from the adjacency graph;

and the third determining module is used for determining a plurality of sub-target block unit sets according to the plurality of maximum connected subgraphs.

In some embodiments, the union subunit comprises:

the second amplification module is used for amplifying each plot unit in each sub-target plot unit set according to a preset size to obtain an amplified plot unit corresponding to each sub-target plot unit set;

the superposition module is used for superposing the amplified plot units corresponding to each sub-target plot unit set on the space to obtain a plurality of space areas;

and the reducing module is used for reducing each space area according to a preset size to obtain a plurality of target areas corresponding to the target object.

The third aspect of the present application further provides a computer-readable storage medium, which stores a plurality of instructions adapted to be loaded by a processor to perform the steps of the data processing method provided in the first aspect of the present application.

A fourth aspect of the present application provides a computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the data processing method provided in the first aspect of the present application when executing the computer program.

A fifth aspect of the present application provides a computer program product or computer program comprising computer instructions stored in a storage medium. The processor of the computer device reads the computer instructions from the storage medium, and executes the computer instructions, so that the computer device executes the steps of the data processing method provided by the first aspect.

According to the data processing method provided by the embodiment of the application, the track data of the target object and the plot unit data are obtained, wherein the track data comprise positioning data and time data corresponding to a plurality of track points of the target object; generating a plurality of stop point clusters of the target object according to the track data, wherein each stop point cluster consists of a plurality of track points with the aggregation density larger than a preset threshold value; determining a plot unit set corresponding to each stop point cluster based on the positioning data and the plot unit data; and carrying out joint processing on the plot units in the plot unit set to obtain a target area corresponding to the target object. Therefore, the track data corresponding to the staying area of the target object is automatically determined from the track data of the target object, and the staying area of the target object with the spatial semantics is determined by combining the track data corresponding to the staying area and the plot unit divided according to the geographical portrait information. The method can improve the efficiency of data processing, thereby improving the efficiency of determining the target area corresponding to the target object.

Drawings

In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used 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 invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.

FIG. 1 is a schematic diagram of a scenario of data processing in the present application;

FIG. 2 is a schematic flow chart diagram of a data processing method provided herein;

FIG. 3 is another schematic flow chart diagram of a data processing method provided herein;

FIG. 4 is a diagram illustrating a scenario for determining a region of constant user activity;

FIG. 5 is a schematic diagram of a data processing apparatus provided in the present application;

fig. 6 is a schematic structural diagram of a computer device provided in the present application.

Detailed Description

The technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.

The embodiment of the invention provides a data processing method, a data processing device, a computer readable storage medium and computer equipment. The data processing method can be used in a data processing device. The data processing device may be integrated in a computer device, which may be a terminal or a server. The terminal can be a mobile phone, a tablet Computer, a notebook Computer, an intelligent television, a wearable intelligent device, a Personal Computer (PC), and the like. The server may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing basic cloud computing services such as cloud service, a cloud database, cloud computing, a cloud function, cloud storage, Network service, cloud communication, middleware service, domain name service, security service, Network acceleration service (CDN), big data and an artificial intelligence platform. Wherein a server may be a node in a blockchain.

Please refer to fig. 1, which is a schematic view of a scene of data processing provided by the present application; as shown in the figure, the computer device a acquires trajectory data of the target object and acquires parcel unit data, where the trajectory data includes positioning data and time data corresponding to a plurality of trajectory points of the target object; generating a plurality of stop point clusters of the target object according to the track data, wherein each stop point cluster consists of a plurality of track points with the aggregation density larger than a preset threshold value; determining a plot unit set corresponding to each stop point cluster based on the positioning data; and carrying out joint processing on the plot units in the plot unit set to obtain a target area corresponding to the target object.

It should be noted that the scenario diagram of data processing shown in fig. 1 is only an example, and the data processing scenario described in the embodiment of the present application is for more clearly illustrating the technical solution of the present application, and does not constitute a limitation on the technical solution provided by the present application. As will be appreciated by those skilled in the art, with the evolution of data processing and the emergence of new business scenarios, the technical solutions provided in the present application are equally applicable to similar technical problems.

Based on the above-described implementation scenarios, detailed descriptions will be given below.

Embodiments of the present application will be described from the perspective of a data processing apparatus, which may be integrated in a computer device. The computer device may be a terminal or a server. The terminal can be a mobile phone, a tablet Computer, a notebook Computer, an intelligent television, a wearable intelligent device, a Personal Computer (PC), and the like. The server may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing basic cloud computing services such as cloud service, a cloud database, cloud computing, a cloud function, cloud storage, Network service, cloud communication, middleware service, domain name service, security service, Network acceleration service (CDN), big data and an artificial intelligence platform. As shown in fig. 2, a schematic flow chart of a data processing method provided in the present application is shown, where the method includes:

step 101, obtaining trajectory data of a target object and obtaining plot unit data.

Wherein, the target object can be a target person, such as a small sheet or a small bright; target animals such as elephants, rabbits, tigers; but also target objects such as cars, robots, etc. That is, the target object may be anything that can move and that can perform trajectory data acquisition.

The trajectory data of the target object may be obtained according to positioning data collected by positioning equipment carried by the target object, or according to an application program with a positioning function in a mobile terminal carried by the target object, or may be obtained through positioning data collected by a position collecting device (such as a monitoring camera). When the positioning data is used for acquiring the track data of the target object, privacy protection processing can be strictly carried out, and the unique identification information of the target object is irreversibly encrypted. In the scheme of the application, the track data can be strictly protected. Further, the trajectory data of the target object may be data that is collected and used upon obtaining user authorization. The track data of the target object can be acquired once according to each preset time; the positioning data of the position can also be obtained according to the staying behavior of the target object, namely when the staying time of the target object at a certain position reaches the preset time length, the positioning data of the position can be obtained.

The trajectory data of the target object may include not only the positioning data of the target object, but also the time point data acquired corresponding to each positioning data. Specifically, the time point data may be a timestamp corresponding to the positioning data acquisition time. Each positioning data and its corresponding time stamp constitute a time point, so the trajectory data of the target object comprises a plurality of time points, where for the purpose of distinguishing from other "plurality" in this application, the "plurality" may be determined as the first number. The trajectory data of the target object may be trajectory data of a period of time, and the specific period of time may be determined according to needs, which is not limited herein. The trajectory data of the target object in the time period can form a trajectory point sequence according to the time sequence of each trajectory point.

The plot unit data may be data corresponding to each plot in an active region including the target object, specifically, data corresponding to each plot in a target region including each trace point, and the target region may set a larger region as the target region as required. The tile unit data includes location data of each tile unit and edge data, and the location data of the tile unit may be coordinate data of a center of the tile unit.

In some embodiments, obtaining the parcel unit data comprises: and dividing a preset geographical area containing each track point into a plurality of block units with geographical boundaries and corresponding geographical portrait information.

Wherein, the preset geographical area that contains each track point can be for containing the minimum convex polygon geographic space of the location position of each track point on geographic space, and the location position of each track point is all in this geographic space. The preset geographical area may also be a regular polygon containing each trace point, such as a square, a rectangle, or a regular hexagon. On the other hand, the preset geographic area may also be an administrative division space containing each track point. For example, if the track points of the target object are distributed in various regions of Shenzhen city, then it can be determined that the preset geographic region is the entire administrative division space of Shenzhen city. Of course, the preset geographic area may be a larger administrative division space, and may be set to, for example, guangdong province or all china, as long as all the track points of the target object are included.

After the predetermined geographic area is determined, the predetermined geographic area may be further divided to obtain a plurality of parcel units, where the plurality may be a second number. The second number is not related to the first number, and may be equal to or different from the first number.

The preset geographic area is divided, and the division can be performed according to the space semantics of the land parcel. In particular, the spatial semantics of a parcel mean that the parcel has individual geographical imagery information. For example, a certain plot is an a park area, a B cell area, a C mall area, a D school area, or an E block. The regions of the above examples all have distinct geographic boundaries and have distinct and separate geographic portrait information. The geographical boundary of each of the above-mentioned parcel units may be obtained from the base map data of the electronic map corresponding to the preset geographical area. Based on the geographic boundaries, a preset geographic area may be divided into a second number of parcel units. Further, after the second number of plot units are obtained by division, the geographical image information of each plot unit, which may also be referred to as description information, may also be acquired from the base map data of the electronic map.

In the embodiment of the application, a preset geographic area is divided according to the spatial semantics of the land parcel to obtain a plurality of land parcel units, so that the land parcel units obtained by division have semantics, and each land parcel unit has a piece of clear description information. Therefore, the description result obtained when the trajectory of the target object is described by adopting the land parcel units also has semantics, so that the description result can adapt to the use of more scenes.

Step 102, generating a plurality of stop point clusters of the target object according to the track data.

The point cluster can be a set of points composed of a plurality of points, and the stop point cluster can be a set of continuous track points of which the aggregation density of the continuous track points of the target object in a certain period reaches a preset density. E.g. at t1Time tnThe target object generates n track points at the moment, the concentration density of the n track points reaches the preset density, and t1Time tn+1And if the aggregation density of the n +1 track points at the moment does not reach the preset density, determining that the n track points form a stop point cluster. It is understood that the number of the cluster of the target object may be 1 or more. Here, in order to distinguish from the foregoing, the number of the cluster of the stop points of the target object may be determined to be the third number.

In some embodiments, generating a third number of clusters of dwell points for the target object from the trajectory data comprises:

1. determining a plurality of track point sets consisting of time-continuous track points according to a preset time threshold and time data, wherein the maximum time span between the track points in the track point sets is larger than the preset time threshold;

2. calculating the spatial distance between any two track points in each track point set to obtain a spatial distance data set corresponding to each track point set;

3. determining the characteristic length of each track point set according to the maximum value in each space distance data set;

4. and determining a track point set with the characteristic length smaller than a preset length threshold value as a stop point cluster of the target object to obtain a third number of stop point clusters.

In the embodiment of the present application, a specific method for generating a dwell point cluster is provided. Wherein, before generating a cluster of stop points of a target object, determining a spatio-temporal threshold satisfying the cluster of stop points. The spatiotemporal threshold may include a temporal threshold and a spatial threshold, where the temporal threshold may be a preset time period, and the spatial threshold may be a preset length threshold. Here, the spatiotemporal threshold may be set in advance, and is not limited here.

After the preset time threshold is determined, a set of consecutive track points having a time span greater than the preset time threshold may be determined from the track data. The continuous track points can be continuous track points in time. Specifically, as previously described, the trajectory data of the target object may generate a sequence of trajectory points in chronological order, assuming that the sequence of trajectory points contains t0Time tmThe time totals m +1 trace points, then for any two of these times taTime tbAnd (3) time, if the time difference between the two times is greater than the preset time threshold, all b-a +1 track points between the two times can form a track point set. The number of the trace point sets satisfying the above condition may be 0,1, or multiple.

After a plurality of track point sets with time span larger than a preset time threshold are determined, a corresponding representation radius of each track point set is calculated. The corresponding characteristic radius of the track point set can be the maximum value of the distance between any two track points in the track point set. Specifically, for any target track point set, the distance between any two track points in the set can be calculated to obtain a plurality of distance data, and a spatial distance data set corresponding to the track point set is formed. Then, the maximum value in the plurality of distance data is determined as the corresponding characteristic radius of the target track point set. Then, traversing all track point sets to obtain the corresponding representation radiuses of all track point sets. Herein, the characteristic radius may also be referred to as a characteristic length.

Further, the characteristic length corresponding to each track point set is compared with a length threshold, where the length threshold may be a preset length, and when the characteristic length of the target track point set is smaller than the preset length, the target track point set is determined to be a stop point cluster of the target object. And then traversing each trace point set, determining a plurality of trace point sets with the characteristic length smaller than the preset length, and obtaining a third number of stop point clusters corresponding to the target object.

In some embodiments, calculating a spatial distance between any two trace points in each trace point set to obtain a spatial distance data set corresponding to each trace point set includes:

2.1, acquiring the number of track points in each track point set;

2.2, when the number of the track points in the track point set is smaller than a preset number threshold, calculating the spatial distance between any two track points in the track point set to obtain a spatial distance data set corresponding to the track point set;

and 2.3, when the number of the track points in the track point set is greater than or equal to a preset number threshold, determining a minimum convex polygon containing each track point in the track point set in space, calculating the space distance between any two track points at the edge of the convex polygon, and obtaining a space distance data set corresponding to the track point set.

In the embodiment of the application, before calculating the spatial distance between any two trace points in each trace point set and obtaining the spatial distance data set corresponding to each trace point set, the number of trace points in the trace point set can be obtained first. After the number of trace points in each trace point set is obtained, the number of trace points in each trace point set can be compared with a preset number threshold. When the number of the track points in the track point set is smaller than a preset number threshold, the calculation amount for directly calculating the space distance between every two track points is not large, the space distance between every two track points in the track point set can be directly calculated, and the space distance data set corresponding to the track point set is obtained. When the number of the trace points in the trace point set is larger than or equal to the preset number threshold, the calculation amount for directly calculating the space distance between every two trace points is large, so that the method for reducing the calculation amount and improving the calculation speed is provided.

Specifically, when the number of the trace points in the trace point set is greater than or equal to a preset number threshold, a minimum convex polygon including each trace point in the trace point set in space is determined, and a convex hull corresponding to each trace point set is obtained. For ease of understanding, a convex hull can be understood as a rubber band that encloses all of the trace points in the set of trace points. After the convex hull corresponding to the track point set is determined, the target track points at the edge of the convex hull can be further determined, then the spatial distance between the target track points at the edge of the convex hull is calculated, a plurality of spatial distance data are obtained, and the spatial distance data set corresponding to the track point set is obtained.

In the embodiment of the application, when the number of the trace points in the trace point set is small, the maximum value of the space distance between any two points is taken as the characterization length corresponding to the trace point set; when the number of the trace points in the trace point set is large, the maximum value of the space distance between the edge trace points of the convex hull corresponding to the trace point set is used as the characterization length corresponding to the trace point set. Therefore, the calculation amount of the characterization length corresponding to the trace point set can be reduced, and the data processing efficiency is improved.

And 103, determining a corresponding block unit set of each stop point cluster based on the positioning data.

After the third number of stop point clusters corresponding to the target object is determined, the geographic location corresponding to each stop point cluster needs to be described, and the basic unit describing the geographic location of each stop point cluster in the present application may be a plurality of block units obtained by dividing in the foregoing step 102. Specifically, for each single track point in each stop point cluster, the target parcel unit thereof may be determined according to the positioning data carried by the track point, and then the parcel unit set corresponding to the stop point cluster may be further determined according to the target parcel unit corresponding to each track point.

In some embodiments, determining the set of parcel units corresponding to each cluster of stop points based on the positioning data comprises:

1. generating a minimum convex polygon which spatially contains each track point in the corresponding stop point cluster based on the positioning data of the track point contained in each stop point cluster to obtain a convex hull corresponding to each stop point cluster;

2. searching a plurality of land parcel units intersected with any one target convex hull to obtain a first land parcel unit set corresponding to each convex hull;

3. calculating the intersection area between each block unit and the corresponding convex hull in the first block unit set;

4. and determining the land units with the intersection areas meeting the preset conditions as target land units corresponding to the stop point clusters to obtain a land unit set corresponding to each stop point cluster.

Wherein, in this application embodiment, need not to confirm its parcel unit that corresponds according to the location data of every track point in the track point set one by one, especially when including a large amount of track points in the track point set, confirm the parcel unit that needs to consume a large amount of computing resources to each track point place one by one. The convex hull that every stop point cluster corresponds can be confirmed earlier in this application embodiment, and wherein, the convex hull that the stop point cluster corresponds is the minimum convex polygon that contains all track points in this stop point cluster in space.

After the convex hull corresponding to any target stop point cluster is determined, a plurality of land parcel units intersected with the convex hull can be further determined according to the position of the convex hull corresponding to the target stop point cluster on the space. The intersection with the convex hull may specifically be an intersection between the ground occupied by the parcel unit and the ground occupied by the convex hull. I.e., when part or all of the cell is in the convex hull, then the cell is determined to be a cell that intersects the convex hull. It is understood that there is at least one land element intersecting the convex hull. All the land parcel units intersected with the convex hull can be searched in the second quantity of land parcel units obtained by division, and a land parcel unit set intersected with the convex hull is obtained.

Furthermore, when the convex hull corresponding to the stop point cluster is determined according to the track points in the stop point cluster, the range of the track points is expanded to a certain extent, and then some land block units which are less associated with the stop point cluster may be determined as the land block units corresponding to the stop point cluster. For example, if a certain parcel unit does not include any track point in the stop point cluster, and the intersection area between the convex hull corresponding to the stop point cluster and the parcel unit is also small, it may be determined that the association between the parcel unit and the stop point cluster is also small, and it is necessary to exclude the parcel units with small association from the parcel unit set intersected with the convex hull, so as to avoid the parcel unit from interfering with the determination of the stop area of the target object.

Therefore, after the set of the land parcel units intersected with the convex hull is determined, the intersection area of the intersection part of each land parcel unit and the convex hull in the set of the land parcel units intersected with the convex hull can be further calculated. And then further determining the land parcel units with the intersection areas meeting certain conditions according to the intersection areas. The condition that the intersection area meets may be that the intersection area is larger than a preset area or that the occupation ratio of the intersection area in the unit area of the land parcel reaches a preset threshold. Further, a set composed of the land parcel units satisfying the condition can be determined as a land parcel unit set corresponding to the target stop point cluster. Furthermore, each stop point cluster can be traversed to obtain a block unit set corresponding to each stop point cluster.

In some embodiments, determining a block unit whose intersection area satisfies a preset condition as a target block unit of a corresponding stop point cluster, and obtaining a block unit set corresponding to each stop point cluster includes:

4.1, when a target block unit with the ratio of the intersection area to the reference area larger than a preset ratio exists, generating a block unit set corresponding to the stop point cluster according to the target block unit, wherein the reference area is the minimum value of the area of the block unit and the area of the corresponding convex hull;

and 4.2, when the plot unit with the ratio of the intersection area to the reference area larger than the preset ratio does not exist, determining the plot unit with the largest intersection area with the corresponding convex hull as a target plot unit, and generating a plot unit set corresponding to the stop point cluster according to the target plot unit.

Since the intersection area is the intersection area of the land parcel unit and the convex hull, that is, for any target intersection area, the intersection area is the area of the intersection part of the target land parcel unit and the convex hull, that is, the intersection area and the land parcel unit are in one-to-one correspondence. In the embodiment of the present application, a reference area may be set for each intersection area, and for any target intersection area, the corresponding reference area may be set as the minimum value of the corresponding parcel unit area and the convex hull area. Specifically, for example, the area of the convex hull corresponding to the stop point cluster is 100 square meters, there are three land block units intersecting with the convex hull, the areas of the three land block units are 50 square meters, 80 square meters and 110 square meters, respectively, and the areas of the intersection of the three land block units and the convex hull are 20 square meters, 30 square meters and 40 square meters, respectively. The reference area corresponding to the intersection area of 20 square meters is the minimum of 50 square meters and 100 square meters, i.e., 50 square meters. Similarly, the reference area corresponding to the intersection area of 40 square meters is the minimum of 110 square meters and 100 square meters, i.e. 100 square meters.

As can be seen from the above description, each intersection area has a reference area corresponding to it. Further, a ratio of the intersection area to a reference area corresponding thereto may be calculated, and if the ratio is greater than a preset ratio, the parcel unit corresponding to the intersection area may be determined as the parcel unit corresponding to the stop point cluster. And further traversing all the land parcel units intersected with the convex hull corresponding to the stop point cluster, and determining all the land parcel units with the ratio of the intersected area to the reference area larger than a preset ratio to obtain a land parcel unit set corresponding to the stop point cluster.

And if all the land parcel units intersected with the convex hull corresponding to the stop point cluster are traversed and no land parcel unit with the ratio of the intersected area to the reference area larger than the preset ratio exists, determining a target land parcel unit with the maximum intersected area of the convex hull corresponding to the stop point cluster, and determining a land parcel unit set corresponding to the stop point cluster according to the target land parcel unit. It will be appreciated that the set contains only one element.

And 104, performing joint processing on the plot units in the plot unit set to obtain a target area corresponding to the target object.

After the block unit set corresponding to each stop point cluster is determined, joint processing can be further performed according to the block units in the block unit sets to obtain a target area corresponding to a target object. The block units in the plurality of block unit sets may be subjected to joint processing respectively to obtain a plurality of target areas corresponding to the target object, or all the block units included in the plurality of block units may be subjected to joint processing to obtain at least one target area corresponding to the target object.

In some embodiments, performing joint processing on the parcel units in the parcel unit set to obtain a target area corresponding to the target object includes:

1. calculating a union set of the plot unit sets to obtain a target plot unit set corresponding to the target object;

2. extracting continuously communicated plot units from the target plot unit set to obtain a plurality of sub-target plot unit sets;

3. and performing joint processing on the plot units in each sub-target plot unit set to obtain a plurality of target areas corresponding to the target object.

In some cases, there may be a case where an intersection exists between the stop point clusters, and if a plurality of target areas corresponding to the target object are determined according to the set of parcel units corresponding to each stop point cluster, there may be a case where the target areas intersect with each other, so that the description of the stop area or the frequent activity area of the target object is not accurate enough. Then the plot units corresponding to these intersected stop point clusters need to be fused. In this embodiment of the present application, for a plurality of parcel unit sets corresponding to a plurality of stop point clusters, a union between the parcel unit sets may be calculated first, and a target parcel unit set composed of all parcel units corresponding to the stop point clusters is obtained.

After determining the target parcel unit set composed of all parcel units corresponding to the stop point cluster, the connectivity between each parcel unit in the target parcel unit set can be further determined, and then a sub-target parcel unit set composed of a plurality of continuously connected parcel units is determined according to the connectivity between the parcel units. Further, the plot units in each sub-target plot unit set can be subjected to joint processing to obtain a plurality of target areas corresponding to the target object.

In this way, a target block unit set can be obtained by calculating a union set of a plurality of block unit sets, so that repeated block units are removed. And then, further determining a sub-target plot unit set consisting of continuous plot units according to the connectivity among the plot units, and performing joint processing on the plot units in the sub-target plot unit set to obtain a plurality of target areas corresponding to the target object. Therefore, the accuracy of the target area corresponding to the target object is improved.

In some embodiments, extracting the contiguous parcel units from the set of target parcel units, resulting in a plurality of sets of sub-target parcel units, comprises:

2.1, amplifying each land block unit in the target land block unit set according to a preset size to obtain an amplified land block unit;

2.2, generating an adjacent matrix corresponding to the target plot unit set according to the intersection relation among the enlarged plot units;

2.3, generating an adjacency relation graph among the plot units in the target plot unit set based on the adjacency matrix;

2.4, extracting a plurality of maximum connected subgraphs from the adjacency graph;

and 2.5, determining a plurality of sub-target block unit sets according to the plurality of maximum connected subgraphs.

In this embodiment of the present application, after the target parcel unit set corresponding to the target object is determined, each parcel unit in the target parcel unit set may be enlarged according to a preset size, so as to obtain an enlarged parcel unit of each parcel unit. And then, whether the ground block units after being amplified intersect or not can be determined one by one, and if the ground block units after being amplified intersect, the ground block units before being amplified are determined to be adjacent. In this way, the adjacent relation between the block units before enlargement can be determined one by one, and the adjacency matrix corresponding to the target block unit set can be generated according to the adjacent relation. Further, each land unit can be taken as a node, and the adjacency relation graph among the land units in the target land unit set can be constructed by showing the connection relation among the nodes by using an adjacency relation matrix. From the adjacency graph, a plurality of extremely large connected subgraphs contained in the graph can be conveniently obtained. The maximum connected subgraph is that one node in the adjacent relation graph is continuously connected to another node through other nodes, the continuously connected nodes form a node sequence, and two nodes at two ends of the sequence are not connected with other nodes of the node sequence any more. Further, a plurality of target block unit sets may be determined from the plurality of maximum connected subgraphs. Wherein each node in the maximum connected subgraph corresponds to a plot unit.

In some embodiments, performing joint processing on the parcel units in each sub-target parcel unit set to obtain a plurality of target areas corresponding to the target object includes:

3.1, amplifying each plot unit in each sub-target plot unit set according to a preset size to obtain an amplified plot unit corresponding to each sub-target plot unit set;

3.2, overlapping the amplified plot units corresponding to each sub-target plot unit set in space to obtain a plurality of space areas;

and 3.3, reducing each space area according to a preset size to obtain a plurality of target areas corresponding to the target object.

After determining a plurality of sub-target plot unit sets corresponding to the target object, the plot units in each sub-target plot unit set can be subjected to joint processing to obtain a plurality of target areas corresponding to the target object. It is understood that each set of sub-target block units corresponds to a target area.

According to the specific method for determining the target area according to the sub-target plot unit set, each plot unit in the sub-target plot unit set can be amplified according to a preset size, and the amplified plot unit corresponding to the sub-target plot unit set is obtained. And then, combining the land parcel units obtained by amplification, wherein the land parcel units in the alphabet land parcel unit set are mutually connected, so that cross parts exist among the land parcel units obtained by amplification, and a plurality of land parcel units obtained by amplification are spatially superposed, namely only one part of the cross parts is reserved, so that an integral area formed by the land parcel units obtained by amplification is obtained. Then, the obtained whole area is reduced according to the enlarged size, and a target area corresponding to the target object is obtained. Furthermore, each sub-target plot unit set can be traversed to obtain a plurality of target areas corresponding to the target object.

As can be seen from the above description, in the data processing method provided in this embodiment of the present application, by acquiring trajectory data of a target object and acquiring parcel unit data, the trajectory data includes positioning data and time data corresponding to a plurality of trajectory points of the target object; generating a plurality of stop point clusters of the target object according to the track data, wherein each stop point cluster consists of a plurality of track points with the aggregation density larger than a preset threshold value; determining a plot unit set corresponding to each stop point cluster based on the positioning data; and carrying out joint processing on the plot units in the plot unit set to obtain a target area corresponding to the target object. Therefore, the track data corresponding to the staying area of the target object is automatically determined from the track data of the target object, and the staying area of the target object with the spatial semantics is determined by combining the track data corresponding to the staying area and the plot unit divided according to the geographical portrait information. The method can improve the efficiency of data processing, thereby improving the efficiency of determining the target area corresponding to the target object.

The application also provides a data processing method, which can be used in computer equipment, wherein the computer equipment can be a terminal or a server. As shown in fig. 3, another schematic flow chart of the data processing method provided in the present application is shown, and the method specifically includes:

in step 201, a computer device obtains trajectory data of an object.

The computer device determines the constant activity area of the object, and needs to acquire the trajectory data of the object first. The trajectory data may be trajectory data of the object in a specific time period, and the trajectory data includes a plurality of trajectory points arranged in time sequence. The data format of each track point can be P (x, y, t), wherein x is the geographical longitude of track point positioning data, y is the geographical latitude of track point positioning data, and t is the corresponding timestamp when this track point positioning data is gathered. The object trajectory data includes a plurality of trajectory point data arranged in time series, and may be specifically P0,P1...Pn-2,Pn-1The total number n is a track sequence of track points arranged in time sequence. The object trajectory data may be acquired by the computer device, or may be input by the user, which is not limited herein.

In step 202, the computer device identifies a plurality of stopover point clusters of the object from the trajectory data of the object using a stopover point identification algorithm.

After the trajectory data of the object is obtained, the trajectory data of the object can be processed into a plurality of stopover point clusters by adopting a stopover point identification algorithm. The stop point identification algorithm may be a distance and time Based rule judgment, or may be a Density-Based Clustering algorithm (DBSCAN). Next, a process of identifying a plurality of stopover point clusters from trajectory data by using a stopover point identification algorithm will be described in detail.

First, the time of the stop point identification can be setNull thresholds, including in particular time thresholds TtimeAnd a spatial threshold TdistThe specific values of the time threshold and the space threshold can be set by themselves, and for example, T can be settime20 min, Tdist500 m.

Then, a round-robin algorithm may be set, first initializing i ═ 0, calculating j, where j is a positive integer, and j is<n is the same as the formula (I). Make the track point PiTo PjThe time difference between is greater than or equal to TtimeAnd the track point PiTo Pj-1The time difference between is less than Ttime

If such j exists, then P is determined0,P1...Pj-1,PjIs a cluster of transition points. And then updating i, assigning i to i +1, and recalculating j meeting the conditions to obtain a new transition point cluster until i is n-1.

If no j exists, i is directly updated, i is assigned to i +1, and whether j meeting the above condition exists is recalculated until i is n-1.

Therefore, a plurality of transition point clusters can be obtained through calculation, and it can be understood that after the track points in the transition point clusters are sequenced according to the time sequence, the time difference between two track points at the end of the sequence is greater than or equal to Ttime

Further, for each transition point cluster, a corresponding characterization radius of the transition point cluster may be calculated.

Specifically, when the number of trace points in the transition point cluster is less than a preset number threshold, the maximum value of the distance between the trace points may be calculated as the characterization radius of the transition point cluster.

When the number of the track points in the transition point cluster is less than a preset number threshold, a convex hull corresponding to the transition point cluster can be determined, and the maximum value of the distance between the track points on the convex hull outline is calculated to be used as the representation radius of the transition point cluster.

If the characteristic radius of the transition point cluster is larger than the spatial threshold value TdistThen, the object is indicated at the TtimeThe motion tracks in the period of time are comparatively dispersed and do not stayLeft in a certain area and therefore not suitable as a stop point. If the characteristic radius of the transition point cluster is not larger than the spatial threshold value TdistThen, the object is indicated at the TtimeAnd (4) determining the transition point cluster as the stop point cluster of the object if the activity track comparison set in the period of time stays in a certain area and is suitable for being used as a stop point. Then, traversing each transition point cluster, and determining the transition point cluster with the characteristic radius not larger than the spatial threshold as a stop point cluster to obtain a plurality of stop point clusters of the object. In order to characterize each stop point cluster, longitude and latitude coordinates of the set center of the convex hull corresponding to the stop point cluster can be determined to characterize the position of the stop point cluster, and the time of the stop point cluster is characterized by a timestamp of average time or median time.

In step 203, the computer device obtains basic parcel unit data.

The track data of the object comprises longitude and latitude data of each track, the constant activity area of the object is described, and if the longitude and latitude data are used for description, the track data are too unsmooth and the actual significance of the track data cannot be determined, so that the utilization value of the information of the constant activity area of the user is low. For example, if the user's frequent activity area is determined to be around 115 degrees east longitude and 22 degrees north latitude, only a rough area of the user's frequent activity can be determined, and further description of the user's portrait based on the area is not possible, and other uses based on the user's portrait are not possible.

Therefore, in the embodiment of the present application, a basic parcel unit having a spatial semantic meaning in the vicinity of the trajectory data of the object is acquired. Specifically, the plot units are obtained by dividing according to the spatial semantics of the plots, for example, a certain cell is a plot unit, a certain market is a plot unit, and a certain park is a plot unit, so as to obtain a plurality of plot units. Each block unit is described in a format (identification, contour), where the identification may be a unique Identity (ID) of the block unit, and the contour may include multiple sets of coordinate data for recording the contour of the block unit.

Specifically, the data of the plot units are obtained, the area may be divided by the computer device, and the identifier and the contour of each plot unit are determined to obtain the data of the plot units, or the data of the plot units obtained from other terminals or servers. No matter the data is obtained from other terminals or servers or is automatically divided and determined, the block unit data is the block unit data obtained by dividing according to the space semantics.

And step 204, the computer equipment queries a plurality of plot units corresponding to each stop point cluster to obtain the plot units of the object which are frequently moved.

After the plurality of stop point clusters of the object are determined, the plurality of stop point clusters of the object can be further mapped to the plot unit to obtain the plot unit corresponding to each stop point cluster, and further obtain the plot unit corresponding to the constant activity area of the object.

Specifically, for each cluster of stop points, a convex hull contour for each cluster of stop points may be constructed first using a convex hull algorithm. Specifically, the convex hull contour may be constructed using Graham scanning (a convex hull scanning method, the kudzu method) or the Jarvis stepping (wrapping method). A convex hull is a convex polygon composed of a subset of the clicked midpoints (i.e., two arbitrary points are taken on a polygon and connected by a line segment, where each point on the line segment is on or inside the polygon).

For the basic parcel unit data acquired in step 203, a spatial index may be constructed. Specifically, the spatial index may be constructed using a quadtree index or R-tree (a tree-like data structure) method. And then inquiring a plurality of block units intersected with the convex hull based on the spatial index.

Specifically, for a target convex hull X corresponding to any one target stop point cluster, a block unit set Ys intersecting with the target convex hull X is determined. For any one of the block units Y in Ys, the following two conditions may be determined:

s (X ≧ Y) ≧ AT (S) (X) formula (1)

S (X ≧ Y) ≧ AT (Y) S (2)

Wherein, S represents an area calculating operator, S (X ∞ Y) represents an intersection area of the land parcel unit Y and the target convex hull X, and [ AT ] is a preset threshold parameter, and takes a value of (0, 1), for example, 0.5.

If Y in the Ys satisfies the formula (1), the convex hull X has a certain proportion of area falling in the land parcel unit Y; if Y in Ys satisfies the formula (2), it indicates that the land parcel unit Y has a certain proportion of area falling within the convex hull X.

And when Y meeting any one of the formula (1) or the formula (2) exists in the Ys, determining all Y meeting the condition to obtain the land parcel unit set corresponding to the target convex hull X.

And when Y meeting the condition does not exist in the Ys, determining the plot unit with the largest intersection area with the target convex hull X as a plot unit set corresponding to the target convex hull, wherein the set only has one element. Then, each stop point cluster can be traversed to obtain a block unit set corresponding to each stop point cluster.

After the block unit set corresponding to each stop point cluster is determined, the block unit set which is formed by the block unit sets and is frequently active is determined. Each of which is a plot unit in which the subject is constantly active.

In step 205, the computer device generates a spatial adjacency matrix from the frequently active parcel units of the object.

After the plot units of the object which are frequently active are determined, the area of the object which is frequently active can be further determined according to the plot units of the object which are frequently active.

Specifically, a buffering distance d may be set, and for any two of the subject constantly-moving plot units a and B, both are buffered (expanded) outward by the distance d. And if the buffered contours of the two land units are intersected, determining that the land unit A and the land unit B are adjacent land units, otherwise, determining that the land unit A and the land unit B are not adjacent. Then, every two plot units in the object constantly active plot units can be traversed, and the adjacency relation between any two plot units can be determined. Further, a spatial adjacency matrix E of N × N may be constructed according to the adjacency relation between the constantly active block units, where N is the number of the constantly active block units of the object.

And step 206, the computer equipment obtains a plurality of plot unit clusters corresponding to the object according to the maximum connected subgraph mined from the adjacency matrix.

Wherein, an undirected graph can be constructed by taking the object constantly-moving plot units as nodes and the adjacency matrix E as edges. Then, each maximal connected subgraph can be mined from the undirected graph by a Breadth First Search method (BFS) or a Union-Find method to obtain a plurality of maximal connected subgraphs. Each node in each maximum connected subgraph corresponds to a block unit with a constantly active object, and the block units form a block unit cluster. Then a plurality of plot unit clusters can be obtained according to the plurality of maximum connected subgraphs.

And step 207, the computer equipment performs joint processing on each block unit cluster to obtain a constant activity area of the object.

After obtaining a plurality of plot unit clusters corresponding to the object, the plot units in each plot unit cluster can be processed in a combined manner, so that a complete contour is aggregated, and a constant activity area of the object is obtained. Specifically, the united processing of the plot units in the plot unit cluster may be performed by firstly buffering (expanding) each plot unit in the cluster by a distance d to the outside, performing united processing on the expanded plot units by a spatial stacking analysis method to integrate the expanded plot units into a single contour, and then buffering (contracting) the distance d to the inside, thereby obtaining a constantly active region of the object. Then, traversing each block unit cluster, a plurality of constantly active areas of the object can be obtained.

Fig. 4 is a schematic diagram of a scenario for determining a user's frequent activity area. Specifically, track data of the user may be obtained first, where the track data includes a plurality of track points 11 of the user and time data corresponding to each track point, and then basic parcel unit data is obtained, where the basic parcel unit includes a plurality of parcel units with spatial semantics, which are obtained by dividing a preset area 10, and specifically, for example, XX apartments, XX malls, XX elementary schools, and XX parks. And then determining a plurality of stop point clusters according to the track data of the user, and further determining a plurality of plot units corresponding to each stop point cluster. After determining the land units which are frequently moved by the user, performing connectivity calculation on the land units to obtain a plurality of land unit clusters; and finally, performing combined processing on each plot unit cluster to obtain a user constant activity area 12.

As can be seen from the above description, in the data processing method provided in this embodiment of the present application, by acquiring trajectory data of a target object and acquiring parcel unit data, the trajectory data includes positioning data and time data corresponding to a plurality of trajectory points of the target object; generating a plurality of stop point clusters of the target object according to the track data, wherein each stop point cluster consists of a plurality of track points with the aggregation density larger than a preset threshold value; determining a plot unit set corresponding to each stop point cluster based on the positioning data; and carrying out joint processing on the plot units in the plot unit set to obtain a target area corresponding to the target object. Therefore, the track data corresponding to the staying area of the target object is automatically determined from the track data of the target object, and the staying area of the target object with the spatial semantics is determined by combining the track data corresponding to the staying area and the plot unit divided according to the geographical portrait information. The method can improve the efficiency of data processing, thereby improving the efficiency of determining the target area corresponding to the target object.

In order to better implement the above method, the embodiment of the present invention further provides a data processing apparatus, which may be integrated in a terminal or a server.

For example, as shown in fig. 5, for a schematic structural diagram of a data processing apparatus provided in an embodiment of the present application, the data processing apparatus may include an obtaining unit 301, a generating unit 302, a determining unit 303, and a combining unit 304, as follows:

an obtaining unit 301, configured to obtain track data of a target object and obtain parcel unit data, where the track data includes positioning data and time data corresponding to a plurality of track points of the target object;

a generating unit 302, configured to generate a plurality of stop point clusters of the target object according to the trajectory data, where a stop point cluster is composed of a plurality of trajectory points whose aggregation density is greater than a preset threshold;

a determining unit 303, configured to determine, based on the positioning data, a set of parcel units corresponding to each of the stop point clusters;

and the combining unit 304 is configured to perform combining processing on the plot units in the plot unit set to obtain a target area corresponding to the target object.

In some embodiments, the generating unit comprises:

the first determining subunit is used for determining a plurality of track point sets consisting of time-continuous track points according to a preset time threshold and time data, wherein the maximum time span between the track points in the track point sets is larger than the time threshold;

the first calculating subunit is used for calculating the spatial distance between any two track points in each track point set to obtain a spatial distance data set corresponding to each track point set;

the second determining subunit is used for determining the representation length of each track point set according to the maximum value in each spatial distance data set;

and the third determining subunit is used for determining the track point set with the characteristic length smaller than the preset length as the stop point cluster of the target object to obtain a plurality of stop point clusters.

In some embodiments, a compute subunit includes:

the acquisition module is used for acquiring the number of the track points in each track point set;

the calculating module is used for calculating the spatial distance between any two track points in the track point set when the number of the track points in the track point set is smaller than a preset number threshold value, so as to obtain a spatial distance data set corresponding to the track point set;

the first determining module is used for determining a minimum convex polygon containing each track point in the track point set in space when the number of the track points in the track point set is larger than or equal to a preset number threshold, calculating the space distance between any two track points at the edge of the convex polygon, and obtaining a space distance data set corresponding to the track point set.

In some embodiments, the determining unit comprises:

the generating subunit is used for generating a minimum convex polygon which spatially contains each trace point in the corresponding stop point cluster based on the positioning data of the trace point contained in each stop point cluster, so as to obtain a convex hull corresponding to each stop point cluster;

the searching subunit is used for searching a plurality of land parcel units intersected with any one target convex hull to obtain a first land parcel unit set corresponding to each convex hull;

the second calculating subunit is used for calculating the intersection area between each land block unit in the first land block unit set and the corresponding convex hull;

and the fourth determining subunit is used for determining the land units with the intersection areas meeting the preset conditions as the target land units of the corresponding stop point clusters to obtain a land unit set corresponding to each stop point cluster.

In some embodiments, the fourth determining subunit includes:

the first generation module is used for generating a block unit set corresponding to the stop point cluster according to the target block unit when the target block unit with the ratio of the intersection area to the reference area larger than the preset ratio exists, wherein the reference area is the minimum value of the area of the block unit and the area of the corresponding convex hull;

and the second determining module is used for determining the block unit with the largest intersection area corresponding to the convex hull as the target block unit when the block unit with the ratio of the intersection area to the reference area larger than the preset ratio does not exist, and generating a block unit set corresponding to the stop point cluster according to the target block unit.

In some embodiments, a federated unit comprises:

the third calculation subunit is used for calculating a union set of the plot unit sets to obtain a target plot unit set corresponding to the target object;

the extraction subunit is used for extracting the continuously communicated plot units from the target plot unit set to obtain a plurality of sub-target plot unit sets;

and the joint subunit is used for performing joint processing on the plot units in each sub-target plot unit set to obtain a plurality of target areas corresponding to the target object.

In some embodiments, an extraction subunit, comprising:

the first amplification module is used for amplifying each plot unit in the target plot unit set according to a preset size to obtain an amplified plot unit;

the second generation module is used for generating an adjacent matrix corresponding to the target block unit set according to the intersection relation among the amplified block units;

a third generation module, configured to generate an adjacency relation graph between the block units in the target block unit set based on the adjacency matrix;

the extraction module is used for extracting a plurality of maximum connected subgraphs from the adjacency graph;

and the third determining module is used for determining a plurality of sub-target block unit sets according to the plurality of maximum connected subgraphs.

In some embodiments, a federated subunit includes:

the second amplification module is used for amplifying each plot unit in each sub-target plot unit set according to a preset size to obtain an amplified plot unit corresponding to each sub-target plot unit set;

the superposition module is used for superposing the amplified plot units corresponding to each sub-target plot unit set on the space to obtain a plurality of space areas;

and the reducing module is used for reducing each space area according to a preset size to obtain a plurality of target areas corresponding to the target object.

In a specific implementation, the above units may be implemented as independent entities, or may be combined arbitrarily to be implemented as the same or several entities, and the specific implementation of the above units may refer to the foregoing method embodiments, which are not described herein again.

As can be seen from the above description, in the data processing method provided in this embodiment of the present application, the obtaining unit 301 obtains the track data of the target object and obtains the parcel unit data, where the track data includes positioning data and time data corresponding to a plurality of track points of the target object; the generating unit 302 generates a plurality of stop point clusters of the target object according to the trajectory data, wherein the stop point clusters are composed of a plurality of trajectory points with aggregation density larger than a preset threshold value; the determining unit 303 determines a set of parcel units corresponding to each of the stop point clusters based on the positioning data; the union unit 304 performs union processing on the plot units in the plot unit set to obtain a target area corresponding to the target object. Therefore, the track data corresponding to the staying area of the target object is automatically determined from the track data of the target object, and the staying area of the target object with the spatial semantics is determined by combining the track data corresponding to the staying area and the plot unit divided according to the geographical portrait information. The method can improve the efficiency of data processing, thereby improving the efficiency of determining the target area corresponding to the target.

An embodiment of the present application further provides a computer device, where the computer device may be a terminal or a server, and as shown in fig. 6, is a schematic structural diagram of the computer device provided in the present application. Specifically, the method comprises the following steps:

the computer device may include components such as a processing module 401 of one or more processing cores, a storage unit 402 of one or more storage media, a power module 403, and an input module 404. Those skilled in the art will appreciate that the computer device configuration illustrated in FIG. 6 does not constitute a limitation of computer devices, and may include more or fewer components than those illustrated, or some components may be combined, or a different arrangement of components. Wherein:

the processing module 401 is a control center of the computer device, connects various parts of the whole computer device by using various interfaces and lines, and executes various functions of the computer device and processes data by running or executing software programs and/or modules stored in the storage unit 402 and calling data stored in the storage unit 402, thereby monitoring the computer device as a whole. Optionally, the processing module 401 may include one or more processing cores; preferably, the processing module 401 may integrate an application processor and a modem processor, wherein the application processor mainly handles operating systems, user interfaces, application programs, and the like, and the modem processor mainly handles wireless communications. It is to be understood that the modem processor described above may not be integrated into the processing module 401.

The storage unit 402 may be used to store software programs and modules, and the processing module 401 executes various functional applications and data processing by operating the software programs and modules stored in the storage unit 402. The storage unit 402 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, web page access, and the like), and the like; the storage data area may store data created according to use of the computer device, and the like. Further, the storage unit 402 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory unit 402 may also include a memory controller to provide the processing module 401 access to the memory unit 402.

The computer device further comprises a power module 403 for supplying power to each component, and preferably, the power module 403 is logically connected to the processing module 401 through a power management system, so as to implement functions of managing charging, discharging, and power consumption through the power management system. The power module 403 may also include one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and any other components.

The computer device may also include an input module 404, the input module 404 operable to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.

Although not shown, the computer device may further include a display unit and the like, which are not described in detail herein. Specifically, in this embodiment, the processing module 401 in the computer device loads the executable file corresponding to the process of one or more application programs into the storage unit 402 according to the following instructions, and the processing module 401 runs the application programs stored in the storage unit 402, so as to implement various functions as follows:

acquiring track data of a target object and acquiring plot unit data, wherein the track data comprises positioning data and time data corresponding to a plurality of track points of the target object; generating a plurality of stop point clusters of the target object according to the track data, wherein each stop point cluster consists of a plurality of track points with the aggregation density larger than a preset threshold value; determining a plot unit set corresponding to each stop point cluster based on the positioning data; and carrying out joint processing on the plot units in the plot unit set to obtain a target area corresponding to the target object.

It should be noted that the computer device provided in the embodiment of the present application and the method in the foregoing embodiment belong to the same concept, and specific implementation of the above operations may refer to the foregoing embodiment, which is not described herein again.

It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions or by associated hardware controlled by the instructions, which may be stored in a computer readable storage medium and loaded and executed by a processor.

To this end, embodiments of the present invention provide a computer-readable storage medium having stored therein a plurality of instructions, which can be loaded by a processor to perform the steps of any of the methods provided by the embodiments of the present invention. For example, the instructions may perform the steps of:

acquiring track data of a target object and acquiring plot unit data, wherein the track data comprises positioning data and time data corresponding to a plurality of track points of the target object; dividing a preset geographical area containing each track point into a plurality of block units with geographical boundaries and corresponding geographical portrait information; generating a third number of stop point clusters of the target object according to the track data, wherein the stop point clusters are composed of a plurality of track points with the aggregation density larger than a preset threshold value; determining a plot unit set corresponding to each stop point cluster based on the positioning data; and carrying out joint processing on the plot units in the plot unit set to obtain a target area corresponding to the target object.

The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.

Wherein the computer-readable storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.

Since the instructions stored in the computer-readable storage medium can execute the steps in any method provided by the embodiment of the present invention, the beneficial effects that can be achieved by any method provided by the embodiment of the present invention can be achieved, which are detailed in the foregoing embodiments and will not be described herein again.

According to an aspect of the application, there is provided, among other things, a computer program product or computer program comprising computer instructions stored in a storage medium. The computer instructions are read from the storage medium by a processor of the computer device, and the processor executes the computer instructions to cause the computer device to perform the method provided in the various alternative implementations of fig. 2 or fig. 3 described above.

The data processing method, the data processing apparatus, the computer readable storage medium, and the computer device provided in the embodiments of the present invention are described in detail above, and a specific example is applied in the description to explain the principle and the implementation of the present invention, and the description of the above embodiments is only used to help understanding the method and the core idea of the present invention; meanwhile, for those skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

26页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:基于网页的图片交互方法、装置、设备、介质及程序产品

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!