A method, device, equipment and storage medium for generating commuting trajectory
By utilizing MR data from mobile terminals to determine users' sleep and work locations, and combining this with road network information to generate commuting routes, the problem of difficulty in obtaining and the ease of data loss in GPS positioning has been solved, thus achieving accurate commuting route generation.
Patent Information
- Application Number
- CN202210685983.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-16
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2042-06-16
AI Technical Summary
Existing technologies struggle to effectively generate users' commuting routes using GPS location data, primarily due to the difficulty in acquiring and the ease with which GPS location data can be lost.
By utilizing the measurement report (MR) data periodically reported by mobile terminals, the system determines the dwell points during sleep and work hours, constructs a road set by combining road network information, and calculates the distance between the MR data and the road set to generate the user's commuting trajectory.
It enables accurate generation of users' commuting trajectories without relying on GPS, and provides trajectory data support for scenarios such as disaster relief and infectious disease screening.
Smart Images

Figure CN114915907B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of big data technology, and in particular to a method, device, equipment and storage medium for generating a commuting trajectory. Background Art
[0002] Commuting to and from get off work is the focus of urban transportation. By obtaining the commuting trajectory of users of mobile terminals, trajectory data can be provided for relevant departments to analyze user behavior when responding to scenarios such as disaster relief and infectious disease screening.
[0003] Although GPS (Global Positioning System) positioning data can reflect the user's location, it is difficult to obtain the user's GPS positioning data and the data is easily lost. Therefore, it is difficult to generate the user's commuting trajectory through the GPS positioning data.
[0004] The inventors found in their research that since the mobile terminal periodically reports MR (Measurement Report) data to the base station, and the MR data contains information such as the reporting timestamp and the reporting location, and is very easy for operators to obtain, the MR data can be used to locate the user's location. Therefore, how to use MR data to generate the user's commuting trajectory has become a technical problem that needs to be solved urgently. Summary of the invention
[0005] The purpose of the embodiment of the present invention is to provide a method for generating a commuting trajectory, so as to generate a user's commuting trajectory using MR data. The specific technical solution is as follows:
[0006] In a first aspect, an embodiment of the present invention provides a method for generating a commuting trajectory, the method comprising:
[0007] Acquire multiple measurement report MR data within a specified historical time period for the target user; wherein the specified historical time period includes a first preset time period representing sleep time, a second preset time period representing work time, and a third preset time period representing commuting time;
[0008] Determine the position of a first dwell point by using the MR data belonging to the first preset time period among the multiple MR data, and determine the position of a second dwell point by using the MR data belonging to the second preset time period among the multiple MR data; wherein the first dwell point represents the dwell point of the target user during sleep time, and the second dwell point represents the dwell point of the target user during work time;
[0009] Based on the position of the first residence point and the position of the second residence point, determining a first road and a second road that the target user passes through during the commuting process; wherein the first road and the second road are roads at two ends of the commuting trajectory;
[0010] Based on the first road and the second road, and the road network information, at least one road set is constructed; wherein each road set includes each road in a road trajectory having the first road and the second road as two ends;
[0011] The commuting trajectory of the target user is determined based on the distance between the reported position in the MR data belonging to the third preset time period among the plurality of MR data and the road trajectory formed by each road set.
[0012] Optionally, a method for determining the position of any one of the first resident point and the second resident point includes:
[0013] The data to be used corresponding to the resident point to be determined is subjected to designated grouping processing to obtain a plurality of groups to be used; wherein, if the resident point is a first resident point, the data to be used is the MR data belonging to the first preset time period, and if the resident point is a second resident point, the data to be used is the MR data belonging to the second preset time period; the designated grouping processing is used to group the MR data containing the same reported position in the data to be used into the same group, and each group to be used corresponds to one reported position;
[0014] Determine, among the plurality of groups to be utilized, an order of magnitude corresponding to the number of MR data included in a target group to be utilized as a maximum order of magnitude; wherein the target group to be utilized is the group to be utilized that includes the largest number of MR data;
[0015] From the plurality of groups to be used, a group including MR data of the largest order of magnitude is selected to obtain a target group;
[0016] The location of the dwell point is determined based on the reported location corresponding to the target group.
[0017] Optionally, before determining the location of the resident point based on the reported location corresponding to the target group, the method further includes:
[0018] If the number of the target groups is more than one, the target groups are specified and screened to obtain a preferred group; wherein the specified screening is used to exclude the target group with the largest number of corresponding MR data among the target groups, and / or the target group with the corresponding reported position being an outlier among the target groups;
[0019] The determining the location of the dwell point based on the reported location corresponding to the target group includes:
[0020] The location of the dwell point is determined based on the reported location corresponding to the preferred group.
[0021] Optionally, determining the location of the dwell point based on the reported location corresponding to the target group includes:
[0022] If the number of the target group is one, the reported position corresponding to the target group is determined as the position of the residence point;
[0023] If the number of the target groups is more than one, based on the number of MR data contained in each target group, a weighted sum is performed on the reported positions corresponding to each target group to obtain the position of the dwell point.
[0024] Optionally, the determining, based on the position of the first residence point and the position of the second residence point, a first road and a second road passed by the target user during commuting includes:
[0025] Determine each first position point within a preset range from the first dwelling point and each second position point within a preset range from the second dwelling point by using the MR data belonging to a third preset time period among the plurality of MR data;
[0026] Calculating the first average direction angle and the first coordinate value corresponding to each of the first position points;
[0027] Calculate the second average direction angle and the second coordinate value corresponding to each second position point;
[0028] Based on the road network information, a first road matching the first average direction angle and the first coordinate value and a second road matching the second average direction angle and the second coordinate value are determined.
[0029] Optionally, the using the MR data belonging to a third preset time period among the plurality of MR data to determine each first position point within a preset range from the first residence point, and each second position point within a preset range from the second residence point, comprises:
[0030] Determine a first endpoint corresponding to the first dwell point and a second endpoint corresponding to the second dwell point by using MR data belonging to a third preset time period among the plurality of MR data; wherein the first endpoint is the earliest position point in time sequence within a preset radius from the first dwell point, and the second endpoint is the earliest position point in time sequence within a preset radius from the second dwell point;
[0031] Determine each first position point within a preset range from the first endpoint, and each second position point within a preset range from the second endpoint.
[0032] Optionally, determining the commuting trajectory of the target user based on the distance between the reported position in the MR data belonging to the third preset time period among the plurality of MR data and the road trajectory formed by each road set includes:
[0033] For each of the road sets, calculating the sum of the distances between the reported position in each MR data in the MR data of the third preset time period and the vertical point of the reported position on the road track formed by the road set to obtain a loss distance;
[0034] A road set corresponding to the minimum value of the loss distance is determined as the commuting trajectory of the target user.
[0035] Optionally, before determining the position of the first dwell point by using the MR data belonging to the first preset time period among the plurality of MR data, the method further includes:
[0036] The multiple MR data are preprocessed to obtain multiple MR data after preprocessing; wherein the preprocessing is used to remove outliers and / or perform data deduplication processing on the multiple MR data.
[0037] Optionally, before determining the commuting trajectory of the target user based on the distance between the reported position in the MR data belonging to the third preset time period among the plurality of MR data and the road trajectory formed by each road set, the method further includes:
[0038] The MR data belonging to a third preset time period among the multiple MR data are smoothed; wherein the smoothing is used to remove or modify the MR data corresponding to a specified reporting position in the MR data of the third preset time period, and the specified reporting position is a burr point position in a trajectory connected in time sequence from a reporting position in the MR data of the third preset time period.
[0039] Optionally, the performing smoothing on the MR data belonging to a third preset time period among the plurality of MR data includes:
[0040] Performing a first smoothing process on the MR data belonging to a third preset time period among the plurality of MR data to obtain MR data after the first smoothing process; wherein the first smoothing process is used to eliminate the MR data corresponding to the designated reporting position;
[0041] The MR data after the first smoothing process is subjected to a second smoothing process; wherein the second smoothing process is used to modify the reported position in the MR data after the first smoothing process, and the MR data corresponding to the burr point in the track connected in time sequence.
[0042] Optionally, performing first smoothing processing on the MR data belonging to the third preset time period among the plurality of MR data to obtain the MR data after the first smoothing processing includes:
[0043] Calculating the velocity corresponding to the reported position in each MR data in the MR data within the third preset time period;
[0044] Eliminate the MR data corresponding to the reported position within the third preset time period and whose speed exceeds the first preset threshold, to obtain the first target data;
[0045] For each of the three MR data adjacent in time sequence in the first target data, calculate the reported positions in the three MR data adjacent in time sequence and the angle of the line segments connected in time sequence;
[0046] If the line segment angle is smaller than a second preset threshold, the second MR data of the three MR data adjacent in time sequence is eliminated to obtain the MR data after the first smoothing process.
[0047] Optionally, performing a second smoothing process on the MR data after the first smoothing process includes:
[0048] Calculating the velocity corresponding to the reported position in each MR data in the MR data after the first smoothing process;
[0049] Eliminate the MR data corresponding to the reported position whose speed exceeds the first preset threshold value in the MR data after the first smoothing process, to obtain second target data;
[0050] For each of the three MR data adjacent in time sequence in the second target data, calculate the reported positions in the three MR data adjacent in time sequence and the angle of the line segments connected in time sequence;
[0051] If the line segment angle is less than a second preset threshold, a specified modification is performed on the second MR data among the three adjacent MR data in the time sequence; wherein the specified modification is used to replace the reporting position of the second MR data with the reporting position of the first MR data among the three adjacent MR data in the time sequence.
[0052] In a second aspect, an embodiment of the present invention provides a device for generating a commuting trajectory, the device comprising:
[0053] An acquisition module, used to acquire a plurality of measurement report MR data within a specified historical time period for a target user; wherein the specified historical time period includes a first preset time period representing sleep time, a second preset time period representing work time, and a third preset time period representing commuting time;
[0054] A first determination module is used to determine the position of a first dwell point by using the MR data belonging to the first preset time period among the multiple MR data, and to determine the position of a second dwell point by using the MR data belonging to the second preset time period among the multiple MR data; wherein the first dwell point represents the dwell point of the target user during sleep time, and the second dwell point represents the dwell point of the target user during work time;
[0055] A second determination module is used to determine a first road and a second road that the target user passes through during commuting based on the location of the first residence point and the location of the second residence point; wherein the first road and the second road are roads at two ends of a commuting trajectory;
[0056] A construction module, configured to construct at least one road set based on the first road and the second road, and the road network information; wherein each road set includes each road in a road trajectory having the first road and the second road as two ends;
[0057] The third determination module is used to determine the commuting trajectory of the target user based on the distance between the reported position in the MR data belonging to the third preset time period among the multiple MR data and the road trajectory formed by each road set.
[0058] Optionally, the first determining module includes:
[0059] The grouping submodule is used to perform designated grouping processing on the data to be used corresponding to the resident point to be determined, so as to obtain a plurality of groups to be used; wherein, if the resident point is a first resident point, the data to be used is the MR data belonging to the first preset time period, and if the resident point is a second resident point, the data to be used is the MR data belonging to the second preset time period; the designated grouping processing is used to group the MR data containing the same reported position in the data to be used into the same group, and each group to be used corresponds to one reported position;
[0060] A first determination submodule is used to determine, among the multiple groups to be used, an order of magnitude corresponding to the number of MR data included in the target group to be used as the maximum order of magnitude; wherein the target group to be used is the group to be used that includes the largest number of MR data;
[0061] A selection submodule, configured to select a group containing MR data of the largest order of magnitude from the plurality of groups to be used, to obtain a target group;
[0062] The second determination submodule is used to determine the location of the residence point based on the reported location corresponding to the target group.
[0063] Optionally, the first determining module further includes:
[0064] A designated screening submodule is used for performing designated screening on the target groups to obtain preferred groups if there are more than one target groups before the second determination submodule determines the position of the resident point based on the reported position corresponding to the target group, wherein the designated screening is used to eliminate the target group with the largest number of corresponding MR data among the target groups, and / or the target group with the corresponding reported position being an outlier among the target groups;
[0065] The second determining submodule is specifically used for:
[0066] The location of the dwell point is determined based on the reported location corresponding to the preferred group.
[0067] Optionally, the second determining submodule is specifically configured to:
[0068] If the number of the target group is one, the reported position corresponding to the target group is determined as the position of the residence point;
[0069] If the number of the target groups is more than one, based on the number of MR data contained in each target group, a weighted sum is performed on the reported positions corresponding to each target group to obtain the position of the dwell point.
[0070] Optionally, the second determining module includes:
[0071] a third determination submodule, configured to determine each first position point within a preset range from the first dwelling point and each second position point within a preset range from the second dwelling point by using the MR data belonging to a third preset time period among the plurality of MR data;
[0072] A first calculation submodule, used to calculate the first average direction angle and the first coordinate value corresponding to each of the first position points;
[0073] A second calculation submodule, used to calculate the second average direction angle and the second coordinate value corresponding to each second position point;
[0074] The fourth determination submodule is used to determine, based on the road network information, a first road that matches the first average direction angle and the first coordinate value, and a second road that matches the second average direction angle and the second coordinate value.
[0075] Optionally, the third determining submodule is specifically configured to:
[0076] Determine a first endpoint corresponding to the first dwell point and a second endpoint corresponding to the second dwell point by using MR data belonging to a third preset time period among the plurality of MR data; wherein the first endpoint is the earliest position point in time sequence within a preset radius from the first dwell point, and the second endpoint is the earliest position point in time sequence within a preset radius from the second dwell point;
[0077] Determine each first position point within a preset range from the first endpoint, and each second position point within a preset range from the second endpoint.
[0078] Optionally, the third determining module includes:
[0079] A third calculation submodule is used to calculate, for each road set in each road set, a sum of distances between a reported position in each MR data in the MR data of the third preset time period and a vertical point of the reported position on a road track formed by the road set, to obtain a loss distance;
[0080] The fifth determination submodule is used to determine the road set corresponding to the minimum value of the loss distance as the commuting trajectory of the target user.
[0081] Optionally, the device further comprises:
[0082] A preprocessing module is used to perform preprocessing on the multiple MR data to obtain multiple preprocessed MR data before the first determination module uses the MR data belonging to the first preset time period among the multiple MR data to determine the position of the first residence point; wherein the preprocessing is used to eliminate outliers and / or deduplicate data on the multiple MR data.
[0083] Optionally, the device further comprises:
[0084] A smoothing processing module is used to perform smoothing processing on the MR data belonging to the third preset time period among the multiple MR data before the third determination module determines the commuting trajectory of the target user based on the reported position in the MR data belonging to the third preset time period among the multiple MR data and the distance from the road trajectory formed by each road set; wherein the smoothing processing is used to eliminate or modify the MR data corresponding to the specified reporting position in the MR data of the third preset time period, and the specified reporting position is the burr point position in the trajectory connected in time sequence by the reported position in the MR data of the third preset time period.
[0085] Optionally, the smooth processing module includes:
[0086] A first processing submodule is configured to perform a first smoothing process on the MR data belonging to a third preset time period among the plurality of MR data to obtain MR data after the first smoothing process; wherein the first smoothing process is configured to eliminate the MR data corresponding to the designated reporting position;
[0087] The second processing submodule is used to perform a second smoothing process on the MR data after the first smoothing process; wherein the second smoothing process is used to modify the reported position in the MR data after the first smoothing process, and the MR data corresponding to the burr point in the trajectory connected in time sequence.
[0088] Optionally, the first processing submodule is specifically configured to:
[0089] Calculating the velocity corresponding to the reported position in each MR data in the MR data within the third preset time period;
[0090] Eliminate the MR data corresponding to the reported position within the third preset time period and whose speed exceeds the first preset threshold, to obtain the first target data;
[0091] For each of the three MR data adjacent in time sequence in the first target data, calculate the reported positions in the three MR data adjacent in time sequence and the angle of the line segments connected in time sequence;
[0092] If the line segment angle is smaller than a second preset threshold, the second MR data of the three MR data adjacent in time sequence is eliminated to obtain the MR data after the first smoothing process.
[0093] Optionally, the second processing submodule is specifically configured to:
[0094] Calculating the velocity corresponding to the reported position in each MR data in the MR data after the first smoothing process;
[0095] Eliminate the MR data corresponding to the reported position whose speed exceeds the first preset threshold value in the MR data after the first smoothing process, to obtain second target data;
[0096] For each of the three MR data adjacent in time sequence in the second target data, calculate the reported positions in the three MR data adjacent in time sequence and the angle of the line segments connected in time sequence;
[0097] If the line segment angle is less than a second preset threshold, a specified modification is performed on the second MR data among the three adjacent MR data in the time sequence; wherein the specified modification is used to replace the reporting position of the second MR data with the reporting position of the first MR data among the three adjacent MR data in the time sequence.
[0098] 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;
[0099] Memory, used to store computer programs;
[0100] The processor is used to implement the steps of any of the above-mentioned methods for generating a commuting trajectory when executing a program stored in the memory.
[0101] 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 of the above-mentioned methods for generating a commuting trajectory are implemented.
[0102] Beneficial effects of the embodiments of the present invention:
[0103] The method for generating a commuting trajectory provided by an embodiment of the present invention obtains multiple MR data within a specified historical time period for a target user; since the MR data contains information such as a reported position, the position of the first residence point of the target user during sleep time and the position of the second residence point of the target user during work time can be determined by using the multiple MR data; then, according to the position of the first residence point and the position of the second residence point, the first road and the second road passed by the target user during commuting are determined; based on the first road and the second road, and the road network information, at least one road set is constructed; based on the distance between the reported position in the MR data belonging to the third preset time period among the multiple MR data and the road trajectory formed by each road set, the commuting trajectory of the target user is determined. Since the reported position in the MR data of the third preset time period is each reported position in the commuting time period, by calculating the distance between the reported position in the MR data of the third preset time period and the road trajectory formed by each road set, the road set that best matches the reported position of the MR data of the third preset time period can be determined, and the road set can be determined as the commuting trajectory of the target user. Thus, the commuting trajectory of the user can be generated by using MR data.
[0104] Of course, it is not necessary to achieve all of the advantages described above at the same time to implement any product or method of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0105] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other embodiments can also be obtained based on these drawings.
[0106] Figure 1 A flow chart of a method for generating a commuting trajectory provided by an embodiment of the present invention;
[0107] Figure 2 A flowchart for implementing step S102 in an embodiment of the present invention;
[0108] Figure 3 A flowchart for implementing step S103 in an embodiment of the present invention;
[0109] Figure 4 A flowchart for implementing step S1031 in an embodiment of the present invention;
[0110] Figure 5 A flowchart of a method for generating a commuting trajectory in the related art;
[0111] Figure 6A flowchart of a specific example of a method for generating a commuting trajectory provided by an embodiment of the present invention;
[0112] Figure 7 A schematic diagram showing a reporting location of MR data;
[0113] Figure 8 A schematic diagram showing the reporting location of the largest magnitude of MR data;
[0114] Fig. 9 A schematic diagram showing outliers;
[0115] Fig.10 A schematic diagram showing the trajectory formed by connecting the MR data during the commuting period;
[0116] Fig.11 A schematic diagram of the trajectory after the first rounding process is shown;
[0117] Fig.12 A schematic diagram of the trajectory after the second rounding process is shown;
[0118] Fig.13 A schematic diagram of road network matching is shown;
[0119] Figure 14A-Figure 14C A schematic diagram showing the direction angle corresponding to the reported position;
[0120] Figure 15A-15G A schematic diagram showing the determination of the perpendicular coordinates;
[0121] Fig.16 A schematic diagram of the structure of a commuting trajectory generating device provided by an embodiment of the present invention;
[0122] Fig.17 The present invention is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0123] The following will be combined with the 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 described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field based on this application belong to the scope of protection of the present invention.
[0124] The inventors found in their research that since the mobile terminal periodically reports MR data to the base station, and the MR data contains information such as the reporting timestamp and the reporting location, and is extremely easy for operators to obtain, the MR data can be used to locate the user's location. In addition, although the location data in the base station MR data has a larger error than the GPS positioning data and inaccurate positioning, it has been found through statistics that MR data is road-friendly and base station-friendly, that is, the location data in the MR data is more likely to fall on the road and the base station location. Therefore, if the MR data whose location data falls on the road can be used well, the user's commuting trajectory can be obtained by analyzing the MR data, and then the trajectory data can be provided for the relevant departments to analyze user behavior when responding to scenarios such as disaster relief and infectious disease screening.
[0125] Based on the above content, in order to generate a user's commuting trajectory using MR data, an embodiment of the present invention provides a method, apparatus, device and storage medium for generating a commuting trajectory.
[0126] Below, a method for generating a commuting trajectory provided by an embodiment of the present invention is first introduced.
[0127] The method for generating a commuting trajectory provided by the embodiment of the present disclosure can be applied to an electronic device. In a specific application, the electronic device can be a server or a terminal device, which is reasonable. In practical applications, the terminal device can be: a smart phone, a tablet computer, a desktop computer, etc.
[0128] Specifically, the execution subject of the commuting trajectory generation method may be a commuting trajectory generation device. Exemplarily, when the commuting trajectory generation method is applied to a terminal device, the commuting trajectory generation device may be a functional software running in the terminal device, such as commuting trajectory generation software. Exemplarily, when the commuting trajectory generation method is applied to a server, the commuting trajectory generation device may be a computer program running in the server, and the computer program may be used to generate the user's commuting trajectory.
[0129] Among them, a method for generating a commuting trajectory provided by an embodiment of the present invention may include the following steps:
[0130] Acquire multiple measurement report MR data within a specified historical time period for the target user; wherein the specified historical time period includes a first preset time period representing sleep time, a second preset time period representing work time, and a third preset time period representing commuting time;
[0131] Determine the position of a first dwell point by using the MR data belonging to the first preset time period among the multiple MR data, and determine the position of a second dwell point by using the MR data belonging to the second preset time period among the multiple MR data; wherein the first dwell point represents the dwell point of the target user during sleep time, and the second dwell point represents the dwell point of the target user during work time;
[0132] Based on the position of the first residence point and the position of the second residence point, determining a first road and a second road that the target user passes through during the commuting process; wherein the first road and the second road are roads at two ends of the commuting trajectory;
[0133] Based on the first road and the second road, and the road network information, at least one road set is constructed; wherein each road set includes each road in a road trajectory having the first road and the second road as two ends;
[0134] The commuting trajectory of the target user is determined based on the distance between the reported position in the MR data belonging to the third preset time period among the plurality of MR data and the road trajectory formed by each road set.
[0135] The solution provided by the embodiment of the present invention obtains multiple MR data within a specified historical time period for a target user; since the MR data contains information such as the reported position, the position of the first residence point of the target user during sleep time and the position of the second residence point of the target user during work time can be determined by using the multiple MR data; then, according to the position of the first residence point and the position of the second residence point, the first road and the second road that the target user passes through during commuting are determined; based on the first road and the second road, and the road network information, at least one road set is constructed; based on the distance between the reported position in the MR data belonging to the third preset time period among the multiple MR data and the road track formed by each road set, the commuting track of the target user is determined. Since the reported position in the MR data of the third preset time period is each reported position in the commuting time period, by calculating the distance between the reported position in the MR data of the third preset time period and the road track formed by each road set, the road set that best matches the reported position of the MR data of the third preset time period can be determined, and the road set can be determined as the commuting track of the target user. Thus, the commuting track of the user can be generated by using MR data.
[0136] The following describes a method for generating a commuting trajectory provided by an embodiment of the present invention in conjunction with the accompanying drawings.
[0137] like Figure 1As shown, the method for generating a commuting trajectory provided in an embodiment of the present invention may include steps S101-S105:
[0138] S101, obtaining a plurality of measurement report MR data within a specified historical time period for a target user; wherein the specified historical time period includes a first preset time period representing sleep time, a second preset time period representing work time, and a third preset time period representing commuting time;
[0139] In this embodiment, since the mobile terminal of the target user periodically reports MR data to the base station, when analyzing the commuting trajectory of the target user, a request for obtaining the MR data of the target user may be sent to the base station, so that after receiving the request, the base station feeds back the MR data to the requesting end, thereby obtaining the MR data of the target user. When sending the request for obtaining the MR data of the target user, the request instruction may carry the indicated designated historical time period, so that the base station feeds back multiple MR data within the designated historical time period to the requesting end, thereby obtaining multiple MR data within the designated historical time period for the target user.
[0140] Exemplarily, the designated historical time period may be a historical time period of the previous week, the previous month, etc. Exemplarily, the first preset time period may be a time period from 0:00 to 6:00 daily, the second preset time period may be a time period from 9:00 to 17:00 daily, and the third preset time period may be a time period from 6:00 to 9:00 daily. It should be noted that the designated historical time period may be set by the relevant staff, and the first preset time period, the second preset time period and the third preset time period may be divided by the relevant staff according to experience, which is not limited in the embodiment of the present invention.
[0141] In addition, it should be noted that the MR data may include information such as reporting timestamp, reporting location, RSRP (Reference Signal Receiving Power), TA (Timing Advance), etc. It should also be noted that the MR data in this embodiment may come from a public data set, or the acquisition of the MR data is authorized by the corresponding user; and the collection, storage, use, processing, etc. of the MR data shall comply with the provisions of relevant laws and regulations and shall not violate public order and good customs.
[0142] S102, using the MR data belonging to the first preset time period among the multiple MR data to determine the position of the first dwelling point, and using the MR data belonging to the second preset time period among the multiple MR data to determine the position of the second dwelling point; wherein the first dwelling point represents the dwelling point of the target user during sleep time, and the second dwelling point represents the dwelling point of the target user during work time;
[0143] It is understandable that in order to analyze the commuting trajectory of the target user, the starting point and the ending point in the commuting trajectory can be determined first. Since the commuting trajectory is the trajectory of the target user from home to the company, or from the company to home, the first residence point representing the target user during sleep time and the second residence point representing the target user during work time can be used as the starting point or the ending point in the commuting trajectory respectively. In addition, since the MR data contains information such as the reported position, the position of the first residence point can be determined by using the MR data belonging to the first preset time period among the multiple MR data, and the position of the second residence point can be determined by using the MR data belonging to the second preset time period among the multiple MR data. It should be noted that both the first residence point and the second residence point can be used as the starting point of the commuting trajectory, and when the first residence point is the starting point, the second residence point is the ending point; when the second residence point is the starting point, the first residence point is the ending point.
[0144] Exemplarily, in one implementation, the method for determining the position of the first resident point may be to count the number of MR data containing the same reported position in the MR data within the first preset time period, and determine the reported position with the largest number as the position of the first resident point. The method for determining the position of the second resident point may be to count the number of MR data containing the same reported position in the MR data within the second preset time period, and determine the reported position with the largest number as the position of the second resident point.
[0145] In addition, it should be noted that, since the amount of MR data is extremely large, before using the MR data to determine the position of the dwell point, the MR data can also be compressed to reduce computing resource consumption. Exemplarily, in one implementation, before using the MR data belonging to the first preset time period among the multiple MR data to determine the position of the first dwell point, the method further includes: preprocessing the multiple MR data to obtain multiple preprocessed MR data; wherein the preprocessing is used to remove outliers and / or perform data deduplication processing on the multiple MR data.
[0146] In this implementation, before using MR data to determine the position of the dwell point, the multiple MR data are preprocessed to remove abnormal values and repeated MR data in the MR data, thereby achieving data compression. In addition, since the smaller the RSRP value in the MR data, the worse the signal quality of the data, and the larger the TA error in the MR data, the worse the signal quality of the MR data, therefore, in order to ensure the reliability of the MR data, in the process of preprocessing, the MR data can also be sorted from large to small by RSRP value to remove the MR data at the end of the sorting, and then the MR data can be sorted from small to large by TA error to remove the MR data at the end of the sorting, thereby achieving MR data compression. Exemplarily, the 20% MR data at the end of the sorting can be removed according to the RSRP value sorting from large to small, and then the TA error in each MR data is calculated, and the 20% MR data at the end of the sorting can be removed by TA error from small to large. Among them, the calculation method of the TA error for each MR data is: TA error = distance between the base station position and the reported position of the MR data / TA-78.12.
[0147] S103, based on the position of the first residence point and the position of the second residence point, determining a first road and a second road that the target user passes through during the commuting process; wherein the first road and the second road are roads at two ends of the commuting trajectory;
[0148] In this embodiment, since the target user's commuting trajectory is a trajectory starting from the first or second dwelling point and moving toward the other dwelling point, after the location of the first dwelling point and the location of the second dwelling point are determined in step S102, the first road and the second road that the target user passes through in the commuting trajectory can be determined according to the location of the dwelling point. Exemplarily, the first road and the second road can be determined by using the road network information to determine the road closest to the first dwelling point as the first road and the road closest to the second dwelling point as the second road.
[0149] Furthermore, when determining the first road and the second road, in order to ensure the accuracy of the determined first road and the second road, the MR data within a third preset time period may also be used to determine the first road and the second road. Exemplarily, the MR data within the third preset time period, in which the reported position is near the first and second resident points, may be used to determine the road in the road network information that best matches the road trajectory as the first road based on the road trajectory connected between the position of the first resident point and the reported position near the position, and the road in the road network information that best matches the road trajectory as the second road based on the road trajectory connected between the position of the second resident point and the reported position near the position.
[0150] S104, constructing at least one road set based on the first road and the second road, and the road network information; wherein each road set includes each road in a road trajectory having the first road and the second road as two ends;
[0151] In this embodiment, after determining the first road and the second road at both ends of the commuting trajectory, the road network information can be used to determine each road trajectory with the first road and the second road as both ends, that is, to perform bidirectional dual connectivity matching of the road network, and to construct each road included in each road trajectory into a road set. It can be understood that the road network information contains the road id (Identity document) of each road, and each road id corresponds to a unique road. According to the road network information and the first road and the second road, at least one road set can be constructed, and the road set is a set composed of each road id.
[0152] S105 , determining the commuting trajectory of the target user based on the distance between the reported position in the MR data belonging to the third preset time period among the plurality of MR data and the road trajectory formed by each road set.
[0153] In this embodiment, after constructing at least one road set through step S104, the reported positions in the MR data of the third preset time period can be used to determine the commuting trajectory of the target user by selecting the road trajectory corresponding to the at least one road set and the trajectory connected in time sequence by the reported positions in the MR data of the third preset time period that best matches the road trajectory.
[0154] It is understandable that there are multiple ways to determine the commuting trajectory of the target user. Exemplarily, in one implementation, determining the commuting trajectory of the target user based on the distance between the reported position in the MR data belonging to the third preset time period in the multiple MR data and the road trajectory formed by each road set may include steps A1-A2:
[0155] A1, for each road set in each road set, calculating the sum of the distances between the reported position in each MR data in the MR data of the third preset time period and the vertical point of the reported position on the road track formed by the road set to obtain a loss distance;
[0156] A2, determining the road set corresponding to the minimum value of the loss distance as the commuting trajectory of the target user.
[0157] It can be understood that in order to find the road set that best matches the trajectory connected in time sequence with the reported position in the MR data of the third preset time period, the distance between the reported position in each MR data in the MR data of the third preset time period and the road trajectory formed by the road set can be calculated for each road set. Among them, the distance between the reported position in each MR data and the road trajectory formed by the road set is the distance between the reported position and the vertical point of the reported position on the road trajectory. Then, the sum of the distances between the reported position in each MR data of the third preset time period and the road trajectory is calculated to obtain the loss distance. Among the various road sets, the road set with the smallest calculated loss distance is the road set that best matches the trajectory connected in time sequence with the reported position in the MR data of the third preset time period, that is, the commuting trajectory of the target user.
[0158] The solution provided by the embodiment of the present invention obtains multiple MR data within a specified historical time period for a target user; since the MR data contains information such as the reported position, the position of the first residence point of the target user during sleep time and the position of the second residence point of the target user during work time can be determined by using the multiple MR data; then, according to the position of the first residence point and the position of the second residence point, the first road and the second road that the target user passes through during commuting are determined; based on the first road and the second road, and the road network information, at least one road set is constructed; based on the distance between the reported position in the MR data belonging to the third preset time period among the multiple MR data and the road track formed by each road set, the commuting track of the target user is determined. Since the reported position in the MR data of the third preset time period is each reported position in the commuting time period, by calculating the distance between the reported position in the MR data of the third preset time period and the road track formed by each road set, the road set that best matches the reported position of the MR data of the third preset time period can be determined, and the road set can be determined as the commuting track of the target user. Thus, the commuting track of the user can be generated by using MR data.
[0159] Alternatively, in another embodiment of the present invention, Figure 2 As shown, in the above step S102, the method for determining the position of any one of the first dwelling point and the second dwelling point may include steps S1021-S1024:
[0160] S1021, performing designated grouping processing on the data to be used corresponding to the resident point to be determined, to obtain a plurality of groups to be used; wherein, if the resident point is a first resident point, the data to be used is the MR data belonging to the first preset time period, and if the resident point is a second resident point, the data to be used is the MR data belonging to the second preset time period; the designated grouping processing is used to group the MR data containing the same reported position in the data to be used into the same group, and each group to be used corresponds to one reported position;
[0161] In this embodiment, in order to determine the position of the first resident point or the second resident point, the data to be used corresponding to the resident point to be determined may be subjected to designated grouping processing, so that the MR data containing the same reported position may be grouped into the same group. Exemplarily, for the first resident point, the MR data containing the same reported position in the MR data within the first preset time period may be grouped into the same group, for example, the MR data with the reported position of position A may be grouped into the same group, and the MR data with the reported position of position B may be grouped into the same group, thereby obtaining a plurality of groups to be used; for the second resident point, the MR data containing the same reported position in the MR data within the second preset time period may be grouped into the same group, thereby obtaining a plurality of groups to be used.
[0162] S1022, determining the order of magnitude corresponding to the number of MR data included in the target group to be used among the multiple groups to be used as the maximum order of magnitude; wherein the target group to be used is the group to be used that includes the largest number of MR data;
[0163] For example, if the target group to be used contains m MR data, and m is a positive integer, then the maximum order of magnitude is int(log 10 m), where int is an integer type. For example, if the target to-be-used group contains 5500 MR data, the order of magnitude of 5500 is 10 3 The maximum order of magnitude is 10 3 order of magnitude.
[0164] S1023, selecting a group including MR data of the largest order of magnitude from the multiple groups to be used, to obtain a target group;
[0165] It is understandable that, since the dwell point is a point representing the stay information, and the mobile terminal periodically reports MR data to the base station, the greater the number of MR data containing the same reported position, the higher the possibility that the reported position is the location of the dwell point. Therefore, the to-be-used group with the largest magnitude containing the same reported position can be determined as the target group, and then the location of the dwell point is determined according to the reported position corresponding to the target group.
[0166] S1024: Determine the location of the residence point based on the reported location corresponding to the target group.
[0167] It can be understood that there are multiple ways to determine the location of the dwell point based on the reported location corresponding to the target group. Exemplarily, in one implementation, determining the location of the dwell point based on the reported location corresponding to the target group may include steps B1-B2:
[0168] B1, if the number of the target group is one, determine the reported position corresponding to the target group as the position of the residence point;
[0169] It is understandable that, since each group contains MR data with the same reporting position, each group corresponds to a reporting position. If the number of target groups is one, the reporting position corresponding to the target group can be determined as the position of the residence point.
[0170] B2: If the number of the target group is more than one, based on the number of MR data contained in each target group, a weighted sum is performed on the reported positions corresponding to each target group to obtain the position of the residence point.
[0171] If there are more than one target groups, the weight of the reporting position corresponding to each target group can be determined according to the number of MR data contained in each target group, and then the weighted sum of the reporting positions corresponding to each target group is performed to obtain the position of the residence point. Exemplarily, the weight of the reporting position corresponding to each target group can be the ratio of the number of MR data contained in the target group to the total number of MR data contained in all target groups. Exemplarily, if the number of target groups is 3, they are group A, group B and group C. Among them, group A contains 3000 MR data, and the reporting position corresponding to group A is [longitude 1, latitude 1]; group B contains 5000 MR data, and the reporting position corresponding to group B is [longitude 2, latitude 2]; group C contains 2000 MR data, and the reporting position corresponding to group C is [longitude 3, latitude 3]. The weight corresponding to group A is 0.3, the weight corresponding to group B is 0.5, and the weight corresponding to group C is 0.2. The position of the stay point is [0.3*longitude1+0.5*longitude2+0.2*longitude3, 0.3*latitude1+0.5*latitude2+0.2*latitude3].
[0172] It can be seen that through this scheme, due to the extremely large amount of MR data, the same reported position of the largest order of magnitude in the MR data is determined as the position of the residence point. Compared with the prior art of determining the position of the residence point by clustering the GPS positioning data, which leads to inaccurate residence points due to the easy loss of GPS positioning data, the position of the residence point obtained by this scheme is more accurate.
[0173] Optionally, in another embodiment of the present invention, Figure 2 Based on the illustrated embodiment, before determining the location of the dwell point based on the reported location corresponding to the target group in step S1024, the method further includes:
[0174] If the number of the target groups is more than one, the target groups are specified and screened to obtain a preferred group; wherein the specified screening is used to exclude the target group with the largest number of corresponding MR data in the target groups, and / or the target group with the corresponding reported position being an outlier in the target groups;
[0175] It is understandable that, since MR data is base station-friendly, the reported position corresponding to the target group determined by the above method is very likely to be the position of the base station, and determining the position of the base station as the position of the dwelling point will result in an inaccurate position of the dwelling point, thereby generating an inaccurate commuting trajectory. Therefore, in order to determine a more accurate position of the dwelling point, in this embodiment, the target group can be specified and screened before determining the position of the dwelling point based on the reported position corresponding to the target group.
[0176] Since the location points with the highest occurrence frequency of the same reported location in the MR data and the location points whose reported locations are outliers are most likely to be location points of base stations, they need to be removed. That is, the target group with the largest number of corresponding MR data in the target group and / or the target group with the corresponding reported location as an outlier in the target group are removed to ensure that the target group corresponding to the base station location in the target group is removed, thereby obtaining a preferred group.
[0177] Exemplarily, the method of determining outliers may be to calculate the distance from each reported position in the MR data to other reported positions, then select several closest distances to other reported positions, and calculate the sum of these distances. Since the points in the cluster are closer and the points outside the cluster are sparser, the distance from the outliers to other reported positions is significantly greater than that of the points in the cluster. Therefore, the outliers can be determined by comparing the sum of the distances from each reported position to several other closest reported positions.
[0178] Accordingly, in this embodiment, determining the location of the dwell point based on the reported location corresponding to the target group includes:
[0179] Based on the reported position corresponding to the preferred group, the position of the dwell point is determined.
[0180] It is understandable that, since the preferred group is a group that excludes the base station position, a more accurate position of the dwell point can be determined based on the reported position corresponding to the preferred group. In addition, it should be noted that the method for determining the position of the dwell point based on the reported position corresponding to the preferred group is similar to the content of the above step S1024, which will not be repeated here.
[0181] It can be seen that, through this solution, the target group is specified and screened, and the target group corresponding to the base station position in the target group can be eliminated. Therefore, based on the reported position corresponding to the preferred group obtained after the specified screening, the position of the residence point can be determined, and a more accurate position of the residence point can be determined.
[0182] Alternatively, in another embodiment of the present invention, Figure 3 As shown, in the above step S103, based on the position of the first stay point and the position of the second stay point, determining the first road and the second road that the target user passes through during the commuting process may include steps S1031-S1034:
[0183] S1031, using the MR data belonging to the third preset time period among the plurality of MR data, determining each first position point within a preset range from the first residence point, and each second position point within a preset range from the second residence point;
[0184] Exemplarily, the preset range may be within 10 meters, within 20 meters, etc. It should be noted that the preset range may be determined by relevant staff based on experience, and the embodiment of the present invention is not limited thereto. Exemplarily, if the preset range is within 10 meters, several reported positions within 10 meters from the first station point may be determined as first position points, and several reported positions within 10 meters from the second station point may be determined as second position points. It is understandable that, since the accuracy of determining the road closest to the first station point as the first road and the road closest to the second station point as the second road is not high according to the position of the first station point and the position of the second station point, and the reported position points near the station point may be connected in time sequence to form a commuting trajectory, the first road and the second road may be determined by using the first position points within the preset range from the first station point and the second position points within the preset range from the second station point.
[0185] S1032, calculating the first average direction angle and the first coordinate value corresponding to each first position point;
[0186] In this embodiment, the first coordinate value corresponding to each first position point is the coordinate value of the reported position of the first position point. The first average direction angle corresponding to each first position point is the average value of the direction angles corresponding to each first position point. Exemplarily, for each first position point, the angle between the straight line determined by the first position point and the first position point adjacent in time sequence and the true north direction can be determined as the direction angle corresponding to the first position point.
[0187] S1033, calculating the second average direction angle and the second coordinate value corresponding to each second position point;
[0188] In this embodiment, the method of calculating the second average direction angle and the second coordinate value corresponding to each second position point is similar to the above-mentioned method of calculating the first average direction angle and the first coordinate value corresponding to each first position point, and will not be repeated here.
[0189] S1034, based on the road network information, determining a first road that matches the first average direction angle and the first coordinate value, and a second road that matches the second average direction angle and the second coordinate value.
[0190] It is understandable that, since the direction angle at the beginning is unreliable, the MR data of the third preset time period can be used to determine multiple first position points and second position points, so as to calculate the first average direction angle and the first coordinate value corresponding to each first position point, and the second average direction angle and the second coordinate value corresponding to each second position point. Then, the road network information is used to find the first road that matches the first average direction angle and the first coordinate value, and the second road that matches the second average direction angle and the second coordinate value, so as to determine the first road and the second road with higher reliability. Exemplarily, the first road that matches the first average direction angle and the first coordinate value can be the road in the road network information, where the first average direction angle is closest to the direction angle of the road, and the distance from the first coordinate value to the road is the smallest; the second road that matches the second average direction angle and the second coordinate value can be the road in the road network information, where the second average direction angle is closest to the direction angle of the road, and the distance from the second coordinate value to the road is the smallest.
[0191] In addition, it should be noted that if more than one first road matching the first average direction angle and the first coordinate value, or more than one second road matching the second average direction angle and the second coordinate value can be determined based on the road network information, then the first road or the second road can be a collection of multiple roads.
[0192] It can be seen that through this solution, the first road and the second road with higher reliability can be determined.
[0193] Alternatively, in another embodiment of the present invention, Figure 4 As shown, in the above step S1031, using the MR data belonging to the third preset time period among the multiple MR data to determine each first position point within a preset range from the first residence point, and each second position point within a preset range from the second residence point, may include S401-S402:
[0194] S401, using the MR data belonging to the third preset time period among the multiple MR data, determining a first endpoint corresponding to the first dwell point and a second endpoint corresponding to the second dwell point; wherein the first endpoint is the earliest position point in time sequence within a preset radius range from the first dwell point, and the second endpoint is the earliest position point in time sequence within the preset radius range from the second dwell point;
[0195] It is understandable that when the dwell point is used as the starting point or the end point, since the dwell point is not on the road, the reliability of directly determining the first road and the second road by using the coordinate values and average direction angles of each first position point within the preset range of the first dwell point and each second position point within the preset range of the second dwell point is not high. Considering that the target user will travel to the road after a period of time starting from the dwell point during the commuting process, using the position point on the road as the starting point to analyze the commuting trajectory can obtain a more accurate commuting trajectory. Therefore, in this embodiment, the first endpoint corresponding to the first dwell point and the second endpoint corresponding to the second dwell point are first determined, and the first endpoint and the second endpoint are the earliest position points in time sequence within the preset radius range from the first dwell point and the second dwell point, respectively. It is understandable that considering that the target user will travel to the road after a period of time starting from the dwell point during the commuting process, the first endpoint and the second endpoint are position points on the road.
[0196] For example, the preset radius range may be a range between 2km and 3km from the station point. It should be noted that the preset radius range may be set by relevant staff members, and the embodiment of the present invention does not limit the specific preset radius range.
[0197] S402, determining each first position point within a preset range from the first endpoint, and each second position point within a preset range from the second endpoint.
[0198] In this embodiment, the method of determining each first position point within the preset range from the first endpoint and each second position point within the preset range from the second endpoint may be similar to the content of the above-mentioned step S1031, which will not be repeated here.
[0199] It can be seen that, through this solution, since the first endpoint and the second endpoint are location points on the road, each first location point and the second location point are determined based on the first endpoint and the second endpoint, that is, the first endpoint or the second endpoint is used as the actual starting point. The location point on the road is used as the actual starting point to analyze the commuting trajectory, and more accurate first roads and second roads can be obtained later, thereby generating a more accurate commuting trajectory.
[0200] Optionally, in another embodiment of the present invention, Figure 1 On the basis of the illustrated embodiment, before determining the commuting trajectory of the target user in the above step S105 based on the distance between the reported position in the MR data belonging to the third preset time period in the plurality of MR data and the road trajectory formed by each road set, the method further includes:
[0201] The MR data belonging to the third preset time period among the multiple MR data are smoothed; wherein the smoothing is used to eliminate or modify the MR data corresponding to the specified reporting position in the MR data of the third preset time period, and the specified reporting position is the burr point position in the trajectory connected in time sequence from the reporting position in the MR data of the third preset time period.
[0202] It can be understood that since the burrs in the trajectory formed by connecting the reported positions in the MR data will affect the analysis of the commuting trajectory, in this embodiment, before using the reported positions in the MR data of the third preset time period, the MR data of the third preset time period can be smoothed to eliminate or modify the reported positions in the MR data of the third preset time period and the burr point positions in the trajectory connected in time sequence.
[0203] Optionally, in an implementation manner, performing smoothing processing on the MR data belonging to the third preset time period among the plurality of MR data may include steps C1-C2:
[0204] C1, performing a first smoothing process on the MR data belonging to a third preset time period among the plurality of MR data to obtain MR data after the first smoothing process; wherein the first smoothing process is used to eliminate the MR data corresponding to the designated reporting position;
[0205] Exemplarily, in a specific implementation, performing a first smoothing process on the MR data belonging to the third preset time period among the plurality of MR data to obtain the MR data after the first smoothing process may include steps A11-A14:
[0206] C11, calculating the velocity corresponding to the reported position in each MR data in the MR data within the third preset time period;
[0207] In this implementation, the speed corresponding to the reported position in each MR data can be calculated based on the distance and time difference between the reported position and its adjacent reported position. Exemplarily, for the reported position A that is earlier in time sequence and the reported position B that is adjacent to the reported position A in time sequence, if the distance between the reported position A and the reported position B is 5 meters, and the time difference between the reported timestamps in the MR data corresponding to the reported positions A and B is 5 seconds, then the speed corresponding to the reported position A is 1 m / s. It should be noted that the speed corresponding to the reported position in each MR data can also be calculated by other methods, for example, by sorting the reported timestamps corresponding to each reported position in time sequence, and calculating the speed corresponding to the reported position by the distance and time difference between the reported positions before and after the reported position in time sequence. The embodiment of the present invention does not limit the calculation method of the speed corresponding to the reported position in each MR data.
[0208] C12, removing the MR data corresponding to the reported position whose speed exceeds the first preset threshold within the third preset time period, to obtain first target data;
[0209] It is understandable that the first preset threshold can be a threshold that characterizes a speed exceeding the normal commuting speed. By eliminating the MR data corresponding to the reported position whose speed exceeds the first preset threshold, it can be ensured that in the obtained first target data, each MR data is MR data of a normal reported position. Exemplarily, the first preset threshold can be 90m / s. It is understandable that since the speed of 90m / s is close to the speed of high-speed rail, and normal commuting rarely uses high-speed rail for commuting, the MR data corresponding to the reported position whose speed exceeds the 90m / s can be eliminated. In addition, it should be noted that the first preset threshold can be set by relevant staff based on experience, and the embodiments of the present invention are not limited to this.
[0210] C13, for each of the three MR data adjacent in the time sequence in the first target data, calculating the angle of the line segments connected in the time sequence of the reported positions of the three MR data adjacent in the time sequence;
[0211] It can be understood that since the angle between the burr point and the line segment connecting the adjacent reported position in time sequence is small, in order to eliminate the MR data corresponding to the burr point in the first target data, the reported position in each of the three adjacent MR data in time sequence in the first target data can be calculated first, and the angle between the line segments connected in time sequence can be calculated.
[0212] In addition, it should be noted that if the time interval between the reporting timestamps of the first MR data and the third MR data of the three adjacent MR data in time sequence is relatively large, for example, the time interval exceeds 15 minutes, at this time, the reporting positions of the first MR data and the third MR data can be determined as two trajectories, and the angle between the line segments connecting the three adjacent MR data in time sequence is not calculated.
[0213] C14: if the line segment angle is smaller than a second preset threshold, the second MR data of the three MR data adjacent in time sequence is eliminated to obtain the MR data after the first smoothing process.
[0214] Exemplarily, the second preset threshold may be 10 degrees, 20 degrees, and so on. It should be noted that the second preset threshold may be set based on experience of relevant staff, and the embodiment of the present invention is not limited thereto. It is understandable that if the angle of the line segment connected by the time sequence of the reported positions of the three adjacent MR data in the time sequence is less than the second preset threshold, then the reported position of the second MR data of the three adjacent MR data is considered to be a burr point position, and the second MR data of the three adjacent MR data is discarded.
[0215] C2, performing a second smoothing process on the MR data after the first smoothing process; wherein the second smoothing process is used to modify the reported position in the MR data after the first smoothing process, and the MR data corresponding to the burr point in the track connected in time sequence.
[0216] It is understandable that new burrs may be generated after the first smoothing process. Therefore, in order to ensure the accuracy of the commuting trajectory obtained subsequently, the embodiment of the present invention further performs a second smoothing process on the MR data after the first smoothing process.
[0217] Exemplarily, in a specific implementation, performing a second smoothing process on the MR data after the first smoothing process may include steps C21-C24:
[0218] C21, calculating the velocity corresponding to the reported position in each MR data in the MR data after the first smoothing process;
[0219] C22, removing the MR data corresponding to the reported position whose speed exceeds the first preset threshold value from the MR data after the first smoothing process, to obtain second target data;
[0220] C23, for each of the three MR data adjacent in the time sequence in the second target data, calculating the angle of the line segments connected in the time sequence of the reported positions of the three MR data adjacent in the time sequence;
[0221] It should be noted that the implementation of steps C21-C23 may be similar to the above steps C11-C13, and will not be repeated here.
[0222] C24, if the line segment angle is less than a second preset threshold, perform a specified modification on the second MR data among the three adjacent MR data in the time series; wherein the specified modification is used to replace the reporting position of the second MR data with the reporting position of the first MR data among the three adjacent MR data in the time series.
[0223] It can be understood that if the angle of the line segment connecting the reported positions of the three adjacent MR data in the time sequence is less than the second preset threshold, then the reported position of the second MR data among the three adjacent MR data is considered to be the burr point position. At this time, the second MR data among the three adjacent MR data can be modified in a specified manner, that is, the reported position in the second MR data is modified to the reported position in the first MR data, so as to retain information such as the timestamp in the second MR data.
[0224] It can be seen that, through this solution, before using the reported position in the MR data of the third preset time period, the MR data of the third preset time period is smoothed to remove or modify the MR data of the MR data of the third preset time period whose reported position is a burr point. Thus, the influence of the burr point on the commuting trajectory analysis can be reduced, and a more accurate commuting trajectory can be generated by subsequently using the MR data after the smoothing process.
[0225] In order to better understand the content of the embodiment of the present invention, a specific example is introduced below.
[0226] Figure 5 A flowchart of a method for generating a commuting trajectory in the related art is shown. Figure 5 As shown, the following steps are included: S501, obtaining the GPS positioning data of the target user and performing preprocessing; wherein, the preprocessing can be to remove the outliers in the GPS positioning data; S502, clustering the location points in the residence point area in the GPS positioning data to obtain the commuting key points; S503, using the road network information and the commuting key points to perform one-way connection matching of the road network; S504 obtaining the commuting trajectory of the target user. However, due to the difficulty in obtaining GPS positioning data and the fact that data is easily lost, it is difficult to obtain accurate commuting key points through clustering. Therefore, after the subsequent one-way connection matching of the road network using the road network information and the commuting key points, the accuracy of the commuting trajectory obtained is not high.
[0227] The inventors found in their research that, since the mobile terminal periodically reports MR data to the base station, and the MR data contains information such as the reporting timestamp and the reporting location, and is very easy for operators to obtain, the MR data can be used to locate the user's location. In addition, since the amount of MR data is very large, even if part of the MR data is lost, it does not affect the analysis of the commuting trajectory. Therefore, an embodiment of the present invention proposes a method for generating a user's commuting trajectory using MR data.
[0228] Figure 6 A flowchart of a specific example of a method for generating a commuting trajectory provided by an embodiment of the present invention. As shown in FIG6 , the method includes the following steps:
[0229] S601, obtaining MR data of a target user in the past week, and preprocessing the MR data;
[0230] like Figure 7 As shown, the reported location map of the MR data of the target user in the past week is shown, and each small dot in the map represents the reported location of each MR data. In this example, the content of the MR data may include a reported timestamp, longitude and latitude (corresponding to the reported location above), TA, RSRP, etc. For example, the data format of the MR data may be as shown in the following table:
[0231]
[0232]
[0233] The preprocessing process can be: first remove abnormal values from the MR data, and perform data deduplication according to the same reporting timestamp and the same longitude and latitude. Then, calculate the TA error, use the RSRP value and TA error as sorting keywords at the same time, first sort by RSRP value from large to small, and then sort by TA error value from small to large, and remove the last 20% of the MR data to achieve 80% compression of the data volume.
[0234] S602, using a big data statistical method, obtaining coarsely positioned commuting key points with errors (corresponding to the first and second dwelling points mentioned above);
[0235] The MR data of the target user in the past week is divided into MR data of the sleeping period, MR data of the working period, and MR data of the commuting period. Since the dwelling point is a point that represents the stay information, and the mobile terminal periodically reports MR data to the base station, the greater the number of MR data containing the same reported location, the higher the possibility that the reported location is the location of the dwelling point. Therefore, the location point with a high frequency of the same reported location can be determined as the dwelling point. In addition, since the amount of MR data is extremely large, the method of big data statistics can be used to determine the reported location of the maximum order of magnitude.
[0236] like Figure 8 As shown, it shows the reporting positions of each maximum order of magnitude obtained after big data processing. The small dots in the figure represent the reporting positions of each maximum order of magnitude. Take the night sleep time period as an example: take the MR data of the target user from 0:00 to 6:00 every day in the history of a week, group them by [longitude, latitude] (corresponding to the reporting position in the above text), and get multiple groups to be used. Then count the number of the same [longitude, latitude] and sort them from large to small. If the maximum number of the same [longitude, latitude] is m, then int (log 10 m) is the maximum order of magnitude, int(log 10 m) is the threshold, and the groups to be used that meet the condition of "the number of the same [longitude, latitude] > the threshold" are screened out, that is, the reporting positions of the same order of magnitude as the maximum order of magnitude are found to obtain multiple target groups. Since the points with the highest frequency of MR data of the same reporting position and the outliers are most likely the location points of the base station, they need to be eliminated. Therefore, after finding the reporting positions of the maximum order of magnitude, it is also necessary to eliminate the target group corresponding to the reporting position with the highest frequency, and then eliminate the target group corresponding to the outliers to obtain the preferred group. Then, the ratio of the MR data contained in the preferred group to the total number of MR data contained in all preferred groups is used as the weight of the reporting position corresponding to the preferred group, and the weighted sum of the reporting positions corresponding to the multiple preferred groups is performed to obtain the reporting position of the sleep time period residence point (the first residence point).
[0237] Fig. 9 A schematic diagram showing the outliers to be removed is shown in Fig. 9 As shown in the figure, the small dots in the circle are outliers to be removed. The calculation idea of outliers is as follows:
[0238] For each reported position x i Calculate it to the other reported position x j The distance d ij =||x i -x j ||2, then select n x i To other reported location xj The closest distance {d ij1 ,d ij2 ,...,d ijk}, calculate the sum of these distances The mean D i As x i The characteristics of , calculate d i The mean and standard deviation stddev are calculated as follows:
[0239]
[0240]
[0241] Set the distance threshold corresponding to the outlier point:
[0242] threshold=mean+multi×stddev
[0243] Where multi is a positive integer. If d i >threshold description x i is an outlier, if d i ≤threshold means x i Not an outlier.
[0244] The feature d corresponding to each reported position i The value of is considered as Gaussian distribution, and multi is set to 3, that is, some data is forced to be kicked out according to the degree of outliers. Check whether at least one outlier is kicked out. If not, reduce the multi value until at least one outlier is kicked out.
[0245] S603, performing two rounding processes on the MR data of the commuting period;
[0246] Fig.10 The trajectory formed by connecting the MR data of the commuting time period is shown. Since the burrs in the trajectory formed by connecting the reported positions in the MR data of the commuting time period will affect the analysis of the commuting trajectory, the MR data of the commuting time period can be smoothed twice. The process is as follows:
[0247] (1) The first rounding process (corresponding to the first rounding process mentioned above): first calculate the speed corresponding to the reported position in all MR data in the commuting time period, and then remove the MR data corresponding to the reported position with a speed greater than 90m / s. Then, calculate the angles of the line segments connecting the three adjacent reported positions in time sequence, and remove the MR data corresponding to the second reported position among the three reported positions with an angle less than 80 degrees, and then continue the cycle until all reported positions are traversed. The commuting trajectory after the first rounding process is as follows: Fig.11 shown.
[0248] (2) Second smoothing (corresponding to the second smoothing mentioned above): First, calculate the speed corresponding to the reported position in all MR data after the first smoothing, then remove the position points with a speed greater than 90 m / s, respectively calculate the angles of the line segments connecting the three adjacent points in the time sequence, and replace the reported position of the second MR data among the three MR data corresponding to the angle less than 80 degrees with the reported position of the first MR data. Then continue to replace the burr points in a loop until all the reported positions are traversed. Since in the first smoothing, after the burr points and turning points corresponding to the angle less than 80 degrees are removed, new burr points and turning points may still be generated in the trajectory connected to the remaining reported positions, it is necessary to perform a second smoothing on each MR data after the first smoothing. The processing idea of the second smoothing is similar to that of the first smoothing, except that the reported position of the burr point or turning point is replaced with a reported position before the reported position in the time sequence, instead of directly removing the MR data corresponding to the reported position, so as to retain the information such as the reporting timestamp in the MR data. The commuting trajectory after the second rounding process is as follows Fig.12 As shown, Fig.12 The content in the middle circle shows the trajectory after the second rounding process.
[0249] S604, using the road network information to perform bidirectional dual connectivity matching;
[0250] After roughly locating the commuting key point, the first road and the second road that the target user passes through during the commuting process can be determined based on the commuting key point, and then the road network information is used to perform bidirectional dual connectivity matching, that is, matching each road in the road trajectory with the first road and the second road as both ends. The specific implementation process is as follows:
[0251] (1) Determine the first road and the second road: If the time between the two reported positions exceeds 15 minutes, it is considered that the two can be divided into two sections, that is, the road between the two reported positions is not calculated. Since the reported position is not on the road when it just starts, and the direction at this time is unreliable, in this example, the first or second station point is taken as the center, and the earliest reported position in time sequence within a range greater than 2km and less than 3km from the first or second station point (corresponding to the preset radius range in the above text) is found as the actual starting point. Then, the average direction angle and coordinate values of several reported positions (corresponding to the first position point and the second position point in the above text) within 10 meters (corresponding to the preset range in the above text) from the actual starting point are found. Then, using the road network information, the first road that matches the first average direction angle and the first coordinate value corresponding to each first position point, and the second road that matches the second average direction angle and the second coordinate value corresponding to each second position point are found. That is, among the roads included in the road network information, the road with the smallest distance loss between the track formed by the reported position within 10 meters of the first residence point is determined as the first road, and the road with the smallest distance loss between the track formed by the reported position within 10 meters of the second residence point is determined as the second road. At this time, if there is more than one first road or second road with the smallest distance loss, the first road or second road can be a collection of various road IDs.
[0252] The calculation idea of distance loss is as follows: first, calculate the vertical distance from the reported position of the target user to the road, and calculate the direction angle of the road according to the position point of the road (with the north direction as the reference direction); then, calculate the angle between the direction angle corresponding to each reported position and the direction angle of the road; for each reported position, if the speed corresponding to the reported position is less than 1 meter per second, the proportion of the direction angle corresponding to the reported position is 0; if the speed corresponding to the reported position is between 1m / s and 10m / s, as the speed increases, the proportion of the direction angle gradually increases to 0.54; if the speed corresponding to the reported position is greater than 10m / s, the proportion of the direction angle remains unchanged at 0.54. The calculation formula for distance loss is:
[0253]
[0254] Among them, ct is the distance loss, dist is the distance, angle_ratio is the proportion of the direction angle, and diff_angle is the angle between the direction angle of the reported position and the road direction.
[0255] The idea of calculating the direction angle corresponding to the reported position is as follows:
[0256] The north direction is taken as the reference direction, and the counterclockwise angle with the north direction is the direction angle. The direction of increasing north latitude is the positive direction of the x-axis, and the direction of decreasing east longitude is the positive direction of the y-axis. If the longitude of the next two adjacent reported positions in time sequence is equal to that of the previous reported position (that is, the two reported positions are on the x-axis), and the latitude of the next reported position is greater than the latitude of the previous reported position, then the direction angle is 0 degrees. If the latitude of the last reported position is less than the latitude of the first reported position, then the direction angle is 180 degrees.
[0257] like Fig.14A As shown in the figure, if the longitude of the latter reported position is smaller than the longitude of the former reported position, that is, the line segment formed by the two reported positions is on the positive semi-axis of y, then the angle α between the line segment and the x-axis satisfies the formula:
[0258]
[0259] At this time, the angle between the line segment and the positive x-axis (and the angle with due north) β is
[0260]
[0261] Among them, lat end The latitude of the next reported position, lat start The latitude of the last reported position; lon end The longitude of the next reported position, lon end The longitude of the last reported position.
[0262] like Fig. 14B As shown in , if the longitude of the latter reported position is greater than the longitude of the former reported position, and the latitude of the latter reported position is less than the latitude of the first reported position, then the angle between the line segment and the positive x-axis (the angle with due north) is
[0263]
[0264] like Fig. 14C As shown in , if the longitude of the latter reported position is greater than the longitude of the former reported position, and the latitude of the latter reported position is greater than the latitude of the former reported position (in the 4th quadrant), then the angle between the line segment and the positive x-axis (the angle with due north) is
[0265]
[0266] (2) Road network matching: Fig.13As shown, the range between the large circle and the small circle in the figure is the preset radius range for determining the actual starting point. When performing road network matching, bidirectional road matching can be performed according to the direction of the arrow. From the road connected with the front road id in the set of the first road and the back road id in the set of the second road, the front road id and the back road id are determined as the roads in the road trajectory at both ends, thereby constructing at least one road set. That is, first find the road that connects the first and the last successfully matched roads. If it cannot be found, find the road that connects the second and the second to last successfully matched roads, so that all possible matching road sets are obtained.
[0267] S605: Determine the commuting trajectory of the target user.
[0268] The distance between the reported position of the target user and the foot coordinate of the reported position on the trajectory formed by the road set is used to determine the road set with the smallest distance loss among the road sets as the commuting trajectory of the target user.
[0269] Among them, the idea of calculating the perpendicular coordinates and distance loss is as follows:
[0270] like Fig.15A As shown in the figure, assuming that location point 1 and location point 2 are the starting point and the end point of a certain section of the road network, and location point 3 is the reported location of the target user during the commuting period that needs to be matched with the road network, first calculate the distance between the two location points:
[0271] a=Distance(geo2,geo3)
[0272] b=Distance(geo1,geo3)
[0273] c=Distance(geo1,geo2)
[0274] Among them, geo1 is the longitude and latitude of location point 1, geo2 is the longitude and latitude of location point 2, and geo3 is the longitude and latitude of location point 3; Distance is the distance calculation function, a is the distance between location point 2 and location point 3; b is the distance between location point 1 and location point 3; c is the distance between location point 1 and location point 2. Consider geo1 and geo2 as two points on the line y=kx+d, and find the projection point (i.e., vertical point) of geo3 on the line, which is divided into the following six cases:
[0275] Case 1: If Fig. 15B As shown, if an obtuse triangle is formed, the projection point is the one of geo1 and geo2 that is closer to geo3.
[0276] If (a 2 +c 2) 2 , and geo3 is close to geo2, including the case where the point is on the extended line of the line segment, the returned projection point coordinates are the longitude and latitude of location point 2.
[0277] Case 2: If Fig. 15C As shown, if an obtuse triangle is formed, the vertical point is the one of geo1 and geo2 that is closer to geo3.
[0278] If (b 2 +c 2 ) 2 , and geo3 is close to geo1, including the case where the point is on the extended line of the line segment, the returned projection point coordinates are the longitude and latitude of location point 1.
[0279] Case 3: If Fig.15D As shown, if a+b=c, it means that point 3 is on line segment 12, and the longitude and latitude of point 3 are directly returned as the coordinates of the projection point.
[0280] Case 4: If Fig.15E As shown, if the longitudes of location point 1 and location point 2 are the same, the line segment is a vertical line, and the coordinates of the returned projection point are [longitude of location point 1, latitude of location point 3].
[0281] Case 5: If Fig.15F As shown, if the latitudes of location point 1 and location point 2 are the same, the line segment is a horizontal line, and the returned projection point coordinates are [longitude of location point 3, latitude of location point 1].
[0282] Case 6: If Figure 15G As shown, directly find the coordinates of the foot point.
[0283] Assume that a certain directional edge to be matched in the road network is a straight line and satisfies the straight line equation y=ax+b. Since the directional edge is also a set of discrete longitude and latitude points, a certain segment of the edge can be regarded as a straight line. p ,y p ) is the reported position of the user's MR data used to match the road network. The coordinates of the foot point O of the reported position of the target user to the direction edge of the road network are the projection point coordinates. The coordinates of the foot point O are:
[0284]
[0285] Among them, lon is the longitude of the foot of the perpendicular, and lat is the latitude of the foot of the perpendicular. a and b can be determined by any two longitude and latitude points on the straight line. For example, the coordinates of position point 1 [lon1, lat1] and the coordinates of position point 2 [lon2, lat2] on the straight line can be determined: b=lat1-a×lon1.
[0286] Finally, according to the principle of two-way connectivity of the road network and the principle of proximity to the user's trajectory, the set of roads to be matched is obtained, and then the coordinates of the user's original trajectory points are replaced according to the perpendicular coordinates of the road network edge to the user's trajectory points, so as to pull the user's trajectory points back to the road network, and then obtain the user's final commuting trajectory point coordinate set.
[0287] It can be seen that through this solution, with the commuting key point as the center, the MR data within a radius of 2-3km is taken as the starting area for road network matching, and the use of bidirectional connected road network matching can get rid of the influence of the starting point positioning error. In addition, by forcibly removing at least one high-frequency and outlier point, the data of the base station location point can reduce the impact of the commuting point location accuracy on the data. The two-time smoothing process can simply smooth the trajectory with large data volume, obtain the compressed trajectory, and then smooth the newly generated burr points and return points twice to save computing power. In addition, by obtaining the user's commuting trajectory, it can be used to help relevant departments analyze the user's regular routes, time spent, commuting distance and other information for commuting, which is especially beneficial for operators to obtain high-value and high-income routes, focus on resource investment along the route, add base stations, improve network service quality, and generate more revenue. It also provides new data and algorithm support for improving traffic efficiency, and provides data basis for government traffic congestion analysis, congestion relief, and time-space accompanying tracking.
[0288] Corresponding to the above method embodiment, the present invention also provides a commuting trajectory generation device, such as Fig.16 As shown, the device comprises:
[0289] The acquisition module 1610 is used to acquire a plurality of measurement report MR data within a specified historical time period for the target user; wherein the specified historical time period includes a first preset time period representing sleep time, a second preset time period representing work time, and a third preset time period representing commuting time;
[0290] The first determination module 1620 is used to determine the position of a first dwell point by using the MR data belonging to the first preset time period among the multiple MR data, and to determine the position of a second dwell point by using the MR data belonging to the second preset time period among the multiple MR data; wherein the first dwell point represents the dwell point of the target user during sleep time, and the second dwell point represents the dwell point of the target user during work time;
[0291] A second determination module 1630 is used to determine a first road and a second road that the target user passes through during the commuting process based on the location of the first residence point and the location of the second residence point; wherein the first road and the second road are roads at two ends of the commuting trajectory;
[0292] A construction module 1640 is used to construct at least one road set based on the first road and the second road, and the road network information; wherein each road set includes each road in the road trajectory with the first road and the second road as two ends;
[0293] The third determination module 1650 is used to determine the commuting trajectory of the target user based on the distance between the reported position in the MR data belonging to the third preset time period among the multiple MR data and the road trajectory formed by each road set.
[0294] Optionally, the first determining module includes:
[0295] The grouping submodule is used to perform designated grouping processing on the data to be used corresponding to the resident point to be determined, so as to obtain a plurality of groups to be used; wherein, if the resident point is a first resident point, the data to be used is the MR data belonging to the first preset time period, and if the resident point is a second resident point, the data to be used is the MR data belonging to the second preset time period; the designated grouping processing is used to group the MR data containing the same reported position in the data to be used into the same group, and each group to be used corresponds to one reported position;
[0296] A first determination submodule is used to determine, among the multiple groups to be used, an order of magnitude corresponding to the number of MR data included in the target group to be used as the maximum order of magnitude; wherein the target group to be used is the group to be used that includes the largest number of MR data;
[0297] A selection submodule, configured to select a group containing MR data of the largest order of magnitude from the plurality of groups to be used, to obtain a target group;
[0298] The second determination submodule is used to determine the location of the residence point based on the reported location corresponding to the target group.
[0299] Optionally, the first determining module further includes:
[0300] A designated screening submodule is used for performing designated screening on the target groups to obtain preferred groups if there are more than one target groups before the second determination submodule determines the position of the resident point based on the reported position corresponding to the target group, wherein the designated screening is used to eliminate the target group with the largest number of corresponding MR data among the target groups, and / or the target group with the corresponding reported position being an outlier among the target groups;
[0301] The second determining submodule is specifically used for:
[0302] The location of the dwell point is determined based on the reported location corresponding to the preferred group.
[0303] Optionally, the second determining submodule is specifically configured to:
[0304] If the number of the target group is one, the reported position corresponding to the target group is determined as the position of the residence point;
[0305] If the number of the target groups is more than one, based on the number of MR data contained in each target group, a weighted sum is performed on the reported positions corresponding to each target group to obtain the position of the dwell point.
[0306] Optionally, the second determining module includes:
[0307] a third determination submodule, configured to determine each first position point within a preset range from the first dwelling point and each second position point within a preset range from the second dwelling point by using the MR data belonging to a third preset time period among the plurality of MR data;
[0308] A first calculation submodule, used to calculate the first average direction angle and the first coordinate value corresponding to each of the first position points;
[0309] A second calculation submodule, used to calculate the second average direction angle and the second coordinate value corresponding to each second position point;
[0310] The fourth determination submodule is used to determine, based on the road network information, a first road that matches the first average direction angle and the first coordinate value, and a second road that matches the second average direction angle and the second coordinate value.
[0311] Optionally, the third determining submodule is specifically configured to:
[0312] Determine a first endpoint corresponding to the first dwell point and a second endpoint corresponding to the second dwell point by using MR data belonging to a third preset time period among the plurality of MR data; wherein the first endpoint is the earliest position point in time sequence within a preset radius from the first dwell point, and the second endpoint is the earliest position point in time sequence within a preset radius from the second dwell point;
[0313] Determine each first position point within a preset range from the first endpoint, and each second position point within a preset range from the second endpoint.
[0314] Optionally, the third determining module includes:
[0315] A third calculation submodule is used to calculate, for each road set in each road set, a sum of distances between a reported position in each MR data in the MR data of the third preset time period and a vertical point of the reported position on a road track formed by the road set, to obtain a loss distance;
[0316] The fifth determination submodule is used to determine the road set corresponding to the minimum value of the loss distance as the commuting trajectory of the target user.
[0317] Optionally, the device further comprises:
[0318] A preprocessing module is used to perform preprocessing on the multiple MR data to obtain multiple preprocessed MR data before the first determination module uses the MR data belonging to the first preset time period among the multiple MR data to determine the position of the first residence point; wherein the preprocessing is used to eliminate outliers and / or deduplicate data on the multiple MR data.
[0319] Optionally, the device further comprises:
[0320] A smoothing processing module is used to perform smoothing processing on the MR data belonging to the third preset time period among the multiple MR data before the third determination module determines the commuting trajectory of the target user based on the reported position in the MR data belonging to the third preset time period among the multiple MR data and the distance from the road trajectory formed by each road set; wherein the smoothing processing is used to eliminate or modify the MR data corresponding to the specified reporting position in the MR data of the third preset time period, and the specified reporting position is the burr point position in the trajectory connected in time sequence by the reported position in the MR data of the third preset time period.
[0321] Optionally, the smooth processing module includes:
[0322] A first processing submodule is configured to perform a first smoothing process on the MR data belonging to a third preset time period among the plurality of MR data to obtain MR data after the first smoothing process; wherein the first smoothing process is configured to eliminate the MR data corresponding to the designated reporting position;
[0323] The second processing submodule is used to perform a second smoothing process on the MR data after the first smoothing process; wherein the second smoothing process is used to modify the reported position in the MR data after the first smoothing process, and the MR data corresponding to the burr point in the trajectory connected in time sequence.
[0324] Optionally, the first processing submodule is specifically configured to:
[0325] Calculating the velocity corresponding to the reported position in each MR data in the MR data within the third preset time period;
[0326] Eliminate the MR data corresponding to the reported position within the third preset time period and whose speed exceeds the first preset threshold, to obtain the first target data;
[0327] For each of the three MR data adjacent in time sequence in the first target data, calculate the reported positions in the three MR data adjacent in time sequence and the angle of the line segments connected in time sequence;
[0328] If the line segment angle is smaller than a second preset threshold, the second MR data of the three MR data adjacent in time sequence is eliminated to obtain the MR data after the first smoothing process.
[0329] Optionally, the second processing submodule is specifically configured to:
[0330] Calculating the velocity corresponding to the reported position in each MR data in the MR data after the first smoothing process;
[0331] Eliminate the MR data corresponding to the reported position whose speed exceeds the first preset threshold value in the MR data after the first smoothing process, to obtain second target data;
[0332] For each of the three MR data adjacent in time sequence in the second target data, calculate the reported positions in the three MR data adjacent in time sequence and the angle of the line segments connected in time sequence;
[0333] If the line segment angle is less than a second preset threshold, a specified modification is performed on the second MR data among the three adjacent MR data in the time sequence; wherein the specified modification is used to replace the reporting position of the second MR data with the reporting position of the first MR data among the three adjacent MR data in the time sequence.
[0334] The embodiment of the present invention further provides an electronic device, such as Fig.17 As shown, it includes a processor 1701, a communication interface 1702, a memory 1703 and a communication bus 1704, wherein the processor 1701, the communication interface 1702, and the memory 1703 communicate with each other through the communication bus 1704.
[0335] Memory 1703, used for storing computer programs;
[0336] The processor 1701 is used to implement the steps of any of the above-mentioned methods for generating a commuting trajectory when executing the program stored in the memory 1703.
[0337] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0338] The communication interface is used for communication between the above electronic device and other devices.
[0339] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0340] 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, discrete hardware components.
[0341] In another embodiment of the present invention, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned methods for generating a commuting trajectory are performed.
[0342] In another embodiment of the present invention, a computer program product including instructions is provided, which, when executed on a computer, enables the computer to execute any of the above-mentioned methods for generating a commuting trajectory.
[0343] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part 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, the process or function described in the embodiment of the present invention is generated in whole or in part. 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 a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. 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 hard disk Solid State Disk (SSD)), etc.
[0344] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0345] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0346] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.
Claims
1. A method for generating a commuting trajectory, characterized in that: The method comprises: Acquire multiple measurement report MR data within a specified historical time period for the target user; wherein the specified historical time period includes a first preset time period representing sleep time, a second preset time period representing work time, and a third preset time period representing commuting time; Determine the position of a first dwell point by using the MR data belonging to the first preset time period among the multiple MR data, and determine the position of a second dwell point by using the MR data belonging to the second preset time period among the multiple MR data; wherein the first dwell point represents the dwell point of the target user during sleep time, and the second dwell point represents the dwell point of the target user during work time; Based on the position of the first residence point and the position of the second residence point, determining a first road and a second road that the target user passes through during the commuting process; wherein the first road and the second road are roads at two ends of the commuting trajectory; Based on the first road and the second road, and the road network information, at least one road set is constructed; wherein each road set includes each road in a road trajectory having the first road and the second road as two ends; The commuting trajectory of the target user is determined based on the distance between the reported position in the MR data belonging to the third preset time period among the plurality of MR data and the road trajectory formed by each road set.
2. The method according to claim 1, characterized in that A method for determining the position of any one of the first resident point and the second resident point includes: The data to be used corresponding to the resident point to be determined is subjected to designated grouping processing to obtain a plurality of groups to be used; wherein, if the resident point is a first resident point, the data to be used is the MR data belonging to the first preset time period, and if the resident point is a second resident point, the data to be used is the MR data belonging to the second preset time period; the designated grouping processing is used to group the MR data containing the same reported position in the data to be used into the same group, and each group to be used corresponds to one reported position; Determine, among the plurality of groups to be utilized, an order of magnitude corresponding to the number of MR data included in a target group to be utilized as a maximum order of magnitude; wherein the target group to be utilized is the group to be utilized that includes the largest number of MR data; From the plurality of groups to be used, a group including MR data of the largest order of magnitude is selected to obtain a target group; The location of the dwell point is determined based on the reported location corresponding to the target group.
3. The method according to claim 2, characterized in that Before determining the location of the dwell point based on the reported location corresponding to the target group, the method further includes: If the number of the target groups is more than one, the target groups are specified and screened to obtain a preferred group; wherein the specified screening is used to exclude the target group with the largest number of corresponding MR data among the target groups, and / or the target group with the corresponding reported position being an outlier among the target groups; The determining the location of the dwell point based on the reported location corresponding to the target group includes: The location of the dwell point is determined based on the reported location corresponding to the preferred group.
4. The method according to claim 2, characterized in that: The determining the location of the dwell point based on the reported location corresponding to the target group includes: If the number of the target group is one, the reported position corresponding to the target group is determined as the position of the residence point; If the number of the target groups is more than one, based on the number of MR data contained in each target group, a weighted sum is performed on the reported positions corresponding to each target group to obtain the position of the dwell point.
5. The method according to claim 1, characterized in that The determining, based on the position of the first stationary point and the position of the second stationary point, the first road and the second road passed by the target user during the commuting process includes: Determine each first position point within a preset range from the first dwelling point and each second position point within a preset range from the second dwelling point by using the MR data belonging to a third preset time period among the plurality of MR data; Calculating the first average direction angle and the first coordinate value corresponding to each of the first position points; Calculate the second average direction angle and the second coordinate value corresponding to each second position point; Based on the road network information, a first road matching the first average direction angle and the first coordinate value and a second road matching the second average direction angle and the second coordinate value are determined.
6. The method according to claim 5, characterized in that The method of using the MR data belonging to the third preset time period among the plurality of MR data to determine each first position point within a preset range from the first dwelling point and each second position point within a preset range from the second dwelling point includes: Determine a first endpoint corresponding to the first dwell point and a second endpoint corresponding to the second dwell point by using MR data belonging to a third preset time period among the plurality of MR data; wherein the first endpoint is the earliest position point in time sequence within a preset radius from the first dwell point, and the second endpoint is the earliest position point in time sequence within a preset radius from the second dwell point; Determine each first position point within a preset range from the first endpoint, and each second position point within a preset range from the second endpoint.
7. The method according to claim 1, characterized in that The determining the commuting trajectory of the target user based on the distance between the reported position in the MR data belonging to the third preset time period among the plurality of MR data and the road trajectory formed by each road set includes: For each of the road sets, calculating the sum of the distances between the reported position in each MR data in the MR data of the third preset time period and the vertical point of the reported position on the road track formed by the road set to obtain a loss distance; A road set corresponding to the minimum value of the loss distance is determined as the commuting trajectory of the target user.
8. The method according to claim 1, characterized in that Before determining the position of the first dwell point by using the MR data belonging to the first preset time period among the plurality of MR data, the method further includes: The multiple MR data are preprocessed to obtain multiple MR data after preprocessing; wherein the preprocessing is used to remove outliers and / or perform data deduplication processing on the multiple MR data.
9. The method according to claim 1, characterized in that:Before determining the commuting trajectory of the target user based on the distance between the reported position in the MR data belonging to the third preset time period among the plurality of MR data and the road trajectory formed by each road set, the method further includes: The MR data belonging to a third preset time period among the multiple MR data are smoothed; wherein the smoothing is used to remove or modify the MR data corresponding to a specified reporting position in the MR data of the third preset time period, and the specified reporting position is a burr point position in a trajectory connected in time sequence from a reporting position in the MR data of the third preset time period.
10. The method according to claim 9, characterized in that The smoothing of the MR data belonging to the third preset time period among the plurality of MR data includes: Performing a first smoothing process on the MR data belonging to a third preset time period among the plurality of MR data to obtain MR data after the first smoothing process; wherein the first smoothing process is used to eliminate the MR data corresponding to the designated reporting position; The MR data after the first smoothing process is subjected to a second smoothing process; wherein the second smoothing process is used to modify the reported position in the MR data after the first smoothing process, and the MR data corresponding to the burr point in the track connected in time sequence.
11. The method according to claim 10, characterized in that The step of performing a first smoothing process on the MR data belonging to the third preset time period among the plurality of MR data to obtain the MR data after the first smoothing process comprises: Calculating the velocity corresponding to the reported position in each MR data in the MR data within the third preset time period; Eliminate the MR data corresponding to the reported position within the third preset time period and whose speed exceeds the first preset threshold, to obtain the first target data; For each of the three MR data adjacent in time sequence in the first target data, calculate the reported positions in the three MR data adjacent in time sequence and the angle of the line segments connected in time sequence; If the line segment angle is smaller than a second preset threshold, the second MR data of the three MR data adjacent in time sequence is eliminated to obtain the MR data after the first smoothing process.
12. The method according to claim 10, characterized in that The step of performing a second smoothing process on the MR data after the first smoothing process comprises: Calculating the velocity corresponding to the reported position in each MR data in the MR data after the first smoothing process; Eliminate the MR data corresponding to the reported position whose speed exceeds the first preset threshold value in the MR data after the first smoothing process, to obtain second target data; For each of the three MR data adjacent in time sequence in the second target data, calculate the reported positions in the three MR data adjacent in time sequence and the angle of the line segments connected in time sequence; If the line segment angle is less than a second preset threshold, a specified modification is performed on the second MR data among the three adjacent MR data in the time sequence; wherein the specified modification is used to replace the reporting position of the second MR data with the reporting position of the first MR data among the three adjacent MR data in the time sequence.
13. A commuting trajectory generating device, characterized in that: The device comprises: An acquisition module, used to acquire a plurality of measurement report MR data within a specified historical time period for a target user; wherein the specified historical time period includes a first preset time period representing sleep time, a second preset time period representing work time, and a third preset time period representing commuting time; A first determination module is used to determine the position of a first dwell point by using the MR data belonging to the first preset time period among the multiple MR data, and to determine the position of a second dwell point by using the MR data belonging to the second preset time period among the multiple MR data; wherein the first dwell point represents the dwell point of the target user during sleep time, and the second dwell point represents the dwell point of the target user during work time; A second determination module is used to determine a first road and a second road that the target user passes through during commuting based on the location of the first residence point and the location of the second residence point; wherein the first road and the second road are roads at two ends of a commuting trajectory; A construction module, configured to construct at least one road set based on the first road and the second road, and the road network information; wherein each road set includes each road in a road trajectory having the first road and the second road as two ends; The third determination module is used to determine the commuting trajectory of the target user based on the distance between the reported position in the MR data belonging to the third preset time period among the multiple MR data and the road trajectory formed by each road set.
14. 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 through the communication bus; Memory, used to store computer programs; A processor, for implementing the method steps described in any one of claims 1-12 when executing a program stored in a memory.
15. 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 described in any one of claims 1 to 12 are implemented.
