Trajectory analysis method, device, electronic device and storage medium

By identifying and filling the missing trajectory segments of mobile device data and using historical trajectory data to fill the missing parts, the problem of inaccurate trajectory analysis caused by shutdown or no signal of mobile device is solved, and the accuracy of trajectory analysis is improved.

CN115048592BActive Publication Date: 2025-08-19CHINA TELECOM CORP LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210698734.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-20
Publication Date
2025-08-19
Estimated Expiration
2042-06-20

AI Technical Summary

Technical Problem

Mobile devices cannot generate measurement reports when powered off or without signals, resulting in missing MR data and affecting the accuracy of trajectory analysis results.

Method used

By obtaining the original trajectory point of the target object, identifying the missing trajectory segments, using historical trajectory data to find matching trajectory segments for filling, and determining the residency point based on the time and position relationship of the trajectory points to fill in the data loss.

Benefits of technology

It improves the accuracy of the trajectory analysis results, reduces the impact of data loss on the analysis, and more accurately determines the location of the target residency point based on the trajectory data filled with historical data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115048592B_ABST
    Figure CN115048592B_ABST
Patent Text Reader

Abstract

Embodiments of the present invention provide a trajectory analysis method, apparatus, electronic device, and storage medium. The method includes: obtaining original trajectory points of a target object arranged in time sequence; determining every two trajectory points in the original trajectory points that are adjacent in time sequence and meet specified conditions as the endpoints of a missing trajectory segment; searching for matching trajectory segments for each missing trajectory segment in the historical trajectory data of the target object based on the position and time interval of the endpoints of each missing trajectory segment; filling the missing trajectory segment with trajectory points using the matching trajectory segments of each missing trajectory segment to obtain a target trajectory; and determining, based on the temporal and positional relationships between the trajectory points in the target trajectory, a dwell point whose dwell time exceeds a second preset time length as the target dwell point of the target object. Application of the solution provided by the embodiments of the present invention can reduce the impact of missing trajectory data on trajectory analysis and improve the accuracy of trajectory analysis results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data mining technology, and in particular to a trajectory analysis method, device, electronic equipment and storage medium. Background Art

[0002] When users use services on their mobile terminals, the mobile communication network periodically generates measurement reports (MRs) to assess the quality of the wireless environment. Approximately 2% of these MR records contain Assisted Global Positioning System (AGPS) positioning information, which can be used to analyze the trajectory of target objects. Related technologies use data cleaning, dwell point detection, and trajectory extraction on the collected MR data to obtain target object trajectory information.

[0003] However, when a mobile device is turned off or has no signal, it cannot generate MR, resulting in large segments of missing MR data, which ultimately affects the accuracy of trajectory analysis results. Summary of the Invention

[0004] The purpose of the embodiments of the present invention is to provide a trajectory analysis method, apparatus, electronic device, and storage medium to improve the accuracy of user trajectory analysis results. The specific technical solution is as follows:

[0005] In a first aspect, an embodiment of the present invention provides a trajectory analysis method, the method comprising:

[0006] Obtain the original trajectory points of the target object arranged in time sequence;

[0007] Determine every two trajectory points in the original trajectory points that are adjacent in time sequence and meet specified conditions as endpoints of a missing trajectory segment, wherein the specified conditions include: a time interval greater than a first preset duration and / or a distance greater than a first preset length;

[0008] Searching for a matching trajectory segment for each missing trajectory segment in the historical trajectory data of the target object according to the position and time interval of the endpoint of the missing trajectory segment;

[0009] Filling each missing trajectory segment with trajectory points using the matching trajectory segment of the missing trajectory segment to obtain a target trajectory; wherein the target trajectory includes: each filled trajectory point and each original trajectory point;

[0010] According to the time relationship and position relationship between each track point in the target track, a dwell point whose dwell time exceeds a second preset time length is determined as the target dwell point of the target object.

[0011] Optionally, in a specific implementation, the minimum distance between each endpoint of the matching trajectory segment of each missing trajectory segment and each endpoint of the missing trajectory segment is less than a second preset length, and the ratio of the time interval between the endpoints of the matching trajectory segment of each missing trajectory segment to the time interval between the endpoints of the missing trajectory segment is less than a preset ratio.

[0012] Optionally, in a specific implementation, the step of filling each missing trajectory segment with trajectory points using the matching trajectory segment of the missing trajectory segment to obtain the target trajectory includes:

[0013] For each missing trajectory segment, determining a trajectory point extraction period according to a preset filling quantity of the missing trajectory segment and the ratio;

[0014] Extracting trajectory points from the matching trajectory segment of the missing trajectory segment except for the endpoints in a time sequence according to the trajectory point extraction cycle, and filling the missing trajectory segment with the extracted trajectory points in a time sequence;

[0015] According to the duration of the missing track segment and the filling quantity, the time of each filled track point is updated.

[0016] Optionally, in a specific implementation, the method further includes:

[0017] Determining the time at each target dwell point based on the time of each track point in the target track;

[0018] Dividing the trajectory points between each two temporally adjacent target dwell points in the target trajectory into the same group, and determining a moving trajectory segment based on each group of trajectory points to obtain individual moving trajectory segments;

[0019] For every two moving trajectory segments, determining the second trajectory point corresponding to each first trajectory point in the first trajectory segment in the second trajectory segment; determining the distance between the two moving trajectory segments based on the distance between each first trajectory point on the first trajectory segment and the corresponding second trajectory point on the second trajectory segment; and determining the temporal relationship between the two moving trajectory segments based on whether the time relationship between each two consecutive first trajectory points on the first trajectory segment is the same as the time relationship between the two corresponding second trajectory points on the second trajectory segment; wherein the second trajectory point corresponding to each first trajectory point is: the second trajectory point in the second trajectory segment that is closest to the first trajectory point; the first trajectory segment is any one of the two moving trajectory segments, and the second trajectory segment is the other of the two moving trajectory segments except the first trajectory segment;

[0020] The movement trajectory segments whose distance is less than the third preset length and whose timing relationship is a specified relationship are divided into the same group, and the movement trajectory segment with the highest confidence and the time range of all movement trajectory segments in each group of movement trajectory segments are determined as the movement trajectory pattern corresponding to the movement trajectory segment in the group, thereby obtaining each movement trajectory pattern.

[0021] Optionally, in a specific implementation, determining the distance between the two moving trajectory segments according to the distance between each first trajectory point on the first trajectory segment and the corresponding second trajectory point on the second trajectory segment includes:

[0022] An average value of distances between each first trajectory point on the first trajectory segment and the corresponding second trajectory point on the second trajectory segment is calculated, and the average value of the distances is used as the distance between the two moving trajectory segments.

[0023] Optionally, in a specific implementation, determining the temporal relationship between the two moving trajectory segments based on whether the temporal relationship between each two consecutive first trajectory points on the first trajectory segment is the same as the temporal relationship between two corresponding second trajectory points on the second trajectory segment includes:

[0024] Traversing every two consecutive first trajectory points on the first trajectory segment, when traversing every two consecutive first trajectory points, if the time relationship between the two first trajectory points is the same as the time relationship between the two corresponding second trajectory points on the second trajectory segment, then the cumulative value of the same sequence of the two moving trajectory segments is increased by a specified value; if the time relationship between the two first trajectory points is different from the time relationship between the two corresponding second trajectory points on the second trajectory segment, then the cumulative value of the same sequence of the two moving trajectory segments is decreased by a specified value;

[0025] After traversing all two consecutive first trajectory points on the first trajectory segment, the time sequence relationship between the two moving trajectory segments is determined according to the same-sequence cumulative values of the two moving trajectory segments.

[0026] Optionally, in a specific implementation, a method for selecting the movement trajectory segment with the highest confidence in each group of movement trajectory segments includes:

[0027] For each group of movement trajectory segments, selecting the movement trajectory segment including the most original trajectory points and / or the most added trajectory points as the movement trajectory segment with the highest confidence;

[0028] or,

[0029] For each group of movement trajectory segments, the sum of the confidences of all trajectory points included in each movement trajectory segment is calculated, and the movement trajectory segment with the highest calculated confidence sum is taken as the movement trajectory segment with the highest confidence; wherein the confidences of the original trajectory points and the filled trajectory points are different.

[0030] Optionally, in a specific implementation, the method further includes:

[0031] Calculating the similarity between the movement trajectory segment in each movement trajectory pattern and each pre-stored historical trajectory segment;

[0032] For each moving trajectory segment in the moving trajectory pattern, if there is a target trajectory segment in the historical trajectory segments whose similarity with the moving trajectory segment is greater than a set threshold, the time range in the moving trajectory pattern is added to the time range of the target trajectory segment.

[0033] For each movement trajectory segment in the movement trajectory pattern, if there is no target trajectory segment in the historical trajectory segments whose similarity with the movement trajectory segment is greater than a set threshold, the movement trajectory pattern is stored.

[0034] Optionally, in a specific implementation, determining, based on the time relationship and position relationship between the trajectory points in the target trajectory, a dwell point having a dwell time exceeding a second preset time length as the target dwell point of the target object includes:

[0035] Based on a temporal relationship and a distance relationship between each trajectory point in the target trajectory, each trajectory point in the target trajectory is divided into a plurality of trajectory point clusters; wherein a distance between each trajectory point in each trajectory point cluster and a cluster center of the trajectory point cluster is less than a fourth preset length, and the cluster center of each trajectory point cluster is a point indicated by average position information of all trajectory points in the trajectory point cluster;

[0036] Taking the cluster center of each trajectory point cluster as the initial cluster center, clustering the trajectory points in the target trajectory according to the preset cluster radius to obtain each cluster center;

[0037] For each trajectory point in the target trajectory, assign the trajectory point to a cluster center that is less than a fifth preset length and has the smallest distance from the trajectory point, to obtain each resident area;

[0038] Based on the time of each trajectory point in each residence area, the residence time of the target object in the residence area is calculated, and the residence center of the residence area whose calculated residence time exceeds the second preset time is determined as the target residence point of the target object; wherein the residence center of each residence area is the point indicated by the average information of the position information of all trajectory points in the residence area.

[0039] Optionally, in a specific implementation,

[0040] The method further comprises:

[0041] For each two designated trajectory points that are adjacent in time sequence, calculating the distance and time interval between the two designated trajectory points, and calculating the average speed of the target object moving between the two designated trajectory points based on the calculated distance and time interval; wherein the designated trajectory points include: the original trajectory points and / or the filled trajectory points;

[0042] If the calculated average speed is greater than the preset speed, an outlier trajectory point among the two designated trajectory points is determined according to the positions of the two designated trajectory points, and a designated recovery operation is performed on the outlier trajectory point;

[0043] The step of calculating the residence time of the target object in each residence area according to the time of each trajectory point in the residence area includes:

[0044] If there is a residence area with updated track points after the designated recycling operation, the residence time of the target object in the residence area is calculated according to the time of each track point in each updated residence area.

[0045] Optionally, in a specific implementation, the method further includes:

[0046] Calculate the distance between each target dwell point and each pre-stored historical dwell point;

[0047] For each target stay point, if there is a designated stay point among the historical stay points whose distance from the target stay point is less than a sixth preset length, then the time range corresponding to the target stay point is added to the time range of the designated stay point;

[0048] For each target stay point, if there is no designated stay point with a distance from the target stay point less than a sixth preset length among the historical stay points, the target stay point and the time range of the target stay point are stored.

[0049] Optionally, in a specific implementation, obtaining each trajectory point of the target object arranged in time sequence includes:

[0050] Obtaining measurement reports and signaling data of a user terminal of the target object;

[0051] Determining a point corresponding to the assisted global positioning system AGPS positioning information in the measurement report as a first type of trajectory point;

[0052] Determining, based on a preset machine learning algorithm and using the measurement report, a second type of trajectory points; wherein the second type of trajectory points does not include the first type of trajectory points;

[0053] Determine a third type of trajectory point using the latitude and longitude of the primary serving cell in the measurement report; wherein the third type of trajectory point does not include the first type of trajectory point and the second type of trajectory point;

[0054] Determining a fourth type of trajectory point based on the base station latitude and longitude in the signaling data; wherein the fourth type of trajectory point does not include the first type of trajectory point, the second type of trajectory point, and the third type of trajectory point;

[0055] The first type of trajectory points, the second type of trajectory points, the third type of trajectory points and the fourth type of trajectory points are arranged in time sequence as the original trajectory points of the target object arranged in time sequence.

[0056] In a second aspect, an embodiment of the present invention provides a trajectory analysis device, the device comprising:

[0057] The trajectory point acquisition module is used to obtain the original trajectory points of the target object arranged in time sequence;

[0058] a trajectory segment determination module, configured to determine every two trajectory points in the original trajectory points that are temporally adjacent and meet specified conditions as endpoints of a missing trajectory segment, wherein the specified conditions include: a time interval greater than a first preset duration and / or a distance greater than a first preset length;

[0059] a trajectory segment search module, configured to search for a matching trajectory segment of each missing trajectory segment in the historical trajectory data of the target object according to the position and time interval of the endpoint of the missing trajectory segment;

[0060] A trajectory segment filling module is used to fill the missing trajectory segment with the matching trajectory segment of each missing trajectory segment to obtain a target trajectory; wherein the target trajectory includes: each filled trajectory point and each original trajectory point;

[0061] The dwell point determination module is configured to determine, based on the time relationship and position relationship between the various track points in the target track, a dwell point having a dwell time exceeding a second preset time length as a target dwell point of the target object.

[0062] Optionally, in a specific implementation, the minimum distance between each endpoint of the matching trajectory segment of each missing trajectory segment and each endpoint of the missing trajectory segment is less than a second preset length, and the ratio of the time interval between the endpoints of the matching trajectory segment of each missing trajectory segment to the time interval between the endpoints of the missing trajectory segment is less than a preset ratio.

[0063] Optionally, in a specific implementation, the trajectory segment filling module is specifically configured to:

[0064] For each missing trajectory segment, determining a trajectory point extraction period according to a preset filling quantity of the missing trajectory segment and the ratio;

[0065] Extracting trajectory points from the matching trajectory segment of the missing trajectory segment except for the endpoints in a time sequence according to the trajectory point extraction cycle, and filling the missing trajectory segment with the extracted trajectory points in a time sequence;

[0066] According to the duration of the missing track segment and the filling quantity, the time of each filled track point is updated.

[0067] Optionally, in a specific implementation, the device further includes:

[0068] a time determination module, configured to determine the time of each target dwell point according to the time of each trajectory point in the target trajectory;

[0069] a trajectory segment division module, configured to divide the trajectory points between each two temporally adjacent target dwell points in the target trajectory into the same group; and determine a moving trajectory segment determined based on each group of trajectory points to obtain individual moving trajectory segments;

[0070] a trajectory segment calculation module, configured to determine, for every two moving trajectory segments, the second trajectory point corresponding to each first trajectory point in the first trajectory segment in the second trajectory segment; determine the distance between the two moving trajectory segments based on the distance between each first trajectory point on the first trajectory segment and the corresponding second trajectory point on the second trajectory segment; and determine the temporal relationship between the two moving trajectory segments based on whether the time relationship between each two consecutive first trajectory points on the first trajectory segment is the same as the time relationship between the two corresponding second trajectory points on the second trajectory segment; wherein the second trajectory point corresponding to each first trajectory point is: the second trajectory point in the second trajectory segment that is closest to the first trajectory point; the first trajectory segment is any one of the two moving trajectory segments, and the second trajectory segment is the other of the two moving trajectory segments except the first trajectory segment;

[0071] The trajectory pattern determination module is configured to group trajectory segments whose distance is less than a third preset length and whose temporal relationship is a specified relationship into the same group, and to determine the trajectory segment with the highest confidence level and the time range of all trajectory segments in each group as the trajectory pattern corresponding to the group, thereby obtaining individual trajectory patterns.

[0072] Optionally, in a specific implementation, the trajectory segment calculation module is specifically configured to:

[0073] An average value of distances between each first trajectory point on the first trajectory segment and the corresponding second trajectory point on the second trajectory segment is calculated, and the average value of the distances is used as the distance between the two moving trajectory segments.

[0074] Optionally, in a specific implementation, the trajectory segment calculation module is specifically configured to:

[0075] Traversing every two consecutive first trajectory points on the first trajectory segment, when traversing every two consecutive first trajectory points, if the time relationship between the two first trajectory points is the same as the time relationship between the two corresponding second trajectory points on the second trajectory segment, then the cumulative value of the same sequence of the two moving trajectory segments is increased by a specified value; if the time relationship between the two first trajectory points is different from the time relationship between the two corresponding second trajectory points on the second trajectory segment, then the cumulative value of the same sequence of the two moving trajectory segments is decreased by a specified value;

[0076] After traversing all two consecutive first trajectory points on the first trajectory segment, the time sequence relationship between the two moving trajectory segments is determined according to the same-sequence cumulative values of the two moving trajectory segments.

[0077] Optionally, in a specific implementation, the trajectory pattern determination module is specifically configured to:

[0078] For each group of movement trajectory segments, selecting the movement trajectory segment including the most original trajectory points and / or the most added trajectory points as the movement trajectory segment with the highest confidence;

[0079] or,

[0080] For each group of movement trajectory segments, the sum of the confidences of all trajectory points included in each movement trajectory segment is calculated, and the movement trajectory segment with the highest calculated confidence sum is taken as the movement trajectory segment with the highest confidence; wherein the confidences of the original trajectory points and the filled trajectory points are different.

[0081] Optionally, in a specific implementation, the device further includes:

[0082] A similarity module is used to calculate the similarity between the movement trajectory segment in each movement trajectory pattern and each pre-stored historical trajectory segment;

[0083] The trajectory segment storage module is configured to, for each trajectory segment in a trajectory pattern, add the time range of the trajectory pattern to the time range of the target trajectory segment if there is a target trajectory segment with a similarity greater than a set threshold among the historical trajectory segments; and store the trajectory pattern if there is no target trajectory segment with a similarity greater than the set threshold among the historical trajectory segments.

[0084] Optionally, in a specific implementation, the resident point determination module includes:

[0085] a cluster determination submodule, configured to divide each trajectory point in the target trajectory into a plurality of trajectory point clusters based on a temporal relationship and a distance relationship between each trajectory point in the target trajectory; wherein a distance between each trajectory point in each trajectory point cluster and a cluster center of the trajectory point cluster is less than a fourth preset length, and the cluster center of each trajectory point cluster is a point indicated by average position information of all trajectory points in the trajectory point cluster;

[0086] A clustering submodule, configured to cluster the trajectory points in the target trajectory using the cluster center of each trajectory point cluster as the initial cluster center according to a preset cluster radius to obtain cluster centers;

[0087] a trajectory point allocation submodule, configured to allocate, for each trajectory point in the target trajectory, the trajectory point to a cluster center that is less than a fifth preset length and has the smallest distance from the trajectory point, to obtain respective resident areas;

[0088] The dwell point determination submodule is configured to calculate the dwell time of the target object in each dwell area based on the time of each trajectory point in the dwell area, and determine the dwell center of the dwell area whose calculated dwell time exceeds a second preset time as the target dwell point of the target object; wherein the dwell center of each dwell area is the point indicated by the average position information of all trajectory points in the dwell area.

[0089] Optionally, in a specific implementation, the device further includes:

[0090] a speed calculation module, configured to calculate, for each two temporally adjacent designated trajectory points, a distance and a time interval between the two designated trajectory points, and calculate, based on the calculated distance and time interval, an average speed of the target object moving between the two designated trajectory points; wherein the designated trajectory points include: the original trajectory points and / or the filled trajectory points;

[0091] a recovery operation module, configured to determine, when the calculated average speed is greater than a preset speed, an outlier trajectory point among the two designated trajectory points based on the positions of the two designated trajectory points, and perform a designated recovery operation on the outlier trajectory point;

[0092] The resident point determination submodule is specifically used for:

[0093] After the designated recycling operation, when there is a residence area with updated track points, the residence time of the target object in the residence area is calculated according to the time of each track point in each updated residence area.

[0094] Optionally, in a specific implementation, the device further includes:

[0095] A distance calculation module is used to calculate the distance between each target dwell point and each pre-stored historical dwell point;

[0096] The trajectory point storage module is configured to, when there is a designated dwell point whose distance from the target dwell point is less than a sixth preset length among the various historical dwell points, add the time range corresponding to the target dwell point to the time range of the designated dwell point; and, when there is no designated dwell point whose distance from the target dwell point is less than the sixth preset length among the various historical dwell points, store the target dwell point and the time range of the target dwell point.

[0097] Optionally, in a specific implementation, the trajectory point acquisition module is specifically configured to:

[0098] Obtaining measurement reports and signaling data of a user terminal of the target object;

[0099] Determining a point corresponding to the assisted global positioning system AGPS positioning information in the measurement report as a first type of trajectory point;

[0100] Determining, based on a preset machine learning algorithm and using the measurement report, a second type of trajectory points; wherein the second type of trajectory points does not include the first type of trajectory points;

[0101] Determine a third type of trajectory point using the latitude and longitude of the primary serving cell in the measurement report; wherein the third type of trajectory point does not include the first type of trajectory point and the second type of trajectory point;

[0102] Determining a fourth type of trajectory point based on the base station latitude and longitude in the signaling data; wherein the fourth type of trajectory point does not include the first type of trajectory point, the second type of trajectory point, and the third type of trajectory point;

[0103] The first type of trajectory points, the second type of trajectory points, the third type of trajectory points and the fourth type of trajectory points are arranged in time sequence as the original trajectory points of the target object arranged in time sequence.

[0104] In a third aspect, an embodiment of the present invention provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus;

[0105] Memory for storing computer programs;

[0106] The processor is configured to implement the steps of any one of the trajectory analysis methods described in the first aspect when executing the program stored in the memory.

[0107] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any trajectory analysis method described in the first aspect are implemented.

[0108] In a fifth aspect, an embodiment of the present invention provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the steps of any one of the trajectory analysis methods described in the first aspect.

[0109] Beneficial effects of the embodiments of the present invention:

[0110] As can be seen from the above, by applying the solution provided by the embodiment of the present invention, when analyzing the trajectory of the target object to obtain the target residence point of the target object, the original trajectory points of the target object arranged in time sequence can be first obtained; every two trajectory points in the original trajectory points that are adjacent in time sequence and have a time interval greater than a first preset time length and / or a distance greater than a first preset length are determined as the endpoints of a missing trajectory segment; according to the position and time interval of the endpoints of each missing trajectory segment, the matching trajectory segment of the missing trajectory segment is searched in the historical trajectory data of the target object; the missing trajectory segment is filled with the matching trajectory segment of each missing trajectory segment to obtain the target trajectory; according to the time relationship and position relationship between the various trajectory points in the target trajectory, the residence point with a residence time exceeding the second preset time length is determined as the target residence point of the target object. At this point, the analysis of the trajectory of the target object is completed.

[0111] Based on the solution provided by the embodiments of the present invention, the target object's historical trajectory data can be used to populate the trajectory data of the target object to be analyzed. Because the movement trajectories of the same target object are similar, the trajectory data populated based on historical data can, to a certain extent, reflect the actual movement of the target object. In this way, when determining the target's dwell point, the location of the target dwell point can be more accurately determined based on more complete and rich trajectory data, thereby reducing the impact of missing trajectory data on trajectory analysis and improving the accuracy of trajectory analysis results. BRIEF DESCRIPTION OF THE DRAWINGS

[0112] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other embodiments can also be obtained based on these drawings.

[0113] Figure 1 A schematic diagram of a flow chart of a trajectory analysis method provided by an embodiment of the present invention;

[0114] Figure 2 for Figure 1 A flowchart of a specific implementation of S101;

[0115] Figure 3 Another schematic flow chart of a trajectory analysis method provided by an embodiment of the present invention;

[0116] Figure 4 for Figure 1 A flowchart of a specific implementation of S105;

[0117] Figure 5 A schematic diagram of a target residency point storage processing flow provided by an embodiment of the present invention;

[0118] Figure 6a A visualization effect diagram of an original trajectory provided by an embodiment of the present invention;

[0119] Figure 6b A method for Figure 6a The trajectory visualization effect diagram after missing trajectory segments are filled, residence points are detected, and outlier trajectory points are recovered from the original trajectory in the image;

[0120] Figure 7a A schematic diagram of a processing flow for trajectory point segmentation and clustering provided by an embodiment of the present invention;

[0121] Figure 7b A schematic diagram of the time distribution of target dwell points and moving trajectory segments provided by an embodiment of the present invention;

[0122] Figure 7c An effect diagram of trajectory point segmentation and clustering provided by an embodiment of the present invention;

[0123] Figure 8 A schematic diagram of a processing flow for storing a movement trajectory pattern provided by an embodiment of the present invention;

[0124] Figure 9 A schematic structural diagram of a trajectory analysis device provided by an embodiment of the present invention;

[0125] Figure 10 A schematic structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0126] The following will be combined with the accompanying drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field based on this application are within the scope of protection of the present invention.

[0127] When users use services through mobile terminals, the mobile communication network will periodically generate measurement reports (MR) to evaluate the quality of the wireless environment. About 2% of MR records contain Assisted Global Positioning System (AGPS) positioning information, which can be used to analyze the trajectory of the target object. In related technologies, the trajectory information of the target object is obtained by performing data cleaning, residence point detection, and trajectory extraction on the collected MR data. However, when the mobile device is turned off or has no signal, it cannot generate MR, resulting in large sections of missing data in the MR data, which ultimately affects the accuracy of the trajectory analysis results.

[0128] In order to solve the above technical problems, an embodiment of the present invention provides a trajectory analysis method.

[0129] Among them, this method can be applied to various scenarios that require behavioral analysis of personnel, such as regional emergency service support (epidemic prevention, disaster relief, etc.), regional crowd statistics analysis and prediction, project site selection, regional marketing, and precise advertising delivery. In addition, this method can be applied to various electronic devices with data acquisition and analysis capabilities, such as laptops, desktop computers, etc., wherein the electronic device can be an independent electronic device or a device cluster composed of multiple electronic devices. In addition, the electronic device can be a device located in a certain system, or it can be a separate electronic device that can obtain relevant data to be processed. For example, the electronic device can be a monitoring server in a road traffic monitoring system.

[0130] A trajectory analysis method provided by an embodiment of the present invention may include the following steps:

[0131] Obtain the original trajectory points of the target object arranged in time sequence;

[0132] Determine every two trajectory points in the original trajectory points that are adjacent in time sequence and meet specified conditions as endpoints of a missing trajectory segment, wherein the specified conditions include: a time interval greater than a first preset duration and / or a distance greater than a first preset length;

[0133] According to the position and time interval of the endpoint of each missing trajectory segment, searching for a matching trajectory segment of the missing trajectory segment in the historical trajectory data of the target object;

[0134] Filling each missing trajectory segment with trajectory points using the matching trajectory segment of the missing trajectory segment to obtain a target trajectory; wherein the target trajectory includes: each filled trajectory point and each original trajectory point;

[0135] According to the time relationship and position relationship between each track point in the target track, a dwell point whose dwell time exceeds a second preset time length is determined as the target dwell point of the target object.

[0136] As can be seen from the above, by applying the solution provided by the embodiment of the present invention, when analyzing the trajectory of the target object to obtain the target residence point of the target object, the original trajectory points of the target object arranged in time sequence can be first obtained; every two trajectory points in the original trajectory points that are adjacent in time sequence and have a time interval greater than a first preset time length and / or a distance greater than a first preset length are determined as the endpoints of a missing trajectory segment; according to the position and time interval of the endpoints of each missing trajectory segment, the matching trajectory segment of the missing trajectory segment is searched in the historical trajectory data of the target object; the missing trajectory segment is filled with the matching trajectory segment of each missing trajectory segment to obtain the target trajectory; according to the time relationship and position relationship between the various trajectory points in the target trajectory, the residence point with a residence time exceeding the second preset time length is determined as the target residence point of the target object. At this point, the analysis of the trajectory of the target object is completed.

[0137] Based on the solution provided by the embodiments of the present invention, the target object's historical trajectory data can be used to populate the trajectory data of the target object to be analyzed. Because the movement trajectories of the same target object are similar, the trajectory data populated based on historical data can, to a certain extent, reflect the actual movement of the target object. In this way, when determining the target's dwell point, the location of the target dwell point can be more accurately determined based on more complete and rich trajectory data, thereby reducing the impact of missing trajectory data on trajectory analysis and improving the accuracy of trajectory analysis results.

[0138] A trajectory analysis method provided by an embodiment of the present invention is described in detail below with reference to the accompanying drawings.

[0139] Figure 1 A schematic diagram of a flow chart of a trajectory analysis method provided by an embodiment of the present invention is shown as follows: Figure 1 As shown, the method may include the following steps S101-S105.

[0140] S101: Acquire original trajectory points of a target object arranged in time sequence.

[0141] Typically, to understand the target object's behavior and other information, its trajectory can be analyzed. During trajectory analysis, the target object's trajectory points are first obtained and then arranged in descending order of time. This yields the target object's original trajectory points, arranged in chronological order.

[0142] The time sequence refers to the order of time from early to late, and each original trajectory point may include the time information of the target object passing through the trajectory point and the position information of the trajectory point.

[0143] Optionally, the location information may be the longitude and latitude of the location of the track point.

[0144] Furthermore, each of the acquired original trajectory points of the target object falls within a certain time range. In other words, the temporal information of these original trajectory points is subject to time constraints. In this embodiment of the present invention, this time range is not specifically limited and can be set based on the specific circumstances of the actual application. Thus, the trajectory analysis method provided by this embodiment of the present invention can analyze user trajectories of any length.

[0145] For example, after obtaining the measurement report of the user terminal of the target object, the point corresponding to the Assisted Global Positioning System AGPS positioning information in the measurement report can be determined as the original trajectory point of the target object.

[0146] MRs include information such as timing advance (TA), reference signal received power (RSRP), physical cell identification (PCI), and E-UTRA Absolute Radio Frequency Channel Number (EARFCN). In addition, approximately 2% of MRs carry Assisted Global Positioning System (AGPS) positioning information.

[0147] Optionally, in a specific implementation, such as Figure 2 As shown, the above step S101 may include the following steps S201-S206.

[0148] S201: Acquire measurement reports and signaling data of a user terminal of a target object.

[0149] In this specific implementation, since not all measurement reports (MR) contain AGPS positioning information, the trajectory data of the target object obtained only based on MR is incomplete. Therefore, on the basis of obtaining the MR data of the user terminal of the target object, the signaling data of the user terminal of the target object can be additionally obtained. Then, the trajectory data of the target object is obtained based on the MR data and the signaling data, with MR data as the main data and signaling data as the supplement.

[0150] Optionally, the signaling data may be S1-MME (Mobility Management Entity) signaling. S1-MME signaling is a type of signaling. S1-MME is a control plane interface that connects base stations and mobility management entities. It primarily performs radio access bearer control and interface-specific operations and maintenance for the S1 interface (the communication interface between the base station LTE eNodeB and the packet core network EPC). S1-MME signaling carries base station latitude and longitude information.

[0151] S202: Determine the point corresponding to the Assisted Global Positioning System AGPS positioning information in the measurement report as a first type of trajectory point.

[0152] After obtaining the measurement report and signaling data of the user terminal of the target object, the point corresponding to the Assisted Global Positioning System AGPS positioning information in the measurement report can be first determined as a first-category trajectory point. The first-category trajectory point can also be marked as an AGPS trajectory point.

[0153] S203: Determine the second type of trajectory points based on the preset machine learning algorithm and using the measurement report.

[0154] Among them, the second type of trajectory points does not include the first type of trajectory points.

[0155] For MRs that do not include AGPS positioning information, the AGPS positioning information in the MRs that do include AGPS positioning information can be used in combination with information such as TA, RSRP, PCI, and EARFCN in the MRs to construct a fingerprint library for training a machine learning algorithm. Thus, using this fingerprint library, a machine learning algorithm can be trained to predict the AGPS positioning information corresponding to MRs that do not include AGPS positioning information. In this way, for MRs that do not include AGPS positioning information, the AGPS positioning information in the MRs can be predicted based on the machine learning algorithm trained above. Furthermore, the points corresponding to the predicted AGPS positioning information are used to determine the second type of trajectory points. The second type of trajectory points can also be labeled as ML (Machine Learning) trajectory points.

[0156] S204: Determine the third type of trajectory points using the latitude and longitude of the primary serving cell in the measurement report.

[0157] Among them, the third type of trajectory points does not include the first type of trajectory points and the second type of trajectory points

[0158] When the AGPS positioning information, TA, RSRP, PCI, EARFCN, and other information in the MR are missing, making it impossible to use the above steps S202-S203 to determine the first and second types of trajectory points, the third type of trajectory points can be determined based on the latitude and longitude information of the primary serving cell in the MR. The third type of trajectory points can also be labeled as SC (Serving Cell) trajectory points.

[0159] For example, the point indicated by the latitude and longitude information of the primary serving cell in the MR may be determined as a third type of trajectory point.

[0160] S205: Determine the fourth type of trajectory point based on the latitude and longitude of the base station in the signaling data.

[0161] Among them, the fourth category of trajectory points does not include the first category of trajectory points, the second category of trajectory points and the third category of trajectory points

[0162] When the AGPS positioning information, main service cell longitude and latitude, TA, RSRP, PCI, EARFCN and other information in the MR are missing, resulting in the inability to use the above steps S202-S205 to determine the first type of trajectory points, the second type of trajectory points and the third type of trajectory points, the base station longitude and latitude information in the signaling data can be used to determine the fourth type of trajectory points.

[0163] For example, the point indicated by the base station longitude and latitude information in the S1-MME signaling is determined as a fourth type of trajectory point. The fourth type of trajectory point can also be marked as an S1 trajectory point.

[0164] Optionally, in the process of determining the fourth type of trajectory points using the base station latitude and longitude information in the S1-MME signaling, the above-mentioned base station latitude and longitude information can be used and combined with the actual coverage range of the base station's service cell to correct the above-mentioned base station latitude and longitude information.

[0165] It should be emphasized that whether it is the first to fourth types of trajectory points mentioned above, or AGPS trajectory points, ML trajectory points, SC trajectory points and S1 trajectory points, they are all examples of the names of various types of trajectory points, rather than limitations, that is, they are only for distinguishing the original trajectory points obtained through different acquisition methods.

[0166] In addition, when acquiring the above-mentioned various trajectory points of the target object, the user privacy data in the MR and signaling data can be encrypted or desensitized to ensure the information security of the target object.

[0167] S206: Arrange the first type of trajectory points, the second type of trajectory points, the third type of trajectory points, and the fourth type of trajectory points in time sequence as the original trajectory points of the target object arranged in time sequence.

[0168] After obtaining the above-mentioned first-category trajectory points, second-category trajectory points, third-category trajectory points, and fourth-category trajectory points, the obtained first-category trajectory points, second-category trajectory points, third-category trajectory points, and fourth-category trajectory points can be arranged in time sequence. Thus, the above-mentioned first-category trajectory points, second-category trajectory points, third-category trajectory points, and fourth-category trajectory points arranged in time sequence can be determined as the original trajectory points of the target object arranged in time sequence.

[0169] S102: Determine every two trajectory points in the original trajectory points that are adjacent in time sequence and meet a specified condition as endpoints of a missing trajectory segment.

[0170] The specified conditions include: the time interval is greater than a first preset duration and / or the distance is greater than a first preset length.

[0171] Among the acquired original trajectory points, there may be two temporally adjacent trajectory points separated by a long time interval, two temporally adjacent trajectory points located far apart, two temporally adjacent trajectory points separated by a long time interval and located far apart, etc. In the above cases, between the two temporally adjacent trajectory points, there may be original trajectory points that the target object actually passed through but was not acquired. Therefore, the trajectory segment between the two temporally adjacent trajectory points in the above cases can be considered missing. Therefore, the two temporally adjacent trajectory points in the above cases can be used as the endpoints of the missing trajectory segment.

[0172] Therefore, the missing trajectory segments of the target object can be found based on the time interval and distance between two temporally adjacent trajectory points in each original trajectory point of the target object obtained above and arranged in time sequence, so that every two trajectory points in each original trajectory point that are temporally adjacent and meet the specified conditions are determined as the endpoints of a missing trajectory segment.

[0173] Among them, the specified conditions for determining that two temporally adjacent trajectory points are the endpoints of a missing trajectory segment can be: the time interval between two temporally adjacent trajectory points is greater than a first preset duration, or the distance between two temporally adjacent trajectory points is greater than a first preset length, or the time interval between two temporally adjacent trajectory points is greater than the first preset duration and the distance is greater than the first preset length.

[0174] For example, every two temporally adjacent original trajectory points can be traversed in sequence. If two temporally adjacent trajectory points meet the specified conditions, it can be determined that there is a missing trajectory segment between the two temporally adjacent trajectory points, and the two temporally adjacent trajectory points can be used as the endpoints of a missing trajectory segment.

[0175] For example, point A and point B are two temporally adjacent trajectory points. Point A is at 8:00 AM, and point B is at 10:00 AM. The time interval between points A and B is two hours, and the first preset time duration is one hour. Therefore, points A and B can be used as the endpoints of a missing trajectory segment. However, between 8:00 AM and 10:00 AM, the target device may be powered off or the signal may be disconnected, making it impossible to obtain the user's trajectory data, resulting in a missing trajectory segment.

[0176] For example, point A and point B are two temporally adjacent trajectory points, the distance between them is 3 kilometers, and the first preset length is 2 kilometers. Therefore, these points A and B can be used as the endpoints of a missing trajectory segment. However, during the movement of the target object from point A to point B, the target object's device may be powered off or the signal is disconnected, resulting in an inability to obtain the user's trajectory data, thus causing a missing trajectory segment.

[0177] For example, points A and B are two temporally adjacent trajectory points. Point A is at 8:00 AM, and point B is at 10:00 AM. The distance between points A and B is 3 kilometers. The first preset duration is one hour, and the first preset length is 2 kilometers. Therefore, points A and B can be used as the endpoints of a missing trajectory segment.

[0178] S103: searching for a matching trajectory segment of each missing trajectory segment in the historical trajectory data of the target object according to the position and time interval of the endpoint of the missing trajectory segment.

[0179] After determining the endpoints of each missing trajectory segment, in order to analyze the trajectory of the target object based on more complete and richer trajectory data, the missing trajectory points between each set of endpoints can be supplemented.

[0180] In order to make the supplemented trajectory points closer to the actual trajectory of the target object, trajectory segments that match the position and time interval of each group of endpoints can be found from the historical trajectory data of the target object to fill in the missing trajectory points between the group of endpoints.

[0181] Optionally, the minimum distance between each endpoint of the matching trajectory segment of each missing trajectory segment and each endpoint of the missing trajectory segment is less than a second preset length, and the ratio of the time interval between the endpoints of the matching trajectory segment of each missing trajectory segment to the time interval between the endpoints of the missing trajectory segment is less than a preset ratio.

[0182] Among them, for the two endpoints in each missing trajectory segment, in the historical trajectory data of the target object, a historical trajectory segment is searched in which the minimum distance between each endpoint and the two endpoints of the missing trajectory segment is less than a second preset length. Then, among the historical trajectory points found, a historical trajectory segment is further determined in which the ratio of the time interval between the two endpoints to the time interval between the two endpoints in the missing trajectory segment is less than a preset ratio. The historical trajectory segment obtained after the two searches can be determined as the matching trajectory segment of the missing trajectory segment.

[0183] Among them, during the second search mentioned above, if the ratio of the time interval between multiple two endpoints to the time interval between two endpoints in the missing trajectory segment is less than the preset ratio, the above multiple historical trajectory segments can be further screened to select a historical trajectory segment as the matching trajectory segment of the missing trajectory segment.

[0184] For example, the historical trajectory segment whose endpoints have a time interval closest to the time interval between the endpoints of the missing trajectory segment can be selected as the matching trajectory segment for the missing trajectory segment; the historical trajectory segment whose endpoint is closest to the endpoint of the missing trajectory segment can be selected as the matching trajectory segment for the missing trajectory segment; or the historical trajectory segment with the most trajectory points can be selected as the matching trajectory segment for the missing trajectory segment. All of these are reasonable and are not specifically limited in this embodiment of the present invention.

[0185] S104: Fill the missing trajectory segments with trajectory points using the matching trajectory segments of each missing trajectory segment to obtain the target trajectory.

[0186] The target trajectory includes: each filled trajectory point and each original trajectory point.

[0187] After finding the matching trajectory segments of the missing trajectory segments, the missing trajectory segments can be filled with the trajectory points in the matching trajectory segments of each missing trajectory segment to obtain a target trajectory with relatively complete trajectory data.

[0188] The target trajectory segment may include: the filled trajectory points belonging to the matching trajectory segment and the obtained original trajectory points. Moreover, since each matching trajectory segment is obtained from the historical trajectory data of the target object, the filled trajectory points included in the target trajectory segment are trajectory points in the historical trajectory of the target object.

[0189] Optionally, the trajectory points used to fill each missing trajectory segment can be all the trajectory points in the matching trajectory segment of the missing trajectory segment, or some of the trajectory points in the matching trajectory segment of the missing trajectory segment except the endpoints, or all the trajectory points in the matching trajectory segment of the missing trajectory segment except the endpoints.

[0190] Optionally, in a specific implementation, such as Figure 3 As shown, the above step S104 may include the following steps S301-S303.

[0191] S301: For each missing trajectory segment, determine a trajectory point extraction period according to a preset filling quantity and ratio of the missing trajectory segment.

[0192] S302: According to the trajectory point extraction cycle, trajectory points other than the endpoints in the matching trajectory segment of the missing trajectory segment are extracted in time sequence, and the extracted trajectory points are filled into the missing trajectory segment in time sequence.

[0193] S303: updating the time of each filled trajectory point according to the duration and filling quantity of the missing trajectory segment.

[0194] In this specific implementation, since the duration of the matching trajectory segment of each missing trajectory segment may be different from the duration of the missing trajectory segment, in order to make the filled target trajectory closer to the real trajectory of the target object, the preset filling quantity of the missing trajectory segment can be determined first, that is, the number of trajectory points filled in the missing trajectory segment can be determined; then, according to the above filling quantity and the ratio of the duration of the matching trajectory segment of the missing trajectory segment to the duration of the missing trajectory segment, the extraction period of the trajectory points in the matching trajectory segment of the missing trajectory segment can be determined; then, the trajectory points excluding the endpoints in the matching trajectory segment of the missing trajectory segment can be extracted. In the trace points, according to the above-mentioned extraction cycle, each trace point in the matching trace segment of the missing trace segment is extracted in time sequence, and each extracted trace point is filled between the two end points of the missing trace segment in time sequence; finally, since the time information of the matching trace segment of the missing trace segment may be different from the time information of the missing trace segment, the time interval between each adjacent trace point filled can be determined according to the duration of the missing trace segment and the number of trace points filled, that is, according to the duration of the missing trace segment and the above-mentioned filling number, thereby, according to the determined time interval, the time of each trace point filled is updated.

[0195] For example, assuming the duration of a missing segment is 1 hour and the duration of the matching segment is 2 hours, the number of missing segments to be filled is determined to be 10. Therefore, the trajectory point extraction cycle can be determined to be 12 minutes. At 12-minute intervals, each trajectory point is extracted from the matching segment except for the two endpoints in a time-sequential manner. Then, the missing segment is filled with each extracted trajectory point in a time-sequential manner. Finally, the time information of each filled trajectory point is updated at 6-minute intervals.

[0196] For example, the time range of the missing trajectory segment is: 9:00 am to 10:00 am, and the time range of the matching trajectory segment of the missing trajectory segment is: 8:30 am to 10:30 am; then the time of two trajectory points extracted from the matching trajectory segment of the missing trajectory segment are 8:42 am and 8:54 am respectively, then after these two trajectory points are filled into the missing trajectory segment in chronological order, the time of these two trajectory points are updated to 9:06 am and 9:12 am respectively.

[0197] The filling amount of each missing track segment can be the same or different; for example, the filling amount of each missing track segment can be determined based on the duration of each missing track segment and / or the distance between the endpoints. This is all reasonable.

[0198] In addition, the above specific implementation method can be called a time-sequential proportional filling method. Based on this filling method, the filled trajectory can be closer to the actual trajectory of the target user, thereby obtaining a more accurate target trajectory.

[0199] S105: Determine, based on the time relationship and position relationship between each track point in the target track, a dwell point whose dwell time exceeds a second preset time length as a target dwell point of the target object.

[0200] After the missing trajectory segments are filled to obtain a relatively complete target trajectory, the trajectory of the target object is analyzed based on the time information and position information of the trajectory points in the target trajectory to determine the target residence point of the target object.

[0201] Among them, since the target residence point is a residence point where the target object resides for more than the second preset time length, it can be considered that the target object stays near the target residence point for a longer time. Furthermore, the target residence point of the target object can be used to analyze behavioral information such as the trajectory characteristics and behavioral patterns of the target object.

[0202] For example, when the target object is a corporate employee, the target residence point of the target object is usually near commercial office buildings and residential areas, which is in line with the daily life pattern of this group of people who mainly stay at home and go to work.

[0203] In addition, since the target dwell point is a dwell point whose dwell time exceeds the second preset time length, it can be indicated that the target object stays near it for a long time, and therefore, the target dwell point can also be called a long-term dwell point.

[0204] Optionally, in a specific implementation, such as Figure 4 As shown, the above step S105 may include the following steps S401-S404.

[0205] S401: Based on the time relationship and distance relationship of each track point in the target track, each track point in the target track is divided into multiple track point clusters.

[0206] The distance between each trajectory point in each trajectory point cluster and the cluster center of the trajectory point cluster is less than a fourth preset length, and the cluster center of each trajectory point cluster is the point indicated by the average position information of all trajectory points in the trajectory point cluster.

[0207] In this specific implementation, after obtaining the target trajectory, the trajectory points in the target trajectory can be divided into multiple trajectory point clusters based on the time relationship and distance relationship of each trajectory point in the target trajectory, so that the distance between each trajectory point in each trajectory point cluster and the cluster center of the trajectory point cluster is less than a fourth preset length, and the cluster center of each trajectory point cluster is the point indicated by the average position information of all trajectory points in the trajectory point cluster.

[0208] Optionally, each trajectory point in the target trajectory can be traversed in time sequence. When traversing to the first trajectory point, the first trajectory point is used as the first trajectory point in the first current trajectory point cluster and the cluster center of the first current trajectory point cluster, and then the next trajectory point is traversed. When traversing to each trajectory point other than the first trajectory point, the trajectory point is used as the current trajectory point, and the distance from the current trajectory point to the cluster center of the current trajectory point cluster is calculated. If the distance is less than a fourth preset length, the current trajectory point is divided into the current trajectory point cluster, the average position information of all trajectory points in the current trajectory point cluster is calculated, and the cluster center of the current trajectory point cluster is updated based on the average information. If the distance is not less than the fourth preset length, the current trajectory point cluster is determined as the final trajectory point cluster, the cluster center of the current trajectory point cluster is determined as the cluster center of the final trajectory point cluster, and the current trajectory point is used as the first trajectory point in the next current trajectory point cluster and the cluster center of the next current trajectory point cluster, and then the next trajectory point is traversed. This continues until all trajectory points in the target trajectory are traversed to obtain each trajectory point cluster.

[0209] For example, assume that among the trajectory points arranged in time sequence on the target trajectory, the first three trajectory points are trajectory points A, B, and C. Then, trajectory point A can be used as the first trajectory point of the current trajectory point cluster P and the current cluster center of the current trajectory point cluster P. Then, trajectory point B is read in time sequence, and the distance from trajectory point B to trajectory point A is calculated. If the distance from trajectory point B to trajectory point A is less than a fourth preset length, trajectory point B is assigned to the current trajectory point cluster P. The average position information of trajectory points A and B is calculated, and the current cluster center of the current trajectory point cluster P is updated to point O1, which corresponds to the average position information of trajectory points A and B. Then, trajectory point C is read in time sequence, and the distance from trajectory point C to O1 is calculated. If the distance from trajectory point C to O1 is greater than the fourth preset length, the current trajectory point cluster P is determined to be the final trajectory point cluster P, O1 is determined to be the cluster center of trajectory point cluster P, and trajectory point C is used as the first trajectory point in the current trajectory point cluster Q and the current cluster center of the current trajectory point cluster Q. Then, the next trajectory point is traversed. Until all trajectory points in the target trajectory are traversed, each trajectory point cluster is obtained.

[0210] Optionally, among the various trajectory point clusters obtained above, there may be trajectory point clusters that are very close to each other. In order to facilitate subsequent analysis and calculation, these trajectory point clusters can be further merged. Exemplarily, for each trajectory point cluster, the distance between the cluster centers of every two trajectory point clusters can be calculated, and multiple trajectory point clusters whose distance between cluster centers is less than a set length can be merged to obtain a new trajectory point cluster. The new trajectory point cluster includes all the trajectory points in the multiple trajectory point clusters, and the cluster center of the new trajectory point cluster is the point indicated by the average information of the position information of all the trajectory points in the multiple trajectory point clusters. Since the new trajectory point cluster contains the range covered by the original multiple trajectory point clusters, the above-mentioned set length can use a smaller value to make the merging result more accurate.

[0211] S402: Taking the cluster center of each trajectory point cluster as the initial cluster center, clustering each trajectory point in the target trajectory according to a preset cluster radius to obtain each cluster center.

[0212] After obtaining each trajectory point cluster, the cluster center of each trajectory point cluster can be used as the initial cluster center, and each trajectory point in the target trajectory can be clustered according to the preset cluster radius to obtain each cluster center.

[0213] The embodiment of the present invention does not limit the size of the preset clustering radius and the fourth preset length. For example, the preset clustering radius may be greater than the fourth preset length, smaller than the fourth preset length, or even equal to the fourth preset length.

[0214] Optionally, the initial cluster center can be used as the window center of the mean shift algorithm, and the preset cluster radius can be used as the window radius. The mean shift algorithm can be used to make each window center converge in the direction of higher trajectory point density to obtain each cluster center. Specifically:

[0215] For each window center, search for all trajectory points in the target trajectory whose distance from the window center is within the window radius. This way, it can be determined that all the trajectory points found belong to the window corresponding to the window center. Then, calculate the vector from the window center to each trajectory point in the window, and use the average vector of the calculated vectors as the offset vector. Then move the window center in the direction of the offset vector, and the moving distance is the modulus of the offset vector. Repeat the above steps until the modulus of the offset vector is less than the set modulus threshold. At this point, the center point of all trajectory points in the window is the cluster center obtained using the mean shift algorithm.

[0216] Among them, the above-mentioned offset vector points to the position with a higher density of trajectory points. Therefore, the position of the next window center can be found along the offset vector. Thus, through step-by-step iteration, the window center reaches the position with the highest density among the trajectory points in the target trajectory. In this way, the window center can remain basically stable.

[0217] S403: For each track point in the target track, assign the track point to a cluster center that has a distance less than a fifth preset length and a minimum distance from the track point, to obtain various resident areas.

[0218] After obtaining the above-mentioned cluster centers, for each trajectory point in the target trajectory, the distance between the trajectory point and each cluster center can be calculated, thereby determining the cluster centers whose distance from the trajectory point is less than the fifth preset length, and among the determined cluster centers, determining the cluster center with the smallest distance from the trajectory point, thereby assigning the trajectory point to the cluster center obtained by the above-mentioned two determinations, thereby obtaining each residence area.

[0219] Among them, for each trajectory point in the target trajectory, the trajectory point is assigned to the cluster center whose distance to the trajectory point is less than the fifth preset length and the smallest distance. It can also be expressed as assigning each trajectory point to each cluster center in a nearest neighbor manner based on the fifth preset length.

[0220] For example, if the distance between trajectory point a in the target trajectory and cluster center A is less than the fifth preset length, trajectory point a is assigned to cluster center A; if the distances between trajectory point b and cluster centers A and B are both less than the fifth preset length, but trajectory point b is closer to cluster center B, trajectory point b is assigned to cluster center B.

[0221] Optionally, the fifth preset length may be a larger value, so as to achieve effective aggregation of trajectory points with relatively high distribution coefficients, for example, to achieve effective aggregation of outlier trajectory points.

[0222] Among them, the embodiment of the present invention does not limit the size of the above-mentioned preset clustering radius and the above-mentioned fifth preset length. For example, the above-mentioned preset clustering radius may be greater than the above-mentioned fifth preset length, the above-mentioned preset clustering radius may be less than the above-mentioned fifth preset length, and the above-mentioned preset clustering radius may also be equal to the above-mentioned fifth preset length. In addition, the embodiment of the present invention does not limit the size of the above-mentioned fourth preset length and the above-mentioned fifth preset length. For example, the above-mentioned fourth preset length may be greater than the above-mentioned fifth preset length, the above-mentioned fourth preset length may be less than the above-mentioned fifth preset length, and the above-mentioned fourth preset length may also be equal to the above-mentioned fifth preset length.

[0223] S404: Calculate the residence time of the target object in each residence area according to the time of each trajectory point in the residence area, and determine the residence center of the residence area whose calculated residence time exceeds the second preset time as the target residence point of the target object.

[0224] The residence center of each residence area is a point indicated by average position information of all trajectory points in the residence area.

[0225] After obtaining each residence area, for each residence area, the point indicated by the average information of the position information of all the trajectory points in the residence area can be determined as the residence center of the residence area. Then, the residence time of the target object in each residence area can be calculated according to the time of each trajectory point in each residence area, and the residence center of the residence area whose residence time exceeds the second preset time can be determined as the target residence point of the target object.

[0226] Optionally, the time period in which the target object resides in each residence area can be obtained according to the time of each track point in each residence area, and the duration of these time periods can be added together to obtain the residence time of the target object in the residence area.

[0227] Optionally, if the time interval between every two temporally adjacent trajectory points in the obtained trajectory data of the target object is the same, the residence time of the residence area can be calculated by the time interval between every two temporally adjacent trajectory points and the number of trajectory points in the residence area.

[0228] Optionally, when the location information of the track points is expressed in longitude and latitude, the resident center of each resident area is a point indicated by an average value of the longitude and latitude of all the track points in the resident area.

[0229] Optionally, the cluster radius of the residence area whose residence time does not exceed the second preset time can be reduced to adapt to the distribution characteristic that the size of the residence area is positively correlated with the residence time, and the obtained area can be used as the user's short-term residence area.

[0230] Based on this, by aggregating the trajectory points of the target object across time periods, and gradually aggregating the residence areas using different thresholds in multiple stages, we can obtain the target residence points and residence areas where the target object stays for more than the second preset time. This can comprehensively consider the temporal information and spatial distance of the user trajectory data, making the trajectory analysis results more comprehensive and accurate.

[0231] Optionally, in a specific implementation, such as Figure 5 As shown, after step S105, the trajectory analysis method provided by the embodiment of the present invention may further include the following steps S501-S503.

[0232] S501: Calculate the distance between each target stay point and each pre-stored historical stay point.

[0233] S502: For each target stay point, if there is a designated stay point in each historical stay point whose distance from the target stay point is less than a sixth preset length, then add the time range corresponding to the target stay point to the time range of the designated stay point.

[0234] S503: For each target stay point, if there is no designated stay point with a distance from the target stay point less than a sixth preset length among the historical stay points, then store the target stay point and the time range of the target stay point.

[0235] In this specific implementation, after obtaining the target dwell point of the target object, the target dwell point of the target object can also be stored to facilitate the subsequent analysis and application of the trajectory data of the target object. However, for some target dwell points, dwell points very close to their positions may have been stored previously. Therefore, in order to save storage space, the target dwell point and the stored dwell points with similar positions can be regarded as one dwell point, and the position information of the target dwell point is no longer stored. However, the time range of the target dwell point may be different from the time range of the already stored close dwell point. In this case, the time range corresponding to the target dwell point can be added to the time range of the already stored close dwell point.

[0236] Based on this, for each target dwell point, the distance between the target dwell point and each pre-stored historical dwell point can be calculated. If there is a designated dwell point among the historical dwell points whose distance from the target dwell point is less than a sixth preset length, the time range corresponding to the target dwell point is added to the time range of the designated dwell point. If there is no designated dwell point among the historical dwell points whose distance from the target dwell point is less than the sixth preset length, the target dwell point and the time range of the target dwell point are stored.

[0237] Optionally, each target stay point of the same user can be recorded in the same entry, which can include the user's unique identifier, the user's target stay point, and the time range set of the target stay point. Of course, it can also include other custom fields, such as the average stay duration, the number of time periods, etc. Among them, the format of the location information of the target stay point can be: (longitude, latitude), the time point format can be: YYYYMMDDHHMM (year, month, day, hour, minute), and the time range format of the target stay point can be: start time#end time. Multiple time ranges can be separated by ":", for example: 202105010101#202105010301:202105020101#202105020301.

[0238] In this specific implementation, storing the target residence points of the target objects obtained through analysis is conducive to counting the user's permanent residence, facilitating the efficient analysis, storage and retrieval of user trajectory information, and can also be used to build a richer trajectory database and more accurate user portraits, or to predict the probability of a user appearing in a specific time and space.

[0239] Optionally, in a specific implementation, the trajectory analysis method provided by the embodiment of the present invention may further include the following steps 1 and 2.

[0240] Step 1: For every two designated trajectory points that are adjacent in time sequence, calculate the distance and time interval between the two designated trajectory points, and calculate the average speed of the target object moving between the two designated trajectory points based on the calculated distance and time interval.

[0241] The designated trajectory points include: each original trajectory point and / or each filled trajectory point. That is, outliers can be found in each original trajectory point and / or each filled trajectory point.

[0242] Step 2: If the calculated average speed is greater than the preset speed, an outlier trajectory point among the two designated trajectory points is determined according to the positions of the two designated trajectory points, and a designated recovery operation is performed on the outlier trajectory point.

[0243] In this specific implementation, due to signal problems or base station switching, the acquired trajectory of the target object may contain a small number of outlier trajectory points that drift long distances within a short period of time. In other words, the acquired trajectory of the target object may contain trajectory spikes that stray from the target object within a short period of time and then return. In this case, in order to make the trajectory analysis results more accurate, these outlier trajectory points can be found and recovered.

[0244] Because outlier trajectory points can drift long distances in a short period of time, the average speed between an outlier trajectory point and its temporally adjacent normal trajectory points can generally exceed the normal speed range, such as walking or driving speed. Therefore, a speed can be preset based on the target object's movement scenario, such as walking or using a vehicle. In this way, for every two designated temporally adjacent trajectory points, the average speed between the two trajectory points can be calculated. If the average speed is greater than the preset speed, it can be determined that an outlier trajectory point exists between the two trajectory points.

[0245] The two trajectory points may both be determined as outlier trajectory points, or it may be determined which one of the two trajectory points is the outlier trajectory point according to the positions of the two trajectory points.

[0246] Because outlier trajectory points can drift over long distances in a short period of time, and the distance and direction of drift are random, the distribution of trajectory points near the location of an outlier trajectory point is usually sparser than the distribution of trajectory points near the location of a normal trajectory point. Therefore, when determining which of the two trajectory points is the outlier, the distribution of trajectory points within a certain range near the two trajectory points can be determined based on the positions of the two trajectory points, thereby determining the outlier trajectory point among the two trajectory points.

[0247] Optionally, for each of the two trajectory points, the number of trajectory points whose distance to the trajectory point is less than a set length may be calculated. If the number is less than the set number, the trajectory point is determined to be an outlier trajectory point.

[0248] For example, assuming that the two trajectory points are trajectory point A and trajectory point B, the length is set to a, and the number is set to b. If it is calculated that the number of trajectory points whose distance to trajectory point A is less than a is greater than b, and the number of trajectory points whose distance to trajectory point B is less than a is less than b, then it is determined that trajectory point B is an outlier trajectory point; if it is calculated that the number of trajectory points whose distance to trajectory point A is less than a is less than b, and the number of trajectory points whose distance to trajectory point B is less than a is also less than b, then it is determined that both trajectory points A and B are outlier trajectory points.

[0249] Optionally, since the distribution of trajectory points near the position of an outlier trajectory point is usually sparser than that near the position of a normal trajectory point, the trajectory points in the target trajectory can be directly traversed, and for each trajectory point, the number of trajectory points whose distance to the trajectory point is less than a set length is calculated. If the number is less than the set number, the trajectory point is determined to be an outlier trajectory point.

[0250] In addition, since the position of the outlier trajectory point may fall near the trajectory points of the target object in other time periods, in order to determine such outlier trajectory points, the above-mentioned "calculating the number of trajectory points whose distance to each trajectory point is less than a set length" can also be: calculating the number of trajectory points whose distance to each trajectory point is less than a set length and whose time interval to the trajectory point is less than a set time interval for each trajectory point.

[0251] After an outlier trajectory point is identified, the designated recovery operation can be performed on the outlier trajectory point. The designated recovery operation can be removing the outlier trajectory point or returning the outlier trajectory point to its normal position, that is, removing the outlier trajectory point and filling in a new trajectory point based on the trajectory points before and after the outlier trajectory point in time sequence.

[0252] In addition, the above steps 1 and 2 may be performed before or after the above step S105. When the above steps 1 and 2 are performed after the above step S105, the trajectory points included in the determined residence area may be updated, thereby affecting the residence time of each determined residence area and further affecting the target residence point finally obtained.

[0253] Based on this, in this specific implementation, step S105, which determines, based on the time relationship and position relationship between the various trajectory points in the target trajectory, a dwell point whose dwell time exceeds the second preset time period as the target dwell point of the target object, may include the following step three:

[0254] Step 3: After the designated recycling operation, if there is a residence area where the trajectory point is updated, it is necessary to calculate the residence time of the target object in the residence area based on the time of each trajectory point in each updated residence area.

[0255] In this specific implementation, the outlier trajectory points can be recovered to clear the trajectory spikes in the target object's target trajectory that have left the target within a short period of time and then returned, so that the target trajectory of the target object used for trajectory analysis is closer to the actual trajectory of the target object, which is beneficial to improving the accuracy of the trajectory analysis results.

[0256] Based on this, the solution provided by the embodiments of the present invention can use the target object's historical trajectory data to populate the trajectory data of the target object to be analyzed. Because the movement trajectories of the same target object are similar, the trajectory data populated based on historical data can, to a certain extent, reflect the actual movement of the target object. In this way, when determining the target's dwell point, the location of the target dwell point can be more accurately determined based on more complete and richer trajectory data, thereby reducing the impact of missing trajectory data on trajectory analysis and improving the accuracy of trajectory analysis results.

[0257] like Figure 6a and Figure 6b As shown, Figure 6a An original trajectory visualization effect diagram provided by an embodiment of the present invention, such as Figure 6b A method for Figure 6a The trajectory visualization effect diagram after the missing trajectory segments are filled, the residence points are detected and the outlier trajectory points are recovered. It can be seen that Figure 6a In the dataset, the original trajectory points are distributed in a disorderly manner, and there are missing trajectory segments and outlier trajectory points, which is not conducive to the analysis of the trajectory of the target object. Figure 6a The original trajectory in , after the missing trajectory segments are filled, the dwell points are detected and the outlier trajectory points are recovered, can be obtained Figure 6b The trajectory shown. It can be seen that Figure 6b The distribution of trajectory points in the original trajectory is clearer, more regular, and more consistent with the behavioral characteristics of the target object in general. Therefore, processing such as filling missing trajectory segments, detecting dwell points, and recovering outlier trajectory points on the original trajectory can help to analyze the trajectory of the target object more accurately.

[0258] Optionally, in a specific implementation, such as Figure 7a As shown, after step S105, the trajectory analysis method provided by the embodiment of the present invention may further include the following steps S701-S704.

[0259] S701: Determine the time of each target dwell point according to the time of each track point in the target track.

[0260] In this specific implementation, after obtaining each target dwell point, the time of each target dwell point can be determined according to the time of each track point in the target track.

[0261] For example, the time of each target dwell point within a certain range can be used as the time of the target dwell point. For example, the time of the trajectory points within 500 meters of the target dwell point A is used as the time of the target dwell point A. If the time distribution of these points is 9:00-10:00 and 11:00-12:00, then the time of the target dwell point A is 9:00-10:00 and 11:00-12:00.

[0262] S702: Divide the trajectory points between every two temporally adjacent target stay points in the target trajectory into the same group, and determine a moving trajectory segment based on each group of trajectory points to obtain individual moving trajectory segments.

[0263] Furthermore, after obtaining the time of each target dwell point, for every two target dwell points that are temporally adjacent in the target trajectory, the trajectory points located between the two target dwell points can be divided into the same group, thereby determining the movement trajectory segment based on the group of trajectory points to obtain each movement trajectory segment.

[0264] When arranging the target dwell points and the moving trajectory segments in time sequence, the target dwell points and the moving trajectory segments are arranged in an interlaced manner. Optionally, except for the first moving trajectory segment, the start time of each moving trajectory segment can be the next time point after the end time of its previous target dwell point, and except for the last moving trajectory segment, the end time of each moving trajectory segment can be the previous time point before the start time of its next target dwell point. In other words, except for the first moving trajectory segment and the last moving trajectory segment, the time range of each moving trajectory segment and the time range of its two adjacent target dwell points are connected end to end.

[0265] For example, in a specific embodiment, the time distribution of the target station point and the moving trajectory segment of the target object is as follows: Figure 7bAs shown in the figure, the target trajectory of the target object starts and ends at 9:00 and 15:50 respectively. The time distribution of the target dwell point A is 10:00-10:50 and 14:00-14:50, and the time distribution of the target dwell point B is 12:00-12:50. Based on the time distribution of the target dwell points A and B, the target trajectory is divided into movement trajectory segment M1 (9:00-9:50), movement trajectory segment M2 (11:00-11:50), movement trajectory segment M3 (13:00-13:50), and movement trajectory segment M4 (15:00-15:50). For this target trajectory, the start time of the first moving trajectory segment M1 is the start time of the target trajectory (9:00), the end time of the last moving trajectory segment M4 is the end time of the target trajectory (15:50), the start time of the moving trajectory segment M2 (11:00) is the next time point of the end time (10:50) of its previous target residence point A, and the end time (11:50) of the moving trajectory segment M2 is the next time point of the start time (12:00) of its next target residence point B. The same applies to the moving trajectory segment M2.

[0266] Optionally, the positions of the start and end track points of each moving track segment may be the positions of the track points corresponding to the start and end times of the moving track segment, or may be the positions of two target residence points that are temporally adjacent to the moving track segment.

[0267] S703: For every two moving trajectory segments, determine the second trajectory points corresponding to each first trajectory point in the first trajectory segment in the second trajectory segment; determine the distance between the two moving trajectory segments based on the distances between each first trajectory point on the first trajectory segment and the corresponding second trajectory point on the second trajectory segment; and determine the temporal relationship between the two moving trajectory segments based on whether the time relationship between each two consecutive first trajectory points on the first trajectory segment is the same as the time relationship between the two corresponding second trajectory points on the second trajectory segment.

[0268] Among them, the second trajectory point corresponding to each first trajectory point is: the second trajectory point in the second trajectory segment that is closest to the first trajectory point; the first trajectory segment is any one of the two moving trajectory segments, and the second trajectory segment is the other trajectory of the two moving trajectory segments except the first trajectory segment.

[0269] For every two moving trajectory segments, one segment is used as the first trajectory segment and the other segment as the second trajectory segment. The trajectory points on the first segment are used as first trajectory points, and the trajectory points on the second segment are used as second trajectory points. For each first trajectory point, the trajectory point closest to it is found on the second segment and used as the corresponding second trajectory point. The distance between the two moving trajectory segments can then be determined based on the distance between each first trajectory point on the first segment and the corresponding second trajectory point on the second segment. The temporal relationship between the two moving trajectory segments can also be determined based on whether the temporal relationship between each pair of first trajectory points on the first segment is the same as the temporal relationship between the two corresponding second trajectory points on the second segment.

[0270] The first trajectory point and the second trajectory point may be original trajectory points and / or filled trajectory points.

[0271] Optionally, the distance between two moving trajectory segments can be determined by calculating the average of the distances between each first trajectory point on the first trajectory segment and the corresponding second trajectory point on the second trajectory segment, and taking the average of the distances as the distance between the two moving trajectory segments.

[0272] Optionally, the timing relationship between two moving trajectory segments can be determined in the following manner: traversing every two consecutive first trajectory points on the first trajectory segment, when traversing every two consecutive first trajectory points, if the time relationship between the two first trajectory points is the same as the time relationship between the two corresponding second trajectory points on the second trajectory segment, then the same-sequence cumulative value of the two moving trajectory segments is added to a specified value; if the time relationship between the two first trajectory points is different from the time relationship between the two corresponding second trajectory points on the second trajectory segment, then the same-sequence cumulative value of the two moving trajectory segments is subtracted from the specified value; then, after traversing all two consecutive first trajectory points on the first trajectory segment, the timing relationship between the two moving trajectory segments is determined based on the same-sequence cumulative value of the two moving trajectory segments.

[0273] Among them, after traversing all two consecutive first trajectory points on the first trajectory segment, if the cumulative values of the same sequence of the two moving trajectory segments meet the specified conditions, then the temporal relationship between the two moving trajectory segments is the specified relationship; if the cumulative values of the same sequence of the two moving trajectory segments do not meet the specified conditions, then the temporal relationship between the two moving trajectory segments is not the specified relationship.

[0274] Optionally, the specified value may be 1, the specified condition may be that the cumulative value of the same sequence is positive, and the specified relationship between the two moving trajectory segments may be that the timing relationship between the two moving trajectory segments is positive. For example, assuming that the first trajectory segment includes first trajectory points A, B, C, and D, and the second trajectory segment includes second trajectory points E, F, G, and H, the corresponding relationship between these trajectory points obtained according to the corresponding condition between the first trajectory points and the second trajectory points is: AE, BF, CH, DG, where the first trajectory points A, B, C, and D and the second trajectory points E, F, G, and H are arranged in time sequence. Since, in the two consecutive first trajectory points A and B, B's timing is after A, the second trajectory point corresponding to the first trajectory point A is E, and the second trajectory point corresponding to the first trajectory point B is F, and F's timing is after E, the timing relationship between A and B is the same as that between E and F, and the cumulative value of the same sequence for these two trajectory segments increases by 1. Similarly, the timing relationship between B and C is the same as that between F and H, and the cumulative value of the same sequence increases by 1, and the current cumulative value of the same sequence is 2. The timing relationship between C and D and H and G is different, and the cumulative value of the same sequence is reduced by 1, resulting in a final cumulative value of 1. Therefore, the cumulative value of the same sequence for these two trajectory segments is 1, a positive value, so the two trajectory segments are in a positive relationship.

[0275] S704: Grouping the movement trajectory segments whose distance is less than the third preset length and whose temporal relationship is a specified relationship into the same group. Determining the movement trajectory segment with the highest confidence level and the time range of all movement trajectory segments in each group as the movement trajectory pattern corresponding to the group of movement trajectory segments to obtain each movement trajectory pattern.

[0276] After obtaining the distance and timing relationship between every two moving trajectory segments, the moving trajectory segments whose distance is less than the third preset length and whose timing relationship is a specified relationship can be divided into the same group. Then, for each group of moving trajectory segments, the moving trajectory segment with the highest confidence level in the group of moving trajectory segments and the time range of all moving trajectory segments can be determined as the moving trajectory pattern corresponding to the group of moving trajectory segments, thereby obtaining each moving trajectory pattern.

[0277] Optionally, after calculating the distance and the time sequence relationship between every two moving trajectory segments in all the obtained moving trajectory segments, the moving trajectory segments whose distance is less than the third preset length and whose time sequence relationship is a specified relationship can be grouped into the same group.

[0278] For each moving trajectory segment, the trajectory points on the moving trajectory segment include: original trajectory points and / or filled trajectory points.

[0279] Optionally, in a specific implementation, the method for selecting the mobile trajectory segment with the highest confidence may be: for each group of mobile trajectory segments, selecting the mobile trajectory segment with the most original trajectory points and / or added trajectory points as the mobile trajectory segment with the highest confidence.

[0280] Optionally, in another specific implementation, the method for selecting the mobile trajectory segment with the highest confidence level may also be: for each group of mobile trajectory segments, the sum of the confidence levels of all trajectory points included in each mobile trajectory segment is calculated, and the mobile trajectory segment with the highest calculated confidence level sum is selected as the mobile trajectory segment with the highest confidence level.

[0281] The confidence levels of the original trajectory points and the filled trajectory points are different, and the confidence levels of the trajectory points obtained in different ways in the original trajectory points are also different.

[0282] For example, the original trajectory points include the above Figure 2 In the specific implementation shown, the confidence levels of the first, second, third, and fourth categories of trajectory points can be determined based on the sources of the different categories of trajectory points, from high to low: confidence level of the first category of trajectory points, confidence level of the second category of trajectory points, confidence level of the third category of trajectory points, and confidence level of the fourth category of trajectory points. Additionally, filler trajectory points can be used as the fifth category of trajectory points. Since filler trajectory points are obtained based on the historical trajectory data of the target object, the confidence level of the fifth category of trajectory points is lower than that of the fourth category of trajectory points. Therefore, the sum of the confidence levels of all trajectory points included in each mobile trajectory segment can be calculated based on the type of trajectory points included in the segment, and the resulting confidence level sum can be used as the confidence level of the mobile trajectory segment.

[0283] In this specific implementation, for example, Figure 7c As shown, A and B are two target dwelling points. The target trajectory is divided based on these two target dwelling points, resulting in multiple trajectory segments between the two target dwelling points. Trajectory segments whose distance is less than a third preset length and whose temporal relationships are specified are then grouped together. Within each group of trajectory segments, the most confident trajectory segment and the time range of all trajectory segments are determined as the trajectory pattern corresponding to that group, thereby obtaining individual trajectory patterns. The three different grayscale trajectory points in the figure represent trajectory points on the trajectory segments within the three obtained trajectory patterns.

[0284] In this specific implementation, the trajectory of the target object is segmented based on the target's dwell point, resulting in individual trajectory segments. The similarity between these segments is calculated based on both spatial distance and temporal relationships, and similar segments are merged into the same trajectory pattern. Using the target's dwell point as the trajectory segmentation point aligns with daily routines, primarily those spent at home and at work. Clustering similar trajectory segments into trajectory patterns reduces the storage burden and information redundancy of large amounts of historical trajectory data, providing more concise analysis results.

[0285] Optionally, in a specific implementation, such as Figure 8 As shown, after step S704, the trajectory analysis method provided by the embodiment of the present invention may further include the following steps S801-S803.

[0286] S801: Calculating the similarity between the movement trajectory segment in each movement trajectory pattern and each pre-stored historical trajectory segment.

[0287] S802: For each moving trajectory segment in the moving trajectory pattern, if there is a target trajectory segment in each historical trajectory segment whose similarity with the moving trajectory segment is greater than a set threshold, then the time range in the moving trajectory pattern is added to the time range of the target trajectory segment.

[0288] S803: For each movement trajectory segment in the movement trajectory pattern, if there is no target trajectory segment in each historical trajectory segment whose similarity with the movement trajectory segment is greater than a set threshold, the movement trajectory pattern is stored.

[0289] In this specific implementation, after obtaining the movement trajectory pattern of the target object, in order to facilitate the subsequent analysis and application of the trajectory data of the target object, the movement trajectory pattern of the target object can also be stored. However, for some movement trajectory patterns, similar movement trajectory patterns may have been stored before. Therefore, in order to save storage space, the movement trajectory pattern of the target object and the stored similar movement trajectory pattern can be regarded as one movement trajectory pattern, and the trajectory point position information in the movement trajectory pattern is no longer stored. However, the time range of the movement trajectory pattern may be different from the time range of the similar movement trajectory pattern that has been stored. Therefore, the time range of the movement trajectory pattern of the target object can be added to the time range of the similar movement trajectory pattern that has been stored.

[0290] Based on this, for each obtained movement trajectory pattern, the similarity between the movement trajectory segment in each movement trajectory pattern and the pre-stored historical trajectory segments can be calculated. If there is a target trajectory segment in each historical trajectory segment whose similarity with the movement trajectory segment is greater than a set threshold, the time range in the movement trajectory pattern is added to the time range of the target trajectory segment; if there is no target trajectory segment in each historical trajectory segment whose similarity with the movement trajectory segment is greater than the set threshold, the movement trajectory pattern is stored.

[0291] Optionally, the method for calculating the similarity between the mobile trajectory segment in each mobile trajectory mode and the pre-stored historical trajectory segments may be: first, calculating the distance and temporal relationship between the mobile trajectory segment and the pre-stored historical trajectory segments according to the method in step S703, and then calculating the similarity between the mobile trajectory segment and the pre-stored historical trajectory segments in terms of spatial and temporal relationship based on the obtained distance and temporal relationship.

[0292] Optionally, each movement trajectory pattern of the same user can be recorded in the same entry. This entry can include the user's unique identifier, the user's trajectory point set, and the time range set of the movement trajectory pattern. Of course, it can also include other custom fields, such as the average duration of the movement trajectory segment and the number of time periods. The trajectory point set can be arranged in chronological order, and the location information of the trajectory points can be formatted as (longitude, latitude). The format of the trajectory point set can be: point 1#point 2#...#point n. The time range set of the movement trajectory pattern can include the start time and end time of each time period of the movement trajectory pattern. The movement trajectory pattern can be stored in the format of: start time#end time. The time point format can be: YYYYMMDDHHMM (year, month, day, hour, minute). Multiple time ranges can be separated by ":", for example: 202105010101#202105010301:202105020101#202105020301.

[0293] In this specific implementation, storing the analyzed movement trajectory patterns of the target objects is beneficial for counting the high-frequency trajectory patterns of users, facilitating efficient analysis, storage, and retrieval of user trajectory information. It can also be used to build a richer trajectory database and more accurate user portraits, or to predict the probability of a user appearing in a specific time and space, and to calculate the trajectory similarity between different users at a finer granularity.

[0294] Corresponding to the trajectory analysis method provided by the above embodiment of the present invention, an embodiment of the present invention provides a trajectory analysis device.

[0295] Figure 9 A schematic diagram of the structure of a trajectory analysis device provided by an embodiment of the present invention is shown in FIG. Figure 9As shown, the device may include the following modules:

[0296] The trajectory point acquisition module 901 is used to acquire each original trajectory point of the target object arranged in time sequence.

[0297] The trajectory segment determination module 902 is configured to determine every two trajectory points in the original trajectory points that are adjacent in time sequence and meet specified conditions as the endpoints of a missing trajectory segment, wherein the specified conditions include: a time interval greater than a first preset duration and / or a distance greater than a first preset length.

[0298] The trajectory segment searching module 903 is configured to search for a matching trajectory segment of each missing trajectory segment in the historical trajectory data of the target object according to the position and time interval of the endpoint of the missing trajectory segment.

[0299] The trajectory segment filling module 904 is configured to fill each missing trajectory segment with trajectory points using the matching trajectory segment of the missing trajectory segment to obtain a target trajectory; wherein the target trajectory includes: each filled trajectory point and each original trajectory point.

[0300] The dwell point determination module 905 is configured to determine, based on the time relationship and position relationship between the various track points in the target track, a dwell point having a dwell time exceeding a second preset time length as a target dwell point of the target object.

[0301] As can be seen from the above, by applying the solution provided by the embodiment of the present invention, when analyzing the trajectory of the target object to obtain the target residence point of the target object, the original trajectory points of the target object arranged in time sequence can be first obtained; every two trajectory points in the original trajectory points that are adjacent in time sequence and have a time interval greater than a first preset time length and / or a distance greater than a first preset length are determined as the endpoints of a missing trajectory segment; according to the position and time interval of the endpoints of each missing trajectory segment, the matching trajectory segment of the missing trajectory segment is searched in the historical trajectory data of the target object; the missing trajectory segment is filled with the matching trajectory segment of each missing trajectory segment to obtain the target trajectory; according to the time relationship and position relationship between the various trajectory points in the target trajectory, the residence point with a residence time exceeding the second preset time length is determined as the target residence point of the target object. At this point, the analysis of the trajectory of the target object is completed.

[0302] Based on the solution provided by the embodiments of the present invention, the target object's historical trajectory data can be used to populate the trajectory data of the target object to be analyzed. Because the movement trajectories of the same target object are similar, the trajectory data populated based on historical data can, to a certain extent, reflect the actual movement of the target object. In this way, when determining the target's dwell point, the location of the target dwell point can be more accurately determined based on more complete and rich trajectory data, thereby reducing the impact of missing trajectory data on trajectory analysis and improving the accuracy of trajectory analysis results.

[0303] Optionally, in a specific implementation, the minimum distance between each endpoint of the matching trajectory segment of each missing trajectory segment and each endpoint of the missing trajectory segment is less than a second preset length, and the ratio of the time interval between the endpoints of the matching trajectory segment of each missing trajectory segment to the time interval between the endpoints of the missing trajectory segment is less than a preset ratio.

[0304] Optionally, in a specific implementation, the trajectory segment filling module 904 is specifically configured to:

[0305] For each missing trajectory segment, determining a trajectory point extraction period according to a preset filling quantity of the missing trajectory segment and the ratio;

[0306] Extracting trajectory points from the matching trajectory segment of the missing trajectory segment except for the endpoints in a time sequence according to the trajectory point extraction cycle, and filling the missing trajectory segment with the extracted trajectory points in a time sequence;

[0307] According to the duration of the missing track segment and the filling quantity, the time of each filled track point is updated.

[0308] Optionally, in a specific implementation, the device further includes:

[0309] a time determination module, configured to determine the time of each target dwell point according to the time of each trajectory point in the target trajectory;

[0310] a trajectory segment division module, configured to divide the trajectory points between each two temporally adjacent target dwell points in the target trajectory into the same group; and determine a moving trajectory segment determined based on each group of trajectory points to obtain individual moving trajectory segments;

[0311] a trajectory segment calculation module, configured to determine, for every two moving trajectory segments, the second trajectory point corresponding to each first trajectory point in the first trajectory segment in the second trajectory segment; determine the distance between the two moving trajectory segments based on the distance between each first trajectory point on the first trajectory segment and the corresponding second trajectory point on the second trajectory segment; and determine the temporal relationship between the two moving trajectory segments based on whether the time relationship between each two consecutive first trajectory points on the first trajectory segment is the same as the time relationship between the two corresponding second trajectory points on the second trajectory segment; wherein the second trajectory point corresponding to each first trajectory point is: the second trajectory point in the second trajectory segment that is closest to the first trajectory point; the first trajectory segment is any one of the two moving trajectory segments, and the second trajectory segment is the other of the two moving trajectory segments except the first trajectory segment;

[0312] The trajectory pattern determination module is configured to group trajectory segments whose distance is less than a third preset length and whose temporal relationship is a specified relationship into the same group, and to determine the trajectory segment with the highest confidence level and the time range of all trajectory segments in each group as the trajectory pattern corresponding to the group, thereby obtaining individual trajectory patterns.

[0313] Optionally, in a specific implementation, the trajectory segment calculation module is specifically configured to:

[0314] An average value of distances between each first trajectory point on the first trajectory segment and the corresponding second trajectory point on the second trajectory segment is calculated, and the average value of the distances is used as the distance between the two moving trajectory segments.

[0315] Optionally, in a specific implementation, the trajectory segment calculation module is specifically configured to:

[0316] Traversing every two consecutive first trajectory points on the first trajectory segment, when traversing every two consecutive first trajectory points, if the time relationship between the two first trajectory points is the same as the time relationship between the two corresponding second trajectory points on the second trajectory segment, then the cumulative value of the same sequence of the two moving trajectory segments is increased by a specified value; if the time relationship between the two first trajectory points is different from the time relationship between the two corresponding second trajectory points on the second trajectory segment, then the cumulative value of the same sequence of the two moving trajectory segments is decreased by a specified value;

[0317] After traversing all two consecutive first trajectory points on the first trajectory segment, the time sequence relationship between the two moving trajectory segments is determined according to the same-sequence cumulative values of the two moving trajectory segments.

[0318] Optionally, in a specific implementation, the trajectory pattern determination module is specifically configured to:

[0319] For each group of movement trajectory segments, selecting the movement trajectory segment including the most original trajectory points and / or the most added trajectory points as the movement trajectory segment with the highest confidence;

[0320] or,

[0321] For each group of movement trajectory segments, the sum of the confidences of all trajectory points included in each movement trajectory segment is calculated, and the movement trajectory segment with the highest calculated confidence sum is taken as the movement trajectory segment with the highest confidence; wherein the confidences of the original trajectory points and the filled trajectory points are different.

[0322] Optionally, in a specific implementation, the device further includes:

[0323] A similarity module is used to calculate the similarity between the movement trajectory segment in each movement trajectory pattern and each pre-stored historical trajectory segment;

[0324] The trajectory segment storage module is configured to, for each trajectory segment in a trajectory pattern, add the time range of the trajectory pattern to the time range of the target trajectory segment if there is a target trajectory segment with a similarity greater than a set threshold among the historical trajectory segments; and store the trajectory pattern if there is no target trajectory segment with a similarity greater than the set threshold among the historical trajectory segments.

[0325] Optionally, in a specific implementation, the dwell point determination module 905 includes:

[0326] a cluster determination submodule, configured to divide each trajectory point in the target trajectory into a plurality of trajectory point clusters based on a temporal relationship and a distance relationship between each trajectory point in the target trajectory; wherein a distance between each trajectory point in each trajectory point cluster and a cluster center of the trajectory point cluster is less than a fourth preset length, and the cluster center of each trajectory point cluster is a point indicated by average position information of all trajectory points in the trajectory point cluster;

[0327] A clustering submodule, configured to cluster the trajectory points in the target trajectory using the cluster center of each trajectory point cluster as the initial cluster center according to a preset cluster radius to obtain cluster centers;

[0328] a trajectory point allocation submodule, configured to allocate, for each trajectory point in the target trajectory, the trajectory point to a cluster center that is less than a fifth preset length and has the smallest distance from the trajectory point, to obtain respective resident areas;

[0329] The dwell point determination submodule is configured to calculate the dwell time of the target object in each dwell area based on the time of each trajectory point in the dwell area, and determine the dwell center of the dwell area whose calculated dwell time exceeds a second preset time as the target dwell point of the target object; wherein the dwell center of each dwell area is the point indicated by the average position information of all trajectory points in the dwell area.

[0330] Optionally, in a specific implementation, the device further includes:

[0331] a speed calculation module, configured to calculate, for each two temporally adjacent designated trajectory points, a distance and a time interval between the two designated trajectory points, and calculate, based on the calculated distance and time interval, an average speed of the target object moving between the two designated trajectory points; wherein the designated trajectory points include: the original trajectory points and / or the filled trajectory points;

[0332] a recovery operation module, configured to determine, when the calculated average speed is greater than a preset speed, an outlier trajectory point among the two designated trajectory points based on the positions of the two designated trajectory points, and perform a designated recovery operation on the outlier trajectory point;

[0333] The resident point determination submodule is specifically used for:

[0334] After the designated recycling operation, when there is a residence area with updated track points, the residence time of the target object in the residence area is calculated according to the time of each track point in each updated residence area.

[0335] Optionally, in a specific implementation, the device further includes:

[0336] A distance calculation module is used to calculate the distance between each target dwell point and each pre-stored historical dwell point;

[0337] The trajectory point storage module is configured to, when there is a designated dwell point whose distance from the target dwell point is less than a sixth preset length among the various historical dwell points, add the time range corresponding to the target dwell point to the time range of the designated dwell point; and, when there is no designated dwell point whose distance from the target dwell point is less than the sixth preset length among the various historical dwell points, store the target dwell point and the time range of the target dwell point.

[0338] Optionally, in a specific implementation, the trajectory point acquisition module 901 is specifically configured to:

[0339] Obtaining measurement reports and signaling data of a user terminal of the target object;

[0340] Determining a point corresponding to the assisted global positioning system AGPS positioning information in the measurement report as a first type of trajectory point;

[0341] Determining, based on a preset machine learning algorithm and using the measurement report, a second type of trajectory points; wherein the second type of trajectory points does not include the first type of trajectory points;

[0342] Determine a third type of trajectory point using the latitude and longitude of the primary serving cell in the measurement report; wherein the third type of trajectory point does not include the first type of trajectory point and the second type of trajectory point;

[0343] Determining a fourth type of trajectory point based on the base station latitude and longitude in the signaling data; wherein the fourth type of trajectory point does not include the first type of trajectory point, the second type of trajectory point, and the third type of trajectory point;

[0344] The first type of trajectory points, the second type of trajectory points, the third type of trajectory points and the fourth type of trajectory points are arranged in time sequence as the original trajectory points of the target object arranged in time sequence.

[0345] The embodiment of the present invention further provides an electronic device, such as Figure 10 As shown, it includes a processor 1001, a communication interface 1002, a memory 1003 and a communication bus 1004, wherein the processor 1001, the communication interface 1002, and the memory 1003 communicate with each other through the communication bus 1004.

[0346] Memory 1003, used for storing computer programs;

[0347] The processor 1001 is configured to implement the steps of any trajectory analysis method provided by the embodiments of the present invention when executing the program stored in the memory 1003 .

[0348] The communication bus mentioned in the electronic device mentioned above may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is used in the figure, but this does not mean that there is only one bus or only one type of bus.

[0349] The communication interface is used for communication between the above electronic device and other devices.

[0350] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage. Alternatively, the memory may be at least one storage device located away from the processor.

[0351] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.

[0352] In another embodiment of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the steps of any trajectory analysis method provided in the embodiments of the present invention are implemented.

[0353] In another embodiment of the present invention, a computer program product including instructions is provided. When the computer program product is executed on a computer, the computer executes the steps of any trajectory analysis method provided in the embodiments of the present invention.

[0354] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).

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

[0356] Each embodiment in this specification is described in a related manner. Similar portions between the various embodiments can be referenced to each other. Each embodiment focuses on the differences between the other embodiments. In particular, since the apparatus embodiments, electronic device embodiments, computer-readable storage medium embodiments, and computer program product embodiments are generally similar to the method embodiments, their descriptions are relatively simple. For related portions, reference can be made to the descriptions of the method embodiments.

[0357] The above description is only a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention are included in the scope of protection of the present invention.

Claims

1. A trajectory analysis method, characterized in that: The method comprises: Obtain the original trajectory points of the target object arranged in time sequence; Determine every two trajectory points in the original trajectory points that are adjacent in time sequence and meet specified conditions as endpoints of a missing trajectory segment, wherein the specified conditions include: a time interval greater than a first preset duration and / or a distance greater than a first preset length; According to the position and time interval of the endpoint of each missing trajectory segment, searching for a matching trajectory segment of the missing trajectory segment in the historical trajectory data of the target object; Filling each missing trajectory segment with trajectory points using the matching trajectory segment of the missing trajectory segment to obtain a target trajectory; wherein the target trajectory includes: each filled trajectory point and each original trajectory point; Determining, based on the time relationship and position relationship between each track point in the target track, a dwell point whose dwell time exceeds a second preset time length as a target dwell point of the target object; Determining the time at each target dwell point based on the time of each track point in the target track; Dividing the trajectory points between each two temporally adjacent target dwell points in the target trajectory into the same group, and determining a moving trajectory segment based on each group of trajectory points to obtain individual moving trajectory segments; For every two moving trajectory segments, determining the distance and time sequence relationship between the two moving trajectory segments; The movement trajectory segments whose distance is less than the third preset length and whose timing relationship is a specified relationship are divided into the same group, and the movement trajectory segment with the highest confidence and the time range of all movement trajectory segments in each group of movement trajectory segments are determined as the movement trajectory pattern corresponding to the movement trajectory segment in the group, thereby obtaining each movement trajectory pattern.

2. The method according to claim 1, characterized in that The minimum distance between each endpoint of the matching trajectory segment of each missing trajectory segment and each endpoint of the missing trajectory segment is less than a second preset length, and the ratio of the time interval between the endpoints of the matching trajectory segment of each missing trajectory segment to the time interval between the endpoints of the missing trajectory segment is less than a preset ratio.

3. The method according to claim 2, characterized in that The step of filling the missing trajectory segments with the matching trajectory segments of each missing trajectory segment to obtain the target trajectory includes: For each missing trajectory segment, determining a trajectory point extraction period according to a preset filling quantity of the missing trajectory segment and the ratio; Extracting trajectory points from the matching trajectory segment of the missing trajectory segment except for the endpoints in a time sequence according to the trajectory point extraction cycle, and filling the missing trajectory segment with the extracted trajectory points in a time sequence; According to the duration of the missing track segment and the filling quantity, the time of each filled track point is updated.

4. The method according to claim 1, wherein The determining, for each two moving trajectory segments, the distance and the temporal relationship between the two moving trajectory segments includes: Determining the second trajectory point corresponding to each first trajectory point in the first trajectory segment in the second trajectory segment; determining the distance between the two moving trajectory segments based on the distance between each first trajectory point on the first trajectory segment and the corresponding second trajectory point on the second trajectory segment; determining a temporal relationship between the two moving trajectory segments according to whether a temporal relationship between two consecutive first trajectory points on the first trajectory segment is the same as a temporal relationship between two corresponding second trajectory points on the second trajectory segment; Among them, the second trajectory point corresponding to each first trajectory point is: the second trajectory point in the second trajectory segment that is closest to the first trajectory point; the first trajectory segment is any one of the two moving trajectory segments, and the second trajectory segment is the other trajectory segment of the two moving trajectory segments except the first trajectory segment.

5. The method according to claim 4, characterized in that The determining the distance between the two moving trajectory segments according to the distance between each first trajectory point on the first trajectory segment and the corresponding second trajectory point on the second trajectory segment includes: An average value of distances between each first trajectory point on the first trajectory segment and the corresponding second trajectory point on the second trajectory segment is calculated, and the average value of the distances is used as the distance between the two moving trajectory segments.

6. The method according to claim 4, characterized in that The determining the temporal relationship between the two moving trajectory segments according to whether the temporal relationship between each two consecutive first trajectory points on the first trajectory segment is the same as the temporal relationship between two corresponding second trajectory points on the second trajectory segment includes: Traversing every two consecutive first trajectory points on the first trajectory segment, when traversing every two consecutive first trajectory points, if the time relationship between the two first trajectory points is the same as the time relationship between the two corresponding second trajectory points on the second trajectory segment, then the cumulative value of the same sequence of the two moving trajectory segments is increased by a specified value; if the time relationship between the two first trajectory points is different from the time relationship between the two corresponding second trajectory points on the second trajectory segment, then the cumulative value of the same sequence of the two moving trajectory segments is decreased by a specified value; After traversing all two consecutive first trajectory points on the first trajectory segment, the time sequence relationship between the two moving trajectory segments is determined according to the same-sequence cumulative values of the two moving trajectory segments.

7. The method according to claim 1, characterized in that The method for selecting the moving trajectory segment with the highest confidence in each group of moving trajectory segments includes: For each group of movement trajectory segments, selecting the movement trajectory segment including the most original trajectory points and / or added trajectory points as the movement trajectory segment with the highest confidence; or, For each group of movement trajectory segments, the sum of the confidences of all trajectory points included in each movement trajectory segment is calculated, and the movement trajectory segment with the highest calculated confidence sum is taken as the movement trajectory segment with the highest confidence; wherein the confidences of the original trajectory points and the filled trajectory points are different.

8. The method according to claim 1, characterized in that The method further comprises: Calculating the similarity between the movement trajectory segment in each movement trajectory pattern and each pre-stored historical trajectory segment; For each moving trajectory segment in the moving trajectory pattern, if there is a target trajectory segment in the historical trajectory segments whose similarity with the moving trajectory segment is greater than a set threshold, the time range in the moving trajectory pattern is added to the time range of the target trajectory segment. For each movement trajectory segment in the movement trajectory pattern, if there is no target trajectory segment in the historical trajectory segments whose similarity with the movement trajectory segment is greater than a set threshold, the movement trajectory pattern is stored.

9. The method according to claim 1, characterized in that The step of determining, based on the time relationship and position relationship between the various track points in the target track, a dwell point having a dwell time exceeding a second preset time length as a target dwell point of the target object includes: Based on a temporal relationship and a distance relationship between each trajectory point in the target trajectory, each trajectory point in the target trajectory is divided into a plurality of trajectory point clusters; wherein a distance between each trajectory point in each trajectory point cluster and a cluster center of the trajectory point cluster is less than a fourth preset length, and the cluster center of each trajectory point cluster is a point indicated by average position information of all trajectory points in the trajectory point cluster; Taking the cluster center of each trajectory point cluster as the initial cluster center, clustering the trajectory points in the target trajectory according to the preset cluster radius to obtain each cluster center; For each trajectory point in the target trajectory, assign the trajectory point to a cluster center that is less than a fifth preset length and has the smallest distance from the trajectory point, to obtain each resident area; Based on the time of each trajectory point in each residence area, the residence time of the target object in the residence area is calculated, and the residence center of the residence area whose calculated residence time exceeds the second preset time is determined as the target residence point of the target object; wherein the residence center of each residence area is the point indicated by the average information of the position information of all trajectory points in the residence area.

10. The method according to claim 9, characterized in that The method further comprises: For each two designated trajectory points that are adjacent in time sequence, calculating the distance and time interval between the two designated trajectory points, and calculating the average speed of the target object moving between the two designated trajectory points based on the calculated distance and time interval; wherein the designated trajectory points include: the original trajectory points and / or the filled trajectory points; If the calculated average speed is greater than the preset speed, an outlier trajectory point among the two designated trajectory points is determined according to the positions of the two designated trajectory points, and a designated recovery operation is performed on the outlier trajectory point; The step of calculating the residence time of the target object in each residence area according to the time of each trajectory point in the residence area includes: If there is a residence area with updated track points after the designated recycling operation, the residence time of the target object in the residence area is calculated according to the time of each track point in each updated residence area.

11. The method according to claim 1, wherein The method further comprises: Calculate the distance between each target dwell point and each pre-stored historical dwell point; For each target stay point, if there is a designated stay point among the historical stay points whose distance from the target stay point is less than a sixth preset length, then the time range corresponding to the target stay point is added to the time range of the designated stay point; For each target stay point, if there is no designated stay point with a distance from the target stay point less than a sixth preset length among the historical stay points, the target stay point and the time range of the target stay point are stored.

12. The method according to claim 1, characterized in that The step of obtaining each trajectory point of the target object arranged in time sequence includes: Obtaining measurement reports and signaling data of a user terminal of the target object; Determining a point corresponding to the assisted global positioning system AGPS positioning information in the measurement report as a first type of trajectory point; Determining, based on a preset machine learning algorithm and using the measurement report, a second type of trajectory points; wherein the second type of trajectory points does not include the first type of trajectory points; Determine a third type of trajectory point using the latitude and longitude of the primary serving cell in the measurement report; wherein the third type of trajectory point does not include the first type of trajectory point and the second type of trajectory point; Determining a fourth type of trajectory point based on the base station latitude and longitude in the signaling data; wherein the fourth type of trajectory point does not include the first type of trajectory point, the second type of trajectory point, and the third type of trajectory point; The first type of trajectory points, the second type of trajectory points, the third type of trajectory points and the fourth type of trajectory points are arranged in time sequence as the original trajectory points of the target object arranged in time sequence.

13. A trajectory analysis device, characterized in that: The device comprises: The trajectory point acquisition module is used to obtain the original trajectory points of the target object arranged in time sequence; a trajectory segment determination module, configured to determine every two trajectory points in the original trajectory points that are temporally adjacent and meet specified conditions as endpoints of a missing trajectory segment, wherein the specified conditions include: a time interval greater than a first preset duration and / or a distance greater than a first preset length; a trajectory segment search module, configured to search for a matching trajectory segment of each missing trajectory segment in the historical trajectory data of the target object according to the position and time interval of the endpoint of the missing trajectory segment; A trajectory segment filling module is used to fill the missing trajectory segment with the matching trajectory segment of each missing trajectory segment to obtain a target trajectory; wherein the target trajectory includes: each filled trajectory point and each original trajectory point; A dwell point determination module, configured to determine, based on a time relationship and a position relationship between each track point in the target track, a dwell point whose dwell time exceeds a second preset time length as a target dwell point of the target object; a time determination module, configured to determine the time of each target dwell point according to the time of each trajectory point in the target trajectory; a trajectory segment division module, configured to divide the trajectory points between each two temporally adjacent target dwell points in the target trajectory into the same group; and determine a moving trajectory segment determined based on each group of trajectory points to obtain individual moving trajectory segments; a trajectory segment calculation module, configured to determine, for each two moving trajectory segments, a distance and a temporal relationship between the two moving trajectory segments; The trajectory pattern determination module is configured to group trajectory segments whose distance is less than a third preset length and whose temporal relationship is a specified relationship into the same group, and to determine the trajectory segment with the highest confidence level and the time range of all trajectory segments in each group as the trajectory pattern corresponding to the group, thereby obtaining individual trajectory patterns.

14. The device according to claim 13, characterized in that The minimum distance between each endpoint of the matching trajectory segment of each missing trajectory segment and each endpoint of the missing trajectory segment is less than a second preset length, and the ratio of the time interval between the endpoints of the matching trajectory segment of each missing trajectory segment to the time interval between the endpoints of the missing trajectory segment is less than a preset ratio.

15. The device according to claim 14, characterized in that The trajectory segment filling module is specifically used to: For each missing trajectory segment, determining a trajectory point extraction period according to a preset filling quantity of the missing trajectory segment and the ratio; Extracting trajectory points from the matching trajectory segment of the missing trajectory segment except for the endpoints in a time sequence according to the trajectory point extraction cycle, and filling the missing trajectory segment with the extracted trajectory points in a time sequence; According to the duration of the missing track segment and the filling quantity, the time of each filled track point is updated.

16. The device according to claim 13, characterized in that The trajectory segment calculation module is specifically used to: Determine the second trajectory point corresponding to each first trajectory point in the first trajectory segment in the second trajectory segment; determine the distance between the two moving trajectory segments based on the distance between each first trajectory point on the first trajectory segment and the corresponding second trajectory point on the second trajectory segment; determine the timing relationship between the two moving trajectory segments based on whether the time relationship between each two consecutive first trajectory points on the first trajectory segment is the same as the time relationship between the two corresponding second trajectory points on the second trajectory segment; wherein the second trajectory point corresponding to each first trajectory point is: the second trajectory point in the second trajectory segment that is closest to the first trajectory point; the first trajectory segment is any one of the two moving trajectory segments, and the second trajectory segment is the other one of the two moving trajectory segments except the first trajectory segment.

17. The device according to claim 16, characterized in that The trajectory segment calculation module is specifically used to: An average value of distances between each first trajectory point on the first trajectory segment and the corresponding second trajectory point on the second trajectory segment is calculated, and the average value of the distances is used as the distance between the two moving trajectory segments.

18. The device according to claim 16, characterized in that The trajectory segment calculation module is specifically used for: Traversing every two consecutive first trajectory points on the first trajectory segment, when traversing every two consecutive first trajectory points, if the time relationship between the two first trajectory points is the same as the time relationship between the two corresponding second trajectory points on the second trajectory segment, then the cumulative value of the same sequence of the two moving trajectory segments is increased by a specified value; if the time relationship between the two first trajectory points is different from the time relationship between the two corresponding second trajectory points on the second trajectory segment, then the cumulative value of the same sequence of the two moving trajectory segments is decreased by a specified value; After traversing all two consecutive first trajectory points on the first trajectory segment, the time sequence relationship between the two moving trajectory segments is determined according to the same-sequence cumulative values of the two moving trajectory segments.

19. The device according to claim 13, characterized in that The trajectory mode determination module is specifically used to: For each group of movement trajectory segments, selecting the movement trajectory segment including the most original trajectory points and / or added trajectory points as the movement trajectory segment with the highest confidence; or, For each group of movement trajectory segments, the sum of the confidences of all trajectory points included in each movement trajectory segment is calculated, and the movement trajectory segment with the highest calculated confidence sum is taken as the movement trajectory segment with the highest confidence; wherein the confidences of the original trajectory points and the filled trajectory points are different.

20. The device according to claim 13, wherein The device further comprises: A similarity module is used to calculate the similarity between the movement trajectory segment in each movement trajectory pattern and each pre-stored historical trajectory segment; The trajectory segment storage module is configured to, for each trajectory segment in a trajectory pattern, add the time range of the trajectory pattern to the time range of the target trajectory segment if there is a target trajectory segment with a similarity greater than a set threshold among the historical trajectory segments; and store the trajectory pattern if there is no target trajectory segment with a similarity greater than the set threshold among the historical trajectory segments.

21. The device according to claim 13, characterized in that The dwell point determination module includes: a cluster determination submodule, configured to divide each trajectory point in the target trajectory into a plurality of trajectory point clusters based on a temporal relationship and a distance relationship between each trajectory point in the target trajectory; wherein a distance between each trajectory point in each trajectory point cluster and a cluster center of the trajectory point cluster is less than a fourth preset length, and the cluster center of each trajectory point cluster is a point indicated by average position information of all trajectory points in the trajectory point cluster; A clustering submodule, configured to cluster the trajectory points in the target trajectory using the cluster center of each trajectory point cluster as the initial cluster center according to a preset cluster radius to obtain cluster centers; a trajectory point allocation submodule, configured to allocate, for each trajectory point in the target trajectory, the trajectory point to a cluster center that is less than a fifth preset length and has the smallest distance from the trajectory point, to obtain respective resident areas; The dwell point determination submodule is configured to calculate the dwell time of the target object in each dwell area based on the time of each trajectory point in the dwell area, and determine the dwell center of the dwell area whose calculated dwell time exceeds a second preset time as the target dwell point of the target object; wherein the dwell center of each dwell area is the point indicated by the average position information of all trajectory points in the dwell area.

22. The device according to claim 21, characterized in that The device further comprises: a speed calculation module, configured to calculate, for each two temporally adjacent designated trajectory points, a distance and a time interval between the two designated trajectory points, and calculate, based on the calculated distance and time interval, an average speed of the target object moving between the two designated trajectory points; wherein the designated trajectory points include: the original trajectory points and / or the filled trajectory points; a recovery operation module, configured to determine, when the calculated average speed is greater than a preset speed, an outlier trajectory point among the two designated trajectory points based on the positions of the two designated trajectory points, and perform a designated recovery operation on the outlier trajectory point; The resident point determination submodule is specifically used for: After the designated recycling operation, when there is a residence area with updated track points, the residence time of the target object in the residence area is calculated according to the time of each track point in each updated residence area.

23. The device according to claim 13, characterized in that The device further comprises: A distance calculation module is used to calculate the distance between each target dwell point and each pre-stored historical dwell point; The trajectory point storage module is configured to, when there is a designated dwell point whose distance from the target dwell point is less than a sixth preset length among the various historical dwell points, add the time range corresponding to the target dwell point to the time range of the designated dwell point; and, when there is no designated dwell point whose distance from the target dwell point is less than the sixth preset length among the various historical dwell points, store the target dwell point and the time range of the target dwell point.

24. The device according to claim 13, characterized in that The trajectory point acquisition module is specifically used for: Obtaining measurement reports and signaling data of a user terminal of the target object; Determining a point corresponding to the assisted global positioning system AGPS positioning information in the measurement report as a first type of trajectory point; Determining, based on a preset machine learning algorithm and using the measurement report, a second type of trajectory points; wherein the second type of trajectory points does not include the first type of trajectory points; Determine a third type of trajectory point using the latitude and longitude of the primary serving cell in the measurement report; wherein the third type of trajectory point does not include the first type of trajectory point and the second type of trajectory point; Determining a fourth type of trajectory point based on the base station latitude and longitude in the signaling data; wherein the fourth type of trajectory point does not include the first type of trajectory point, the second type of trajectory point, and the third type of trajectory point; The first type of trajectory points, the second type of trajectory points, the third type of trajectory points and the fourth type of trajectory points are arranged in time sequence as the original trajectory points of the target object arranged in time sequence.

25. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; Memory for storing computer programs; A processor, configured to implement the method steps described in any one of claims 1 to 12 when executing a program stored in a memory.

26. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps of any one of claims 1 to 12 are implemented.

Citation Information

Patent Citations

  • Crowd-sourcing logistics distribution route planning method and system based on track big data

    CN109376952A

  • Trajectory data processing method and device and electronic equipment

    CN110727757A

  • Moving track processing method and device

    CN111553732A