CN113819916A - Tourist route planning method based on cultural genetic algorithm - Google Patents
Tourist route planning method based on cultural genetic algorithm Download PDFInfo
- Publication number
- CN113819916A CN113819916A CN202110993353.6A CN202110993353A CN113819916A CN 113819916 A CN113819916 A CN 113819916A CN 202110993353 A CN202110993353 A CN 202110993353A CN 113819916 A CN113819916 A CN 113819916A
- Authority
- CN
- China
- Prior art keywords
- poi
- user
- edge
- data
- scenic
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 30
- 238000004422 calculation algorithm Methods 0.000 title claims abstract description 24
- 230000002068 genetic effect Effects 0.000 title claims abstract description 22
- 230000003993 interaction Effects 0.000 claims abstract description 9
- 238000004140 cleaning Methods 0.000 claims abstract description 3
- 210000000349 chromosome Anatomy 0.000 claims description 51
- 239000011159 matrix material Substances 0.000 claims description 39
- 238000004364 calculation method Methods 0.000 claims description 15
- 238000005314 correlation function Methods 0.000 claims description 6
- 238000013178 mathematical model Methods 0.000 claims description 6
- NAWXUBYGYWOOIX-SFHVURJKSA-N (2s)-2-[[4-[2-(2,4-diaminoquinazolin-6-yl)ethyl]benzoyl]amino]-4-methylidenepentanedioic acid Chemical compound C1=CC2=NC(N)=NC(N)=C2C=C1CCC1=CC=C(C(=O)N[C@@H](CC(=C)C(O)=O)C(O)=O)C=C1 NAWXUBYGYWOOIX-SFHVURJKSA-N 0.000 claims description 4
- 230000035772 mutation Effects 0.000 claims description 4
- 108090000623 proteins and genes Proteins 0.000 claims description 4
- 238000007619 statistical method Methods 0.000 claims description 4
- 230000002759 chromosomal effect Effects 0.000 claims description 3
- 238000007781 pre-processing Methods 0.000 claims description 3
- 238000012552 review Methods 0.000 claims description 3
- 238000012163 sequencing technique Methods 0.000 claims description 3
- 238000000605 extraction Methods 0.000 claims description 2
- 240000002853 Nelumbo nucifera Species 0.000 description 3
- 235000006508 Nelumbo nucifera Nutrition 0.000 description 3
- 235000006510 Nelumbo pentapetala Nutrition 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000009193 crawling Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000003780 insertion Methods 0.000 description 1
- 230000037431 insertion Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01C—MEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
- G01C21/00—Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
- G01C21/26—Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 specially adapted for navigation in a road network
- G01C21/34—Route searching; Route guidance
- G01C21/3453—Special cost functions, i.e. other than distance or default speed limit of road segments
- G01C21/3476—Special 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
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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/00—Administration; Management
- G06Q10/04—Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
- G06Q10/047—Optimisation of routes or paths, e.g. travelling salesman problem
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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/00—Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
- G06Q50/10—Services
- G06Q50/14—Travel 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 tourism route planning method based on a cultural genetic algorithm, which comprises the following specific steps of: step 1, acquiring potential preference data of a user; step 2, obtaining road network data and cleaning; step 3, acquiring user interaction information data of the POI to form 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 effective edges which can reach the end point from the starting point according to the query condition of the user; step 5, obtaining landscape values of effective edges according to the potential preference data of the user, the road network data and the attribute table of the POI; and 6, searching the effective edges and the scenic values in the road network by using a cultural genetic algorithm, and planning a scenic tourism route with higher scenic values and user satisfaction degrees 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
Technical Field
The invention belongs to the technical field of route planning, and relates to a tourism route planning method based on a cultural genetic algorithm.
Background
As people's standard of living increases, more and more people choose to travel as a way to entertain them, and at the same time, they want to be able to reach the destination as close as possible and with as little overhead as possible, thereby improving the overall travel experience. Therefore, various route planning algorithms are in endless, and reasonable route planning can save travel cost for users, greatly improve the travel interest of the users and has important significance for the development of the travel industry.
The traditional route planning methods aim at planning a route from a source to a destination with short distance, less time and less expense for a user, and the route planning methods only consider the travel efficiency of the user and neglect the problems of personal preference of the user, the landscape value of the route, the personalized demand of the user and the like, namely when the user wants to drive a vehicle to travel, the landscape meeting the preference of the user along the way can improve the travel experience of the user to a certain extent, and is very important for the user.
Disclosure of Invention
The invention aims to provide a tourism route planning method based on a cultural genetic algorithm, which solves the problems that user preference, a route landscape value and user personalized requirements are not considered when route planning is carried out in the prior art.
The technical scheme adopted by the invention is that,
a tourism route planning method based on a cultural genetic algorithm comprises the following specific steps:
step 1, acquiring potential preference of a user to POI (Point of Interest) according to historical sign-in data of the user and POI type characteristic data;
step 2, obtaining road network data from an Open Street Map (OSM) and preprocessing the road network data;
step 3, acquiring user interaction information data of the POI, including information such as the number of photos, the number of comments, the grade, the score and the like, and adding the user interaction information data into a corresponding POI attribute list;
step 4, modeling the road network according to the potential preference data of the user, 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 query condition of the user;
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 table of the POI;
and 6, searching the effective edges and the scenic values in the road network by using a cultural genetic algorithm, and planning a scenic tourism route with higher scenic values and user satisfaction degrees for the user.
The invention is also characterized in that:
wherein the step 1 comprises:
step 1.1, acquiring historical sign-in data of a user from a tourism website, wherein the data content is txt text, one line represents sign-in information of the user and consists of one or more POI (point of interest);
step 1.2, acquiring basic information of POI signed in by a user from each tourist website, wherein the data content comprises names, geographical positions, type characteristics and opening time of tourist attractions;
step 1.3, extracting the user preference of the information obtained in step 1.1 and step 1.2 by a label classification statistical method to obtain the potential preference data of the user, and the specific steps are as follows:
step 1.3 comprises:
step 1.3.1, acquiring a user-POI sign-in matrix UC according to historical sign-in data of a user; each element uc in the matrixi,jObtained from equation (1):
wherein uci,jIndicating user i is at POIjOnThe sign-in times are represented by i and j as 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 matrixi,jFrom equation (2):
wherein pt isi,jRepresenting POIiWhether or not there is a type feature Tj;
Step 1.3.3, acquiring a user-type check-in matrix UT according to the user-POI check-in matrix and the POI-type matrix; each element ut in the matrixi,jFrom equation (3):
wherein uti,jRepresenting user i vs. type characteristics TjThe number of sign-ins, i.e. the user has gone to have the type characteristic TjThe number of POIs in;
and step 1.3.4, sequencing POI type characteristics in the user-type check-in matrix in a descending order according to the check-in times of the user, taking TOP-N types with the most check-in times as user preference, and coding by using one-hot coding to obtain a user preference vector, namely the user potential preference data.
The specific steps of the step 2 are as follows: and uploading road network data of the city from the OSM, reserving national road, provincial road, county road, village and town road, university, park and POI data in the road network data, and removing other data to obtain the preprocessed city road network data.
The specific steps of the step 3 are as follows: and extracting the information of the scores, the comment numbers, the grades and the photo numbers of the POIs by the users in the tourism website, and marking the information to the corresponding POIs to form a POI attribute list.
Wherein the step 4 comprises:
step 4.1, modeling a road network: a road network is modeled as a graph G ═ (N, E), where N is the set of nodes (intersections and culminations), E ∈ N × N is the set of directed edges;
step 4.2, path definition: a path is formed by connecting a plurality of edges in the road network in sequence, and a slave source point n0To destination nkIs denoted as R ═ e0,1,e1,2,…,ek-1,k) Wherein n is0、nkBelonging to the set N, E to the set E, E0,1Representing a node n0To n1The edge of (1);
step 4.3, user query definition: user queries are defined as triplets, denoted as Q ═ n0,nkD > -, wherein n0、nkRespectively representing a starting point and an end point defined by a user, and d is the maximum travel distance allowed by the user;
step 4.4, determining an effective area: drawing a circle by taking the midpoint of a starting point and an end point defined by a user as the circle center and the maximum travel distance allowed by the user as the diameter, wherein the area in the circle is an effective area, and the edge in the effective area is an effective edge;
step 4.5, acquiring a neighbor table: the scenic value on the effective edge is calculated according to the scenic value of the POI adjacent to the edge, so that the adjacent distance needs to be set to obtain an adjacent table of the edge; 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 neighbor distance.
Wherein the step 5 comprises:
step 5.1, establishing a scenery value mathematical model, wherein the scenery value mathematical model comprises a co-visit probability function among POIs, a similarity function among the POIs and a correlation function among the POIs, and the co-visit probability function formula is as follows:
wherein Co-VP (i, j) represents POIiAnd POIjProbability of co-visit, Ni,jIndicating simultaneous access to POIsiAnd POIjNumber of users, NiIndicating that only POI has been visitediNo POI visitedjThe number of users;
the similarity function between POIs is formulated as:
where Sim (i, j) represents a POIiAnd POIjSimilarity between type features, Ti,dIs a POIiType feature vector TiA component of dimension d;
the correlation function between POIs is formulated as:
r(i,j)=Co_VP(i,j)×Sim(i,j) (6)
wherein r (i, j) represents POIiAnd POIjThe larger the r (i, j) value is, the POI is showniAnd POIjThe closer the relationship between the two is, the less landscape value loss is when the two are combined;
step 5.2, calculating landscape value: the calculation of the landscape value includes three parts: POI scenery value calculation, edge scenery value calculation and path scenery value calculation are specifically as follows:
the landscape value of a POI is mainly determined by the score (score), level (level), number of photos (photos), number of comments (comCount) and the like corresponding to the POI, and the larger these values are, the larger the landscape value of the POI is, and the calculation method is as follows:
scenic(i)=(score(i)+level(i)+picture(i)+comCount(i))×(1+wi) (7)
wherein, scientific (i) is POIiThe landscape values of (1), (score), (i), (level), (i), (picture), (i), comcount (i) respectively represent POIiRating, number of photos and number of reviews on the portable network; w is aiIs a POIiCharacteristic vector T ofiCosine similarity with the preference vector P (u) of the user is used for describing the preference condition of the user to the POI;
the edge scene value is determined by the scene values of the POIs adjacent to the edge, for the convenience of searching, the edge with the scene value larger than 0 is marked as the scene edge, and the formula is as follows:
wherein m is the same as the edge ei,i+1The number of neighbor POIs;
the scenic value of the path is calculated by the scenic values of the edges included in the path according to the following formula:
wherein step 6 comprises:
step 6.1, chromosomal coding: firstly, initializing a vacant chromosome; secondly, selecting a scenic edge closest to the starting point from the scenic edges obtained in the step 5.2.2 and adding the scenic edge to the tail of the chromosome; again, the value of d in the user query condition, i.e., d-dis (e), is updatedi,j) Where dis (e)i,j) Is an edge ei,jThe distance of (d); finally, circularly executing the above operations until d is less than or equal to 0, and obtaining the chromosome coded by a series of landscape edges;
step 6.2, chromosome decoding: for the coded chromosome, the purpose of decoding is to fill a gap between two continuous landscape edges, namely to find a real path of the coded chromosome on a road network, wherein the landscape value of the chromosome is contributed by the landscape value of the landscape edge, a formula (10) is defined as a fitness function of the chromosome, and the chromosome is decoded into a corresponding path to obtain a real travel distance;
wherein f (R) is the fitness value of the chromosome; sim (e)i,i+1,ej,j+1) Is an edge ei,i+1And edge ej,j+1(i, j ≠ 0,1, …, k-1, and j ≠ i), the features of the edge are determined by the features of POIs neighboring the edge; k is the number of edges included on the path R;
step 6.3, local search, which is specifically as follows:
step 6.3.1, mutation: randomly selecting a landscape edge of a chromosome, and replacing the landscape edge with another landscape edge; when a new scenic edge is selected, the maximum travel distance constraint allowed by a user is not violated; finally, selecting an optimal chromosome for decoding;
step 6.3.2, crossing: selecting two chromosomes in all chromosomes by adopting a game mechanism, selecting a cross site, and exchanging other genes behind the cross site of the two chromosomes;
and 6.4, taking the path with the highest final fitness value as a scenic tour route planned for the user.
The invention has the beneficial effects that:
the method introduces the concept of user preference, namely when the route planning is carried out, the scenic value of the route is required to be higher, and the scenic of the route is required to meet the user preference as much as possible, so that the route planning is more personalized, and the personalized requirements of the user can be met. Second, in calculating the landscape value, one edge is often adjacent to multiple POIs, and if only the landscape values of adjacent POIs are summed, the problem of loss of landscape value when the POIs are combined is ignored. Therefore, before calculating the landscape value of the edge, the relationship between the POI is modeled, and the co-visit probability of the user to the POI and the feature similarity between the POI are considered. As such, the closer the relationship between two POIs (the greater the probability of co-visit, the greater the feature similarity), the greater the contribution to the landscape value of the edge; conversely, the smaller the landscape value contribution to the edge. The modeling can calculate the landscape value of the edge more accurately, and the obtained path is more optimal. Finally, aiming at the problem that one POI is adjacent to a plurality of edges, in order to prevent the scenic view of the path from being repeated, the similarity of the edge features is considered when the scenic value of the path is calculated, and the greater the similarity is, the more POI is repeated, the smaller the contribution of the current edge to the scenic 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 present invention;
FIG. 2 is a flow chart of step 6.1 of the flow chart of the travel route planning method based on the cultural genetic algorithm of the present invention.
Detailed Description
The present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.
The invention relates to a travel route planning method based on a cultural genetic algorithm, which comprises the following specific steps of:
step 1, acquiring potential preference of a user to POI (Point of Interest) according to historical sign-in data of the user and POI type characteristic data;
step 2, obtaining road network data from an Open Street Map (OSM) and preprocessing the road network data;
step 3, acquiring user interaction information data of the POI, including information such as the number of photos, the number of comments, the grade, the score and the like, and adding the user interaction information data into a corresponding POI attribute list;
step 4, modeling the road network according to the potential preference data of the user, 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 query condition of the user;
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 table of the POI;
and 6, searching the effective edges and the scenic values in the road network by using a cultural genetic algorithm, and planning a scenic tourism route with higher scenic values and user satisfaction degrees for the user.
The invention is also characterized in that:
wherein the step 1 comprises:
step 1.1, acquiring historical sign-in data of a user from a tourism website, wherein the data content is txt text, one line represents sign-in information of the user and consists of one or more POI (point of interest);
step 1.2, acquiring basic information of POI signed in by a user from each tourist website, wherein the data content comprises names, geographical positions, type characteristics and opening time of tourist attractions;
step 1.3, extracting the user preference of the information obtained in step 1.1 and step 1.2 by a label classification statistical method to obtain the potential preference data of the user, and the specific steps are as follows:
step 1.3 comprises:
step 1.3.1, acquiring a user-POI sign-in matrix UC according to historical sign-in data of a user; each element uc in the matrixi,jObtained from equation (1):
wherein uci,jIndicating user i is at POIjThe sign-in times are shown in the specification, 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 matrixi,jFrom equation (2):
wherein pt isi,jRepresenting POIiWhether or not there is a type feature Tj;
Step 1.3.3, acquiring a user-type check-in matrix UT according to the user-POI check-in matrix and the POI-type matrix; each element ut in the matrixi,jFrom equation (3):
wherein uti,jRepresenting user i vs. type characteristics TjThe number of sign-ins, i.e. the user has gone to have the type characteristic TjThe number of POIs in;
and step 1.3.4, sequencing POI type characteristics in the user-type check-in matrix in a descending order according to the check-in times of the user, taking TOP-N types with the most check-in times as user preference, and coding by using one-hot coding to obtain a user preference vector, namely the user potential preference data.
The specific steps of the step 2 are as follows: and uploading road network data of the city from the OSM, reserving national road, provincial road, county road, village and town road, university, park and POI data in the road network data, and removing other data to obtain the preprocessed city road network data.
The specific steps of the step 3 are as follows: and extracting the information of the scores, the comment numbers, the grades and the photo numbers of the POIs by the users in the tourism website, and marking the information to the corresponding POIs to form a POI attribute list.
Wherein the step 4 comprises:
step 4.1, modeling a road network: a road network is modeled as a graph G ═ (N, E), where N is the set of nodes (intersections and culminations), E ∈ N × N is the set of directed edges;
step 4.2, path definition: a path is formed by connecting a plurality of edges in the road network in sequence, and a slave source point n0To destination nkIs denoted as R ═ e0,1,e1,2,…,ek-1,k) Wherein n is0、nkBelonging to the set N, E to the set E, E0,1Representing a node n0To n1The edge of (1);
step 4.3, user query definition: user queries are defined as triplets, denoted as Q ═ n0,nkD > -, wherein n0、nkRespectively representing a starting point and an end point defined by a user, and d is the maximum travel distance allowed by the user;
step 4.4, determining an effective area: drawing a circle by taking the midpoint of a starting point and an end point defined by a user as the circle center and the maximum travel distance allowed by the user as the diameter, wherein the area in the circle is an effective area, and the edge in the effective area is an effective edge;
step 4.5, acquiring a neighbor table: the scenic value on the effective edge is calculated according to the scenic value of the POI adjacent to the edge, so that the adjacent distance needs to be set to obtain an adjacent table of the edge; 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 neighbor distance.
Wherein the step 5 comprises:
step 5.1, establishing a scenery value mathematical model, wherein the scenery value mathematical model comprises a co-visit probability function among POIs, a similarity function among the POIs and a correlation function among the POIs, and the co-visit probability function formula is as follows:
wherein Co-VP (i, j) represents POIiAnd POIjProbability of co-visit, Ni,jIndicating simultaneous access to POIsiAnd POIjNumber of users, NiIndicating that only POI has been visitediNo POI visitedjThe number of users;
the similarity function between POIs is formulated as:
where Sim (i, j) represents a POIiAnd POIjSimilarity between type features, Ti,dIs a POIiType feature vector TiA component of dimension d;
the correlation function between POIs is formulated as:
r(i,j)=Co_VP(i,j)×Sim(i,j) (6)
wherein r (i, j) represents POIiAnd POIjThe larger the r (i, j) value is, the POI is showniAnd POIjThe closer the relationship between the two is, the less landscape value loss is when the two are combined;
step 5.2, calculating landscape value: the calculation of the landscape value includes three parts: POI scenery value calculation, edge scenery value calculation and path scenery value calculation are specifically as follows:
the landscape value of a POI is mainly determined by the score (score), level (level), number of photos (photos), number of comments (comCount) and the like corresponding to the POI, and the larger these values are, the larger the landscape value of the POI is, and the calculation method is as follows:
scenic(i)=(score(i)+level(i)+picture(i)+comCount(i))×(1+wi) (7)
wherein, scientific (i) is POIiThe landscape values of (1), (score), (i), (level), (i), (picture), (i), comcount (i) respectively represent POIiRating, number of photos and number of reviews on the portable network; w is aiIs a POIiCharacteristic vector T ofiCosine similarity with the preference vector P (u) of the user is used for describing the preference condition of the user to the POI;
the edge scene value is determined by the scene values of the POIs adjacent to the edge, for the convenience of searching, the edge with the scene value larger than 0 is marked as the scene edge, and the formula is as follows:
wherein m is the same as the edge ei,i+1The number of neighbor POIs;
the scenic value of the path is calculated by the scenic values of the edges included in the path according to the following formula:
wherein step 6 comprises:
step 6.1, chromosomal coding: firstly, initializing a vacant chromosome; secondly, selecting a scenic edge closest to the starting point from the scenic edges obtained in the step 5.2.2 and adding the scenic edge to the tail of the chromosome; again, the value of d in the user query condition, i.e., d-dis (e), is updatedi,j) Where dis (e)i,j) Is an edge ei,jThe distance of (d); finally, circularly executing the above operations until d is less than or equal to 0, and obtaining the chromosome coded by a series of landscape edges;
step 6.2, chromosome decoding: for the coded chromosome, the purpose of decoding is to fill a gap between two continuous landscape edges, namely to find a real path of the coded chromosome on a road network, wherein the landscape value of the chromosome is contributed by the landscape value of the landscape edge, a formula (10) is defined as a fitness function of the chromosome, and the chromosome is decoded into a corresponding path to obtain a real travel distance;
wherein f (R) is the fitness value of the chromosome; sim (e)i,i+1,ej,j+1) Is an edge ei,i+1And edge ej,j+1(j ≠ 0,1, …, k-1, and j ≠ i), the features of the edge are determined by the features of POIs neighboring the edge; k is the number of edges included on the path R;
step 6.3, local search, which is specifically as follows:
step 6.3.1, mutation: randomly selecting a landscape edge of a chromosome, and replacing the landscape edge with another landscape edge; when a new scenic edge is selected, the maximum travel distance constraint allowed by a user is not violated; finally, selecting an optimal chromosome for decoding;
step 6.3.2, crossing: selecting two chromosomes in all chromosomes by adopting a game mechanism, selecting a cross site, and exchanging other genes behind the cross site of the two chromosomes;
and 6.4, taking the path with the highest final fitness value as a scenic tour route planned for the user.
Example 1
The embodiment is a scenic tourism route planning method based on an improved culture gene algorithm, and the specific implementation process is as follows:
step 1, obtaining potential preferences of a user according to historical sign-in data of the user, specifically as follows:
the method comprises the steps that firstly, historical sign-in data of a user are crawled from travel websites such as journey, tourist destinations and where the user goes, the obtained data are txt texts, one line represents a POI which the user has historically signed in, each line comprises at least one POI, and the text data are processed to obtain a sign-in matrix of the user; secondly, crawling category feature data of each POI; and finally, obtaining the types of the scenic spots favored by the user by using a label classification statistical method, and representing by using one-hot coding to obtain a preference vector P (u) of the user. And meanwhile, coding the POI according to the characteristic type of the POI to obtain a characteristic vector T of the POI. And selecting one user from the checked-in users at random for preference extraction to obtain the user preference historical relics, religions and temples.
Step 2, obtaining road network data of the city of Xian from the OSM, and carrying out primary cleaning; the method comprises the following specific steps:
firstly, entering an OSM official network, finding road network data of China, then selecting the Xian city according to the range, and exporting to obtain the road network data of the Xian city; secondly, importing the shp file in the obtained road network data into the 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, acquiring user interaction data of the POI, including information such as the number of photos, the number of comments, the grade, the score and the like, and adding the user interaction data into an attribute list of the corresponding POI; the method comprises the following specific steps:
firstly, entering a strategy page of a portable network, searching a corresponding POI, and checking the corresponding photo number, comment number, grade and score; then, opening an attribute table of the POI in the arcGIS for editing, adding attribute field scores (score) (0.0-5.0), levels (level) (none, A-AAAAA), photo numbers (pictures) and comment numbers (comunt), and filling corresponding data on the portable network; finally, according to the POI category feature data obtained in step 1.2, field categories (types) are added to the POI attribute table (this method divides the POI types into 24), and corresponding data are filled in.
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 query condition of the user; the method comprises the following specific steps:
firstly, modeling the processed road network data into a graph G ═ N, E; then, assuming that the query condition of a user is Q ═ 7.00km > in the south door of the university of Sian rational, the lotus lake park, measured in the arcGIS, that the distance of a connecting line between the south door of the university of Sian rational and the lotus lake park is 5.22km, drawing a rectangle by taking the connecting line as a diagonal line, connecting the other diagonal line, taking the intersection point of the two diagonal lines as the midpoint of the connecting line, drawing a circle by taking the midpoint as the center of a circle and 7.00km as the diameter, and obtaining an area in the circle as an effective area; then, exporting the data (point and line) in the effective area, storing the data as a working space, and then processing the data only in the effective area; finally, the newly stored road network data of the effective area is opened in arcGIS, and neighbor tables with the POIs are generated for national roads, county roads, and village and town roads, respectively, using a neighbor analysis tool (in the present method, since POIs within a distance of 300m are considered to be visible, the neighbor distance in neighbor analysis is 300m), and part of the neighbor tables are shown in table 1.
TABLE 1 neighbor List between village and town streets and POIs
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 field of object ID is the ID of the record, and is used to indicate the serial number of the record; IN _ FID represents the ID of the edge under neighbor analysis IN the attribute table (here, the "Country road" attribute table); NEAR _ FID represents the ID of the POI point nearest to IN _ FID IN the attribute table (here, row 1, 2 is the "other POI" attribute table, row 3, 4 is the "school" attribute table); the NEAR _ DIST field indicates the distance from NEAR _ FID to IN _ FID IN km; NEAR _ FC indicates the table name of the table to which NEAR _ FID neighboring IN _ FID belongs.
Step 5, according to the data obtained in the steps 1, 2 and 3, calculating landscape values on effective edges in the road network; the method comprises the following specific steps:
firstly, constructing a user-POI sign-in matrix according to historical sign-in data of a user; then, POIs involved in the effective area are extracted, a co-visit matrix is constructed for the POIs, the first row and the first column of the co-visit probability matrix are the POIs, elements at other positions of the matrix represent the co-visit probability of the two POIs at the corresponding positions, and the co-visit probability is calculated by combining a formula (3) with a user-POI check-in matrix; then, constructing a similarity matrix, wherein matrix elements represent the similarity of the category characteristics between the 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 closeness degree of the relationship between any two POIs; finally, the scenery values of POI, edge and route are calculated according to the formulas (6), (7) and (8).
Step 6, based on the data obtained in the step, searching the effective edges in the road network by using a cultural genetic algorithm according to the landscape values of the effective edges, and planning a landscape tour route with higher landscape values and user satisfaction degrees for the user; the method comprises the following specific steps:
firstly, initializing an empty chromosome, then selecting a scenic edge closest to the initial point from the scenic edges and adding the scenic edge to the end of the chromosome, and updating the constraint conditions; then circularly executing the selection, insertion and updating operations until the constraint condition is not met; then, decoding the coded chromosome to obtain an actual form distance, and determining the fitness value of the chromosome according to a formula (10) (the physical meaning here is user satisfaction); and finally, performing intersection and mutation operations to improve the fitness value of the chromosome, finally converting the chromosome with the highest fitness value into an actual driving route and returning the actual driving route to the user, wherein the final route is as follows: the city park is characterized by comprising a southwest of the university of the xi' an principle, namely a Xian Jing Lu, a south segment of the city, a west segment of the city, a south Guangjijie street, a north Guangjie street, a schnei Temple street and a lotus lake park terminal point.
Claims (8)
1. A travel route planning method based on a cultural genetic algorithm is characterized by comprising the following specific steps:
step 1, acquiring potential preference of a user to POI (point of interest) according to historical sign-in data of the user and POI type characteristic data;
step 2, obtaining road network data from the OSM and carrying out data preprocessing;
step 3, acquiring user interaction information data of the POI, including information such as the number of photos, the number of comments, the grade, the score and the like, and adding the user interaction information data into a corresponding POI attribute list;
step 4, modeling the road network according to the potential preference data of the user, 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 query condition of the user;
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 table of the POI;
and 6, searching the effective edges and the scenic values in the road network by using a cultural genetic algorithm, and planning a scenic tourism route with higher scenic values and user satisfaction degrees for the user.
2. The cultural genetic algorithm-based travel route planning method as recited in claim 1, wherein the step 1 comprises:
step 1.1, acquiring historical sign-in data of a user from a tourism website, wherein the data content is txt text, one line represents sign-in information of the user and consists of one or more POI (point of interest);
step 1.2, acquiring basic information of POI signed in by a user from each tourist website, wherein the data content comprises names, geographical positions, type characteristics and opening time of tourist attractions;
and step 1.3, carrying out user preference extraction on the information obtained in the step 1.1 and the step 1.2 by a label classification statistical method to obtain potential preference data of the user.
3. A cultural genetic algorithm based travel route planning method according to claim 2, wherein the step 1.3 comprises:
step 1.3.1, acquiring a user-POI sign-in matrix UC according to historical sign-in data of a user; each element uc in the matrixi,jObtained from equation (1):
wherein uci,jIndicating user i is at POIjThe sign-in times are shown in the specification, 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 matrixi,jFrom equation (2):
wherein pt isi,jRepresenting POIiWhether or not there is a type feature Tj;
Step 1.3.3, acquiring a user-type check-in matrix UT according to the user-POI check-in matrix and the POI-type matrix; each element ut in the matrixi,jFrom equation (3):
wherein uti,jRepresenting user i vs. type characteristics TjThe number of sign-ins, i.e. the user has gone to have the type characteristic TjThe number of POIs in;
and step 1.3.4, sequencing POI type characteristics in the user-type check-in matrix in a descending order according to the check-in times of the user, taking TOP-N types with the most check-in times as user preference, and coding by using one-hot coding to obtain a user preference vector, namely the user potential preference data.
4. The cultural genetic algorithm-based travel route planning method according to claim 1, wherein the step 2 is specifically as follows: and uploading road network data of the city from the OSM, reserving national road, provincial road, county road, village and town road, university, park and POI data in the road network data, and performing cleaning treatment on the other road network data to obtain the preprocessed city road network data.
5. The cultural genetic algorithm-based travel route planning method as claimed in claim 1, wherein the step 3 comprises the following steps: and extracting the information of the scores, the comment numbers, the grades and the photo numbers of the POIs by the users in the tourism website, and marking the information to the corresponding POIs to form a POI attribute list.
6. The method for planning a travel route based on cultural genetic algorithm as claimed in claim 1, wherein the step 4 comprises:
step 4.1, modeling a road network: a road network is modeled as a graph G ═ (N, E), where N is the set of nodes (intersections and culminations), E ∈ N × N is the set of directed edges;
step 4.2, path definition: a path is formed by connecting a plurality of edges in the road network in sequence, and a slave source point n0To destination nkIs denoted as R ═ e0,1,e1,2,…,ek-1,k) Wherein n is0、nkBelonging to the set N, E to the set E, E0,1Representing a node n0To n1The edge of (1);
step 4.3, user query definition: user queries are defined as triplets, denoted as Q ═ n0,nkD > -, wherein n0、nkRespectively representing a starting point and an end point defined by a user, and d is the maximum travel distance allowed by the user;
step 4.4, determining an effective area: drawing a circle by taking the midpoint of a starting point and an end point defined by a user as the circle center and the maximum travel distance allowed by the user as the diameter, wherein the area in the circle is an effective area, and the edge in the effective area is an effective edge;
step 4.5, acquiring a neighbor table: the scenic value on the effective edge is calculated according to the scenic value of the POI adjacent to the edge, so that the adjacent distance needs to be set to obtain an adjacent table of the edge; 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 neighbor distance.
7. The cultural genetic algorithm-based travel route planning method as recited in claim 1, wherein the step 5 comprises:
step 5.1, establishing a scenery value mathematical model, wherein the scenery value mathematical model comprises a co-visit probability function among POIs, a similarity function among POIs and a correlation function among POIs, and the co-visit probability function formula is as follows:
wherein Co-VP (i, j) represents POIiAnd POIjProbability of co-visit, Ni,jIndicating simultaneous access to POIsiAnd POIjNumber of users, NiIndicating that only POI has been visitediNo POI visitedjThe number of users;
the similarity function formula between the POIs is as follows:
where Sim (i, j) represents a POIiAnd POIjSimilarity between features, Ti,dIs a POIiFeature vector TiA component of dimension d;
the correlation function formula among the POI is as follows:
r(i,j)=Co_VP(i,j)×Sim(i,j) (6)
wherein r (i, j) represents POIiAnd POIjThe larger the r (i, j) value is, the POI is showniAnd POIjThe closer the relationship between the two is, the less landscape value loss is when the two are combined;
step 5.2, calculating landscape value: the calculation of the landscape value includes three parts: POI scenery value calculation, edge scenery value calculation and path scenery value calculation are specifically as follows:
the landscape value of the POI is mainly determined by the score (score), level (level), number of photos (photos), number of comments (comCount) and the like corresponding to the POI, and the larger these values are, the larger the landscape value of the POI is, and the calculation method is as follows:
scenic(i)=(score(i)+level(i)+picture(i)+comCount(i))×(1+wi) (7)
wherein, scientific (i) is POIiThe landscape values of (1), (score), (i), (level), (i), (picture), (i), comcount (i) respectively represent POIiRating, number of photos and number of reviews on the portable network; w is aiIs a POIiCharacteristic vector T ofiCosine similarity with the preference vector P (u) of the user is used for describing the preference condition of the user to the POI;
the scenic value of the edge is determined by the scenic values of the POIs adjacent to the edge, and for the convenience of searching, the edge with the scenic value larger than 0 is marked as the scenic edge, and the formula is as follows:
wherein m is the same as the edge ei,i+1The number of neighbor POIs;
the scenic value of the path is calculated by the scenic value of the edge contained in the path according to the following formula:
8. the cultural genetic algorithm-based travel route planning method of claim 1, wherein the step 6 comprises:
step 6.1, chromosomal coding: firstly, initializing a vacant chromosome; secondly, selecting a scenic edge closest to the starting point from the scenic edges obtained in the step 5.2.2 and adding the scenic edge to the tail of the chromosome; again, the value of d in the user query condition, i.e., d-dis (e), is updatedi,j) Where dis (e)i,j) Is an edge ei,jThe distance of (d); finally, circularly executing the above operations until d is less than or equal to 0, and obtaining the chromosome coded by a series of landscape edges;
step 6.2, chromosome decoding: for the coded chromosome, the purpose of decoding is to fill a gap between two continuous landscape edges, namely to find a real path of the coded chromosome on a road network, wherein the landscape value of the chromosome is contributed by the landscape value of the landscape edge, a formula (10) is defined as a fitness function of the chromosome, and the chromosome is decoded into a corresponding path to obtain a real travel distance;
wherein f (R) is the fitness value of the chromosome; sim (e)i,i+1,ej,j+1) Is an edge ei,i+1And edge ej,j+1(j ≠ 0,1, …, k-1, and j ≠ i), the features of the edge are determined by the features of POIs neighboring the edge; k is the number of edges included on the path R;
step 6.3, local search, which is specifically as follows:
step 6.3.1, mutation: randomly selecting a landscape edge of a chromosome, and replacing the landscape edge with another landscape edge; when a new scenic edge is selected, the maximum travel distance constraint allowed by a user is not violated; finally, selecting an optimal chromosome for decoding;
step 6.3.2, crossing: selecting two chromosomes in all chromosomes by adopting a game mechanism, selecting a cross site, and exchanging other genes behind the cross site of the two chromosomes;
and 6.4, taking the path with the highest final fitness value as a scenic tour route planned for the user.
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 true CN113819916A (en) | 2021-12-21 |
CN113819916B 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)
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 |
-
2021
- 2021-08-27 CN CN202110993353.6A patent/CN113819916B/en active Active
Patent Citations (5)
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)
Title |
---|
吴清霞;周娅;文缔尧;贺正红;: "基于用户兴趣和兴趣点流行度的个性化旅游路线推荐", 计算机应用, no. 06, pages 1762 - 1766 * |
韩旭;: "个性化推荐系统用户兴趣建模方式的研究", 数字技术与应用, no. 11, pages 44 - 46 * |
Also Published As
Publication number | Publication date |
---|---|
CN113819916B (en) | 2024-01-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109977283B (en) | Tourism recommendation method and system based on knowledge graph and user footprint | |
Lim et al. | Personalized trip recommendation for tourists based on user interests, points of interest visit durations and visit recency | |
CN109145169B (en) | Address matching method based on statistical word segmentation | |
Jiang et al. | Author topic model-based collaborative filtering for personalized POI recommendations | |
Kurashima et al. | Travel route recommendation using geotagged photos | |
CN104537027B (en) | Information recommendation method and device | |
Zheng et al. | Mining interesting locations and travel sequences from GPS trajectories | |
JP4975711B2 (en) | Using multiple cost levels for route discovery calculations | |
CN104881472B (en) | A kind of travelling route sight spot combined recommendation method based on network data collection | |
CN101493329B (en) | Multiple target point path planning method and device | |
JP7181562B2 (en) | Method and Apparatus for Searching or Comparing Sites Using Routes or Route Distances Between Sites and Locations in a Transportation System | |
US20100211308A1 (en) | Identifying interesting locations | |
US9677904B2 (en) | Generating travel time data | |
CN111177572B (en) | Personalized travel route recommendation method based on dynamic interests of user | |
CN105677804A (en) | Determination of authority stations and building method and device of authority station database | |
Graser et al. | Is OSM good enough for vehicle routing? A study comparing street networks in Vienna | |
Krykewycz et al. | Web-based “crowdsourcing” approach to improve areawide “bikeability” scoring | |
JP2015156031A (en) | Method for representing linear structure part in location content management system | |
CN110532464B (en) | Tourism recommendation method based on multi-tourism context modeling | |
Ding et al. | Route planning in a new tourist recommender system: A fireworks algorithm based approach | |
CN1467692A (en) | Method for making electronic map | |
CN113112058B (en) | Tourism route recommendation method based on knowledge graph and ant colony algorithm | |
CN113819916A (en) | Tourist route planning method based on cultural genetic algorithm | |
CN111797331A (en) | Multi-target multi-constraint route recommendation method based on crowd sensing | |
Katsumi et al. | Generic POI recommendation |
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 |