CN113819916B - Travel route planning method based on cultural genetic algorithm - Google Patents

Travel route planning method based on cultural genetic algorithm Download PDF

Info

Publication number
CN113819916B
CN113819916B CN202110993353.6A CN202110993353A CN113819916B CN 113819916 B CN113819916 B CN 113819916B CN 202110993353 A CN202110993353 A CN 202110993353A CN 113819916 B CN113819916 B CN 113819916B
Authority
CN
China
Prior art keywords
poi
user
edge
data
landscape
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
Application number
CN202110993353.6A
Other languages
Chinese (zh)
Other versions
CN113819916A (en
Inventor
王磊
许向荣
江巧永
费蓉
王彬
张朔
郑伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xian University of Technology
Original Assignee
Xian University of Technology
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Xian University of Technology filed Critical Xian University of Technology
Priority to CN202110993353.6A priority Critical patent/CN113819916B/en
Publication of CN113819916A publication Critical patent/CN113819916A/en
Application granted granted Critical
Publication of CN113819916B publication Critical patent/CN113819916B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C21/00Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
    • G01C21/26Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 specially adapted for navigation in a road network
    • G01C21/34Route searching; Route guidance
    • G01C21/3453Special cost functions, i.e. other than distance or default speed limit of road segments
    • G01C21/3476Special cost functions, i.e. other than distance or default speed limit of road segments using point of interest [POI] information, e.g. a route passing visible POIs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • G06Q10/047Optimisation of routes or paths, e.g. travelling salesman problem
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/10Services
    • G06Q50/14Travel agencies

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Tourism & Hospitality (AREA)
  • Human Resources & Organizations (AREA)
  • Economics (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Remote Sensing (AREA)
  • Strategic Management (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Theoretical Computer Science (AREA)
  • General Business, Economics & Management (AREA)
  • Marketing (AREA)
  • Game Theory and Decision Science (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Development Economics (AREA)
  • Automation & Control Theory (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Primary Health Care (AREA)
  • Navigation (AREA)

Abstract

The invention discloses a travel route planning method based on a cultural genetic algorithm, which comprises the following specific steps: step 1, acquiring potential preference data of a user; step 2, road network data are obtained and cleaned; step 3, obtaining user interaction information data of the POI, and forming a POI attribute list; step 4, modeling the road network according to the potential preference data of the user, the road network data and the attribute table of the POI, and extracting the effective edge which can reach the end point from the starting point according to the inquiry condition of the user; step 5, obtaining the landscape value of the effective edge according to the potential preference data of the user, the road network data and the attribute list of the POI; and 6, searching the effective edges and the scenery values in the road network by using a cultural genetic algorithm, and planning a scenery travel route with high scenery values and high user satisfaction for the user. The invention solves the problem that the user preference, the path landscape value and the user personalized demand are not considered when the path planning is carried out in the prior art.

Description

Travel route planning method based on cultural genetic algorithm
Technical Field
The invention belongs to the technical field of route planning, and relates to a travel route planning method based on a cultural genetic algorithm.
Background
With the improvement of the living standard of people, more and more people choose to take travel as a way of recreation, and meanwhile, the people hope to reach a destination with the shortest distance and the least expense, so that the whole travel experience is improved. Therefore, various route planning algorithms are endless, and reasonable route planning can save travel cost for users, greatly improve travel interests of the users and has important significance for development of the travel industry.
The traditional route planning methods aim at planning a route from a source to a destination, which is short in distance, less in time and low in cost, for a user, and only consider the travel efficiency of the user, and neglect the personal preference of the user, the scenery value of the route, the personalized requirement of the user and the like, namely when the user wants to drive out, scenery along the way, which accords with the preference of the user, can improve the travel experience of the user to a certain extent, which is very important for the user.
Disclosure of Invention
The invention aims to provide a travel route planning method based on a cultural genetic algorithm, which solves the problem that user preference, path landscape value and user personalized requirements are not considered when path planning is carried out in the prior art.
The technical proposal adopted by the invention is that,
a travel route planning method based on cultural genetic algorithm comprises the following specific steps:
step 1, acquiring potential preference of a user to POIs (POIs) (Point of Interest, interest points) according to historical sign-in data of the user and POIs type characteristic data;
step 2, road network data are obtained from an OSM (open street map) and are subjected to data preprocessing;
step 3, obtaining user interaction information data of the POI, including information such as photo number, comment number, grade, score and the like, and adding the information into a corresponding POI attribute list;
step 4, modeling the road network according to the user potential preference data, the preprocessed road network data and the attribute table of the POI, and extracting effective edges which can reach the end point from the starting point according to the user query condition;
step 5, calculating the landscape value of the effective edge according to the potential preference data of the user, the preprocessed road network data and the attribute list of the POI;
and 6, searching the effective edges and the scenery values in the road network by using a cultural genetic algorithm, and planning a scenery travel route with high scenery values and high user satisfaction for the user.
The invention is also characterized in that:
wherein step 1 comprises:
step 1.1, acquiring historical sign-in data of a user from a travel website, wherein the data content is txt text, and one row of sign-in information of the user is represented by one to a plurality of POIs;
step 1.2, acquiring basic information of POIs signed by users from various tourist websites, wherein the data content comprises names, geographic positions, type characteristics and open time of tourist attractions;
step 1.3, extracting user preference from the information obtained in the step 1.1 and the step 1.2 by a label classification statistical method to obtain user potential preference data, wherein the specific steps are as follows:
step 1.3 comprises:
step 1.3.1, acquiring a user-POI sign-in matrix UC according to user historical sign-in data; each element uc in the matrix i,j Obtained from formula (1):
wherein uc i,j Indicating that user i is at POI j The number of check-in times, i and j are subscript variables;
step 1.3.2, acquiring a POI-type matrix PT according to POI type characteristic data and sign-in data; each element pt in the matrix i,j Obtained from formula (2):
wherein pt i,j Representing POIs i Whether or not to have type feature T j
Step 1.3.3, obtaining a user-type sign-in matrix UT according to the user-POI sign-in matrix and the POI-type matrix; each of the matricesIndividual element ut i,j Obtained from formula (3):
wherein ut is i,j Representing user i versus type feature T j Of the number of check-ins, i.e. the user has gone through a user having a type feature T j The number of POIs of (a) a;
and 1.3.4, sorting POI type features in a user-type sign-in matrix according to the decreasing order of the number of times of user sign-in, taking TOP-N types with the largest number of times of sign-in as user preference, and encoding by using a single-heat encoding to obtain a user preference vector, namely the potential preference data of the user.
The specific steps of the step 2 are as follows: and downloading urban road network data from the OSM, reserving national road, province road, county road, village road, university, park and POI data in the road network data, and performing cleaning treatment on other data to obtain preprocessed urban road network data.
The specific steps of the step 3 are as follows: and extracting scoring, comment number, grade and photo number information of the POI from the user in the tourism website, and marking the scoring, comment number, grade and photo number information on the corresponding POI to form a POI attribute list.
Wherein step 4 comprises:
step 4.1, road network modeling: a road network is modeled as a graph g= (N, E), where N is the set of nodes (intersections and dead-ends), E N x N is the set of directed edges;
step 4.2, path definition: one path is formed by sequentially connecting a plurality of edges in a road network, and one path is formed from a source point n 0 To destination n k The path is denoted as r= (e 0,1 ,e 1,2 ,…,e k-1,k ) Wherein n is 0 、n k Belongs to the set N, E belongs to the set E, E 0,1 Representing node n 0 To n 1 Is a side of (2);
step 4.3, user query definition: user queries are defined as triples, denoted q= < n 0 ,n k D >, wherein n 0 、n k Respectively representing a user-defined start point and an end point, d beingMaximum travel distance allowed by the user;
step 4.4, determining an effective area: taking the middle points of a starting point and a finishing point defined by a user as a circle center, taking the maximum travel distance allowed by the user as a diameter, drawing a circle, wherein an area in the circle is an effective area, and an edge in the effective area is an effective edge;
step 4.5, obtaining a neighbor table: the scenery value on the effective edge is calculated according to the scenery value of the POI adjacent to the edge, so that the adjacent distance needs to be set, and an adjacent table of the edge is obtained; the contents of the table include: the ID and name of the edge, the ID and name of the POI adjacent to the edge, and the adjacent distance.
Wherein step 5 comprises:
step 5.1, establishing a landscape value mathematical model, wherein the landscape value mathematical model comprises a co-visit probability function among POIs, a similarity function among POIs and a correlation function among POIs, and the formula of the co-visit probability function is as follows:
wherein Co-VP (i, j) represents POI i And POI j Co-visit probability of N i,j Indicating simultaneous access to POIs i And POI j Number of users, N i Indicating that only POIs have been accessed i Without accessing POI j The number of users of (a);
the similarity function formula between POIs is:
wherein Sim (i, j) represents POI i And POI j Similarity between type features, T i,d Is POI i Type feature vector T i A component of dimension d;
the correlation function formula between POIs is as follows:
r(i,j)=Co_VP(i,j)×Sim(i,j) (6)
wherein r (i, j) represents POI i And POI j The larger the correlation between the values of r (i, j), the description POI i And POI j The closer the relationship is, the less the scenery value is lost when the two are combined;
step 5.2, calculating landscape value: the calculation of the landscape value comprises three parts: POI landscape value calculation, edge landscape value calculation and path landscape value calculation are specifically as follows:
the scenery value of the POI is mainly determined by scores (score), levels, photo numbers (pictures), comment numbers (com count) and the like corresponding to the POI, and the larger the values are, the larger the scenery value of the POI is, and the calculation mode is as follows:
scenic(i)=(score(i)+level(i)+picture(i)+comCount(i))×(1+w i ) (7)
wherein scenic (i) is POI i Scenery (i), level (i), picture (i), com count (i) represent POI respectively i Scoring, rating, number of photos and number of comments on the carrier network; w (w) i Is POI i Feature vector T of (1) i Cosine similarity between the user preference vector P (u) is used for describing the preference condition of the user to the POI;
the landscape value on the edge is determined by the landscape value of the POI adjacent to the edge, and for convenience of searching, the edge with the landscape value larger than 0 is marked as the landscape edge, and the formula is as follows:
wherein m is the sum of edges e i,i+1 The number of neighboring POIs;
the landscape value of the path is calculated from the landscape value of the edge included in the path by the following formula:
wherein step 6 comprises:
step 6.1, chromosome coding: firstly, initializing an empty chromosome; next, a distance is selected from the landscape edge obtained in the step 5.2.2Adding the scenery edge closest to the starting point to the end of the chromosome; again, the d value in the user query condition is updated, i.e. d=d-dis (e i,j ) Wherein dis (e i,j ) Is edge e i,j Is a distance of (2); finally, the above operation is carried out in a cyclic way until d is less than or equal to 0, and the obtained chromosome is encoded by a series of landscape edges;
step 6.2, chromosome decoding: for the encoded chromosome, the purpose of decoding is to fill the gap between two continuous landscape edges, namely, find the real path of the encoded chromosome on the road network, the landscape value of the chromosome is contributed by the landscape value of the landscape edge, and a formula (10) is defined as the fitness function of the chromosome, and the chromosome is decoded into the corresponding path to obtain the real travel distance;
wherein f (R) is the fitness value of the chromosome; sim (e) i,i+1 ,e j,j+1 ) Is edge e i,i+1 And edge e j,j+1 (i, j=0, 1, …, k-1 and j+.i), the characteristics of the edge being determined by the characteristics of the POI in close proximity to the edge; k is the number of edges contained on path R;
step 6.3, local search, specifically as follows:
step 6.3.1, variation: randomly selecting one scenery side of one chromosome and replacing the scenery side with the other scenery side; ensuring that the maximum travel distance constraint allowed by the user is not violated when a new landscape edge is selected; finally, selecting an optimal chromosome for decoding;
step 6.3.2, crossing: selecting two chromosomes from all chromosomes by adopting a game mechanism, selecting one crossing position, and exchanging other genes after the crossing positions of the two chromosomes;
and 6.4, taking the path with the highest final fitness value as the scenic travel route planned for the user.
The beneficial effects of the invention are as follows:
the method introduces the concept of user preference, namely, when route planning is carried out, the scenery value of the route is required to be higher, and the scenery of the route is required to meet the preference of the user as far as possible, so that the route planning is more personalized and the personalized requirements of the user can be met. Second, in computing the scenery value, an edge is typically adjacent to multiple POIs, and if only the scenery values of neighboring POIs are summed, the problem of scenery value loss in POI bonding is ignored. Therefore, before calculating the landscape value of the edge, the relation between the POIs is modeled, and the co-visit probability of the user on the POIs and the feature similarity between the POIs are considered. Thus, the closer the relationship between two POIs (the greater the probability of co-visit, the greater the similarity of features), the greater the contribution to the scenery value; conversely, the smaller the contribution to the scenery value. The modeling can calculate the landscape value of the edge more accurately, so that the obtained path is better. Finally, aiming at the problem that one POI is adjacent to a plurality of edges, in order to prevent the scenery of the path from being repeated, the similarity of edge characteristics is considered when the scenery value of the path is calculated, and the larger the similarity is, the more repeated POIs are, the smaller the contribution of the current edge to the scenery value of the path is; conversely, the greater the contribution.
Drawings
FIG. 1 is a flow chart of a travel route planning method based on cultural genetic algorithm of the invention;
fig. 2 is a flowchart of step 6.1 in the flowchart of a travel route planning method based on a cultural genetic algorithm according to the present invention.
Detailed Description
The invention will be described in detail below with reference to the drawings and the detailed description.
The invention relates to a travel route planning method based on a cultural genetic algorithm, which is shown in figure 1 and comprises the following specific steps:
step 1, acquiring potential preference of a user to POIs (POIs) (Point of Interest, interest points) according to historical sign-in data of the user and POIs type characteristic data;
step 2, road network data are obtained from an OSM (open street map) and are subjected to data preprocessing;
step 3, obtaining user interaction information data of the POI, including information such as photo number, comment number, grade, score and the like, and adding the information into a corresponding POI attribute list;
step 4, modeling the road network according to the user potential preference data, the preprocessed road network data and the attribute table of the POI, and extracting effective edges which can reach the end point from the starting point according to the user query condition;
step 5, calculating the landscape value of the effective edge according to the potential preference data of the user, the preprocessed road network data and the attribute list of the POI;
and 6, searching the effective edges and the scenery values in the road network by using a cultural genetic algorithm, and planning a scenery travel route with high scenery values and high user satisfaction for the user.
The invention is also characterized in that:
wherein step 1 comprises:
step 1.1, acquiring historical sign-in data of a user from a travel website, wherein the data content is txt text, and one row of sign-in information of the user is represented by one to a plurality of POIs;
step 1.2, acquiring basic information of POIs signed by users from various tourist websites, wherein the data content comprises names, geographic positions, type characteristics and open time of tourist attractions;
step 1.3, extracting user preference from the information obtained in the step 1.1 and the step 1.2 by a label classification statistical method to obtain user potential preference data, wherein the specific steps are as follows:
step 1.3 comprises:
step 1.3.1, acquiring a user-POI sign-in matrix UC according to user historical sign-in data; each element uc in the matrix i,j Obtained from formula (1):
wherein uc i,j Indicating that user i is at POI j The number of check-in times, i and j are subscript variables;
step 1.3.2, acquiring a POI-type matrix PT according to POI type characteristic data and sign-in data; each element pt in the matrix i,j From the formula%2) The method comprises the following steps:
wherein pt i,j Representing POIs i Whether or not to have type feature T j
Step 1.3.3, obtaining a user-type sign-in matrix UT according to the user-POI sign-in matrix and the POI-type matrix; each element ut in the matrix i,j Obtained from formula (3):
wherein ut is i,j Representing user i versus type feature T j Of the number of check-ins, i.e. the user has gone through a user having a type feature T j The number of POIs of (a) a;
and 1.3.4, sorting POI type features in a user-type sign-in matrix according to the decreasing order of the number of times of user sign-in, taking TOP-N types with the largest number of times of sign-in as user preference, and encoding by using a single-heat encoding to obtain a user preference vector, namely the potential preference data of the user.
The specific steps of the step 2 are as follows: and downloading urban road network data from the OSM, reserving national road, province road, county road, village road, university, park and POI data in the road network data, and performing cleaning treatment on other data to obtain preprocessed urban road network data.
The specific steps of the step 3 are as follows: and extracting scoring, comment number, grade and photo number information of the POI from the user in the tourism website, and marking the scoring, comment number, grade and photo number information on the corresponding POI to form a POI attribute list.
Wherein step 4 comprises:
step 4.1, road network modeling: a road network is modeled as a graph g= (N, E), where N is the set of nodes (intersections and dead-ends), E N x N is the set of directed edges;
step 4.2, path definition: one path is formed by sequentially connecting a plurality of edges in a road network, and one path is formed from a source point n 0 To the destinationn k The path is denoted as r= (e 0,1 ,e 1,2 ,…,e k-1,k ) Wherein n is 0 、n k Belongs to the set N, E belongs to the set E, E 0,1 Representing node n 0 To n 1 Is a side of (2);
step 4.3, user query definition: user queries are defined as triples, denoted q= < n 0 ,n k D >, wherein n 0 、n k Respectively representing a starting point and a terminal point defined by a user, wherein d is the maximum travel distance allowed by the user;
step 4.4, determining an effective area: taking the middle points of a starting point and a finishing point defined by a user as a circle center, taking the maximum travel distance allowed by the user as a diameter, drawing a circle, wherein an area in the circle is an effective area, and an edge in the effective area is an effective edge;
step 4.5, obtaining a neighbor table: the scenery value on the effective edge is calculated according to the scenery value of the POI adjacent to the edge, so that the adjacent distance needs to be set, and an adjacent table of the edge is obtained; the contents of the table include: the ID and name of the edge, the ID and name of the POI adjacent to the edge, and the adjacent distance.
Wherein step 5 comprises:
step 5.1, establishing a landscape value mathematical model, wherein the landscape value mathematical model comprises a co-visit probability function among POIs, a similarity function among POIs and a correlation function among POIs, and the formula of the co-visit probability function is as follows:
wherein Co-VP (i, j) represents POI i And POI j Co-visit probability of N i,j Indicating simultaneous access to POIs i And POI j Number of users, N i Indicating that only POIs have been accessed i Without accessing POI j The number of users of (a);
the similarity function formula between POIs is:
wherein Sim (i, j) represents POI i And POI j Similarity between type features, T i,d Is POI i Type feature vector T i A component of dimension d;
the correlation function formula between POIs is as follows:
r(i,j)=Co_VP(i,j)×Sim(i,j) (6)
wherein r (i, j) represents POI i And POI j The larger the correlation between the values of r (i, j), the description POI i And POI j The closer the relationship is, the less the scenery value is lost when the two are combined;
step 5.2, calculating landscape value: the calculation of the landscape value comprises three parts: POI landscape value calculation, edge landscape value calculation and path landscape value calculation are specifically as follows:
the scenery value of the POI is mainly determined by scores (score), levels, photo numbers (pictures), comment numbers (com count) and the like corresponding to the POI, and the larger the values are, the larger the scenery value of the POI is, and the calculation mode is as follows:
scenic(i)=(score(i)+level(i)+picture(i)+comCount(i))×(1+w i ) (7)
wherein scenic (i) is POI i Scenery (i), level (i), picture (i), com count (i) represent POI respectively i Scoring, rating, number of photos and number of comments on the carrier network; w (w) i Is POI i Feature vector T of (1) i Cosine similarity between the user preference vector P (u) is used for describing the preference condition of the user to the POI;
the landscape value on the edge is determined by the landscape value of the POI adjacent to the edge, and for convenience of searching, the edge with the landscape value larger than 0 is marked as the landscape edge, and the formula is as follows:
wherein m is the sum of edges e i,i+1 The number of neighboring POIs;
the landscape value of the path is calculated from the landscape value of the edge included in the path by the following formula:
wherein step 6 comprises:
step 6.1, chromosome coding: firstly, initializing an empty chromosome; secondly, selecting a landscape edge closest to the starting point from the landscape edges obtained in the step 5.2.2, and adding the landscape edge to the tail of the chromosome; again, the d value in the user query condition is updated, i.e. d=d-dis (e i,j ) Wherein dis (e i,j ) Is edge e i,j Is a distance of (2); finally, the above operation is carried out in a cyclic way until d is less than or equal to 0, and the obtained chromosome is encoded by a series of landscape edges;
step 6.2, chromosome decoding: for the encoded chromosome, the purpose of decoding is to fill the gap between two continuous landscape edges, namely, find the real path of the encoded chromosome on the road network, the landscape value of the chromosome is contributed by the landscape value of the landscape edge, and a formula (10) is defined as the fitness function of the chromosome, and the chromosome is decoded into the corresponding path to obtain the real travel distance;
wherein f (R) is the fitness value of the chromosome; sim (e) i,i+1 ,e j,j+1 ) Is edge e i,i+1 And edge e j,j+1 (j=0, 1, …, k-1 and j+.i), the characteristics of the edge are determined by the characteristics of the POI that is in close proximity to the edge; k is the number of edges contained on path R;
step 6.3, local search, specifically as follows:
step 6.3.1, variation: randomly selecting one scenery side of one chromosome and replacing the scenery side with the other scenery side; ensuring that the maximum travel distance constraint allowed by the user is not violated when a new landscape edge is selected; finally, selecting an optimal chromosome for decoding;
step 6.3.2, crossing: selecting two chromosomes from all chromosomes by adopting a game mechanism, selecting one crossing position, and exchanging other genes after the crossing positions of the two chromosomes;
and 6.4, taking the path with the highest final fitness value as the scenic travel route planned for the user.
Example 1
The embodiment is a scenic tourism route planning method based on an improved cultural genetic algorithm, and the specific implementation process is as follows:
step 1, acquiring potential user preferences according to historical sign-in data of a user, wherein the potential user preferences are specifically as follows:
firstly, crawling historical sign-in data of a user from travel websites such as a carrying course, a passing cow, a going place and the like, obtaining data which is txt text, wherein one row represents a POI which is signed in by the user in a historical way, each row comprises at least one POI, and processing the text data to obtain a user sign-in matrix; secondly, crawling category characteristic data of each POI; finally, a label classification statistical method is used to obtain the favorite scenic spot types of the user, and the favorite scenic spot types are represented by single-hot codes to obtain the preference vector P (u) of the user. Meanwhile, the POI is encoded according to the characteristic type of the POI to obtain a characteristic vector T of the POI. Here, randomly selecting one user from sign-in users to perform preference extraction, and obtaining user preference historical remains, religions and temples.
Step 2, road network data of the western security city are obtained from the OSM, and preliminary cleaning is carried out; the method comprises the following steps:
firstly, entering an OSM (open service model) official network, finding out road network data of China, selecting the Sichuan city according to the range, and exporting to obtain the road network data of the Sichuan city; secondly, importing the shp file in the obtained road network data into an arcGIS, opening an attribute table of the layer data, and deleting useless records; and finally, exporting and storing the processed road network data.
Step 3, obtaining user interaction data of the POI, including information such as photo number, comment number, grade, score and the like, and adding the information into an attribute list of the corresponding POI; the method comprises the following steps:
firstly, entering a attack page of a travel network, searching a corresponding POI, and checking the corresponding photo number, comment number, grade and score; then, opening the attribute list of the POI in the arcGIS to edit, adding attribute field scores (score) (0.0-5.0), grades (levels) (none, A-AAAAA), photo numbers (pictures) and comment numbers (comment), and filling corresponding data on the carrier network; finally, according to the POI category characteristic data obtained in the step 1.2, adding a field category (type) into the POI attribute list (the method divides the POI types into 24) and filling corresponding data.
Step 4, modeling the road network according to the data obtained in the steps 1,2 and 3, and extracting effective edges which can reach the end point from the starting point according to the inquiry condition of the user; the method comprises the following steps:
firstly, modeling the processed road network data into a graph G= (N, E); then, assuming that the user query condition is Q= < south door of the university of western security worker, lotus lake park, 7.00km >, measuring in arcGIS, wherein the distance between the south door of the university of western security worker and the lotus lake park is 5.22km, drawing a rectangle by taking the line as a diagonal line, connecting another diagonal line, wherein the intersection point of the two diagonal lines is the midpoint of the line, taking the midpoint as the center of a circle, drawing a circle by taking 7.00km as the diameter, and the obtained area in the circle is the effective area; then, the data (points and lines) in the effective area are exported and stored as a working space, and the data processing is only carried out in the effective area later; finally, the road network data of the newly stored effective area is opened in arcGIS, and neighbor tables (the neighbor distance is 300m in the neighbor analysis because the POI within the distance of 300m is considered to be visible in the method) between the national road, the county road and the village road and the POI are respectively generated by using a neighbor analysis tool, and part of the neighbor tables are shown in table 1.
TABLE 1 neighbor list between village and POI
OBJECTID* IN_FID NEAR_FID NEAR_DIST NEAR_FC
1 1 45 0.012451 Other POIs
2 2 45 0.012892 Other POIs
3 4 2 0.181624 School
4 5 2 0.197818 School
In the table, the object field is the ID of the record, and is used to represent the serial number of the record; in_fid represents the ID of the edge performing the neighbor analysis IN the attribute table (here, the "village-road" attribute table); near_fid represents the ID of the POI point IN the attribute table (here, lines 1,2 are the "other POI" attribute table, lines 3, 4 are the "school" attribute table) IN the attribute table adjacent to in_fid; the near_dist field indicates the distance from near_fid to in_fid IN km; near_fc represents the table name of the table to which near_fid that is adjacent to in_fid belongs.
Step 5, calculating the landscape value on the effective edge in the road network according to the data obtained in the steps 1,2 and 3; the method comprises the following steps:
firstly, constructing a user-POI sign-in matrix according to user historical sign-in data; then, extracting POIs (point of interest) involved in an effective area, constructing a co-access matrix for the POIs, wherein a first row and a first column of the co-access probability matrix are POIs, elements at other positions of the matrix represent co-access probabilities of two POIs at corresponding positions, and the co-access probability is calculated by combining a formula (3) with a user-POI sign-in matrix; then, a similarity matrix is constructed, and matrix elements represent similarity of category characteristics between two POIs; then, carrying out element product on the co-visit probability matrix and the similarity matrix to obtain a POI correlation matrix, wherein matrix elements represent the degree of closeness of the relationship between any two POIs; finally, calculating scenery values of POI, edge and route according to formulas (6), (7) and (8).
Step 6, searching the effective edges in the road network according to the scenic values by using a cultural genetic algorithm based on the data obtained in the step, and planning a scenic travel route with high scenic values and high user satisfaction for the user; the method comprises the following steps:
firstly, initializing an empty chromosome, then selecting a landscape edge closest to a starting point from landscape edges, adding the landscape edge to the tail of the chromosome, and updating constraint conditions; then, the selection, insertion and updating operations are circularly executed until the constraint condition is not met; then, decoding the encoded chromosome to obtain an actual form distance, and determining an fitness value (the physical meaning is user satisfaction) of the chromosome according to a formula (10); finally, performing crossover and mutation operations to improve the fitness value of the chromosome, and finally converting the chromosome with the highest fitness value into an actual driving route to be returned to a user, wherein the final route is as follows: south door of the university of Siam Innovative Siro, - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -string) string of the lotus) lake park end point.

Claims (5)

1. A travel route planning method based on cultural genetic algorithm is characterized by comprising the following specific steps:
step 1, acquiring potential preference of a user to POI according to historical sign-in data of the user and POI type feature data;
step 2, obtaining road network data from the OSM and carrying out data preprocessing;
step 3, obtaining user interaction information data of the POI, including the number of photos, the number of comments, the grade and grading information, and adding the user interaction information data into a corresponding POI attribute list;
step 4, modeling the road network according to the user potential preference data, the preprocessed road network data and the attribute table of the POI, and extracting effective edges which can reach the end point from the starting point according to the user query condition;
the step 4 comprises the following steps:
step 4.1, road network modeling: a road network is modeled as a graph g= (N, E), where N is a set of nodes and E N x N is a set of directed edges;
step 4.2, path definition: one path is formed by sequentially connecting a plurality of edges in a road network, and one path is formed from a source point n 0 To destination n k The path is denoted as r= (e 0,1 ,e 1,2 ,…,e k-1,k ) Wherein n is 0 、n k Belongs to the set N, E belongs to the set E, E 0,1 Representing node n 0 To n 1 Is a side of (2);
step 4.3, user query definition: user queries are defined as triples, denoted q=<n 0 ,n k ,d>Wherein n is 0 、n k Respectively representing a starting point and a terminal point defined by a user, wherein d is the maximum travel distance allowed by the user;
step 4.4, determining an effective area: taking the middle points of a starting point and a finishing point defined by a user as a circle center, taking the maximum travel distance allowed by the user as a diameter, drawing a circle, wherein an area in the circle is an effective area, and an edge in the effective area is an effective edge;
step 4.5, obtaining a neighbor table: the scenery value on the effective edge is calculated according to the scenery value of the POI adjacent to the edge, so that the adjacent distance needs to be set, and an adjacent table of the edge is obtained; the contents of the table include: the ID and name of the edge, the ID and name of the POI adjacent to the edge, and the adjacent distance;
step 5, calculating the landscape value of the effective edge according to the potential preference data of the user, the preprocessed road network data and the attribute list of the POI;
the step 5 comprises the following steps:
step 5.1, establishing a landscape value mathematical model, wherein the landscape value mathematical model comprises a co-visit probability function among POIs, a similarity function among POIs and a correlation function among POIs, and the formula of the co-visit probability function is as follows:
wherein Co_VP (i, j) represents POI i And POI j Co-visit probability of N i,j Indicating simultaneous access to POIs i And POI j Number of users, N i Indicating that only POIs have been accessed i Without accessing POI j The number of users of (a);
the similarity function formula between the POIs is as follows:
wherein Sim (i, j) represents POI i And POI j Similarity between features, T i,d Is POI i Feature vector T i A component of dimension d;
the formula of the relevance function between the POIs is as follows:
r(i,j)=Co_VP(i,j)×Sim(i,j) (6)
wherein r (i, j) represents POI i And POI j The larger the correlation between the values of r (i, j), the description POI i And POI j The closer the relationship is, the less the scenery value is lost when the two are combined;
step 5.2, calculating landscape value: the calculation of the landscape value comprises three parts: POI landscape value calculation, edge landscape value calculation and path landscape value calculation are specifically as follows:
the scenery value of the POI is mainly determined by the corresponding score, grade, photo number and comment number of the POI, and the larger the values are, the larger the scenery value of the POI is, and the calculation mode is as follows:
scenic(i)=(score(i)+level(i)+picture(i)+comCount(i))×(1+w i ) (7)
wherein scenic (i) is POI i Scenery (i), level (i), picture (i), com count (i) represent POI respectively i Scoring, rating, number of photos and number of comments on the carrier network; w (w) i Is POI i Feature vector T of (1) i Cosine similarity between the user preference vector P (u) is used for describing the preference condition of the user to the POI;
the landscape value on the edge is determined by the landscape value of the POI adjacent to the edge, and for convenience in searching, the edge with the landscape value larger than 0 is marked as a landscape edge, and the formula is as follows:
wherein m is the sum of edges e i,i+1 The number of neighboring POIs;
the landscape value of the path is calculated by the landscape value of the edge contained in the path, and the calculation formula is as follows:
step 6, searching the effective edges and landscape values in the road network by using a cultural genetic algorithm, and planning a landscape travel route with high landscape values and high user satisfaction for the user;
the step 6 comprises the following steps:
step 6.1, chromosome coding: firstly, initializing an empty chromosome; next, a nearest scene edge from the beginning point is selected from the scenery edges obtained in step 5.2Is added to the end of the chromosome; again, the d value in the user query condition is updated, i.e. d=d-dis (e i,j ) Wherein dis (e i,j ) Is edge e i,j Is a distance of (2); finally, the above operation is carried out in a cyclic way until d is less than or equal to 0, and the obtained chromosome is encoded by a series of landscape edges;
step 6.2, chromosome decoding: for the encoded chromosome, the purpose of decoding is to fill the gap between two continuous landscape edges, namely, find the real path of the encoded chromosome on the road network, the landscape value of the chromosome is contributed by the landscape value of the landscape edge, and a formula (10) is defined as the fitness function of the chromosome, and the chromosome is decoded into the corresponding path to obtain the real travel distance;
wherein f (R) is the fitness value of the chromosome; sim (e) i,i+1 ,e j,j+1 ) Is edge e i,i+1 And edge e j,j+1 (j=0, 1, …, k-1 and j+.i), the characteristics of the edge are determined by the characteristics of the POI that is in close proximity to the edge; k is the number of edges contained on path R;
step 6.3, local search, specifically as follows:
step 6.3.1, variation: randomly selecting one scenery side of one chromosome and replacing the scenery side with the other scenery side; ensuring that the maximum travel distance constraint allowed by the user is not violated when a new landscape edge is selected; finally, selecting an optimal chromosome for decoding;
step 6.3.2, crossing: selecting two chromosomes from all chromosomes by adopting a game mechanism, selecting one crossing position, and exchanging other genes after the crossing positions of the two chromosomes;
and 6.4, taking the path with the highest final fitness value as the scenic travel route planned for the user.
2. The travel route planning method according to claim 1, wherein the step 1 includes:
step 1.1, acquiring historical sign-in data of a user from a travel website, wherein the data content is txt text, and one row of sign-in information of the user is represented by one to a plurality of POIs;
step 1.2, acquiring basic information of POIs signed by users from various tourist websites, wherein the data content comprises names, geographic positions, type characteristics and open time of tourist attractions;
and step 1.3, extracting the user preference of the information obtained in the step 1.1 and the step 1.2 by a label classification statistical method to obtain the potential preference data of the user.
3. The travel route planning method according to claim 2, wherein the step 1.3 includes:
step 1.3.1, acquiring a user-POI sign-in matrix UC according to user historical sign-in data; each element uc in the matrix i,j Obtained from formula (1):
wherein uc i,j Indicating that user i is at POI j The number of check-in times, i and j are subscript variables;
step 1.3.2, acquiring a POI-type matrix PT according to POI type characteristic data and sign-in data; each element pt in the matrix i,j Obtained from formula (2):
wherein pt i,j Representing POIs i Whether or not to have type feature T j
Step 1.3.3, obtaining a user-type sign-in matrix UT according to the user-POI sign-in matrix and the POI-type matrix; each element ut in the matrix i,j Obtained from formula (3):
wherein ut is i,j Representing user i versus type feature T j Of the number of check-ins, i.e. the user has gone through a user having a type feature T j The number of POIs of (a) a;
and 1.3.4, sorting POI type features in a user-type sign-in matrix according to the decreasing order of the number of times of user sign-in, taking TOP-N types with the largest number of times of sign-in as user preference, and encoding by using a single-heat encoding to obtain a user preference vector, namely the potential preference data of the user.
4. The travel route planning method based on cultural genetic algorithm as defined in claim 1, wherein step 2 specifically comprises: and downloading urban road network data from the OSM, and reserving national road, provincial road, county road, village road, university, park and POI data in the road network data, and performing other clearing treatment to obtain pretreated urban road network data.
5. The travel route planning method based on cultural genetic algorithm as defined in claim 1, wherein the specific steps of the step 3 are as follows: and extracting scoring, comment number, grade and photo number information of the POI from the user in the tourism website, and marking the scoring, comment number, grade and photo number information on the corresponding POI to form a POI attribute list.
CN202110993353.6A 2021-08-27 2021-08-27 Travel route planning method based on cultural genetic algorithm Active CN113819916B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110993353.6A CN113819916B (en) 2021-08-27 2021-08-27 Travel route planning method based on cultural genetic algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110993353.6A CN113819916B (en) 2021-08-27 2021-08-27 Travel route planning method based on cultural genetic algorithm

Publications (2)

Publication Number Publication Date
CN113819916A CN113819916A (en) 2021-12-21
CN113819916B true CN113819916B (en) 2024-01-09

Family

ID=78913639

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110993353.6A Active CN113819916B (en) 2021-08-27 2021-08-27 Travel route planning method based on cultural genetic algorithm

Country Status (1)

Country Link
CN (1) CN113819916B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013041517A1 (en) * 2011-09-22 2013-03-28 Telefonica, S.A. A method to generate a personalized tourist route
CN109631923A (en) * 2018-11-30 2019-04-16 重庆大学 It is a kind of based on mould because of the landscape drive route planing method of algorithm
CN111177572A (en) * 2020-01-16 2020-05-19 西北大学 Personalized tour route recommendation method based on dynamic interest of user
CN111369047A (en) * 2020-03-02 2020-07-03 中国科学院软件研究所 Tour route planning method and system based on microbial genetic algorithm
CN113077102A (en) * 2021-04-16 2021-07-06 合肥工业大学 Landscape route optimization method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013041517A1 (en) * 2011-09-22 2013-03-28 Telefonica, S.A. A method to generate a personalized tourist route
CN109631923A (en) * 2018-11-30 2019-04-16 重庆大学 It is a kind of based on mould because of the landscape drive route planing method of algorithm
CN111177572A (en) * 2020-01-16 2020-05-19 西北大学 Personalized tour route recommendation method based on dynamic interest of user
CN111369047A (en) * 2020-03-02 2020-07-03 中国科学院软件研究所 Tour route planning method and system based on microbial genetic algorithm
CN113077102A (en) * 2021-04-16 2021-07-06 合肥工业大学 Landscape route optimization method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
个性化推荐系统用户兴趣建模方式的研究;韩旭;;数字技术与应用(11);第44-46页 *
基于用户兴趣和兴趣点流行度的个性化旅游路线推荐;吴清霞;周娅;文缔尧;贺正红;;计算机应用(06);第1762-1766页 *

Also Published As

Publication number Publication date
CN113819916A (en) 2021-12-21

Similar Documents

Publication Publication Date Title
CN109977283B (en) Tourism recommendation method and system based on knowledge graph and user footprint
CN109145169B (en) Address matching method based on statistical word segmentation
Jiang et al. Author topic model-based collaborative filtering for personalized POI recommendations
CN104537027B (en) Information recommendation method and device
Zheng et al. GeoLife: A collaborative social networking service among user, location and trajectory.
CN108681586B (en) Tourist route personalized recommendation method based on crowd sensing
WO2016107417A1 (en) Method and device for exploiting travel route on basis of tourist destination area
CN111177572B (en) Personalized travel route recommendation method based on dynamic interests of user
CN109189959A (en) A kind of method and device constructing image data base
CN105678412A (en) Path planning method and device facing multiple passengers
CN111931077B (en) Data processing method, device, electronic equipment and storage medium
CN109284443A (en) A kind of tourism recommended method and system based on crawler technology
Chen et al. Personalized travel route recommendation algorithm based on improved genetic algorithm
CN115408618B (en) Point-of-interest recommendation method based on social relation fusion position dynamic popularity and geographic features
Reyes et al. GPS trajectory clustering method for decision making on intelligent transportation systems
CN110532464B (en) Tourism recommendation method based on multi-tourism context modeling
CN111141301A (en) Navigation end point determining method, device, storage medium and computer equipment
AlHalawani et al. What makes London work like London?
Cao An Optimal Round‐Trip Route Planning Method for Tourism Based on Improved Genetic Algorithm
Chatterjee et al. SAGEL: smart address geocoding engine for supply-chain logistics
CN116823535B (en) Journey planning and intelligent navigation system based on multi-mode large model
CN113819916B (en) Travel route planning method based on cultural genetic algorithm
CN113642313A (en) Address text processing method, device, equipment, storage medium and program product
CN113112058B (en) Tourism route recommendation method based on knowledge graph and ant colony algorithm
CN111797331A (en) Multi-target multi-constraint route recommendation method based on crowd sensing

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant