A border channel generation method and device based on trajectory clustering

By using a trajectory clustering method, border crossings were identified, solving the problem of obtaining border crossing routes and enabling the monitoring and control of the behavior of target personnel, thereby improving border security.

CN114492590BActive Publication Date: 2024-11-08BIG DATA RES INST INST OF COMPUTING TECH CHINESE ACAD OF SCI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111640835.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-29
Publication Date
2024-11-08
Estimated Expiration
2041-12-29

AI Technical Summary

Technical Problem

Current technologies struggle to effectively obtain border crossing routes to monitor illegal border crossings.

Method used

By acquiring historical trajectory data and border latitude and longitude data of target users, preprocessing, calculation, clustering and filtering are performed to extract the centerline of the target trajectory cluster and store it as location information in a preset format.

Benefits of technology

It enables the monitoring of abnormal behavior patterns of target personnel, thereby improving the control and security of border areas.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114492590B_ABST
    Figure CN114492590B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a border channel generation method and device based on trajectory clustering, wherein the method comprises: obtaining historical trajectory data and border line longitude and latitude data of a target user, preprocessing the historical trajectory data to obtain candidate trajectory data, performing calculation based on the candidate trajectory data and border line longitude and latitude data to obtain target trajectory data, clustering the target trajectory data to obtain candidate trajectory clusters, screening the candidate trajectory clusters based on a preset strategy to obtain a target trajectory cluster, extracting the center line of the target trajectory cluster, storing the position information of the center line in a preset format, and processing and analyzing the historical trajectory data and border line longitude and latitude data of the target user to monitor the trajectory information of the target person and the cross-border behavior in the abnormal behavior pattern, thereby providing a guarantee for the fields of person monitoring, border area control, etc.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of data processing technology, and in particular to a border channel generation method and device based on trajectory clustering. Background Art

[0002] Generally speaking, the border can be understood as the area adjacent to the border or national boundary, and illegal border crossing usually has serious consequences.

[0003] Therefore, how to obtain the channel route in the border area becomes a technical problem that needs to be solved. Summary of the invention

[0004] In order to solve the above technical problems, the present disclosure provides a border channel generation method and device based on trajectory clustering.

[0005] In a first aspect, an embodiment of the present disclosure provides a method for generating a border channel based on trajectory clustering, comprising:

[0006] Obtain the historical trajectory data and border longitude and latitude data of the target user;

[0007] Preprocess the historical trajectory data to obtain candidate trajectory data;

[0008] Calculate based on candidate trajectory data and border line longitude and latitude data to obtain target trajectory data;

[0009] Perform clustering on the target trajectory data to obtain candidate trajectory clusters;

[0010] Based on the preset strategy, the candidate trajectory clusters are screened to obtain the target trajectory cluster;

[0011] The center line of the target trajectory cluster is extracted, and the position information of the center line is stored according to a preset format.

[0012] In a second aspect, an embodiment of the present disclosure provides a border channel generation device based on trajectory clustering, comprising:

[0013] The first acquisition module is used to obtain the historical trajectory data and border longitude and latitude data of the target user;

[0014] A first processing module is used to pre-process the historical trajectory data to obtain candidate trajectory data;

[0015] A calculation module, used to calculate based on the candidate trajectory data and the border line longitude and latitude data to obtain the target trajectory data;

[0016] The second processing module is used to perform clustering processing on the target trajectory data to obtain candidate trajectory clusters;

[0017] A screening module is used to screen candidate trajectory clusters based on a preset strategy to obtain a target trajectory cluster;

[0018] The extraction module is used to extract the center line of the target trajectory cluster and store the position information of the center line according to a preset format.

[0019] Compared with the prior art, the technical solution provided by the embodiments of the present disclosure has the following advantages:

[0020] In an embodiment of the present disclosure, historical trajectory data and border longitude and latitude data of a target user are obtained, the historical trajectory data is preprocessed to obtain candidate trajectory data, calculations are performed based on the candidate trajectory data and the border longitude and latitude data to obtain target trajectory data, the target trajectory data is clustered to obtain candidate trajectory clusters, the candidate trajectory clusters are screened based on a preset strategy to obtain a target trajectory cluster, the center line of the target trajectory cluster is extracted, and the location information of the center line is stored in a preset format. By processing and analyzing the historical trajectory data and border longitude and latitude data of the target user, cross-border behavior in abnormal behavior patterns of target personnel can be monitored, providing protection for areas such as person monitoring and border area control. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0022] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0023] Figure 1 A schematic flow chart of a method for generating a border channel based on trajectory clustering provided in an embodiment of the present disclosure;

[0024] Figure 2 A schematic diagram of a method flow for preprocessing historical trajectory data provided by an embodiment of the present disclosure;

[0025] Figure 3 A schematic flow chart of another method for generating a border channel based on trajectory clustering provided in an embodiment of the present disclosure;

[0026] Figure 4 A schematic flow chart of a method for clustering target trajectory data provided by an embodiment of the present disclosure;

[0027] Figure 5A schematic diagram of the overall process of a border channel generation method based on trajectory clustering provided in an embodiment of the present disclosure;

[0028] Figure 6 A schematic diagram of the structure of a border channel generation device based on trajectory clustering provided by the present invention. DETAILED DESCRIPTION

[0029] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.

[0030] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.

[0031] Figure 1 A schematic flow chart of a border channel generation method based on trajectory clustering provided in an embodiment of the present disclosure includes:

[0032] Step 101: Obtain the historical trajectory data and border longitude and latitude data of the target user.

[0033] Among them, the selection of target users can be set according to the needs of the application scenario. For example, users with a history of crossing borders can be used as target users, and different target users can be represented by user identifiers, that is, the target user is uniquely identified by the user identifier; historical trajectory data refers to the set of trajectory points corresponding to the movement of target users at various time points within the historical time period; border line longitude and latitude data refers to the longitude and latitude corresponding to the line that divides one area range from another area range.

[0034] In an embodiment of the present disclosure, there are many ways to obtain the historical trajectory data of the target user, such as using the trajectory data within a historical time period recorded by a device with a GPS (Global Positioning System) positioning function carried by the target user as the historical trajectory data of the target user, or using the networked mobile location of the target user's mobile phone number as the historical trajectory data of the target user; in another embodiment of the present disclosure, there are many ways to obtain the longitude and latitude data of the border line, such as using GIS (Geographic Information System) geographic information processing software, such as QGIS (Quantum GIS, desktop geographic information system), ArcGIS, etc. to extract the longitude and latitude corresponding to the border line as the longitude and latitude data of the border line.

[0035] The above methods for obtaining the historical trajectory data and the border line longitude and latitude data of the target user are merely examples, and the present disclosure does not limit the specific methods for obtaining the historical trajectory data and the border line longitude and latitude data of the target user.

[0036] Step 102: pre-process the historical trajectory data to obtain candidate trajectory data.

[0037] In the embodiments of the present disclosure, in order to further improve the accuracy, completeness and consistency of the data, it is necessary to preprocess the acquired historical trajectory data. In one embodiment, the historical trajectory data is serialized, that is, sorted in chronological order, to obtain a trajectory sequence corresponding to the target user, and then the abnormal value processes with zero or null longitude and latitude in the trajectory sequence are removed to obtain candidate trajectory data; in another embodiment, the historical trajectory data is serialized, that is, sorted in chronological order, to obtain a series of trajectory points corresponding to the target user, and then the trajectory points of the target user whose distance from the previous adjacent trajectory point within a preset time interval is less than a preset distance threshold are removed to obtain candidate trajectory data.

[0038] As an example, Figure 2 As shown, firstly, the historical trajectory data is serialized, that is, sorted in chronological order, to obtain the trajectory sequence corresponding to the target user, and then the abnormal values ​​with zero or null longitude and latitude in the trajectory sequence are removed, and the duplicate trajectory points are deduplicated, and the candidate trajectory data is obtained by screening.

[0039] The above two methods of preprocessing the historical trajectory data to obtain candidate trajectory data are only examples, and the present disclosure does not limit the specific method of preprocessing the historical trajectory data to obtain candidate trajectory data.

[0040] It should be noted that the trajectory sequence consists of a series of trajectory points, each of which includes a user ID, longitude, latitude and time.

[0041] Step 103: Calculate based on the candidate trajectory data and the border line longitude and latitude data to obtain target trajectory data.

[0042] In the embodiment of the present disclosure, the target trajectory data is obtained by calculating the candidate trajectory data and the border line longitude and latitude data. Specifically, the candidate trajectory data and the border line longitude and latitude data are calculated by the longitude and latitude great circle distance to obtain the great circle distance, and a statistical method is used to perform histogram statistics on the candidate trajectory data to obtain the weight corresponding to each trajectory point in the candidate trajectory data. The trajectory points whose great circle distances obtained from the candidate trajectory data are less than or equal to the preset distance threshold and whose weights corresponding to each trajectory point are greater than or equal to the preset weight threshold are taken as the target trajectory data, so as to further improve the accuracy of subsequent center point acquisition.

[0043] Step 104: cluster the target trajectory data to obtain candidate trajectory clusters.

[0044] Among them, clustering processing refers to the use of morphological operators to cluster and merge adjacent similar classification areas. Specifically, the clustering algorithm can be selected and set as needed, such as DBSCAN (Density-Based Spatial Clustering of Applications with Noise, clustering algorithm) density-based clustering algorithm, which divides the target trajectory data into different trajectory clusters according to the density accessibility principle.

[0045] In the embodiment of the present disclosure, the candidate trajectory cluster can be obtained by clustering the target trajectory data. Specifically, a trajectory point is randomly selected from the target trajectory data as the starting trajectory point, and all trajectory points within a preset distance range from the starting trajectory point are obtained. If the number of all trajectory points is greater than or equal to a preset number threshold, the starting trajectory point and all trajectory points form a candidate trajectory cluster, and the starting trajectory point is marked as visited, and then the previous step is repeated to process all trajectory points in the candidate trajectory cluster that are not marked as visited; conversely, if the number of all trajectory points is less than the preset number threshold, the starting trajectory point is marked as a noise point. It should be noted that if all trajectory points in the candidate trajectory cluster are marked as visited, the unvisited points are processed according to the above operation until all trajectory points in the target trajectory data have been visited, and finally the candidate trajectory cluster is obtained.

[0046] Step 105: Screen the candidate trajectory clusters based on a preset strategy to obtain a target trajectory cluster.

[0047] In order to ensure the rationality of border channel generation, the candidate trajectory clusters need to be screened by preset strategies to obtain the target trajectory clusters. Specifically, the preset strategies include: screening trajectory sequences whose number of constituent users is greater than a preset number threshold, screening trajectory sequences whose maximum circle distance is not less than a preset distance threshold, and screening trajectory sequences whose time span is not less than a preset number of days threshold. One or more of them.

[0048] As an example, the number of users corresponding to each trajectory cluster in the candidate trajectory clusters is obtained, and a trajectory cluster whose number of users is greater than a preset number threshold is obtained as a target trajectory cluster.

[0049] Step 106: extract the center line of the target trajectory cluster, and store the position information of the center line according to a preset format.

[0050] Among them, the center line of the target trajectory cluster is the trajectory line of the target person near the border. Specifically, the extraction of the target trajectory line refers to setting a search window, starting to translate on the latitude coordinates of the target trajectory cluster, recording the trajectory point data set during the movement, and extracting the trajectory center point coordinates in the search window in turn to generate a trajectory center point coordinate set H. The center line of the target trajectory cluster is drawn according to the set H data; the preset format refers to converting the latitude and longitude coordinates of the center line of the target trajectory cluster into a floating-point type with a fixed number of digits.

[0051] In the embodiment of the present disclosure, a search window of a preset size is set, and translation starts on the latitude coordinates of the target trajectory cluster. The starting latitude of the search window is recorded as s, and the ending latitude is recorded as e. The trajectory point data set Ω during the movement is collected. i , and then by sliding the search window, extract the coordinates of the center points of the track in the search window in turn, generate the track center point coordinate set H, draw the center line according to the data corresponding to H, and then convert the latitude and longitude coordinates of the center line into a floating-point type with a fixed number of digits, calculate the center point coordinates of the center line, and finally query the geographic location code and Chinese address of the center point and store them in the database form.

[0052] It should be noted that: the trajectory point data set Ω i The calculation formula is: i ={(x,y)|s i ≤x≤e i ,y∈R}, where Ω i Represents the longitude and latitude coordinates in the window, with the window starting at the horizontal coordinate s i , the ending horizontal axis is e i ; The calculation formula of the trajectory center point coordinate set H is: Among them, |Ω j | indicates the number of trajectory points in the set, lat i Indicates latitude, lon i Indicates longitude.

[0053] The embodiment of the present disclosure provides a border channel generation scheme based on trajectory clustering, which obtains historical trajectory data and border line longitude and latitude data of a target user, pre-processes the historical trajectory data to obtain candidate trajectory data, calculates based on the candidate trajectory data and border line longitude and latitude data to obtain target trajectory data, clusters the target trajectory data to obtain candidate trajectory clusters, screens the candidate trajectory clusters based on a preset strategy to obtain a target trajectory cluster, extracts the center line of the target trajectory cluster, and stores the location information of the center line in a preset format. The present disclosure obtains the historical trajectory data and border line longitude and latitude data of the target user, and analyzes and screens these data, so as to accurately obtain the channel route of the target person in the border area, monitor the trajectory information of the target person and the cross-border behavior of abnormal behavior patterns, and timely manage and control the relevant personnel, thereby further improving the security of border line management.

[0054] Figure 3 A schematic flow chart of another method for generating a border channel based on trajectory clustering provided in an embodiment of the present disclosure includes:

[0055] Step 301: Obtain the historical trajectory data and border longitude and latitude data of the target user.

[0056] It should be noted that step 301 is the same as the above step 101. Please refer to the description of step 101 for details, which will not be described in detail here.

[0057] Step 302: Arrange the historical trajectory data in chronological order to obtain a trajectory sequence corresponding to the target user, delete the trajectory points with zero or null latitude and longitude in the trajectory sequence, and the duplicate trajectory points, to obtain candidate trajectory data.

[0058] In the embodiment of the present disclosure, the historical trajectory data of the target user is sorted in chronological order to obtain a corresponding trajectory sequence, which includes four valid attributes: user identification, longitude, latitude and time. Assuming that the trajectory points of each target user's trajectory sequence are n, then the trajectory sequence at this time should be an n×4 matrix, and then the trajectory points with zero or null longitude and latitude in the trajectory sequence and the repeated trajectory points are deleted to obtain candidate trajectory data.

[0059] Specifically, the reasons for the generation of duplicate trajectory points are: interference and inconsistency of various factors such as the way, frequency, and place of occurrence of the historical trajectory data of the target user, as well as the irregularity of the historical trajectory data collection, which makes the historical trajectory data from the same source repeated in time, and the historical trajectory data from different sources overlap in time, resulting in duplicate trajectory points, which affect the mining of the historical trajectory of the target user. In a specific embodiment of the present disclosure, duplicate points can be removed according to the periodic characteristics of data collection, such as setting a fixed time interval for the historical trajectory data from the same source, such as call data, and setting the fixed time interval to 10 minutes, then the trajectory points within 10 minutes that are less than 500 meters away from the previous adjacent trajectory point are regarded as duplicate points and removed.

[0060] Step 303: perform longitude and latitude great circle distance calculation on the candidate trajectory data and the border line longitude and latitude data to obtain the great circle distance, perform histogram statistics on the candidate trajectory data, obtain the weight corresponding to each trajectory point in the candidate trajectory data, and obtain the trajectory points whose great circle distance is less than or equal to the preset distance threshold and whose weight is greater than or equal to the preset weight threshold from the candidate trajectory data as the target trajectory data.

[0061] Specifically, by calculating the longitude and latitude great circle distance between the candidate trajectory data and the border line longitude and latitude data, the great circle distance is obtained. According to the great circle distance, the trajectory data of all target users appearing near the border within a period of time can be screened out; by performing histogram statistics on the candidate trajectory data, each trajectory point in the candidate trajectory data has its own corresponding weight. According to this weight, the high-frequency trajectory points of all target users appearing within a period of time can be screened out, thereby screening out the target trajectory data.

[0062] In a specific embodiment of the present disclosure, assuming that the preset distance threshold is A and the preset weight threshold is B, then if the great circle distance obtained in the candidate trajectory data is less than or equal to A and the weight is greater than or equal to B, it means that this candidate trajectory data is a high-frequency trajectory point where the target person appears in the area near the border, and the candidate trajectory data is used as the target trajectory data.

[0063] The longitude and latitude great circle distance calculation formula is:

[0064] Haversine(X,Y)=R×accos(cos(x1-y1)cosx2cosy2+sinx2siny2);

[0065] Among them, Haversine is the half-haversine formula, R is the radius of the earth, x1, y1 represent the longitude of the point, and x2, y2 represent the latitude of the point.

[0066] Step 304: randomly select a trajectory point from the target trajectory data as the starting trajectory point, obtain all trajectory points within a preset distance range from the starting trajectory point, and if the number of all trajectory points is greater than or equal to a preset number threshold, form a candidate trajectory cluster with the starting trajectory point and all trajectory points, and mark the starting trajectory point as visited.

[0067] Specifically, the preset distance is set to D, and the preset number threshold is set to E. Then, a trajectory point F is randomly selected from the target trajectory data as the starting trajectory point, and all trajectory points within the distance D from the starting trajectory point F are obtained, that is, all trajectory points contained in the circle with F as the center and D as the radius. If the number of all trajectory points is greater than or equal to E, the starting trajectory point F and all the trajectory points that meet the conditions obtained above are formed into a candidate trajectory cluster, and the starting trajectory point F is marked as visited.

[0068] Step 305: Repeat the previous step to process all the trajectory points in the candidate trajectory cluster that have not been marked as visited. If the number of all trajectory points is less than the preset number threshold, the starting trajectory point is marked as a noise point. If all trajectory points in the candidate trajectory cluster are marked as visited, continue to repeat the above operation to process the unvisited points until all trajectory points in the target trajectory data have been visited, and a candidate trajectory cluster is obtained.

[0069] Continue to repeat the operation of step 304 to process all trajectory points in the candidate trajectory cluster that are not marked as visited. If the number of all trajectory points is less than E, then the starting trajectory point is marked as a noise point. If all trajectory points in the candidate trajectory cluster are marked as visited, continue to repeat the operation of step 304 to process the unvisited points until all trajectory points in the target trajectory data have been visited, and a candidate trajectory cluster is obtained.

[0070] In the embodiment of the present disclosure, the target trajectory data is clustered, specifically as follows: Figure 4 As shown, firstly input the target trajectory data, preset distance, preset quantity threshold, scan the target trajectory data, select any trajectory point P, determine whether P has been included in a candidate trajectory cluster or whether it is marked as a noise point, if not, determine whether all trajectory points within the preset distance range of point P are less than the preset quantity threshold, if all trajectory points within the preset distance range of point P are less than the preset quantity threshold, mark point P as a boundary point or a noise point, if all trajectory points within the preset distance range of point P are greater than or equal to the preset quantity threshold, mark point P as visited and establish a candidate trajectory cluster, then add all trajectory points within the preset distance range of point P to the candidate trajectory cluster, then check the unmarked Q points within the preset distance range, and finally repeat the above operation until all trajectory points in the target trajectory data have been visited to obtain a candidate trajectory cluster.

[0071] Step 306: Filter one or more of the trajectory sequences whose number of constituent users is greater than a preset number threshold, filter the trajectory sequences whose longest circle distance is not less than a preset distance threshold, and filter the trajectory sequences whose time span is not less than a preset number of days threshold.

[0072] In the embodiments of the present disclosure, there are many preset strategies for obtaining the target trajectory cluster. For example, a preset number threshold is set to L. When the number of constituent users is greater than L, the trajectory sequence is the target trajectory cluster. In other embodiments, a preset distance threshold is set to M. When the longest circle distance is not less than M, the trajectory sequence is the target trajectory cluster. In still other embodiments, a preset day threshold is set to N. When the time span is not less than N, the trajectory sequence is the target trajectory cluster.

[0073] Step 307: Generate a trajectory center point coordinate set according to the formula, and extract the center line of the target trajectory cluster.

[0074] In the disclosed embodiment, the search window size is set to h, and the target trajectory cluster is translated on the dimensional coordinates. According to the start and end horizontal coordinates of the window, the trajectory point data set G is collected during the movement process. Then, by sliding the search window, the trajectory center point coordinates of the search window size h are extracted in turn to generate a trajectory center point coordinate set. Then, the center line of the target trajectory cluster is drawn according to the data corresponding to the center point coordinate set.

[0075] Step 308: Convert the latitude and longitude coordinates of the center line into a floating point type with a fixed number of digits, calculate the coordinates of the center point of the center line, query the geographic location code and Chinese address of the center point and store them in a database form.

[0076] In order to make the channel data persistent, the mined channel data, i.e. the latitude and longitude coordinates of the center line, need to be converted into a floating-point number with a fixed number of digits. Each channel data is labeled, and the trajectory sequence is of point data (MultiPoint) type. The coordinates of the center point of the center line are calculated, and the geographic location code and Chinese address of the center point are queried and stored in the database form.

[0077] Step 309: Detect the position information of the center line according to a preset period, and when the position information of the center line has been updated, obtain the updated position information of the center point to update the position information of the center line.

[0078] In the embodiment of the present disclosure, in order to ensure the accuracy of the center line position information, it is necessary to detect the center line position information according to a preset period. For example, if the preset period is set to 3 days, then the center line position information needs to be detected every 3 days. When it is detected that the center line position information has been updated, the center line position information corresponding to the updated position information of the center point is obtained and updated.

[0079] The embodiment of the present disclosure provides a border channel generation solution based on trajectory clustering, which obtains historical trajectory data and border longitude and latitude data of a target user, arranges the historical trajectory data in chronological order, obtains a trajectory sequence corresponding to the target user, removes the trajectory points with zero or null longitude and latitude in the trajectory sequence, and duplicate trajectory points, obtains candidate trajectory data, calculates longitude and latitude great circle distances between the candidate trajectory data and border longitude and latitude data, obtains great circle distances, performs histogram statistics on the candidate trajectory data, obtains weights corresponding to each trajectory point in the candidate trajectory data, and obtains great circle distances from the candidate trajectory data. The trajectory points with a distance equal to the preset distance threshold and a weight greater than or equal to the preset weight threshold are used as the target trajectory data. A trajectory point is randomly selected from the target trajectory data as the starting trajectory point. All trajectory points within the preset distance range from the starting trajectory point are obtained. If the number of all trajectory points is greater than or equal to the preset number threshold, the starting trajectory point and all trajectory points form a candidate trajectory cluster, and the starting trajectory point is marked as visited. Repeat the previous step to process all trajectory points in the candidate trajectory cluster that are not marked as visited. If the number of all trajectory points is less than the preset number threshold, the starting trajectory point is marked as a noise point. If all trajectory points in the candidate trajectory cluster are marked as visited, continue to repeat the above operation to process the unvisited points until all trajectory points in the target trajectory data have been visited, and obtain the candidate trajectory cluster, screen one or more of the trajectory sequences whose number of users is greater than the preset number threshold, screen the trajectory sequences whose longest circle distance is not less than the preset distance threshold, and screen the trajectory sequences whose time span is not less than the preset number of days threshold, generate the trajectory center point coordinate set according to the formula, extract the center line of the target trajectory cluster, convert the latitude and longitude coordinates of the center line into a floating point type with a fixed number of digits, calculate the center point coordinates of the center line, query the geographic location code and Chinese address of the center point and store them in the database form, detect the location information of the center line according to the preset period, and obtain the updated location information of the center point when the location information of the center line has been updated, and update the location information of the center line, obtain the travel pattern of the target personnel by clustering the target trajectory data, and store the center line location information in a preset format to ensure the persistence of the channel data. In addition, the center line location information is detected and updated at a preset period to ensure the accuracy of the channel data and avoid border security problems caused by untimely update of the center line location information.

[0080] Figure 5A schematic diagram of the overall process of a border channel generation method based on trajectory clustering provided in an embodiment of the present disclosure is provided. First, historical trajectory data and border line longitude and latitude data are obtained, the historical trajectory data are preprocessed to obtain candidate trajectory data, calculations are performed based on the candidate trajectory data and the border line longitude and latitude data to obtain target trajectory data, and then the target trajectory data is processed by clustering to obtain candidate trajectory clusters, and then the candidate trajectory clusters are screened to obtain target trajectory clusters, and finally the center line of the target trajectory cluster is extracted to obtain channel data, i.e., center line position information, and store it.

[0081] Figure 6 The present invention provides a schematic diagram of a border channel generation device based on trajectory clustering, which includes a first acquisition module 601, a first processing module 602, a calculation module 603, a second processing module 604, a screening module 605, and an extraction module 606, wherein:

[0082] The first acquisition module 601 is used to acquire the historical trajectory data and border longitude and latitude data of the target user;

[0083] A first processing module 602 is used to pre-process the historical trajectory data to obtain candidate trajectory data;

[0084] A calculation module 603 is used to calculate based on the candidate trajectory data and the border line longitude and latitude data to obtain the target trajectory data;

[0085] The second processing module 604 is used to perform clustering processing on the target trajectory data to obtain candidate trajectory clusters;

[0086] A screening module 605 is used to screen the candidate trajectory clusters based on a preset strategy to obtain a target trajectory cluster;

[0087] The extraction module 606 is used to extract the center line of the target trajectory cluster and store the position information of the center line according to a preset format.

[0088] Optionally, the first processing module 602 is specifically configured to:

[0089] Arrange the historical trajectory data in chronological order to obtain the trajectory sequence corresponding to the target user; wherein the trajectory sequence is composed of a series of trajectory points, each of which includes a user ID, longitude, latitude and time;

[0090] The trajectory points with zero or null longitude and latitude in the trajectory sequence and the repeated trajectory points are deleted to obtain candidate trajectory data; wherein the trajectory points of the target user whose distance from the previous adjacent trajectory point within a preset time interval is less than a preset distance threshold are regarded as repeated trajectory points.

[0091] Optionally, the calculation module 603 is specifically configured to:

[0092] The candidate trajectory data and the border line longitude and latitude data are used to calculate the longitude and latitude great circle distance to obtain the great circle distance;

[0093] Perform histogram statistics on the candidate trajectory data to obtain the weight corresponding to each trajectory point in the candidate trajectory data;

[0094] The trajectory points whose great circle distance is less than or equal to the preset distance threshold and whose weight is greater than or equal to the preset weight threshold are obtained from the candidate trajectory data as the target trajectory data.

[0095] Optionally, the second processing module 604 is specifically configured to:

[0096] A trajectory point is randomly selected from the target trajectory data as the starting trajectory point, and all trajectory points within a preset distance range from the starting trajectory point are obtained. If the number of all trajectory points is greater than or equal to a preset number threshold, the starting trajectory point and all trajectory points are formed into a candidate trajectory cluster, and the starting trajectory point is marked as visited;

[0097] Repeat the previous step to process all the trajectory points in the candidate trajectory cluster that are not marked as visited;

[0098] If the number of all trajectory points is less than a preset number threshold, the starting trajectory point is marked as a noise point;

[0099] If all trajectory points in the candidate trajectory cluster are marked as visited, the above operation is repeated to process unvisited points until all trajectory points in the target trajectory data have been visited, thereby obtaining a candidate trajectory cluster.

[0100] Optionally, the screening module 605 is specifically used to:

[0101] One or more of the following is selected: a trajectory sequence whose number of users is greater than a preset number threshold, a trajectory sequence whose longest circle distance is not less than a preset distance threshold, and a trajectory sequence whose time span is not less than a preset number of days threshold.

[0102] Optionally, the extraction module 606 is specifically configured to:

[0103] Set a search window of preset size and start translation on the latitude coordinates of the target trajectory cluster. The starting latitude of the search window is recorded as s, and the ending latitude is recorded as e. Collect the trajectory point data set Ω during the movement process. i , calculated according to the following formula: i ={(x,y)|s i ≤x≤e i ,y∈R}, where Ω i Represents the longitude and latitude coordinates in the window, with the window starting at the horizontal coordinate s i, the ending horizontal axis is e i ;

[0104] Slide the search window, extract the coordinates of the center points of the trajectory in the search window one by one, generate the coordinate set H of the center point of the trajectory, draw the center line according to the data corresponding to H, and calculate it according to the following formula:

[0105] Among them, |Ω i | represents the number of trajectory points in the set;

[0106] Convert the latitude and longitude coordinates of the center line into a floating point number with a fixed number of digits;

[0107] Calculate the coordinates of the center point of the center line, query the geographic location code and Chinese address of the center point and store them in the database form.

[0108] Optionally, the device further comprises:

[0109] A detection module, used to detect the position information of the center line according to a preset period;

[0110] The second acquisition module is used to acquire the updated position information of the center point to update the position information of the center line when the position information of the center line has been updated.

[0111] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0112] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A border channel generation method based on trajectory clustering, characterized in that: include: Obtain the historical trajectory data and border longitude and latitude data of the target user; Preprocessing the historical trajectory data to obtain candidate trajectory data; Calculate based on the candidate trajectory data and the border line longitude and latitude data to obtain target trajectory data; Performing clustering processing on the target trajectory data to obtain candidate trajectory clusters; Screening the candidate trajectory clusters based on a preset strategy to obtain a target trajectory cluster; Extracting the center line of the target trajectory cluster, and storing the position information of the center line according to a preset format; The step of extracting the center line of the target trajectory cluster comprises: Set a search window of preset size, start translation on the latitude coordinates of the target trajectory cluster, record the starting latitude of the search window as s, and the ending latitude as e, and collect the trajectory point data set during the movement , calculated according to the following formula: ,in, Represents the longitude and latitude coordinates set in the window, and the window starts at the horizontal coordinate , the ending horizontal axis is ; Slide the search window, extract the coordinates of the center points of the track in the search window in turn, generate the coordinate set H of the center points of the track, draw the center line according to the data corresponding to H, and calculate according to the following formula: ;in, Indicates the number of trajectory points in the collection.

2. The border channel generation method based on trajectory clustering according to claim 1, characterized in that: The preprocessing of the historical trajectory data to obtain candidate trajectory data includes: Arrange the historical trajectory data in chronological order to obtain a trajectory sequence corresponding to the target user; wherein the trajectory sequence is composed of a series of trajectory points, each trajectory point including a user ID, longitude, latitude and time; The trajectory points whose longitude and latitude are zero or null values ​​and the repeated trajectory points in the trajectory sequence are deleted to obtain candidate trajectory data; wherein the trajectory point of the target user whose distance from the previous adjacent trajectory point within a preset time interval is less than a preset distance threshold is used as the repeated trajectory point.

3. The border channel generation method based on trajectory clustering according to claim 1, characterized in that: The step of calculating based on the candidate trajectory data and the border line longitude and latitude data to obtain the target trajectory data includes: Perform longitude and latitude great circle distance calculation on the candidate trajectory data and the border line longitude and latitude data to obtain a great circle distance; Performing histogram statistics on the candidate trajectory data to obtain a weight corresponding to each trajectory point in the candidate trajectory data; A trajectory point whose great circle distance is less than or equal to a preset distance threshold and whose weight is greater than or equal to a preset weight threshold is obtained from the candidate trajectory data as the target trajectory data.

4. The border channel generation method based on trajectory clustering according to claim 3 is characterized in that: The longitude and latitude great circle distance calculation formula is: ; in, is the radius of the Earth, Indicates the longitude of a point. The table represents the latitude of the points.

5. The border channel generation method based on trajectory clustering according to claim 1, characterized in that: The clustering process of the target trajectory data to obtain candidate trajectory clusters includes: Randomly select a trajectory point from the target trajectory data as a starting trajectory point, obtain all trajectory points within a preset distance range from the starting trajectory point, and if the number of all trajectory points is greater than or equal to a preset number threshold, form the starting trajectory point and all trajectory points into a candidate trajectory cluster, and mark the starting trajectory point as visited; Repeat the previous step to process all the trajectory points in the candidate trajectory cluster that are not marked as visited; If the number of all trajectory points is less than the preset number threshold, marking the starting trajectory point as a noise point; If all trajectory points in the candidate trajectory cluster are marked as visited, the above operation is repeated to process unvisited points until all trajectory points in the target trajectory data have been visited, thereby obtaining the candidate trajectory cluster.

6. The border channel generation method based on trajectory clustering according to claim 1, characterized in that: The preset strategies include: One or more of the following is selected: a trajectory sequence whose number of constituent users is greater than a preset number threshold, a trajectory sequence whose longest circle distance is not less than a preset distance threshold, and a trajectory sequence whose time span is not less than a preset number of days threshold.

7. The method for generating border passages based on trajectory clustering according to claim 1, characterized in that: The storing the position information of the center line according to a preset format includes: Convert the latitude and longitude coordinates of the center line into a floating point number type with a fixed number of digits; The coordinates of the center point of the center line are calculated, and the geographical location code and Chinese address of the center point are queried and stored in a database form.

8. The method for generating border passages based on trajectory clustering according to claim 1, characterized in that: Also includes: Detecting the position information of the center line according to a preset period; When the position information of the center line is updated, the updated position information of the center point is obtained to update the position information of the center line.

9. A border channel generation device based on trajectory clustering, characterized in that: include: The first acquisition module is used to obtain the historical trajectory data and border longitude and latitude data of the target user; A first processing module, used for preprocessing the historical trajectory data to obtain candidate trajectory data; A calculation module, used to calculate based on the candidate trajectory data and the border line longitude and latitude data to obtain target trajectory data; A second processing module is used to perform clustering processing on the target trajectory data to obtain candidate trajectory clusters; A screening module, used to screen the candidate trajectory clusters based on a preset strategy to obtain a target trajectory cluster; An extraction module, used for extracting the center line of the target trajectory cluster and storing the position information of the center line according to a preset format; The step of extracting the center line of the target trajectory cluster comprises: Set a search window of preset size, start translation on the latitude coordinates of the target trajectory cluster, record the starting latitude of the search window as s, and the ending latitude as e, and collect the trajectory point data set during the movement , calculated according to the following formula: ,in, Represents the longitude and latitude coordinates set in the window, and the window starts at the horizontal coordinate , the ending horizontal axis is ; Slide the search window, extract the coordinates of the center points of the track in the search window in turn, generate the coordinate set H of the center points of the track, draw the center line according to the data corresponding to H, and calculate according to the following formula: ;in, Indicates the number of trajectory points in the collection.