Route recommendation method based on double-tower latent semantic model

Through the route recommendation method based on the Twin Towers latent semantic model, combined with trajectory route segmentation and characteristics of travelers and road sections, the problem of data sparseness and dynamic traffic not considered in the existing technology is solved, and efficient route recommendation is achieved, which is in line with travelers. individual needs.

CN119357458AActive Publication Date: 2025-01-24NANTONG UNIV
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202311777765.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-21
Publication Date
2025-01-24
Estimated Expiration
2043-12-21

AI Technical Summary

Technical Problem

The existing route recommendation methods have challenges in terms of sparse data, determining significant preference attributes and not considering dynamic traffic, making it difficult to effectively recommend routes that meet travelers' preferences.

Method used

Adopt a way to recommend a route based on the dual -tower hidden language model, to divide the road network through the trajectory route, reduce the scale of the road network, combine the category characteristics and hidden characteristics in the score of the passengers, the road section, During the planning, the traffic characteristics of peaks, flat peaks, and low peak hours are considered.

Benefits of technology

It significantly reduces the dimension of the road section scoring matrix, solves the problem of data sparseness, effectively identifies traveler preference attributes, and provides dynamic optimal travel route recommendations that meet the personalized needs of travelers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119357458A_ABST
    Figure CN119357458A_ABST
Patent Text Reader

Abstract

The invention provides a route recommendation method based on a double-tower latent semantic model, and belongs to the technical field of route recommendation. The technical problems of data sparsity, difficulty in determination of traveler preference and scene dependence in personalized route recommendation are solved. According to the technical scheme, the method comprises the steps that S1, attributes, travel tracks and scores of travelers and road section attribute data are obtained; s2, segmenting a road network according to the track route; s3, using a double-tower latent semantic model to respectively recommend road sections in peak, flat and low peak periods; and S4, recommending an optimal travel route according to the travel starting point, the travel ending point and the travel time given by the traveler. The method has the advantages that traffic characteristics of different time periods are combined, hidden characteristics of travelers, category characteristics of the travelers, hidden characteristics of road sections and category characteristics of the road sections are comprehensively considered, and therefore personalized route recommendation service is provided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of route recommendation, and in particular to a route recommendation method based on a double-tower latent semantic model. Background Art

[0002] At present, the route recommendation methods that consider travelers' preferences mainly use the following three recommendation methods: the first method is to pre-classify travelers into several categories and formulate different recommendation rules for different categories, such as Knowledge-based topic retrieval for recommendations and tourism promotions; the second method is to recommend routes based on travelers' preferences by recommending usage scenarios, such as A hybrid ensemble learning method for tourist route recommendations based on geo-tagged social networks; the third method is to use clustering methods, either clustering according to the characteristics of the places visited by travelers, or clustering travelers with the same characteristics and making recommendations based on similarity, such as A personalized POI route recommendation system based on heterogeneous tourism data and sequential pattern mining.

[0003] However, incorporating traveler preferences into route recommendations encounters the following difficulties: (1) Data sparsity: In the article A hybrid ensemble learning method for tourist route recommendations based on geo-tagged social networks, travelers are pre-classified into several categories and different recommendation rules are formulated for different categories. However, there is still a lack of new traveler data and a lack of preferences. (2) Challenges in identifying significant preference attributes: The article A travel route recommendation algorithm based on interest theme and distance matching considers interest themes and distance as traveler preference attributes, and the article Strategic Transit Route Recommendation Considering Multi-Trip Feature Desirability Using Logit Model with Optimal Travel Time Analysis considers time. However, it is still difficult to efficiently identify the attributes that are significantly related to traveler preferences and meet the research purpose from among the many attributes. (3) Dynamic traffic is not considered: Route selection behavior is not only related to the conditions of the road section itself, but also to the road conditions of the associated sections. The article A double fusion joint learning method for driving trajectory representation proposes a multimodal fusion model to study the complexity and uncertainty problems in trajectories. However, it does not take into account the dynamic traffic characteristics of the road section. Since the traffic conditions of the road section during peak, off-peak and low-peak periods are significantly different, different travelers have different preferences. Summary of the invention

[0004] The purpose of the present invention is to provide a route recommendation method based on a twin-tower latent semantic model, which uses trajectory routes to segment the road network and calculates the road segment score based on the trajectory score to reduce the scale of the road network and solve the data sparsity problem; combines the category characteristics of travelers and road segments with the hidden features in the score, and uses the twin-tower latent semantic model to predict the travelers' score for the road segment.

[0005] In order to achieve the above-mentioned invention object, the technical solution adopted by the present invention is specifically: a route recommendation method based on a double-tower latent semantic model, comprising the following steps:

[0006] Step S1, obtaining the attributes, travel trajectory and rating, and road segment attribute data of the traveler;

[0007] Step S2, segmenting the road network according to the trajectory;

[0008] Step S3, using the double-tower latent semantic model to recommend road sections during peak, off-peak, and low-peak hours respectively;

[0009] Step S4, recommending the best travel route based on the travel start and end points and time given by the traveler.

[0010] Preferably, in step S2, the specific process of segmenting the road network according to the trajectory is:

[0011] Step S21, obtaining the trajectories of all travelers, sampling the positioning points at equal intervals to form a sample point set S, and calculating the similarity distance matrix;

[0012] Step S22, setting the neighborhood cutoff distance d c , calculate the local density ρ of the sample i , the calculation formula is:

[0013]

[0014] Among them, d ij is the distance between sample point i and sample point j,

[0015] Step S22, relative distance δ between samples i The calculation formula is:

[0016]

[0017] Among them, δ i For sample x i The distance to the sample closest to itself that has a larger local density than itself;

[0018] Step S23, draw a decision diagram and mark the density peak as the cluster center;

[0019] Step S24, assigning the non-clustered data point to the class where the sample with the largest local density than itself and closest to it is located;

[0020] Step S25, according to the intersection of the clustering results, the road network is divided into a number of road sections, wherein each category corresponds to a road section, forming a road section set I.

[0021] Step S26, based on the score of each trajectory of traveler u and the constituent road segments, calculate the score of traveler u for each road segment i, and the calculation formula is:

[0022]

[0023] Among them, U is the set of all travelers, Lu is the set of all trajectories of traveler u, r u,l is the overall score of traveler u on trajectory l, is the probability that the road section i in trajectory l is the worst road section,

[0024] Step S27, dividing the road section data into three categories: peak, flat and low peak according to the evaluation time of the trajectory;

[0025] Preferably, in step S3, the specific process of using the dual-tower latent semantic model to recommend sections during peak, off-peak and low-peak periods is as follows:

[0026] Step S31: construct a traveler-road segment rating matrix set R m×n =(r u,i ) m×n . Where m is the number of travelers, n is the number of road sections, r u,i is the rating of traveler u on road segment i.

[0027] Step S32, according to the timestamp, R m×n Peak Low Peak Low Peak Traveler-segment scoring matrix for each time period;

[0028] Step S33, set the number of latent factors K, and randomly initialize the traveler latent semantic matrix Road segment latent semantic matrix Category latent semantic matrix Where d is the total number of attributes of travelers and road segments;

[0029] Step S34, calculate the traveler's latent semantic vector p u , traveler category latent semantic vector pt u , road segment latent semantic vector q i , road segment category latent semantic vector qt i , see the following formula:

[0030]

[0031] Among them, x u ,x t,u ,x i ,x t,i are the one-hot codes of travelers, traveler categories, road sections, and road section categories, respectively.

[0032] Step S35: transform the latent semantic vectors p u and the traveler category latent semantic vector pt u, road segment latent semantic vector q i and the road segment category latent semantic vector qt i Fusion, see the formula below:

[0033]

[0034] Among them, θ u ,b u They are the traveler fusion function f fusion,u The parameter θ i ,b i They are the road segment fusion function f fusion,i Parameters;

[0035] Step S36: According to step S35, add the bias term μ+c to the predicted score. i +c u , where c i is the bias term of section i, c u is the bias term of traveler u, and μ is the benchmark score. Then the predicted score can be expressed as

[0036]

[0037] Step S37: To avoid overfitting, add a regularization parameter λ to the loss function. The expression for minimizing the loss function is:

[0038]

[0039] Step S38, based on steps S33-S37, train the model for the traveler-road segment rating matrix during peak, off-peak and low-peak periods respectively;

[0040] Preferably, in step S4, the specific process of recommending the optimal travel route according to the starting and ending points and the expected departure time given by the traveler is:

[0041] Step S41: The rating of the traveler u in the j period on the road section i is Distance from road section i Combined, travelers are blocked The calculation formula is:

[0042]

[0043] in, are the lowest and highest scores of the road section given by traveler u in time period j;

[0044] Step S42, determine the time period to which the given departure time t0 of the traveler u belongs, and select the average driving speed. The average driving speed is Among them, j∈{1,2,3}, is the starting time of the tth j-period, is the end time of the tth j-period, During peak hours, During off-peak hours, It is a low peak period, and

[0045] Step S43, calculating the time of actually passing through the adjacent road segment h according to the starting point O and the departure time t0;

[0046] Step S44, searching for the next road segment and calculating the time of passing the next road segment;

[0047] Step S45: according to the visited sequence visited = {O,h i |i∈[1,|visited|-1]}, time set T, T', the formula for calculating the total traveler resistance ds of the route is:

[0048]

[0049] in,

[0050] Step S46, add ds to the Dis set, where the initial Dis = {};

[0051] Step S47, visited=visited-h |visited| , combined with steps S43 to S44, generate the next route visited';

[0052] Step S48, combining with step S45, calculating the total road resistance of route visited';

[0053] Step S49, repeating steps S46 to S48, comparing the total traveler resistance of each route in Route, and outputting the recommended route for travelers, that is, the route with the minimum total traveler resistance;

[0054] Preferably, in step S43, the specific process of calculating the time of actually passing through the adjacent road segment h according to the starting point O and the departure time t0 is:

[0055] Step S431, based on the starting point O and the departure time t0, the expected time to pass through the adjacent road segment h is calculated as Add segment h to the visited set and time t to the T set h , T' set to add the moment Among them, initially visited={O}, T=T'={t0}, h∈H o ∈I∪{O,D},H o is the set of connected road segments of O;

[0056] Step S432, calculate the actual passing time of section h, and update the time sets T and T'. but like Then update T' and T in the set respectively in, are t0 and t h The average speed of the road section during the period;

[0057] Preferably, in step S44, the specific process of finding and calculating the time of passing the next road section is:

[0058] Step S441, determine The set of adjacent segments of h Whether they are all established;

[0059] Step S442, if and Then according to step S43, iterative calculation The time when starting from h and passing through its adjacent section k, where H h is the adjacent road segment of h, k∈H h ;

[0060] Step S443, if And the set of adjacent segments of h Then update visited-=visited |visited| , combined with step S43, in Select the road section and calculate its actual passing time, where |visited| is the number of elements contained in the visited set. |visited| is the visited element in the visited set, For the element visited |visited| The set of adjacent road segments;

[0061] Step S444: if Then record T and T', and add visited to the Route set, where the initial Route = {}.

[0062] Compared with the prior art, the present invention has the following beneficial effects:

[0063] 1. The present invention aims at the data sparsity problem. It uses trajectory routes to segment the road network and regards a set of several related road sections as one road section, which greatly reduces the scale of the road network, thereby significantly reducing the dimension of the road section scoring matrix and solving the data sparsity problem. Moreover, based on the road network segmentation results, the present invention designs a road section scoring formula based on trajectory scoring. During the research process, it is only necessary to investigate and collect the scores of travelers on the travel trajectory, and the scores of the road sections included in the trajectory can be calculated according to the formula. The formula can effectively reduce the tedious collection process of road section scoring data.

[0064] 2. The present invention combines the category characteristics of travelers and road sections with the hidden characteristics in the ratings, and uses the dual-tower latent semantic model to predict travelers' ratings of road sections. For new travelers, the present invention takes into account the category characteristics of travelers, such as age, gender, driving experience and other category characteristics, to make up for the problem of difficulty in recommendation due to the lack of their historical evaluation data; and for ordinary travelers, the present invention sets the number of latent factors, mines the hidden characteristics of travelers and road sections in the rating data, and combines them with the category characteristics, to solve the problem of difficulty in determining preference attributes.

[0065] 3. The present invention recommends a dynamic optimal travel route by combining the road section score with the actual distance of the road section. That is, in the route planning, the traveler preferences and road section characteristics under peak, flat and low peak times are taken into account, so that the plan can better meet the personalized needs of travelers based on the traffic characteristics of different time periods; when travelers' scores on the road sections are consistent, the present invention can recommend the shortest path according to the actual length of the road section; but when travelers' scores on the road sections show significant differences, the present invention can comprehensively select the optimal route by combining the road section score and the road section length, avoiding the selection of a circuitous route due to excessive pursuit of high scores, and also reducing the "bad" sections in the shortest path. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention.

[0067] Figure 1 This is a flow chart of a method for recommending routes based on travelers’ preferences proposed in an embodiment of the present invention.

[0068] Figure 2 The present invention provides a flowchart for recommending a double-tower latent semantic model in the method proposed in the embodiment of the present invention.

[0069] Figure 3 This is a flow chart of route planning in the method proposed in an embodiment of the present invention.

[0070] Figure 4 This is a flow chart of calculating the total path resistance in the method proposed in an embodiment of the present invention.

[0071] Figure 5 This is a graph showing the result of road network segmentation in the method proposed in an embodiment of the present invention.

[0072] Figure 6 This is a result diagram of the road segment scoring formula in the method proposed in the embodiment of the present invention.

[0073] Figure 7 This is a result diagram of the optimal route in the method proposed in the embodiment of the present invention. DETAILED DESCRIPTION

[0074] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. Of course, the specific embodiments described here are only used to explain the present invention and are not used to limit the present invention.

[0075] Example 1

[0076] See also Figures 1 to 4 The technical solution provided in this embodiment is a route recommendation method based on a double-tower latent semantic model, comprising the following steps:

[0077] Step S1, obtaining the attributes, travel trajectory and rating, and road segment attribute data of the traveler;

[0078] Step S2, segmenting the road network according to the trajectory;

[0079] Step S3, using the double-tower latent semantic model to recommend road sections during peak, off-peak, and low-peak hours respectively;

[0080] Step S4, recommending the best travel route based on the travel start and end points and time given by the traveler.

[0081] Specifically, in step S2, the specific process of segmenting the road network according to the trajectory is:

[0082] Step S21, obtaining the trajectories of all travelers, sampling the positioning points at equal intervals to form a sample point set S, and calculating the similarity distance matrix;

[0083] Step S22, setting the neighborhood cutoff distance d c , calculate the local density ρ of the sample i , the calculation formula is:

[0084]

[0085] Among them, d ij is the distance between sample point i and sample point j,

[0086] Step S22, calculate the relative distance δ of the sample i, the calculation formula is:

[0087]

[0088] Among them, δ i For sample x i The distance to the sample closest to itself that has a larger local density than itself;

[0089] Step S23, draw a decision diagram and mark the density peak as the cluster center;

[0090] Step S24, assigning the non-clustered data point to the class where the sample with the largest local density than itself and closest to it is located;

[0091] Step S25, according to the intersection of the clustering results, the road network is divided into a number of road sections, wherein each category corresponds to a road section, forming a road section set I.

[0092] Step S26, based on the score of each trajectory of traveler u and the constituent road segments, calculate the score of traveler u for each road segment i, and the calculation formula is:

[0093]

[0094] Among them, U is the set of all travelers, L u is the set of all trajectories of traveler u, r u,l is the overall score of traveler u on trajectory l, is the probability that the road section i in trajectory l is the worst road section,

[0095] Step S27, converting the evaluation time of the trajectory into a 24-hour system, and dividing the road section data into three categories: peak, flat, and low peak;

[0096] In this embodiment, taking Shenzhen as an example, [7:00, 9:30]∪[17:30, 19:30] is set as the peak period, [9:30, 17:30]∪[19:30, 21:00] is the off-peak period, and [21:00, 7:00 (+1)] is the low-peak period; the highest score of the road section for the traveler is set. 5.0, the highest score is 0;

[0097] Specifically, in step S3, the specific process of using the double-tower latent semantic model to recommend sections during peak, off-peak, and low-peak periods is as follows:

[0098] Step S31: construct a traveler-road segment rating matrix set R m×n =(r u,i ) m×n . Where m is the number of travelers, n is the number of road sections, ru,i is the rating of traveler u on road segment i.

[0099] Step S32, according to the timestamp, R m×n Peak Low Peak Low Peak Traveler-segment scoring matrix for each time period;

[0100] Step S33, set the number of latent factors K, and randomly initialize the traveler latent semantic matrix Road segment latent semantic matrix Category latent semantic matrix Where d is the total number of attributes of travelers and road segments;

[0101] Step S34, calculate the traveler's latent semantic vector p u , traveler category latent semantic vector pt u , road segment latent semantic vector q i , road segment category latent semantic vector qt i , see the following formula:

[0102]

[0103] Among them, x u ,x t,u ,x i ,x t,i are the one-hot codes of travelers, traveler categories, road sections, and road section categories, respectively.

[0104] Step S35: transform the latent semantic vectors p u and the traveler category latent semantic vector pt u , road segment latent semantic vector q i and the road segment category latent semantic vector qt i Fusion, see the formula below:

[0105]

[0106] Among them, θ u ,b u are the parameters of the traveler fusion function, θ i ,b i are the parameters of the road segment fusion function respectively;

[0107] Step S36, according to step S35, calculate the predicted score, and the calculation formula is:

[0108]

[0109] Step S37, minimizing the loss function to train the model, the loss function expression is:

[0110]

[0111] Step S38, based on steps S33-S37, train the model for the traveler-road segment rating matrix during peak, off-peak and low-peak periods respectively;

[0112] In this embodiment, the optimal neighborhood cutoff distance d for road network segmentation c =8.06, which can reach 92% classification accuracy, and generate a road network with 13 road sections; in the double tower latent semantic model, the total number of travelers is 3963, the number of latent factors K = 10, the traveler category features are age, gender, and education level, and the road section category features are section length and number of bends, then the category latent semantic matrix

[0113] Specifically, in step S4, the specific process of recommending the optimal travel route according to the starting and ending points and the expected departure time given by the traveler is as follows:

[0114] Step S41: The rating of the traveler u in the j period on the road section i is Distance from road section i Combined, travelers are blocked The calculation formula is:

[0115]

[0116] in, are the lowest and highest scores of the road section given by traveler u in time period j;

[0117] Step S42, determine the time period to which the given departure time t0 of the traveler u belongs, and select the average driving speed. The average driving speed is Among them, j∈{1,2,3}, is the starting time of the tth j-period, is the end time of the tth j-period, During peak hours, During off-peak hours, It is a low peak period, and

[0118] In this embodiment, the average speed during peak hours is set Average speed during off-peak hours Average speed during off-peak hours If the traveler u gives a departure time Belongs to the first peak period, then the average speed in the period [8:00,9:30]

[0119] Step S43, calculating the time of actually passing through the adjacent road segment h according to the starting point O and the departure time t0;

[0120] Specifically, in step S43, the specific process of calculating the time of actually passing through the adjacent road segment h according to the starting point O and the departure time t0 is:

[0121] Step S431, based on the starting point O and the departure time t0, the expected time to pass through the adjacent road segment h is calculated as Add segment h to the visited set and time t to the T set h , T' set to add the moment Among them, initially visited={O}, T=T'={t0}, h∈H o ∈I∪{O,D},H o is the set of connected road segments of O;

[0122] Step S432, calculate the actual passing time of section h, and update the time sets T and T'. but like Then update T' and T in the set respectively in, are t0 and t h The average speed of the road section during the period;

[0123] If the set of adjacent road segments of starting point O is H o = {h|h∈I}, randomly select a section h, whose length is dis h = 1.5 km, then visited = {O, h}, the expected passing time of section h T = T' = {8:00,8:06};

[0124] Step S44, searching for the next road segment and calculating the time of passing the next road segment;

[0125] Specifically, in step S44, the specific process of finding and calculating the time of passing the next road section is as follows:

[0126] Step S441, determine The set of adjacent segments of h Whether they are all established;

[0127] Step S442, if and Then according to step S43, iterative calculation The time when starting from h and passing through its adjacent section k, where H his the adjacent road segment of h, k∈H h ;

[0128] Step S443, if And the set of adjacent segments of h Then update visited-=visited |visited| , combined with step S43, in Select the road section and calculate its actual passing time, where |visited| is the number of elements contained in the visited set. |visited| is the visited element in the visited set, For the element visited |visited| The set of adjacent road segments;

[0129] Step S444: if Then record T and T', and add visited to the Route collection, where the initial Route = {};

[0130] In this embodiment, If the set of adjacent sections of h Then randomly select a section k, whose length is dis k = 23.5 km / h, combined with step S43, update visited = {O, h, k}, and calculate The expected time to pass through section k starting from h Then the average speed of road section k in the period [9:30, 9:33] is Average vehicle speed during the period [9:30, 9:33] renew T={8:00,9:30}, T'={8:00,9:36};

[0131] at this time, And the set of adjacent road segments of k Then update visited-=visited |visited| = {O,h,k}-{k} = {O,h}, returns the set of adjacent sections H of h h If the road segment D∈H h -visited, combined with step S43, update visited = {O, h, D}. At this time, visited = {O, h, D} ∩ {D} = {D}, that is, visited has connected O and D, and records visited, T, and T'.

[0132] Step S45: according to the visited sequence visited = {O,h i|i∈[1,|visited|-1]}, time set T, T', the formula for calculating the total traveler resistance ds of the route is:

[0133]

[0134] in,

[0135] Step S46, add ds to the Dis set, where the initial Dis = {};

[0136] Step S47, visited=visited-h |visited| , combined with steps S43 to S44, generate the next route visited';

[0137] Step S48, combining with step S45, calculating the total road resistance of route visited';

[0138] Step S49, repeating steps S46 to S48, comparing the total traveler resistance of each route in Route, and outputting the recommended route for travelers, that is, the route with the minimum total traveler resistance;

[0139] In this embodiment, the proposed route recommendation method based on traveler preference uses trajectory routes to segment the road network and calculates the segment score based on the trajectory score to reduce the scale of the road network and solve the data sparsity problem; combines the category characteristics of travelers and segments with the hidden features in the score, and uses the twin-tower latent semantic model to predict the travelers' scores for the segments; this embodiment recommends a dynamic optimal travel route by combining the segment score with the actual distance of the segment, that is, in the path planning, the traveler preferences and segment characteristics under peak, flat and low peak times are taken into account, so that the plan can better meet the personalized needs of travelers on the basis of considering the traffic characteristics of different time periods, and achieve the expected effect of accurate recommendation.

[0140] Example 2

[0141] Based on Example 1, see Figures 5 to 7 , this embodiment also provides a route recommendation method based on the double-tower latent semantic model, comprising the following steps:

[0142] Step S1, in this embodiment, trajectory data is simulated to evaluate the proposed strategy. This embodiment uses a random road network containing 96 road segments. The road segment data contains three attributes: road segment number, region, and length, where the road segment length is a random number between [100, 1000]. Subsequently, 44,852 repeatable travel tasks (starting and ending points) are randomly generated and randomly assigned to 3,963 travelers. For each travel task, RRT* is used to generate a trajectory route, and a score between 1 and 5 is randomly generated as the overall score of each trajectory. Therefore, the trajectory data can be represented as a set (trajectory ID, road segment ID, traveler ID, score, score time).

[0143] Step S2, segment the road network according to the 200 trajectories; calculate the optimal neighborhood cutoff distance d c =8.06, the local densities of the six cluster centers are [430, 830, 28, 661, 336, 795], and the classification accuracy is as high as 92%. The original 13 road sections are reduced to 6 sections. The clustering effect is shown below Figure 5 .

[0144] Based on the above segmentation results, the differences between the ranking of each road segment and the actual ranking under different numbers of trajectories are compared. Mean square error, mean absolute error, goodness of fit, Pearson correlation coefficient and Spearman correlation coefficient are used as evaluation indicators. Among them, the score of each road segment is a random integer in [1,5], and each trajectory is a sequence generated by random arrangement and combination of several road segments. The results are shown in Figure 6 shown.

[0145] It can be concluded that the ranking of the road segments obtained by this method is significantly correlated with the actual ranking, and the accuracy is proportional to the amount of data. When the overall trajectory score is represented by three different methods, namely the median, upper quartile, and lower quartile, this method can still maintain a low error and a high correlation coefficient. It can be seen that the quality of the road segments calculated by this method is significantly correlated with their actual rankings, and has a certain degree of robustness.

[0146] In summary, the road network segmentation based on trajectory data can effectively reduce the scale of the road network; and the road segment scoring formula based on trajectory scoring can feedback the quality of the road segment and has a certain degree of robustness. This method effectively avoids the tedious process of collecting scoring data for each road segment in the trajectory.

[0147] Step S3, using the double tower latent semantic model to recommend the road sections in peak, off-peak and low-peak periods respectively: Based on the road network segmentation result of step S2, Take 4 travelers as an example, and randomly select 4 travelers to recommend preferred road sections. The traveler IDs are 2715, 9168, 17, and 6393, respectively, which contain 11, 22, 7, and 3 historical rating data. The prediction results are shown in the following table:

[0148] Table 1 Travelers' road segment ratings

[0149]

[0150]

[0151] Step S4, recommend the optimal travel route according to the starting and ending points and time given by the travelers. With 7:00 as the departure time, a variety of travel tasks were planned, and the simulated annealing algorithm was used to calculate the optimal path. In tasks AJ and DL, the recommended route is the same as the shortest path, but due to the different recommended sections, the recommended routes of tasks DG and AG are significantly different: in task DG, the recommended route of traveler 9168 is the same as the shortest path, while traveler 2715 and the public gave too low a score to section LG, and both chose route DF-FG. In task AG, traveler 2715 gave section FG a score of only 2.56, resulting in the route AC-CD-DF-FH-HG, which is extremely deviated from the shortest path; and traveler 9168 recommended too few sections to meet travel needs, so he added non-recommended sections, which were finally consistent with the shortest path. The above results all show that the shortest path may not be the preferred route of the traveler, and the recommended route can also achieve the shortest path based on the preference, see Figure 7 Route comparison.

[0152] From the perspective of benefits, taking the shortest path as the benchmark, the satisfaction and distance cost of the optimal routes under 66 tasks were compared for travelers 2715, 9168, and the public. Some tasks of the optimal route that is not the shortest route are shown in Table 2: Among them, the optimal route of traveler 9168 is the same as the shortest path; while traveler 2715 only has tasks AG and DG, which increase the average road section satisfaction by 13% and 37% respectively at the cost of increasing 450 meters and 220 meters; in addition, although the public gave high scores to each road section, the average satisfaction of the 12 optimal routes still increased by about 6% to 10%.

[0153] Table 2 Benefit increments of the shortest path and the optimal path

[0154]

[0155] By comprehensively comparing the above recommendation results, we can conclude that taking the shortest path as the benchmark and the optimal route based on travelers' preferences, at the cost of a small increase in distance, significantly improved satisfaction and achieved the expected effect.

[0156] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A route recommendation method based on a double-tower latent semantic model, characterized in that: The following steps are involved: Step S1, obtaining the attributes, travel trajectory and rating, and road segment attribute data of the traveler; Step S2, segmenting the road network according to the trajectory; Step S3, using the double-tower latent semantic model to recommend road sections during peak, off-peak, and low-peak hours respectively; Step S4, recommending the best travel route based on the travel start and end points and time given by the traveler.

2. The route recommendation method based on the double tower latent semantic model according to claim 1 is characterized in that: In step S2, segmenting the road network according to the trajectory includes the following steps: Step S25, dividing the road network into a number of road sections according to the intersection of the clustering results, wherein each category corresponds to a road section, forming a road section set I; Step S26, based on the score of each trajectory of traveler u and the constituent road segments, calculate the score of traveler u for each road segment i, and the calculation formula is: Among them, U is the set of all travelers, L u is the set of all trajectories of traveler u, r u,l is the overall score of traveler u on trajectory l, is the probability that the road section i in trajectory l is the worst road section; Step S27, dividing the road section data into three categories: peak, flat and low peak according to the evaluation time of the trajectory.

3. The route recommendation method based on the double tower latent semantic model according to claim 1 is characterized in that: In step S3, the steps of using the double-tower latent semantic model to recommend sections during peak, off-peak, and low-peak periods are as follows: Step S31: construct a traveler segment score matrix set R m×n =(r u,i ) m×n , where m is the number of travelers, n is the number of road sections, and r u,i is the rating of traveler u on road segment i; Step S32, according to the timestamp, R m×n Peak Low Peak Low Peak Traveler segment rating matrix for the time period; Step S33, set the number of latent factors K, and randomly initialize the traveler latent semantic matrix Road segment latent semantic matrix Category latent semantic matrix Where d is the total number of attributes of travelers and road segments; Step S34: transform the traveler latent semantic matrix Road segment latent semantic matrix Category latent semantic matrix The dot multiplication is performed with the one-hot encoding of the traveler, traveler category, road section, and road section category to form the traveler latent semantic vector p u , traveler category latent semantic vector pt u , road segment latent semantic vector q i , road segment category latent semantic vector qt i . Step S35: transform the traveler latent semantic vector p u and the traveler category latent semantic vector pt u , generate user feature vector The road segment latent semantic vector q i and the road segment category latent semantic vector qt i Fusion, road segment feature vector Step S36: According to step S35, add the bias term μ+c to the predicted score. i +c u , where c i is the bias term of section i, c u is the bias term of traveler u, μ is the benchmark score, and the predicted score is expressed as Step S37: To avoid overfitting, a regularization parameter λ is added to the loss function, and the expression of the minimized loss function is:

4. The route recommendation method based on the double tower latent semantic model according to claim 1 is characterized in that: In step S4, the steps of recommending the optimal travel route according to the traveler's starting and ending points and time are as follows: Step S41: The rating of the traveler u in the j period on the road section i is Distance from road section i Combined, travelers are blocked The calculation formula is: in, are the lowest and highest scores of the road section given by traveler u in time period j; Step S42, determining the time period to which the given departure time t0 of the traveler u belongs, and selecting the average driving speed of the time period; Step S43, based on the starting point O and the departure time t0, calculate the actual path and its adjacent road segment h i Moment The time to exit the road Step S44, searching for the next road segment and calculating the time of passing the next road segment; Step S45, according to the visited sequence visited and the set T of en route time corresponding to each road section and the set T' of exit time of the road section, the formula for calculating the total traveler road resistance ds of the route is: in, t i ∈T, is the starting time of the tth j-period, is the end time of the tth j-period, During peak hours, During off-peak hours, is the off-peak period, visited={O,h i |i∈[1,|visited|-1]}; Step S46, add ds to the Dis set, and its initial value is empty; Step S47, visited=visited-h visited , combined with steps S43 to S44, generate the next route visited'; Step S48, combining with step S45, calculating the total road resistance of route visited'; Step S49, repeat steps S46 to S48, compare the total traveler resistance of each route in Route, and output the recommended route for travelers, that is, the route with the smallest total traveler resistance.

5. The route recommendation method of the twin tower latent semantic model according to claim 4 is characterized in that: In step S43, the steps of calculating the time of actually passing through the adjacent road segment h according to the starting point O and the departure time t0 are as follows: Step S431: Calculate the expected time to pass through the adjacent road segment h as t according to the starting point O and the departure time t0. h , add segment h to the visited set and time t to the T set h , T' set to add the moment Among them, initially visited={O}, T=T'={t0}, h∈H o ∈I∪{O,D},H o is the set of connected road segments of O; Step S432, calculate the actual passing time of section h, and update the time sets T and T'. but like Then update T' and T in the set respectively in, are t0 and t h The average vehicle speed on the road section during the time period.

6. The route recommendation method based on the double-tower latent semantic model according to claim 4 is characterized in that: In step S44, the steps of finding and calculating the time of passing the next road segment are as follows: Step S441, determining whether the route passes through D, and whether there is an unvisited section in the connecting sections of the section h; Step S442, if the route does not pass through D, and there are unvisited sections in the connecting sections of the section, then according to step S43, iteratively calculate the time to pass through its connecting sections; Step S443: if the route does not pass through D, and the connecting sections of the section have been visited, return to the previous section in the visited set, reselect the section, and perform iterative calculation in combination with step S43; Step S444: If the route has passed D, the arrival time is recorded and the route visited is added to the Route collection.

Citation Information

Patent Citations

  • Path recommendation method and device

    CN110647693A

  • Travel scheme optimization method of travel path and travel time based on user preference

    CN115880895A

  • Navigation procedures and navigation system

    DE102014100569A1

  • Device, method and program for calculation of location existence probability, and travel route recommendation device, method and program

    JP2011170453A