CN114915907B - Method, device, equipment and storage medium for generating commute track - Google Patents
Method, device, equipment and storage medium for generating commute track Download PDFInfo
- Publication number
- CN114915907B CN114915907B CN202210685983.1A CN202210685983A CN114915907B CN 114915907 B CN114915907 B CN 114915907B CN 202210685983 A CN202210685983 A CN 202210685983A CN 114915907 B CN114915907 B CN 114915907B
- Authority
- CN
- China
- Prior art keywords
- data
- point
- road
- time period
- reporting
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 113
- 230000008569 process Effects 0.000 claims abstract description 47
- 238000005259 measurement Methods 0.000 claims abstract description 9
- 238000012545 processing Methods 0.000 claims description 65
- 238000009499 grossing Methods 0.000 claims description 43
- 238000004891 communication Methods 0.000 claims description 21
- 230000006854 communication Effects 0.000 claims description 18
- 238000012216 screening Methods 0.000 claims description 18
- 238000007781 pre-processing Methods 0.000 claims description 14
- 238000004590 computer program Methods 0.000 claims description 11
- 230000036578 sleeping time Effects 0.000 claims description 10
- 230000004622 sleep time Effects 0.000 claims description 9
- 238000012986 modification Methods 0.000 claims description 7
- 230000004048 modification Effects 0.000 claims description 7
- 238000010276 construction Methods 0.000 claims description 3
- 238000013459 approach Methods 0.000 abstract description 2
- 238000010586 diagram Methods 0.000 description 13
- 238000004364 calculation method Methods 0.000 description 8
- 206010034701 Peroneal nerve palsy Diseases 0.000 description 5
- 238000004458 analytical method Methods 0.000 description 5
- 230000009286 beneficial effect Effects 0.000 description 4
- 230000002457 bidirectional effect Effects 0.000 description 4
- 238000011282 treatment Methods 0.000 description 4
- 230000009471 action Effects 0.000 description 3
- 238000012163 sequencing technique Methods 0.000 description 3
- 208000035473 Communicable disease Diseases 0.000 description 2
- 230000002159 abnormal effect Effects 0.000 description 2
- 230000006399 behavior Effects 0.000 description 2
- 230000007175 bidirectional communication Effects 0.000 description 2
- 238000007906 compression Methods 0.000 description 2
- 230000006835 compression Effects 0.000 description 2
- 238000013144 data compression Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 230000005484 gravity Effects 0.000 description 2
- 230000006872 improvement Effects 0.000 description 2
- 208000015181 infectious disease Diseases 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 238000011160 research Methods 0.000 description 2
- 230000007958 sleep Effects 0.000 description 2
- 239000007787 solid Substances 0.000 description 2
- 101100182247 Caenorhabditis elegans lat-1 gene Proteins 0.000 description 1
- 101100182248 Caenorhabditis elegans lat-2 gene Proteins 0.000 description 1
- 101150061388 LON1 gene Proteins 0.000 description 1
- 238000013475 authorization Methods 0.000 description 1
- DMSMPAJRVJJAGA-UHFFFAOYSA-N benzo[d]isothiazol-3-one Chemical compound C1=CC=C2C(=O)NSC2=C1 DMSMPAJRVJJAGA-UHFFFAOYSA-N 0.000 description 1
- 238000004422 calculation algorithm Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000003247 decreasing effect Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000000802 evaporation-induced self-assembly Methods 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 101150004293 lon2 gene Proteins 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
Abstract
The embodiment of the invention provides a method, a device, equipment and a storage medium for generating a commute track, and relates to the technical field of big data. The specific implementation scheme is as follows: acquiring a plurality of measurement report MR data for a specified historical period of time for a target user; determining a position of a first resident point by using the MR data in the first preset time period, and determining a position of a second resident point by using the MR data in the second preset time period; determining a first road and a second road which a target user passes through in the commute process based on the position of the first resident point and the position of the second resident point; constructing at least one road set based on the first road, the second road and the road network information; and determining the commute track of the target user based on the reported position in the MR data of the third preset time period and the distance between the reported position and the road track formed by each road set. It can be seen that with this approach, the user commute trajectory can be generated using MR data.
Description
Technical Field
The present invention relates to the field of big data technologies, and in particular, to a method, an apparatus, a device, and a storage medium for generating a commute track.
Background
The commuting of commuting to work and off duty is the key point of urban traffic, and by obtaining the commuting track of the user of the mobile terminal, track data can be provided for analyzing the user behaviors of related departments when dealing with scenes such as rescue and relief work, infectious disease screening and the like.
Although GPS (Global Positioning System ) positioning data can represent a user's location, the GPS positioning data of a user is difficult to acquire and the data is extremely easy to miss, thus making it difficult to generate a commute track of the user from the GPS positioning data.
The inventor finds in the study that, since the mobile terminal periodically reports MR (measurement report) data to the base station, and the MR data includes information such as a reporting timestamp, a reporting position and the like, and is very easy for an operator to obtain, the MR data can be applied to positioning of a user position. How to generate the commute trajectories of users using MR data is a technical problem to be solved.
Disclosure of Invention
An object of an embodiment of the present invention is to provide a method of generating a commute track for a user using MR data. The specific technical scheme is as follows:
In a first aspect, an embodiment of the present invention provides a method for generating a commute track, where the method includes:
Acquiring a plurality of measurement report MR data for a specified historical period of time for a target user; wherein the specified historical time period comprises a first preset time period representing sleep time, a second preset time period representing working time and a third preset time period representing commute time;
Determining a position of a first resident point by using MR data belonging to the first preset time period in the plurality of MR data, and determining a position of a second resident point by using MR data belonging to the second preset time period in the plurality of MR data; the first resident point represents the resident point of the target user in sleeping time, and the second resident point represents the resident point of the target user in working time;
Determining a first road and a second road through which the target user passes in a commute process based on the position of the first resident point and the position of the second resident point; wherein the first road and the second road are roads at both ends of a commute track;
Constructing at least one road set based on the first road, the second road and road network information; each road set comprises all roads in the road tracks taking the first road and the second road as two ends;
And determining the commute track of the target user based on the distance between the reporting position in the MR data belonging to the third preset time period in the MR data and the road track formed by each road set.
Optionally, the determining manner of the position of any one of the first residence point and the second residence point includes:
Carrying out appointed grouping processing on the data to be utilized corresponding to the residence point to be determined to obtain a plurality of groups to be utilized; if the dwell point is a first dwell point, the data to be utilized is MR data belonging to the first preset time period, and if the dwell point is a second dwell point, the data to be utilized is MR data belonging to the second preset time period; the specified grouping process is used for dividing the MR data containing the same reporting position in the data to be utilized into the same group, and each group to be utilized corresponds to one reporting position;
Determining an order of magnitude corresponding to the number of MR data contained in the target to-be-utilized packet in the plurality of to-be-utilized packets as a maximum number level; wherein the target to-be-utilized packet is the most number of to-be-utilized packets containing MR data;
Selecting a packet with the number of MR data reaching the maximum number level from the plurality of packets to be utilized to obtain a target packet;
And determining the position of the resident point based on the reporting position corresponding to the target packet.
Optionally, before determining the location of the residence point based on the reported location corresponding to the target packet, the method further includes:
If the number of the target packets is more than one, carrying out appointed screening on the target packets to obtain preferable packets; the specified screening is used for eliminating target groups with the largest quantity of corresponding MR data in the target groups, and/or the target groups with the corresponding reporting positions as outliers in the target groups;
The determining the location of the residence point based on the reporting location corresponding to the target packet includes:
and determining the position of the resident point based on the reporting position corresponding to the preferred group.
Optionally, the determining, based on the reported location corresponding to the target packet, the location of the residence point includes:
If the number of the target groups is one, determining the reporting position corresponding to the target groups as the position of the residence point;
and if the number of the target groups is more than one, weighting and summing the reporting positions corresponding to the target groups based on the number of the MR data contained in the target groups to obtain the position of the residence point.
Optionally, the determining the first road and the second road through which the target user passes in the commute process based on the position of the first residence point and the position of the second residence point includes:
Determining each first position point within a preset range from the first resident point and each second position point within the preset range from the second resident point by utilizing the MR data belonging to a third preset time period in the MR data;
Calculating a first average direction angle and a first coordinate value corresponding to each first position point;
Calculating a second average direction angle and a second coordinate value corresponding to each second position point;
based on road network information, a first road matching the first average direction angle and a first coordinate value and a second road matching the second average direction angle and a second coordinate value are determined.
Optionally, the determining, using MR data belonging to a third preset time period from the plurality of MR data, each first location point within a preset range from the first residence point, and each second location point within a preset range from the second residence point includes:
Determining a first endpoint corresponding to the first resident point and a second endpoint corresponding to the second resident point by utilizing MR data belonging to a third preset time period in the MR data; the first endpoint is the earliest position point in time sequence within a preset radius range from the first residence point, and the second endpoint is the earliest position point in time sequence within the preset radius range from the second residence point;
And determining each first position point within a preset range from the first end point and each second position point within the preset range from the second end point.
Optionally, the determining the commute track of the target user based on the distance between the reporting location in the MR data belonging to the third preset time period and the road track formed by each road set in the plurality of MR data includes:
calculating the sum of the reporting position in the MR data in the third preset time period and the distance between the reporting position and the vertical point of the road track formed by the road sets aiming at each road set in the road sets to obtain a loss distance;
And determining a road set corresponding to the minimum value in the loss distance as the commute track of the target user.
Optionally, before determining the position of the first residence point by using MR data belonging to the first preset time period in the plurality of MR data, the method further includes:
Preprocessing the plurality of MR data to obtain preprocessed plurality of MR data; the preprocessing is used for carrying out outlier rejection and/or data deduplication processing on the plurality of MR data.
Optionally, before determining the commute track of the target user based on the distance between the reporting location in the MR data belonging to the third preset time period and the road track formed by each road set in the plurality of MR data, the method further includes:
Performing smoothing processing on MR data belonging to a third preset time period in the plurality of MR data; the smoothing process is used for removing or modifying the MR data corresponding to the appointed reporting position in the MR data of the third preset time period, wherein the appointed reporting position is the reporting position in the MR data of the third preset time period and the burr point position in the track connected in time sequence.
Optionally, the rounding MR data belonging to the third preset time period from the plurality of MR data includes:
Performing first smoothing on the MR data belonging to a third preset time period in the plurality of MR data to obtain MR data after the first smoothing; the first smoothing process is used for eliminating MR data corresponding to the appointed reporting position;
Performing a second rounding process on the MR data after the first rounding process; the second smoothing processing is used for modifying the reporting position in the MR data after the first smoothing processing, and the MR data corresponding to the burr points in the track connected according to the time sequence.
Optionally, the performing the first rounding on the MR data belonging to the third preset time period in the plurality of MR data to obtain the MR data after the first rounding includes:
calculating the corresponding speed of the reporting position in each MR data in the MR data in a third preset time period;
Removing MR data corresponding to a reporting position with the speed exceeding a first preset threshold value in the third preset time period to obtain first target data;
For each time sequence of adjacent 3 MR data in the first target data, calculating reporting positions in the time sequence of adjacent 3 MR data, and connecting line segment included angles according to the time sequence;
And if the included angle of the line segment is smaller than a second preset threshold value, eliminating second MR data in the 3 pieces of MR data adjacent to each other in the time sequence to obtain MR data after the first smooth processing.
Optionally, the performing a second rounding on the MR data after the first rounding includes:
calculating the corresponding speed of the reporting position in each MR data in the MR data after the first smooth processing;
Removing the MR data corresponding to the reporting position with the speed exceeding a first preset threshold value from the MR data after the first smooth processing to obtain second target data;
for each time sequence of adjacent 3 MR data in the second target data, calculating reporting positions in the time sequence of adjacent 3 MR data, and connecting line segment included angles according to the time sequence;
if the line segment included angle is smaller than a second preset threshold value, designating and modifying second MR data in the 3 MR data adjacent to each other on 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 in the 3 MR data adjacent in time sequence.
In a second aspect, an embodiment of the present invention provides a device for generating a commute track, where the device includes:
An acquisition module for acquiring a plurality of measurement report MR data for a specified history period for a target user; wherein the specified historical time period comprises a first preset time period representing sleep time, a second preset time period representing working time and a third preset time period representing commute time;
A first determining module, configured to determine, using MR data belonging to the first preset time period from the plurality of MR data, a position of a first residence point, and determine, using MR data belonging to the second preset time period from the plurality of MR data, a position of a second residence point; the first resident point represents the resident point of the target user in sleeping time, and the second resident point represents the resident point of the target user in working time;
A second determining module, configured to determine a first road and a second road that the target user passes through in a commute process based on the position of the first residence point and the position of the second residence point; wherein the first road and the second road are roads at both ends of a commute track;
The construction module is used for constructing at least one road set based on the first road, the second road and road network information; each road set comprises all roads in the road tracks taking the first road and the second road as two ends;
and a third determining module, configured to determine a commute track of the target user based on a distance between a reporting position in the MR data belonging to the third preset time period and the road track formed by each road set in the plurality of MR data.
Optionally, the first determining module includes:
The grouping sub-module is used for carrying out appointed grouping processing on the data to be utilized corresponding to the residence point to be determined to obtain a plurality of groups to be utilized; if the dwell point is a first dwell point, the data to be utilized is MR data belonging to the first preset time period, and if the dwell point is a second dwell point, the data to be utilized is MR data belonging to the second preset time period; the specified grouping process is used for dividing the MR data containing the same reporting position in the data to be utilized into the same group, and each group to be utilized corresponds to one reporting position;
A first determining submodule, configured to determine an order of magnitude corresponding to a number of MR data included in the target to-be-utilized packet, as a maximum number of stages, from among the plurality of to-be-utilized packets; wherein the target to-be-utilized packet is the most number of to-be-utilized packets containing MR data;
a selecting sub-module, configured to select, from the plurality of packets to be utilized, a packet in which the number of MR data included reaches a maximum number level, to obtain a target packet;
and the second determining submodule is used for determining the position of the residence point based on the reporting position corresponding to the target packet.
Optionally, the first determining module further includes:
The appointed screening sub-module is used for carrying out appointed screening on the target packet if the number of the target packet is more than one before the second determination sub-module determines the position of the residence point based on the reporting position corresponding to the target packet, so as to obtain a preferable packet; the specified screening is used for eliminating target groups with the largest quantity of corresponding MR data in the target groups, and/or the target groups with the corresponding reporting positions as outliers in the target groups;
The second determining sub-module is specifically configured to:
and determining the position of the resident point based on the reporting position corresponding to the preferred group.
Optionally, the second determining submodule is specifically configured to:
If the number of the target groups is one, determining the reporting position corresponding to the target groups as the position of the residence point;
and if the number of the target groups is more than one, weighting and summing the reporting positions corresponding to the target groups based on the number of the MR data contained in the target groups to obtain the position of the residence point.
Optionally, the second determining module includes:
a third determining sub-module, configured to determine, using MR data belonging to a third preset time period from the plurality of MR data, each first location point within a preset range from the first residence point, and each second location point within a preset range from the second residence point;
the first computing sub-module is used for computing a first average direction angle and a first coordinate value corresponding to each first position point;
the second computing sub-module is used for computing a second average direction angle and a second coordinate value corresponding to each second position point;
And the fourth determining submodule is used for determining a first road matched with the first average direction angle and the first coordinate value and a second road matched with the second average direction angle and the second coordinate value based on road network information.
Optionally, the third determining submodule is specifically configured to:
Determining a first endpoint corresponding to the first resident point and a second endpoint corresponding to the second resident point by utilizing MR data belonging to a third preset time period in the MR data; the first endpoint is the earliest position point in time sequence within a preset radius range from the first residence point, and the second endpoint is the earliest position point in time sequence within the preset radius range from the second residence point;
And determining each first position point within a preset range from the first end point and each second position point within the preset range from the second end point.
Optionally, the third determining module includes:
A third calculation sub-module, configured to calculate, for each road set in the road sets, a reporting position in each MR data in the third preset time period, and a sum of distances between the reporting position and a vertical point of the road track formed by the road set, to obtain a loss distance;
and a fifth determining submodule, configured to determine a road set corresponding to a minimum value in the lost distance as a commute track of the target user.
Optionally, the apparatus further comprises:
the preprocessing module is used for preprocessing the plurality of MR data before the first determination module determines the position of the first residence point by utilizing the MR data belonging to the first preset time period in the plurality of MR data so as to obtain a plurality of preprocessed MR data; the preprocessing is used for carrying out outlier rejection and/or data deduplication processing on the plurality of MR data.
Optionally, the apparatus further comprises:
The rounding module is configured to perform rounding processing on MR data belonging to a third preset time period from the plurality of MR data before the third determination module determines the commute track of the target user based on the distance between the reporting position in the MR data belonging to the third preset time period and the road track formed by each road set; the smoothing process is used for removing or modifying the MR data corresponding to the appointed reporting position in the MR data of the third preset time period, wherein the appointed reporting position is the reporting position in the MR data of the third preset time period and the burr point position in the track connected in time sequence.
Optionally, the rounding module includes:
The first processing submodule is used for carrying out first smoothing processing on the MR data belonging to a third preset time period in the plurality of MR data to obtain MR data after the first smoothing processing; the first smoothing process is used for eliminating MR data corresponding to the appointed reporting position;
The second processing sub-module is used for carrying out second smoothing on the MR data subjected to the first smoothing processing; the second smoothing processing is used for modifying the reporting position in the MR data after the first smoothing processing, and the MR data corresponding to the burr points in the track connected according to the time sequence.
Optionally, the first processing sub-module is specifically configured to:
calculating the corresponding speed of the reporting position in each MR data in the MR data in a third preset time period;
Removing MR data corresponding to a reporting position with the speed exceeding a first preset threshold value in the third preset time period to obtain first target data;
For each time sequence of adjacent 3 MR data in the first target data, calculating reporting positions in the time sequence of adjacent 3 MR data, and connecting line segment included angles according to the time sequence;
and if the included angle of the line segment is smaller than a second preset threshold value, eliminating second MR data in the 3 pieces of MR data adjacent to each other in the time sequence to obtain MR data after the first smooth processing.
Optionally, the second processing sub-module is specifically configured to:
calculating the corresponding speed of the reporting position in each MR data in the MR data after the first smooth processing;
Removing the MR data corresponding to the reporting position with the speed exceeding a first preset threshold value from the MR data after the first smooth processing to obtain second target data;
for each time sequence of adjacent 3 MR data in the second target data, calculating reporting positions in the time sequence of adjacent 3 MR data, and connecting line segment included angles according to the time sequence;
if the line segment included angle is smaller than a second preset threshold value, designating and modifying second MR data in the 3 MR data adjacent to each other on 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 in the 3 MR data adjacent in time sequence.
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, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
And the processor is used for realizing the steps of any one of the commute track generating methods when executing the program stored in the memory.
In a fourth aspect, embodiments of the present invention provide a computer readable storage medium having stored therein a computer program which, when executed by a processor, implements the steps of any of the aforementioned commute trajectory generation methods.
The embodiment of the invention has the beneficial effects that:
The method for generating the commute track acquires a plurality of MR data in a specified historical time period aiming at a target user; because the MR data comprise information such as reporting positions, the positions of the first resident points of the target user in sleeping time and the positions of the second resident points of the target user in working time can be determined by utilizing the MR data; then, according to the position of the first resident point and the position of the second resident point, determining a first road and a second road which are passed by a target user in the commute process; constructing at least one road set based on the first road, the second road and road network information; and determining the commute track of the target user based on the distances between the reporting positions in the MR data belonging to the third preset time period in the MR data and the road track formed by each road set. Because the reporting position in the MR data of the third preset time period is each reporting position of the commute time period, the road set which is most matched with the reporting position of the MR data of the third preset time period can be determined by calculating the distance between the reporting position in the MR data of the third preset time period and the road track formed by each road set, and the road set can be determined as the commute track of the target user. Thus, the MR data can be utilized to generate a user's commute track.
Of course, it is not necessary for any one product or method of practicing the invention to achieve all of the advantages set forth above at the same time.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the invention, and other embodiments may be obtained according to these drawings to those skilled in the art.
FIG. 1 is a flowchart of a method for generating a commute track according to an embodiment of the present invention;
FIG. 2 is a flowchart of step S102 in an embodiment of the present invention;
FIG. 3 is a flowchart of step S103 in implementing an embodiment of the present invention;
FIG. 4 is a flowchart illustrating the implementation of step S1031 in an embodiment of the invention;
FIG. 5 is a flow chart of a method of generating a commute trail in the related art;
FIG. 6 is a flowchart of a specific example of a method for generating a commute trail provided by an embodiment of the present invention;
FIG. 7 shows a schematic diagram of a reporting location of MR data;
FIG. 8 illustrates a schematic diagram of a reporting location of a maximum number of levels of MR data;
FIG. 9 shows a schematic diagram of outliers;
FIG. 10 shows a schematic diagram of a trace formed by the connection of MR data for a commute time period;
FIG. 11 shows a schematic diagram of the trajectory after the first rounding process;
FIG. 12 shows a schematic trace after a second rounding process;
FIG. 13 shows a schematic diagram of road network matching;
FIGS. 14A-14C are schematic diagrams showing the direction angle corresponding to the reporting position;
15A-15G illustrate schematic diagrams of determination of drop foot coordinates;
fig. 16 is a schematic structural diagram of a device for generating a commute track according to an embodiment of the present invention;
Fig. 17 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. Based on the embodiments of the present application, all other embodiments obtained by the person skilled in the art based on the present application are included in the scope of protection of the present application.
The inventor finds that, in the research, since the mobile terminal periodically reports MR data to the base station, and the MR data includes information such as a reporting timestamp, a reporting position and the like, and is very easy for an operator to obtain, the MR data can be applied to positioning of a user position. In addition, although the position data in the base station MR data has the problem of inaccurate positioning because the error is larger than that of the GPS positioning data, it is found by statistics that the MR data has road affinity and base station affinity, that is, the position data in the MR data is more prone to fall on the road and at the base station position. Therefore, if the MR data with good position data falling on the road can be utilized, the commute track of the user can be obtained by analyzing the MR data, and further track data can be provided for relevant departments to analyze the user behaviors when dealing with scenes such as rescue and relief work, infectious disease screening and the like.
Based on the above, in order to generate a commute track of a user using MR data, embodiments of the present invention provide a method, apparatus, device, and storage medium for generating a commute track.
Next, a method for generating a commute track provided by the embodiment of the present invention will be described first.
The method for generating the commute track provided by the embodiment of the disclosure can be applied to electronic equipment. In a specific application, the electronic device may be a server or a terminal device, which is reasonable. In practical application, the terminal device may be: smart phones, tablet computers, desktop computers, and the like.
Specifically, the execution subject of the method for generating a commute track may be a device for generating a commute track. For example, when the method for generating a commute track is applied to a terminal device, the means for generating a commute track may be functional software running in the terminal device, for example: commute trajectory generation software. For example, when the method of generating a commute track is applied to a server, the means of generating a commute track may be a computer program running in the server, which computer program may be used to generate a commute track of a user.
The method for generating the commute track provided by the embodiment of the invention can comprise the following steps:
Acquiring a plurality of measurement report MR data for a specified historical period of time for a target user; wherein the specified historical time period comprises a first preset time period representing sleep time, a second preset time period representing working time and a third preset time period representing commute time;
Determining a position of a first resident point by using MR data belonging to the first preset time period in the plurality of MR data, and determining a position of a second resident point by using MR data belonging to the second preset time period in the plurality of MR data; the first resident point represents the resident point of the target user in sleeping time, and the second resident point represents the resident point of the target user in working time;
Determining a first road and a second road through which the target user passes in a commute process based on the position of the first resident point and the position of the second resident point; wherein the first road and the second road are roads at both ends of a commute track;
Constructing at least one road set based on the first road, the second road and road network information; each road set comprises all roads in the road tracks taking the first road and the second road as two ends;
And determining the commute track of the target user based on the distance between the reporting position in the MR data belonging to the third preset time period in the MR data and the road track formed by each road set.
According to the scheme provided by the embodiment of the invention, a plurality of MR data aiming at a target user in a specified historical time period are acquired; because the MR data comprise information such as reporting positions, the positions of the first resident points of the target user in sleeping time and the positions of the second resident points of the target user in working time can be determined by utilizing the MR data; then, according to the position of the first resident point and the position of the second resident point, determining a first road and a second road which are passed by a target user in the commute process; constructing at least one road set based on the first road, the second road and road network information; and determining the commute track of the target user based on the distances between the reporting positions in the MR data belonging to the third preset time period in the MR data and the road track formed by each road set. Because the reporting position in the MR data of the third preset time period is each reporting position of the commute time period, the road set which is most matched with the reporting position of the MR data of the third preset time period can be determined by calculating the distance between the reporting position in the MR data of the third preset time period and the road track formed by each road set, and the road set can be determined as the commute track of the target user. Thus, the MR data can be utilized to generate a user's commute track.
The following describes a method for generating a commute track according to an embodiment of the present invention with reference to the accompanying drawings.
As shown in fig. 1, the method for generating a commute track provided by the embodiment of the present invention may include steps S101 to S105:
S101, acquiring a plurality of measurement report MR data aiming at a target user in a specified historical time period; wherein the specified historical time period comprises a first preset time period representing sleep time, a second preset time period representing working time and a third preset time period representing commute time;
In this embodiment, since the mobile terminal of the target user periodically reports MR data to the base station, when analyzing the commute track of the target user, an acquisition request for the MR data of the target user may be sent to the base station, so that the base station feeds back the MR data to the request end after receiving the request, thereby obtaining the MR data for the target user. And when sending the acquisition request of the MR data aiming at the target user, the request instruction can carry the appointed historical time period so that the base station feeds back a plurality of MR data in the appointed historical time period to the request end, thereby obtaining a plurality of MR data in the appointed historical time period aiming at the target user.
The specified historical time period may be, for example, a last week, a last month, or the like. Illustratively, the first preset time period may be a time period of 0 to 6 hours per day, the second preset time period may be a time period of 9 to 17 hours per day, and the third preset time period may be a time period of 6 to 9 hours per day. It should be noted that, the specified 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 by the embodiment of the present invention.
The MR data may include information such as a reporting time stamp, a reporting position, RSRP (REFERENCE SIGNAL RECEIVING Power, reference signal received Power), and TA (TIMING ADVANCE, time advance). It should be noted that, in this embodiment, the MR data may come from a public data set, or the MR data is acquired through authorization of a corresponding user; moreover, the collection, storage, use, processing and other treatments of the MR data all accord with the regulations of related laws and regulations, and the common-normal welcome is not violated.
S102, determining the position of a first resident point by utilizing the MR data belonging to the first preset time period in the plurality of MR data, and determining the position of a second resident point by utilizing the MR data belonging to the second preset time period in the plurality of MR data; wherein the first resident point represents the resident point of the target user in sleeping time, and the second resident point represents the resident point of the target user in working time;
It will be appreciated that in order to analyze the commute track of the target user, the starting and ending points in the commute track may be determined first. Since the commute track is a track of the target user going from home to company or from company to home, a first resident point characterizing the target user at sleep time and a second resident point characterizing the target user at work time can be used as a starting point or an ending point in the commute track, respectively. And, since the MR data includes information such as the reporting position, the position of the first residence point can be determined by using the MR data belonging to the first preset time period from among the plurality of 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 from among the plurality of MR data. It should be noted that, the first resident point and the second resident point may both be used as a starting point of the commute track, and when the first resident point is the starting point, the second resident point is the ending point; when the second residence point is the starting point, the first residence point is the ending point.
In an exemplary implementation manner, the determining the location of the first residence point may be counting the number of MR data including the same reporting location in the MR data in the first preset period, and determining the reporting location with the largest number as the location of the first residence point. The determining the position of the second residence point may be to count the number of MR data including the same reporting position in the MR data in the second preset period, and determine the reporting position with the largest number as the position of the second residence point.
In addition, since the data size of the MR data is extremely large, the MR data can be further subjected to data compression before the location of the dwell point is determined by using the MR data, so as to reduce the consumption of computing resources. In an implementation, before determining the location of the first residence point, using MR data belonging to the first preset time period from the plurality of MR data, the method further includes: preprocessing the plurality of MR data to obtain preprocessed plurality of MR data; the preprocessing is used for carrying out outlier rejection and/or data deduplication processing on the plurality of MR data.
In this implementation, the plurality of MR data is preprocessed to reject outliers in the MR data and repeated MR data before determining the location of the dwell point using the MR data, thereby achieving data compression. In addition, as the RSRP value in the MR data is smaller, the signal quality of the data is worse, and the signal quality of the MR data with larger TA error in the MR data is worse, in order to ensure the reliability of the MR data, in the preprocessing process, the MR data can be sorted from large to small by the RSRP value so as to reject the MR data after sorting, and then the MR data after sorting is sorted from small to large by the TA error so as to reject the MR data after sorting, thereby realizing the compression of the MR data. Illustratively, the 20% MR data at the end of the ordering may be culled in an order of the RSRP values from large to small, and then the TA error in each MR data is calculated and the TA error is culled from the 20% MR data at the end of the ordering from small to large. The TA error for each MR data is calculated by: TA error = distance between base station location and reporting location of MR data/TA-78.12.
S103, determining a first road and a second road which the target user passes through in the commute process based on the position of the first resident point and the position of the second resident point; wherein the first road and the second road are roads at two ends of the commute track;
In this embodiment, since the commute track of the target user is a track that travels to the other resident point with the first resident point or the second resident point as the starting point, after determining the position of the first resident point and the position of the second resident point in step S102, the first road and the second road that the target user passes through in the commute track can be determined according to the positions of the resident points. The first road and the second road may be determined by using road network information, where the road closest to the first parking point is determined as the first road and the road closest to the second parking point is determined as the second road.
And, in determining the first and second roads, in order to ensure accuracy of the determined first and second roads, the first and second roads may also be determined using MR data within a third preset time period. In an exemplary embodiment, in the MR data in the third preset period, the MR data with the reporting position near the first resident point and the second resident point may be used, the road in the road network information that is most matched with the road track is determined to be the first road according to the road track connected with the reporting position near the first resident point and the reporting position near the first resident point, and the road in the road network information that is most matched with the road track is determined to be the second road according to the road track connected with the reporting position near the second resident point and the reporting position near the second resident point.
S104, constructing at least one road set based on the first road, the second road and road network information; each road set comprises all roads in the road tracks taking the first road and the second road as two ends;
in this embodiment, after determining the first road and the second road at the two ends of the commuting track, road network information may be used to determine each road track using the first road and the second road as the two ends, that is, road network bidirectional dual-communication matching is performed, and each road included in each road track is constructed as a road set. It can be understood that the road network information includes road ids (Identity document, identity numbers) of respective roads, each road id corresponds to a unique road, and at least one road set can be constructed according to the road network information and the first road and the second road, where the road set is a set formed by the road ids.
S105, determining the commute track of the target user based on the reported positions in the MR data belonging to the third preset time period in the MR data and the distance between the reported positions and the road track formed by each road set.
In this embodiment, after at least one road set is constructed in step S104, the corresponding road track in the at least one road set and the road set with the track that is formed by connecting the reporting position in the MR data of the third preset time period according to the time sequence may be determined by using the reporting position in the MR data of the third preset time period, so as to determine the commute track of the target user.
It will be appreciated that there may be a variety of ways to determine the commute trajectory of the target user. In an implementation manner, determining the commute track of the target user based on the distances between the reporting positions in the MR data belonging to the third preset time period and the road track formed by each road set in the plurality of MR data may include steps A1-A2:
a1, calculating the sum of the reporting position in the MR data of the third preset time period and the distance between the reporting position and the vertical point of the road track formed by the road sets aiming at each road set in the road sets to obtain a loss distance; ,
A2, determining a road set corresponding to the minimum value in the loss distance as the commute track of the target user.
It can be understood that, in order to find out the road set that is most matched with the track connected according to the time sequence in the MR data of the third preset time period, the distance between the reporting position in each MR data and the road track formed by the road set in the MR data of the third preset time period can be calculated for each road set. The distance between the reporting position in each MR data and the road track formed by the road set is the distance between the reporting position and the vertical point of the reporting position on the road track. And then, calculating the sum of the distances between the reporting position and the road track in each MR data of the third preset time period to obtain the loss distance. And in each road set, the road set with the smallest calculated loss distance is the road set which is the most matched with the track formed by connecting the reporting positions in the MR data of the third preset time period according to the time sequence, namely the commute track of the target user.
According to the scheme provided by the embodiment of the invention, a plurality of MR data aiming at a target user in a specified historical time period are acquired; because the MR data comprise information such as reporting positions, the positions of the first resident points of the target user in sleeping time and the positions of the second resident points of the target user in working time can be determined by utilizing the MR data; then, according to the position of the first resident point and the position of the second resident point, determining a first road and a second road which are passed by a target user in the commute process; constructing at least one road set based on the first road, the second road and road network information; and determining the commute track of the target user based on the distances between the reporting positions in the MR data belonging to the third preset time period in the MR data and the road track formed by each road set. Because the reporting position in the MR data of the third preset time period is each reporting position of the commute time period, the road set which is most matched with the reporting position of the MR data of the third preset time period can be determined by calculating the distance between the reporting position in the MR data of the third preset time period and the road track formed by each road set, and the road set can be determined as the commute track of the target user. Thus, the MR data can be utilized to generate a user's commute track.
Optionally, in another embodiment of the present invention, as shown in fig. 2, in the step S102, the determining manner of the position of any one of the first residence point and the second residence point may include steps S1021-S1024:
S1021, carrying out specified grouping processing on the data to be utilized corresponding to the residence point to be determined, so as to obtain a plurality of groups to be utilized; if the dwell point is a first dwell point, the data to be utilized is MR data belonging to the first preset time period, and if the dwell point is a second dwell point, the data to be utilized is MR data belonging to the second preset time period; the appointed grouping processing is used for dividing the MR data containing the same reporting position in the data to be utilized into the same group, and each grouping to be utilized corresponds to one reporting position;
In this embodiment, in order to determine the position of the first residence point or the second residence point, the to-be-utilized data corresponding to the residence point to be determined may be subjected to specified grouping processing, so as to divide the MR data including the same reporting position into the same group. For example, for the first residence point, among the MR data in the first preset period, the MR data including the same reporting position may be classified into the same group, for example, the MR data having the reporting position of position a may be classified into the same group, and the MR data having the reporting position of position B may be classified into the same group, so as to obtain a plurality of groups to be utilized; for the second residence point, the MR data including the same reporting position in the MR data within the second preset time period can be divided into the same group, so as to obtain a plurality of groups to be utilized.
S1022, determining an order of magnitude corresponding to the number of MR data contained in the target to-be-utilized packet in the plurality of to-be-utilized packets as a maximum number level; wherein the target to-be-utilized packet is the to-be-utilized packet containing the largest amount of MR data;
Illustratively, if the target to-be-utilized packet is to contain m MR data, m being a positive integer, the maximum number level is int (log 10 m), where int is an integer type. Illustratively, if the target to-be-utilized packet contains 5500 MR data, the 5500 corresponding order of magnitude is 10 3, then the maximum number of orders of magnitude is 10 3.
S1023, selecting a packet with the quantity of the MR data reaching the maximum quantity level from the plurality of packets to be utilized to obtain a target packet;
It can be understood that, since the dwell point is a point characterizing dwell information, and the mobile terminal periodically reports MR data to the base station, the greater the number of MR data containing the same reporting location, the higher the likelihood that the reporting location is the location of the dwell point. Therefore, the to-be-utilized packet with the largest order of magnitude containing the same reporting position can be determined as the target packet, so that the position of the residence point is determined according to the reporting position corresponding to the target packet.
S1024, determining the position of the residence point based on the reporting position corresponding to the target packet.
It will be appreciated that the determining the location of the residence point may be various based on the reporting location corresponding to the target packet, and in an implementation, the determining the location of the residence point based on the reporting location corresponding to the target packet may include steps B1-B2:
b1, if the number of the target groups is one, determining the reporting position corresponding to the target groups as the position of the residence point;
It can be understood that since each packet includes MR data having the same reporting position, each packet corresponds to a reporting position, and if the number of target packets is one, the reporting position corresponding to the target packet can be determined as the position of the residence point.
And B2, if the number of the target packets is more than one, weighting and summing the reporting positions corresponding to the target packets based on the number of the MR data contained in the target packets to obtain the position of the residence point.
If the number of the target packets is more than one, the weight of the reporting position corresponding to each target packet can be determined according to the number of the MR data contained in each target packet, and then the reporting positions corresponding to each target packet are weighted and summed to obtain the position of the residence point. For example, the weight of the reporting location corresponding to each target packet may be a ratio of the number of MR data contained in the target packet to the total number of MR data contained in all target packets. For example, if the number of target packets is 3, it is a packet, B packet, and C packet, respectively. Wherein, the A grouping comprises 3000 MR data, and the reporting position corresponding to the A grouping is [ longitude 1, latitude 1]; the B group contains 5000 pieces of MR data, and the reporting position corresponding to the B group is [ longitude 2, latitude 2]; the C group contains 2000 pieces of MR data, and the reporting position corresponding to the C group is [ longitude 3, latitude 3]. The weight corresponding to the packet a is 0.3, the weight corresponding to the packet b is 0.5, the weight corresponding to the packet c is 0.2, and the location of the dwell point is [0.3×1+0.5×2+0.2× 3,0.3 ×1+0.5×2+0.2×3].
Therefore, according to the scheme, the data size of the MR data is extremely large, the same reporting position of the maximum number level in the MR data is determined to be the position of the resident point, and compared with the method of determining the position of the resident point by adopting a clustering method to GPS positioning data in the prior art, the accuracy of the position of the resident point obtained by the scheme is higher because the resident point is inaccurate due to the fact that the GPS positioning data is extremely easy to be lost.
Optionally, in another embodiment of the present invention, based on the embodiment shown in fig. 2, before determining the location of the residence point in step S1024 based on the reported location corresponding to the target packet, the method further includes:
If the number of the target packets is more than one, carrying out appointed screening on the target packets to obtain preferable packets; the specified screening is used for eliminating target groups with the largest quantity of corresponding MR data in the target groups, and/or the target groups with the corresponding reporting positions as outliers in the target groups;
It can be appreciated that, since MR data has base station affinity, the reported position corresponding to the target packet determined by the above method is most likely the position of the base station, and determining the position of the base station as the position of the dwell point may cause the position of the dwell point to be inaccurate, thereby generating an inaccurate commute track. Therefore, in order to determine the location of the more accurate residence point, in this embodiment, before determining the location of the residence point based on the reported location corresponding to the target packet, the target packet may be subjected to specified screening.
Because the position point with the highest occurrence frequency of the same reporting position in the MR data and the position point with the reporting position being the outlier point are the position points of the base station, the probability is high, so the position points need to be removed. Namely, eliminating the target packet with the largest quantity of the corresponding MR data in the target packet, and/or eliminating the target packet with the corresponding reporting position as the outlier in the target packet, so as to ensure that the target packet corresponding to the base station position in the target packet is eliminated, thereby obtaining the preferable packet.
For example, the outliers may be determined by calculating, for each reported location in the MR data, its distance to other reported locations, then selecting a number of nearest distances to other reported locations, and calculating the sum of these distances. Because the points inside the community are closer, the points outside the community are sparser, and the distances from the outlier to other reporting positions are obviously larger than the distances from the outlier to the points inside the community, so that the outlier can be determined by comparing the sum of the distances from each reporting position to a plurality of nearest other reporting positions.
Accordingly, in this embodiment, the determining the location of the residence point based on the reporting location corresponding to the target packet includes:
and determining the position of the resident point based on the reporting position corresponding to the preferred group.
It can be understood that, because the preferred packet is a packet with the base station location removed, a more accurate location of the residence point can be determined based on the reporting location corresponding to the preferred packet. In addition, the manner of determining the location of the residence point based on the reporting location corresponding to the preferred packet is similar to the content of step S1024, and will not be described again here.
Therefore, through the scheme, the target packet is subjected to specified screening, and the target packet corresponding to the base station position in the target packet can be removed. Therefore, the position of the resident point is determined based on the reporting position corresponding to the preferred grouping obtained after the specified screening, and the more accurate position of the resident point can be determined.
Optionally, in another embodiment of the present invention, as shown in fig. 3, in the step S103, determining the first road and the second road through which the target user passes in the commute process based on the position of the first residence point and the position of the second residence point may include steps S1031 to S1034:
s1031, determining each first position point within a preset range from the first resident point and each second position point within a preset range from the second resident point by utilizing the MR data belonging to a third preset time period in the plurality of MR data;
the preset range may be, for example, within 10 meters, within 20 meters, etc. It should be noted that the preset range may be determined by the relevant staff member according to experience, which is not limited by the embodiment of the present invention. For example, if the preset range is within 10 meters, a plurality of reporting positions within 10 meters from the first residence point may be determined as each first position point, and a plurality of reporting positions within 10 meters from the second residence point may be determined as each second position point. It can be understood that, since the road closest to the first resident point is determined as the first road, the road closest to the second resident point is determined as the second road with low accuracy according to the positions of the first resident point and the second resident point, and the reported position points near the resident point can be connected in time series to form a section of commute track, the first road and the second road can be determined by using the first position points within the preset range from the first resident point and the second position points within the preset range from the second resident point.
S1032, calculating a first average direction angle and a first coordinate value corresponding to each first position point;
In this embodiment, the first coordinate value corresponding to each first position point is the coordinate value of the reporting position of the first position point. The first average direction angle corresponding to each first position point is an average value of the direction angles corresponding to each first position point. For example, for each first location point, an angle between a straight line determined by the first location point and a first location point adjacent in time sequence and a north direction may be determined as a direction angle corresponding to the first location point.
S1033, calculating a second average direction angle and a second coordinate value corresponding to each second position point;
In this embodiment, the manner of calculating the second average direction angle and the second coordinate value corresponding to each second position point is similar to that of calculating the first average direction angle and the first coordinate value corresponding to each first position point, and will not be described herein.
S1034, based on the road network information, determining 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.
It will be appreciated that, since the direction angle at the time of starting is not reliable, the MR data of the third preset time period may be used to determine a plurality of first location points and second location points, so as to calculate the first average direction angle and the first coordinate value corresponding to each first location point, and the second average direction angle and the second coordinate value corresponding to each second location point. And searching a first road matched with the first average direction angle and the first coordinate value and a second road matched with the second average direction angle and the second coordinate value by using road network information, so as to determine the first road and the second road with higher reliability. The first road matching the first average direction angle and the first coordinate value may be a road with the first average direction angle closest to the direction angle of the road and the first coordinate value having the smallest distance from the road in the road network information; the second road matching the second mean square angle and the second coordinate value may be a road having the closest second mean square angle to the direction angle of the road and the smallest distance between the second coordinate value and the road in the road network information.
In addition, 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 according to the road network information, the first road or the second road may be a set of a plurality of roads.
Therefore, through the scheme, the first road and the second road with higher reliability can be determined.
Alternatively, in another embodiment of the present invention, as shown in fig. 4, in the step S1031, determining each first location point within the preset range from the first dwell point and each second location point within the preset range from the second dwell point by using MR data belonging to the third preset time period from the plurality of MR data may include S401 to S402:
S401, determining a first endpoint corresponding to the first resident point and a second endpoint corresponding to the second resident point by utilizing MR data belonging to a third preset time period in the MR data; the first end point is the earliest position point in time sequence within a preset radius range from the first residence point, and the second end point is the earliest position point in time sequence within the preset radius range from the second residence point;
It can be understood that when the stay point is taken as the starting point or the ending point, since the stay point is not located on the road, the reliability of the first road and the second road is determined by directly using the coordinate values and the average direction angles of each first position point in the preset range of the first stay point and each second position point in the preset range of the second stay point. Considering that the target user starts from the residence point in the commuting process and moves on the road after a period of time, the position point on the road is used as the starting point to analyze the commuting track, and the commuting track with higher accuracy can be obtained. Therefore, in this embodiment, first, a first endpoint corresponding to the first residence point and a second endpoint corresponding to the second residence point are determined, where the first endpoint and the second endpoint are respectively earliest in time sequence within a preset radius range from the first residence point and the second residence point. It will be appreciated that the first and second endpoints are location points on the road, considering that the target user will travel to the road from the point of residence over time during the commute.
The preset radius range may be, for example, a range between 2km and 3km from the dwell point. It should be noted that, the preset radius range may be set by the related staff, and the embodiment of the present invention is not limited to the specific preset radius range.
S402, determining each first position point in the preset range from the first end point and each second position point in the preset range from the second end point.
In this embodiment, the manner of determining each first location point within the preset range of the first endpoint and each second location point within the preset range of the second endpoint may be similar to the content of step S1031, and will not be repeated here.
It can be seen that, with the present solution, since the first end point and the second end point are location points on the road, the respective first location point and second location point are determined based on the first end point and the second end point, i.e. the first end point or the second end point is taken as an actual starting point. The position points on the road are used as actual starting points to analyze the commute track, and then the more accurate first road and the more accurate second road can be obtained, so that the more accurate commute track is generated.
Optionally, in another embodiment of the present invention, before determining the commute track of the target user in step S105 based on the distance between the reported positions in the MR data belonging to the third preset time period and the road track formed by each road set in the plurality of MR data and the road track in the embodiment shown in fig. 1, the method further includes:
Performing smoothing processing on MR data belonging to a third preset time period in the plurality of MR data; the smoothing process is used for removing or modifying MR data corresponding to a designated reporting position in the MR data of the third preset time period, wherein the designated reporting position is a reporting position in the MR data of the third preset time period and a burr point position in a track connected according to a time sequence.
It can be understood that, because the burr points in the track formed by connecting the reporting positions in the MR data affect the analysis of the commute track, in this embodiment, before the reporting positions in the MR data in the third preset time period are utilized, the MR data in the third preset time period may be rounded to eliminate or modify the reporting positions in the MR data in the third preset time period and the burr point positions in the track formed by connecting the reporting positions in time sequence.
Optionally, in an implementation manner, the rounding processing of the MR data belonging to the third preset time period in the plurality of MR data may include steps C1-C2:
C1, performing first smoothing on MR data belonging to a third preset time period in the plurality of MR data to obtain MR data after the first smoothing; the first round processing is used for eliminating MR data corresponding to the appointed reporting position;
In an exemplary implementation manner, the first rounding process is performed on the MR data belonging to the third preset time period in the plurality of MR data to obtain the MR data after the first rounding process, which may include steps a11-a14:
c11, calculating the corresponding speed of the reporting position in each MR data in the MR data in a third preset time period;
in this implementation manner, the speed corresponding to the reporting position in each MR data may be calculated according to the distance and the time difference between the reporting position and the adjacent reporting position. For example, for the reporting position a earlier in time sequence and the reporting position B adjacent to the reporting position a in time sequence, if the distance between the reporting position a and the reporting position B is 5 meters and the time difference between the reporting time stamps in the MR data corresponding to the reporting position a and the reporting position B is 5s, the speed corresponding to the reporting position a is 1m/s. It should be noted that, the speed corresponding to the reporting position in each MR data may also be obtained by calculating in other manners, for example, according to the sequence of the reporting time stamps corresponding to the reporting positions, the speed corresponding to the reporting position is calculated by the distance and the time difference between the reporting positions before and after the reporting position in the sequence of the reporting positions, and the calculation manner of the speed corresponding to the reporting position in each MR data is not limited in the embodiment of the present invention.
C12, eliminating the MR data corresponding to the reporting position with the speed exceeding the first preset threshold value in the third preset time period to obtain first target data;
It can be understood that the first preset threshold may be a threshold representing a speed exceeding a normal commute speed, and MR data corresponding to a reporting position with the speed exceeding the first preset threshold is removed, so that it can be ensured that each MR data in the obtained first target data is the MR data with the normal reporting position. By way of example, the first preset threshold may be 90m/s, it being understood that since the speed of 90m/s is close to the speed of high-speed rail, while normal commute uses little high-speed rail commute, MR data corresponding to reporting positions having speeds exceeding the 90m/s may be culled. In addition, it should be noted that the first preset threshold may be set by the relevant staff according to experience, which is not limited in the embodiment of the present invention.
C13, calculating reporting positions in the 3 adjacent MR data according to the time sequence aiming at the 3 adjacent MR data in each time sequence in the first target data, and connecting line segment included angles according to the time sequence;
It can be understood that, because the included angle between the burr point and the line segment connected to the adjacent reporting position on the time sequence is smaller, in order to reject the MR data corresponding to the burr point in the first target data, the included angle between the line segment connected to the adjacent reporting position in each of the 3 MR data on the time sequence in the first target data can be calculated.
In addition, if the time interval between the reporting time stamps of the first MR data and the third MR data is larger, for example, the time interval exceeds 15 minutes, at this time, the reporting positions of the first MR data and the third MR data may be determined as two tracks, and at this time, the line segment included angle where the adjacent three MR data are connected in time is not calculated.
And C14, if the included angle of the line segment is smaller than a second preset threshold value, eliminating second MR data in the 3 pieces of MR data adjacent to each other on the time sequence to obtain first rounded MR data.
By way of example, the second preset threshold may be 10 degrees, 20 degrees, etc. It should be noted that the second preset threshold may be set according to experience of the related staff, which is not limited in the embodiment of the present invention. It can be understood that if the reporting position of the adjacent 3 MR data at the time sequence is smaller than the second preset threshold, the reporting position of the second MR data in the adjacent 3 MR data is considered as the burr point position, and the second MR data in the adjacent 3 MR data is removed at this time.
C2, performing a second rounding process on the MR data after the first rounding process; the second smoothing process is used for modifying the report position in the MR data after the first smoothing process, and the MR data corresponding to the burr points in the track connected according to the time sequence.
It can be appreciated that, since new burr points may be generated after the first rounding, in order to ensure the accuracy of the subsequently obtained commute track, the embodiment of the present invention further performs the second rounding on the MR data after the first rounding.
For example, in a specific implementation, performing the second rounding on the MR data after the first rounding may include steps C21-C24:
C21, calculating the corresponding speed of the reporting position in each MR data in the MR data after the first smooth processing;
c22, eliminating the MR data corresponding to the reporting position with the speed exceeding a first preset threshold value in the MR data after the first smooth processing to obtain second target data;
C23, calculating reporting positions in the adjacent 3 MR data according to the line segment included angles connected according to the time sequence aiming at the adjacent 3 MR data in each time sequence in the second target data;
It should be noted that the implementation of the steps C21-C23 may be similar to the steps C11-C13 described above, and will not be repeated here.
C24, if the line segment included angle is smaller than a second preset threshold value, performing appointed modification on the second MR data in the 3 MR data adjacent to each other on 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 in the time-series adjacent 3 MR data.
It can be understood that if the reporting position in the 3 adjacent MR data at the time sequence is smaller than the second preset threshold, the reporting position of the second MR data in the 3 adjacent MR data is considered as the burr point position, and at this time, the second MR data in the 3 adjacent MR data can be designated and modified, that is, the reporting position in the second MR data is modified to the reporting position in the first MR data, so as to retain the information such as the timestamp in the second MR data.
Therefore, according to the scheme, before the report position in the MR data of the third preset time period is utilized, the MR data of the third preset time period is subjected to smooth processing so as to eliminate or modify the MR data with the report position of the MR data of the third preset time period as the burr point. Therefore, the influence of the burr points on the commute track analysis can be reduced, and the follow-up MR data after the smooth processing can be utilized to generate more accurate commute tracks.
For a better understanding of the embodiments of the present invention, the following description is provided in connection with a specific example.
Fig. 5 illustrates a flow chart of a method of generating a commute trail in the related art. As shown in fig. 5, the method comprises the following steps: s501, GPS positioning data of a target user is obtained and preprocessed; the preprocessing may be removing an abnormal value in the GPS positioning data; s502, clustering position points of resident point areas in GPS positioning data to obtain commute key points; s503, carrying out unidirectional connection matching of the road network by utilizing the road network information and the commute key points; s504 obtains the commute trajectory of the target user. However, because the acquisition difficulty of GPS positioning data is high and the data is extremely easy to lose, accurate commute key points are difficult to acquire through clustering. Therefore, the accuracy of the obtained commute track is not high after the road network unidirectional connection matching is carried out by utilizing the road network information and the commute key points subsequently.
The inventor finds that, in the research, since the mobile terminal periodically reports MR data to the base station, and the MR data includes information such as a reporting timestamp, a reporting position and the like, and is very easy for an operator to obtain, the MR data can be applied to positioning of a user position. Moreover, since the data volume of the MR data is extremely large, the analysis of the commute track is not affected even if part of the MR data is lost, and therefore, the embodiment of the invention provides a method for generating the commute track of the user by using the MR data.
Fig. 6 is a flowchart of a specific example of a method for generating a commute track according to an embodiment of the present invention. As shown in fig. 6, the method comprises the following steps:
S601, MR data of a target user in a week of history is obtained, and the MR data is preprocessed;
As shown in fig. 7, a diagram of the obtained reporting positions of MR data of the target user in a history of one week is shown, and each dot in the diagram represents the reporting position of each MR data. In this example, the content of the MR data may include a reporting timestamp, longitude and latitude (corresponding to the reporting position above), TA, RSRP, and the like, and for example, the data format of the MR data may be as shown in the following table:
The pretreatment process can be as follows: firstly, eliminating abnormal values of MR data, and carrying out data deduplication processing according to the same reporting time stamp and the same longitude and latitude. And then, calculating a TA error, using the RSRP value and the TA error as sequencing keywords at the same time, sequencing from large to small according to the RSRP value, sequencing from small to large according to the TA error value, and rejecting 20% of MR data at the end to realize the compression of 80% of data volume.
S602, obtaining coarse positioning commute key points (corresponding to the first resident point and the second resident point) with errors by using a big data statistics method;
MR data of the target user in the history for one week is divided into MR data of a sleep period, MR data of a work period, and MR data of a commute period. Since the dwell point is a point representing dwell information, and the mobile terminal periodically reports MR data to the base station, the greater the number of MR data including the same reporting position, the higher the likelihood that the reporting position is the position of the dwell point. Therefore, the location point where the same reporting location appears frequently can be determined as the stay point. And, because the data volume of MR data is very big, consequently, can utilize the method of big data statistics, confirm the reporting position of maximum number level.
As shown in fig. 8, after the big data processing, the obtained reporting positions of the maximum number of levels are shown, and each small dot in the graph represents each reporting position of the maximum number of levels. Taking the evening sleep period as an example: and taking MR data of 0-6 points daily in a week of the history of the target user, and grouping according to [ longitude, latitude ] (corresponding to the reporting position above) to obtain a plurality of groups to be utilized. The number of identical longitudes, latitudes is then counted and ordered from large to small. If the maximum value of the number of the same [ longitude, latitude ] is m, taking int (log 10 m) as the maximum number level, taking int (log 10 m) as a threshold, screening out the packets to be utilized meeting the condition that the number of the same [ longitude, latitude ] is greater than the threshold, namely finding out the reporting positions with the same order of magnitude as the maximum number level, and obtaining a plurality of target packets. Since the point with the highest occurrence frequency of the MR data in the same reporting position and the position point with the high probability of the outlier are the position points of the base station, the MR data need to be removed, and therefore, after each reporting position with the maximum number of levels is found, the target group corresponding to the reporting position with the highest occurrence frequency needs to be removed, and then the target group corresponding to the outlier is removed, so that the preferred group is obtained. And then taking the ratio of the total quantity of the MR data contained in the preferable groups to the total quantity of the MR data contained in all the preferable groups as the weight of the reporting positions corresponding to the preferable groups, and carrying out weighted summation on the reporting positions corresponding to the preferable groups to obtain the reporting positions of the residence point (first residence point) in the sleep time period.
Fig. 9 shows a schematic diagram of outliers to be eliminated, and as shown in fig. 9, small dots in circles are outliers to be eliminated. The calculating thinking of the outlier is as follows:
For each reported position x i, calculating its distance d ij=||xi-xj||2 to other reported positions x j, then selecting the nearest distances { d ij1,dij2,...,dijk } of n x i to other reported positions x j, and calculating the sum of these distances Mean of (2)Taking d i as the characteristic of x i, calculating the mean and standard deviation stddev of d i, wherein the calculation formula is as follows:
Setting a distance threshold value threshold corresponding to the outlier:
threshold=mean+multi×stddev
Wherein, multi is positive integer. If d i > threshold indicates that x i is an outlier, if d i ++threshold indicates that x i is not an outlier.
Taking the value of the characteristic d i corresponding to each reporting position as Gaussian distribution, taking the multi value 3, namely forcibly kicking off part of data according to the outlier degree. Checking whether at least one outlier is kicked off, and if not reducing the multi value until at least one outlier is kicked off.
S603, performing two-time smoothing on MR data in a commute time period;
fig. 10 shows a trace formed by the connection of MR data of a commute time period. Since the burr points in the track formed by connecting the reporting positions in the MR data of the commute time period affect the analysis of the commute track, the MR data of the commute time period can be rounded twice. The process is as follows:
(1) First round-off (corresponding to the first round-off above): firstly, calculating the speed corresponding to the reporting position in all MR data in the commute time period, and then removing the MR data corresponding to the reporting position with the speed greater than 90 m/s. And then, respectively calculating the included angles of line segments connected with the adjacent 3 reporting positions on the time sequence, eliminating the MR data corresponding to the second reporting position in the three reporting positions, wherein the included angles are smaller than 80 degrees, and then continuing to circulate until all the reporting positions are traversed. The commute track after the first round of rounding is shown in fig. 11.
(2) Second round-off treatment (corresponding to the second round-off treatment above): calculating the corresponding speeds of the reporting positions in all MR data after the first round smoothing treatment, removing the position points with the speeds greater than 90m/s, respectively calculating the included angles of line segments connected with adjacent 3 points in time sequence, and replacing the reporting position of the second MR data in the three MR data with the reporting position of the first MR data, wherein the included angles are smaller than 80 degrees. And then, continuously circularly replacing the burr points until all the reported positions are traversed. Since new burr points and return points are still likely to be generated in the tracks connected with the rest of reporting positions after the burr points and return points corresponding to the included angle smaller than 80 degrees are removed during the first round of smoothing, the second round of smoothing is needed for each MR data after the first round of smoothing, and the second round of smoothing is similar to the first round of smoothing in processing thinking, except that the reporting position of the burr points or the return points is replaced by a reporting position before the reporting position in time sequence, instead of directly removing the MR data corresponding to the reporting position, so as to preserve the information such as reporting time stamps in the MR data. The commute track after the second rounding is shown in fig. 12, and the track after the second rounding is shown in the circle in fig. 12.
S604, performing bidirectional double-communication matching by using road network information;
after the commute key points are roughly positioned, a first road and a second road which are passed by a target user in the commute process can be determined according to the commute key points, and then bidirectional double-communication matching is carried out by utilizing road network information, namely, each road in the road tracks with the first road and the second road as two ends is matched. The specific implementation process is as follows:
(1) Determining a first road and a second road: if the time of the front and rear reporting positions exceeds 15 minutes, the front and rear can be considered to be divided into two sections of tracks, namely, the road passing between the two reporting positions is not calculated. Because the reporting position is not on the road when the vehicle starts and the direction at the moment is not credible, the first residence point or the second residence point is taken as the center in the example, and the earliest reporting position in time sequence within the range (corresponding to the preset radius range) from the first residence point or the second residence point more than 2km to less than 3km is found out and used 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 hereinabove) within 10 meters from the actual start point (corresponding to the preset range hereinabove) are found. Then, a first road matching the first average direction angle and the first coordinate value corresponding to each first position point and a second road matching the second average direction angle and the second coordinate value corresponding to each second position point are found by using the road network information. The road with the smallest distance loss between the road and the track formed by the reporting position within 10 meters of the first resident point is determined as the first road, and the road with the smallest distance loss between the road and the track formed by the reporting position within 10 meters of the second resident 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 may be a set of respective road ids.
The calculation thought of the distance loss is as follows: firstly, calculating the vertical distance from the reporting position of a target user to a road, and calculating the direction angle (taking the north direction as the reference direction) of the road according to the position point of the road; then, calculating the included angle between the direction angle corresponding to each reporting position and the direction angle of the road; for each reporting position, if the speed corresponding to the reporting position is less than 1m/s, the proportion of the direction angle corresponding to the reporting position is 0; if the corresponding speed of the reporting position is between 1m/s and 10m/s, the proportion of the direction angle gradually increases to 0.54 along with the increase of the speed; if the corresponding speed of the reporting position is greater than 10m/s, the specific gravity of the direction angle is kept to be 0.54. The calculation formula of the distance loss is:
Where ct is distance loss, dist is distance, angle_ratio is the specific gravity of the direction angle, and diff_angle is the angle between the direction angle of the reporting position and the road direction.
The thought of calculating the direction angle corresponding to the reporting position is as follows:
The north direction is taken as a reference direction, and the anticlockwise included angle with the north direction is taken as a direction angle. The direction of increasing the latitude of the north latitude is the positive direction of the x axis, the direction of decreasing the longitude of the east is the positive direction of the y axis, and if the longitude of the next reporting position is equal to the longitude of the previous reporting position (namely, the two reporting positions are on the x axis) in the time sequence, the angle of the direction is 0 degree, and the latitude of the last reporting position is smaller than the latitude of the first reporting position, the angle of the direction is 180 degrees.
As shown in fig. 14A, if the longitude of the last reported position is smaller than the longitude of the previous reported position, that is, the line segment formed by the two reported positions is at the positive half axis of y, the angle α between the line segment and the x axis satisfies the formula:
at this time, the included angle (the included angle with the positive north) beta between the line segment and the positive half axis of x is
Wherein lat end is the latitude of the later reported position, and lat start is the latitude of the former reported position; lon end is the longitude of the last reported position, and lon end is the longitude of the previous reported position.
As shown in fig. 14B, if the longitude of the next reported position is greater than the longitude of the previous reported position and the latitude of the next reported position is less than the latitude of the first reported position, the angle between the line segment and the positive x-half axis (the positive north angle) is
As shown in fig. 14C, if the longitude of the next reported position is greater than the longitude of the previous reported position and the latitude of the next reported position is greater than the latitude of the previous reported position (in quadrant 4), the angle between the line segment and the positive x-half axis (the positive north angle) is
(2) Road network matching: as shown in fig. 13, the range between the large circle and the small circle in the figure is a preset radius range for determining the actual starting point. When road network matching is performed, bidirectional road matching can be performed according to the arrow direction. And determining the forefront road id and the rearmost road id as each road in the road tracks at two ends from the roads communicated with the forefront road id in the first road set and the rearmost road id in the second road set, thereby constructing at least one road set. That is, the first and last successfully matched paths are found, and if not, the second and second last successfully matched paths are found, so that all the road sets which are possibly matched are obtained.
S605, determining the commute track of the target user.
And determining a road set with the minimum distance loss in each road set as the commute track of the target user by utilizing the distance between the reporting position of the target user and the drop coordinates of the reporting position on the track formed by the road sets.
The thinking of calculating the drop foot coordinates and the distance loss is as follows:
As shown in fig. 15A, assuming that the position point 1 and the position point 2 are a start point and an end point of a certain section of a road in a road network, the position point 3 is a reporting position of a target user in a commute period, where road network matching needs to be performed, and a distance between every two position points is calculated first:
a=Distance(geo2,geo3)
b=Distance(geo1,geo3)
c=Distance(geo1,geo2)
Wherein geo1 is the latitude and longitude of the position point 1, geo2 is the latitude and longitude of the position point 2, and geo3 is the latitude and longitude of the position point 3; distance is a Distance calculation function, and a is the Distance between the position point 2 and the position point 3; b is the distance between position point 1 and position point 3; c is the distance between position point 1 and position point 2. Regarding geo1 and geo2 as two points on the straight line y=kx+d, the projection point (i.e., the vertical point) of geo3 on the straight line is calculated, and the following six cases are divided:
case one: as shown in fig. 15B, if an obtuse triangle is formed, the proxel takes the one of geo1, geo2 that is close to geo 3.
If (a 2+c2)<b2, and geo3 is close to geo2, including the case where the point is on the line segment extension, the coordinates of the projected point are returned as the latitude and longitude of location point 2.
And a second case: as shown in fig. 15C, if an obtuse triangle is formed, the vertical point takes the one of geo1, geo2 that is close to geo 3.
If (b 2+c2)<a2, and geo3 is close to geo1, including the case where the point is on the line segment extension, the coordinates of the projected point are returned as the latitude and longitude of location point 1.
And a third case: as shown in fig. 15D, if a+b=c, it is explained that the point 3 is on the line segment 12, and the projected point coordinates are directly returned as the longitude and latitude of the point 3.
Case four: as shown in fig. 15E, if the longitudes of the position point 1 and the position point 2 are the same, the line segment is a vertical line, and the return projection point coordinates are [ longitude of the position point 1, latitude of the position point 3 ].
Case five: as shown in fig. 15F, if the latitudes of the position point 1 and the position point 2 are the same, the line segment is a horizontal line, and the return projection point coordinates are [ the longitude of the position point 3, the latitude of the position point 1 ].
Case six: as shown in fig. 15G, the foot drop coordinates are directly obtained.
The side of a certain to-be-matched strip direction in the road network is a straight line, and the straight line equation y=ax+b is satisfied, and because the side of the strip direction is also a set of discrete longitude and latitude points, a certain section of the side can be regarded as a straight line. The other point P (x p,yp) is the reporting location of MR data for the user of the matching road network. The coordinates of the drop foot point O from the reported position of the target user to the direction edge of the road network are the coordinates of the projection point, and the coordinates of the drop foot point O are as follows:
Wherein lon foot drop is the longitude of the foot drop, lat foot drop is the latitude of the foot drop; a and b may be determined by any two latitude and longitude points on the line, for example, by the coordinates of location point 1 [ lon1, lat1] and location point 2 [ lon2, lat2] on the line: b=lat1-a×lon1。
Finally, a road set to be matched is obtained according to a road network bi-directional communication principle and a user track distance approach principle, then the original track point coordinates of the user are replaced according to the foot coordinates of the track points of the user on the road network side, the user track points are pulled back to the road network, and the final commute track point coordinate set of the user is obtained.
Therefore, through the scheme, MR data of 2-3km is taken as a road network matching initial area by taking the commuting key point as the circle center, and the influence of initial point positioning errors can be eliminated by adopting bidirectional communication road network matching. And at least one high-frequency and outlier point is forcedly removed, so that the data of the parent base station position point can be reduced to influence the accuracy of the commute point, the track with large data quantity can be simply and smoothly processed by two times of smooth processing, the compressed track is obtained, and the newly generated burr point and the return point are processed by two times of smooth processing, so that the calculation force is saved. In addition, the method can be used for helping related departments analyze the information of the conventional routes, the consumed time, the commuting distance and the like of the users on duty and off duty by obtaining the commuting track of the users, is particularly beneficial to operators to obtain high-value and high-income routes, and is beneficial to the increase of base stations and the improvement of network service quality and more beneficial to the creation of income along the routes to put resources into force. And new data and algorithm support are provided for improving traffic efficiency, and data basis is provided for government traffic congestion analysis, congestion relief and space-time accompanying tracking.
Correspondingly, the embodiment of the method also provides a device for generating the commute track, as shown in fig. 16, wherein the device comprises:
An acquisition module 1610 configured to acquire a plurality of measurement report MR data for a specified history period for a target user; wherein the specified historical time period comprises a first preset time period representing sleep time, a second preset time period representing working time and a third preset time period representing commute time;
A first determining module 1620 configured to determine, using MR data belonging to the first preset time period from the plurality of MR data, a position of a first residence point, and determine, using MR data belonging to the second preset time period from the plurality of MR data, a position of a second residence point; the first resident point represents the resident point of the target user in sleeping time, and the second resident point represents the resident point of the target user in working time;
A second determining module 1630, configured to determine a first road and a second road that the target user passes through in a commute 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 both ends of a commute track;
a construction module 1640 for constructing at least one set of roads based on the first and second roads and road network information; each road set comprises all roads in the road tracks taking the first road and the second road as two ends;
a third determining module 1650, configured to determine a commute track of the target user based on a distance between a reporting location in the MR data belonging to the third preset time period and the road track formed by each road set in the plurality of MR data.
Optionally, the first determining module includes:
The grouping sub-module is used for carrying out appointed grouping processing on the data to be utilized corresponding to the residence point to be determined to obtain a plurality of groups to be utilized; if the dwell point is a first dwell point, the data to be utilized is MR data belonging to the first preset time period, and if the dwell point is a second dwell point, the data to be utilized is MR data belonging to the second preset time period; the specified grouping process is used for dividing the MR data containing the same reporting position in the data to be utilized into the same group, and each group to be utilized corresponds to one reporting position;
A first determining submodule, configured to determine an order of magnitude corresponding to a number of MR data included in the target to-be-utilized packet, as a maximum number of stages, from among the plurality of to-be-utilized packets; wherein the target to-be-utilized packet is the most number of to-be-utilized packets containing MR data;
a selecting sub-module, configured to select, from the plurality of packets to be utilized, a packet in which the number of MR data included reaches a maximum number level, to obtain a target packet;
and the second determining submodule is used for determining the position of the residence point based on the reporting position corresponding to the target packet.
Optionally, the first determining module further includes:
The appointed screening sub-module is used for carrying out appointed screening on the target packet if the number of the target packet is more than one before the second determination sub-module determines the position of the residence point based on the reporting position corresponding to the target packet, so as to obtain a preferable packet; the specified screening is used for eliminating target groups with the largest quantity of corresponding MR data in the target groups, and/or the target groups with the corresponding reporting positions as outliers in the target groups;
The second determining sub-module is specifically configured to:
and determining the position of the resident point based on the reporting position corresponding to the preferred group.
Optionally, the second determining submodule is specifically configured to:
If the number of the target groups is one, determining the reporting position corresponding to the target groups as the position of the residence point;
and if the number of the target groups is more than one, weighting and summing the reporting positions corresponding to the target groups based on the number of the MR data contained in the target groups to obtain the position of the residence point.
Optionally, the second determining module includes:
a third determining sub-module, configured to determine, using MR data belonging to a third preset time period from the plurality of MR data, each first location point within a preset range from the first residence point, and each second location point within a preset range from the second residence point;
the first computing sub-module is used for computing a first average direction angle and a first coordinate value corresponding to each first position point;
the second computing sub-module is used for computing a second average direction angle and a second coordinate value corresponding to each second position point;
And the fourth determining submodule is used for determining a first road matched with the first average direction angle and the first coordinate value and a second road matched with the second average direction angle and the second coordinate value based on road network information.
Optionally, the third determining submodule is specifically configured to:
Determining a first endpoint corresponding to the first resident point and a second endpoint corresponding to the second resident point by utilizing MR data belonging to a third preset time period in the MR data; the first endpoint is the earliest position point in time sequence within a preset radius range from the first residence point, and the second endpoint is the earliest position point in time sequence within the preset radius range from the second residence point;
And determining each first position point within a preset range from the first end point and each second position point within the preset range from the second end point.
Optionally, the third determining module includes:
A third calculation sub-module, configured to calculate, for each road set in the road sets, a reporting position in each MR data in the third preset time period, and a sum of distances between the reporting position and a vertical point of the road track formed by the road set, to obtain a loss distance;
and a fifth determining submodule, configured to determine a road set corresponding to a minimum value in the lost distance as a commute track of the target user.
Optionally, the apparatus further comprises:
the preprocessing module is used for preprocessing the plurality of MR data before the first determination module determines the position of the first residence point by utilizing the MR data belonging to the first preset time period in the plurality of MR data so as to obtain a plurality of preprocessed MR data; the preprocessing is used for carrying out outlier rejection and/or data deduplication processing on the plurality of MR data.
Optionally, the apparatus further comprises:
The rounding module is configured to perform rounding processing on MR data belonging to a third preset time period from the plurality of MR data before the third determination module determines the commute track of the target user based on the distance between the reporting position in the MR data belonging to the third preset time period and the road track formed by each road set; the smoothing process is used for removing or modifying the MR data corresponding to the appointed reporting position in the MR data of the third preset time period, wherein the appointed reporting position is the reporting position in the MR data of the third preset time period and the burr point position in the track connected in time sequence.
Optionally, the rounding module includes:
The first processing submodule is used for carrying out first smoothing processing on the MR data belonging to a third preset time period in the plurality of MR data to obtain MR data after the first smoothing processing; the first smoothing process is used for eliminating MR data corresponding to the appointed reporting position;
The second processing sub-module is used for carrying out second smoothing on the MR data subjected to the first smoothing processing; the second smoothing processing is used for modifying the reporting position in the MR data after the first smoothing processing, and the MR data corresponding to the burr points in the track connected according to the time sequence.
Optionally, the first processing sub-module is specifically configured to:
calculating the corresponding speed of the reporting position in each MR data in the MR data in a third preset time period;
Removing MR data corresponding to a reporting position with the speed exceeding a first preset threshold value in the third preset time period to obtain first target data;
For each time sequence of adjacent 3 MR data in the first target data, calculating reporting positions in the time sequence of adjacent 3 MR data, and connecting line segment included angles according to the time sequence;
and if the included angle of the line segment is smaller than a second preset threshold value, eliminating second MR data in the 3 pieces of MR data adjacent to each other in the time sequence to obtain MR data after the first smooth processing.
Optionally, the second processing sub-module is specifically configured to:
calculating the corresponding speed of the reporting position in each MR data in the MR data after the first smooth processing;
Removing the MR data corresponding to the reporting position with the speed exceeding a first preset threshold value from the MR data after the first smooth processing to obtain second target data;
for each time sequence of adjacent 3 MR data in the second target data, calculating reporting positions in the time sequence of adjacent 3 MR data, and connecting line segment included angles according to the time sequence;
if the line segment included angle is smaller than a second preset threshold value, designating and modifying second MR data in the 3 MR data adjacent to each other on 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 in the 3 MR data adjacent in time sequence.
The embodiment of the present invention further provides an electronic device, as shown in fig. 17, including a processor 1701, a communication interface 1702, a memory 1703 and a communication bus 1704, where the processor 1701, the communication interface 1702, the memory 1703 complete communication with each other through the communication bus 1704,
A memory 1703 for storing a computer program;
The processor 1701 is configured to implement any of the steps of the aforementioned method for generating a commute trail when executing the program stored in the memory 1703.
The communication bus mentioned above for the electronic device may be a peripheral component interconnect standard (PERIPHERAL COMPONENT INTERCONNECT, PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, etc. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface is used for communication between the electronic device and other devices.
The Memory may include random access Memory (Random Access Memory, RAM) or may include Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; but may also be a digital signal Processor (DIGITAL SIGNAL Processor, DSP), application SPECIFIC INTEGRATED Circuit (ASIC), field-Programmable gate array (Field-Programmable GATE ARRAY, FPGA) or other Programmable logic device, discrete gate or transistor logic device, discrete hardware components.
In a further embodiment of the present invention, there is also provided a computer readable storage medium having stored therein a computer program which, when executed by a processor, performs the steps of the method of generating a commute trail as described in any one of the above.
In yet another embodiment of the present invention, a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of generating a commute trail as described in any of the above is also provided.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may 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 loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present invention, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, 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 may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk Solid STATE DISK (SSD)), etc.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for the device embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description of the method embodiments in part.
The foregoing description is only of the preferred embodiments of the present invention and is not intended to limit the 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 (15)
1.A method of generating a commute trail, the method comprising:
Acquiring a plurality of measurement report MR data for a specified historical period of time for a target user; wherein the specified historical time period comprises a first preset time period representing sleep time, a second preset time period representing working time and a third preset time period representing commute time;
Determining a position of a first resident point by using MR data belonging to the first preset time period in the plurality of MR data, and determining a position of a second resident point by using MR data belonging to the second preset time period in the plurality of MR data; the first resident point represents the resident point of the target user in sleeping time, and the second resident point represents the resident point of the target user in working time;
Determining a first road and a second road through which the target user passes in a commute process based on the position of the first resident point and the position of the second resident point; wherein the first road and the second road are roads at both ends of a commute track;
Constructing at least one road set based on the first road, the second road and road network information; each road set comprises all roads in the road tracks taking the first road and the second road as two ends;
And determining the commute track of the target user based on the distance between the reporting position in the MR data belonging to the third preset time period in the MR data and the road track formed by each road set.
2. The method of claim 1, wherein the determining the location of any one of the first residence point and the second residence point comprises:
Carrying out appointed grouping processing on the data to be utilized corresponding to the residence point to be determined to obtain a plurality of groups to be utilized; if the dwell point is a first dwell point, the data to be utilized is MR data belonging to the first preset time period, and if the dwell point is a second dwell point, the data to be utilized is MR data belonging to the second preset time period; the specified grouping process is used for dividing the MR data containing the same reporting position in the data to be utilized into the same group, and each group to be utilized corresponds to one reporting position;
Determining an order of magnitude corresponding to the number of MR data contained in the target to-be-utilized packet in the plurality of to-be-utilized packets as a maximum number level; wherein the target to-be-utilized packet is the most number of to-be-utilized packets containing MR data;
Selecting a packet with the number of MR data reaching the maximum number level from the plurality of packets to be utilized to obtain a target packet;
And determining the position of the resident point based on the reporting position corresponding to the target packet.
3. The method of claim 2, wherein before determining the location of the residence point based on the reported location corresponding to the target packet, the method further comprises:
if the number of the target packets is more than one, carrying out appointed screening on the target packets to obtain preferable packets; the specified screening is used for eliminating target groups with the largest quantity of corresponding MR data in the target groups, and/or the target groups with the corresponding reporting positions as outliers in the target groups;
The determining the location of the residence point based on the reporting location corresponding to the target packet includes:
and determining the position of the resident point based on the reporting position corresponding to the preferred group.
4. The method of claim 2, wherein determining the location of the residence point based on the reported location corresponding to the target packet comprises:
If the number of the target groups is one, determining the reporting position corresponding to the target groups as the position of the residence point;
and if the number of the target groups is more than one, weighting and summing the reporting positions corresponding to the target groups based on the number of the MR data contained in the target groups to obtain the position of the residence point.
5. The method of claim 1, wherein the determining the first and second roads traversed by the target user during commuting based on the location of the first residence and the location of the second residence comprises:
Determining each first position point within a preset range from the first resident point and each second position point within the preset range from the second resident point by utilizing the MR data belonging to a third preset time period in the MR data;
Calculating a first average direction angle and a first coordinate value corresponding to each first position point;
Calculating a second average direction angle and a second coordinate value corresponding to each second position point;
based on road network information, a first road matching the first average direction angle and a first coordinate value and a second road matching the second average direction angle and a second coordinate value are determined.
6. The method of claim 5, wherein determining each first location point within a predetermined range from the first dwell point and each second location point within a predetermined range from the second dwell point using MR data belonging to a third predetermined time period from among the plurality of MR data, comprises:
Determining a first endpoint corresponding to the first resident point and a second endpoint corresponding to the second resident point by utilizing MR data belonging to a third preset time period in the MR data; the first endpoint is the earliest position point in time sequence within a preset radius range from the first residence point, and the second endpoint is the earliest position point in time sequence within the preset radius range from the second residence point;
And determining each first position point within a preset range from the first end point and each second position point within the preset range from the second end point.
7. The method of claim 1, wherein the determining the commute trajectory of the target user based on the distance from the road trajectory formed by each road set from the reporting locations in the MR data belonging to the third preset time period among the plurality of MR data comprises:
calculating the sum of the reporting position in the MR data in the third preset time period and the distance between the reporting position and the vertical point of the road track formed by the road sets aiming at each road set in the road sets to obtain a loss distance;
And determining a road set corresponding to the minimum value in the loss distance as the commute track of the target user.
8. The method of claim 1, wherein the determining the location of the first dwell point using MR data belonging to the first predetermined time period from the plurality of MR data further comprises:
Preprocessing the plurality of MR data to obtain preprocessed plurality of MR data; the preprocessing is used for carrying out outlier rejection and/or data deduplication processing on the plurality of MR data.
9. The method of claim 1, wherein prior to determining the commute trajectory of the target user based on the reported locations in the MR data belonging to the third preset time period among the plurality of MR data and the distance from the road trajectory formed by each road set, the method further comprises:
Performing smoothing processing on MR data belonging to a third preset time period in the plurality of MR data; the smoothing process is used for removing or modifying the MR data corresponding to the appointed reporting position in the MR data of the third preset time period, wherein the appointed reporting position is the reporting position in the MR data of the third preset time period and the burr point position in the track connected in time sequence.
10. The method of claim 9, wherein the rounding MR data belonging to a third predetermined period of time among the plurality of MR data, comprises:
Performing first smoothing on the MR data belonging to a third preset time period in the plurality of MR data to obtain MR data after the first smoothing; the first smoothing process is used for eliminating MR data corresponding to the appointed reporting position;
Performing a second rounding process on the MR data after the first rounding process; the second smoothing processing is used for modifying the reporting position in the MR data after the first smoothing processing, and the MR data corresponding to the burr points in the track connected according to the time sequence.
11. The method of claim 10, wherein the performing the first rounding on the MR data belonging to the third predetermined period of time in the plurality of MR data to obtain the first rounded MR data comprises:
calculating the corresponding speed of the reporting position in each MR data in the MR data in a third preset time period;
Removing MR data corresponding to a reporting position with the speed exceeding a first preset threshold value in the third preset time period to obtain first target data;
for each time sequence of adjacent 3 MR data in the first target data, calculating reporting positions in the time sequence of adjacent 3 MR data, and connecting line segment included angles according to the time sequence;
and if the included angle of the line segment is smaller than a second preset threshold value, eliminating second MR data in the 3 pieces of MR data adjacent to each other in the time sequence to obtain MR data after the first smooth processing.
12. The method of claim 10, wherein the performing a second rounding of the first rounded MR data comprises:
calculating the corresponding speed of the reporting position in each MR data in the MR data after the first smooth processing;
Removing MR data corresponding to a reporting position with the speed exceeding a first preset threshold value from the MR data after the first smooth processing to obtain second target data;
for each time sequence of adjacent 3 MR data in the second target data, calculating reporting positions in the time sequence of adjacent 3 MR data, and connecting line segment included angles according to the time sequence;
if the line segment included angle is smaller than a second preset threshold value, designating and modifying second MR data in the 3 MR data adjacent to each other on 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 in the 3 MR data adjacent in time sequence.
13. A device for generating a commute trail, the device comprising:
An acquisition module for acquiring a plurality of measurement report MR data for a specified history period for a target user; wherein the specified historical time period comprises a first preset time period representing sleep time, a second preset time period representing working time and a third preset time period representing commute time;
A first determining module, configured to determine, using MR data belonging to the first preset time period from the plurality of MR data, a position of a first residence point, and determine, using MR data belonging to the second preset time period from the plurality of MR data, a position of a second residence point; the first resident point represents the resident point of the target user in sleeping time, and the second resident point represents the resident point of the target user in working time;
A second determining module, configured to determine a first road and a second road that the target user passes through in a commute process based on the position of the first residence point and the position of the second residence point; wherein the first road and the second road are roads at both ends of a commute track;
The construction module is used for constructing at least one road set based on the first road, the second road and road network information; each road set comprises all roads in the road tracks taking the first road and the second road as two ends;
and a third determining module, configured to determine a commute track of the target user based on a distance between a reporting position in the MR data belonging to the third preset time period and the road track formed by each road set in the plurality of MR data.
14. The electronic equipment is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
a memory for storing a computer program;
a processor for carrying out the method steps of any one of claims 1-12 when executing a program stored on a memory.
15. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored therein a computer program which, when executed by a processor, implements the method steps of any of claims 1-12.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210685983.1A CN114915907B (en) | 2022-06-16 | Method, device, equipment and storage medium for generating commute track |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210685983.1A CN114915907B (en) | 2022-06-16 | Method, device, equipment and storage medium for generating commute track |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114915907A CN114915907A (en) | 2022-08-16 |
CN114915907B true CN114915907B (en) | 2024-11-12 |
Family
ID=
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112579915A (en) * | 2021-02-26 | 2021-03-30 | 深圳市城市交通规划设计研究中心股份有限公司 | Analysis method and device for trip chain |
CN113627669A (en) * | 2021-08-10 | 2021-11-09 | 中国联合网络通信集团有限公司 | Traffic route optimization processing method, device and equipment |
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112579915A (en) * | 2021-02-26 | 2021-03-30 | 深圳市城市交通规划设计研究中心股份有限公司 | Analysis method and device for trip chain |
CN113627669A (en) * | 2021-08-10 | 2021-11-09 | 中国联合网络通信集团有限公司 | Traffic route optimization processing method, device and equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109934265B (en) | Method and device for determining address of ordinary station | |
CN104185275B (en) | A kind of indoor orientation method based on WLAN | |
WO2020215783A1 (en) | Locating method and apparatus, and storage medium | |
US20140258281A1 (en) | Method And Server For Searching For Nearby User In Social Networking Services | |
CN109523819B (en) | Passenger IC card data and station matching method based on bus arrival and departure | |
CN108768695B (en) | KQI problem positioning method and device | |
CN110991525B (en) | Accompanying pattern matching method based on operator track data | |
CN105120433A (en) | WLAN indoor positioning method based on continuous sampling and fuzzy clustering | |
CN111460508B (en) | Track data protection method based on differential privacy technology | |
CN104793224A (en) | GPS positioning rectification method and device | |
CN112579718B (en) | Urban land function identification method and device and terminal equipment | |
CN111176953B (en) | Abnormality detection and model training method, computer equipment and storage medium | |
CN111078818B (en) | Address analysis method and device, electronic equipment and storage medium | |
CN110162997B (en) | Anonymous privacy protection method based on interpolation points | |
CN113239089B (en) | Path identification method, path identification device, electronic device, storage medium, and program product | |
CN111046895A (en) | Method and device for determining target area | |
CN109246728B (en) | Method and device for identifying coverage abnormal cell | |
CN116168222A (en) | Track recognition method and device, storage medium and electronic equipment | |
CN111507479A (en) | Feature binning method, device, equipment and computer-readable storage medium | |
CN114817328A (en) | Water area data processing method, device and system | |
CN111783107B (en) | Multi-source trusted data access method, device and equipment | |
CN114915907B (en) | Method, device, equipment and storage medium for generating commute track | |
CN110956800B (en) | Road section traffic data preprocessing method and device and electronic equipment | |
CN114915907A (en) | Commuting track generation method, device, equipment and storage medium | |
CN112468546B (en) | Account position determining method, device, server and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant |