GA optimization-based multi-scale CNN text-travel fusion spatial-temporal feature classification method and system

Through the multi-scale CNN method based on genetic algorithm optimization, the problem of difficulty in extracting tourists' temporal and spatial behavior patterns in the existing technology is solved, and efficient data classification and calculation efficiency of cultural and tourism trajectory are improved, providing a powerful intelligent analysis tool for smart tourism.

CN119939361AInactive Publication Date: 2025-05-06SICHUAN TOURISM UNIV

Patent Information

Application Number
CN202510422403.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-07
Publication Date
2025-05-06
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing technology is difficult to effectively extract the spatio-temporal behavior patterns of tourists in different tourism scenarios. Traditional CNNs have challenges in multi-scale feature learning and complex cultural and tourism data processing, and the computing overhead is relatively large.

Method used

The multi-scale CNN method based on genetic algorithm (GA) optimization is adopted to abstract the CNN network structure into a node network, and the CNN structure and convolution kernel combination strategy are optimized to adapt to the feature extraction requirements of different spatial scales.

Benefits of technology

It improves the classification accuracy and computing efficiency of cultural and tourism trajectory data, can adapt to the learning of complex space-time trajectory patterns, reduces computing overhead, and realizes efficient intelligent analysis tools to provide support for smart tourism decisions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119939361A_ABST
    Figure CN119939361A_ABST
Patent Text Reader

Abstract

The invention belongs to the field of big data processing, and provides a multi-scale CNN text-travel fusion spatial-temporal feature classification method and system based on GA optimization, and the method comprises the steps: carrying out the image processing of text-travel trajectory data, and converting user trajectory data into a two-dimensional image matrix; abstracting the CNN network structure into a nodal network; performing binary coding on the CNN network to generate chromosomes; randomly initializing a population; the individuals with the fitness higher than a preset value are screened for crossover and mutation operation, the crossover operation refers to exchange of node connection codes or convolution kernel combination codes of parent individuals, and the mutation operation refers to random modification of convolution kernel scale codes or increase and decrease of inter-node connection paths; repeating until the fitness converges, and outputting a multi-scale CNN optimal structure; and using the optimized CNN model to classify text and travel fusion features. The method is especially suitable for classification of complex text travel fusion spatial-temporal feature data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of big data processing, and specifically relates to a multi-scale CNN cultural and tourism fusion spatiotemporal feature classification method and system based on GA optimization. Background Art

[0002] With the rise of the concept of smart tourism, a large amount of tourist trajectory data has been collected and applied to tourism planning, tourist behavior analysis, and intelligent recommendation. However, existing tourism data analysis methods mainly rely on traditional statistical models or rule-based classification algorithms, and have the following problems in processing large-scale, multimodal trajectory data: Traditional methods are difficult to effectively extract the spatiotemporal behavior patterns of tourists in different tourism scenarios. Existing models are difficult to mine the temporal dynamic characteristics of tourists' movement trajectories, resulting in limited prediction accuracy. Fixed rule analysis methods are difficult to cope with the complex behavior patterns of different regions and different tourist groups.

[0003] In recent years, deep learning technology has made significant breakthroughs in image processing, natural language processing and other fields. Among them, convolutional neural networks (CNNs) have been widely used in spatial data analysis due to their outstanding performance in image feature extraction. However, traditional CNNs still face the following challenges when applied to cultural and tourism integration trajectory data: spatial data of different granularities (such as city level, scenic area level, and site level) require convolution kernels of different scales for feature extraction, and traditional single-scale CNNs are difficult to adapt to multi-scale feature learning needs. There are differences in the optimal feature extraction modes for different tourism scenarios, and manually designed CNN structures are difficult to adapt to complex cultural and tourism data. Tourism data is huge in scale, and the optimization calculation overhead of using brute force to try CNN structures is extremely high. Summary of the invention

[0004] In order to solve the problems in the prior art, the present invention provides a multi-scale CNN cultural and tourism fusion spatiotemporal feature classification method based on GA optimization, comprising the following steps: Step S1, image processing of cultural and tourism trajectory data, converting user trajectory data into a two-dimensional image matrix, in which the pixel values ​​in the two-dimensional image matrix represent the density of spatiotemporal behavior, and marking cultural and tourism integration feature labels, which include reach, attention, interest, tourist spatiotemporal distribution, corresponding time, travel route, and tourist destination; Step S2, abstracting the CNN network structure into a node-based network, where each node contains a convolution kernel type, a predecessor node, and a successor node; Step S3, performing binary coding on the CNN network to generate chromosomes, wherein the binary coding consists of a structure coding and a node type coding, wherein the structure coding indicates the structure of the CNN network, and the node type coding indicates the specific structure of each node in the CNN network; Step S4, randomly initialize the population, and the individuals in the population represent different multi-scale CNN structures; Step S5, decoding the population individuals into a CNN model, inputting the two-dimensional image matrix for training, and calculating the binary cross entropy loss value; defining the fitness function as the inverse of the cross entropy loss, screening individuals with fitness higher than a preset value for crossover and mutation operations, wherein the crossover operation is to exchange the node connection code or convolution kernel combination code of the parent individual, and the mutation operation is to randomly modify the convolution kernel scale code or increase or decrease the connection path between nodes; Step S6, repeating step 5 until the fitness converges, and outputting the optimal structure of the multi-scale CNN, wherein the optimal structure includes the convolution kernel combination strategy and the node connection topology; Step S7: Use the optimized CNN model to classify the cultural and tourism integration features.

[0005] The present invention also provides a multi-scale CNN culture-tourism integration spatiotemporal feature classification system based on GA optimization, including the following modules: The data processing module is used for the visualization of cultural and tourism trajectory data, converting the user trajectory data into a two-dimensional image matrix, in which the pixel values ​​represent the density of spatiotemporal behavior, and marking the cultural and tourism integration feature labels, which include the degree of reach, attention, interest, spatiotemporal distribution of tourists, corresponding time, travel routes, and travel destinations; The node module is used to abstract the CNN network structure into a node network, where each node contains a convolution kernel type, a predecessor node, and a successor node; An encoding module, used for performing binary encoding on the CNN network to generate chromosomes, wherein the binary encoding consists of a structure encoding and a node type encoding, wherein the structure encoding indicates the structure of the CNN network, and the node type encoding indicates the specific structure of each node in the CNN network; Initialization module, used to randomly initialize the population, where individuals in the population represent different multi-scale CNN structures; A crossover and mutation module is used to decode the population individuals into a CNN model, input the two-dimensional image matrix for training, and calculate the binary cross entropy loss value; define the fitness function as the inverse of the cross entropy loss, and screen individuals with fitness higher than a preset value for crossover and mutation operations, wherein the crossover operation is to exchange the node connection code or convolution kernel combination code of the parent individual, and the mutation operation is to randomly modify the convolution kernel scale code or increase or decrease the connection path between nodes; A loop module is used to repeatedly execute the crossover mutation module until the fitness converges, and output the optimal structure of the multi-scale CNN, wherein the optimal structure includes the convolution kernel combination strategy and the node connection topology; The classification module is used to classify the cultural and tourism integration features using the optimized CNN model.

[0006] The cultural and tourism integration spatiotemporal feature classification method and system provided by the present invention improves the classification accuracy and computational efficiency of cultural and tourism trajectory data by optimizing the CNN structure and convolution kernel combination strategy, and has the following beneficial effects: The multi-scale CNN structure is adopted, combined with various convolution kernel combination strategies such as 3×3, 5×5, Atrous convolution, 1×7, etc., which can adapt to the feature extraction needs of different spatial scales, improve the model's learning ability for complex spatiotemporal trajectory patterns, and ensure that high-precision classification results can be obtained for different types of tourism scenes.

[0007] By optimizing the CNN network topology through genetic algorithms (GA), using binary coding to represent the CNN structure, and using genetic operations such as crossover and mutation, the CNN structure is automatically optimized without relying on manual parameter adjustment, effectively reducing the computational overhead, significantly shortening the search time compared to the traditional brute force search method, and improving the optimization efficiency. At the same time, it ensures that the optimized CNN structure can accurately classify tourist behavior patterns, improve the ability to identify features such as tourist points of interest, spatiotemporal distribution, and scenic spot attractiveness, and provide efficient intelligent analysis tools for applications such as smart scenic spot management, personalized recommendations, and tourist behavior prediction, and enhance smart tourism decision-making capabilities. BRIEF DESCRIPTION OF THE DRAWINGS

[0008] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0009] Figure 1 This is a schematic diagram of the optimal CNN structure searched by GA of the present invention; Figure 2 It is a schematic diagram of CNN structure; Figure 3 is a diagram of an adaptive crossover operation; Figure 4 is a diagram of adaptive mutation operation; Figure 5 It is the decoding diagram of GA-CNN structure. DETAILED DESCRIPTION

[0010] Below, the invention is preferably described in conjunction with the accompanying drawings and specific implementation methods.

[0011] This embodiment solves the above problem through the following steps: In one embodiment, the present invention provides a multi-scale CNN cultural and tourism fusion spatiotemporal feature classification method based on GA optimization, such as Figure 1As shown in the figure, through the exploration process of encoding-learning operation-decoding-training, the convolutional neural network structure is optimized and selected using genetic algorithms, and the feature extraction and classification of cultural and tourism trajectory data are carried out with a multi-scale convolution kernel combination strategy. The method aims to improve the accuracy and generalization ability of spatiotemporal feature classification in the cultural and tourism integration scenario, thereby realizing deep learning and intelligent analysis of tourists' spatiotemporal behavior data, and providing technical support for personalized service recommendations and optimization decisions of tourism resource allocation for tourist destinations.

[0012] Specifically, the method comprises the following steps: Step S1, image processing of cultural and tourism trajectory data, converting user trajectory data into a two-dimensional image matrix, in which the pixel values ​​represent the density of spatiotemporal behavior, and marking cultural and tourism integration feature labels, which include reach, attention, interest, spatiotemporal distribution of tourists, corresponding time, travel routes, and travel destinations.

[0013] First, the acquired user trajectory data is structured and preprocessed. The user trajectory data includes information such as tourist ID, latitude and longitude coordinates, start time, stay time, and tourism service type ID. The data is represented in the form of TrajectoryD(tourist ID, latitude and longitude, start time, stay time, tourism service type ID), where the latitude and longitude coordinates are used to describe the specific location of tourists in the tourism space, the start time and stay time reflect the time distribution behavior of tourists in a specific place, and the tourism service type ID is used to distinguish the different types of tourism services that tourists participate in (such as scenic spot visits, accommodation, catering, etc.).

[0014] Subsequently, the processed trajectory data is mapped into a two-dimensional image matrix, defined as ImageD (image ID, tourist ID, tag information, generation time, image size). In this matrix, each pixel corresponds to a specific location in the tourist space, and its pixel value is used to characterize the spatiotemporal behavior density of tourists at that location, that is, a comprehensive reflection of the frequency of tourists' activities and the length of stay in the spatial area within a specific time window. Specifically, a higher pixel value means that tourists are active frequently or stay longer at that spatial location, and vice versa, it means that the activity density in that area is low.

[0015] Furthermore, the cultural tourism integration feature labels are marked on the generated image matrix to facilitate the feature extraction and classification training of the subsequent convolutional neural network model. The feature labels include the following: Accessibility refers to the convenience of tourists reaching the location from other spatial locations, which can be quantitatively evaluated by factors such as path distance and traffic convenience; Attention, which reflects the degree of attention a specific location receives among tourists, usually measured by indicators such as the frequency of tourists taking photos, the number of check-ins, or the frequency of searches; Interest refers to the intensity of tourists’ interest in a specific spatial area, which can be measured by behavioral data such as length of stay and number of repeat visits; Tourist spatiotemporal distribution, which describes the distribution patterns of tourists in different time and space ranges, is used to capture the dynamic characteristics of tourist flow patterns; Corresponding time, records the specific time information of tourist behavior, which is used to reflect the time characteristics and changing trends of tourist activities; Tourist routes reflect the spatial movement trajectories formed by tourists during the travel process, which is used to analyze tourists' route planning and preferences; Tourist destinations indicate the specific attractions or destinations visited by tourists, providing a reference for subsequent recommendation systems and service optimization.

[0016] By converting trajectory data into a two-dimensional image matrix and marking the cultural and tourism integration feature labels on the matrix, it is helpful to use the powerful feature extraction capabilities of convolutional neural networks (CNN) in the field of image processing to automatically extract deep spatiotemporal feature patterns from multi-dimensional information such as spatial distribution, behavior density, and time series. At the same time, this processing method converts the original numerical data into image form, which is convenient for the subsequent extraction of feature information of different granularities through multi-scale convolution kernels, thereby effectively improving the accuracy of cultural and tourism integration feature classification and the generalization ability of the model, and providing data support for the intelligent recommendation and configuration optimization of cultural and tourism resources.

[0017] Step S2, abstract the CNN network structure into a node-based network, where each node contains a convolution kernel type, a predecessor node, and a successor node.

[0018] In this step, the structure of the convolutional neural network (CNN) is abstracted and represented as a node network, so as to optimize the network topology and convolution kernel configuration through a genetic algorithm (GA). Specifically, each layer of operation in the CNN network is defined as an independent node, and the entire network structure is represented by a directed acyclic graph composed of several nodes in a specific connection method.

[0019] Each node consists of the following three parts: Convolution kernel type: used to define the type of convolution kernel operation applied on this node. The convolution kernel type describes the scale and shape of the convolution operator used to extract local spatial features in the input feature map. Common convolution kernels include: Table 1 Coding Index Convolution kernel type 000 Conv3x3 001 Conv5x5 010 Conv7x7 011 Atrous Conv3x3 100 Atrous Conv5x5 101 Conv3x1 or Conv1x3 110 Conv5x1 or Conv1x5 111 Conv7x1 or Conv1x7 Predecessor Node: It points to the input source node of the current node, that is, the feature outputs from which upstream nodes the node needs to receive to form the input path of the data flow.

[0020] Successor Node: It represents the downstream node that receives the output of the current node, and determines the flow of data in the network, as well as the order and path of feature transmission.

[0021] The node structure can be expressed as: , The node network structure can be expressed as: , in, Represents the total number of nodes in the network, Indicates nodes. The connection between nodes is represented by directed edges, and the connection relationship must meet the following conditions: Sequence number restriction: each node can only connect to nodes with higher sequence numbers than itself to ensure the unidirectionality of data flow and avoid circular dependencies in the network.

[0022] Predecessor restriction: each node can have 0 or more predecessor nodes, and the output of the predecessor node serves as the input of the current node.

[0023] For example: Assume that the network contains 3 nodes, defined as follows: Node1 Predecessor = ∅ (input node, no predecessor node) Successor = {Node2, Node3} (connects to Node2 and Node3) Type = 000 (Conv3x3 convolution kernel) Node2 Predecessor = {Node1} (receives feature input from Node1) Successor = {Node3} (connects to node 3) Type = 001 (Conv5x5 convolution kernel) Node3 Predecessor = {Node1, Node2} (receives feature input from Node1 and Node2) Successor = ∅ (output node, no successor node) Type = 011 (Atrous Conv3x3 dilated convolution kernel) The complete representation of each node is as follows: Node1 = { ∅, {Node2, Node3}, Conv3x3} Node2 = { {Node1}, {Node3}, Conv5x5} Node3 = { {Node1, Node2}, ∅, Atrous Conv3x3} Step S3, binary encoding the CNN network to generate chromosomes, the binary encoding consists of a structure code and a node type code, the structure code indicates the structure of the CNN network, and the node type code indicates the specific structure of each node in the CNN network.

[0024] In this step, binary encoding is performed on the convolutional neural network (CNN) structure to form a chromosome suitable for genetic algorithm optimization. The binary encoding consists of two parts: structure encoding and node type encoding, which are used to fully describe the topological structure and convolution kernel configuration of the CNN network. This encoding strategy provides an efficient solution space exploration basis for the genetic algorithm, which helps to quickly find the optimal feature extraction structure in complex network topology.

[0025] Structural coding is used to describe the connection relationship between nodes in the CNN network. Specifically, structural coding represents the connection status between nodes in the form of binary bits. The coding rules are as follows: For any node and , if there is arrive If there is a directed connection, the corresponding binary bit is set to 1, otherwise it is set to 0; Connection paths allow multiple nodes to connect to the same successor node, thus supporting complex network topologies.

[0026] Connection sequence restrictions,To maintain the directionality of data flow, a node can only connect to nodes with a higher number than itself,,to avoid circular dependencies.

[0027] Node type encoding is used to define the convolution kernel operation type of each node. The convolution kernel type reflects the feature extraction strategy adopted by the node. Different types of convolution kernels can capture the feature information of the input data at different scales.

[0028] Each convolution kernel type is represented by a 3-bit binary code. The specific rules are shown in Table 1. Figure 2 For example: There are 4 nodes in the network, and its structure is encoded as: 1: Node1 → Node2 → The first bit is encoded as 1, indicating that node 1 is connected to node 2; 00: Node2 → Node3, Node2 → Node4 → Both bits are 0, indicating that Node 2 is not connected to Node 3 or Node 4; 111: Node3 → Node4, Node1 → Node4, Node2 → Node4 → All three bits are 1, indicating that Node 3, Node 1, and Node 2 are all connected to Node 4.

[0029] Connection relationship description: Starting from Node1: Connect to Node2 (1) Not connected to Node3 (0) Connect to Node4 (1) Starting from Node2: Not connected to Node3 (0) Connect to Node4 (1) Starting from Node3: Connect to Node4 (1) Therefore, the structure code 1-00-111 represents the following connection relationship: Node1 → Node2 Node1 → Node4 Node2 → Node4 Node3 → Node4 Node type code 010-000-001-110 Node1 → 010 → Convolution kernel type is Conv7x7 Node2 → 000 → Convolution kernel type is Conv3x3 Node3 → 001 → Convolution kernel type is Conv5x5 Node4 → 110 → Convolution kernel type is Conv5x1 or Conv1x5 This encoding method can clearly represent the many-to-many connection relationship between nodes in the network, facilitate the representation of complex CNN network topology, and meet the needs of complex spatiotemporal feature extraction in actual cultural and tourism data. The network topology and convolution kernel type are represented in binary encoding form, which can directly act on the chromosome sequence in the crossover and mutation operations of the genetic algorithm to achieve flexible network structure optimization.

[0030] In the spatiotemporal feature classification task of cultural tourism integration based on convolutional neural network (CNN), independent coding regions are constructed for different spatial regions of tourist trajectory data (such as scenic spots, routes, service areas, etc.). If there are 𝑛 location data coding regions in total, then for the 𝑖th coding region, it contains S nodes.

[0031] For a directed acyclic graph containing S nodes, the first node (numbered 1) can be connected to S-1 nodes (from the second node to the Sth node), so S-1 bits of binary code are required to represent the connection; For the second node (numbered 2), it can be connected to at most S-2 nodes (from the 3rd node to the Sth node), so S-2 bits of binary encoding are required; And so on, until the S-1th node, which is connected to at most 1 node (the Sth node), requiring 1 bit of binary encoding; The Sth node is used as an output node and is no longer connected to other nodes, so no encoding is required.

[0032] The total number of bits is (S-1) + (S-2) + ... + 1 = 0.5 * S * (S-1) bits.

[0033] In the spatiotemporal feature classification task of cultural tourism integration based on convolutional neural network (CNN), independent coding regions are constructed for different spatial regions of tourist trajectory data (such as scenic spots, routes, service areas, etc.). If there are 𝑛 location data coding regions, then for the 𝑖th coding region, it contains nodes.

[0034] Each node uses 3 bits of binary code to represent different convolution kernel types. right nodes, the total number of bits of node type encoding is: , Therefore, the encoding length of the 𝑖th encoding region is: , Sum the code lengths of 𝑛 coding regions, and the total code length 𝐿 is expressed as: , in, represents the total number of coding regions; represents the number of nodes in the 𝑖th coding region; Represents the total binary encoding length of the entire CNN network structure.

[0035] In this encoding method, the search space of the entire CNN network structure is determined by the encoding length 𝐿, and each bit can be 0 or 1, so the total possible number of network structures is: .

[0036] Each bit of binary code represents the connection status of the node or the choice of convolution kernel type; since the code length grows exponentially with the number of nodes and regions, the search space of the entire network structure will become extremely large; when 𝐿 is large, brute force enumeration (exhaustive enumeration of all possible network structures) will lead to exponential computational complexity, which will take too long and consume huge resources in practical applications. It requires huge computing resources for enumeration, and it is difficult to complete the search for the optimal solution within a limited time. For complex networks with many nodes, the amount of computation required to brute force enumerate all possible combinations will exceed the acceptable range, and even with the support of high-performance computing resources, it will still take too long. In the exhaustive process, historical search information cannot be used, resulting in low search efficiency and failure to quickly converge to the optimal or suboptimal solution.

[0037] In order to solve the computational complexity problem caused by brute force enumeration, this project uses genetic algorithm (GA) to search for the optimal CNN network structure.

[0038] Step S4, randomly initialize the population, and the individuals in the population represent different multi-scale CNN structures.

[0039] In this step, a genetic algorithm (GA) is used to optimize the multi-scale convolutional neural network (CNN) structure. First, the population is randomly initialized, where individuals in the population represent different CNN structures, and each individual corresponds to a candidate CNN network topology. The topological structure and convolution kernel type of the network are described by binary coding.

[0040] In genetic algorithms, a population refers to a set of candidate solutions that exist simultaneously, and each candidate solution is a CNN structure. Let the population size be 𝑃, that is, in the current genetic algorithm iteration, there are 𝑃 different CNN structures participating in the optimization in parallel.

[0041] Each individual in the population represents a specific CNN network structure, and its topological connection relationship and convolution kernel type are represented by binary chromosome coding. The specific CNN structure of the individual can be described by structural coding and node type coding.

[0042] In the initial stage of the genetic algorithm, the network structure of the population individuals is randomly generated to ensure the diversity of the search space and avoid the optimization process falling into the local optimum.

[0043] According to the set CNN structure encoding rules, the network connection relationship is randomly generated to ensure that the network is a directed acyclic graph and prevent data circular dependency problems.

[0044] The structure code length is bits (indicates the connection relationship between nodes in the CNN structure). Randomly select the convolution kernel type on each node, such as Conv3x3, Conv5x5, Atrous Conv3x3, etc., and the corresponding encoding length is 𝑆×3 bits.

[0045] Step S5, decoding the population individuals into a CNN model, inputting the two-dimensional image matrix for training, and calculating the binary cross entropy loss value; defining the fitness function as the inverse of the cross entropy loss, screening individuals with fitness higher than a preset value for crossover and mutation operations, wherein the crossover operation is to exchange the node connection code or convolution kernel combination code of the parent individual, and the mutation operation is to randomly modify the convolution kernel scale code or increase or decrease the connection path between nodes.

[0046] In this step, decoding, training, and fitness calculation are performed for the CNN population individuals randomly initialized in step S4, and crossover and mutation operations are performed using a genetic algorithm to optimize the CNN network structure to make it more suitable for the task of spatiotemporal feature classification of cultural and tourism integration.

[0047] Step S51: Individual decoding Input: Binary encoding representation of individuals in the genetic algorithm population (including structure encoding and node type encoding).

[0048] Output: Analyze the topological structure and convolution kernel configuration of CNN and reconstruct the CNN model.

[0049] Decoding process Parse structural coding: extract the predecessor node (Predecessor) and successor node (Successor) of each node.

[0050] Parse node type encoding: convert the convolution kernel type of each node (such as Conv3x3, Atrous Conv5x5, etc.).

[0051] For example: The population individuals (coded) are Structure code: 1-01-011 Node type code: 000-001-011-100 The decoded CNN structure is Node1 → Node2 (Conv3x3) Node1 → Node3 (Conv5x5) Node2 → Node4 (Atrous Conv3x3) Node3 → Node4 (Atrous Conv5x5) Step S52: Training CNN model Input: Decoded CNN network structure, two-dimensional image matrix of cultural and tourism trajectory data.

[0052] Output: Train the CNN model and calculate the cross entropy loss value.

[0053] Training process Set input data: Convert the cultural and tourism trajectory data into an image matrix in the form of H×W×C.

[0054] Set the loss function: use binary cross entropy.

[0055] Perform forward and backward propagation.

[0056] Calculate the binary cross entropy loss value: , For example: Input: Cultural and tourism trajectory data (two-dimensional image matrix 256×256×3) The CNN structure is the same as in the previous step. The loss value is calculated: cross entropy loss is 0.187.

[0057] Step S53: Calculate fitness Input: Cross entropy loss value.

[0058] Output: Fitness score, used to screen excellent individuals.

[0059] Fitness calculation, the fitness function is set to the inverse of the cross entropy loss, that is: , The smaller the loss value, the stronger the CNN classification ability is and the higher the corresponding fitness value is.

[0060] Exemplarily, the fitness values ​​of different individuals are calculated: individual Cross Entropy Loss Fitness value Individual 1 0.187 5.35 Individual 2 0.220 4.54 Instance 3 0.265 3.77 Step S54: Screening of excellent individuals Input: Fitness score.

[0061] Output: Select individuals with higher fitness and enter genetic operations (crossover & mutation).

[0062] The screening strategy adopts roulette selection, and the probability is proportional to the fitness value. The fitness threshold is set, and individuals with fitness values ​​higher than the preset threshold are screened to enter the next round of optimization.

[0063] For example, the fitness threshold is set to 4.5 individual Fitness value Selection Individual 1 5.35 Select Individual 2 4.54 Select Instance 3 3.77 disuse Step 5: Perform the crossover operation Input: Selected individuals with high fitness.

[0064] Output: Generate new individuals (CNN structure).

[0065] Crossover Structural coding crossover: Exchange the node connection coding of parent individuals.

[0066] Node type code crossover: Exchange the convolution kernel type codes of parent individuals.

[0067] For example, Figure 3 As shown: Parent: Individual A: 0011100001100000100000000111 Individual B: 1011100001100100010001100111 Crossover point (randomly select a position to exchange codes) Individual A': 0011100001100000010001100111 Individual B': 1011100001100100010000000111 The new individual inherits part of the structural code and node type code to form a new CNN structure.

[0068] Step 6: Perform mutation operation Input: New individuals after crossover.

[0069] Output: Randomly modify the CNN structure to enhance diversity.

[0070] Variation Structural mutation: Randomly modify the connection paths between nodes.

[0071] Convolution kernel mutation: Randomly adjust the convolution kernel size.

[0072] For example, Figure 4 As shown: Before mutation 0011100001100000010000000111 Mutation point (randomly change a bit) 0011000001100100010010000111 In this example, the convolution kernel of Node4 is changed from Conv7x1 to Conv3x1; The Node3 → Node4 connection is removed.

[0073] In this step, the CNN structure is decoded and the binary gene string is converted into an actual CNN model. The CNN is trained and the loss is calculated to evaluate the classification ability of the CNN structure. The fitness value is calculated and individuals with high fitness are selected to enter the next round of evolution. Crossover and mutation are performed to generate a new CNN structure to improve search efficiency. This step provides the core operation for the genetic algorithm to optimize the CNN network, so that the model can adapt to the task of cultural and tourism spatiotemporal feature classification and improve the accuracy and generalization ability of feature extraction.

[0074] Step S6, repeat step 5 until the fitness converges, and output the optimal structure of the multi-scale CNN, wherein the optimal structure includes the convolution kernel combination strategy and the node connection topology.

[0075] In this step, based on the optimization strategy of genetic algorithm (GA), the individuals in the population described in step S5 are iteratively optimized, and decoding, training, fitness calculation, screening, crossover and mutation operations are continuously performed until the fitness converges, and the optimal multi-scale CNN structure is finally output. The optimal structure includes the convolution kernel combination strategy and the node connection topology to ensure that the generated CNN network can efficiently extract the spatiotemporal characteristics of cultural and tourism trajectory data and achieve the optimal classification performance.

[0076] The detailed implementation process of this step includes: Step S61: Setting convergence conditions Input: Initial CNN population and optimization target.

[0077] Output: Fitness convergence criteria to ensure that the optimization algorithm can terminate efficiently.

[0078] The optimization process of this step continues until any of the following conditions is met: Fitness gain converges: The change in fitness value in consecutive 𝑇 generations is less than the set threshold 𝜀.

[0079] Maximum generation limit: The maximum number of genetic iterations has been reached.

[0080] Step S62: loop iteratively perform genetic optimization Input: population individuals, current fitness values.

[0081] Output: A population of next-generation CNN structures.

[0082] In each iteration, the following process is performed: Individual decoding,converts the binary gene string into a CNN network.

[0083] Model training,calculates binary cross entropy loss based on trajectory data.

[0084] Fitness calculation.

[0085] Select excellent individuals and use roulette wheel selection or ranking selection to select individuals with high fitness.

[0086] Crossover operation exchanges part of the topology or convolution kernel combination of the CNN network.

[0087] Mutation operation randomly modifies the convolution kernel type or connection path.

[0088] Update the population, generate a new generation of CNN network, and enter the next round of optimization.

[0089] Step S63: Determine whether the fitness has converged Input: Current fitness value sequence.

[0090] Output: Determine whether to terminate the optimization.

[0091] Judgment method Suppose the optimal fitness of the current generation 𝑡 is , the fitness of the previous generation is

[0092] Calculate the gain: , like And it continues for 𝑇 generations, then the optimization stops.

[0093] Step S64: Output the optimal CNN structure Input: The final optimized CNN structure.

[0094] Output: The optimal multi-scale CNN structure, including convolution kernel combination strategy and node connection topology.

[0095] Composition of the Optimal CNN Architecture Convolution kernel combination strategy: select convolution kernels of different scales (such as Conv3x3, Conv5x5, AtrousConv3x3) for optimized combination to improve feature extraction capabilities.

[0096] Node connection topology, select the CNN structure with the highest fitness, and output the final topological connection graph.

[0097] For example, Figure 5 As shown, Binary encoding of the optimal CNN structure obtained by optimization Search area code: 1-11-011-1000-000-110-100-001-111 Structure code: 1-11-011-1000 Node type code: 000-110-100-001-111 Decode the obtained code to obtain the decoded CNN structure 1. Structural decoding Decode the CNN connection relationship from the structure code 1-11-011-1000: N1 connects to N2 N1, N2 connect to N3 N2, N3 connect to N4 N1 connects to N5 2. Node type decoding Decode the convolution kernel type from the node type code 000-110-100-001-111: N1: 3×3 conv N2: 5×1 conv, 1×5 conv N3: 5×5 Atrous conv N4: 5×5 conv N5: 7×1 conv, 1×7 conv This step improves the fitness of the CNN structure generation by generation through cyclic genetic optimization, and finally outputs the optimal CNN network, which can be used for the spatiotemporal feature classification of cultural and tourism trajectory data.

[0098] Step S7: Use the optimized CNN model to classify the cultural and tourism integration features.

[0099] This step is based on the optimal multi-scale CNN structure generated in step S6 to perform feature classification on the cultural and tourism trajectory data to extract the spatiotemporal behavior patterns of tourists and perform intelligent analysis. Specifically, this step involves input preprocessing, feature extraction, classification decision, and finally outputs the feature classification results of the tourist area to support intelligent tourism management and personalized recommendations.

[0100] In this step, first, the cultural and tourism trajectory data, which usually contains information such as visitor ID, geographic coordinates, timestamp, duration of stay, and type of service visited, needs to be converted into a standard input format.

[0101] The trajectory data is converted into a two-dimensional matrix, the spatial resolution is set, and the trajectory points are mapped to a fixed-size grid (H×W×C).

[0102] The pixel value represents the density of tourists’ spatiotemporal behaviors at that location, for example: High pixel value = high dwell time and high visit frequency at this location.

[0103] Low pixel value = the location is visited less frequently.

[0104] For example: The original trajectory data is: Visitor ID Latitude and longitude Timestamp Dwell time Access Type 001 (104.1, 30.2) 08:00 15min Attractions 002 (104.2, 30.3) 09:15 10min gourmet food 003 (104.3, 30.1) 10:30 20min stay Convert to CNN input matrix H × W × C (256 × 256 × 3) Among them, C=3, corresponding to density characteristics, time characteristics, and service type characteristics respectively.

[0105] Then perform feature extraction and classification reasoning, input the optimal network structure after CNN training, and output the classification label of cultural and tourism features.

[0106] The CNN processing pipeline includes: Convolutional Layer Use the optimal CNN structure (such as Conv3x3, Atrous Conv5x5) to extract spatiotemporal features.

[0107] Pooling Layer Perform max pooling to reduce data dimensions and retain key features.

[0108] Fully connected layer The category probability is calculated through the Softmax layer and the final classification result is output.

[0109] Exemplarily, the CNN structure optimized based on step S6 is: Input → Conv3x3 → 5×1 Conv → 5×5 Atrous Conv → 7×1 Conv →Output In this structure, Conv3x3 extracts local features (short-term trajectory patterns).

[0110] 5×1 Conv & 1×5 Conv process directional features (east-west, north-south movement patterns).

[0111] Atrous Conv5x5 expands the receptive field and captures global spatiotemporal features.

[0112] 7×1 Conv & 1×7 Conv for long time series pattern analysis.

[0113] Final output (Softmax classification) category Prediction probability Stop at attractions 0.75 Transportation 0.10 stay 0.05 Shopping 0.10 Finally, the spatiotemporal feature classification results of cultural and tourism integration are output and input into the CNN classification results. The corresponding cultural and tourism integration feature labels are output.

[0114] The optimized CNN model can output a variety of cultural and tourism features, including: Tourist accessibility, attention, interest, spatiotemporal distribution patterns, visit frequency, and length of stay.

[0115] For example: Input data (trajectory of tourist A): (Longitude and latitude: 104.1, 30.2) → (Time: 08:00) → (Stay: 15min) CNN classification results: 75% for stops at attractions, 10% for transportation, 5% for accommodation, and 10% for shopping.

[0116] This step uses the optimized CNN model to automatically classify the cultural and tourism trajectory data, extract the behavioral characteristics of tourists, and provide data support for smart tourism recommendations and scenic spot optimization management. In another embodiment, the present invention also provides a multi-scale CNN culture and tourism fusion spatiotemporal feature classification system based on GA optimization, comprising: The data processing module is used for the visualization of cultural and tourism trajectory data, converting the user trajectory data into a two-dimensional image matrix, in which the pixel values ​​represent the density of spatiotemporal behavior, and marking the cultural and tourism integration feature labels, which include the degree of reach, attention, interest, spatiotemporal distribution of tourists, corresponding time, travel routes, and travel destinations; The node module is used to abstract the CNN network structure into a node network, where each node contains a convolution kernel type, a predecessor node, and a successor node; An encoding module, used for performing binary encoding on the CNN network to generate chromosomes, wherein the binary encoding consists of a structure encoding and a node type encoding, wherein the structure encoding indicates the structure of the CNN network, and the node type encoding indicates the specific structure of each node in the CNN network; Initialization module, used to randomly initialize the population, where individuals in the population represent different multi-scale CNN structures; A crossover and mutation module is used to decode the population individuals into a CNN model, input the two-dimensional image matrix for training, and calculate the binary cross entropy loss value; define the fitness function as the inverse of the cross entropy loss, and screen individuals with fitness higher than a preset value for crossover and mutation operations, wherein the crossover operation is to exchange the node connection code or convolution kernel combination code of the parent individual, and the mutation operation is to randomly modify the convolution kernel scale code or increase or decrease the connection path between nodes; A loop module is used to repeatedly execute the crossover mutation module until the fitness converges, and output the optimal structure of the multi-scale CNN, wherein the optimal structure includes the convolution kernel combination strategy and the node connection topology; The classification module is used to classify the cultural and tourism integration features using the optimized CNN model.

[0117] It should be noted that the explanation of the aforementioned GA-optimized multi-scale CNN cultural and tourism fusion spatiotemporal feature classification method embodiment is also applicable to the device of the embodiment of the present application and will not be repeated here.

[0118] Those of ordinary skill in the art will appreciate that the various units and algorithm steps described in the embodiments disclosed herein can be implemented in a combination of electronic hardware, computer software, and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0119] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0120] In several embodiments provided in the present application, if any function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory; hereinafter referred to as: ROM), random access memory (Random Access Memory; hereinafter referred to as: RAM), disk or optical disk, and other media that can store program codes.

[0121] The above is only a specific implementation method of the present application. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in this application, which should be included in the protection scope of this application. The scope of protection of this application shall be based on the protection scope of the claims. For some module structures that are not particularly clear in the present invention, the contents recorded in the prior art shall prevail. The prior art mentioned in the aforementioned background technology section and the specific embodiment section of the present invention can be used as a part of the present invention to understand the meaning of some technical features or parameters.

Claims

1. A multi-scale CNN spatiotemporal feature classification method for cultural and tourism integration based on GA optimization, characterized by: The method comprises the following steps: Step S1, image processing of cultural and tourism trajectory data, converting user trajectory data into a two-dimensional image matrix, in which the pixel values ​​in the two-dimensional image matrix represent the density of spatiotemporal behavior, and marking cultural and tourism integration feature labels, which include reach, attention, interest, tourist spatiotemporal distribution, corresponding time, travel route, and tourist destination; Step S2, abstracting the CNN network structure into a node-based network, where each node contains a convolution kernel type, a predecessor node, and a successor node; Step S3, performing binary coding on the CNN network to generate chromosomes, wherein the binary coding consists of a structure coding and a node type coding, wherein the structure coding indicates the structure of the CNN network, and the node type coding indicates the specific structure of each node in the CNN network; Step S4, randomly initialize the population, and the individuals in the population represent different multi-scale CNN structures; Step S5, decoding the population individuals into a CNN model, inputting the two-dimensional image matrix for training, and calculating the binary cross entropy loss value; defining the fitness function as the inverse of the cross entropy loss, screening individuals with fitness higher than a preset value for crossover and mutation operations, wherein the crossover operation is to exchange the node connection code or convolution kernel combination code of the parent individual, and the mutation operation is to randomly modify the convolution kernel scale code or increase or decrease the connection path between nodes; Step S6, repeating step 5 until the fitness converges, and outputting the optimal structure of the multi-scale CNN, wherein the optimal structure includes the convolution kernel combination strategy and the node connection topology; Step S7: Use the optimized CNN model to classify the cultural and tourism integration features.

2. The multi-scale CNN culture-tourism integration spatiotemporal feature classification method based on GA optimization according to claim 1 is characterized in that: The node-based network structure is composed of a number of nodes connected in a preset manner to form a directed acyclic graph.

3. The multi-scale CNN culture-tourism integration spatiotemporal feature classification method based on GA optimization according to claim 2 is characterized in that: The node network connection relationship must meet the following conditions: Sequence number restriction: each node can only connect to nodes with higher sequence numbers than itself, to ensure the unidirectional nature of data flow and avoid circular dependencies in the network; Predecessor restriction: each node has 0 or more predecessor nodes, and the output of the predecessor node serves as the input of the current node.

4. The multi-scale CNN cultural and tourism integration spatiotemporal feature classification method based on GA optimization according to claim 1 is characterized in that: The binary encoding rules include: For any node and , if there is arrive If there is a directed connection, the corresponding binary bit is set to 1, otherwise it is set to 0.

5. The multi-scale CNN culture-tourism integration spatiotemporal feature classification method based on GA optimization according to claim 1 is characterized in that: The code of each node in the node type code is 3 bits.

6. A multi-scale CNN cultural and tourism fusion spatiotemporal feature classification system based on GA optimization, characterized by: The system includes the following modules: The data processing module is used for the visualization of cultural and tourism trajectory data, converting the user trajectory data into a two-dimensional image matrix, in which the pixel values ​​represent the density of spatiotemporal behavior, and marking the cultural and tourism integration feature labels, which include the degree of reach, attention, interest, spatiotemporal distribution of tourists, corresponding time, travel routes, and travel destinations; The node module is used to abstract the CNN network structure into a node network, where each node contains a convolution kernel type, a predecessor node, and a successor node; An encoding module, used for performing binary encoding on the CNN network to generate chromosomes, wherein the binary encoding consists of a structure encoding and a node type encoding, wherein the structure encoding indicates the structure of the CNN network, and the node type encoding indicates the specific structure of each node in the CNN network; Initialization module, used to randomly initialize the population, where individuals in the population represent different multi-scale CNN structures; A crossover and mutation module is used to decode the population individuals into a CNN model, input the two-dimensional image matrix for training, and calculate the binary cross entropy loss value; define the fitness function as the inverse of the cross entropy loss, and screen individuals with fitness higher than a preset value for crossover and mutation operations, wherein the crossover operation is to exchange the node connection code or convolution kernel combination code of the parent individual, and the mutation operation is to randomly modify the convolution kernel scale code or increase or decrease the connection path between nodes; A loop module is used to repeatedly execute the crossover mutation module until the fitness converges, and output the optimal structure of the multi-scale CNN, wherein the optimal structure includes the convolution kernel combination strategy and the node connection topology; The classification module is used to classify the cultural and tourism integration features using the optimized CNN model.

7. The multi-scale CNN culture-tourism integration spatiotemporal feature classification system based on GA optimization according to claim 6 is characterized in that: The node-based network structure is composed of a number of nodes connected in a preset manner to form a directed acyclic graph.

8. The multi-scale CNN culture-tourism integration spatiotemporal feature classification system based on GA optimization according to claim 7 is characterized in that: The node network connection relationship must meet the following conditions: Sequence number restriction: each node can only connect to nodes with higher sequence numbers than itself, to ensure the unidirectional nature of data flow and avoid circular dependencies in the network; Predecessor restriction: each node has 0 or more predecessor nodes, and the output of the predecessor node serves as the input of the current node.

9. The multi-scale CNN culture-tourism integration spatiotemporal feature classification system based on GA optimization according to claim 8 is characterized in that: The binary encoding rules include: For any node and , if there is arrive If there is a directed connection, the corresponding binary bit is set to 1, otherwise it is set to 0.

10. The multi-scale CNN culture-tourism integration spatiotemporal feature classification system based on GA optimization according to claim 9 is characterized in that: The code of each node in the node type code is 3 bits.

Citation Information

Patent Citations

  • Security early-warning model based on genetic wavelet neural-network

    CN108280510A

  • Image classification method based on structure optimization sparse convolutional neural network and medium

    CN110929798A

  • Fine-grained action detection method of convolutional neural network based on multistage condition influence

    CN111444889A

  • Fundus image retinal vessel segmentation method based on evolutionary neural architecture search

    CN112258486A

  • Method for predicting number of tourists in scenic spot based on convolutional neural network

    CN115759329A

Cited By

  • PSO (Particle Swarm Optimization) optimized Cell multi-scale CNN (Convolutional Neural Network) text-travel fusion interaction and symbiosis feature extraction method

    CN120257221A