Trip planning method and device, electronic equipment and storage medium

By obtaining and using weather forecast information and determining the itinerary access sequence and time period, the problem that the existing technology cannot consider weather factors is solved, and it is possible to achieve suitable weather travel planning, improving efficiency and user experience.

CN119026778APending Publication Date: 2024-11-26BAIDU ONLINE NETWORK TECH (BEIJIBG) CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411255156.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-06
Publication Date
2024-11-26

AI Technical Summary

Technical Problem

The existing itinerary planning methods cannot take into account the weather conditions during the journey, resulting in the inability to provide users with suitable itinerary planning for weather.

Method used

By obtaining the itinerary information entered by the user and the weather forecast information for each to be visited during the travel time period, the planned itinerary, including the access sequence and the access time period are determined to ensure that the weather at each to be visited is appropriate.

Benefits of technology

It increases the probability of suitable weather at each visiting location during the itinerary, reduces the dependence of itinerary on labor, and improves planning efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119026778A_ABST
    Figure CN119026778A_ABST
Patent Text Reader

Abstract

The invention provides an itinerary planning method and device, electronic equipment and a storage medium, and relates to the technical field of data processing, in particular to the technical field of intelligent traffic and route planning. The specific implementation scheme of the embodiment of the invention is as follows: acquiring travel information input by a user, wherein the travel information comprises a plurality of places to be visited and travel time periods; acquiring weather forecast information of each to-be-visited place in the travel time period, wherein the weather forecast information is used for reflecting whether travel is suitable or not; according to the weather forecast information of each to-be-visited place, determining a planned travel according to the fact that a behavior target is suitable for each to-be-visited place in the visit time period, the planned travel including the visit sequence of each to-be-visited place and the visit time period of each to-be-visited place. The journey with appropriate weather is provided for the user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of data processing technology, and in particular to the field of intelligent transportation and route planning technology. Background Art

[0002] Economic growth and technological progress have promoted the development of transportation and tourism, making people go out for work or travel more and more frequently. Before going out, in order to improve travel efficiency, people generally need to determine the various locations along the way and make travel plans based on these locations. Summary of the invention

[0003] The present disclosure provides a trip planning method, device, electronic device and storage medium.

[0004] A first aspect of an embodiment of the present disclosure provides a trip planning method, including:

[0005] Acquire itinerary information input by a user, the itinerary information including: a plurality of places to be visited and a travel time period;

[0006] Obtaining weather forecast information for each location to be visited during the travel time period, wherein the weather forecast information is used to reflect whether the location is suitable for travel;

[0007] According to the weather forecast information of each place to be visited, the planned itinerary is determined with the goal of making each place to be visited suitable for travel within the visiting time period. The planned itinerary includes: the visiting order of each place to be visited and the visiting time period of each place to be visited.

[0008] A second aspect of the embodiments of the present disclosure provides a trip planning device, including:

[0009] An acquisition module, used to acquire itinerary information input by a user, wherein the itinerary information includes: a plurality of places to be visited and a travel time period;

[0010] The acquisition module is further used to acquire weather forecast information of each location to be visited during the travel time period, wherein the weather forecast information is used to reflect whether the location is suitable for travel;

[0011] The determination module is used to determine the planned itinerary based on the weather forecast information of each to-be-visited location obtained by the acquisition module, with the goal of making each to-be-visited location suitable for travel within the visiting time period, and the planned itinerary includes: the visiting order of each to-be-visited location and the visiting time period of each to-be-visited location.

[0012] According to a third aspect of the embodiments of the present disclosure, there is provided an electronic device, including:

[0013] at least one processor; and

[0014] a memory communicatively connected to the at least one processor; wherein,

[0015] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform any method according to the first aspect.

[0016] According to a fourth aspect of an embodiment of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause the computer to execute a method according to any one of the first aspects.

[0017] According to a fifth aspect of an embodiment of the present disclosure, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, the method according to any one of the first aspects is implemented.

[0018] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.

[0020] Figure 1 is a flow chart of a first itinerary planning method provided by an embodiment of the present disclosure;

[0021] Figure 2 is a flow chart of a second itinerary planning method provided by an embodiment of the present disclosure;

[0022] Figure 3 is a flowchart of a third itinerary planning method provided by an embodiment of the present disclosure;

[0023] Figure 4 is a flowchart of a fourth itinerary planning method provided by an embodiment of the present disclosure;

[0024] Figure 5 is an exemplary schematic diagram of a trip planning process provided by an embodiment of the present disclosure;

[0025] Figure 6 is a structural schematic diagram of a trip planning device provided by an embodiment of the present disclosure;

[0026] Figure 7 It is a block diagram of an electronic device used to implement the itinerary planning method of the embodiment of the present disclosure. DETAILED DESCRIPTION

[0027] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0028] When planning travel itineraries or daily trips, users often face problems such as time constraints and information overload. Taking travel itineraries as an example, users need to first determine the locations of the various places they will pass through during the trip, and then arrange the order of the places they will pass through based on the locations of the places. Then, users can view the routes between adjacent places in the navigation tool and arrange their own time to visit each place. However, current navigation tools usually only provide the shortest route between places and cannot take into account the weather conditions during the trip. Therefore, current itinerary planning methods cannot provide users with weather-friendly itineraries.

[0029] In order to provide a weather-friendly itinerary, the embodiment of the present disclosure provides an itinerary planning method, which is applied to an electronic device, such as a server, a desktop computer, or a notebook computer, etc., which has data processing capabilities. Figure 1 As shown, the itinerary planning method provided by the embodiment of the present disclosure includes the following steps:

[0030] S101. Acquire itinerary information input by a user; wherein the itinerary information includes: a plurality of places to be visited and a travel time period.

[0031] The electronic device may be a server, and in this case, the electronic device may receive the itinerary information input by the user sent by the user. The user may be a client, a webpage, or a small program, and the user runs on a terminal, such as a mobile phone, a tablet computer, or a laptop computer. In this case, the user may display an input interface to the user, and the user may enter the itinerary information in the input interface by keyboard input or voice input. After that, the user may send the itinerary information to the server after detecting that the user triggers a submit command in the input interface.

[0032] Alternatively, the electronic device may be a user terminal, in which case the electronic device may directly display an input interface and receive travel information input by the user in the input interface.

[0033] In the disclosed embodiment, the plurality of places to be visited are places that need to be passed during the trip, for example, the places to be visited include: amusement parks, natural scenic spots, museums, commercial streets and other indoor or outdoor attractions.

[0034] The travel time period is the time period from the departure time to the end time. The travel time period can be represented by the departure time and the end time. For example, the departure time is January 1, 2024, and the end time is January 3, 2024. For another example, the departure time is 08:00 on January 1, 2024, and the end time is 18:00 on January 1, 2024.

[0035] S102: Obtain weather forecast information for each location to be visited during the travel period.

[0036] The electronic device can call a preset weather application programming interface (Application Programming Interface, API) to obtain weather forecast information for each location to be visited during the travel time period.

[0037] It can be understood that since the travel time period belongs to the future period, the weather information of the place to be visited during the travel time period belongs to the weather forecast information.

[0038] The weather forecast information includes at least one of the following: sunrise time and sunset time, probability of rainfall in each period, probability of snowfall, precipitation, snowfall, temperature, humidity, wind force, wind speed, UV index, and outdoor activity parameters, etc. The outdoor activity parameters may be: suitable, relatively suitable, or unsuitable, etc.

[0039] Weather forecast information is used to reflect whether it is suitable for travel. For example, when the probability of rainfall at a location to be visited from 08:00 to 10:00 exceeds 80%, and the precipitation exceeds 10 mm, it means that the probability of rainfall at the location to be visited from 08:00 to 10:00 is high, and the precipitation is large. At this time, outdoor activities are prone to getting wet, so it is not suitable for travel. For another example, when the temperature at a location to be visited from 12:00 to 14:00 exceeds 40 degrees, and the ultraviolet index exceeds level 7, it means that the temperature at the location to be visited from 12:00 to 14:00 is too high, and the ultraviolet rays are strong. At this time, outdoor activities are prone to heatstroke or sunburn, so it is not suitable for travel. For another example, when the outdoor activity parameters of a location to be visited from 14:00 to 16:00 are suitable, it means that the location to be visited is suitable for travel from 14:00 to 16:00.

[0040] S103, determining a planned itinerary based on the weather forecast information of each location to be visited and aiming to ensure that each location to be visited is suitable for travel during the visiting time period.

[0041] The planned itinerary includes: the order of visiting the places to be visited and the time period of visiting each place to be visited. For example, the planned itinerary includes: visiting place a from 08:00 to 09:00, going from place a to place b from 09:00 to 10:00, and visiting place b from 10:00 to 15:00.

[0042] After the electronic device determines the planned itinerary, if the electronic device is a server, the electronic device can send the planned itinerary to the user terminal, so that the user terminal displays the received planned itinerary. Alternatively, if the electronic device is a user terminal, the electronic device can directly display the determined planned itinerary.

[0043] Through the above method, the embodiment of the present disclosure can obtain the weather forecast information of each to-be-visited location within the travel time period according to the itinerary information input by the user. Since the weather forecast information can reflect whether it is suitable for travel, the embodiment of the present disclosure can generate a planned itinerary for the user with the goal of making each to-be-visited location suitable for travel within the visit time period. That is, the embodiment of the present disclosure can plan a weather-suitable itinerary for the user, so traveling according to the planned itinerary generated by the embodiment of the present disclosure can increase the probability that the weather at each to-be-visited location is suitable when visiting the location.

[0044] Moreover, the embodiments of the present disclosure can automatically generate a planned itinerary without the need for manual operation, thereby reducing the reliance of itinerary planning on manual labor, reducing the time required for manual operation, and improving itinerary planning efficiency.

[0045] The following is a detailed description of the itinerary planning method provided by the embodiment of the present disclosure:

[0046] After the above S101 acquires the multiple places to be visited in the itinerary information, the electronic device can obtain the target administrative region to which each place to be visited belongs, thereby obtaining an administrative region list.

[0047] Taking the administrative region as a city as an example, the city list is shown in Table 1.

[0048] Table 1

[0049] City identifier (ID) City Name 1 City A 2 City B 3 City C

[0050] Among them, the city ID can be the arrangement number of each city in the city list, or the city ID can be a hash value obtained by hashing the city name, or the city ID of each city can be generated by other methods to ensure that the city ID of each city is different. The embodiment of the present disclosure does not specifically limit the method of generating the city ID.

[0051] The electronic device may also obtain a list of places to be visited, for example, the list of places to be visited is shown in Table 2.

[0052] Table 2

[0053] Location ID City ID Name of the place to be visited 1 1 Location 2 1 Location b 3 2 Location c 4 2 Location 5 3 Location

[0054] The method for determining the location ID can refer to the method for determining the city ID mentioned above, which will not be repeated here.

[0055] The travel information in S101 may also include: transportation mode and route type.

[0056] Among them, the mode of transportation can be: driving, public transportation or walking.

[0057] The route type may be: a comprehensive best route type, a weather priority route type, or a traffic time priority route type, etc. Among them, the comprehensive best route type indicates that the user is concerned about the weather of each to-be-visited location in the planned itinerary and the total traffic time of the planned itinerary, that is, the user hopes that in the planned itinerary, the weather of each to-be-visited location during the respective visit period is suitable for travel, and the total traffic time of the planned itinerary is the shortest. The weather priority route type indicates that the user is concerned about the weather of each to-be-visited location, that is, the user hopes that in the planned itinerary, the weather of each to-be-visited location during the respective visit period is suitable for travel. The traffic time priority route type indicates that the user is concerned about the total traffic time of the planned itinerary, that is, the user hopes that the total traffic time of the planned itinerary is the shortest. Among them, the total traffic time is: the sum of the traffic time between each two adjacent to-be-visited locations in the planned itinerary. For the convenience of description, in the subsequent embodiments, the comprehensive best route type is referred to as the first type, the weather priority route type is referred to as the second type, and the traffic time priority route type is referred to as the third type.

[0058] In an embodiment of the present disclosure, if the itinerary information does not include a route type, the electronic device may generate a planned itinerary according to a default route type, for example, the default route type is a comprehensive optimal route type.

[0059] In the disclosed embodiment, after the electronic device obtains the itinerary information in S101, it can also call the traffic API to obtain the travel time between each two places to be visited under the specified transportation mode to obtain the transportation timetable. When the itinerary information includes the transportation mode, the specified transportation mode is the transportation mode included in the itinerary information; when the itinerary information does not include the transportation mode, the specified transportation mode is the default transportation mode. For example, the default transportation mode is public transportation.

[0060] Taking driving as the designated mode of transportation as an example, the transportation timetable is shown in Table 3.

[0061] Table 3

[0062] Departure point ID Destination point ID Transportation Traffic time 1 2 drive 20 minutes 2 3 drive 40 minutes 3 4 drive 15 minutes

[0063] In the disclosed embodiment, after the weather forecast information of each to-be-visited location within the travel time period is acquired in S102, the weather forecast information of each to-be-visited location within each sub-time period may be divided according to each sub-time period of preset duration included in the travel time period.

[0064] For example, the preset duration is 1 hour, and the travel time period is 8:00-11:00, then the sub-time periods included in the travel time period are shown in Table 4.

[0065] Table 4

[0066] Sub-time period ID Sub-time period 1 8:00-9:00 2 9:00-10:00 3 10:00-11:00

[0067] The method for determining the sub-time period ID may refer to the above method for determining the city ID, which will not be described in detail here.

[0068] Assume that the weather forecast information of location a includes: 7:00-10:00, the probability of rainfall is 20%, the temperature is 25 degrees, and the wind speed is 10 kilometers per hour (kilometer / hour, km / h), which is suitable for outdoor activities; 10:00-14:00, the probability of rainfall is 80%, the temperature is 28 degrees, and the wind speed is 15km / h, which is not suitable for outdoor activities. The weather forecast information of location b includes: 7:00-09:00, the probability of rainfall is 10%, the temperature is 27 degrees, and the wind speed is 8km / h, which is suitable for outdoor activities; 09:00-14:00, the probability of rainfall is 0%, the temperature is 30 degrees, and the wind speed is 5km / h, which is suitable for outdoor activities. After dividing the weather forecast information of the location to be visited according to the sub-time periods included in the travel time period, a weather table is obtained. For example, the weather table is shown in Table 5.

[0069] Table 5

[0070]

[0071] On the basis that the itinerary information also includes the route type, the method of obtaining the weather forecast information of each place to be visited during the travel time period in S102 can be implemented as follows: if the route type is the first type or the second type, obtaining the weather forecast information of each place to be visited during the travel time period.

[0072] The first type indicates that the user is concerned about the weather of each place to be visited in the planned itinerary and the total transportation time of the planned itinerary, and the second type indicates that the user is concerned about the weather of each place to be visited.

[0073] Through the above method, the disclosed embodiment can obtain the weather forecast information of each to-be-visited location during the travel time period when the user pays attention to the weather of each to-be-visited location in the planned itinerary and the total traffic time of the planned itinerary, or when the user pays attention to the weather of each to-be-visited location, so as to determine the planned itinerary based on the weather forecast information of each to-be-visited location. This increases the probability that each to-be-visited location in the planned itinerary is suitable for travel during the visit time period, and satisfies the user's weather requirements for the planned itinerary.

[0074] In the disclosed embodiment, when the route types included in the itinerary information are different, the electronic device may determine the planned itinerary in different ways. That is, the above S103 electronic device determines the planned itinerary including the following three methods:

[0075] See also Figure 2 , the electronic device determines the planned itinerary in a first way, including the following steps:

[0076] S1031. If the route type is the first type, the visiting order and visiting time period of each to-be-visited location are determined according to the weather forecast information of each to-be-visited location and the travel time between each two to-be-visited locations, with the goal of making each to-be-visited location suitable for travel within the visiting time period and minimizing the total travel time.

[0077] In the embodiment of the present disclosure, the objective function included in the optimization algorithm can be designed in advance with the goal of making each to-be-visited location suitable for travel within the visit time period and minimizing the total traffic time, where the objective function can be one or a group of functions. For the convenience of distinction, the optimization algorithm used in 1031 is referred to as the first comprehensive optimization algorithm in the subsequent embodiments.

[0078] The objective function of the first comprehensive optimization algorithm may be set as follows: the sum of weather scores of all places to be visited + the traffic time score.

[0079] Assuming that the smaller the function value of the objective function is, the more it meets the optimization goal, the weather score of the place to be visited can be set to be negatively correlated with the degree of suitability for travel during the visit time period of the place to be visited, and the traffic time score can be set to be positively correlated with the total traffic time. For example, when the visit time period of the place to be visited is suitable for travel, the weather score is 0; when the visit time period of the place to be visited is relatively suitable for travel, the weather score is 0.5; when the visit time period of the place to be visited is not suitable for travel, the weather score is 1. When the total traffic time is less than or equal to one-quarter of the total travel time, the traffic time score is 0; when the total traffic time is greater than one-quarter of the total travel time and less than or equal to one-half of the total travel time, the traffic time score is 0.5; when the total traffic time is greater than one-half of the total travel time, the traffic time score is 1.

[0080] Since visiting indoor attractions is not affected by the weather, the embodiments of the present disclosure may not consider the weather conditions when visiting indoor attractions, so the weather score of indoor attractions may be set to a default value. For example, when the location to be visited is an indoor attraction, the weather score is 0. When the location to be visited is an outdoor attraction, if it is suitable for travel during the visit time period, the weather score is 0, if it is relatively suitable for travel during the visit time period, the weather score is 0.5, and if it is not suitable for travel during the visit time period, the weather score is 1.

[0081] The above objective function is only an example. In actual application scenarios, the objective function of the first comprehensive optimization algorithm is not limited to this.

[0082] The first comprehensive optimization algorithm used in S1031 can find a combination of the visit order of each place to be visited and the visit time period of each place to be visited in the process of solving the objective function, so that the function value of the objective function reaches the optimal value. For example, if the function value is larger, it is more in line with the optimization goal, and the visit order of each place to be visited and the visit time period of the place to be visited are solved by maximizing the objective function. On the contrary, if the function value is smaller, it is more in line with the optimization goal, and the visit order of each place to be visited and the visit time period of the place to be visited are solved by minimizing the objective function.

[0083] The first comprehensive optimization algorithm may include at least one of the following: a mixed-integer linear programming (MILP) algorithm, a genetic algorithm (GA), a greedy algorithm (Greedy Algorithm), a linear programming (LP) algorithm, a dynamic programming (DP) algorithm, a branch and bound (Branch and Bound) algorithm, and a shortest path algorithm, etc. For example, the shortest path algorithm may be: a Dijkstra algorithm or an A* algorithm.

[0084] In the disclosed embodiment, the first comprehensive optimization algorithm also includes constraints on the order of visiting each place to be visited and / or the visiting time period of each place to be visited. The constraints can be set in advance, and / or the constraints can be determined based on the user requirements included in the itinerary information in S101. The user requirements represent the travel conditions set by the user for at least one place to be visited. For example, the user requirements include: watching the sunrise at place a. For another example, the user requirements include: watching the sunset at place b.

[0085] The multiple places to be visited in the embodiment of the present disclosure include: a departure place, a destination and at least one en route place, so the constraints on the visit order of each place to be visited may include: the departure place is visited first and the destination is visited last.

[0086] The constraint condition for the visit time period of each place to be visited may include: the duration of the visit time period of each place to be visited belongs to a preset duration range, for example, the preset duration range is [30 minutes, 2 hours].

[0087] Alternatively, since the visiting time of different types of places is generally different, for example, the visiting time of an amusement park is generally longer, while the visiting time of a commercial street is generally shorter, the constraint condition for the visiting time period of each place to be visited may include: the visiting time of each place to be visited belongs to the recommended visiting time range of the type to which the place to be visited belongs.

[0088] In addition, since early morning and night are generally not suitable for traveling, the constraint condition for the visiting time period of each location to be visited may also include: the visiting time period of each location to be visited belongs to a preset travel time period, for example, the preset travel time period is [09:00-20:00].

[0089] The electronic device can also analyze the user's needs and determine the constraint conditions based on the user's needs. For example, assuming that the user's needs include watching the sunrise at location a, and the sunrise time at location a is 06:00 as obtained from the weather forecast information of location a, the constraint conditions determined based on the user's needs include: the visiting time period of location a includes 06:00.

[0090] S1032. Under the condition of satisfying user needs, with the goal of making each location to be visited suitable for travel within the visiting time period and minimizing the total traffic time, optimize the visiting order and visiting time period of each location to be visited, and determine the optimized access paths between adjacent locations to be visited to obtain a planned itinerary.

[0091] The electronic device can integrate the weather forecast information of each location to be visited, the travel time between each two locations to be visited, and the user's needs into an optimization model. Then, the optimization model is solved by the optimization algorithm to obtain the optimized visit sequence and visit time period of each location to be visited, as well as the visit path between adjacent locations to be visited. For the convenience of distinction, the optimization algorithm used in S1032 is referred to as the second comprehensive optimization algorithm in the subsequent embodiments.

[0092] The constraints included in the second comprehensive optimization algorithm can be determined according to user needs. The decision variables of the second comprehensive optimization algorithm include: the visit order and visit time period of each to-be-visited location, and the visit path between adjacent to-be-visited locations. The objective function of the second comprehensive optimization algorithm can be designed in advance with the goal of making each to-be-visited location suitable for travel within the visit time period and minimizing the total traffic time, wherein the objective functions in S1032 and S1031 can be the same or different.

[0093] Among them, when the user demand includes dining at a place to be visited, the constraint condition includes: the visiting time period of the place includes the preset dining time period. When the user demand includes watching the sunrise at a place to be visited, the constraint condition includes: the visiting time period of the place includes the sunrise time of the place. When the user demand includes watching the sunset at a place to be visited, the constraint condition includes: the visiting time period of the place includes the sunset time of the place. When the user demand includes performing a designated entertainment activity at a place to be visited, the constraint condition includes: the visiting time period of the place belongs to the recommended playing time period of the designated entertainment activity. When the user demand includes that each place to be visited avoids designated weather, the constraint condition includes that the probability of the designated weather occurring within the visiting time period of each place to be visited is 0%. The above-mentioned user demands are only examples provided in the embodiments of the present disclosure. In actual application scenarios, user demands and the constraints corresponding to the user demands are not limited to this.

[0094] For example, the user's requirements include: dining at location a, and all the locations to be visited should avoid rainy days. At this time, the constraints include: the visiting time period of location a includes 12:00-13:00 or 18:00-19:00, and the probability of rainfall during the visiting time period of each location to be visited is 0%.

[0095] After solving the optimization model using the second comprehensive optimization algorithm to obtain the optimized visit order of each to-be-visited location, the visit time period of each to-be-visited location, and the optimized visit path between adjacent to-be-visited locations, the optimization result of the second comprehensive optimization algorithm can be further optimized using the third comprehensive optimization algorithm based on the idea of ​​heuristic optimization, thereby obtaining a global optimal solution, that is, obtaining a planned itinerary. For example, the second comprehensive optimization algorithm is a mixed integer linear programming algorithm, and the third comprehensive optimization algorithm is a genetic algorithm.

[0096] Through the above method, when the user is more concerned about the weather and total traffic time of the planned itinerary, the embodiment of the present disclosure can generate a planned itinerary with the goal of making each to-be-visited location suitable for travel within the visit time period and minimizing the total traffic time. That is, the embodiment of the present disclosure can generate a planned itinerary with more suitable weather and shorter traffic time for the user, thereby meeting the user's travel needs.

[0097] In some embodiments of the present disclosure, the method of determining the visit order of each to-be-visited location and the visit time period of each to-be-visited location in S1031 includes the following steps:

[0098] Step 1: Determine whether the target administrative regions to which each of the locations to be visited belongs are the same. If yes, proceed to step 2; if no, proceed to step 3.

[0099] The electronic device can determine, for each location to be visited, the administrative region of the preset level to which the location to be visited belongs as the target administrative region. For example, the preset level can be: province, city or county.

[0100] For example, assuming the preset level is city, the places to be visited include: place a in city A, place b in city A, and place c in city B, and the target administrative regions include: city A and city B. At this time, each place to be visited belongs to a different target administrative region.

[0101] For another example, assuming that the preset level is city, the places to be visited include: place a in city A, place b in city A, and place d in city A, then the target administrative regions include: city A. At this time, each place to be visited belongs to the same target administrative region.

[0102] Step 2: According to the weather forecast information of each location to be visited and the travel time between each two locations to be visited, the visiting order and visiting time period of each location to be visited are determined with the goal of making the visiting time period of each location to be visited suitable for travel and minimizing the total travel time.

[0103] Step 2: The method of determining the visiting order and visiting time period of each location to be visited can be referred to the description in S1031 above, which will not be repeated here.

[0104] Step 3: According to the weather forecast information of each target administrative area and the travel time between each two target administrative areas, the visiting order and visiting time period of each target administrative area are determined with the goal of making each target administrative area suitable for travel and minimizing the total travel time. Then, proceed to step 4.

[0105] Step 3 determines the visiting order and visiting time period of each target administrative area. The method of determining the visiting order and visiting time period of each to-be-visited location in S1031 above may be referred to, and will not be repeated here.

[0106] It should be noted that since step three is used to determine the visiting time period of the target administrative area, and the target travel area includes one or more places to be visited, the constraint conditions for executing step three can be determined based on the number and type of places to be visited included in each target administrative area.

[0107] For example, the constraints include: 1. The target administrative region including the departure place is visited first, and the target administrative region including the destination is visited last. 2. The visiting time period of the target administrative region is the product of the number of places to be visited contained in it and the preset time range; or, the visiting time period of the target administrative region is the sum of the recommended tour time ranges of the types of the places to be visited contained in it. 3. The visiting time periods of the target administrative regions all belong to the preset travel time period.

[0108] Step 4. For each target administrative region, based on the weather forecast information of each location to be visited in the target administrative region and the travel time between every two locations to be visited, with the goal of making each location to be visited in the target administrative region suitable for travel during the visiting time period and minimizing the total travel time, determine the visiting order and visiting time period of each location to be visited in the target administrative region during the visiting time period of the target administrative region.

[0109] Step 4: The method of determining the visiting order and visiting time period of each location to be visited can be referred to the description in S1031 above, which will not be repeated here.

[0110] It should be noted that, since step four determines the visiting order and visiting time period of each location to be visited within the target administrative area within the visiting time period of the target administrative area, the constraints based on which step four is executed may include: the visiting time period of each location to be visited belongs to the visiting time period of the target administrative area to which it belongs.

[0111] Through the above method, the embodiment of the present disclosure can first determine the visiting order and visiting time period of each target administrative area to be visited, and then determine the visiting order and visiting time period of the places to be visited included in the target administrative area within the visiting time period of each target administrative area, thereby realizing hierarchical planning, reducing the number of places to be visited each time the visiting order and visiting time period of the places to be visited are determined, and improving the efficiency of itinerary planning.

[0112] See also Figure 3 In S103, the electronic device determines the planned itinerary in a second manner, including the following steps:

[0113] S1033. If the route type is the second type, then according to the weather forecast information of each location to be visited, with the goal of making each location to be visited suitable for travel within the visiting time period, determine the visiting order and visiting time period of each location to be visited.

[0114] In the embodiment of the present disclosure, the objective function included in the optimization algorithm can be designed in advance with the goal of making each to-be-visited location suitable for travel during the visit time period. For the convenience of distinction, the optimization algorithm used in S1033 is referred to as the first weather optimization algorithm in the subsequent embodiments.

[0115] The objective function of the first weather optimization algorithm may be set to be the sum of scores of multiple weather parameters of each location to be visited.

[0116] Assuming that the smaller the function value of the objective function is, the more it meets the optimization goal, then the score of each weather parameter of the to-be-visited location can be set to be negatively correlated with the degree of suitability for travel during the visit time period of the to-be-visited location. For example, the objective function of the first weather optimization algorithm = the sum of the temperature score, rain and snow score, and wind score of each to-be-visited location. Among them, when the temperature is less than 0 degrees or greater than 35 degrees during the visit time period of the to-be-visited location, the temperature score is 1; when the temperature is greater than 0 and less than or equal to 20 degrees during the visit time period of the to-be-visited location, the temperature score is 0.5; when the temperature is greater than 20 degrees and less than or equal to 35 during the visit time period of the to-be-visited location, the temperature score is 0. When the probability of rainfall during the visit time period of the to-be-visited location is greater than 80%, the rain and snow score is 1; when the probability of rainfall during the visit time period of the to-be-visited location is greater than 30% and less than or equal to 80%, the rain and snow score is 0.5; when the probability of rainfall during the visit time period of the to-be-visited location is less than or equal to 30%, the rain and snow score is 0. When the wind force is greater than level 5 during the visit time period of the location to be visited, the wind force score is 1; when the wind force is greater than level 3 and less than or equal to level 5 during the visit time period of the location to be visited, the wind force score is 0.5; when the wind force is less than or equal to level 3 during the visit time period of the location to be visited, the wind force score is 0. This objective function is only an example provided in the embodiment of the present disclosure. In actual application scenarios, the objective function of the first weather optimization algorithm is not limited thereto.

[0117] S1033 uses the first weather optimization algorithm to find a combination of the visit order of each to-be-visited location and the visit time period of each to-be-visited location in the process of solving the objective function, so that the function value of the objective function is optimal. The first weather optimization algorithm may include at least one of the following: a mixed integer linear programming algorithm, a genetic algorithm, a greedy algorithm, a linear programming algorithm, a dynamic programming algorithm, and a branch and bound algorithm.

[0118] The first weather optimization algorithm may also include constraints on the order of visiting the locations to be visited and / or the visiting time period of each location to be visited, wherein the constraints may be preset and / or may be determined based on user needs.

[0119] For example, the pre-set constraints include: the departure place is visited first and the destination place is visited last; the visiting time period of each place to be visited belongs to the preset travel time period, and the duration of the visiting time period belongs to the preset duration range; the probability of rainfall in the visiting time period of each place to be visited does not exceed 90%, the probability of snowfall does not exceed 90%, the wind speed does not exceed level 6, and the ultraviolet index does not exceed level 6.

[0120] S1034. Under the condition of satisfying the needs of the user, with the goal of making each location to be visited suitable for travel within the visiting time period, optimize the visiting order and visiting time period of each location to be visited, and determine the optimized visiting paths between adjacent locations to be visited to obtain a planned itinerary.

[0121] The objective function of the optimization algorithm can be designed in advance with the goal of making each location to be visited suitable for travel during the visit time period. For the sake of distinction, the optimization algorithm used in S1034 is referred to as the second weather optimization algorithm in the subsequent embodiments. The objective functions in S1034 and S1033 can be the same or different.

[0122] Compared with S1033, the number of weather-related constraint conditions when executing S1034 may be greater and / or the conditions may be stricter. For example, the weather-related constraint conditions in S1034 include: the temperature during the visit time period of each location to be visited shall not exceed 30 degrees, the probability of rainfall shall not exceed 50%, the rainfall shall not exceed 10 mm, the probability of snowfall shall not exceed 50%, the snowfall shall not exceed 2 mm, the wind force shall not exceed level 5, and the UV index shall not exceed level 5, etc.

[0123] For the method of determining the constraint conditions based on user needs, please refer to the relevant description in S1032 above, which will not be repeated here.

[0124] The electronic device uses the second weather optimization algorithm, with the goal of making the visit time period of each location to be visited suitable for travel, and finds the optimal solution of the visit sequence and visit time period of each location to be visited under the condition of satisfying the constraint conditions, so that the function value of the objective function is optimal. For example, the second weather optimization algorithm is: greedy algorithm, linear programming or branch and bound algorithm, etc.

[0125] Through the above method, when the user is more concerned about the weather during the planned itinerary, the embodiment of the present disclosure can generate a planned itinerary with the goal of making each to-be-visited location suitable for travel during the visit time period. That is, the embodiment of the present disclosure can generate a planned itinerary with more suitable weather for the user to meet the user's travel needs.

[0126] In some embodiments of the present disclosure, the method of determining the visit order and visit time period of each to-be-visited location in S1033 includes the following steps:

[0127] Step 1: Determine whether the target administrative regions to which each to-be-visited location belongs are the same. If yes, proceed to step 2; if no, proceed to step 3.

[0128] The specific implementation method of step 1 can refer to step 1 and will not be repeated here.

[0129] Step 2: According to the weather forecast information of each place to be visited, with the goal of making each place to be visited suitable for travel within the visiting time period, determine the visiting order and visiting time period of each place to be visited.

[0130] Step 2: The method of determining the visiting order and visiting time period of each location to be visited can be referred to the description in S1033 above, which will not be repeated here.

[0131] Step 3: According to the weather forecast information of each target administrative area, the visiting order of each target administrative area is determined with the goal of making each target administrative area suitable for travel during the visiting time period. Then, step 4 is executed.

[0132] Step 3 determines the visiting order and visiting time period of each target administrative area. The method of determining the visiting order and visiting time period of each to-be-visited location in step S1033 can be referred to above, and will not be repeated here.

[0133] It should be noted that since step 3 is used to determine the visiting time period of the target administrative area, and the target travel area includes one or more places to be visited, the constraint conditions used when executing step 3 can be determined based on the number and type of places to be visited included in each target administrative area.

[0134] For example, the constraints include: 1. The target administrative region including the departure place is visited first, and the target administrative region including the destination is visited last. 2. The visiting time period of the target administrative region is the product of the number of places to be visited contained in it and the preset time range; or, the visiting time period of the target administrative region is the sum of the recommended tour time ranges of the types of the places to be visited contained in it. 3. The visiting time periods of the target administrative regions all belong to the preset travel time period.

[0135] Step 4: For each target administrative region, based on the weather forecast information of each location to be visited within the target administrative region, with the goal of making each location to be visited within the target administrative region suitable for travel during the visiting time period, determine the visiting order and visiting time period of each location to be visited within the target administrative region.

[0136] Step 4 determines the order of visiting the places to be visited and the manner of visiting the time periods. Please refer to the description in S1033 above and will not be repeated here.

[0137] It should be noted that, since step 4 determines the visiting order and visiting time period of each location to be visited within the target administrative area within the visiting time period of the target administrative area, the constraints based on which step 4 is executed may include: the visiting time period of each location to be visited belongs to the visiting time period of the target administrative area to which it belongs.

[0138] Through the above method, the embodiment of the present disclosure can first determine the visiting order and visiting time period of each target administrative area to be visited, and then determine the visiting order and visiting time period of the places to be visited included in the target administrative area within the visiting time period of each target administrative area, thereby realizing hierarchical planning, reducing the number of places to be visited each time the visiting order and visiting time period of the places to be visited are determined, and improving the efficiency of itinerary planning.

[0139] In the third method of determining the planned itinerary, before the electronic device obtains the weather forecast information of each place to be visited during the travel time period in the above S102, it can execute: if the route type is the third type, then according to the traffic time between each two places to be visited, with the goal of minimizing the total traffic time, determine the visit order of each place to be visited, the visit time period of each place to be visited, and the visit path between adjacent places to be visited, and obtain the planned itinerary. Among them, the third type indicates that the user is concerned about the total traffic time of the planned itinerary. It should be noted that if the route type is the third type, S102 and S103 are not executed.

[0140] The electronic device can determine the order of visiting the places to be visited, the visiting time period of each place to be visited, and the visiting path between adjacent places to be visited based on an optimization algorithm such as a traveling salesman problem algorithm, a nearest neighbor algorithm, or a shortest path algorithm, with the goal of minimizing the total traffic time, and obtain a planned itinerary. For the convenience of distinction, the optimization algorithm used in method three is called a traffic time optimization algorithm.

[0141] The objective function included in the traffic time optimization algorithm may be set to be a traffic time score.

[0142] Assuming that the smaller the function value of the objective function is, the more it meets the optimization goal, the traffic time score can be set to be positively correlated with the total traffic time. For example, when the total traffic time is less than or equal to one-quarter of the total travel time, the traffic time score is 0; when the total traffic time is greater than one-quarter of the total travel time and less than or equal to one-half of the total travel time, the traffic time score is 0.5; when the total traffic time is greater than one-half of the total travel time, the traffic time score is 1. This objective function is only an example. In actual application scenarios, the objective function of the traffic time optimization algorithm is not limited to this.

[0143] The traffic time optimization algorithm also includes constraints on the order of visiting each location to be visited, the visiting time period of each location to be visited, and / or the visiting path between adjacent locations to be visited. For example, the constraints include: the visiting order of the departure place is the first, the visiting order of the destination is the last, the duration of the visiting time period of each location to be visited is within a preset duration range, and the shortest access path is used between adjacent locations to be visited.

[0144] Through the above method, the embodiment of the present disclosure can generate a planned itinerary with the goal of minimizing the total traffic time when the user is more concerned about the total traffic time. That is, the embodiment of the present disclosure can generate a planned itinerary with shorter traffic time for the user to meet the user's travel needs.

[0145] In the disclosed embodiment, the itinerary information acquired in S101 may also include restaurant recommendation information, including a recommendation parameter and a user preference parameter. The electronic device may recommend restaurants to the user based on the restaurant recommendation information, that is, the planned itinerary in S103 may also include restaurant information of the recommended restaurant.

[0146] The parameter "whether to recommend" indicates whether the user needs to be recommended a restaurant. For example, if the value of the parameter "whether to recommend" is "yes", it indicates that the user needs to be recommended a restaurant; if the value of the parameter "whether to recommend" is "no", it indicates that the user does not need to be recommended a restaurant.

[0147] The user preference parameter indicates the user's preference for the restaurant. For example, the user preference parameter includes the user's preference for at least one of the following parameters: cuisine, distance range, rating range, and per capita consumption range. Among them, cuisine includes at least one of the following: Shandong cuisine, Cantonese cuisine, Jiangsu cuisine, Sichuan cuisine, Chinese cuisine, and Western cuisine. The distance range indicates the distance range between the recommended restaurant and its nearest location to be visited. The rating range indicates the range of consumers' evaluation scores for the restaurant. The per capita consumption range indicates the per capita consumption range of dining in the restaurant.

[0148] If the itinerary information does not include restaurant recommendation information, the electronic device can recommend a restaurant to the user according to the default restaurant recommendation information. For example, the default restaurant recommendation information includes a value of "no" for "recommendation" or "yes" for "recommendation", Chinese food, 0-500 meters, 4-5 minutes, 100-200 yuan.

[0149] Based on this, after the electronic device obtains the restaurant recommendation information included in the itinerary information in S101, it can obtain the restaurant information of the candidate restaurants whose distance from each to-be-visited location is less than the preset distance by calling the preset restaurant API. The preset distance can be preset according to the actual scenario, for example, the preset distance is 2 kilometers.

[0150] Restaurant information includes at least one of the following: restaurant name, address, cuisine, contact number, rating, and average consumption per person, etc. For example, restaurant information is shown in Table 6.

[0151] Table 6

[0152]

[0153] The method for determining the restaurant ID can refer to the method for determining the city ID mentioned above, which will not be repeated here.

[0154] On this basis, after determining the access path between adjacent places to be visited, the electronic device can, when the recommendation parameter indicates that the user needs a recommended restaurant, select a recommended restaurant that meets the user preference parameter from the candidate restaurants corresponding to the place to be visited for each place to be visited, and obtain the restaurant information of the recommended restaurant. Among them, when the electronic device determines whether each candidate restaurant meets the user preference parameter, it can determine, for each data included in the user preference parameter, whether the data is the same as a data included in the restaurant information of the candidate restaurant, or determine whether the data includes a data included in the candidate restaurant; if so, it is determined that the data matches the restaurant information of the candidate restaurant; if not, it is determined that the data does not match the restaurant information of the candidate restaurant. If all the data included in the user preference parameter matches the restaurant information of the candidate restaurant, it is determined that the candidate restaurant meets the user preference parameter, that is, the candidate restaurant is determined to be a recommended restaurant.

[0155] Alternatively, after determining the access path between adjacent places to be visited, the electronic device can, when the recommendation parameter indicates that the user needs a recommended restaurant, determine, from the places to be visited, a dining place whose access time period matches a preset dining time period, and select a recommended restaurant that meets the user's preference parameters from the candidate restaurants corresponding to the dining place, and obtain restaurant information of the recommended restaurant.

[0156] Among them, for each preset dining time period, the electronic device can use the access time period that overlaps with the preset dining time period for more than half of the preset dining time period as the access time period that matches the preset dining time period. For example, the access time period of location a is 09:00-11:00, the access time period of location b is 11:30-14:00, and the preset dining time period is 11:00-13:00. Then, the access time period of location b overlaps with the preset dining time period for one hour and thirty minutes, which exceeds half of the preset dining time period, that is, more than one hour. Therefore, it is determined that the access time period of location b matches the preset dining time period. This method of matching access time periods and preset dining time periods is only an example provided in the embodiments of the present disclosure, and the matching methods that can be used in the embodiments of the present disclosure are not limited thereto.

[0157] Alternatively, the electronic device may not obtain the restaurant information of each candidate restaurant in advance, but may obtain the restaurant information of the recommended restaurant in real time when determining the recommended restaurant.

[0158] That is, after determining the visiting time period of each place to be visited, the electronic device may further execute: if the recommendation parameter indicates that the user needs a recommended restaurant, then determine, from each place to be visited, a dining place whose visiting time period matches a preset dining time period, and then determine, from restaurants whose distance from the dining place is less than a preset distance, a recommended restaurant that meets the user's preference parameters, and obtain the restaurant information of the recommended restaurant.

[0159] In the disclosed embodiment, the manner in which the electronic device determines whether a restaurant meets the user's preference parameters, and the manner in which the visit time period is matched with the preset dining time period, can all be referred to the above description and will not be repeated here.

[0160] After determining the dining location, the electronic device can call the restaurant API to obtain restaurant data of restaurants whose distance from the dining location is less than a preset distance, and then determine the recommended restaurant based on these restaurant data. Afterwards, the restaurant data of each recommended restaurant is screened, sorted, filtered, etc. using a preset restaurant data processing method, and the processed data is used as restaurant information. For example, the screening process includes: retaining the restaurant name, address and contact number in the restaurant data, and deleting other data. For example, the sorting process includes: sorting the recommended data of each recommended restaurant in order of distance from the dining location from near to far. For example, the filtering process includes: deleting the restaurant data that does not include the restaurant name.

[0161] After the electronic device obtains the restaurant information of the recommended restaurant, if the electronic device is a server, the electronic device can send the restaurant information of the recommended restaurant to the user terminal, so that the user terminal displays the received restaurant information. Alternatively, if the electronic device is a user terminal, the electronic device can directly display the restaurant information of the recommended restaurant.

[0162] Through the above method, the disclosed embodiment can recommend restaurant information of recommended restaurants around the place to be visited during the dining time period and meeting the needs of the user, so as to facilitate the user to select and book a restaurant.

[0163] In the conventional itinerary planning process, users need to find the location of the place to be visited from the map tool, find the traffic information between the adjacent places to be visited from the navigation tool, and find the restaurant information around the place to be visited from the food tool, that is, the sources of various information are relatively scattered, so that users need to switch repeatedly between multiple tools, and the user experience is relatively fragmented. However, the disclosed embodiment can directly provide users with a planned itinerary containing restaurant information of recommended restaurants, without the need for users to switch repeatedly between various tools, thereby improving the user experience and making the user's travel more convenient.

[0164] In the disclosed embodiment, the planned itinerary also includes weather warning information. Based on this, after determining the visit time period of each to-be-visited location, the electronic device may further perform: for each sub-time period of preset duration included in the travel time period, determine the to-be-visited location whose visit time period matches the sub-time period, and obtain the weather warning information of the to-be-visited location within the sub-time period.

[0165] The electronic device may determine that the access time period matches the sub-time period when the access time period of the to-be-visited location includes a sub-time period or the overlap period between the access time period and the sub-time period exceeds half of the sub-time period.

[0166] Taking the preset duration of 2 hours as an example, the travel time period is 09:00-13:00, and the travel time period includes: sub-time period 1 is 09:00-11:00, and sub-time period 2 is 11:00-13:00. The planned itinerary includes: the visit time period of location a is 09:00-10:30, the travel time from location a to location b is 30 minutes, and the visit time period of location b is 11:00-13:00. At this time, the overlap between the visit time period of location a and sub-time period 1 exceeds half of sub-time period 1, that is, the visit time period of location a matches sub-time period 1, so the weather warning information of location a in sub-time period 1 is obtained. The visit time period of location b includes sub-time period 2, that is, the visit time period of location b matches sub-time period 2, so the weather warning information of location b in sub-time period 2 is obtained.

[0167] The electronic device can obtain weather warning data of the location to be visited in each sub-time period by calling the weather API.

[0168] Among them, the weather warning data includes at least one of the following: warning type, warning level and travel advice. For example, the warning type includes at least one of the following: typhoon, heavy rain, blizzard, cold wave, strong wind, sandstorm, high temperature, lightning, hail, frost and road icing. The warning levels include four levels: blue, yellow, orange and red, among which blue means general, yellow means heavier, orange means serious, and red means particularly serious. Travel advice includes at least one of the following: bring an umbrella, wear a thick coat, wear non-slip shoes and wear a mask. Weather warning data may also include other data, which is not specifically limited in the embodiments of the present disclosure.

[0169] After obtaining the weather warning data, the electronic device may also screen, sort, filter, and process the weather warning data based on a preset warning data processing method, and use the processed data as weather warning information. For example, the screening process includes: retaining the warning type and travel advice in the weather warning data, and deleting other data. For example, the sorting process includes: sorting in the order of travel advice, warning type, and warning level. For example, the filtering process includes: deleting weather warning data that does not include a warning type.

[0170] After determining the weather warning information, when the electronic device is a server, the electronic device can send the weather warning information to the user terminal. Alternatively, when the electronic device is a user terminal, the electronic device can directly display the weather warning information.

[0171] Through the above method, the embodiment of the present disclosure can obtain weather warning information of the places to be visited that match each sub-period of the travel period, thereby reminding the user of weather problems that may be encountered during the trip so that the user can deal with them in advance, thereby improving the user's usage experience.

[0172] In the embodiment of the present disclosure, after the electronic device determines the planned itinerary in the above S103, the user can also provide feedback on the planned itinerary so that the electronic device can modify the planned itinerary. Figure 4 The modification process includes the following steps:

[0173] S401: Acquire improvement information input by a user for a planned itinerary, wherein the improvement information is improvement suggestions put forward by the user for at least one to-be-visited location in the planned itinerary.

[0174] The locations included in the improvement information are the locations to be improved. Alternatively, when the improvement information does not include locations, each location to be visited in the planned itinerary is a location to be improved. For example, if the improvement information is to avoid rainy days, then each location to be visited in the planned itinerary is a location to be improved, that is, each location to be visited needs to avoid rainy days.

[0175] When the electronic device is a server, the user terminal may display a user interface, receive improvement information input by the user in the user interface for the planned trip, and then send the improvement information to the server.

[0176] When the electronic device is a user terminal, the electronic device can directly display the user interface and receive improvement information input by the user in the user interface for planning the trip.

[0177] The improvement information may be an improvement proposed for at least one of the visit sequence, visit time, transportation method, weather warning information, and restaurant information of recommended restaurants of each place to be visited included in the planned itinerary.

[0178] For example, the improvement information is: exchanging the order of location b and location c, or increasing the stay time at location d, or avoiding area XX in the route from location e to location f, or modifying the arrangement order of restaurant information of recommended restaurants, etc.

[0179] S402: Perform natural language processing (NLP) on the improvement information to determine the location to be improved and the improvement target in the planned itinerary targeted by the improvement information.

[0180] The electronic device can use natural language text processing library (spaCy), natural language processing toolkit (Natural Language Toolkit, NLTK) or transformer-based models (Transformer-based models), or use data mining and statistical analysis techniques to perform natural language processing on the improvement information to obtain the places to be improved and the improvement goals in the planned itinerary. For example, Transformer-based models can be bidirectional encoder representations from transformers (Bidirectional Encoder Representations from Transformers, BERT) and the like.

[0181] Taking the use of BERT to perform natural language processing on improvement information as an example, the electronic device can input the improvement information into BERT and obtain the location to be improved and the improvement target output by BERT. For example, the location to be improved is location a, and the improvement target is to increase the duration of the visit time period.

[0182] S403: Generate an improved planned itinerary based on the location to be improved and the improvement target.

[0183] When the improvement goals include improving the visiting order of each place to be visited, the visiting time period and the visiting path between adjacent places to be visited, the electronic device can modify the objective function and / or constraints included in the optimization algorithm used when determining the planned itinerary according to the places to be improved and the improvement goals, and use the modified optimization algorithm to generate an improved planned itinerary based on the itinerary information.

[0184] For example, when the location to be improved is location b, and the improvement target is that the duration of the access time period is not less than 5 hours, the electronic device adds the following constraints to the optimization algorithm: the duration of the access time period of location b is greater than or equal to 5 hours.

[0185] The electronic device may modify the weights or parameters of the optimization algorithm based on incremental learning or online learning algorithms, thereby iteratively optimizing the optimization algorithm to obtain a modified optimization algorithm. For example, the online learning algorithm may be an online gradient descent algorithm.

[0186] When the improvement target includes improving weather warning information, the electronic device can modify the warning data processing method, and use the modified warning data processing method to process the weather warning data to obtain an improved planned itinerary.

[0187] For example, the screening process included in the warning data processing method includes: retaining the warning type and travel suggestions in the weather warning data, and deleting other data. Assuming that the locations to be improved are all the locations to be visited, and the improvement goal is to increase the warning level, the electronic device modifies the screening process included in the warning data processing method to: retaining the warning type, warning level and travel suggestions in the weather warning data, and deleting other data.

[0188] When the improvement target includes improving the restaurant information of the recommended restaurants, the electronic device may modify the restaurant data processing method, and use the modified restaurant information processing method to process the restaurant data of each recommended restaurant to obtain an improved planned itinerary.

[0189] For example, assuming that the location to be improved is location c, and the improvement goal is to avoid restaurants with low scores, the electronic device can add the following to the filtering process included in the restaurant information processing method: delete the restaurant data with a score less than 4 points. Alternatively, the electronic device can modify the sorting process of the restaurant information processing method to: sort the recommended data of each recommended restaurant in order from high to low scores, that is, modify the priority of displaying restaurant data to preferentially display the restaurant information of restaurants with higher scores to the user.

[0190] Through the above method, the embodiment of the present disclosure can support users to propose improvements to the planned itinerary, and generate an improved planned itinerary based on the improvement information proposed by the user, further ensuring that the planned itinerary can meet the travel needs of the user.

[0191] Before generating the improved planned itinerary according to the locations to be improved and the improvement target in the above S403, the electronic device may also determine whether the weather forecast information of each location to be visited and the travel time between each two locations to be visited acquired this time are invalid.

[0192] Due to the uncertainty of weather and traffic time, the weather forecast information or traffic time obtained at different times may be different. Therefore, in order to improve the accuracy of the weather forecast information and traffic time used when planning the itinerary, the electronic device can determine that the judgment result is invalid if the time difference between the current acquisition time of the weather forecast information of each to-be-visited location and the current time exceeds the preset time difference, or the time difference between the current acquisition time of the traffic time between each two to-be-visited locations and the current time exceeds the preset time difference, otherwise determine that the judgment result is not invalid. For example, the preset time difference is 1 hour.

[0193] Alternatively, when the user instructs to add or modify the places to be visited, the weather information obtained this time cannot cover all the modified places to be visited. Therefore, the electronic device can determine that the judgment result is invalid when the improvement information indicates to add or modify the places to be visited, otherwise determine that the judgment result is not invalid.

[0194] Alternatively, when the user instructs to modify the transportation mode, since different transportation modes have different travel times, the electronic device can determine that the judgment result is invalid when the improvement information instructs to modify the transportation mode between the to-be-visited locations, and otherwise determine that the judgment result is not invalid.

[0195] Alternatively, the electronic device may also determine whether the weather forecast information of each to-be-visited location and the travel time between each two to-be-visited locations acquired this time are invalid in other ways, and the embodiments of the present disclosure do not specifically limit this.

[0196] If the determination result is yes, the electronic device may re-acquire the weather forecast information of each location to be visited and the travel time between every two locations to be visited.

[0197] If the determination result is no, the electronic device may determine not to re-acquire the weather forecast information of each to-be-visited location and the travel time between every two to-be-visited locations.

[0198] On this basis, the electronic device generates an improved method of planning the itinerary according to the location to be improved and the improvement target at S403, including the following two cases:

[0199] Case 1: If the weather forecast information of each place to be visited and the travel time between each two places to be visited are invalid, an improved planned itinerary is generated based on the place to be improved, the improvement target and the re-acquired weather forecast information of each place to be visited and the travel time between each two places to be visited.

[0200] The specific method of generating the planned itinerary can refer to the relevant description in the above S403, which will not be repeated here.

[0201] Case 2: If the weather forecast information of each place to be visited and the travel time between each two places to be visited obtained this time are not invalid, an improved planned itinerary is generated based on the place to be improved, the improvement target and the weather forecast information of each place to be visited and the travel time between each two places to be visited obtained this time.

[0202] The specific method of generating the planned itinerary can refer to the relevant description in the above S403, which will not be repeated here.

[0203] Through the above method, the disclosed embodiment can determine whether the weather forecast information of each to-be-visited location and the travel time between each two to-be-visited locations acquired this time are invalid. If invalid, the weather forecast information of each to-be-visited location and the travel time between each two to-be-visited locations are acquired again, so that the itinerary can be planned based on the acquired data, thereby improving the accuracy of the planned itinerary. On the other hand, if the data are not invalid, the data are not acquired again, thereby improving the speed of itinerary planning.

[0204] In the disclosed embodiment, when S101 acquires the itinerary information, and in case the restaurant information of the candidate restaurants corresponding to each place to be visited is acquired in advance, the above-mentioned judgment on whether the weather forecast information of each place to be visited acquired this time and the travel time between each two places to be visited are invalid can be implemented as follows: judging whether the weather forecast information of each place to be visited acquired this time, the travel time between each two places to be visited and the restaurant information of the candidate restaurants are invalid.

[0205] Correspondingly, an improved planned itinerary is generated based on the place to be improved, the improvement target, the weather forecast information of each place to be visited that has been re-acquired, and the travel time between each two places to be visited. This can be implemented as follows: an improved planned itinerary is generated based on the place to be improved, the improvement target, the weather forecast information of each place to be visited that has been re-acquired, the travel time between each two places to be visited, and the restaurant information of the candidate restaurants.

[0206] In addition, based on the place to be improved, the improvement target, the weather forecast information of each place to be visited obtained this time, and the travel time between each two places to be visited, an improved planned itinerary is generated. This can be implemented as follows: based on the place to be improved, the improvement target, the weather forecast information of each place to be visited obtained this time, the travel time between each two places to be visited, and the restaurant information of the candidate restaurants, an improved planned itinerary is generated.

[0207] In the disclosed embodiment, the above-mentioned planned itinerary may also include: recommendation information for performing designated activities at the to-be-visited location indicated by the user's needs, wherein the recommendation information includes: recommended time and recommended location.

[0208] Since the user demand in the itinerary information can indicate at least one designated activity at at least one location to be visited, the electronic device can also call the recommendation API to obtain the recommended time and recommended location for the designated activity at the location to be visited indicated by the user demand, and obtain recommendation information.

[0209] For example, the user demand includes: watching the sunrise at location b, then the electronic device may obtain the recommended time for watching the sunrise at location b as 05:30-06:30, and the recommended location as XX viewing platform, as the recommendation information.

[0210] In the disclosed embodiment, the planned itinerary may further include: the reasons for and advantages of the planned itinerary. That is, the optimization algorithm may further output the reasons for and advantages of the planned itinerary.

[0211] For example, the reason for the generation is: although the total travel time is the shortest when visiting location a, location b, and location c in order, location b will be in heavy rain after traveling from location a to location b, so the planned itinerary is generated in the order of location a, location c, and location b. The advantage is: avoiding bad weather.

[0212] See also Figure 5 , the following uses an electronic device as an example of a server to illustrate the overall process of the itinerary planning method provided by the embodiment of the present disclosure:

[0213] The client receives the itinerary information input by the user, and sends the itinerary information to the server when the user clicks the Generate Route button.

[0214] The server obtains the weather forecast information of each location to be visited, the travel time between each two locations to be visited, and the restaurant information of the candidate restaurants corresponding to each location to be visited. The server determines the planned itinerary based on the itinerary information, the weather forecast information of each location to be visited, the travel time between each two locations to be visited, and the restaurant information of the candidate restaurants corresponding to each location to be visited. After that, the server sends the planned itinerary to the user.

[0215] The client displays the planned itinerary. Afterwards, if the client detects that the user clicks the feedback button, it receives the improvement information entered by the user for the planned itinerary, and sends the improvement information to the server when it detects that the user clicks the regenerate route button. Otherwise, the process ends.

[0216] The server performs natural language processing on the improvement information, determines the places to be improved and the improvement targets in the planned itinerary, and modifies the optimization algorithm, the early warning data processing method and / or the restaurant data processing method according to the places to be improved and the improvement targets. Then, it is determined whether the weather forecast information of each place to be visited, the travel time between each two places to be visited, and the restaurant information of the candidate restaurants corresponding to each place to be visited obtained this time are invalid. If invalid, the step of obtaining the weather forecast information of each place to be visited, the travel time between each two places to be visited, and the restaurant information of the candidate restaurants corresponding to each place to be visited is returned; if not invalid, based on the modified method, the step of determining the planned itinerary is executed according to the itinerary information, the weather forecast information of each place to be visited, the travel time between each two places to be visited, and the restaurant information of the candidate restaurants corresponding to each place to be visited. After that, the server can send the newly generated planned itinerary to the user end so that the user end can display the new planned itinerary.

[0217] Through the above method, the disclosed embodiment can provide users with a planned itinerary that meets the personalized needs of users, reduce the reliance of itinerary planning on manual work, and improve the efficiency of obtaining a planned itinerary. Moreover, the disclosed embodiment also supports users to propose improvement information for the generated planned itinerary, and generates an improved planned itinerary based on the improved information, so as to cope with emergencies such as sudden changes in the user's itinerary or sudden changes in the weather, provide users with a better planned itinerary, and reduce uncertainty in the itinerary. In addition, the disclosed embodiment also supports providing users with restaurant information of recommended restaurants, further improving the user experience and making the user's travel more convenient and enjoyable.

[0218] In the technical solution disclosed herein, the collection, storage, use, processing, transmission, provision and disclosure of itinerary information, weather forecast information and traffic information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0219] Based on the same inventive concept, corresponding to the above method embodiment, the embodiment of the present disclosure also provides a trip planning device, such as Figure 6 As shown, the device includes: an acquisition module 601 and a determination module 602;

[0220] The acquisition module 601 is used to acquire the itinerary information input by the user, the itinerary information includes: a plurality of places to be visited and a travel time period;

[0221] The acquisition module 601 is also used to obtain weather forecast information of each location to be visited during the travel period, and the weather forecast information is used to reflect whether it is suitable for travel;

[0222] The determination module 602 is used to determine the planned itinerary based on the weather forecast information of each to-be-visited location obtained by the acquisition module 601, with the goal of making each to-be-visited location suitable for travel within the visiting time period, and the planned itinerary includes: the visiting order of each to-be-visited location and the visiting time period of each to-be-visited location.

[0223] In some embodiments of the present disclosure, the travel information also includes a route type, and the acquisition module 601 is specifically used to:

[0224] If the route type is the first type or the second type, the weather forecast information of each place to be visited during the travel time period is obtained; wherein the first type indicates that the user is concerned about the weather of each place to be visited in the planned itinerary and the total travel time of the planned itinerary, and the second type indicates that the user is concerned about the weather of each place to be visited.

[0225] In some embodiments of the present disclosure, the itinerary information further includes user requirements, where the user requirements represent travel conditions set by the user for at least one place to be visited; the determination module 602 is specifically configured to:

[0226] If the route type is the first type, then according to the weather forecast information of each place to be visited and the travel time between each two places to be visited, the visiting order and visiting time period of each place to be visited are determined with the goal of making the visiting time period of each place to be visited suitable for travel and minimizing the total travel time; wherein the total travel time is the sum of the travel time between each two adjacent places to be visited in the planned itinerary;

[0227] While meeting user needs, the goal is to make each location to be visited suitable for travel within the visiting time period and minimize the total traffic time. The visiting order and visiting time period of each location to be visited are optimized, and the access paths between adjacent locations to be visited are determined after optimization to obtain a planned itinerary.

[0228] In some embodiments of the present disclosure, the determining module 602 is specifically configured to:

[0229] Determine whether the target administrative area of ​​each location to be visited is the same;

[0230] If yes, then determine the order and time periods of visits to the locations to be visited based on the weather forecast information of each location to be visited and the travel time between each two locations to be visited, with the goal of making each location to be visited suitable for travel within the time period and minimizing the total travel time;

[0231] If not, then according to the weather forecast information of each target administrative area and the travel time between every two target administrative areas, the visiting order and visiting time period of each target administrative area are determined with the goal of making each target administrative area suitable for travel within the visiting time period and minimizing the total travel time;

[0232] For each target administrative region, based on the weather forecast information of each location to be visited in the target administrative region and the travel time between every two locations to be visited, with the goal of making each location to be visited in the target administrative region suitable for travel within the visiting time period and minimizing the total travel time, the visiting order and visiting time period of each location to be visited in the target administrative region are determined within the visiting time period of the target administrative region.

[0233] In some embodiments of the present disclosure, the itinerary information further includes user requirements, where the user requirements represent travel conditions set by the user for at least one place to be visited; the determination module 602 is specifically configured to:

[0234] If the route type is the second type, then the order of visiting the places to be visited and the visiting time period are determined according to the weather forecast information of each place to be visited, with the goal of making each place to be visited suitable for travel within the visiting time period;

[0235] Under the premise of meeting user needs, the goal is to make each location to be visited suitable for travel within the visiting time period, optimize the visiting order and visiting time period of each location to be visited, and determine the optimized access path between adjacent locations to be visited to obtain a planned itinerary.

[0236] In some embodiments of the present disclosure, the determining module 602 is specifically configured to:

[0237] Determine whether the target administrative area of ​​each location to be visited is the same;

[0238] If yes, then determine the order and time periods of visits to the locations to be visited based on the weather forecast information for each location to be visited, with the goal of ensuring that each location to be visited is suitable for travel during the time period of visits;

[0239] If not, then determine the order of visiting each target administrative area based on the weather forecast information of each target administrative area, with the goal of making each target administrative area suitable for travel during the visiting time period;

[0240] For each target administrative region, based on the weather forecast information of each place to be visited in the target administrative region, with the goal of making each place to be visited in the target administrative region suitable for travel during the visiting time period, the visiting order and visiting time period of each place to be visited in the target administrative region are determined within the visiting time period of the target administrative region.

[0241] In some embodiments of the present disclosure, the determination module 602 is further configured to:

[0242] Before obtaining the weather forecast information of each place to be visited during the travel time period, if the route type is the third type, the visiting order of each place to be visited, the visiting time period of each place to be visited, and the visiting path between adjacent places to be visited are determined according to the travel time between every two places to be visited, with the goal of minimizing the total travel time, to obtain a planned itinerary; wherein, the third type indicates that the user is concerned about the total travel time of the planned itinerary, and the total travel time is the sum of the travel time between every two adjacent places to be visited in the planned itinerary.

[0243] In some embodiments of the present disclosure, the itinerary information further includes restaurant recommendation information, the restaurant recommendation information includes a recommendation parameter and a user preference parameter, the recommendation parameter indicates whether the user needs to be recommended a restaurant, the user preference parameter indicates the user's preference for the restaurant, and the planned itinerary further includes restaurant information of the recommended restaurant;

[0244] The determination module 602 is further configured to, after determining the visit time period of each of the to-be-visited places, determine, from among the to-be-visited places, dining places whose visit time period matches the preset dining time period if the recommendation parameter indicates that the user needs to be recommended a restaurant;

[0245] The acquisition module 601 is further used to determine a recommended restaurant that meets the user's preference parameters from restaurants whose distances from the dining location are less than a preset distance, and to acquire restaurant information of the recommended restaurant.

[0246] In some embodiments of the present disclosure, the planned itinerary also includes weather warning information; the acquisition module 601 is further used to:

[0247] After determining the visiting time period of each place to be visited, for each sub-time period of preset duration included in the travel time period, determine the place to be visited whose visiting time period matches the sub-time period, and obtain weather warning information of the place to be visited within the sub-time period.

[0248] In some embodiments of the present disclosure, the device further comprises:

[0249] The acquisition module 601 is further used to obtain improvement information input by the user for the planned itinerary after determining the planned itinerary based on the weather forecast information of each to-be-visited location and taking the visiting time period of each to-be-visited location as a target for suitable travel;

[0250] The determination module 602 is further used to perform natural language processing on the improvement information to determine the location to be improved and the improvement target in the planned itinerary targeted by the improvement information;

[0251] The generation module is used to generate an improved planned itinerary according to the location to be improved and the improvement target.

[0252] In some embodiments of the present disclosure, the device further comprises:

[0253] A judgment module, used to judge whether the weather forecast information of each to-be-visited location and the travel time between each two to-be-visited locations obtained this time are invalid before generating an improved planned itinerary according to the to-be-visited location and the improvement target;

[0254] The acquisition module 601 is also used to re-acquire the weather forecast information of each location to be visited and the travel time between each two locations to be visited if the judgment result of the judgment module is invalid;

[0255] Generate modules, specifically for:

[0256] If the judgment result of the judgment module is invalid, an improved planned itinerary is generated according to the location to be improved, the improvement target, the weather forecast information of each location to be visited, and the travel time between each two locations to be visited;

[0257] If the judgment result of the judgment module is not invalid, an improved planned itinerary is generated according to the location to be improved, the improvement target, the weather forecast information of each location to be visited obtained this time, and the travel time between every two locations to be visited.

[0258] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.

[0259] Figure 7 A schematic block diagram of an example electronic device 700 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0260] like Figure 7As shown, the electronic device 700 includes a computing unit 701, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 702 or a computer program loaded from a storage unit 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the electronic device 700 can also be stored. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0261] Multiple components in the electronic device 700 are connected to the I / O interface 705, including: an input unit 706, such as a keyboard, a mouse, etc.; an output unit 707, such as various types of displays, speakers, etc.; a storage unit 708, such as a disk, an optical disk, etc.; and a communication unit 709, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 709 allows the electronic device 700 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0262] The computing unit 701 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 701 performs the various methods and processes described above, such as the itinerary planning method. For example, in some embodiments, the itinerary planning method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 708. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 700 via the ROM 702 and / or the communication unit 709. When the computer program is loaded into the RAM 703 and executed by the computing unit 701, one or more steps of the itinerary planning method described above may be performed. Alternatively, in other embodiments, the computing unit 701 may be configured to perform the itinerary planning method in any other appropriate manner (e.g., by means of firmware).

[0263] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0264] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0265] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0266] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0267] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0268] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.

[0269] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0270] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A trip planning method, include: Acquire itinerary information input by a user, the itinerary information including: a plurality of places to be visited and a travel time period; Obtaining weather forecast information for each location to be visited during the travel time period, wherein the weather forecast information is used to reflect whether the location is suitable for travel; According to the weather forecast information of each place to be visited, the planned itinerary is determined with the goal of making each place to be visited suitable for travel within the visiting time period. The planned itinerary includes: the visiting order of each place to be visited and the visiting time period of each place to be visited.

2. The method according to claim 1, in, The travel information also includes a route type, and obtaining weather forecast information for each location to be visited during the travel time period includes: If the route type is the first type or the second type, the weather forecast information of each place to be visited during the travel time period is obtained; wherein, the first type indicates that the user is concerned about the weather of each place to be visited in the planned itinerary and the total traffic time of the planned itinerary, and the second type indicates that the user is concerned about the weather of each place to be visited.

3. The method according to claim 2, in, The itinerary information also includes user requirements, which represent travel conditions set by the user for at least one location to be visited; the planned itinerary is determined based on weather forecast information for each location to be visited, with the goal of making each location to be visited suitable for travel within a visit time period, including: If the route type is the first type, then according to the weather forecast information of each place to be visited and the travel time between every two places to be visited, the visiting order and the visiting time period of each place to be visited are determined with the goal of making the visiting time period of each place to be visited suitable for travel and minimizing the total travel time; wherein the total travel time is the sum of the travel time between every two adjacent places to be visited in the planned itinerary; Under the condition of meeting the user's needs, the visiting order and visiting time period of each place to be visited are optimized with the goal of making the visiting time period of each place to be visited suitable for travel and minimizing the total traffic time, and the optimized access path between adjacent places to be visited is determined to obtain the planned itinerary.

4. The method according to claim 3, in, The method of determining the visiting order and visiting time period of each to-be-visited location based on the weather forecast information of each to-be-visited location and the travel time between each two to-be-visited locations, with the goal of making each to-be-visited location suitable for travel within the visiting time period and minimizing the total travel time, includes: Determine whether the target administrative area of ​​each location to be visited is the same; If yes, then determine the order and time periods of visits to the locations to be visited based on the weather forecast information of each location to be visited and the travel time between each two locations to be visited, with the goal of making each location to be visited suitable for travel within the time period and minimizing the total travel time; If not, then according to the weather forecast information of each target administrative area and the travel time between every two target administrative areas, the visiting order and visiting time period of each target administrative area are determined with the goal of making each target administrative area suitable for travel within the visiting time period and minimizing the total travel time; For each target administrative region, based on the weather forecast information of each location to be visited in the target administrative region and the travel time between every two locations to be visited, with the goal of making each location to be visited in the target administrative region suitable for travel within the visiting time period and minimizing the total travel time, the visiting order and visiting time period of each location to be visited in the target administrative region are determined within the visiting time period of the target administrative region.

5. The method according to claim 2, in, The itinerary information also includes user requirements, which represent travel conditions set by the user for at least one location to be visited; the planned itinerary is determined based on weather forecast information for each location to be visited, with the goal of making each location to be visited suitable for travel within a visit time period, including: If the route type is the second type, then according to the weather forecast information of each place to be visited, with the goal of making each place to be visited suitable for travel within the visiting time period, determine the visiting order and visiting time period of each place to be visited; Under the condition of meeting the user's needs, the goal is to make each place to be visited suitable for travel within the visiting time period, optimize the visiting order and visiting time period of each place to be visited, and determine the optimized access path between adjacent places to be visited to obtain the planned itinerary.

6. The method according to claim 5, in, The method of determining the visiting order and visiting time period of each to-be-visited location based on the weather forecast information of each to-be-visited location and aiming at ensuring that each to-be-visited location is suitable for travel within the visiting time period includes: Determine whether the target administrative area of ​​each location to be visited is the same; If yes, then determine the order and time periods of visits to the locations to be visited based on the weather forecast information for each location to be visited, with the goal of ensuring that each location to be visited is suitable for travel during the time period of visits; If not, then determine the order of visiting each target administrative area based on the weather forecast information of each target administrative area, with the goal of making each target administrative area suitable for travel during the visiting time period; For each target administrative region, based on the weather forecast information of each place to be visited in the target administrative region, with the goal of making each place to be visited in the target administrative region suitable for travel during the visiting time period, the visiting order and visiting time period of each place to be visited in the target administrative region are determined within the visiting time period of the target administrative region.

7. The method according to claim 2, before obtaining the weather forecast information of each place to be visited during the travel time period, further comprising: include: If the route type is the third type, then based on the travel time between every two places to be visited, with the goal of minimizing the total travel time, the order of visiting the places to be visited, the visit time period of each place to be visited, and the visit path between adjacent places to be visited are determined to obtain the planned itinerary; wherein, the third type indicates that the user is concerned about the total travel time of the planned itinerary, and the total travel time is the sum of the travel time between every two adjacent places to be visited in the planned itinerary.

8. The method according to any one of claims 1 to 7, in, The itinerary information also includes restaurant recommendation information, the restaurant recommendation information includes a recommendation parameter and a user preference parameter, the recommendation parameter indicates whether the user needs to be recommended a restaurant, the user preference parameter indicates the user's preference for a restaurant, and the planned itinerary also includes restaurant information of the recommended restaurant; After determining the time period for visiting each location to be visited, it also includes: If the recommendation parameter indicates that the user needs to be recommended a restaurant, then determining, from the places to be visited, a dining place whose visit time period matches the preset dining time period; From restaurants whose distance from the dining place is less than a preset distance, a recommended restaurant that meets the user preference parameter is determined, and restaurant information of the recommended restaurant is obtained.

9. The method according to any one of claims 1 to 7, wherein the planned itinerary further includes weather warning information; after determining the visiting time period of each place to be visited, include: For each sub-time period of preset duration included in the travel time period, a place to be visited whose visit time period matches the sub-time period is determined, and weather warning information of the place to be visited in the sub-time period is obtained.

10. The method according to any one of claims 1 to 9, after determining the planned itinerary based on the weather forecast information of each to-be-visited location and taking the visiting time period of each to-be-visited location as a suitable time for travel, further include: Obtaining improvement information input by a user for the planned trip; Performing natural language processing on the improvement information to determine the location to be improved and the improvement target targeted by the improvement information in the planned itinerary; An improved planned itinerary is generated according to the location to be improved and the improvement target.

11. The method according to claim 10, before generating the improved planned itinerary according to the location to be improved and the improvement target, further comprising: include: Determine whether the weather forecast information of each location to be visited and the travel time between each two locations to be visited obtained this time are invalid; If it fails, re-obtain the weather forecast information of each place to be visited and the travel time between every two places to be visited; The step of generating an improved planned itinerary according to the location to be improved and the improvement target includes: If it fails, generating an improved planned itinerary according to the location to be improved, the improvement target, the weather forecast information of each location to be visited that is reacquired, and the travel time between every two locations to be visited; If it is not invalid, an improved planned itinerary is generated according to the location to be improved, the improvement target, the weather forecast information of each location to be visited acquired this time, and the travel time between every two locations to be visited.

12. A trip planning device, include: An acquisition module, used to acquire itinerary information input by a user, wherein the itinerary information includes: a plurality of places to be visited and a travel time period; The acquisition module is further used to acquire weather forecast information of each location to be visited during the travel time period, wherein the weather forecast information is used to reflect whether the location is suitable for travel; The determination module is used to determine the planned itinerary based on the weather forecast information of each to-be-visited location obtained by the acquisition module, with the goal of making each to-be-visited location suitable for travel within the visiting time period, and the planned itinerary includes: the visiting order of each to-be-visited location and the visiting time period of each to-be-visited location.

13. The device according to claim 12, in, The travel information also includes a route type, and the acquisition module is specifically used to: If the route type is the first type or the second type, the weather forecast information of each place to be visited during the travel time period is obtained; wherein, the first type indicates that the user is concerned about the weather of each place to be visited in the planned itinerary and the total traffic time of the planned itinerary, and the second type indicates that the user is concerned about the weather of each place to be visited.

14. The device according to claim 13, in, The itinerary information also includes user requirements, which represent travel conditions set by the user for at least one place to be visited; the determination module is specifically used to: If the route type is the first type, then according to the weather forecast information of each place to be visited and the travel time between every two places to be visited, the visiting order and the visiting time period of each place to be visited are determined with the goal of making the visiting time period of each place to be visited suitable for travel and minimizing the total travel time; wherein the total travel time is the sum of the travel time between every two adjacent places to be visited in the planned itinerary; Under the condition of meeting the user's needs, the visiting order and visiting time period of each place to be visited are optimized with the goal of making the visiting time period of each place to be visited suitable for travel and minimizing the total traffic time, and the optimized access path between adjacent places to be visited is determined to obtain the planned itinerary.

15. The device according to claim 14, in, The determination module is specifically used for: Determine whether the target administrative area of ​​each location to be visited is the same; If yes, then determine the order and time periods of visits to the locations to be visited based on the weather forecast information of each location to be visited and the travel time between each two locations to be visited, with the goal of making each location to be visited suitable for travel within the time period and minimizing the total travel time; If not, then according to the weather forecast information of each target administrative area and the travel time between every two target administrative areas, the visiting order and visiting time period of each target administrative area are determined with the goal of making each target administrative area suitable for travel within the visiting time period and minimizing the total travel time; For each target administrative region, based on the weather forecast information of each location to be visited in the target administrative region and the travel time between every two locations to be visited, with the goal of making each location to be visited in the target administrative region suitable for travel within the visiting time period and minimizing the total travel time, the visiting order and visiting time period of each location to be visited in the target administrative region are determined within the visiting time period of the target administrative region.

16. The device according to claim 13, in, The itinerary information also includes user requirements, which represent travel conditions set by the user for at least one place to be visited; the determination module is specifically used to: If the route type is the second type, then according to the weather forecast information of each place to be visited, with the goal of making each place to be visited suitable for travel within the visiting time period, determine the visiting order and visiting time period of each place to be visited; Under the condition of meeting the user's needs, the goal is to make each place to be visited suitable for travel within the visiting time period, optimize the visiting order and visiting time period of each place to be visited, and determine the optimized access path between adjacent places to be visited to obtain the planned itinerary.

17. The device according to claim 16, in, The determination module is specifically used for: Determine whether the target administrative area of ​​each location to be visited is the same; If yes, then determine the order and time periods of visits to the locations to be visited based on the weather forecast information for each location to be visited, with the goal of ensuring that each location to be visited is suitable for travel during the time period of visits; If not, then determine the order of visiting each target administrative area based on the weather forecast information of each target administrative area, with the goal of making each target administrative area suitable for travel during the visiting time period; For each target administrative region, based on the weather forecast information of each place to be visited in the target administrative region, with the goal of making each place to be visited in the target administrative region suitable for travel during the visiting time period, the visiting order and visiting time period of each place to be visited in the target administrative region are determined within the visiting time period of the target administrative region.

18. The apparatus according to claim 13, wherein the determining module is further configured to: Before obtaining the weather forecast information of each to-be-visited location within the travel time period, if the route type is the third type, the visiting order of each to-be-visited location, the visiting time period of each to-be-visited location, and the visiting path between adjacent to-be-visited locations are determined based on the travel time between each two to-be-visited locations with the goal of minimizing the total travel time, to obtain the planned itinerary; in, The third type indicates that the user is concerned about the total transportation time of the planned itinerary, and the total transportation time is the sum of the transportation time between every two adjacent places to be visited in the planned itinerary.

19. The device according to any one of claims 12 to 18, in, The itinerary information also includes restaurant recommendation information, the restaurant recommendation information includes a recommendation parameter and a user preference parameter, the recommendation parameter indicates whether the user needs to be recommended a restaurant, the user preference parameter indicates the user's preference for a restaurant, and the planned itinerary also includes restaurant information of the recommended restaurant; The determination module is further configured to, after determining the visit time period of each to-be-visited location, determine, from among the to-be-visited locations, a dining location whose visit time period matches a preset dining time period if the recommendation parameter indicates that the user needs to be recommended a restaurant; The acquisition module is further used to determine a recommended restaurant that meets the user preference parameters from restaurants whose distance from the dining place is less than a preset distance, and to acquire restaurant information of the recommended restaurant.

20. The device according to any one of claims 12 to 18, wherein the planned itinerary further includes weather warning information; and the acquisition module is further configured to: After determining the visiting time period of each place to be visited, for each sub-time period of preset duration included in the travel time period, determine the place to be visited whose visiting time period matches the sub-time period, and obtain weather warning information of the place to be visited within the sub-time period.

21. The device according to any one of claims 12 to 20, further comprising: include: The acquisition module is further used to acquire improvement information input by the user for the planned itinerary after determining the planned itinerary based on the weather forecast information of each to-be-visited location and taking the visiting time period of each to-be-visited location as a suitable time for travel; The determination module is further used to perform natural language processing on the improvement information to determine the location to be improved and the improvement target targeted by the improvement information in the planned itinerary; A generation module is used to generate an improved planned itinerary according to the location to be improved and the improvement target.

22. The device according to claim 21, further comprising: include: A judgment module, used for judging whether the weather forecast information of each to-be-visited location and the traffic time between each two to-be-visited locations acquired this time are invalid before generating the improved planned itinerary according to the to-be-improved location and the improvement target; The acquisition module is further used to re-acquire weather forecast information of each location to be visited and the travel time between each two locations to be visited if the judgment result of the judgment module is invalid; The generating module is specifically used for: If the judgment result of the judgment module is failure, then generating an improved planned itinerary according to the location to be improved, the improvement target, the re-acquired weather forecast information of each location to be visited, and the travel time between every two locations to be visited; If the judgment result of the judgment module is not invalid, an improved planned itinerary is generated according to the location to be improved, the improvement target, the weather forecast information of each location to be visited acquired this time, and the travel time between every two locations to be visited.

23. An electronic device, include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 11.

24. A non-transitory computer-readable storage medium storing computer instructions, in, The computer instructions are used to cause the computer to execute the method according to any one of claims 1-11.

25. A computer program product comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 11.

Citation Information

Cited By

  • Information management method for personal passport

    CN120278667A

  • A method for managing personal passport information

    CN120278667B