Big data-based intelligent scheduling method and system for tourism services
By combining simulated annealing algorithm with a multi-neighborhood operator library and hierarchical gradient search, the problem of low computational efficiency in intelligent scheduling of tourism services is solved, achieving efficient global and local optimization and obtaining the optimal scheduling scheme.
Patent Information
- Application Number
- CN202511564343.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-30
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2045-10-30
AI Technical Summary
Existing technologies have low computational efficiency in intelligent scheduling of tourism services, cannot obtain the optimal scheduling scheme, and have difficulty in effectively identifying and adjusting node clusters with similar geographical locations or business attributes, resulting in poor global optimization performance.
The simulated annealing algorithm is combined with a multi-neighborhood operator library and a hierarchical gradient search strategy. Through initial temperature setting, multiple perturbation analysis, global and local optimization processes, node clustering and reordering are performed by combining geospatial and business attribute labels, and key nodes are locked for local adjustment.
It improves the breadth and depth of the global search, shortens the solution time, obtains a more refined and reasonable scheduling scheme, and improves computational efficiency and optimization effect.
Smart Images

Figure CN121073145B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of scheduling, and in particular relates to intelligent scheduling methods and systems for tourism services based on big data. Background Technology
[0002] The intelligent scheduling problem for tourism services, namely how to plan the optimal travel route for users that meets their diverse constraints such as time, budget, and interests, is essentially a complex combinatorial optimization problem. It is an extension of the classic Traveling Salesman Problem and Vehicle Routing Problem in the tourism context, exhibiting NP-hard characteristics. Various solutions based on heuristics and metaheuristics, such as genetic algorithms, ant colony algorithms, and simulated annealing, can find approximate optimal solutions to some extent, but each has its limitations. For example, genetic algorithms are prone to premature convergence and getting trapped in local optima; ant colony algorithms are sensitive to parameter settings and have slow convergence speeds. Traditional simulated annealing algorithms often rely on empirically set key parameters such as initial temperature and cooling rate, lacking adaptability to specific problem instances, leading to unstable algorithm performance. Furthermore, its neighborhood search structure is often relatively simple, such as using only simple node swapping, limiting its exploration capabilities and making it difficult to escape deep local optima traps, affecting the effectiveness and efficiency of global optimization. Hybrid algorithm strategies combine algorithms with strong global search capabilities with those with strong local search capabilities. However, once a global search algorithm (such as simulated annealing) provides a relatively optimal initial route, subsequent local optimization processes often involve a detailed search of the entire lengthy node sequence. This is computationally expensive and inefficient because minor movements of most nodes in the route do not significantly improve the overall solution quality. Identifying and focusing on the problem areas with the greatest optimization potential within the route for targeted local solutions is a key bottleneck in improving algorithm performance. Furthermore, in complex route adjustments, how to quickly evaluate and adjust the overall order of node clusters composed of nodes with similar geographical locations or business attributes at a macroscopic level to achieve rapid route structure reconstruction is also a problem that current technologies have not effectively solved. Summary of the Invention
[0003] The purpose of this invention is to provide a smart scheduling method and system for tourism services based on big data, addressing the problems of low computational efficiency and inability to obtain optimal scheduling solutions in existing scheduling methods. The method includes the following steps:
[0004] Obtain the set of tourism service nodes to be scheduled and user constraints, and generate an initial tourism route; perform a preset number of neighborhood structure perturbations on the initial tourism route, and calculate and set the initial temperature of the simulated annealing algorithm based on the standard deviation of the objective function values of each route scheme after multiple perturbations.
[0005] In the simulated annealing iteration process, at the current temperature of each iteration, a neighborhood operator is selected from a neighborhood operator library containing a node pair exchange operator, a continuous node block reverse order operator and a span three-node exchange operator according to a probability distribution negatively related to the current temperature value, a new travel route is generated by operating on the current route, and it is judged whether to accept the new travel route based on the Metropolis criterion; when the global optimal route is not updated in the last N iterations, a temperature rising operation is performed on the current temperature, and then a preset temperature lowering process is continued until the outer loop termination condition is met, and a global exploration route scheme is obtained;
[0006] The global exploration route scheme is taken as an initial solution of a multi-level gradient search, and the node sequence in the global exploration route scheme is clustered into at least one node cluster based on the geographical spatial position and the business attribute label of the travel service node; a macroscopic gradient value determined by the influence amount of removing the node cluster on the total cost of the route is calculated for each node cluster, and the node cluster is reordered or exchanged as a whole by using the macroscopic gradient value;
[0007] The marginal cost contribution value of each node in the cluster is taken as a microscopic gradient value, K nodes with the maximum microscopic gradient value are locked, and local adjustment is performed under the constraint that only the K nodes are allowed to exchange positions within the cluster; when the termination condition is met, a travel service scheduling scheme is output.
[0008] Optionally, the initial temperature of the simulated annealing algorithm is calculated and set according to the standard deviation of the objective function values of the route schemes after multiple perturbations, including:
[0009] The initial travel route is subjected to M neighborhood operations to obtain M new route schemes, and M is a positive integer;
[0010] The standard deviation of the objective function values of the M new route schemes is calculated .
[0011] The initial acceptance probability is set, and the initial temperature is calculated according to the formula , wherein is the average value of the increase of the objective function value in the M neighborhood operations, or the initial temperature is calculated according to the formula .
[0012] Optionally, the neighborhood operator is selected from a neighborhood operator library containing a node pair exchange operator, a continuous node block reverse order operator and a span three-node exchange operator according to a probability distribution negatively related to the current temperature value, including:
[0013] Step one: set the selection probability of each operator according to the current temperature T and the initial temperature , wherein the selection probability of the node pair exchange operator increases as the temperature T decreases, and the selection probability of the continuous node block reverse order operator and the span three node exchange operator decreases as the temperature T decreases;
[0014] Step two: select a neighborhood operator by roulette or random sampling according to the selection probability.
[0015] Optionally, when the global optimal route is not updated for consecutive N iterations, a temperature rising operation is performed on the current temperature, including:
[0016] When the global optimal route is not updated for consecutive N iterations, multiply the current temperature T by a temperature rising coefficient greater than 1 to reset the temperature, wherein N is a preset iteration threshold.
[0017] Optionally, based on the geographical spatial position and the business attribute label of the tourism service node, the node sequence in the global exploration route scheme is clustered into at least one node cluster, including:
[0018] Step one: extract the geographical coordinates (x, y) and the one-hot encoding of the business attribute label of the tourism service node i; ,
[0019] Step two: normalize the geographical coordinate data and the one-hot encoding data of all nodes respectively, and optionally weight them by a weight factor to obtain a unified feature vector that can balance the influence of space and business attributes;
[0020] Step three: use a sequential clustering method, starting with the first node in the route sequence as the initial cluster, sequentially traversing the subsequent nodes, if the Euclidean distance between the feature vector of a node and the average vector of all existing nodes in the current cluster is less than a preset threshold, the node is assigned to the current cluster, otherwise a new cluster is created with the node.
[0021] Optionally, a macroscopic gradient value determined by the impact of removing the node cluster on the total cost of the route is calculated for each node cluster, and the node cluster is reordered or exchanged as a whole using the macroscopic gradient value, including:
[0022] Step one: for each node cluster k, determine the pre-order node p and the post-order node s of the node cluster k in the route, and the start node and the end node of the cluster;
[0023] Step two: define the impact of removing the node cluster k on the total cost of the route as the macroscopic gradient value of the node cluster k and according to the formula where InternalCost(k) is the internal path cost of cluster k, and Cost(a, b) is the travel cost from node a to b;
[0024] Step three: performing overall position exchange or moving of one or more node clusters with the maximum value. Step four: performing local adjustment under the constraint of allowing position exchange within the cluster only for the K nodes with the maximum value of the micro gradient value.
[0025] Optionally, the marginal cost contribution value of each node within the cluster is taken as a micro gradient value, K nodes with the maximum value of the micro gradient value are locked, and local adjustment is performed under the constraint of allowing position exchange within the cluster only for the K nodes.
[0026] Step one: screening out macro gradient node clusters exceeding a preset threshold value;
[0027] Step two: calculating the marginal cost MC(i) of each node i within each screened node cluster as the micro gradient value of node i, where pred(i) and succ(i) are the predecessor and successor nodes of node i in the current route, respectively;
[0028] Step three: finding K nodes with the maximum micro gradient value within the cluster, evaluating all K! permutations of the K nodes while keeping the positions of other nodes within the cluster unchanged, and updating the node order within the cluster in the permutation mode that minimizes the total route cost.
[0029] In addition, the present application also provides a tourism service intelligent scheduling system based on big data, comprising the following modules:
[0030] An initial route generation module is configured to obtain a set of tourism service nodes to be scheduled and user constraint conditions, and generate an initial tourism route; the initial tourism route is subjected to preset number of neighborhood structure perturbations, and the initial temperature of the simulated annealing algorithm is calculated and set according to the standard deviation of the objective function values of each route scheme after multiple perturbations.
[0031] A global route generation module is configured to enter a simulated annealing iteration process, select a neighborhood operator from a neighborhood operator library containing a node pair calculation operator, a continuous node block reverse order operator and a span three-node exchange operator according to a probability distribution negatively correlated with the current temperature value at the current temperature of each iteration, operate on the current route to generate a new tourism route, and judge whether to accept the new tourism route based on the Metropolis criterion; when the global optimal route is not updated for consecutive N iterations, perform a temperature rising operation on the current temperature, and then continue to perform a preset temperature lowering process until the outer loop termination condition is met, and a global exploration route scheme is obtained.
[0032] a global optimization module, configured to cluster the node sequence in the global exploration route scheme into at least one node cluster based on geographical spatial positions and business attribute labels of the tourism service nodes, and calculate a macro gradient of each node cluster determined by a module length of a sum vector of marginal cost contribution vectors of all nodes in the node cluster, and reorder or globally exchange the node cluster by using the macro gradient;
[0033] a local optimization module, configured to define a module length of the marginal cost contribution vector of each node in the cluster as a micro gradient value, lock K nodes with the largest micro gradient values, perform local adjustment under a constraint that only allows the K nodes to exchange positions in the cluster, and output the tourism service scheduling scheme when a termination condition is met.
[0034] Optionally, the preset number of neighborhood structure perturbations on the initial tourism route includes:
[0035] performing M times of neighborhood operations on the initial tourism route to obtain M new route schemes, where M is a positive integer;
[0036] calculating a standard deviation of objective function values of the M new route schemes by taking a weighted sum of total time length and total cost of the route as the objective function .
[0037] setting an initial acceptance probability , and calculating an initial temperature according to a formula , where is an average value of the increase in the objective function value in the M times of neighborhood operations, or calculating the initial temperature according to a formula .
[0038] Optionally, the neighborhood operator is selected from a neighborhood operator library including a node pair exchange operator, a continuous node block reverse order operator and a span three-node exchange operator according to a probability distribution negatively related to the current temperature value, and the probability distribution negatively related to the current temperature value includes:
[0039] Step 1: setting selection probabilities of the operators according to the current temperature T and the initial temperature , where the selection probability of the node pair exchange operator increases with the decrease of the temperature T, and the selection probabilities of the continuous node block reverse order operator and the span three-node exchange operator decrease with the decrease of the temperature T;
[0040] Step 2: selecting a neighborhood operator by a roulette wheel method or random sampling according to the selection probabilities.
[0041] Optionally, the step of performing a temperature increase operation on the current temperature when the globally optimal route has not been updated in N consecutive iterations includes:
[0042] If the globally optimal route is not updated in N consecutive iterations, the current temperature T is multiplied by a heating coefficient greater than 1 to reset the temperature, where N is a preset iteration number threshold.
[0043] Optionally, the step of clustering the node sequences in the global exploration route scheme into at least one node cluster based on the geospatial location and business attribute tags of tourism service nodes includes:
[0044] Step 1: Extract the geographic coordinates of tourism service node i. , One-hot encoding of business attribute tags;
[0045] Step 2: Normalize the geographic coordinate data and one-hot encoded data of all nodes respectively, and optionally weight them by weighting factors to obtain a unified feature vector that can balance the influence of spatial and business attributes.
[0046] Step 3: Using the sequential clustering method, start with the first node of the route sequence as the initial cluster, and sequentially traverse the subsequent nodes. If the Euclidean distance between the feature vector of a node and the average feature vector of all existing nodes in the current cluster is less than a preset threshold, then the node is assigned to the current cluster; otherwise, a new cluster is created with that node.
[0047] Optionally, the step of calculating a macroscopic gradient value for each node cluster, determined by the impact of removing the node cluster on the total route cost, and using the macroscopic gradient value to reorder or swap the node clusters as a whole, includes:
[0048] Step 1: For each node cluster k, determine the predecessor node p and successor node s of node cluster k in the path, as well as the starting node within the cluster. and termination node ;
[0049] Step 2: Define the impact of removing node cluster k on the total route cost as the macroscopic gradient value of node cluster k. And according to the formula The calculation is performed, where InternalCost(k) is the internal path cost of cluster k, and Cost(a, b) is the travel cost from node a to b;
[0050] Step 3: Put One or more node clusters with the largest value are swapped or moved as a whole.
[0051] Optionally, the marginal cost contribution value of each node in the cluster is taken as a micro gradient value, K nodes with the maximum micro gradient value are locked, and local adjustment is performed under the constraint that only the K nodes are allowed to exchange positions within the cluster, including:
[0052] Step one: screening out macro gradient Node cluster exceeding the preset threshold;
[0053] Step two: calculating the marginal cost MC(i) of each node i in the screened node cluster as the micro gradient value of the node i, wherein pred(i) and succ(i) are the predecessor and successor nodes of the node i in the current route, respectively;
[0054] Step three: finding K nodes with the maximum micro gradient value in the cluster, evaluating all K! permutation combinations of the K nodes while keeping the positions of other nodes in the cluster unchanged, and updating the node order in the cluster in the permutation mode that minimizes the total cost of the route.
[0055] Compared with the prior art, the beneficial effects of the present application are that:
[0056] 1) The initial temperature of simulated annealing is set by perturbation analysis of the initial route scheme, avoiding the over-reliance on experience in the traditional method, combining the multi-operator neighborhood library and the temperature rising mechanism to enhance the breadth and depth of global search, and more effectively jumping out of the local optimal trap;
[0057] 2) In the local optimization stage, a hierarchical progressive gradient search strategy is introduced, the macro gradient of the node cluster is calculated, the overall structure of the route is quickly and large-scale adjusted, the macro efficiency of optimization is greatly improved, the fine micro search is focused on a few problem node clusters with the maximum optimization potential and key nodes within the cluster, the huge computational overhead caused by global adjustment of the long route is avoided, the solution time is shortened while ensuring the quality of the solution, and a more fine and reasonable scheduling scheme is obtained. BRIEF DESCRIPTION OF DRAWINGS
[0058] Figure 1 The flowchart of example one;
[0059] Figure 2 The schematic diagram of the neighborhood operator;
[0060] Figure 3 The schematic diagram of node cluster exchange;
[0061] Figure 4 The structure diagram of example two. DETAILED DESCRIPTION
[0062] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application. It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use, and processing of related data must comply with relevant laws, regulations, and standards, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0063] In Example 1, a smart scheduling method for tourism services based on big data is provided, such as... Figure 1 As shown, it includes the following steps:
[0064] S1. Obtain the set of tourism service nodes to be scheduled and user constraints, and generate an initial tourism route; perform a preset number of neighborhood structure perturbations on the initial tourism route, and calculate and set the initial temperature of the simulated annealing algorithm based on the standard deviation of the objective function values of each route scheme after multiple perturbations.
[0065] The tourism service node set includes each node's unique geographical coordinates, suggested playtime, ticket price, and service type label. User constraints include total budget, total travel time, a list of mandatory nodes, and specified start and end nodes. An initial travel route is generated using a nearest neighbor heuristic algorithm. Starting from the specified start node, in each iteration, the nearest unvisited node is added to the route until all mandatory nodes are included or time, budget, or other constraints prevent the addition of new nodes, resulting in the initial travel route. The objective function is defined as the weighted sum of the total route cost, including total travel distance, total playtime, and waiting time. The initial route is subjected to M random perturbations (e.g., M = 100). Each perturbation generates a new route by randomly selecting and swapping two nodes in the route. The objective function values for these M new route schemes are calculated, and the sample standard deviation of these M objective function values is determined. According to the formula, for example To set the initial temperature , where P is the initial acceptance probability, which is usually set to a constant close to 1, such as 0.95.
[0066] In an optional embodiment, the step of subjecting the initial travel route to a predetermined number of neighborhood structure perturbations, and calculating and setting the initial temperature of the simulated annealing algorithm based on the standard deviation of the objective function values of each route scheme after multiple perturbations, includes:
[0067] Perform M neighborhood operations on the initial travel route to obtain M new route schemes, where M is a positive integer;
[0068] Using the weighted sum of the total route duration and total cost as the objective function, calculate the standard deviation of the objective function values for the M new route schemes. ;
[0069] Set initial acceptance probability According to the formula Calculate the initial temperature ,in This is the average increase in the objective function value during M neighborhood operations, or according to the formula... Calculate the initial temperature .
[0070] Assume an initial travel route plan is generated with an objective function value of 2000. To determine a suitable initial temperature, a preset positive integer M is set to 100, meaning 100 neighborhood operations are performed on the initial route. These neighborhood operations include, but are not limited to, randomly swapping two travel nodes in the route and interacting with any node in the neighborhood within a preset step size, thus obtaining 100 new route plans. For these 100 new plans, their objective function values are calculated, which combine the total route duration and total cost. After obtaining the 100 objective function values, the standard deviation of this data set is calculated. The initial acceptance probability is set to 80. To ensure the algorithm has sufficient exploratory power in the early stages, a relatively high initial acceptance probability is set. A value of 0.95 indicates a 95% probability of accepting a suboptimal solution of average quality initially. According to the formula... The initial temperature can be calculated. Approximately equal to 1559, in an alternative embodiment, according to the formula Calculate the initial temperature ,in This represents the average increase in the objective function value over M operations.
[0071] S2, enter the simulated annealing iteration process. At the current temperature of each iteration, based on the probability distribution negatively correlated with the current temperature value, select a neighborhood operator from the neighborhood operator library containing node pair swapping operators, continuous node block inversion operators, and span three-node swapping operators. Perform the operation on the current route to generate a new tourist route, and determine whether to accept the new tourist route based on the Metropolis criterion. If the globally optimal route has not been updated in N consecutive iterations, perform a heating operation on the current temperature, and then continue to perform the preset cooling process until the outer loop termination condition is met to obtain the global exploration route scheme.
[0072] During the high-temperature phase, the selection probability of the more destructive continuous node block inversion operator and the span three-node swap operator is increased; as the temperature decreases, the selection probability of the swap operator for nodes with smaller changes is gradually increased, and this selection process is implemented through a roulette wheel model; after generating a new route, the change in the objective function value is calculated. ,like If the value is less than 0, the new route is accepted; otherwise, exp(- The probability of accepting a new route is given by ( / T); a stagnation counter is set, and if the optimal solution fails to improve for N consecutive times at the same temperature, the current temperature T is multiplied by a heating coefficient greater than 1, such as 1.2, to escape the local optimum, and then... The cooling methods continue to iterate. The cooling coefficient is set to 0.99. The loop ends when the temperature drops below the preset termination temperature or the maximum number of iterations is reached. The node-to-node swap operator randomly selects two nodes in the travel route and swaps their positions. The continuous node block inversion operator randomly selects a continuous node segment in the travel route and completely reverses the order of the nodes within that segment. The span-three node swap operator arbitrarily selects three nodes in the travel route and then cyclically swaps their positions, for example, node A goes to position B, B goes to position C, and C goes to position A. Figure 2 As should be known by those skilled in the art, the results of the three operator operations are not limited to the three operators mentioned above. Other operators may also be included, such as the random exchange operator.
[0073] Furthermore, a sequential greedy clustering algorithm is employed to traverse the nodes sequentially along the global exploration route. The first node forms its own cluster. For each subsequent node, the comprehensive similarity between it and the last node in its cluster is calculated. This similarity is a weighted sum of geographical distance and business attribute label similarity, where label similarity can be calculated using the Jaccard coefficient. If the comprehensive similarity is higher than a preset threshold, the node is merged into the current cluster; otherwise, the node starts a new cluster, until all nodes are assigned to clusters.
[0074] In an alternative embodiment, the selecting one neighborhood operator from a neighborhood operator library comprising a pair-exchange operator, a consecutive block reverse operator and a cross-three-node exchange operator according to a probability distribution negatively correlated with the current temperature value comprises:
[0075] Step one: setting selection probabilities of each operator according to the current temperature T and the initial temperature T0, wherein the selection probability of the pair-exchange operator increases as the temperature T decreases, and the selection probabilities of the consecutive block reverse operator and the cross-three-node exchange operator decrease as the temperature T decreases.
[0076] Step two: selecting one neighborhood operator by roulette wheel method or random sampling according to the selection probabilities.
[0077] Suppose the operator library comprises three operators, namely the pair-exchange operator for small-range optimization, and the consecutive block reverse operator and the cross-three-node exchange operator for large-range structure adjustment. At the beginning of the algorithm, the current temperature T is close to the initial temperature T0, for example, T is 480 and T0 is 500. At this time, in order to perform global exploration, the selection probability of the pair-exchange operator is set to 0.2, and the selection probabilities of the consecutive block reverse operator and the cross-three-node exchange operator are set to 0.4 respectively.
[0078] As the iteration proceeds, the temperature T gradually decreases, for example, to 50. At this time, fine local search is needed, and the adjustment probability is that the selection probability of the pair-exchange operator is increased to 0.7, and the selection probabilities of the consecutive block reverse operator and the cross-three-node exchange operator are decreased to 0.15 respectively. In each iteration of selecting an operator, a random number between 0 and 1 is generated, and according to the roulette wheel rule, if the random number falls within the interval of 0 to 0.7, the pair-exchange operator is selected, thereby realizing the adaptive mechanism of using different search strategies at different stages.
[0079] In an alternative embodiment, the performing a temperature rising operation on the current temperature when the global optimal route is not updated for consecutive N iterations comprises:
[0080] When the global optimal route is not updated for consecutive N iterations, the current temperature T is multiplied by a temperature rising coefficient greater than 1 to reset the temperature, wherein N is a preset iteration threshold.
[0081] Setting the iteration threshold N to 1000 continuously records the currently found globally optimal route. Suppose that in the 5000th iteration, a route with an objective function value of 1500 is found. However, in the next 1000 iterations from the 5001st to the 6000th, although the algorithm continues to search for new routes, the globally optimal route remains unchanged. This indicates that the algorithm may be trapped in a local optimum. At this point, a heating operation is automatically triggered. Suppose that before the 6001st iteration, the current temperature T has dropped to 20.5°C. A heating coefficient greater than 1 is set to 1.3, and the current temperature T is reset to 20.5 multiplied by 1.3, resulting in a new temperature of 26.65°C. This heating operation increases the probability of the algorithm accepting inferior solutions again, giving it a chance to escape the current local optimum and explore other regions in the solution space where better solutions may exist.
[0082] S3, take the global exploration route scheme as the initial solution of the multi-level gradient search, and based on the geospatial location and business attribute labels of the tourism service nodes, cluster the node sequence in the global exploration route scheme into at least one node cluster; calculate a macro gradient value for each node cluster, which is determined by the impact of removing the node cluster on the total cost of the route, and use the macro gradient value to reorder or swap the node cluster as a whole.
[0083] For each node i within a cluster, its preceding and following nodes are i-1 and i+1, respectively. Its marginal cost contribution vector is defined as the sum of the displacement vectors from node i-1 to i and from node i to i+1. The total contribution vector of the cluster is obtained by summing the marginal cost contribution vectors of all nodes within the cluster; the L2 norm of this vector is its macroscopic gradient. All clusters are sorted in descending order of their macroscopic gradient values, and the cluster with the highest gradient value is then attempted to be moved as a whole. Figure 3 As shown, it is inserted as a whole into every possible position between other clusters in the route, and the movement scheme that reduces the total objective function value of the route the most is selected.
[0084] In an optional embodiment, clustering the node sequences in the global exploration route scheme into at least one node cluster based on the geospatial location and business attribute tags of tourism service nodes includes:
[0085] Step 1: Extract the geographic coordinates of tourism service node i. , One-hot encoding of business attribute tags;
[0086] Step 2: Normalize the geographic coordinate data and one-hot encoded data of all nodes respectively, and optionally weight them by weighting factors to obtain a unified feature vector that can balance the influence of spatial and business attributes.
[0087] Step three: using the sequential clustering method, taking the first node of the route sequence as the initial cluster, sequentially traversing the subsequent nodes, if the Euclidean distance between the feature vector of a node and the average vector of all existing nodes in the current cluster is less than the preset threshold, the node is included in the current cluster, otherwise a new cluster is created with the node.
[0088] Suppose the route contains two adjacent nodes of attractions A and B, their geographic coordinates are similar, and the business attributes belong to the historical and cultural category. Another node is C bar, its geographic coordinates are far away from the previous two, and the business attribute is the leisure and entertainment category. When constructing the feature vector for each node, the one-hot encoding of the geographic coordinates and the business attribute is normalized, and the geographic position and the business attribute are assigned a weight of 0.5 each to form a unified feature vector.
[0089] When clustering, set the Euclidean distance threshold to 2.5. Start with the first node of the route, attraction A, to create the first cluster. Then process the second node, attraction B. Since its geographic location and business attribute are highly similar to attraction A, the Euclidean distance between its feature vector and the feature vector of attraction A is 0.8, which is less than the threshold 2.5, so attraction B is included in the first cluster. When processing the C bar node, since its geographic and business attributes are significantly different from the average feature vector of cluster one, the calculated Euclidean distance is 9.7, which is much larger than the threshold, so a new cluster will be created for C bar.
[0090] In an optional embodiment, the macroscopic gradient value of each node cluster is calculated by removing the impact of the node cluster on the total cost of the route, and the macroscopic gradient value is used to reorder or exchange the node cluster as a whole, including:
[0091] Step one: for each node cluster k, determine the predecessor node p and the successor node s of node cluster k in the route, and the start node and the end node of the cluster;
[0092] Step two: define the impact of removing node cluster k on the total cost of the route as the macroscopic gradient value of node cluster k , and calculate according to the formula , where InternalCost(k) is the internal path cost of cluster k, and Cost(a, b) is the travel cost from node a to b;
[0093] Step three: exchange or move the node cluster with the largest value as a whole.
[0094] Assume a route is... P→cluster K→S..., where P is the pre-sequenced node A garden, S is the post-sequenced node B garden, and cluster K is a node cluster containing both A University and B University. The starting node of cluster K is A University, and the ending node is B University. The travel cost from A garden to A University is 15, the internal path cost from A University to B University is 5, and the travel cost from B University to B garden is 20. Therefore, the total associated cost of cluster K is 40. Meanwhile, the bypass cost of directly traveling from A garden to B garden after removing cluster K is assumed to be 25. According to the formula, the macroscopic gradient of cluster K
[0095] is equal to the total associated cost minus the bypass cost, i.e., 40 minus 25, resulting in 15. The gradient value of 15 represents the degree of contribution of the current location of cluster K to the total cost. This calculation is performed for all clusters on the route, and the cluster with the largest macroscopic gradient value is selected, for example, another cluster J has a gradient of 22. Therefore, cluster J is the structural unit with the highest cost in the current route, and cluster J will be prioritized for movement or rearrangement to seek the maximum cost reduction.
[0096] S4, the marginal cost contribution value of each node in the cluster is taken as the microscopic gradient value, the K nodes with the largest microscopic gradient value are locked, and local adjustment is performed under the constraint that only these K nodes are allowed to exchange positions within the cluster. When the termination condition is met, the tourism service scheduling scheme is output.
[0097] After completing step S3, the macroscopic level route adjustment is completed. S4 is a further operation after the macroscopic level adjustment in S3. In the route after the macroscopic level adjustment, only the node clusters with a macroscopic gradient value exceeding a threshold value are subjected to microscopic gradient search:
[0098] The node clusters with a macroscopic gradient value greater than a certain threshold value are selected as optimization objects; the marginal cost contribution of each node in each selected cluster is calculated, i.e., the microscopic gradient; the nodes in the cluster are sorted according to the microscopic gradient value, and the top K nodes are selected, for example, K is 3; then a constrained local search is performed, i.e., all possible arrangements of the K nodes are evaluated, and the K nodes are rearranged in the order that minimizes the total length of the internal path in the cluster, while the positions of other nodes in the cluster remain unchanged; after completing this operation for all selected clusters, the output route is the tourism service scheduling scheme.
[0099] In an optional embodiment, the step of taking the marginal cost contribution value of each node in the cluster as the microscopic gradient value, locking the K nodes with the largest microscopic gradient value, and performing local adjustment under the constraint that only these K nodes are allowed to exchange positions within the cluster, includes:
[0100] Step 1: Select the macroscopic gradient a node cluster exceeding a preset threshold value;
[0101] Step two: calculate the marginal cost MC(i) as the micro gradient value of each node i in the selected node cluster, wherein pred(i) and succ(i) are the predecessor and successor nodes of node i in the current route, respectively;
[0102] Step three: find the K nodes with the largest micro gradient values in the cluster, evaluate all K! permutations of the K nodes while keeping the positions of other nodes in the cluster unchanged, and update the order of the nodes in the cluster in the permutation that minimizes the total cost of the route.
[0103] For example, set the threshold value of the macro gradient to 18. According to the foregoing calculation, the node cluster J with a macro gradient of 22 is selected, while the cluster K with a gradient of 15 is not processed. Assume that the order of nodes in cluster J is A-B-C. Calculate the micro gradient for node B. Assume that the cost from the predecessor node A to B is 12, the cost from B to the successor node C is 10, and the direct cost from A to C is 16. Then the micro gradient of node B is 12 plus 10 minus 16, which is 6.
[0104] Calculate the micro gradient for all nodes in cluster J. Assume that the final result shows that the gradient of node B is the largest at 6, and the gradient of node C is the second largest at 4. Set K to 2, i.e., find the two nodes B and C with the largest gradients. Then, keep the position of node A unchanged and only evaluate the cost of the two permutations of B and C, i.e., A-B-C and A-C-B. If the calculation finds that the internal path total cost of A-C-B is lower, adopt this permutation and update the internal order of cluster J to A-C-B, thereby optimizing the route within the cluster while keeping the macro structure unchanged.
[0105] In embodiment two, the present application provides a big data-based intelligent scheduling system for tourism services, as shown in Figure 4 The system includes the following modules:
[0106] An initial route generation module for obtaining a set of tourism service nodes to be scheduled and user constraints, generating an initial tourism route, performing a preset number of neighborhood structure perturbations on the initial tourism route, calculating and setting the initial temperature of the simulated annealing algorithm according to the standard deviation of the objective function values of each route scheme after multiple perturbations;
[0107] The global route generation module is configured to enter an annealing iteration process, in each iteration at a current temperature, select a neighborhood operator from a neighborhood operator library containing a node pair conversion operator, a continuous node block inverse order operator and a span three-node exchange operator according to a probability distribution negatively related to the current temperature value, operate on the current route to generate a new travel route, and judge whether to accept the new travel route based on the Metropolis criterion; when the global optimal route is not updated in the last N iterations, perform a temperature rising operation on the current temperature, and then continue to perform a preset temperature lowering process until a outer loop termination condition is met, and a global exploration route scheme is obtained;
[0108] The overall optimization module is configured to take the global exploration route scheme as an initial solution of a multi-level gradient search, and cluster the node sequence in the global exploration route scheme into at least one node cluster based on the geographical spatial position and the business attribute label of the travel service node; calculate a macroscopic gradient for each node cluster, and reorder or exchange the node cluster based on the macroscopic gradient; the macroscopic gradient is determined by the module length of the sum vector of the marginal cost contribution vectors of all nodes in the cluster.
[0109] The local optimization module is configured to define the module length of the marginal cost contribution vectors of the nodes in the cluster as a microscopic gradient value, lock K nodes with the largest microscopic gradient values, perform local adjustment under the constraint that only the K nodes are allowed to exchange positions in the cluster, and output a travel service scheduling scheme when a termination condition is met.
[0110] From the above description of the embodiments, those skilled in the art can clearly understand that the present application can be implemented by means of software and a necessary general hardware platform. Based on such an understanding, the technical solutions of the present application can be embodied in the form of a software product, which can be stored in a storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0111] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, for system or system embodiments, since they are basically similar to method embodiments, the description is relatively simple, and relevant parts can be referred to the descriptions in the method embodiments. The systems and system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0112] The method and electronic device for providing product object information provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and its core ideas. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A smart scheduling method for tourism services based on big data, characterized in that, Includes the following steps: Obtain the set of tourism service nodes to be scheduled and user constraints, and generate an initial tourism route; The initial travel route is subjected to a preset number of neighborhood structure perturbations. Based on the standard deviation of the objective function values of each route scheme after multiple perturbations, the initial temperature of the simulated annealing algorithm is calculated and set. Entering the simulated annealing iteration process, at the current temperature of each iteration, based on the probability distribution negatively correlated with the current temperature value, a neighborhood operator is selected from the neighborhood operator library containing node pair swapping operators, continuous node block inversion operators, and span three node swapping operators, to operate on the current route to generate a new tourist route, and to determine whether to accept the new route based on the Metropolis criterion. If the globally optimal route is not updated in N consecutive iterations, a heating operation is performed on the current temperature, and then the preset cooling process continues until the outer loop termination condition is met, thus obtaining the global exploration route scheme; the node swap operator randomly selects two nodes in the travel route and swaps their positions; the continuous node block inversion operator randomly selects a continuous node segment in the travel route and completely reverses the order of the nodes within the segment; the span three-node swap operator arbitrarily selects three nodes in the travel route and then cyclically swaps the positions of the three nodes; The global exploration route scheme is used as the initial solution for multi-level gradient search. Based on the geospatial location and business attribute labels of tourism service nodes, the node sequence in the global exploration route scheme is clustered into at least one node cluster. A macro gradient value is calculated for each node cluster, which is determined by the impact of removing the node cluster on the total cost of the route. The macro gradient value is then used to reorder or swap the node clusters as a whole. The marginal cost contribution value of each node in the cluster is used as the micro gradient value. The K nodes with the largest micro gradient values are locked. Local adjustments are performed under the constraint that only these K nodes are allowed to exchange positions within the cluster. When the termination condition is met, the tourism service scheduling scheme is output. The method of clustering node sequences in the global exploration route scheme into at least one node cluster based on the geospatial location and business attribute tags of tourism service nodes includes: Step 1: Extract the geographic coordinates of tourism service node i. , One-hot encoding of business attribute tags; Step 2: Normalize the geographic coordinate data and one-hot encoded data of all nodes respectively, and optionally weight them by weighting factors to obtain a unified feature vector that can balance the influence of spatial and business attributes. Step 3: Using the sequential clustering method, starting from the first node of the route sequence as the initial cluster, and sequentially traversing the subsequent nodes, if the Euclidean distance between the feature vector of a node and the average feature vector of all existing nodes in the current cluster is less than a preset threshold, then the node is assigned to the current cluster; otherwise, a new cluster is created with that node. The step of calculating a macroscopic gradient value for each node cluster, determined by the impact of removing the node cluster on the total route cost, and using the macroscopic gradient value to reorder or swap the node clusters as a whole, includes: Step 1: For each node cluster k, determine the predecessor node p and successor node s of node cluster k in the path, as well as the starting node within the cluster. and termination node ; Step 2: Define the impact of removing node cluster k on the total route cost as the macroscopic gradient value of node cluster k. And according to the formula The calculation is performed, where InternalCost(k) is the internal path cost of cluster k, and Cost(a,b) is the travel cost from node a to b; Step 3: Put The cluster of one or more nodes with the largest value will be swapped or moved as a whole. The process of using the marginal cost contribution value of each node within the cluster as the micro-gradient value, locking the K nodes with the largest micro-gradient values, and performing local adjustments under the constraint that only these K nodes are allowed to exchange positions within the cluster includes: Step 1: Filter out the macroscopic gradient Clusters of nodes exceeding a preset threshold; Step 2: Within each selected node cluster, calculate the marginal cost MC(i) for each node i in the cluster as the micro gradient value of node i, where... Pred(i) and succ(i) are the preceding and following nodes of node i in the current route, respectively. Step 3: Find the K nodes with the largest micro gradient values within the cluster. While keeping the positions of other nodes in the cluster unchanged, evaluate all K! permutations of the K nodes and update the node order within the cluster using the permutation that minimizes the total route cost.
2. The method according to claim 1, characterized in that, The process of performing a preset number of neighborhood structure perturbations on the initial travel route, and calculating and setting the initial temperature of the simulated annealing algorithm based on the standard deviation of the objective function values of each route scheme after multiple perturbations, includes: Perform M neighborhood operations on the initial travel route to obtain M new route schemes, where M is a positive integer; Using the weighted sum of the total route duration and total cost as the objective function, calculate the standard deviation of the objective function values for the M new route schemes. ; Set initial acceptance probability According to the formula Calculate the initial temperature ,in This is the average increase in the objective function value over M operations, or according to the formula... Calculate the initial temperature .
3. The method according to claim 1, characterized in that, The step of selecting a neighborhood operator from a neighborhood operator library containing node pair swap operators, continuous node block inversion operators, and span three-node swap operators based on a probability distribution negatively correlated with the current temperature value includes: Step 1: Based on the current temperature T and the initial temperature The selection probability of each operator is set, wherein the selection probability of the node pair swap operator increases as the temperature T decreases, while the selection probability of the continuous node block inversion operator and the span three node swap operator decreases as the temperature T decreases. Step 2: Based on the selection probability, select a neighborhood operator by roulette wheel or random sampling.
4. The method according to claim 1, characterized in that, When the globally optimal route has not been updated in N consecutive iterations, a temperature increase operation is performed on the current temperature, including: If the globally optimal route is not updated in N consecutive iterations, the current temperature T is multiplied by a heating coefficient greater than 1 to reset the temperature, where N is a preset iteration number threshold.
5. A big data-based intelligent scheduling system for tourism services, characterized in that: Includes the following modules: The initial route generation module is used to obtain the set of tourism service nodes to be scheduled and user constraints, and generate the initial tourism route. The initial travel route is subjected to a preset number of neighborhood structure perturbations. Based on the standard deviation of the objective function values of each route scheme after multiple perturbations, the initial temperature of the simulated annealing algorithm is calculated and set. The global route generation module is used to enter the simulated annealing iteration process. At the current temperature of each iteration, based on the probability distribution negatively correlated with the current temperature value, a neighborhood operator is selected from the neighborhood operator library containing node pair exchange operators, continuous node block inversion operators, and span three node exchange operators. The current route is operated on to generate a new tourist route, and the Metropolis criterion is used to determine whether to accept the new route. If the globally optimal route is not updated in N consecutive iterations, a heating operation is performed on the current temperature, and then the preset cooling process continues until the outer loop termination condition is met, thus obtaining the global exploration route scheme; the node swap operator randomly selects two nodes in the travel route and swaps their positions; the continuous node block inversion operator randomly selects a continuous node segment in the travel route and completely reverses the order of the nodes within the segment; the span three-node swap operator arbitrarily selects three nodes in the travel route and then cyclically swaps the positions of the three nodes; The overall optimization module is used to take the global exploration route scheme as the initial solution for multi-level gradient search, and based on the geospatial location and business attribute labels of the tourism service nodes, to cluster the node sequence in the global exploration route scheme into at least one node cluster; to calculate a macro gradient for each node cluster, which is determined by the magnitude of the sum of the marginal cost contribution vectors of all nodes in the cluster, and to use the macro gradient to reorder or swap the node clusters as a whole. The local optimization module defines the magnitude of the marginal cost contribution vector of each node in the cluster as the micro gradient value, locks the K nodes with the largest micro gradient values, performs local adjustments under the constraint that only these K nodes are allowed to exchange positions within the cluster, and outputs the tourism service scheduling scheme when the termination condition is met. The method of clustering node sequences in the global exploration route scheme into at least one node cluster based on the geospatial location and business attribute tags of tourism service nodes includes: Step 1: Extract the geographic coordinates of tourism service node i. , One-hot encoding of business attribute tags; Step 2: Normalize the geographic coordinate data and one-hot encoded data of all nodes respectively, and optionally weight them by weighting factors to obtain a unified feature vector that can balance the influence of spatial and business attributes. Step 3: Using the sequential clustering method, starting from the first node of the route sequence as the initial cluster, and sequentially traversing the subsequent nodes, if the Euclidean distance between the feature vector of a node and the average feature vector of all existing nodes in the current cluster is less than a preset threshold, then the node is assigned to the current cluster; otherwise, a new cluster is created with that node. The step of calculating a macroscopic gradient value for each node cluster, determined by the impact of removing the node cluster on the total route cost, and using the macroscopic gradient value to reorder or swap the node clusters as a whole, includes: Step 1: For each node cluster k, determine the predecessor node p and successor node s of node cluster k in the path, as well as the starting node within the cluster. and termination node ; Step 2: Define the impact of removing node cluster k on the total route cost as the macroscopic gradient value of node cluster k. And according to the formula The calculation is performed, where InternalCost(k) is the internal path cost of cluster k, and Cost(a,b) is the travel cost from node a to b; Step 3: Put The cluster of one or more nodes with the largest value will be swapped or moved as a whole. The process of using the marginal cost contribution value of each node within the cluster as the micro-gradient value, locking the K nodes with the largest micro-gradient values, and performing local adjustments under the constraint that only these K nodes are allowed to exchange positions within the cluster includes: Step 1: Filter out the macroscopic gradient Clusters of nodes exceeding a preset threshold; Step 2: Within each selected node cluster, calculate the marginal cost MC(i) for each node i in the cluster as the micro gradient value of node i, where... Pred(i) and succ(i) are the preceding and following nodes of node i in the current route, respectively. Step 3: Find the K nodes with the largest micro gradient values within the cluster. While keeping the positions of other nodes in the cluster unchanged, evaluate all K! permutations of the K nodes and update the node order within the cluster using the permutation that minimizes the total route cost.
6. The system according to claim 5, characterized in that, The process of performing a preset number of neighborhood structure perturbations on the initial travel route, and calculating and setting the initial temperature of the simulated annealing algorithm based on the standard deviation of the objective function values of each route scheme after multiple perturbations, includes: Perform M neighborhood operations on the initial travel route to obtain M new route schemes, where M is a positive integer; Using the weighted sum of the total route duration and total cost as the objective function, calculate the standard deviation of the objective function values for the M new route schemes. ; Set initial acceptance probability According to the formula Calculate the initial temperature ,in This is the average increase in the objective function value over M operations, or according to the formula... Calculate the initial temperature .
7. The system according to claim 5, characterized in that, The step of selecting a neighborhood operator from a neighborhood operator library containing node pair swap operators, continuous node block inversion operators, and span three-node swap operators based on a probability distribution negatively correlated with the current temperature value includes: Step 1: Based on the current temperature T and the initial temperature The selection probability of each operator is set, wherein the selection probability of the node pair swap operator increases as the temperature T decreases, while the selection probability of the continuous node block inversion operator and the span three node swap operator decreases as the temperature T decreases. Step 2: Based on the selection probability, select a neighborhood operator by roulette wheel or random sampling.
Citation Information
Patent Citations
Multicolor spraying path planning method and system based on hybrid heuristic algorithm
CN114648162A
Multi-modal travel salesman problem optimization method
CN119168178A