Automatic generation method of schematic tourist route map driven by large model
Through incremental pre-training and supervising fine-tuning of the big model, combined with crawling technology and graphical optimization methods, a personalized schematic travel route map is generated, which solves the problem that the existing system cannot understand user needs and achieves efficient and beautiful travel route map generation.
Patent Information
- Application Number
- CN202411794214.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-09
- Publication Date
- 2025-08-15
- Estimated Expiration
- 2044-12-09
AI Technical Summary
The existing tourism map mapping system is difficult to personalize multimodal expression, cannot fully understand user needs, and the large language model is lacking in tourism-related corpus, which fails to effectively generate personalized tourism route maps.
Through incremental pre-training and supervising fine-tuning of the big model, combining crawler technology to obtain high-quality data, design prompt templates and rules, use Voronoi diagrams and grid methods to optimize line generation, carry out symbolic personalized design and graph decoration, and generate a schematic travel route map that meets user needs.
It improves the accuracy and personalization of the travel route map, improves the efficiency and aesthetics of mapping, and provides users with a better travel planning experience.
Smart Images

Figure CN119888007B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of map making, and in particular to a method for automatically generating a schematic tourist route map driven by a large model. Background Art
[0002] Tourist maps provide navigation and information for tourists, typically including information on tourist attractions, landmarks, transportation networks, restaurants, and accommodations. Traditional travel through travel agencies offers relatively fixed itineraries and the presence of guides, so tourists don't rely heavily on supplementary information like tourist maps. However, independent travelers seek more diverse itineraries, and their needs often vary. While these individuals can gather travel guides from travel websites, social media, and other channels to create a travel map tailored to their needs, this requires extensive information gathering and is time-consuming and labor-intensive.
[0003] Achieving personalized, multimodal representation of tourist maps requires mapping systems that can fully understand the needs of diverse users and generate multimodal maps. However, traditional automatic mapping methods often pre-define the mapping context and are not tailored to the specific needs of individual users. In recent years, large deep learning models based on the Transformer architecture, such as BERT and the GPT series, have significantly advanced natural language generation (NLG). These models are able to understand context, adapt to diverse scenarios, and generate high-quality text, reaching near-general artificial intelligence (AGI). However, the current demand for automated, multimodal representation of personalized tourist maps requires analyzing the challenges of intelligent map representation and researching intelligent map representation methods powered by generative AI. Furthermore, while large language models have demonstrated excellent performance in natural language processing, they are limited by the scarcity of tourism-related corpora and lack specific training to understand the relationship between tourist needs and cartographic information. Therefore, further optimization of general large models through incremental pre-training and supervised fine-tuning is necessary. Summary of the Invention
[0004] The present invention provides a method for automatically generating a schematic tourist route map driven by a large model, which can overcome certain defects of the prior art.
[0005] The method for automatically generating a schematic tourist route map driven by a large model according to the present invention comprises the following steps:
[0006] Step 1: Fine-tune the open-source model for understanding tourist needs;
[0007] 1.1) Incremental pre-training;
[0008] 1.2) supervised fine-tuning;
[0009] 1.3) Prompt engineering template design;
[0010] Step 2: Generate a schematic travel route map;
[0011] 2.1) Expanding the congested area;
[0012] 2.2) Generate regular circuits;
[0013] 2.3) Placement of name and annotation;
[0014] Step 3: Personalized symbol design and picture finishing;
[0015] 3.1) Generate corresponding symbols based on the characteristics of different scenic spots using open source big models;
[0016] 3.2) The generated symbols are combined with the actual travel route to generate a route map including daily itinerary, sequence of attractions, and transportation information;
[0017] 3.3) Renovate the map, including adjusting the position of text annotations, optimizing the layout of scenic spot symbols, and adding detailed route descriptions and annotations;
[0018] 3.4) Combine the above steps to generate a travel route map.
[0019] Preferably, in step 1.1), specifically:
[0020] 1.1.1) Compile a Python crawler script and use the BeautifulSoup library to efficiently crawl multi-dimensional data related to tourist attractions from travel websites, including attraction names, locations, ratings, user reviews, ticket prices, and opening hours;
[0021] 1.1.2) Extract key information from the multi-dimensional data obtained by the crawler script, including city and attraction names, locations, addresses, and descriptions;
[0022] 1.1.3) Eliminate attractions with a rating below 2.5 or no reviews to ensure data quality;
[0023] 1.1.4) Combine key information into descriptive text to present attraction information;
[0024] 1.1.5) Output the descriptive text in a structured JSON format for use in constructing a standardized dataset for subsequent pre-training.
[0025] 1.1.6) High-quality datasets for training large models;
[0026] The model predicts the next word based on the existing word sequence, and after each new word is generated, it is included in the word sequence and recursively made the next prediction; after each prediction, the model's prediction result is compared with the actual next word and the loss function is calculated; through the backpropagation algorithm, the calculated loss is used to update the model parameters, so that the model can gradually improve the prediction accuracy.
[0027] Preferably, in step 1.2), specifically:
[0028] 1.2.1) Obtaining tourism-related question and answer data through crawler technology;
[0029] 1.2.2) Manual data cleaning, including removing questions and answers that do not meet the needs of personalized travel maps and revising incomplete questions;
[0030] 1.2.3) Improve the question-and-answer data by adding a step to analyze key information from the question and then proceed to the next step of thinking. This involves using a chain of thought (CoT) approach to build a large instruction training model, supplementing the extraction of necessary conditions from the question, analyzing tourism demand conditions, and using this as a basis to recommend tourist attractions and plan travel routes.
[0031] 1.2.4) Generate more Q&A data using both manual construction and self-generation methods; construct a Q&A dataset according to the question-analysis-answer framework, and ultimately establish supervised fine-tuning instruction data and convert it into JSON format;
[0032] 1.2.5) Based on the incrementally pre-trained large model, further supervised fine-tuning is performed on the constructed instruction data to generate a final, specialized large model suitable for the tourism sector. During the fine-tuning process, the model uses the instruction data as a reference to calculate the loss function and adjust parameters.
[0033] 1.2.6) BLEU-4, ROUGE-L and ROUGE-2 are used as evaluation indicators for evaluation.
[0034] Preferably, in step 1.3), specifically:
[0035] 1.3.1) Based on the two core elements of a travel route map: attractions and number of days, we categorize the demand into three types and provide corresponding response requirements for each type:
[0036] (1) Less detailed requirements: The user only specifies the destination; the large model's response needs to generate a list of attractions near the destination for each day. The recommended attractions should come from the attraction data learned by the model, and the default is a 3-day tour;
[0037] (2) Medium-detailed requirements: The user specifies the destination and the number of days or specific attractions; the large model should plan the route based on the date or attractions requested by the user, and recommend attractions that the user did not explicitly mention but are worth visiting;
[0038] (3) Very detailed requirements: Users specify the destinations and attractions they want to visit each day in detail; the large model must strictly follow the user's requirements to ensure that all attractions are included within the specified time; if the user's list of attractions is not enough to fill the itinerary, it can suggest highly recommended attractions to enrich the user experience while maintaining consistency with their overall preferences;
[0039] 1.3.2) The large model collects necessary mapping information based on the planned route and clarifies seven key pieces of information: 1) attraction name; 2) attraction coordinates; 3) attraction ticket price; 4) attractions visited each day; 5) visiting hours for each attraction; 6) overall route description; 7) transportation method;
[0040] 1.3.3) Define two strategies and incorporate them into the prompt template; the first is to combine examples, covering specific examples of different types of user needs and large model responses to better demonstrate the differences between user inputs at different levels of detail; the second is to adopt a reasoning and action framework that allows the large model to collaboratively reason and execute through an iterative process.
[0041] Preferably, in step 2.1), specifically:
[0042] The problem of crowded and uneven distribution of scenic spots is solved by adjusting the positions of points to expand the crowded area and thus achieve uniform distribution. Specifically, points are dispersed in dense areas and concentrated in sparse areas. To simulate this process, the Voronoi diagram is used to describe the spatial distribution of points.
[0043] Preferably, in step 2.2), a grid-based method is used to generate regular connection lines, so that the lines are simple and beautiful, specifically:
[0044] 2.2.1) Relocate the point to the nearest grid corner;
[0045] First, determine the appropriate mesh side length. The side length must ensure that the generated mesh contains only one point per cell. The side length is determined by the following calculation:
[0046]
[0047] Where, and are the distances between points i and j in the x and y directions, respectively, and n is the number of points;
[0048] Then, the range of the grid is determined based on the coordinate range of the point set; after the grid is drawn, each point is relocated to the nearest grid corner;
[0049] 2.2.2) Connect corner points along the grid edges;
[0050] Connect all point features along the grid edge one by one. The connection order follows the order of visiting scenic spots. For each connection, define three constraints:
[0051] (a) The connecting edge should maintain good continuity;
[0052] (b) Connecting edges cannot pass through other point features;
[0053] (c) A connected edge cannot overlap with a previously connected edge;
[0054] To satisfy constraint (a), the direction change is minimized; this is achieved by identifying the intersection of the horizontal and vertical lines of the points; the corner points are connected along the horizontal and vertical lines through the intersection points to form connecting edges with the minimum direction change and the shortest distance;
[0055] For constraints (b) and (c), a greedy algorithm and a backtracking algorithm are used to connect point by point and judge edge by edge until the final route meets the constraints. Specifically, m-order adjacent points are used as turning points of the route between any two points to avoid the current route passing through other attractions or overlapping with previously existing connecting edges.
[0056] As a preferred method, in step 2.3), the problem of overlapping name annotations is solved by designing annotation placement rules, and the steps are as follows:
[0057] 2.3.1) The initial annotation is placed in the upper right corner;
[0058] 2.3.2) Identify the overprint mark;
[0059] 2.3.3) Move the overlapping annotation according to the priority of the eight candidate annotation positions;
[0060] 2.3.4) Repeat step 2.3.2) until there are no more stamp marks.
[0061] The beneficial effects of the present invention are as follows:
[0062] The present invention automatically generates a tourist route map by fine-tuning a large model and then retouching the map. This automated process not only improves the accuracy and personalization of the route map, but also greatly improves the efficiency and aesthetics of mapping, providing users with a better travel planning experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] Figure 1This is a flow chart of a method for automatically generating a schematic tourist route map driven by a large model in an embodiment;
[0064] Figure 2 is the Voronoi diagram of the points in the embodiment;
[0065] Figure 3 Schematic diagram of the original scenic spot being updated to the centroid of the corresponding Voronoi cell in the embodiment;
[0066] Figure 4 Schematic diagram of the point position homogenization process based on geometric information entropy in the embodiment;
[0067] Figure 5 Schematic diagram of a method for determining grid side length and corner point positioning thereof in an embodiment;
[0068] Figure 6 Schematic diagram of two ways of connecting point 1 and point 2 with minimal changes in direction in an embodiment;
[0069] Figure 7 is a schematic diagram of a connecting edge with an adjacent point as an inflection point in an embodiment;
[0070] Figure 8 A schematic diagram illustrating a tourist route map in an embodiment;
[0071] Figure 9 It is a schematic diagram of a schematic tourist route map with personalized symbol design and map decoration in an embodiment. DETAILED DESCRIPTION
[0072] In order to further understand the content of the present invention, the present invention is described in detail with reference to the accompanying drawings and embodiments. It should be understood that the embodiments are merely for explaining the present invention and are not intended to limit the present invention.
[0073] Example 1
[0074] like Figure 1 As shown, this embodiment provides a method for automatically generating a schematic tourist route map driven by a large model, which includes the following steps:
[0075] Step 1: Fine-tune the open-source model to understand tourist needs.
[0076] The purpose of incremental pre-training is to expand the model's knowledge base on tourist attraction information, enhancing its foundational knowledge and corpus in the tourism field. Its core is to build a massive, high-quality training dataset. Using crawler technology, we collected approximately 70,000 pieces of attraction data from popular travel websites such as Ctrip and Qunar. After data cleaning and screening, we ultimately obtained 62,000 high-quality data points for model training.
[0077] 1.1) Incremental pre-training;
[0078] In step 1.1), specifically:
[0079] 1.1.1) By compiling a Python crawler script and leveraging the BeautifulSoup library, the system efficiently crawls multidimensional data related to tourist attractions from travel websites, including attraction names, locations, ratings, user reviews, ticket prices, and opening hours. The script incorporates regular expressions and XPath techniques to accurately parse the HTML structure of webpages and extract the required information. Furthermore, the crawler incorporates various strategies to automatically identify and circumvent anti-crawl mechanisms, such as dynamically adjusting request headers and access frequency to avoid triggering website anti-crawl measures. To improve data crawling efficiency and reduce the risk of IP blocking, the system also integrates an IP rotation mechanism. To enhance system robustness, the crawler incorporates a fault recovery mechanism, ensuring automatic retries in the event of network interruptions or crawling failures, ensuring the integrity and continuity of data collection. Finally, the crawled data is stored as a CSV file. The system automatically verifies the data format, field integrity, and value range before writing to the file to prevent abnormal data from entering the file.
[0080] 1.1.2) Extract key information from the multidimensional data obtained by the crawler script, including city, attraction name, location, address, and description.
[0081] 1.1.3) Filter out attractions with a rating below 2.5 and no reviews to ensure data quality.
[0082] 1.1.4) Combine key information into descriptive text to present attraction information in a concise and clear manner.
[0083] 1.1.5) Output the descriptive text in structured JSON format for use in constructing a standardized dataset in subsequent pre-training.
[0084] 1.1.6) Train large models to learn from constructed high-quality datasets.
[0085] Based on the Qwen2.5-7B-Instruct model, the tool LLaMA-Factory recommended by the Qwen official documentation is used, and the model is incrementally pre-trained using LoRA and QLoRA technologies. That is, the model predicts the next word based on the existing word sequence (context), and after each new word is generated, it is incorporated into the word sequence and recursively predicted for the next step; after each prediction, the model's prediction result is compared with the actual next word, and the loss function is usually calculated using cross-entropy loss); through the backpropagation algorithm, the calculated loss is used to update the model parameters, so that the model gradually improves the prediction accuracy. The hyperparameter settings of the training model are shown in Table 1:
[0086] Table 1 Incremental training model hyperparameter settings
[0087]
[0088]
[0089] 1.2) Supervised fine-tuning.
[0090] The goal of supervised fine-tuning is to strengthen the connection between tourist needs and understanding of cartographic information, so that the model can better adapt to specific tasks. The key lies in building a high-quality instruction dataset.
[0091] In step 1.2), specifically:
[0092] 1.2.1) Using crawler technology, we collected nearly 2,000 travel-related Q&A data from Q&A forums on websites such as Ctrip and Qunar.
[0093] 1.2.2) To ensure data reliability and accuracy, we manually cleaned the data, including removing questions and answers that did not meet the needs of personalized travel maps and revising incomplete questions; we obtained more than 800 question and answer data.
[0094] 1.2.3) Improve the question-answering data by adding a step to analyze key information from the question and then proceed to the next step of thinking. That is, use the Chain of Thought (CoT) approach to build a large instruction training model, supplement the extraction of necessary conditions in the question, analyze tourism demand conditions, and use this as a basis to recommend tourist attractions and plan travel routes. An example is shown in Table 2:
[0095] Table 2 Example of “Question-Analysis-Answer” Construction
[0096]
[0097] 1.2.4) Generate more Q&A data using both manual construction and self-generation methods; construct a Q&A dataset using the “question-analysis-answer” framework, ultimately creating over 1,600 high-quality supervised fine-tuning instruction data and converting it into JSON format.
[0098] 1.2.5) Based on the incrementally pre-trained large model, further supervised fine-tuning is performed on the constructed instruction data to generate a final, specialized large model suitable for the tourism sector. During the fine-tuning process, the model uses the instruction data as a reference value to calculate the loss function and adjust the parameters. As a result, the model automatically aligns the output format and style with the artificial dataset, significantly improving its performance in mapping information provision or travel route planning tasks, ultimately better meeting users' personalized travel needs. The hyperparameter settings for supervised fine-tuning are shown in Table 3:
[0099] Table 3 Supervised fine-tuning model hyperparameter settings
[0100] Hyperparameters Setting value cutoff_len (truncation length) 2048 finetuning_type (finetuning type) LoRA learning_rate 5.0e-05 lora_rank (rank of the LoRA matrix) 8 num_train_epochs (number of training rounds) 3 val_size (validation set ratio) 0.1
[0101] 1.2.6) BLEU-4, ROUGE-L, and ROUGE-2 were used as evaluation metrics for the model. BLEU-4 measures the ratio of the number of quadruple pairs in the prediction result to the number of quadruple pairs in the reference result; ROUGE-L measures the similarity between the prediction result and the reference result based on the recall of the longest common subsequence between the two results; and ROUGE-2 measures the ratio of the number of identical bigrams in the prediction result and the reference result to the total number of bigrams in the reference result. The higher the value of these metrics, the closer the model's response is to a human's. Table 4 lists the metric results for different models, and the model with 8-bit quantization pre-training for 5 epochs followed by SFT for 3 epochs performed best.
[0102] Table 4 BLEU-4, ROUGE-L and ROUGE-2 results of supervised fine-tuning models
[0103] Model bleu-4 rouge-L rouge-2 Pre-training 3 epochs + SFT 3 epochs with BF16 accuracy 5.1487 14.9252 4.5001 Pre-training 5 epochs + SFT 3 epochs with 8-bit quantization 5.7509 16.3332 5.4467 Qwen2.5-7B-Instruct 4.7268 12.1915 5.0662
[0104] Whether a model aligns with human preferences cannot be assessed solely through similarity metrics; human evaluation is also crucial. Therefore, we further evaluated the model's chat reasoning capabilities through manual analysis. For example, using the input "Prompt: I'm going to Xi'an for a conference this weekend. Please design a one-day tour itinerary for Xi'an and its surrounding areas." Manual review of the model output revealed the following characteristics of the text generated by the 8-bit quantized pre-trained 5-epoch + SFT 3-epoch model:
[0105] (A) High density of factual information: The generated text contains a large amount of accurate and relevant factual information, including detailed descriptions of attractions and itineraries and timetables. Our model recommends five attractions: Da Ci'en Temple, Bell Tower, Forest of Steles Museum, Xi'an City Wall, and Big Wild Goose Pagoda, and provides detailed and reasonable timetables. The original model, on the other hand, recommends Huaqing Hot Springs, Qin Shi Huang's Mausoleum Museum, Shaanxi History Museum, and Big Wild Goose Pagoda without considering their spatial relationships or timetables. In fact, the original model's recommended itinerary is difficult to complete in a single day.
[0106] (B) Consistent output style: The model's output text is highly consistent in structure, with clear paragraph divisions and a chronological arrangement. The language used in the dialogue is also concise and effective. For example, our model's response to the first attraction was: "8:00-9:00: Depart from the hotel and head to the Xi'an City Wall (located in the city center). This was an ancient defensive structure and one of Xi'an's landmarks. You can take photos at the South Gate Tower Square, then climb and walk along the wall to experience the historical atmosphere of this ancient city."
[0107] (C) Accurate Response to User Instructions: The model excels at understanding and processing diverse user needs, understanding individual user needs and making appropriate time and route arrangements. Our model's recommended itinerary falls entirely within Xi'an's Second Ring Road, meeting the needs of business travelers with tight schedules and avoiding long distances.
[0108] 1.3) Prompt engineering template design.
[0109] In step 1.3), specifically:
[0110] 1.3.1) Design a dedicated prompt template for the tourism-specific large model. Based on the two core elements of a travel route map: attractions and number of days, divide the needs into three types and provide corresponding response requirements for each type:
[0111] (1) Less detailed requirements: The user only specifies the destination; the large model's response needs to generate a list of attractions near the destination for each day. The recommended attractions should come from the attraction data learned by the model, and the default is a 3-day tour;
[0112] (2) Medium-detailed requirements: The user specifies the destination and the number of days or specific attractions; the large model should plan the route based on the date or attractions requested by the user, and recommend attractions that the user did not explicitly mention but are worth visiting;
[0113] (3) Very detailed requirements: The user specifies the destinations and attractions to visit each day in detail; the large model must strictly follow the user's requirements to ensure that all attractions are included within the specified time; if the user's attraction list is not enough to fill the itinerary, it can suggest highly recommended attractions to enrich the user experience while maintaining consistency with their overall preferences.
[0114] 1.3.2) The large model collects necessary mapping information based on the planned route and clarifies seven key pieces of information: 1) attraction name; 2) attraction coordinates; 3) attraction ticket price; 4) attractions visited each day; 5) visiting hours for each attraction; 6) overall route description; 7) transportation method. To facilitate the subsequent compilation program to automatically generate the route map, all mapping information will be stored in JSON format.
[0115] 1.3.3) To reduce the illusions and uncertainties that the big model generates when understanding user needs, two strategies are defined and incorporated into the prompt template. The first is to incorporate examples, covering specific examples of different types of user needs and big model responses, to better demonstrate the differences between user inputs at different levels of detail. The second is to adopt a Reasoning and Acting Framework, which allows the big model to collaboratively reason and act through an iterative process. This process includes four key stages: (1) Thinking - semantic understanding and reasoning based on user input; (2) Acting - deciding the next action based on previous thinking; (3) Observing - feedback on the results of the action; and (4) Rethinking - re-examining the reasoning based on the observation results and the initial goal.
[0116] Step 2: Generate a schematic tourist route map. The route map obtained by directly connecting to scenic spots has problems such as crowded and uneven distribution of scenic spots, unsophisticated routes, and overlapping names and annotations. This can be solved by the following methods:
[0117] 2.1) Expand the congested area.
[0118] In step 2.1), specifically:
[0119] The problem of crowded and uneven distribution of scenic spots is solved by adjusting the positions of points to expand the crowded area and thus achieve uniform distribution. Specifically, points are dispersed in dense areas and concentrated in sparse areas. To simulate this process, the Voronoi diagram is used to describe the spatial distribution of points. Figure 2 Shows the Voronoi diagram of a set of points, where points in dense areas correspond to smaller Voronoi cells, while points in sparse areas correspond to larger cells.
[0120] In the generated Voronoi diagram, the original scenic spots are updated to the centroids of the corresponding Voronoi cells, such as Figure 3 These updated points are then used as input to generate the next Voronoi diagram. This process is repeated until the distribution of points reaches an acceptably uniform level.
[0121] The uniformity level can be measured by geometric information entropy, and the calculation method is as follows:
[0122]
[0123] Among them, S i (i=1,2,…,N) represents map symbol i th The Voronoi region area is ; S represents the area of the entire map space; N is the total number of map symbols. This formula shows that the more uniform the distribution of map symbols, the greater the geometric information entropy.
[0124] In order to compare the geometric information entropy between maps with different numbers of symbols, the maximum entropy should be used for normalization. i When the values are equal, the maximum entropy is reached, that is, the maximum entropy is The normalized geometric information entropy ranges from 0 to 1.
[0125] Based on multiple experimental observations, the threshold of normalized geometric information entropy is set to 0.8. That is, when the geometric information entropy of the Voronoi diagram exceeds 0.8, the iterative process will terminate. Figure 4 shown.
[0126] 2.2) Generate regular circuits.
[0127] In step 2.2), a grid-based method is used to generate regular connection lines to make the lines simple and beautiful. Specifically:
[0128] 2.2.1) Relocate the point to the nearest grid corner;
[0129] First, determine the appropriate mesh side length. The side length must ensure that the generated mesh contains only one point per cell. The side length is determined by the following calculation:
[0130]
[0131] Where, and are the distances between points i and j in the x and y directions, respectively. Figure 5 As shown, n is the number of points;
[0132] Then, the range of the grid is determined based on the coordinate range of the point set; after the grid is drawn, each point is relocated to the nearest grid corner.
[0133] 2.2.2) Connect corner points along the grid edges.
[0134] Connect all point features along the grid edge one by one. The connection order follows the order of visiting scenic spots. For each connection, define three constraints:
[0135] (a) The connecting edge should maintain good continuity;
[0136] (b) Connecting edges cannot pass through other point features;
[0137] (c) A connecting edge cannot overlap with a previously connected edge.
[0138] To satisfy constraint (a), the change in direction is minimized; this is achieved by identifying the intersection of the horizontal and vertical lines of the point, such as Figure 6As shown; corner points are connected along horizontal and vertical lines through intersection points, forming connected edges with minimal direction changes and shortest distances.
[0139] For constraints (b) and (c), a greedy algorithm and a backtracking algorithm are used to connect point by point and judge edge by edge until the final route meets the constraints. Specifically, the m-order adjacent points are used as the turning points of the route between any two points to avoid the current route passing through other attractions or overlapping with previously existing connecting edges, such as Figure 7 shown.
[0140] 2.3) Placement of name and annotation.
[0141] The problem of overlapping annotation names can be solved by designing appropriate annotation placement rules. One of the most common rules is to "avoid annotation overlap." In tourist route maps, the term "annotation overlap" includes three types of overlap: overlap between annotations, overlap between annotations and attractions, and overlap between annotations and routes.
[0142] Establish an objective function and combine it with a greedy algorithm to optimize the annotation position. The steps are as follows:
[0143] 2.3.1) The initial annotation is placed in the upper right corner;
[0144] 2.3.2) Identify the overprint mark;
[0145] 2.3.3) Move the overlapping annotation according to the priority of the eight candidate annotation positions;
[0146] 2.3.4) Repeat step 2.3.2) until there are no more stamp marks.
[0147] The generated schematic tourist route map is as follows Figure 8 shown.
[0148] Step 3: Personalized symbol design and map finishing.
[0149] Customizing the symbology of scenic spots based on their characteristics is a key step in optimizing tourist route maps. With the maturity of large-scale models (such as ChatGPT-4o), which are capable of generating image results, these large-scale models can be used to automatically generate symbolic and schematic tourist route maps.
[0150] The details are as follows:
[0151] 3.1) Use open source big models to generate corresponding symbols based on the characteristics of different attractions; these symbols can intuitively reflect the type, scale or characteristics of the attractions, enhancing the readability and practicality of the map.
[0152] 3.2) The generated symbols are combined with the actual travel route to create a route map that includes daily itineraries, attraction sequence, and transportation information. The large model not only generates attraction symbols but also generates route maps based on the input information. This step requires consideration of the user's specific needs. These route maps clearly display each day's itinerary and provide tourists with an intuitive route reference.
[0153] 3.3) Render the map to ensure its overall aesthetics and practicality. This includes adjusting the placement of text annotations, optimizing the layout of attraction symbols, and adding detailed route descriptions and annotations to ensure the map's completeness and ease of understanding. The daily itinerary map should sequentially display the main itinerary for each day, including attractions to be visited, transportation routes, and estimated travel time, ensuring a clear and organized travel plan.
[0154] 3.4) Combine the above steps to generate a travel route map, such as Figure 9 shown.
[0155] This automated process of this embodiment not only improves the accuracy and personalization of the route map, but also greatly improves the efficiency and aesthetics of mapping, providing users with a better travel planning experience.
[0156] The above is a schematic description of the present invention and its embodiments, which is not restrictive. The drawings show only one embodiment of the present invention, and the actual structure is not limited thereto. Therefore, if a person skilled in the art is inspired by this and, without departing from the purpose of the present invention, designs a structure and embodiment similar to this technical solution without inventiveness, they shall fall within the scope of protection of the present invention.
Claims
1. A method for automatically generating a schematic tourist route map driven by a large model, characterized by comprising the following steps: Step 1: Fine-tune the open-source model for understanding tourist needs; 1.1) Incremental pre-training; 1.2) supervised fine-tuning; 1.3) Prompt engineering template design; In step 1.3), specifically: 1.3.1) Based on the two core elements of a travel route map: attractions and number of days, we categorize the demand into three types and provide corresponding response requirements for each type: (1) Less detailed requirements: The user only specifies the destination; the large model's response needs to generate a list of attractions near the destination for each day. The recommended attractions should come from the attraction data learned by the model, and the default is a 3-day tour; (2) Medium-detailed requirements: The user specifies the destination and the number of days or specific attractions; the large model should plan the route based on the date or attractions requested by the user, and recommend attractions that the user did not explicitly mention but are worth visiting; (3) Very detailed requirements: Users specify the destinations and attractions they want to visit each day in detail; the large model must strictly follow the user's requirements to ensure that all attractions are included within the specified time; if the user's list of attractions is not enough to fill the itinerary, it can suggest highly recommended attractions to enrich the user experience while maintaining consistency with their overall preferences; 1.3.2) The large model collects necessary mapping information based on the planned route and clarifies seven key pieces of information: 1) attraction name; 2) attraction coordinates; 3) attraction ticket price; 4) attractions visited each day; 5) visiting hours for each attraction; 6) overall route description; 7) transportation method; 1.3.3) Define two strategies and incorporate them into the prompt template; the first is to incorporate examples, covering specific examples of different types of user needs and responses from the large model to better demonstrate the differences between user inputs at different levels of detail; the second is to adopt a reasoning-and-action framework that allows the large model to collaboratively reason and act through an iterative process; Step 2: Generate a schematic travel route map; 2.1) Expanding the congested area; In step 2.1), specifically: The problem of crowded and uneven distribution of scenic spots is solved by adjusting the location of points to expand the crowded area and thus achieve uniform distribution. Specifically, points are dispersed in dense areas and concentrated in sparse areas. To simulate this process, the Voronoi diagram is used to describe the spatial distribution of points. 2.2) Generate regular circuits; In step 2.2), a grid-based approach is used to generate regular connection lines, specifically: 2.2.1) Relocate the point to the nearest grid corner; First, determine the appropriate mesh edge length. The edge length must ensure that each cell in the generated mesh contains only one point. The edge length is determined by the following calculation: Where, and are the distances between points i and j in the x and y directions, respectively, and n is the number of points; Then, based on the coordinate range of the point set, the range of the grid is determined; After the grid is drawn, each point is relocated to the nearest grid corner; 2.2.2) Connect corner points along the grid edges; Connect all point features along the grid edge one by one. The connection order follows the order of visiting scenic spots. For each connection, define three constraints: (a) The connecting edge should maintain good continuity; (b) Connecting edges cannot pass through other point features; (c) A connected edge cannot overlap with a previously connected edge; To satisfy constraint (a), the direction change is minimized; this is achieved by identifying the intersection of the horizontal and vertical lines of the points; the corner points are connected along the horizontal and vertical lines through the intersection points to form connecting edges with the minimum direction change and the shortest distance; For constraints (b) and (c), a greedy algorithm and backtracking algorithm are used to connect each point and judge each edge one by one until the final route satisfies the constraints. Specifically, m-order adjacent points are used as turning points of the route between any two points to avoid the current route passing through other attractions or overlapping with previously existing connecting edges. 2.3) Placement of name and annotation; In step 2.3), the problem of overlapping name annotations is solved by designing annotation placement rules. The steps are as follows: 2.3.1) The initial annotation is placed in the upper right corner; 2.3.2) Identify the overprint mark; 2.3.3) Move the overlapping annotation according to the priority of the eight candidate annotation positions; 2.3.4) Repeat step 2.3.2) until there are no more stamp marks; Step 3: Personalized symbol design and picture finishing; 3.1) Generate corresponding symbols based on the characteristics of different scenic spots using open source big models; 3.2) The generated symbols are combined with the actual travel route to generate a route map including daily itinerary, sequence of attractions, and transportation information; 3.3) Renovate the map, including adjusting the position of text annotations, optimizing the layout of scenic spot symbols, and adding detailed route descriptions and annotations; 3.4) Combine the above steps to generate a travel route map.
2. The method for automatically generating a schematic tourist route map driven by a large model according to claim 1 is characterized in that: In step 1.1), specifically: 1.1.1) Compile a Python crawler script and use the BeautifulSoup library to efficiently crawl multi-dimensional data related to tourist attractions from travel websites, including attraction names, locations, ratings, user reviews, ticket prices, and opening hours; 1.1.2) Extract key information from the multi-dimensional data obtained by the crawler script, including city and attraction names, locations, addresses, and descriptions; 1.1.3) Eliminate attractions with a rating below 2.5 or no reviews to ensure data quality; 1.1.4) Combine key information into descriptive text to present attraction information; 1.1.5) Output the descriptive text in a structured JSON format for use in constructing a standardized dataset for subsequent pre-training. 1.1.6) High-quality datasets for training large models; The model predicts the next word based on the existing word sequence, and after each new word is generated, it is incorporated into the word sequence and recursively makes the next prediction; After each prediction, the model's prediction result is compared with the actual next word and the loss function is calculated; through the backpropagation algorithm, the calculated loss is used to update the model parameters, so that the model gradually improves the prediction accuracy.
3. The method for automatically generating a schematic tourist route map driven by a large model according to claim 2, characterized in that: In step 1.2), specifically: 1.2.1) Obtaining tourism-related question and answer data through crawler technology; 1.2.2) Manual data cleaning, including removing questions and answers that do not meet the needs of personalized travel maps and revising incomplete questions; 1.2.3) Improve the question-and-answer data by adding a step to analyze key information from the question and then proceed to the next step of thinking. This involves using a chain of thought (CoT) approach to build a large instruction training model, supplementing the extraction of necessary conditions from the question, analyzing tourism demand conditions, and using this as a basis to recommend tourist attractions and plan travel routes. 1.2.4) Generate more Q&A data using both manual construction and self-generation methods; construct a Q&A dataset according to the question-analysis-answer framework, and ultimately establish supervised fine-tuning instruction data and convert it into JSON format; 1.2.5) Based on the incrementally pre-trained large model, further supervised fine-tuning is performed on the constructed instruction data to generate a final, specialized large model suitable for the tourism sector. During the fine-tuning process, the model uses the instruction data as a reference to calculate the loss function and adjust parameters. 1.2.6) BLEU-4, ROUGE-L and ROUGE-2 are used as evaluation indicators for evaluation.
Citation Information
Patent Citations
Automatic generation method and system of self-driving travel road book
CN117520652A