Travel route planning method and device and electronic equipment

By obtaining itinerary requirements, optimizing the candidate pool of attractions and generating personalized itinerary plans, it solves the problem of insufficient intelligent and personalized recommendations in traditional itinerary planning tools, and improves the efficiency of itinerary planning and user experience.

CN120632229APending Publication Date: 2025-09-12CHINA TELECOM CORP LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510728831.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-30
Publication Date
2025-09-12

AI Technical Summary

Technical Problem

Traditional itinerary planning tools rely on users to manually select attractions and lack intelligent and personalized recommendations, resulting in inefficient itinerary planning and an inability to effectively integrate multi-source data and dynamically adjust routes.

Method used

By obtaining the travel needs of the target object, parsing and optimizing the pool of candidate attractions, using cluster analysis and tree structure to find the nearest neighbor attractions, and combining greedy algorithm and dynamic programming to generate personalized itinerary planning, including attraction label information and precautions.

Benefits of technology

It realizes personalized and intelligent itinerary planning, improves planning efficiency and user experience, and ensures that the itinerary is reasonable, coherent and in line with user preferences.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120632229A_ABST
    Figure CN120632229A_ABST
Patent Text Reader

Abstract

The invention discloses an itinerary planning method and device and electronic equipment. The method comprises the steps that a travel demand input by a target object is acquired, and the travel demand comprises a target scenic spot list; the travel demand is analyzed, an initial scenic spot candidate pool is obtained, and the initial scenic spot candidate pool comprises scenic spot names and geographical location information of scenic spots; the initial scenic spot candidate pool is optimized according to the geographic position information, an optimized candidate pool is obtained, and the optimized candidate pool comprises nearest neighbor scenic spots of each target scenic spot in the target scenic spot list; and generating a trip plan according to the optimization candidate pool and the trip demand. According to the method and the device, the technical problem of low travel planning efficiency caused by lack of intelligent and personalized recommendation due to the fact that travel planning generally depends on manual selection of scenic spots by a user in related technologies is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of big data analysis, and more specifically, to a trip planning method, device, and electronic device. Background Art

[0002] With the rapid development of the global tourism industry, travelers' itinerary planning needs are becoming increasingly diverse and personalized. Traditional itinerary planning tools often rely on fixed templates and limited user input, lacking flexibility and accuracy. This approach not only fails to fully utilize massive amounts of tourism data but also struggles to adapt to real-time changes in user needs and environmental conditions, resulting in inefficient itinerary planning.

[0003] To address the above-mentioned problems, no effective solutions have been proposed so far. Summary of the Invention

[0004] The embodiments of the present application provide a method, device, and electronic device for itinerary planning to at least address the technical problem in related technologies that itinerary planning typically relies on users manually selecting attractions, lacks intelligent and personalized recommendations, and results in inefficient itinerary planning.

[0005] According to one aspect of an embodiment of the present application, a method for itinerary planning is provided, comprising: obtaining itinerary requirements input by a target object, wherein the itinerary requirements include a list of target attractions; parsing the itinerary requirements to obtain an initial attraction candidate pool, wherein the initial attraction candidate pool includes attraction names and geographic location information of the attractions; optimizing the initial attraction candidate pool based on the geographic location information to obtain an optimized candidate pool, wherein the optimized candidate pool includes the nearest neighbor attractions of each target attraction in the target attraction list; and generating an itinerary plan based on the optimized candidate pool and the itinerary requirements.

[0006] Optionally, the initial attraction candidate pool is optimized based on the geographic location information to obtain an optimized candidate pool, including: performing cluster analysis on the initial attraction candidate pool to obtain clustering results; deleting discrete attractions in the clustering results from the initial attraction candidate pool to obtain an initial optimized candidate pool; generating the nearest neighbor attractions of each target attraction based on the initial optimized candidate pool, geographic location information and target attraction list; and obtaining an optimized candidate pool based on the initial optimized candidate pool and the nearest neighbor attractions.

[0007] Optionally, a cluster analysis is performed on the initial candidate pool of scenic spots to obtain a clustering result, including: step 1: creating an empty cluster list, marking all scenic spots in the initial candidate pool of scenic spots as unvisited; step 2: determining any scenic spot in the initial candidate pool of scenic spots as a seed point; step 3: determining the number of all scenic spots in the neighborhood of the seed point to obtain a first number, and when the first number is greater than or equal to a preset threshold, determining the seed point as a core point, and adding all scenic spots in the neighborhood of the core point to the cluster and marking them as visited; when the first number is less than the preset threshold, determining the seed point as a noise point, wherein the noise point represents a discrete scenic spot in the initial candidate pool of scenic spots; step 4: repeating step 3 for each scenic spot in the neighborhood until no new scenic spot is added to the cluster, and obtaining a clustering result.

[0008] Optionally, based on the initial optimization candidate pool, geographic location information and target attraction list, the nearest neighbor attractions of each target attraction are generated, including: converting the geographic location information of each attraction in the initial optimization candidate pool into a two-dimensional coordinate point, and constructing a tree structure based on the two-dimensional coordinate points; determining each target attraction in the target attraction list as a query point, determining the distance value between the two-dimensional coordinate point of the query point and the two-dimensional coordinate points of other attractions in the initial optimization candidate pool in the tree structure, and obtaining a distance set corresponding to each query point, wherein the other attractions are other attractions in the initial optimization candidate pool except the query point; sorting the distance values ​​in each distance set from small to large to obtain a sorted distance set corresponding to each query point; and determining the attractions corresponding to the first preset number of distances in each sorted distance set as the nearest neighbor attractions of each target attraction.

[0009] Optionally, an itinerary plan is generated based on the optimization candidate pool and itinerary requirements, including: step 1: determining any target attraction in the optimization candidate pool as the starting point and initializing the itinerary plan list; step 2: based on the itinerary requirements, querying the unvisited attraction with the lowest cost from the nearest neighbors of the starting point to obtain the first target attraction; step 3: adding the first target attraction to the itinerary plan list, marking the first target attraction as visited, and updating the first target attraction as the starting point; step 4: repeating steps 2 to 3 until all attractions in the optimization candidate pool are visited; connecting the attractions in the itinerary plan list in sequence to obtain a trunk path; optimizing the trunk path to obtain the itinerary plan.

[0010] Optionally, the trunk path is optimized to obtain an itinerary plan, including: step 1: obtaining a set of visited attractions and a set of unvisited attractions in the trunk path; step 2: determining a first cost from the first attraction in the set of visited attractions to each second attraction in the set of unvisited attractions, and determining a second cost from the starting attraction in the trunk path to the first attraction, wherein the first attraction is the last attraction visited in the set of visited attractions; step 3: determining a total cost from the starting attraction to the second attraction based on the first cost and the second cost; step 4: determining the second attraction with the smallest total cost as the second target attraction to be visited, and adding the second target attraction to the set of visited attractions; step 5: repeating steps 2 to 4 until all attractions in the trunk path are visited to obtain an optimized itinerary plan.

[0011] Optionally, after generating the itinerary plan, the method further includes: obtaining label information of all attractions in the itinerary plan, wherein the label information is used to represent the attribute information and rating information of the attractions; generating a planned route based on the itinerary plan and the label information, wherein the planned route includes the name of the attraction, the reason for recommendation and precautions; and returning the planned route to the target object.

[0012] According to another aspect of an embodiment of the present application, a itinerary planning device is also provided, including: an acquisition module for acquiring itinerary requirements input by a target object, wherein the itinerary requirements include a list of target attractions; a parsing module for parsing the itinerary requirements to obtain an initial attraction candidate pool, wherein the initial attraction candidate pool includes attraction names and geographic location information of the attractions; an optimization module for optimizing the initial attraction candidate pool based on the geographic location information to obtain an optimized candidate pool, wherein the optimized candidate pool includes the nearest neighbor attractions of each target attraction in the target attraction list; and a generation module for generating an itinerary plan based on the optimized candidate pool and the itinerary requirements.

[0013] According to another aspect of the embodiments of the present application, an electronic device is also provided, including: a memory for storing program instructions; a processor, connected to the memory, for executing program instructions to implement the following functions: obtaining itinerary requirements input by a target object, wherein the itinerary requirements include a list of target attractions; parsing the itinerary requirements to obtain an initial attraction candidate pool, wherein the initial attraction candidate pool includes attraction names and geographic location information of the attractions; optimizing the initial attraction candidate pool based on the geographic location information to obtain an optimized candidate pool, wherein the optimized candidate pool includes the nearest neighbor attractions of each target attraction in the target attraction list; generating an itinerary plan based on the optimized candidate pool and the itinerary requirements.

[0014] According to another aspect of the embodiments of the present application, a non-volatile storage medium is further provided, which includes a stored computer program, wherein the device where the non-volatile storage medium is located executes the above-mentioned itinerary planning method by running the computer program.

[0015] According to another aspect of the embodiments of the present application, a computer program product is provided, comprising computer instructions, which implement the above-mentioned itinerary planning method when executed by a processor.

[0016] In an embodiment of the present application, the itinerary requirements input by the target object are obtained, wherein the itinerary requirements include a list of target attractions; the itinerary requirements are parsed to obtain an initial attraction candidate pool, wherein the initial attraction candidate pool includes the attraction name and the geographical location information of the attraction; the initial attraction candidate pool is optimized based on the geographical location information to obtain an optimized candidate pool, wherein the optimized candidate pool includes the nearest neighbor attractions of each target attraction in the target attraction list; an itinerary plan is generated based on the optimized candidate pool and the itinerary requirements, thereby achieving the purpose of personalized and intelligent itinerary planning, thereby realizing the technical effect of improving itinerary planning efficiency and user experience, and further solving the technical problem in related technologies that itinerary planning usually relies on users to manually select attractions, lacks intelligent and personalized recommendations, and leads to low itinerary planning efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0018] Figure 1 is a hardware structure block diagram of a computer terminal for implementing a trip planning method according to an embodiment of the present application;

[0019] Figure 2 is a flowchart of a trip planning method according to an embodiment of the present application;

[0020] Figure 3 It is a structural diagram of a trip planning device according to an embodiment of the present application. DETAILED DESCRIPTION

[0021] In order to enable those skilled in the art to better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this application.

[0022] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in a sequence other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0023] The information collected in the embodiments of the present application is information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with the relevant laws, regulations and standards of the relevant regions, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or reject the automated decision results; if the user chooses to reject, the expert decision-making process will be entered.

[0024] First, some nouns or terms that appear in the process of explaining the embodiments of this application are subject to the following explanations:

[0025] Large Language Model: An advanced natural language processing (NLP) model that integrates a generative adversarial network (GAN) and a deep learning framework. It can be trained on a large corpus to achieve high-precision human-computer dialogue understanding and generation.

[0026] BRP algorithm (Best Route Planning Algorithm): A path optimization algorithm based on greedy strategy and dynamic programming. It aims to quickly identify and adjust the optimal travel route by dynamically analyzing complex path sets and has real-time response capabilities.

[0027] Attraction Tagging: Also known as attraction tags, these are automatically generated using machine learning technology to describe the characteristics of an attraction, including but not limited to the types of people (such as families, couples, and solo travelers), the types of attractions (such as historical and cultural, natural scenery, and modern cities), and seasonal recommendations.

[0028] Comprehensive Attraction Dataset: A database covering detailed information on tourist attractions around the world, including geographical location, visitor reviews, opening hours, transportation methods, weather conditions, and other multi-dimensional data, supporting real-time updates.

[0029] In recent years, artificial intelligence technologies, particularly natural language processing and machine learning, have demonstrated tremendous potential in solving complex data analysis problems. By introducing advanced AI large language models, such as ChatGLM, we can achieve a deep understanding of user needs and respond to them in real time, facilitating travel itinerary planning.

[0030] The main challenges faced by itinerary planning tools in related technologies are:

[0031] 1. Insufficient data integration: Existing itinerary planning often relies on users manually selecting attractions, lacking intelligent and personalized recommendations. This inability to effectively integrate data from multiple sources, such as social media reviews, real-time weather information, and traffic conditions, results in incomplete and inaccurate recommendations.

[0032] 2. Lack of Personalization: Traditional methods fail to effectively integrate user preferences and scenic spot characteristics, resulting in inefficient itinerary planning. Most tools only provide recommendations based on simple keyword matching, which is difficult to meet users' personalized needs and lacks deep insight into user preferences and personalized experiences.

[0033] 3. Limited dynamic adjustment capabilities: Related technologies often use simple heuristic algorithms for route optimization, which struggle to balance the multi-dimensional characteristics of scenic spots and user needs. In the face of sudden environmental changes (such as weather and traffic congestion), existing systems struggle to adjust itineraries in a timely manner, impacting user experience and travel efficiency.

[0034] In order to solve the problems existing in the related art, this application provides a trip planning method that can be run on Figure 1 In the computer terminal shown, the computer terminal is explained below.

[0035] The itinerary planning method embodiment provided in the embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 FIG1 shows a hardware structure block diagram of a computer terminal for implementing a method for itinerary planning. Figure 1 As shown, the computer terminal 10 may include one or more (illustrated by 102a, 102b, ..., 102n in the figure) processors (the processor may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission module 106 for communication functions connected via a wired and / or wireless network. In addition, it may also include: a display, a keyboard, a cursor control device, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), a network interface, and a BUS bus. It will be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components than shown, or with Figure 1 Different configurations shown.

[0036] It should be noted that the one or more processors and / or other data processing circuits described above may generally be referred to herein as "data processing circuitry." The data processing circuitry may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuitry may be a single, independent processing module, or may be incorporated in whole or in part into any of the other components of the computer terminal 10. As described in the embodiments of the present application, the data processing circuitry serves as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).

[0037] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the itinerary planning method in the embodiments of the present application. The processor executes the software programs and modules stored in the memory 104 to execute various functional applications and data processing, thereby implementing the above-mentioned itinerary planning method. The memory 104 may include high-speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory remotely located relative to the processor, and these remote memories may be connected to the computer terminal 10 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0038] The transmission module 106 is configured to receive or transmit data via a network. A specific example of the aforementioned network may include a wireless network provided by the communications provider of the computer terminal 10. In one embodiment, the transmission module 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In another embodiment, the transmission module 106 may be a radio frequency (RF) module, which is configured to communicate with the Internet wirelessly.

[0039] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 10 .

[0040] It should be noted that, in some optional embodiments, the above Figure 1The computer terminal shown may include hardware elements (including circuits), software elements (including computer code stored on a computer-readable medium), or a combination of hardware elements and software elements. Figure 1 This is merely one example of a particular embodiment and is intended to illustrate the types of components that may be present in the computer terminal described above.

[0041] In the above operating environment, an embodiment of the present application provides an embodiment of a trip planning method. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0042] Figure 2 is a flow chart of a method for itinerary planning according to an embodiment of the present application. Figure 2 As shown, the method includes the following steps:

[0043] Step S202: Acquire the itinerary requirements input by the target object, wherein the itinerary requirements include a list of target attractions.

[0044] In the above step S202, the target object (or user) can enter the itinerary requirements in the dialog box and submit it to the server (or system). The itinerary requirements include at least one of the following: a list of target attractions, destination, time, crowd, type, etc., wherein the list of target attractions is a list of specific attractions that the user hopes to visit during the trip. These attractions can be places of particular interest to the user, or places that must be visited in the plan (referred to as must-see attractions or target attractions).

[0045] For example, users can enter: destination, time, family member information (such as the specific number of adults, children, and elderly people), crowd type, scenic spot type, and must-see scenic spots. The specific input information is as follows:

[0046] Itinerary requirements: Destination: Qiandongnan Miao and Dong Autonomous Prefecture; Time: August 4, 2025 - August 6, 2025; Total number of days: 3 days; Crowd: Parents and children; Type: Food exploration; Composition: 1 adult, 0 elderly, 1 child; Must-see scenic spots: Dong Village Drum Tower, Baibei Miao Village.

[0047] Step S204 , parsing the itinerary requirements to obtain an initial pool of candidate attractions, wherein the initial pool of candidate attractions includes the names of the attractions and the geographical location information of the attractions.

[0048] In step S204, the server analyzes the itinerary requirements, for example, by using regular expressions to parse user input, and extracts corresponding parsed fields, such as destination, time, group, type, composition, and must-see attractions (i.e., target attractions). The server searches for all attractions and must-see attraction data that meet the requirements, thereby constructing an initial candidate pool of attractions. The initial candidate pool of attractions includes attraction names and geographic location information, where the geographic location information can be represented by latitude and longitude information.

[0049] An example of the initial attraction candidate pool is as follows: [

[0051] {'scenicSpotName':'Dong Village Drum Tower','longitude':109.173833,'dimension':25.912439},

[0052] {'scenicSpotName':'Drum Tower Group','longitude':109.190068,'dimension':25.912312},

[0053] {'scenicSpotName':'Baibei Miao Village','longitude':108.170031,'dimension':25.861512},

[0054] {'scenicSpotName':'Xijiang River Viewing Tower','longitude':108.177352,'dimension':26.498439},

[0055] {'scenicSpotName':'Majiang Lanmeng Valley Scenic Area','longitude':107.749526,'dimension':26.416666},

[0056] {'scenicSpotName':'Wuyangma Ecological Tourism Scenic Area', 'longitude':107.755823, 'dimension':26.392101},

[0057] {'scenicSpotName':'Zhenyuan Ancient City','longitude':108.42516,'dimension':27.055783} ]

[0059] Step S206 , optimizing the initial candidate pool of scenic spots according to the geographic location information to obtain an optimized candidate pool, wherein the optimized candidate pool includes the nearest neighboring scenic spots of each target scenic spot in the target scenic spot list.

[0060] In the above step S206, cluster analysis is used to eliminate discrete attractions based on geographic location information, and the adjacent attractions (or nearest neighbor attractions) of the target attraction are quickly found through a tree structure, thereby optimizing the initial attraction candidate pool to obtain an optimized candidate pool.

[0061] Step S208: Generate a trip plan based on the optimized candidate pool and trip requirements.

[0062] In the above step S208 , a trunk path is generated by optimizing the candidate pool and the travel demand, and the trunk path is optimized to obtain a travel plan.

[0063] Through steps S202 to S208 above, personalized and intelligent itinerary planning is achieved, thereby achieving the technical effect of improving itinerary planning efficiency and user experience. This further solves the technical problem in related technologies where itinerary planning typically relies on users manually selecting attractions, lacks intelligent and personalized recommendations, and results in inefficient itinerary planning. This is explained below.

[0064] In step S206 of the above-mentioned itinerary planning method, the initial attraction candidate pool is optimized based on the geographic location information to obtain an optimized candidate pool, including: performing cluster analysis on the initial attraction candidate pool to obtain clustering results; deleting discrete attractions in the clustering results from the initial attraction candidate pool to obtain an initial optimized candidate pool; generating the nearest neighbor attractions of each target attraction based on the initial optimized candidate pool, geographic location information and target attraction list; and obtaining an optimized candidate pool based on the initial optimized candidate pool and the nearest neighbor attractions.

[0065] In some embodiments of the present application, the system performs cluster analysis on the attractions in the initial candidate pool of attractions. Clustering is an unsupervised learning method that can group similar attractions together. The system uses the DBSCAN algorithm (Density-Based Spatial Clustering of Applications with Noise, a density-based spatial clustering algorithm with noise point recognition capability) to identify tight clusters in geographic space. The DBSCAN algorithm defines a "density-reachable" area based on the distance between two points and a preset minimum number of points in a neighborhood (minPts), thereby dividing multiple high-density attraction clusters. It can also identify geographically isolated attractions, the so-called "discrete attractions". Based on the clustering results, the system will identify and delete discrete attractions (i.e., attractions that do not belong to any high-density clusters) to generate an initial optimized candidate pool. This ensures that itinerary planning focuses on groups of attractions that are geographically close or have convenient transportation, reducing unnecessary distance and time waste, and also facilitates the subsequent generation of a coherent travel route.

[0066] Next, the system uses a KDTree (K-dimensional Tree) algorithm (also known as a tree structure) to find the nearest neighboring attractions for each target attraction. KDTree is an efficient multidimensional data structure used to quickly find and manage nearest neighbor points in spatial datasets. Based on the initial optimization candidate pool and the nearest neighbor attractions of each target attraction, the optimized candidate pool is generated by integrating geographic information, distances between attractions, and other relevant factors.

[0067] In the above steps, cluster analysis is performed on the initial candidate pool of scenic spots to obtain clustering results, including: Step 1: creating an empty cluster list, marking all scenic spots in the initial candidate pool of scenic spots as unvisited; Step 2: determining any scenic spot in the initial candidate pool of scenic spots as a seed point; Step 3: determining the number of all scenic spots in the neighborhood of the seed point to obtain a first number, and when the first number is greater than or equal to a preset threshold, determining the seed point as a core point, and adding all scenic spots in the neighborhood of the core point to the cluster and marking them as visited; when the first number is less than the preset threshold, determining the seed point as a noise point, wherein the noise point represents a discrete scenic spot in the initial candidate pool of scenic spots; Step 4: repeating Step 3 for each scenic spot in the neighborhood until no new scenic spot is added to the cluster, and obtaining a clustering result.

[0068] In some embodiments of the present application, an empty cluster list is used to store clusters that are subsequently formed. At the same time, the system marks all attractions in the initial attraction candidate pool as unvisited, and randomly selects an unvisited attraction as a seed point, and calculates the number of attractions near the seed point (i.e., within the neighborhood, usually defined by a preset radius ε), i.e., the first number. If the first number is greater than or equal to the preset minimum number of samples (i.e., the threshold minPts), then the seed point is regarded as a core point. The core point indicates that there are enough attractions around the attraction, and it is dense enough to form a cluster. On the contrary, if the first number is less than the preset threshold, the seed point is regarded as a noise point (or discrete attraction), which means that the attraction is relatively isolated and lacks sufficient adjacency with other attractions, and does not meet the density requirements for forming a cluster. After confirming that the seed point is a core point, the core point and all attractions within its neighborhood are added to the cluster currently being formed, and these attractions are marked as visited. Next, for each attraction added to the cluster, the algorithm repeats step 3 again to identify any unincorporated attractions within their respective neighborhoods that could serve as new core points or cluster members. Step 3 is repeated until no more attractions meet the core point criteria or all neighboring attractions have been visited. At this point, the cluster is constructed and the clustering result is obtained. This process ensures that all attractions in the cluster have at least minPts common neighboring attractions, thus maintaining the dense clustering characteristics within the cluster.

[0069] The following are examples of clustering results:

[0070] Cluster 1: Dong Village Drum Tower and Drum Tower Group;

[0071] Cluster 2: Majiang Blue Dream Valley Scenic Area and Wuyangma Ecological Tourism Scenic Area;

[0072] Cluster 3: Baibei Miao Village and Xijiang River Viewing Tower;

[0073] Others distributed separately: Zhenyuan Ancient City (excluded).

[0074] In the above steps, the nearest neighbor attractions of each target attraction are generated based on the initial optimization candidate pool, the geographic location information and the target attraction list, including: converting the geographic location information of each attraction in the initial optimization candidate pool into a two-dimensional coordinate point, and constructing a tree structure based on the two-dimensional coordinate points; determining each target attraction in the target attraction list as a query point, determining the distance value between the two-dimensional coordinate point of the query point and the two-dimensional coordinate points of other attractions in the initial optimization candidate pool in the tree structure, and obtaining a distance set corresponding to each query point, wherein the other attractions are other attractions in the initial optimization candidate pool except the query point; sorting the distance values ​​in each distance set from small to large to obtain a sorted distance set corresponding to each query point; and determining the attractions corresponding to the first preset number of distances in each sorted distance set as the nearest neighbor attractions of each target attraction.

[0075] In some embodiments of the present application, the geographic location information (usually longitude and latitude coordinates) of each scenic spot in the initial optimization candidate pool is converted into a two-dimensional coordinate point (x, y), where x and y represent longitude and latitude, respectively. A KDTree data structure (i.e., a tree structure) is constructed using these two-dimensional coordinate points. During the construction process, the KDTree is segmented according to a certain dimension of the coordinate (alternating between x and y) to form a multi-layer tree structure. The segmentation of each layer balances the size of the left and right subtrees as much as possible, which can accelerate the subsequent search process. Each scenic spot in the target scenic spot list is determined as a query point. In the constructed KDTree, the Euclidean distance between the two-dimensional coordinate point of the query point and the two-dimensional coordinate points of other scenic spots (i.e., nodes in the tree) is calculated. For each query point, the distance values ​​of all scenic spots adjacent to it are collected to form a distance set. The distance set corresponding to each query point is sorted in ascending order to obtain a sorted distance set. The scenic spots corresponding to the first preset number of distance values ​​are selected from the sorted distance set, and these scenic spots are determined as the nearest neighbor scenic spots of the query point (i.e., the target scenic spot). The preset number can be flexibly set according to actual needs. For example, in order to ensure the richness and diversity of attractions in the itinerary, 3 to 5 nearest attractions can be selected as neighbors.

[0076] Examples of nearest neighbor attractions are as follows:

[0077] 1. The nearest neighbors of the Dong Village Drum Tower are the Drum Tower Cluster and Baibei Miao Village.

[0078] 2. The nearest neighbors of Baibei Miao Village are Xijiang River Viewing Tower and Dong Village Drum Tower.

[0079] Using KDTree to search for nearest neighbor attractions significantly improves search speed and efficiency compared to traditional linear search methods. This tree-based search method can quickly locate the closest attractions to a target destination, optimizing itinerary planning and enhancing the user experience. Furthermore, the nearest neighbor attractions selected in this way better reflect the actual geographic connections between attractions, promoting itinerary continuity and efficiency.

[0080] In step S208 of the above-mentioned itinerary planning method, an itinerary plan is generated based on the optimization candidate pool and the itinerary requirements, including: step 1: determining any target attraction in the optimization candidate pool as the starting point, and initializing the itinerary planning list; step 2: based on the itinerary requirements, querying the unvisited attraction with the lowest cost from the nearest neighbors of the starting point to obtain the first target attraction; step 3: adding the first target attraction to the itinerary planning list, marking the first target attraction as visited, and updating the first target attraction as the starting point; step 4: repeating steps 2 to 3 until all attractions in the optimization candidate pool are visited; connecting the attractions in the itinerary planning list in sequence to obtain a trunk path; optimizing the trunk path to obtain the itinerary plan.

[0081] In some embodiments of the present application, a target attraction is arbitrarily selected from the optimized candidate pool as the starting point for itinerary planning, and an empty itinerary planning list is created to record the order of the attractions selected in the itinerary planning. Starting from the starting point, a tourist attraction that has not been visited and has the lowest cost (the first target attraction) is selected from its nearest neighbors that have not been visited. The cost can be determined based on various considerations, such as travel time, cost, and interest in the attraction, and is set according to the specific situation. The selected first target attraction is added to the itinerary planning list and marked as visited. At the same time, this attraction is updated as the new starting point. The above process is repeated, continuously selecting the tourist attraction with the lowest cost from the nearest neighbors that have not been visited at the current location and adding it to the itinerary planning list until all attractions in the optimized candidate pool have been visited. The attractions in the itinerary planning list are connected in order of visit to form a complete travel route, i.e., the main path. This path covers all attractions in the optimized candidate pool. The main path is further optimized using greedy algorithms, dynamic programming algorithms, etc. to obtain the itinerary plan, for example, by adjusting the order of visiting attractions to reduce the total travel time or cost, ensuring that the itinerary planning is more reasonable and efficient.

[0082] In the above steps, the trunk path is optimized to obtain a trip plan, including: step 1: obtaining a set of visited attractions and a set of unvisited attractions in the trunk path; step 2: determining a first cost from the first attraction in the set of visited attractions to each second attraction in the set of unvisited attractions, and determining a second cost from the starting attraction in the trunk path to the first attraction, wherein the first attraction is the last attraction visited in the set of visited attractions; step 3: determining a total cost from the starting attraction to the second attraction based on the first cost and the second cost; step 4: determining the second attraction with the smallest total cost as the second target attraction to be visited, and adding the second target attraction to the set of visited attractions; step 5: repeating steps 2 to 4 until all attractions in the trunk path are visited to obtain an optimized trip plan.

[0083] In some embodiments of the present application, when a trunk route is initially created, the system divides all attractions into two groups based on the current planning state: a set of visited attractions and a set of unvisited attractions. The first cost from the first attraction to each second attraction in the set of unvisited attractions is calculated, where the first attraction is the last attraction added to the set of visited attractions, representing the most recent destination of the current itinerary. By determining the first and second costs, a total cost is obtained. The first cost is the cost of visiting each attraction in the set of unvisited attractions from the first attraction. The cost metric can be time, expense, or other metrics, such as emotional value or fatigue, depending on the itinerary requirements. The second cost is the total cost accumulated from the starting attraction of the itinerary to the current first attraction. The second cost is used to assess the overall cost from the start of the trip to the next attraction to be visited. Among all possible second attractions, the attraction with the lowest total cost is selected and designated as the second target attraction. The second target attraction is moved from the set of unvisited attractions to the set of visited attractions. Steps 2 through 4 are repeated, continuously updating the second attraction and the set of visited attractions until the set of unvisited attractions is empty, meaning all attractions on the trunk route have been visited, resulting in an optimized itinerary plan.

[0084] The following is an example of optimized itinerary planning:

[0085] Dong Village Drum Tower-->Drum Tower Group: 1.622km;

[0086] Drum Tower Group-->Baibei Miao Village: 22.133km;

[0087] Baibei Miao Village-->Xijiang River Viewing Tower: 34.782km;

[0088] Xijiang River Viewing Tower-->Majiang Blue Dream Valley Scenic Area: 13.522km;

[0089] Majiang Lanmeng Valley Scenic Area-->Wuyangma Ecological Tourism Scenic Area: 2.801km;

[0090] all_distance:74.860km.

[0091] In step S208 of the above-mentioned itinerary planning method, after generating the itinerary plan, the method further includes: obtaining tag information of all attractions in the itinerary plan, wherein the tag information is used to represent attribute information and rating information of the attractions; generating a planned route based on the itinerary plan and the tag information, wherein the planned route includes the name of the attraction, the reason for recommendation, and precautions; and returning the planned route to the target object.

[0092] In some embodiments of the present application, the tag information includes the attributes of the scenic spot, such as the type of scenic spot (natural scenery, historical culture, etc.), suitable groups (families, couples, photography enthusiasts, etc.) and rating information. Combining the order of scenic spots in the itinerary planning and the collected tag information, the system can generate a recommendation reason for each scenic spot, that is, why this scenic spot is worth visiting, as well as possible precautions, such as the best season, opening hours, special event information, etc. The recommendation reasons are based on the unique attributes of the scenic spot and the user's preferences (for example, if it is a food explorer, the food features will be emphasized; if it is a nature lover, the natural scenery will be highlighted). The system integrates the name of the scenic spot, the reason for recommendation, the precautions and the rating information to form an easy-to-understand planned route through text or a list, and returns the planned route to the target object. The planned route is usually listed in detail by day and time period, such as "First day morning: visit XX scenic spot and experience its unique cultural heritage (rating 4.8); remember to purchase tickets in advance."

[0093] Specifically, you can use the big model to arrange your itinerary. Examples of itinerary planning prompts are as follows:

[0094] As a professional travel itinerary planner, your task is to create a detailed itinerary based on the user's needs. Ensure the itinerary is reasonable, covers all the must-see attractions, and visits the appropriate attractions in the order.

[0095] **step:**

[0096] 1. **Understand user needs:**

[0097] - Obtain information about the user's travel destination, time, total number of days, participating groups (adults, elderly), scenic spot type, must-see scenic spots, etc.

[0098] 2. **Collect scenic spot information:**

[0099] -Collect and organize information such as the introduction, recommended visiting time, longitude and latitude of each scenic spot.

[0100] 3. **Make a travel plan:**

[0101] -**Itinerary order:** Please arrange your itinerary according to the order of the scenic spots in the "Suitable Scenic Spots" list.

[0102] - **Travel time analysis: ** Consider the scenic area opening hours, commuting time and recommended travel duration to arrange your itinerary reasonably.

[0103] -**Physical strength and interests:** Considering the physical strength of adults and the elderly, arrange 1 to 3 scenic spots per day to avoid an itinerary that is too tight.

[0104] -**Weather and seasons:** Consider the impact of weather and seasons on the scenic area.

[0105] - **Notes:** Provide notes on weather, transportation, tickets, etc.

[0106] 4. **Specific itinerary example:**

[0107] -Refer to the sample answers below.

[0108] **List of scenic spots:**

[0109] -**Suitable scenic spots (main trails):**[

[0110] {'Scenic Spot Name':'Dong Village Drum Tower','Suggested Visiting Duration': 3 hours,'Longitude': 109.173833,'Latitude': 25.912439,'About Us':'Dong Village Drum Tower, a quintessence of Dong culture, is rich in historical heritage. In spring and autumn, stroll through the Dong village, experience the unique drum tower architecture, and experience the Dong customs.','Opening Hours':'13:00:00','Closing Time':'12:59:59','Scenic Spot Type':['Humanities and History','City Stroll'],'Suitable Groups':['Individuals','Culture Followers','Couples'],'Rating': 4.5},

[0111] {'Scenic Spot Name':'Drum Tower Cluster','Suggested Visiting Duration': 3 hours,'Longitude': 109.190068,'Latitude': 25.912312,'About the Scenic Spot':'The Drum Tower Cluster, a symbol of Dong culture, showcases unique architectural charm and carries historical memories. Its rigorous structure, devoid of a single nail or rivet, and exquisite craftsmanship, integrate the towers, pavilions, and pavilions into one, embodying the essence of Dong architectural techniques.','Opening Hours':'13:00:00','Closing Time':'12:59:59','Scenic Spot Type':['Humanities and History','City Stroll'],'Suitable Groups':['Individuals','Families','Couples','Parents and Children','Friends','Groups'],'Rating': 4.5},

[0112] {'Scenic Spot Name':'Baibei Miao Village','Suggested Visiting Time': 4 hours,'Longitude': 108.170031,'Latitude': 25.861512,'About the Scenic Spot':'Baibei Miao Village, an ancient Miao village on Yueliang Mountain, is rich in Miao folk culture, with bird feather costumes, the Drum Tibetan Festival, the Ancient Gourd Dance, and more. It's simple and rich with folk customs, allowing you to experience the original ecological Miao culture.','Opening Hours':'13:00:00','Closing Time':'12:59:59','Scenic Spot Type':['Humanities and History','Traditional Craft Experience','Culture Followers'],'Suitable Groups':['Families','Parent-Child','Humanities and History Enthusiasts'],'Rating': 4.5},

[0113] {'Scenic Spot Name':'Xijiang River Viewing Tower', 'Suggested Visiting Duration': 3 hours, 'Longitude': 108.177352, 'Latitude': 26.498439, 'About the Scenic Spot':'Xijiang River Viewing Tower is a great place to experience Miao culture, offering everything from sightseeing and accommodation to dining. The scenery is especially beautiful in summer, where you can experience traditional Miao customs such as Lanmen Wine and Kagu.', 'Opening Hours': '13:00:00', 'Closing Time': '12:59:59', 'Scenic Spot Type': ['Humanities and History', 'City Stroll'], 'Suitable Groups': ['Family', 'Parent-Child', 'Couples'], 'Rating': 4.5},

[0114] {'Scenic Spot Name':'Majiang Blue Dream Valley Scenic Area','Suggested Visiting Duration': 4 hours,'Longitude': 107.749526,'Latitude': 26.416666,'Scenic Area Description':'Majiang Blue Dream Valley Scenic Area, an ecological blueberry farm in Guizhou, integrates blueberry cultivation, research, processing, and sightseeing. Experience the fun of picking blueberries, taste delicious blueberries, and experience the unique agricultural culture.','Opening Hours':'13:00:00','Closing Time':'12:59:59','Scenic Area Type':['Nature Exploration','Agricultural Experience','Food Exploration'],'Suitable Groups':['Family','Parent-Child','Food Explorers'],'Rating': 4.5},

[0115] {'Scenic Spot Name':'Wuyangma Ecological Tourism Scenic Area','Suggested Visiting Duration': 4 hours,'Longitude': 107.755823,'Latitude': 26.392101,'About the Scenic Area':'Wuyangma Ecological Tourism Scenic Area, a microcosm of Miao culture. With picturesque scenery and the elegantly arranged Miao village architecture, experience the pristine Miao customs, explore history and culture, and enjoy the beauty of nature.','Opening Hours':'13:00:00','Closing Hours':'12:59:59','Scenic Area Type':['Humanities and History','Ancient Towns and Villages','Nature Exploration','Outdoor Adventure'],'Suitable Groups':['Individuals','Self-Exploration','Couples','Romantic Getaway','Family','Multi-Generation Travel'],'Rating': 4.5} ]

[0117] -**Must-see scenic spots:** [Dong Village Drum Tower, Baibei Miao Village]

[0118] Sample answers are as follows:

[0119] The following is a detailed itinerary plan for xxx:

[0120] Trip theme: XX

[0121] Day 1: Title

[0122] *morning

[0123] 1. Destination: XX1

[0124] Recommended reason:XX

[0125] *Lunch: Recommended lunch items.

[0126] Precautions

[0127] *Weather: Describes local weather conditions and provides clothing recommendations.

[0128] *Transportation: local transportation characteristics and travel recommendations.

[0129] *Tickets: whether to purchase tickets in advance, etc.

[0130] End of sample

[0131] Always pay attention to plan your trip step by step according to the requirements, work out a reasonable travel route, and ensure that the trip is smooth and enjoyable. The answer format must strictly refer to the sample, and no additional information should be added in the answer.

[0132] User requirements: Itinerary requirements: Destination: Qiandongnan Miao and Dong Autonomous Prefecture; Time: August 4, 2025 - August 6, 2025; Total number of days: 3 days; Crowd: Parents and children; Type: Food exploration; Composition: 1 adult, 0 seniors, 1 child; Must-see scenic spots: Dong Village Drum Tower, Baibei Miao Village.

[0133] An example of a planned route output by a large model is as follows:

[0134] The following is a detailed itinerary plan for traveling in Qiandongnan Miao and Dong Autonomous Prefecture:

[0135] #Itinerary theme: Southeast Guizhou Food and Cultural Exploration Tour

[0136] #Day 1: First exploration of Dong ethnic customs

[0137] ##morning

[0138] ###1. Scenic spot name: Dong Village Drum Tower

[0139] ###Recommendation: The Dong Village Drum Tower is the quintessence of Dong culture and rich in historical heritage. In spring and autumn, stroll through the village to appreciate the unique drum tower architecture and experience the Dong customs.

[0140] ###Lunch: We recommend trying the Dong ethnic group’s special dishes, such as Dong ethnic group’s sour soup fish and Dong ethnic group’s oil tea.

[0141] ##afternoon

[0142] ###1. Scenic spot name: Drum Tower Group

[0143] ###Recommendation: The Drum Tower complex is a symbol of Dong culture, showcasing its unique architectural charm and carrying historical memories. Its rigorous structure, devoid of a single nail or rivet, is exquisitely crafted, integrating towers, pavilions, and pavilions into one, embodying the essence of Dong architectural techniques.

[0144] ###Dinner: We recommend tasting local specialties such as Dong ethnic group pickled fish and Dong ethnic group glutinous rice.

[0145] #Day 2: Dive into Miao culture

[0146] All day

[0147] ###1. Scenic spot name: Baibei Miao Village

[0148] ###Recommendation reason: Baibei Miao Village is an ancient Miao village on Yueliang Mountain. It contains rich Miao folk culture, such as bird feather costumes, drum Tibetan festival, ancient gourd dance, etc. It is simple and rich with folk customs, and you can experience the original ecological Miao culture.

[0149] ###Lunch: Enjoy traditional Miao cuisine in the Miao village, such as Miao sour soup fish and Miao bacon.

[0150] ###Dinner: Continue exploring local cuisine. We recommend trying Miao bamboo rice and Miao pickled vegetables.

[0151] #Day3:Experience Diverse Cultures

[0152] ##morning

[0153] ###1. Scenic spot name: Shidong Miao Village

[0154] ###Recommendation: Shidong Miao Village is renowned for its unique silver jewelry and embroidery, serving as a vital showcase for Miao culture. Wander through the ancient village and experience the charm of traditional Miao crafts.

[0155] ###Lunch: We recommend trying Shidong’s specialties, such as Miao-style sour soup fish and Miao-style glutinous rice.

[0156] ##afternoon

[0157] ###1. Scenic spot name: Xijiang River Viewing Tower

[0158] ###Recommendation reason: Xijiang Shangjiang Tower is a great place to experience Miao culture, with sightseeing, accommodation and dining available. The scenery is especially beautiful in summer, where you can experience the traditional Miao customs such as Lanmen wine and Kagu.

[0159] ###Dinner: Enjoy Miao specialties at Xijiang Shangjiang Tower, such as Miao sour soup beef and Miao glutinous rice cakes.

[0160] #Notes

[0161] ##*Weather: Southeast Guizhou is very hot in August. It is recommended to bring sunscreen, a sun hat, and light long-sleeved clothing, and pay attention to heatstroke prevention and cooling.

[0162] ##*Transportation: There are many mountainous roads in Qiandongnan area. It is recommended to hire a local driver who is familiar with the road conditions or choose a chartered car service to ensure safety.

[0163] ##*Tickets: Some scenic spots may require advance ticket booking. It is recommended to book tickets online or on the scenic spot’s official website in advance to avoid queuing on site.

[0164] ##*Notes for parents and children: Bring children's products, such as strollers, sunscreen, mosquito repellent, etc. Pay attention to safety tips in the scenic area to ensure the safety of your children.

[0165] In addition, the itinerary planning method in the embodiment of the present application can also monitor changes in the external environment (such as weather and traffic) in real time, automatically adjust the itinerary planning, and ensure the smooth progress of the trip.

[0166] In some embodiments of the present application, the tag information of tourist attractions can be obtained by the following methods: the system collects tourist attraction information from various sources (such as travel websites, social media, and user feedback), obtains the latest user feedback and real-time dynamic environmental data, and labels the tourist attractions accordingly. Weather, traffic, and emergency information are obtained through API interfaces to ensure the timeliness and accuracy of the data.

[0167] Specifically, first collect data on all scenic spots in the region, including but not limited to the following information: name, introduction, rating, opening hours, address, ticket price, latitude and longitude coordinates, duration of visit, optimal visit time, theme, suitable crowd, pictures, route, etc. Input the collected scenic spot information into a large model (such as glm-4-air) and submit the large model for labeling. Use scenic spot label prompts to guide the model to generate labels. The prompts cover the main characteristics of the scenic spot. Examples of prompts are as follows:

[0168] As a professional scenic spot evaluator, your task is to classify the scenic spot into suitable tourists and scenic spot types based on the scenic spot information provided by users, generate a scenic spot introduction of less than 100 words (highlighting the characteristics, features, and fascinatingness), and give a score of 1 to 5 based on the scenic spot introduction, facilities, services, etc.

[0169] It can only be divided into the following aspects, and only one or more labels can be selected;

[0170] Suitable for travelers Tags:

[0171] ['Self-discovery', 'Backpacker', 'Healing', 'Solo Vacation', 'Parenting', 'Multi-generational Travel', 'Family Gathering', 'Parent-Child Interaction', 'Honeymoon', 'Romantic Vacation', 'Anniversary Celebration', 'Couple's Adventure', 'Girlfriends', 'Shopping Spree', 'Food Tour', 'Relaxing Vacation', 'Friends', 'Class Reunion', 'Group Adventure', 'Sports Travel', 'Photography Enthusiast', 'Food Explorer', 'Culture Follower', 'Sports Enthusiast']

[0172] Scenic spot type label:

[0173] ['Ancient Towns and Villages', 'Historical Exploration', 'Literary Journey', 'Museum Tour', 'Traditional Craft Experience', 'City Walk', 'Business Trip', 'Nightlife Experience', 'Leisure Vacation', 'Music Trip', 'Shopping Trip', 'City Art Exhibition', 'Outdoor Adventure', 'Extreme Sports', 'Nature Sightseeing', 'Adventure Tour', 'Wildlife Watching', 'Mountain Climbing Tour', 'Desert Exploration', 'Ocean Exploration', 'Theme Park', 'Art Tour', 'Hot Spring Wellness', 'Festivals', 'Film and Television Location Tour', 'Game Competition Tour', 'Farmhouse Stay', 'Cooking Class', 'Winery Tasting', 'Local Snacks', 'Gardens and Gardens', 'Landmark Viewing', 'Influencer Check-in', 'Venues and Exhibition Halls']

[0174] You can only select one or more tags from the above tags.

[0175] Sample answers are as follows:

[0176] audience_tags:XXXX,XXXX,XXXX

[0177] play_type_tags:XXXX,XXXX,XXXX

[0178] scenicSpotProfile: XXXXXXXX

[0179] score: 2.4

[0180] Only return the string in JSON format. Do not return anything other than JSON.

[0181] After the model processes the input information, it returns the corresponding scenic spot label information for further analysis and use. The returned results are as follows:

[0182] {

[0183] "audience_tags":"family gatherings, parent-child interactions, wildlife viewing",

[0184] "play_type_tags":"Theme park, natural sightseeing, science education",

[0185] "scenicSpotProfile":"Chimelong Safari Park is a model for animal protection and breeding, home to a vibrant collection of rare species and a rich educational atmosphere, making it an ideal destination for family outings."

[0186] "score":4.5

[0187] }

[0188] The itinerary planning method provided in the embodiments of the present application has the following advantages: 1. Improving the accuracy of itinerary planning: through accurate user portraits and dynamic data analysis, itinerary recommendations are more closely aligned with user needs; 2. Optimizing the travel experience: Real-time route optimization reduces unnecessary time waste and improves travel quality; 3. Enhancing user satisfaction: through flexible interactive methods and real-time response mechanisms, personalized itinerary arrangements enhance the overall user experience and increase customer stickiness; 4. Reducing travel risks: through dynamic adjustment functions, reducing itinerary interruptions or delays caused by external factors.

[0189] Figure 3 is a structural diagram of a trip planning device according to an embodiment of the present application, such as Figure 3 As shown, the device includes:

[0190] An acquisition module 30 is configured to acquire a travel requirement input by a target object, wherein the travel requirement includes a list of target attractions;

[0191] The parsing module 32 is used to parse the itinerary requirements and obtain an initial pool of candidate attractions, wherein the initial pool of candidate attractions includes the names of the attractions and the geographical location information of the attractions;

[0192] An optimization module 34 is configured to optimize the initial pool of candidate attractions based on the geographic location information to obtain an optimized candidate pool, wherein the optimized candidate pool includes the nearest neighbor attractions of each target attraction in the target attraction list;

[0193] The generation module 36 is used to generate a trip plan based on the optimized candidate pool and the trip requirements.

[0194] Through the acquisition module, parsing module, optimization module and generation module in the above-mentioned itinerary planning device, the purpose of personalized and intelligent itinerary planning is achieved, thereby realizing the technical effect of improving itinerary planning efficiency and user experience, and further solving the technical problem in related technologies that itinerary planning usually relies on users to manually select attractions, lacks intelligent and personalized recommendations, and leads to low itinerary planning efficiency.

[0195] In the optimization module in the above-mentioned itinerary planning device, the optimization module is also used to perform cluster analysis on the initial attraction candidate pool to obtain clustering results; delete discrete attractions in the clustering results from the initial attraction candidate pool to obtain an initial optimized candidate pool; generate the nearest neighbor attractions of each target attraction based on the initial optimized candidate pool, geographic location information and target attraction list; and obtain an optimized candidate pool based on the initial optimized candidate pool and the nearest neighbor attractions.

[0196] In the optimization module in the above-mentioned itinerary planning device, the optimization module is further used to perform the following steps: Step 1: Create an empty cluster list and mark all attractions in the initial attraction candidate pool as unvisited; Step 2: Determine any attraction in the initial attraction candidate pool as a seed point; Step 3: Determine the number of all attractions in the neighborhood of the seed point to obtain a first number. When the first number is greater than or equal to a preset threshold, the seed point is determined as a core point, and all attractions in the neighborhood of the core point are added to the cluster and marked as visited; when the first number is less than the preset threshold, the seed point is determined as a noise point, where the noise point represents a discrete attraction in the initial attraction candidate pool; Step 4: Repeat step 3 for each attraction in the neighborhood until no new attractions are added to the cluster, and a clustering result is obtained.

[0197] In the optimization module in the above-mentioned itinerary planning device, the optimization module is also used to convert the geographic location information of each scenic spot in the initial optimization candidate pool into a two-dimensional coordinate point, and construct a tree structure based on the two-dimensional coordinate points; determine each target scenic spot in the target scenic spot list as a query point, determine the distance value between the two-dimensional coordinate point of the query point and the two-dimensional coordinate points of other scenic spots in the initial optimization candidate pool in the tree structure, and obtain a distance set corresponding to each query point, wherein the other scenic spots are other scenic spots in the initial optimization candidate pool except the query point; sort the distance values ​​in each distance set from small to large to obtain a sorted distance set corresponding to each query point; and determine the scenic spots corresponding to the first preset number of distances in each sorted distance set as the nearest neighbor scenic spots of each target scenic spot.

[0198] In the generation module in the above-mentioned itinerary planning device, the generation module is also used to perform the following steps: Step 1: Determine any target attraction in the optimization candidate pool as the starting point and initialize the itinerary planning list; Step 2: Based on the itinerary requirements, query the unvisited attraction with the lowest cost from the nearest neighbors of the starting point to obtain the first target attraction; Step 3: Add the first target attraction to the itinerary planning list, mark the first target attraction as visited, and update the first target attraction as the starting point; Step 4: Repeat steps 2 to 3 until all attractions in the optimization candidate pool are visited; connect the attractions in the itinerary planning list in sequence to obtain a trunk path; optimize the trunk path to obtain the itinerary plan.

[0199] In the generation module in the above-mentioned itinerary planning device, the generation module is further used to perform the following steps: Step 1: Obtain a set of visited scenic spots and a set of unvisited scenic spots in the trunk path; Step 2: Determine a first cost from the first scenic spot in the set of visited scenic spots to each second scenic spot in the set of unvisited scenic spots, and determine a second cost from the starting scenic spot in the trunk path to the first scenic spot, wherein the first scenic spot is the last scenic spot visited in the set of visited scenic spots; Step 3: Determine the total cost from the starting scenic spot to the second scenic spot based on the first cost and the second cost; Step 4: Determine the second scenic spot with the smallest total cost as the second target scenic spot to be visited, and add the second target scenic spot to the set of visited scenic spots; Step 5: Repeat steps 2 to 4 until all scenic spots in the trunk path are visited, and obtain an optimized itinerary plan.

[0200] In the generation module in the above-mentioned itinerary planning device, the generation module is also used to obtain label information of all attractions in the itinerary plan, wherein the label information is used to represent the attribute information and rating information of the attractions; generate a planned route based on the itinerary plan and the label information, wherein the planned route includes the name of the attraction, the reason for recommendation and precautions; and return the planned route to the target object.

[0201] It should be noted that Figure 3 The trip planning device shown is used to perform Figure 2 The itinerary planning method shown in FIG. 1 is a flowchart of a flowchart of a trip planning device, and therefore the relevant explanations in the above-mentioned trip planning method are also applicable to the trip planning device, which will not be repeated here.

[0202] An embodiment of the present application also provides an electronic device, which includes a memory and a processor, wherein the memory is used to store program instructions; the processor is connected to the memory and is used to execute program instructions to implement the following functions: obtaining itinerary requirements input by a target object, wherein the itinerary requirements include a list of target attractions; parsing the itinerary requirements to obtain an initial attraction candidate pool, wherein the initial attraction candidate pool includes attraction names and geographic location information of the attractions; optimizing the initial attraction candidate pool based on the geographic location information to obtain an optimized candidate pool, wherein the optimized candidate pool includes the nearest neighbor attractions of each target attraction in the target attraction list; generating an itinerary plan based on the optimized candidate pool and the itinerary requirements.

[0203] It should be noted that the above electronic equipment is used to perform Figure 2 The itinerary planning method shown in the figure is as follows, so the relevant explanations in the above itinerary planning method are also applicable to the electronic device and will not be repeated here.

[0204] An embodiment of the present application also provides a non-volatile storage medium, which includes a stored computer program, wherein the device where the non-volatile storage medium is located executes the following itinerary planning method by running the computer program: obtaining itinerary requirements input by a target object, wherein the itinerary requirements include a list of target attractions; parsing the itinerary requirements to obtain an initial attraction candidate pool, wherein the initial attraction candidate pool includes attraction names and geographic location information of the attractions; optimizing the initial attraction candidate pool based on the geographic location information to obtain an optimized candidate pool, wherein the optimized candidate pool includes the nearest neighbor attractions of each target attraction in the target attraction list; and generating an itinerary plan based on the optimized candidate pool and the itinerary requirements.

[0205] It should be noted that the above non-volatile storage medium is used to execute Figure 2 The itinerary planning method shown, therefore the relevant explanations in the above itinerary planning method are also applicable to the non-volatile storage medium and will not be repeated here.

[0206] An embodiment of the present application also provides a computer program product, including computer instructions, which, when executed by a processor, implement the steps of the itinerary planning method in each embodiment of the present application.

[0207] An embodiment of the present application also provides a computer program, which, when executed by a processor, implements the steps of the itinerary planning method in each embodiment of the present application.

[0208] The serial numbers of the above embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0209] In the above embodiments of the present application, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0210] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only exemplary. For example, the division of the units can be a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0211] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0212] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0213] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.

[0214] The above is only a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A trip planning method, characterized in that: include: Acquiring a travel requirement input by a target object, wherein the travel requirement includes a list of target attractions; Parsing the itinerary requirements to obtain an initial pool of candidate attractions, wherein the initial pool of candidate attractions includes the names of the attractions and the geographical location information of the attractions; Optimizing the initial attraction candidate pool according to the geographic location information to obtain an optimized candidate pool, wherein the optimized candidate pool includes the nearest neighbor attractions of each target attraction in the target attraction list; Generate a trip plan based on the optimization candidate pool and the trip requirements.

2. The method according to claim 1, characterized in that Optimizing the initial pool of candidate attractions based on the geographic location information to obtain an optimized candidate pool includes: Performing cluster analysis on the initial candidate pool of scenic spots to obtain clustering results; Deleting discrete attractions in the clustering result from the initial attraction candidate pool to obtain an initial optimized candidate pool; Generating the nearest neighbor attractions of each target attraction based on the initial optimization candidate pool, the geographic location information, and the target attraction list; The optimization candidate pool is obtained according to the initial optimization candidate pool and the nearest neighbor scenic spots.

3. The method according to claim 2, characterized in that Perform cluster analysis on the initial pool of candidate scenic spots to obtain clustering results, including: Step 1: Create an empty cluster list and mark all attractions in the initial attraction candidate pool as unvisited; Step 2: Determine any one of the initial candidate scenic spots as a seed point; Step 3: Determine the number of all scenic spots in the neighborhood of the seed point to obtain a first number. If the first number is greater than or equal to a preset threshold, determine the seed point as a core point, add all scenic spots in the neighborhood of the core point to a cluster, and mark them as visited. If the first number is less than the preset threshold, determine the seed point as a noise point, where the noise point represents a discrete scenic spot in the initial candidate pool of scenic spots. Step 4: Repeat step 3 for each scenic spot in the neighborhood until no new scenic spots are added to the cluster, thereby obtaining the clustering result.

4. The method according to claim 2, characterized in that Generating the nearest neighbor attractions of each target attraction based on the initial optimization candidate pool, the geographic location information, and the target attraction list, including: Converting the geographical location information of each scenic spot in the initial optimization candidate pool into a two-dimensional coordinate point, and constructing a tree structure based on the two-dimensional coordinate points; Determine each target attraction in the target attraction list as a query point, determine the distance values ​​between the two-dimensional coordinate point of the query point and the two-dimensional coordinate points of other attractions in the initial optimization candidate pool in the tree structure, and obtain a distance set corresponding to each query point, wherein the other attractions are other attractions in the initial optimization candidate pool except the query point; Sort the distance values ​​in each distance set from small to large to obtain the sorted distance set corresponding to each query point; The attractions corresponding to the first preset number of distances in each of the sorted distance sets are determined as the nearest neighbor attractions of each target attraction.

5. The method according to claim 1, characterized in that Generating a trip plan based on the optimization candidate pool and the trip requirements, including: Step 1: Determine any target attraction in the optimization candidate pool as the starting point and initialize the itinerary planning list; Step 2: Based on the travel requirements, query the nearest neighbors of the starting point for the unvisited scenic spot with the lowest cost to obtain the first target scenic spot; Step 3: Add the first target attraction to the itinerary planning list, mark the first target attraction as visited, and update the first target attraction as the starting point; Step 4: Repeat steps 2 to 3 until all attractions in the optimization candidate pool are visited; Connecting the scenic spots in the itinerary planning list in sequence to obtain a trunk route; The trunk path is optimized to obtain the itinerary plan.

6. The method according to claim 5, characterized in that Optimizing the trunk path to obtain the trip plan includes: Step 1: Obtain a set of visited scenic spots and a set of unvisited scenic spots in the trunk path; Step 2: Determine a first cost from a first attraction in the set of visited attractions to each second attraction in the set of unvisited attractions, and determine a second cost from a starting attraction in the trunk path to the first attraction, wherein the first attraction is the last attraction visited in the set of visited attractions; Step 3: Determine the total cost from the starting scenic spot to the second scenic spot based on the first cost and the second cost; Step 4: Determine the second scenic spot with the minimum total cost as the second target scenic spot to be visited, and add the second target scenic spot to the set of visited scenic spots; Step 5: Repeat steps 2 to 4 until all attractions in the trunk route are visited, and an optimized itinerary plan is obtained.

7. The method according to claim 1, characterized in that After generating the trip plan, the method further includes: Obtaining tag information of all attractions in the itinerary plan, wherein the tag information is used to represent attribute information and rating information of the attractions; Generate a planned route based on the itinerary plan and the tag information, wherein the planned route includes the name of the attraction, the reason for recommendation, and precautions; The planned route is returned to the target object.

8. A trip planning device, characterized in that: include: An acquisition module, configured to acquire a travel requirement input by a target object, wherein the travel requirement includes a list of target attractions; A parsing module, configured to parse the itinerary requirements and obtain an initial pool of candidate attractions, wherein the initial pool of candidate attractions includes the names of the attractions and the geographical location information of the attractions; an optimization module, configured to optimize the initial candidate pool of scenic spots according to the geographic location information to obtain an optimized candidate pool, wherein the optimized candidate pool includes the nearest neighboring scenic spots of each target scenic spot in the target scenic spot list; A generation module is used to generate a trip plan based on the optimization candidate pool and the trip requirements.

9. An electronic device, characterized in that: include: a memory for storing program instructions; A processor is connected to the memory and is used to execute program instructions that implement the following functions: obtaining a travel requirement input by a target object, wherein the travel requirement includes a list of target attractions; parsing the travel requirement to obtain an initial attraction candidate pool, wherein the initial attraction candidate pool includes attraction names and geographic location information of the attractions; optimizing the initial attraction candidate pool based on the geographic location information to obtain an optimized candidate pool, wherein the optimized candidate pool includes the nearest neighbor attractions of each target attraction in the target attraction list; and generating an itinerary plan based on the optimized candidate pool and the travel requirement.

10. A non-volatile storage medium, characterized in that: The non-volatile storage medium includes a stored computer program, wherein the device where the non-volatile storage medium is located executes the trip planning method according to any one of claims 1 to 7 by running the computer program.

11. A computer program product comprising computer instructions, characterized in that When the computer instructions are executed by a processor, the itinerary planning method according to any one of claims 1 to 7 is implemented.