Data processing method, device, computer-readable storage medium, and computer equipment
By acquiring and processing the trajectory data and plot unit data of the target object, generating a cluster of stop points and determining the plot unit set, the accuracy and efficiency problems of target area determination in the prior art are solved, and more efficient target area identification is achieved.
Patent Information
- Application Number
- CN202111054987.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-09
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2041-09-09
AI Technical Summary
In the prior art, the method of determining the target area by manually labeling object-related information on an electronic map is poorly accurate and inefficient.
By obtaining the trajectory data of the target object and the plot unit data, a stop point cluster is generated, and the plot unit set corresponding to each stop point cluster is determined based on the positioning data and plot unit data. Finally, the plot unit set is jointly processed to automatically determine the target area of the target object.
The efficiency of data processing is improved, thereby improving the efficiency of target area determination, and achieving more accurate and efficient target area identification.
Smart Images

Figure CN113792206B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a data processing method, apparatus, computer-readable storage medium, and computer equipment. Background Art
[0002] Determining the target area corresponding to an object based on its related information is a common task in location-based services (LBS), which is of great significance for the geographical profiling of objects and regions.
[0003] Currently, to determine the target area corresponding to an object, generally, relevant information of the object is marked on a map or an electronic map, and then the target area corresponding to the object is manually determined based on the relevant information of the object marked on the map.
[0004] However, manually determining the target area corresponding to an object based on the object-related information marked on the map has poor accuracy and low efficiency. Summary of the Invention
[0005] The embodiments of the present application provide a data processing method, apparatus, computer-readable storage medium, and computer equipment. The method can improve the efficiency of data processing, and thereby improve the efficiency of determining the target area corresponding to the target object.
[0006] A first aspect of the present application provides a data processing method, the method comprising:
[0007] Acquire trajectory data of a target object and obtain plot unit data, wherein the trajectory data includes positioning data and time data corresponding to a plurality of trajectory points of the target object;
[0008] generating a plurality of stay point clusters of the target object according to the trajectory data, wherein the stay point clusters are composed of a plurality of trajectory points having a clustering density greater than a preset threshold;
[0009] Determine a set of plot units corresponding to each stay point cluster based on the positioning data and the plot unit data;
[0010] The land parcel units in the land parcel unit set are jointly processed to obtain a target area corresponding to the target object.
[0011] Accordingly, a second aspect of the present application provides a data processing device, comprising:
[0012] an acquisition unit, configured to acquire trajectory data of a target object and obtain plot unit data, wherein the trajectory data includes positioning data and time data corresponding to a plurality of trajectory points of the target object;
[0013] a generating unit, configured to generate a plurality of stay point clusters of the target object according to the trajectory data, wherein the stay point clusters are composed of a plurality of trajectory points having a clustering density greater than a preset threshold;
[0014] a determining unit, configured to determine a set of plot units corresponding to each stay point cluster based on the positioning data;
[0015] The combining unit is used to perform combined processing on the plot units in the plot unit set to obtain a target area corresponding to the target object.
[0016] In some embodiments, the generating unit includes:
[0017] a first determining subunit, configured to determine, based on a preset time threshold and the time data, a plurality of trajectory point sets consisting of temporally consecutive trajectory points, wherein a maximum time span between trajectory points in the trajectory point set is greater than the preset time threshold;
[0018] The first calculation subunit is used to calculate the spatial distance between any two trajectory points in each trajectory point set to obtain a spatial distance data set corresponding to each trajectory point set;
[0019] a second determining subunit, configured to determine a representation length of each trajectory point set according to a maximum value in each spatial distance data set;
[0020] The third determining subunit is configured to determine a set of trajectory points whose representation length is less than a preset length threshold as a stay point cluster of the target object, and obtain a plurality of stay point clusters.
[0021] In some embodiments, the computing subunit includes:
[0022] An acquisition module, used to obtain the number of trajectory points in each trajectory point set;
[0023] a calculation module, configured to calculate the spatial distance between any two trajectory points in the trajectory point set when the number of trajectory points in the trajectory point set is less than a preset number threshold, and obtain a spatial distance data set corresponding to the trajectory point set;
[0024] The first determination module is used to determine the smallest convex polygon that spatially contains each trajectory point in the trajectory point set when the number of trajectory points in the trajectory point set is greater than or equal to a preset number threshold, calculate the spatial distance between any two trajectory points on the edge of the convex polygon, and obtain a spatial distance data set corresponding to the trajectory point set.
[0025] In some embodiments, the determining unit includes:
[0026] A generating subunit is used to generate a minimum convex polygon that spatially contains each trajectory point in the corresponding stay point cluster based on the positioning data of the trajectory points contained in each stay point cluster, and obtain the convex hull corresponding to each stay point cluster;
[0027] A search subunit is used to search for multiple plot units that intersect with any target convex hull, and obtain a first plot unit set corresponding to each convex hull;
[0028] A second calculation subunit is configured to calculate the intersection area between each land parcel unit in the first land parcel unit set and the corresponding convex hull;
[0029] The fourth determining subunit is configured to determine the plot units whose intersection areas meet a preset condition as target plot units corresponding to the stay point cluster, and obtain a set of plot units corresponding to each stay point cluster.
[0030] In some embodiments, the fourth determining subunit includes:
[0031] A first generating module is configured to generate a set of plot units corresponding to a stay point cluster based on a target plot unit when there is a target plot unit whose ratio of the intersection area to the reference area is greater than a preset ratio, wherein the reference area is the minimum value between the plot unit area and the area of the corresponding convex hull;
[0032] The second determination module is used to determine the plot unit with the largest intersection area with the corresponding convex hull as the target plot unit when there is no plot unit whose ratio of the intersection area to the reference area is greater than the preset ratio, and generate a plot unit set corresponding to the stay point cluster based on the target plot unit.
[0033] In some embodiments, the combined unit comprises:
[0034] A third calculation subunit is configured to calculate a union of the land parcel unit sets to obtain a target land parcel unit set corresponding to the target object;
[0035] Extracting sub-units, for extracting continuously connected plot units from the target plot unit set to obtain multiple sub-target plot unit sets;
[0036] The combined sub-unit is used to perform combined processing on the plot units in each sub-target plot unit set to obtain multiple target areas corresponding to the target object.
[0037] In some embodiments, the extraction subunit comprises:
[0038] A first enlarging module is configured to enlarge each plot unit in the target plot unit set according to a preset size to obtain an enlarged plot unit;
[0039] The second generation module is used to generate an adjacency matrix corresponding to the target land parcel unit set according to the intersection relationship between the enlarged land parcel units;
[0040] A third generating module is configured to generate an adjacency relationship graph between the plot units in the target plot unit set based on the adjacency matrix;
[0041] An extraction module, configured to extract a plurality of maximal connected subgraphs from the adjacency relationship graph;
[0042] The third determining module is used to determine a plurality of sub-target plot unit sets according to the plurality of maximal connected subgraphs.
[0043] In some embodiments, the combined subunit includes:
[0044] A second enlarging module is configured to enlarge each plot unit in each sub-target plot unit set according to a preset size to obtain an enlarged plot unit corresponding to each sub-target plot unit set;
[0045] A superposition module is used to spatially superimpose the enlarged plot units corresponding to each sub-target plot unit set to obtain multiple spatial regions;
[0046] The reduction module is used to reduce each spatial area according to a preset size to obtain multiple target areas corresponding to the target object.
[0047] The third aspect of the present application further provides a computer-readable storage medium, which stores a plurality of instructions, and the instructions are suitable for loading by a processor to execute the steps of the data processing method provided in the first aspect of the present application.
[0048] The fourth aspect of the present application provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, wherein when the processor executes the computer program, the steps of the data processing method provided in the first aspect of the present application are implemented.
[0049] In a fifth aspect, the present application provides a computer program product or computer program, comprising computer instructions stored in a storage medium. A processor of a computer device reads the computer instructions from the storage medium and executes the computer instructions, causing the computer device to perform the steps of the data processing method provided in the first aspect.
[0050] The data processing method provided in an embodiment of the present application obtains trajectory data of a target object and obtains plot unit data, wherein the trajectory data includes positioning data and time data corresponding to multiple trajectory points of the target object; generates multiple stop point clusters of the target object based on the trajectory data, wherein the stop point clusters are composed of multiple trajectory points with a clustering density greater than a preset threshold; determines a set of plot units corresponding to each stop point cluster based on the positioning data and the plot unit data; and performs joint processing on the plot units in the set of plot units to obtain a target area corresponding to the target object. In this way, the trajectory data corresponding to the target object's stop area is automatically determined from the target object's trajectory data, and the stop area of the target object with spatial semantics is determined by combining the trajectory data corresponding to the stop area and the plot units divided according to geographic image information. This method can improve the efficiency of data processing, thereby improving the efficiency of determining the target area corresponding to the target object. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0052] Figure 1 This is a schematic diagram of a data processing scenario in this application;
[0053] Figure 2 It is a flowchart of the data processing method provided by this application;
[0054] Figure 3 is another flow chart of the data processing method provided by this application;
[0055] Figure 4 A scene diagram for determining the user's frequent activity area;
[0056] Figure 5 A schematic diagram of the structure of the data processing device provided in this application;
[0057] Figure 6 It is a structural diagram of the computer device provided in this application. DETAILED DESCRIPTION
[0058] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making any creative efforts shall fall within the scope of protection of the present invention.
[0059] Embodiments of the present invention provide a data processing method, apparatus, computer-readable storage medium, and computer equipment. The data processing method can be used in a data processing apparatus. The data processing apparatus can be integrated into a computer device, which can be a terminal or a server. The terminal can be a mobile phone, tablet computer, laptop computer, smart TV, wearable smart device, personal computer (PC), or other device. The server can be an independent physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery network (CDN), and big data and artificial intelligence platforms. The server can be a node in a blockchain.
[0060] See also Figure 1 , which is a schematic diagram of a data processing scenario provided by the present application; as shown in the figure, computer device A obtains trajectory data of a target object and obtains plot unit data, where the trajectory data includes positioning data and time data corresponding to multiple trajectory points of the target object; generates multiple stay point clusters of the target object based on the trajectory data, where the stay point cluster consists of multiple trajectory points with a clustering density greater than a preset threshold; determines a plot unit set corresponding to each stay point cluster based on the positioning data; and performs joint processing on the plot units in the plot unit set to obtain a target area corresponding to the target object.
[0061] It should be noted that Figure 1 The data processing scenario diagram shown is merely an example. The data processing scenario described in the embodiments of this application is intended to more clearly illustrate the technical solution of this application and does not constitute a limitation on the technical solution provided by this application. Those skilled in the art will appreciate that with the evolution of data processing and the emergence of new business scenarios, the technical solution provided by this application will also be applicable to similar technical problems.
[0062] The following are detailed descriptions based on the above implementation scenarios.
[0063] The embodiments of the present application will be described from the perspective of a data processing device, which can be integrated into a computer device. The computer device can be a terminal or a server. The terminal can be a mobile phone, a tablet computer, a laptop computer, a smart TV, a wearable smart device, a personal computer (PC) or other devices. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, network acceleration services (Content Delivery Network, CDN), and big data and artificial intelligence platforms. Figure 2 FIG. 1 is a flow chart of a data processing method provided by the present application, which includes:
[0064] Step 101: Obtain trajectory data of a target object and obtain land unit data.
[0065] The target object can be a target person, such as Xiao Zhang or Xiao Ming; a target animal, such as an elephant, a rabbit, or a tiger; or a target object, such as a car or a robot. In other words, the target object can be anything that can move and for which trajectory data can be collected.
[0066] The trajectory data of the target object can be acquired based on the positioning data collected by the positioning device carried by the target object, or based on the application with positioning function in the mobile terminal carried by the target object, or based on the positioning data collected by a position acquisition device (such as a camera, etc.). When using positioning data to acquire the trajectory data of the target object, privacy protection can be strictly performed, and the unique identification information of the target object can be irreversibly encrypted. In the present application scheme, the trajectory data can be strictly protected. Furthermore, the trajectory data of the target object can be data collected and used on the basis of obtaining user authorization. The acquisition of the trajectory data of the target object can be performed once at each preset time; it can also be performed according to the target object's stay behavior, that is, when the target object stays at a certain location for a preset time length, the positioning data of the location is acquired.
[0067] The trajectory data of the target object may include not only the positioning data of the target object, but also the time point data corresponding to the collection of each positioning data. Specifically, the time point data may be a timestamp corresponding to the time when the positioning data was collected. Each positioning data and its corresponding timestamp constitute a time point, so the trajectory data of the target object contains multiple time points. Here, in order to distinguish it from other "multiple" in this application, it can be determined that the "multiple" here is the first number. Among them, the trajectory data of the target object may be the trajectory data of a period of time, and the specific time period can be determined as needed and is not limited here. The trajectory data of the target object within this time period can constitute a trajectory point sequence according to the time sequence of each trajectory point.
[0068] The plot unit data may include data corresponding to each plot within the target object's activity area, specifically, data corresponding to each plot within the target area including each trajectory point. The target area may be a larger area as needed. The plot unit data includes position data and edge data for each plot unit. The position data for the plot unit may include coordinate data for the center of the plot unit.
[0069] In some embodiments, obtaining the land parcel unit data includes: dividing a preset geographical area including each trajectory point into a plurality of land parcel units having geographical boundaries and corresponding geographical portrait information.
[0070] Among them, the preset geographical area containing each trajectory point can be the smallest convex polygon geographical space that contains the positioning position of each trajectory point in the geographical space, and the positioning position of each trajectory point is within this geographical space. The preset geographical area can also be a regular polygon that contains each trajectory point, such as a square, rectangle or regular hexagon. On the other hand, the preset geographical area can also be an administrative division space that contains each trajectory point. For example, if the trajectory points of the target object are distributed in various districts of Shenzhen City, then the preset geographical area can be determined to be the entire administrative division space of Shenzhen City. Of course, the preset geographical area can also be a larger administrative division space, for example, it can also be set to Guangdong Province or the whole of China, etc., as long as it contains all the trajectory points of the aforementioned target object.
[0071] After determining the preset geographical area, the preset geographical area can be further divided to obtain a plurality of land parcel units, where the plurality can be a second number. The second number is not related to the first number, and the two can be equal or different.
[0072] Among them, the preset geographical area can be divided according to the spatial semantics of the plot. Specifically, the spatial semantics of the plot means that the plot has separate geographical portrait information. For example, a certain plot is A park area, B community area, C shopping mall area, D school area or E block. The areas in the above examples all have clear geographical boundaries and have clear and separate geographical portrait information. The geographical boundaries of each of the above-mentioned plot units can be obtained from the base map data of the electronic map corresponding to the preset geographical area. Based on these geographical boundaries, the preset geographical area can be divided into a second number of plot units. Furthermore, after the second number of plot units are divided, the geographical portrait information of each plot unit can also be obtained from the base map data of the electronic map, or it can also be called descriptive information.
[0073] In this embodiment, a pre-defined geographic area is divided into multiple parcel units based on the spatial semantics of the parcels. These parcel units are semantically distinct, with each parcel unit having a specific descriptive information. This allows the resulting description of the trajectory of a target object using these parcel units to also be semantically distinct, making the description adaptable to a wider range of scenarios.
[0074] Step 102: Generate multiple stop point clusters of the target object based on the trajectory data.
[0075] Here, the point cluster can be a set of points composed of multiple points, and the stay point cluster can be a set of continuous trajectory points of the target object in a certain period of time, where the density of the continuous trajectory points reaches a preset density. n At time t1, the target object generates n trajectory points, and the aggregation density of these n trajectory points reaches the preset density. n+1 If the cluster density of n+1 trajectory points at the time instant does not reach the preset density, then it is determined that these n trajectory points constitute a stay point cluster. It is understood that the target object can have one or more stay point clusters. To distinguish it from the aforementioned multiple stay point clusters, the number of stay point clusters of the target object can be determined to be the third number.
[0076] In some embodiments, generating a third number of stay point clusters of the target object based on the trajectory data includes:
[0077] 1. Determine a plurality of trajectory point sets consisting of temporally continuous trajectory points according to a preset time threshold and time data, wherein the maximum time span between trajectory points in the trajectory point set is greater than the preset time threshold;
[0078] 2. Calculate the spatial distance between any two trajectory points in each trajectory point set to obtain the spatial distance data set corresponding to each trajectory point set;
[0079] 3. Determine the representation length of each trajectory point set based on the maximum value in each spatial distance data set;
[0080] 4. Determine the set of trajectory points whose representation length is less than a preset length threshold as the target object's stay point cluster, and obtain a third number of stay point clusters.
[0081] In an embodiment of the present application, a specific method for generating stay point clusters is provided. Before generating a stay point cluster for a target object, a spatiotemporal threshold for meeting the stay point cluster is first determined. The spatiotemporal threshold may include a time threshold and a spatial threshold. The time threshold may be a preset time period, and the spatial threshold may be a preset length threshold. The spatiotemporal thresholds may be pre-set and are not limited herein.
[0082] After determining the preset time threshold, a set of continuous trajectory points with a time span greater than the preset time threshold can be determined from the trajectory data. Here, the continuous trajectory points can be trajectory points that are continuous in time. Specifically, as mentioned above, the trajectory data of the target object can generate a trajectory point sequence in time order. Assuming that the trajectory point sequence includes the time from time t0 to time t m There are m+1 trajectory points at any two moments t. a Time to t b If the time difference between the two moments is greater than the above-mentioned preset time threshold, then all b-a+1 trajectory points between the two moments can constitute a trajectory point set. The number of trajectory point sets that meet the above conditions can be 0, 1, or multiple.
[0083] After determining multiple trajectory point sets with a time span greater than a preset time threshold, the characterization radius corresponding to each trajectory point set is calculated. The characterization radius corresponding to the trajectory point set can be the maximum value of the distance between any two trajectory points in the trajectory point set. Specifically, for any target trajectory point set, the distance between any two trajectory points in the set can be calculated to obtain multiple distance data to form a spatial distance data set corresponding to the trajectory point set. Then, the maximum value among these multiple distance data is determined as the characterization radius corresponding to the target trajectory point set. Then, by traversing all trajectory point sets, the characterization radius corresponding to all trajectory point sets can be obtained. Here, the characterization radius can also be called the characterization length.
[0084] Furthermore, the representation length corresponding to each trajectory point set is compared with a length threshold, which can be a preset length. When the representation length of the target trajectory point set is less than the preset length, the target trajectory point set is determined to be a stop point cluster for the target object. Then, each trajectory point set is traversed to determine multiple trajectory point sets with representation lengths less than the preset length, thereby obtaining a third number of stop point clusters corresponding to the target object.
[0085] In some embodiments, calculating the spatial distance between any two trajectory points in each trajectory point set to obtain a spatial distance data set corresponding to each trajectory point set includes:
[0086] 2.1. Get the number of trajectory points in each trajectory point set;
[0087] 2.2. When the number of track points in the track point set is less than a preset threshold, the spatial distance between any two track points in the track point set is calculated to obtain a spatial distance data set corresponding to the track point set;
[0088] 2.3. When the number of trajectory points in a trajectory point set is greater than or equal to a preset threshold, determine the smallest convex polygon that spatially contains each trajectory point in the trajectory point set, calculate the spatial distance between any two trajectory points on the edge of the convex polygon, and obtain the spatial distance data set corresponding to the trajectory point set.
[0089] In an embodiment of the present application, before calculating the spatial distance between any two trajectory points in each trajectory point set and obtaining the spatial distance data set corresponding to each trajectory point set, the number of trajectory points in the trajectory point set can be obtained first. After obtaining the number of trajectory points in each trajectory point set, the number of trajectory points in each trajectory point set can be compared with a preset number threshold. When the number of trajectory points in the trajectory point set is less than the preset number threshold, the amount of computation required to directly calculate the spatial distance between each two trajectory points is not large, and the spatial distance between each two trajectory points in the trajectory point set can be directly calculated to obtain the spatial distance data set corresponding to the trajectory point set. When the number of trajectory points in the trajectory point set is greater than or equal to the preset number threshold, the amount of computation required to directly calculate the spatial distance between each two trajectory points is very large. Therefore, the present application provides a method for reducing the amount of computation and improving the computation speed.
[0090] Specifically, when the number of trajectory points in a trajectory point set is greater than or equal to a preset threshold, the smallest convex polygon that spatially encompasses each trajectory point in the trajectory point set is first determined, yielding the convex hull corresponding to each trajectory point set. For ease of understanding, the convex hull can be thought of as a rubber band encompassing all trajectory points in the trajectory point set. After determining the convex hull corresponding to the trajectory point set, target trajectory points located at the edge of the convex hull are further identified. The spatial distances between target trajectory points located at the edge of the convex hull are then calculated, yielding multiple spatial distance data sets, ultimately forming a set of spatial distance data corresponding to the trajectory point set.
[0091] In this embodiment of the present application, when the number of trajectory points in a trajectory point set is small, the maximum spatial distance between any two points is used as the representation length of the trajectory point set. When the number of trajectory points in a trajectory point set is large, the maximum spatial distance between the edge trajectory points of the convex hull corresponding to the trajectory point set is used as the representation length of the trajectory point set. This reduces the amount of calculation required to determine the representation length of the trajectory point set, thereby improving data processing efficiency.
[0092] Step 103: Determine a set of land parcel units corresponding to each stay point cluster based on the positioning data.
[0093] After determining the third number of stay point clusters corresponding to the target object, the geographic location corresponding to each stay point cluster needs to be described. In this application, the basic unit for describing the geographic location of each stay point cluster can be the multiple land parcel units obtained by the division in step 102. Specifically, for each individual trajectory point in each stay point cluster, its target land parcel unit can be determined based on the positioning data it carries. Then, the set of land parcel units corresponding to the stay point cluster can be further determined based on the target land parcel unit corresponding to each trajectory point.
[0094] In some embodiments, determining a set of land parcel units corresponding to each stay point cluster based on the positioning data includes:
[0095] 1. Based on the positioning data of the trajectory points contained in each stay point cluster, generate the minimum convex polygon that spatially contains each trajectory point in the corresponding stay point cluster, and obtain the convex hull corresponding to each stay point cluster;
[0096] 2. Find multiple plot units that intersect with any target convex hull and obtain the first plot unit set corresponding to each convex hull;
[0097] 3. Calculate the intersection area between each plot unit in the first plot unit set and the corresponding convex hull;
[0098] 4. Determine the plot units whose intersection areas meet the preset conditions as the target plot units corresponding to the stay point cluster, and obtain the set of plot units corresponding to each stay point cluster.
[0099] In this embodiment of the present application, it is not necessary to determine the corresponding plot unit based on the positioning data of each trajectory point in the trajectory point set one by one. In particular, when the trajectory point set contains a large number of trajectory points, determining the plot unit where each trajectory point is located one by one consumes a large amount of computing resources. In this embodiment of the present application, the convex hull corresponding to each stay point cluster can be determined first, where the convex hull corresponding to the stay point cluster is the smallest convex polygon that spatially contains all the trajectory points in the stay point cluster.
[0100] After determining the convex hull corresponding to any target stop point cluster, multiple plot units that intersect with the convex hull can be further determined based on the spatial position of the convex hull corresponding to the target stop point cluster. Intersection with the convex hull can specifically mean that there is an intersection between the ground occupied by the plot unit and the ground occupied by the convex hull. That is, when part or all of a plot unit is within the convex hull, the plot unit is determined to be a plot unit that intersects with the convex hull. It will be understood that there must be at least one plot unit that intersects with the convex hull. All plot units that intersect with the convex hull can be searched for within the second number of plot units obtained by partitioning, thereby obtaining a set of plot units that intersect with the convex hull.
[0101] Furthermore, because the convex hull corresponding to a stay point cluster is expanded to a certain extent when determining the convex hull based on the trajectory points in the stay point cluster, some plot units with a weak correlation with the stay point cluster may be determined as the plot units corresponding to the stay point cluster. For example, if a plot unit does not contain any trajectory points from the stay point cluster, and the intersection area between the convex hull corresponding to the stay point cluster and this plot unit is also very small, it can be determined that the correlation between this plot unit and the stay point cluster is also very small. At this point, these plot units with very weak correlations need to be excluded from the set of plot units intersecting with the convex hull to prevent them from interfering with the determination of the target object's stay area.
[0102] Therefore, after determining the set of plot units that intersect the convex hull, the intersection area of each plot unit in the set of plot units that intersect the convex hull and the convex hull can be further calculated. Then, based on the intersection area, plot units whose intersection areas meet certain conditions can be identified. The intersection area condition can include the intersection area being greater than a preset area or the intersection area accounting for a percentage of the plot unit area reaching a preset threshold. Furthermore, the set of plot units that meet these conditions can be determined as the set of plot units corresponding to the target stop point cluster. Furthermore, each stop point cluster can be traversed to obtain the set of plot units corresponding to each stop point cluster.
[0103] In some embodiments, determining a plot unit whose intersection area meets a preset condition as a target plot unit corresponding to a stay point cluster, and obtaining a set of plot units corresponding to each stay point cluster includes:
[0104] 4.1. When there is a target plot unit whose ratio of the intersection area to the reference area is greater than a preset ratio, a set of plot units corresponding to the stay point cluster is generated based on the target plot unit. The reference area is the minimum value between the plot unit area and the area of the corresponding convex hull.
[0105] 4.2. When there is no plot unit whose ratio of intersection area to reference area is greater than the preset ratio, the plot unit with the largest intersection area with the corresponding convex hull is determined as the target plot unit, and a set of plot units corresponding to the stay point cluster is generated based on the target plot unit.
[0106] Among them, since the intersection area is the intersection area of the plot unit and the convex hull, that is, for any target intersection area, it is the area of the intersection of the target plot unit and the convex hull, that is, there is a one-to-one correspondence between the intersection area and the plot unit. In an embodiment of the present application, a reference area can be set for each intersection area. For any target intersection area, its corresponding reference area can be set as the minimum value between its corresponding plot unit area and the convex hull area. Specifically, for example, the area of the convex hull corresponding to the stay point cluster is 100 square meters, and there are three plot units intersecting with the convex hull. The areas of these three plot units are 50 square meters, 80 square meters, and 110 square meters respectively. The intersection areas of these three plot units with the convex hull are 20 square meters, 30 square meters, and 40 square meters respectively. Then the reference area corresponding to the intersection area of 20 square meters is the minimum value between 50 square meters and 100 square meters, that is, 50 square meters. Similarly, the reference area corresponding to the intersection area of 40 square meters is the minimum value between 110 square meters and 100 square meters, that is, 100 square meters.
[0107] As can be seen from the above description, each intersection area has a corresponding reference area. Furthermore, the ratio of the intersection area to its corresponding reference area can be calculated. If the ratio is greater than a preset ratio, the plot unit corresponding to the intersection area can be determined to be the plot unit corresponding to the stop point cluster. Further, all plot units that intersect the convex hull corresponding to the stop point cluster are traversed, and all plot units whose ratio of intersection area to reference area is greater than the preset ratio are identified to obtain the set of plot units corresponding to the stop point cluster.
[0108] If all plot units intersecting the convex hull corresponding to the stop point cluster are traversed and no plot unit exists whose ratio of the intersection area to the reference area is greater than a preset ratio, a target plot unit whose convex hull intersects the stop point cluster with the largest area is determined. Based on this target plot unit, a set of plot units corresponding to the stop point cluster is determined. It is understood that this set contains only one element.
[0109] Step 104 : performing joint processing on the land parcel units in the land parcel unit set to obtain a target area corresponding to the target object.
[0110] After determining the plot unit set corresponding to each stay point cluster, further joint processing can be performed on the plot units in the plot unit set to obtain a target area corresponding to the target object. Joint processing of the plot units in multiple plot unit sets can be performed by jointly processing the plot units in each plot unit set to obtain multiple target areas corresponding to the target object, or by jointly processing all plot units included in the multiple plot units to obtain at least one target area corresponding to the target object.
[0111] In some embodiments, performing joint processing on the plot units in the plot unit set to obtain a target area corresponding to the target object includes:
[0112] 1. Calculate the union of the plot unit sets to obtain the target plot unit set corresponding to the target object;
[0113] 2. Extracting continuously connected plot units from the target plot unit set to obtain multiple sub-target plot unit sets;
[0114] 3. Jointly process the plot units in each sub-target plot unit set to obtain multiple target areas corresponding to the target object.
[0115] In some cases, there may be intersections between the stay point clusters. If the multiple target areas corresponding to the target object are determined based on the plot unit sets corresponding to each stay point cluster, there may be intersections between the target areas, making the description of the target object's stay area or frequent activity area inaccurate. In this case, it is necessary to merge the plot units corresponding to these intersectional stay point clusters. In an embodiment of the present application, for multiple plot unit sets corresponding to multiple stay point clusters, the union of these plot unit sets can be first calculated to obtain a target plot unit set consisting of all the plot units corresponding to the stay point clusters.
[0116] After determining the target parcel unit set consisting of all parcel units corresponding to the stay point cluster, the connectivity between each parcel unit in the target parcel unit set can be further determined. Based on the connectivity between the parcel units, a sub-target parcel unit set consisting of multiple continuously connected parcel units can be determined. Furthermore, the parcel units in each sub-target parcel unit set can be jointly processed to obtain multiple target areas corresponding to the target object.
[0117] In this way, the target plot unit set can be obtained by calculating the union of multiple plot unit sets, thereby eliminating duplicate plot units. Then, based on the connectivity between the plot units, a sub-target plot unit set consisting of continuous plot units is determined. The plot units in the sub-target plot unit set are then processed together to obtain multiple target areas corresponding to the target object. This improves the accuracy of the target area corresponding to the target object.
[0118] In some embodiments, continuously connected plot units are extracted from the target plot unit set to obtain multiple sub-target plot unit sets, including:
[0119] 2.1. Enlarging each plot unit in the target plot unit set according to a preset size to obtain an enlarged plot unit;
[0120] 2.2. Generate the adjacency matrix corresponding to the target plot unit set based on the intersection relationship between the enlarged plot units;
[0121] 2.3. Generate an adjacency relationship graph between the plot units in the target plot unit set based on the adjacency matrix;
[0122] 2.4. Extract multiple maximal connected subgraphs from the adjacency graph;
[0123] 2.5. Determine multiple sub-target plot unit sets based on multiple maximal connected subgraphs.
[0124] In an embodiment of the present application, after determining the target plot unit set corresponding to the target object, each plot unit in the target plot unit set can be enlarged according to a preset size to obtain an enlarged plot unit for each plot unit. It is then possible to determine whether the enlarged plot units intersect one by one. If the enlarged plot units do intersect, the plot units before enlargement are determined to be adjacent. In this way, the adjacency relationship between the plot units before enlargement can be determined one by one, and an adjacency matrix corresponding to the target plot unit set can be generated accordingly. Furthermore, an adjacency relationship graph between the plot units in the target plot unit set can be constructed, with each plot unit as a node, using the adjacency relationship matrix to illustrate the connection relationship between the nodes. From the adjacency relationship graph, multiple maximal connected subgraphs contained in the graph can be easily derived. A maximal connected subgraph is an adjacency relationship graph in which one node is continuously connected to another node through other nodes. These continuously connected nodes form a node sequence, and the two nodes at the two ends of the sequence are no longer connected to other nodes in the node sequence. Furthermore, multiple target plot unit sets can be determined based on multiple maximal connected subgraphs. Among them, each node in the maximal connected subgraph corresponds to a plot unit.
[0125] In some embodiments, the land parcel units in each sub-target land parcel unit set are jointly processed to obtain multiple target areas corresponding to the target object, including:
[0126] 3.1. Enlarge each plot unit in each sub-target plot unit set according to a preset size to obtain an enlarged plot unit corresponding to each sub-target plot unit set;
[0127] 3.2. Spatially superimpose the enlarged plot units corresponding to each sub-target plot unit set to obtain multiple spatial regions;
[0128] 3.3. Reduce each spatial region according to a preset size to obtain multiple target regions corresponding to the target object.
[0129] After determining the multiple sub-target plot unit sets corresponding to the target object, the plot units in each sub-target plot unit set can be jointly processed to obtain multiple target areas corresponding to the target object. It can be understood that each sub-target plot unit set corresponds to a target area.
[0130] A specific method for determining the target area based on the sub-target plot unit set is to enlarge each plot unit in the sub-target plot unit set according to a preset size to obtain an enlarged plot unit corresponding to the sub-target plot unit set. Then, the enlarged plot units are combined. Since the plot units in the alphabet plot unit set are inherently interconnected, there will be intersections between the enlarged plot units. The multiple enlarged plot units are spatially superimposed, that is, only one intersection is retained, to obtain an overall area composed of multiple enlarged plot units. Then, the obtained overall area is reduced according to the aforementioned enlarged size to obtain a target area corresponding to the target object. Further, each sub-target plot unit set can be traversed to obtain multiple target areas corresponding to the target object.
[0131] According to the above description, the data processing method provided by the embodiment of the present application obtains the trajectory data of the target object and the plot unit data, wherein the trajectory data includes the positioning data and time data corresponding to the multiple trajectory points of the target object; generates multiple stay point clusters of the target object based on the trajectory data, wherein the stay point cluster is composed of multiple trajectory points with a clustering density greater than a preset threshold; determines the plot unit set corresponding to each stay point cluster based on the positioning data; and performs joint processing on the plot units in the plot unit set to obtain the target area corresponding to the target object. In this way, the trajectory data corresponding to the stay area of the target object is automatically determined from the trajectory data of the target object, and the stay area of the target object with spatial semantics is determined by combining the trajectory data corresponding to the stay area and the plot units divided according to the geographic portrait information. This method can improve the efficiency of data processing, thereby improving the efficiency of determining the target area corresponding to the target object.
[0132] The present application also provides a data processing method, which can be used in a computer device, which can be a terminal or a server. Figure 3 FIG. 1 is another flow chart of the data processing method provided by the present application, which specifically includes:
[0133] Step 201: A computer device obtains trajectory data of an object.
[0134] Among them, the computer device determines the object's usual activity area and needs to first obtain the object's trajectory data. The trajectory data can be the object's trajectory data within a specific time period, and the trajectory data contains multiple trajectory points arranged in chronological order. The data format of each trajectory point can be P(x, y, t), where x is the geographic longitude of the trajectory point positioning data, y is the geographic latitude of the trajectory point positioning data, and t is the timestamp corresponding to the collection of the trajectory point positioning data. The object trajectory data contains multiple of the above-mentioned trajectory point data arranged in chronological order, specifically P0, P1...P n-2 , P n-1 A total of n trajectory points arranged in time sequence constitute a trajectory sequence. The acquisition of the object trajectory data can be collected by the computer device itself or input by the user, which is not limited here.
[0135] In step 202 , the computer device uses a stay point recognition algorithm to identify multiple stay point clusters of the object from the trajectory data of the object.
[0136] Among them, after obtaining the trajectory data of an object, a stay point recognition algorithm can be used to process the trajectory data of the object into several stay point clusters. The stay point recognition algorithm can be rule judgment based on distance and time, or a density-based clustering algorithm (Density-Based Spatial Clustering of Applications with Noise, DBSCAN). Next, the process of identifying multiple stay point clusters from the trajectory data using the stay point recognition algorithm will be described in detail.
[0137] First, the spatio-temporal threshold for stay point recognition can be set, specifically including the time threshold T time and the spatial threshold T dist . The specific values of the time threshold and the spatial threshold can be set by oneself. Specifically, for example, T time can be set to 20 minutes, and T dist can be set to 500 meters.
[0138] Then, a loop algorithm can be set. First, initialize i = 0 and calculate j, where j is a positive integer and j < n. Make the time difference between the trajectory points P i to P j greater than or equal to T time , and the time difference between the trajectory points P i to P j-1 less than T time .
[0139] If such a j exists, then determine P0, P1...P j-1 , P <
[0144] When the number of trajectory points in the transition point cluster is less than a preset threshold, the convex hull corresponding to the transition point cluster can be determined first, and the maximum distance between the trajectory points on the convex hull contour is calculated as the representation radius of the transition point cluster.
[0145] If the representation radius of the transition point cluster is greater than the spatial threshold T dist , then the object is in this T time The activity trajectory within a period of time is relatively scattered and does not reside in a certain area, so it is not suitable as a stop point. If the representation radius of the transition point cluster is not greater than the spatial threshold T dist , then the object is in this T time If activity trajectories within a certain period of time are compared and clustered together, and if they reside in a certain area and are suitable as stop points, then this transition point cluster is determined to be the stop point cluster for the object. Then, each transition point cluster is traversed and those with a representation radius no greater than a spatial threshold are identified as stop point clusters, resulting in multiple stop point clusters for the object. To characterize each stop point cluster, the longitude and latitude coordinates of the center of the convex hull corresponding to the stop point cluster can be determined to represent the location of the stop point cluster, and the average or median time timestamp is used to represent the time of the stop point cluster.
[0146] Step 203: The computer device obtains basic land parcel unit data.
[0147] The trajectory data of an object includes the longitude and latitude data of each trajectory. However, if the longitude and latitude data is used to describe the object's frequent activity area, it will be too clumsy and its actual meaning cannot be determined. As a result, the usefulness of the information on the user's frequent activity area is limited. For example, if the user's frequent activity area is determined to be around 115 degrees east longitude and 22 degrees north latitude, then this only determines the approximate area of the user's frequent activity, and it is impossible to further describe the user's profile based on this data, let alone make other uses based on the user profile.
[0148] Therefore, in an embodiment of the present application, basic plot units with spatial semantics near the trajectory data of the object are obtained. Specifically, these plot units are divided according to the spatial semantics of the plots, for example, a certain community is a plot unit, a certain shopping mall is a plot unit, and a certain park is a plot unit, so as to obtain multiple plot units. Each plot unit can be described in the following format (identification, outline), where the identification can be a unique identity document (ID) of the plot unit, and the outline can include multiple sets of coordinate data recording the outline of the plot unit.
[0149] Specifically, the parcel unit data can be obtained by the computer device automatically dividing the area and determining the identification and outline of each parcel unit, or it can be obtained from other terminals or servers. Whether obtained from other terminals or servers or determined by the computer device, the parcel unit data is obtained by dividing the area according to spatial semantics.
[0150] In step 204 , the computer device queries the multiple plot units corresponding to each stay point cluster to obtain the plot units where the object is often active.
[0151] After determining the multiple stay point clusters of the object, the multiple stay point clusters of the object can be further mapped to plot units to obtain the plot units corresponding to each stay point cluster, and then obtain the plot units corresponding to the object's frequent activity area.
[0152] Specifically, for each stop point cluster, a convex hull algorithm can be used to construct the convex hull contour of each stop point cluster. Specifically, the Graham scanning method (a convex hull scanning method, also known as the Graham method) or the Jarvis stepping method (wrapping method) can be used to construct the convex hull contour. The convex hull is a convex polygon consisting of a subset of the points in the click (i.e., if two points on a polygon are taken and connected by a line segment, every point on the line segment is on or inside the polygon).
[0153] A spatial index can be constructed for the basic land parcel unit data obtained in step 203. Specifically, a quadtree index or an R-tree (a tree-like data structure) method can be used to construct the spatial index. Multiple land parcel units that intersect the convex hull are then queried based on the spatial index.
[0154] Specifically, for any target stop point cluster corresponding to the target convex hull X, determine the set of plot units Ys that intersect with it. For any plot unit Y in Ys, the following two conditions can be judged:
[0155] S(X∩Y)≥[AT]*S(X) Formula (1)
[0156] S(X∩Y)≥[AT]*S(Y) Formula (2)
[0157] Where S represents the area operator, S(X∩Y) represents the intersection area between the plot unit Y and the target convex hull X, and [AT] is a preset threshold parameter with a value of (0, 1), for example, 0.5.
[0158] If Y in Ys satisfies formula (1), it means that a certain proportion of the area of the convex hull X falls within the plot unit Y; if Y in Ys satisfies formula (2), it means that a certain proportion of the area of the plot unit Y falls within the convex hull X.
[0159] When there is a Y in Ys that satisfies any one of the above equations (1) or (2), all Ys that meet the above conditions are determined to obtain the set of plot units corresponding to the target convex hull X.
[0160] If there is no Y in Ys that meets the above conditions, the plot unit with the largest intersection area with the target convex hull X is determined as the plot unit set corresponding to the target convex hull. This set contains only one element. Then, each stop point cluster can be traversed to obtain the plot unit set corresponding to each stop point cluster.
[0161] After determining the plot unit set corresponding to each stay point cluster, the union of these plot unit sets is determined as the plot unit set where the object often moves, wherein each plot unit is a plot unit where the object often moves.
[0162] Step 205: The computer device generates a spatial adjacency matrix based on the land units where the object is usually active.
[0163] After the plot units where the object is often active are determined, the object's often active area may be further determined based on the plot units where the object is often active.
[0164] Specifically, a buffer distance d can be set, and for any two plot units A and plot unit B in the object's frequently active plot units, both are buffered (expanded) outward according to the distance d. If the buffered outlines of the two intersect, it is determined that plot unit A and plot unit B are adjacent plot units, otherwise it is determined that the two are not adjacent. Then, every two plot units in the object's frequently active plot units can be traversed to determine the adjacency relationship between any two plot units. Furthermore, based on the adjacency relationship between the frequently active plot units, an N*N spatial adjacency matrix E can be constructed, where N is the number of the object's frequently active plot units.
[0165] In step 206 , the computer device mines the maximum connected subgraph from the adjacency matrix to obtain a plurality of land unit clusters corresponding to the object.
[0166] Among them, an undirected graph can be constructed with the object's frequently active plot units as nodes and the above-mentioned adjacency matrix E as edges. Then, the various maximal connected subgraphs can be mined from the undirected graph through the breadth first search method (BFS) or the union-find method to obtain multiple maximal connected subgraphs. Each node in each maximal connected subgraph corresponds to a plot unit where the object is frequently active, and these plot units constitute a plot unit cluster. Then, based on multiple maximal connected subgraphs, multiple plot unit clusters can be obtained.
[0167] In step 207 , the computer device performs joint processing on each land unit cluster to obtain the object's usual activity area.
[0168] After obtaining multiple plot unit clusters corresponding to the object, the plot units in each plot unit cluster can be jointly processed to aggregate them into a complete outline, thereby obtaining a common activity area for the object. Specifically, the plot units in the plot unit cluster can be jointly processed by first buffering (expanding) each plot unit in the cluster outward by a distance d, then jointly processing the expanded plot units using a spatial overlay analysis method to integrate them into a single outline, and then buffering (shrinking) them inward by a distance d to obtain a common activity area for the object. Then, by traversing each plot unit cluster, multiple common activity areas for the object can be obtained.
[0169] like Figure 4 The figure shows a scenario diagram for determining the user's frequent activity area. Specifically, the user's trajectory data can be obtained first. The trajectory data includes multiple trajectory points 11 of the user and the time data corresponding to each trajectory point. Then, the basic plot unit data can be obtained. The basic plot unit includes multiple plot units with spatial semantics obtained by dividing the preset area 10, such as XX Apartment, XX Shopping Mall, XX Primary School and XX Park. Then, multiple stay point clusters are determined based on the user's trajectory data, and the multiple plot units corresponding to each stay point cluster are further determined. After determining the plot units where the user is frequently active, the connectivity of these plot units is calculated to obtain multiple plot unit clusters; finally, each plot unit cluster is jointly processed to obtain the user's frequent activity area 12.
[0170] According to the above description, the data processing method provided by the embodiment of the present application obtains the trajectory data of the target object and the plot unit data, wherein the trajectory data includes the positioning data and time data corresponding to the multiple trajectory points of the target object; generates multiple stay point clusters of the target object based on the trajectory data, wherein the stay point cluster is composed of multiple trajectory points with a clustering density greater than a preset threshold; determines the plot unit set corresponding to each stay point cluster based on the positioning data; and performs joint processing on the plot units in the plot unit set to obtain the target area corresponding to the target object. In this way, the trajectory data corresponding to the stay area of the target object is automatically determined from the trajectory data of the target object, and the stay area of the target object with spatial semantics is determined by combining the trajectory data corresponding to the stay area and the plot units divided according to the geographic portrait information. This method can improve the efficiency of data processing, thereby improving the efficiency of determining the target area corresponding to the target object.
[0171] In order to better implement the above method, an embodiment of the present invention further provides a data processing device, which can be integrated into a terminal or a server.
[0172] For example, Figure 5 , which is a schematic diagram of the structure of a data processing device provided in an embodiment of the present application, the data processing device may include an acquisition unit 301, a generation unit 302, a determination unit 303, and a combination unit 304, as follows:
[0173] An acquisition unit 301 is configured to acquire trajectory data of a target object and obtain plot unit data, wherein the trajectory data includes positioning data and time data corresponding to multiple trajectory points of the target object;
[0174] A generating unit 302 is configured to generate a plurality of stay point clusters of the target object according to the trajectory data, wherein the stay point cluster is composed of a plurality of trajectory points having a clustering density greater than a preset threshold;
[0175] A determination unit 303 is configured to determine a set of plot units corresponding to each stay point cluster based on the positioning data;
[0176] The combining unit 304 is configured to perform combined processing on the plot units in the plot unit set to obtain a target area corresponding to the target object.
[0177] In some embodiments, the generating unit includes:
[0178] a first determining subunit, configured to determine, based on a preset time threshold and time data, a plurality of trajectory point sets consisting of temporally continuous trajectory points, wherein a maximum time span between trajectory points in the trajectory point set is greater than the time threshold;
[0179] The first calculation subunit is used to calculate the spatial distance between any two trajectory points in each trajectory point set to obtain a spatial distance data set corresponding to each trajectory point set;
[0180] a second determining subunit, configured to determine a representation length of each trajectory point set according to a maximum value in each spatial distance data set;
[0181] The third determining subunit is configured to determine a set of trajectory points whose representation length is less than a preset length as a stay point cluster of the target object, and obtain a plurality of stay point clusters.
[0182] In some embodiments, the computing subunit includes:
[0183] An acquisition module, used to obtain the number of trajectory points in each trajectory point set;
[0184] a calculation module, configured to calculate the spatial distance between any two trajectory points in the trajectory point set when the number of trajectory points in the trajectory point set is less than a preset number threshold, and obtain a spatial distance data set corresponding to the trajectory point set;
[0185] The first determination module is used to determine the minimum convex polygon that spatially contains each trajectory point in the trajectory point set when the number of trajectory points in the trajectory point set is greater than or equal to a preset number threshold, calculate the spatial distance between any two trajectory points on the edge of the convex polygon, and obtain the spatial distance data set corresponding to the trajectory point set.
[0186] In some embodiments, the determining unit includes:
[0187] A generating subunit is used to generate a minimum convex polygon that spatially contains each trajectory point in the corresponding stay point cluster based on the positioning data of the trajectory points contained in each stay point cluster, and obtain the convex hull corresponding to each stay point cluster;
[0188] A search subunit is used to search for multiple plot units that intersect with any target convex hull, and obtain a first plot unit set corresponding to each convex hull;
[0189] A second calculation subunit is used to calculate the intersection area between each land parcel unit in the first land parcel unit set and the corresponding convex hull;
[0190] The fourth determining subunit is configured to determine the plot units whose intersection areas meet a preset condition as target plot units corresponding to the stay point cluster, and obtain a set of plot units corresponding to each stay point cluster.
[0191] In some embodiments, the fourth determining subunit includes:
[0192] A first generating module is configured to generate a set of plot units corresponding to a stay point cluster based on a target plot unit when there is a target plot unit whose ratio of the intersection area to the reference area is greater than a preset ratio, wherein the reference area is the minimum value between the plot unit area and the area of the corresponding convex hull;
[0193] The second determination module is used to determine the plot unit with the largest intersection area with the corresponding convex hull as the target plot unit when there is no plot unit whose ratio of the intersection area to the reference area is greater than the preset ratio, and generate a plot unit set corresponding to the stay point cluster based on the target plot unit.
[0194] In some embodiments, the combined unit comprises:
[0195] The third calculation subunit is used to calculate the union of the plot unit sets to obtain the target plot unit set corresponding to the target object;
[0196] Extracting sub-units, for extracting continuously connected plot units from the target plot unit set to obtain multiple sub-target plot unit sets;
[0197] The combined sub-unit is used to perform combined processing on the plot units in each sub-target plot unit set to obtain multiple target areas corresponding to the target object.
[0198] In some embodiments, the extraction subunit includes:
[0199] A first enlarging module is configured to enlarge each plot unit in the target plot unit set according to a preset size to obtain an enlarged plot unit;
[0200] The second generation module is used to generate an adjacency matrix corresponding to the target land parcel unit set according to the intersection relationship between the enlarged land parcel units;
[0201] A third generating module is used to generate an adjacency relationship graph between the plot units in the target plot unit set based on the adjacency matrix;
[0202] An extraction module, used to extract multiple maximal connected subgraphs from the adjacency graph;
[0203] The third determination module is used to determine multiple sub-target plot unit sets according to multiple maximal connected subgraphs.
[0204] In some embodiments, the combined subunit comprises:
[0205] A second enlarging module is configured to enlarge each plot unit in each sub-target plot unit set according to a preset size to obtain an enlarged plot unit corresponding to each sub-target plot unit set;
[0206] A superposition module is used to spatially superimpose the enlarged plot units corresponding to each sub-target plot unit set to obtain multiple spatial regions;
[0207] The reduction module is used to reduce each spatial area according to a preset size to obtain multiple target areas corresponding to the target object.
[0208] In specific implementation, the above units can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same or several entities. The specific implementation of the above units can be found in the previous method embodiments and will not be repeated here.
[0209] As can be seen from the above description, the data processing method provided in the embodiment of the present application obtains the trajectory data of the target object and the plot unit data through the acquisition unit 301. The trajectory data includes the positioning data and time data corresponding to multiple trajectory points of the target object; the generation unit 302 generates multiple stay point clusters of the target object based on the trajectory data, and the stay point cluster is composed of multiple trajectory points with a clustering density greater than a preset threshold; the determination unit 303 determines the plot unit set corresponding to each stay point cluster based on the positioning data; and the combination unit 304 combines the plot units in the plot unit set to obtain the target area corresponding to the target object. In this way, the trajectory data corresponding to the target object's stay area is automatically determined from the target object's trajectory data, and the stay area of the target object with spatial semantics is determined by combining the trajectory data corresponding to the stay area and the plot units divided according to geographic portrait information. This method can improve the efficiency of data processing, thereby improving the efficiency of determining the target area corresponding to the target.
[0210] The embodiment of the present application also provides a computer device, which can be a terminal or a server. Figure 6 The figure shows the structure of the computer device provided by this application. Specifically:
[0211] 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 understand that Figure 6 The computer device structure shown in the figure does not constitute a limitation on the computer device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange components differently.
[0212] Processing module 401 is the control center of the computer device. It utilizes various interfaces and circuits to connect the various components of the entire computer device. By running or executing software programs and / or modules stored in storage unit 402 and accessing data stored in storage unit 402, it performs various functions of the computer device and processes data, thereby performing overall testing of the computer device. Optionally, processing module 401 may include one or more processing cores; preferably, processing module 401 may integrate an application processor and a modem processor, wherein the application processor primarily processes the operating system, user interface, and application programs, while the modem processor primarily handles wireless communications. It is understood that the modem processor may not be integrated into processing module 401.
[0213] The storage unit 402 can be used to store software programs and modules. The processing module 401 executes various functional applications and data processing by running the software programs and modules stored in the storage unit 402. The storage unit 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, at least one application required for a function (such as a sound playback function, an image playback function, and web page access, etc.); the data storage area may store data created based on the use of the computer device, etc. In addition, the storage unit 402 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage device. Accordingly, the storage unit 402 may also include a memory controller to provide the processing module 401 with access to the storage unit 402.
[0214] The computer device also includes a power supply module 403 for supplying power to various components. Preferably, the power supply module 403 can be logically connected to the processing module 401 via a power management system, thereby enabling the power management system to manage charging, discharging, and power consumption. The power supply module 403 can also include one or more DC or AC power supplies, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and other arbitrary components.
[0215] The computer device may further include an input module 404, which may be configured to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
[0216] Although not shown, the computer device may further include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processing module 401 in the computer device will load the executable files corresponding to one or more application processes into the storage unit 402 according to the following instructions, and the processing module 401 will run the application stored in the storage unit 402 to implement various functions as follows:
[0217] Acquire trajectory data of a target object and obtain plot unit data, where the trajectory data includes positioning data and time data corresponding to multiple trajectory points of the target object; generate multiple stay point clusters of the target object based on the trajectory data, where the stay point clusters are composed of multiple trajectory points with a clustering density greater than a preset threshold; determine the plot unit set corresponding to each stay point cluster based on the positioning data; and jointly process the plot units in the plot unit set to obtain a target area corresponding to the target object.
[0218] It should be noted that the computer device provided in the embodiment of the present application and the method in the above embodiment belong to the same concept. The specific implementation of the above operations can be referred to the previous embodiment and will not be repeated here.
[0219] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be accomplished by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.
[0220] To this end, an embodiment of the present invention provides a computer-readable storage medium storing a plurality of instructions that can be loaded by a processor to execute the steps of any method provided in an embodiment of the present invention. For example, the instructions can execute the following steps:
[0221] Acquire trajectory data of the target object and obtain plot unit data, the trajectory data including positioning data and time data corresponding to multiple trajectory points of the target object; divide a preset geographic area containing each trajectory point into multiple plot units having geographic boundaries and corresponding geographic portrait information; generate a third number of stay point clusters of the target object based on the trajectory data, the stay point cluster consisting of multiple trajectory points with a clustering density greater than a preset threshold; determine a plot unit set corresponding to each stay point cluster based on the positioning data; and jointly process the plot units in the plot unit set to obtain a target area corresponding to the target object.
[0222] The specific implementation of the above operations can be found in the previous embodiments and will not be repeated here.
[0223] The computer-readable storage medium may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0224] Since the instructions stored in the computer-readable storage medium can execute the steps in any method provided in the embodiments of the present invention, the beneficial effects that can be achieved by any method provided in the embodiments of the present invention can be achieved. Please refer to the previous embodiments for details and will not be repeated here.
[0225] According to one aspect of the present application, a computer program product or computer program is provided, wherein the computer program product or computer program includes computer instructions, and the computer instructions are stored in a storage medium. A processor of a computer device reads the computer instructions from the storage medium, and the processor executes the computer instructions, so that the computer device performs the above-mentioned Figure 2 or Figure 3 Methods provided in various optional implementations.
[0226] The above is a detailed introduction to a data processing method, device, computer-readable storage medium and computer equipment provided by an embodiment of the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core ideas. At the same time, for those skilled in the art, according to the ideas of the present invention, there may be changes in the specific implementation methods and application scopes. In summary, the contents of this specification should not be understood as limiting the present invention.
Claims
1. A data processing method, characterized in that: The method comprises: Acquire trajectory data of a target object and obtain plot unit data, wherein the trajectory data includes positioning data and time data corresponding to a plurality of trajectory points of the target object; generating a plurality of stay point clusters of the target object according to the trajectory data, wherein the stay point clusters are composed of a plurality of trajectory points having a clustering density greater than a preset threshold; Determining a set of plot units corresponding to each stay point cluster based on the positioning data and the plot unit data, including: generating a minimum convex polygon that spatially contains each trajectory point in the corresponding stay point cluster based on the positioning data of the trajectory points included in each stay point cluster, to obtain a convex hull corresponding to each stay point cluster; searching for multiple plot units that intersect with any target convex hull to obtain a first set of plot units corresponding to each convex hull; calculating an intersection area between each plot unit in the first set of plot units and the corresponding convex hull; when there is no plot unit whose ratio of the intersection area to the reference area is greater than a preset ratio, determining the plot unit with the largest intersection area with the corresponding convex hull as the target plot unit, and generating a set of plot units corresponding to the stay point cluster based on the target plot unit; The land parcel units in the land parcel unit set are jointly processed to obtain a target area corresponding to the target object.
2. The method according to claim 1, characterized in that Generating a plurality of stop point clusters of the target object according to the trajectory data includes: determining a plurality of trajectory point sets consisting of temporally continuous trajectory points according to a preset time threshold and the time data, wherein a maximum time span between trajectory points in the trajectory point set is greater than the preset time threshold; Calculate the spatial distance between any two trajectory points in each trajectory point set to obtain the spatial distance data set corresponding to each trajectory point set; Determine the representation length of each trajectory point set according to the maximum value in each spatial distance data set; A set of trajectory points whose representation length is less than a preset length threshold is determined as a stay point cluster of the target object, and multiple stay point clusters are obtained.
3. The method according to claim 2, characterized in that The calculating the spatial distance between any two trajectory points in each trajectory point set to obtain a spatial distance data set corresponding to each trajectory point set includes: Get the number of trajectory points in each trajectory point set; When the number of track points in the track point set is less than a preset threshold, the spatial distance between any two track points in the track point set is calculated to obtain a spatial distance data set corresponding to the track point set; When the number of trajectory points in the trajectory point set is greater than or equal to a preset threshold, the smallest convex polygon that spatially contains each trajectory point in the trajectory point set is determined, and the spatial distance between any two trajectory points on the edge of the convex polygon is calculated to obtain the spatial distance data set corresponding to the trajectory point set.
4. The method according to claim 1, wherein The method further comprises: When there is a target plot unit whose ratio of the intersection area to the reference area is greater than a preset ratio, a plot unit set corresponding to the stay point cluster is generated based on the target plot unit, and the reference area is the minimum value between the plot unit area and the area of the corresponding convex hull.
5. The method according to claim 1, wherein The jointly processing the land parcel units in the land parcel unit set to obtain the target area corresponding to the target object includes: Calculating the union of the plot unit sets to obtain a target plot unit set corresponding to the target object; Extracting continuously connected plot units from the target plot unit set to obtain multiple sub-target plot unit sets; The land parcel units in each sub-target land parcel unit set are jointly processed to obtain multiple target areas corresponding to the target object.
6. The method according to claim 5, characterized in that The step of extracting continuously connected plot units from the target plot unit set to obtain a plurality of sub-target plot unit sets includes: Enlarging each plot unit in the target plot unit set according to a preset size to obtain an enlarged plot unit; Generate an adjacency matrix corresponding to the target plot unit set based on the intersection relationship between the enlarged plot units; generating an adjacency relationship graph between the plot units in the target plot unit set based on the adjacency matrix; Extracting multiple maximal connected subgraphs from the adjacency relationship graph; A plurality of sub-target plot unit sets are determined based on the plurality of maximal connected subgraphs.
7. The method according to claim 6, characterized in that The joint processing of the plot units in each sub-target plot unit set to obtain multiple target areas corresponding to the target object includes: Enlarging each plot unit in each sub-target plot unit set according to a preset size to obtain an enlarged plot unit corresponding to each sub-target plot unit set; The amplified plot units corresponding to each sub-target plot unit set are spatially superimposed to obtain multiple spatial regions; Each spatial region is reduced according to a preset size to obtain multiple target regions corresponding to the target object.
8. A data processing device, characterized in that: The device comprises: an acquisition unit, configured to acquire trajectory data of a target object and obtain plot unit data, wherein the trajectory data includes positioning data and time data corresponding to a plurality of trajectory points of the target object; a generating unit, configured to generate a plurality of stay point clusters of the target object according to the trajectory data, wherein the stay point clusters are composed of a plurality of trajectory points having a clustering density greater than a preset threshold; a determination unit for determining a set of plot units corresponding to each stay point cluster based on the positioning data and the plot unit data, comprising: generating a minimum convex polygon that spatially contains each trajectory point in the corresponding stay point cluster based on the positioning data of the trajectory points contained in each stay point cluster, thereby obtaining a convex hull corresponding to each stay point cluster; searching for multiple plot units that intersect with any target convex hull to obtain a first set of plot units corresponding to each convex hull; calculating an intersection area between each plot unit in the first set of plot units and the corresponding convex hull; and when there is no plot unit whose ratio of the intersection area to the reference area is greater than a preset ratio, determining the plot unit with the largest intersection area with the corresponding convex hull as the target plot unit, and generating a set of plot units corresponding to the stay point cluster based on the target plot unit; The combining unit is used to perform combined processing on the plot units in the plot unit set to obtain a target area corresponding to the target object.
9. The device according to claim 8, characterized in that The generating unit includes: a first determining subunit, configured to determine, based on a preset time threshold and the time data, a plurality of trajectory point sets consisting of temporally consecutive trajectory points, wherein a maximum time span between trajectory points in the trajectory point set is greater than the time threshold; The first calculation subunit is used to calculate the spatial distance between any two trajectory points in each trajectory point set to obtain a spatial distance data set corresponding to each trajectory point set; a second determining subunit, configured to determine a representation length of each trajectory point set according to a maximum value in each spatial distance data set; The third determining subunit is configured to determine a set of trajectory points whose representation length is less than a preset length as a stay point cluster of the target object, and obtain a plurality of stay point clusters.
10. The device according to claim 9, characterized in that The computing subunit includes: An acquisition module, used to obtain the number of trajectory points in each trajectory point set; a calculation module, configured to calculate the spatial distance between any two trajectory points in the trajectory point set when the number of trajectory points in the trajectory point set is less than a preset number threshold, and obtain a spatial distance data set corresponding to the trajectory point set; The determination module is used to determine the minimum convex polygon that spatially contains each trajectory point in the trajectory point set when the number of trajectory points in the trajectory point set is greater than or equal to a preset number threshold, calculate the spatial distance between any two trajectory points on the edge of the convex polygon, and obtain the spatial distance data set corresponding to the trajectory point set.
11. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the steps of the data processing method according to any one of claims 1 to 7.
12. A computer device, characterized in that: The method comprises 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 according to any one of claims 1 to 7 when executing the computer program.
13. A computer program, characterized in that The computer program includes computer instructions, which are stored in a storage medium. A processor of a computer device reads the computer instructions from the storage medium, and the processor executes the computer instructions, so that the computer device performs the steps of the data processing method according to any one of claims 1 to 7.
14. A computer program product, characterized in that The computer program product includes computer instructions, which are stored in a storage medium; a processor of a computer device reads the computer instructions from the storage medium, and the processor executes the computer instructions, so that the computer device performs the steps of the data processing method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Character area detection method and device and storage medium
CN110059685A
Moving object trajectory data processing method and device
CN111159582A