A method for predicting rural tourism occupancy rate by fusing multi-dimensional data
By combining an improved language education optimization algorithm with a temporal convolutional network, an adaptive learning-driven agritainment occupancy rate prediction model is constructed, which solves the problems of poor generalization ability and insufficient adaptability of existing methods and achieves higher prediction accuracy and stability.
Patent Information
- Application Number
- CN202511292586.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-11
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2045-09-11
AI Technical Summary
Existing methods for predicting occupancy rates at agritainment venues suffer from poor generalization ability, slow updates, and insufficient adaptability, making it difficult to adapt to dynamic scenarios and changes in the external environment in real time.
By combining an improved language education optimization algorithm with a temporal convolutional network (TCN), an adaptive learning-driven agritainment occupancy rate prediction model is constructed. By integrating multidimensional data and introducing a reverse generation guidance mechanism and a cognitive memory reconstruction collaborative mechanism, the model dynamically adjusts the position of individual learners, optimizes the convolutional kernel and the number of TCN layers, and predicts the occupancy rate.
It improves the accuracy and robustness of agritainment occupancy rate prediction, can dynamically adapt to occupancy behavior patterns in different time periods and regions, reduces prediction bias caused by extreme weather and sudden fluctuations during holidays, and enhances the stability of prediction results and the feasibility of engineering applications.
Smart Images

Figure CN120765071B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the field of data prediction, and particularly relates to a rural tourism occupancy rate prediction method fusing multi-dimensional data. BACKGROUND
[0002] With the rapid development of smart cities and smart rural tourism, the digital level of rural tourism industry is continuously improved, and the operation and management increasingly rely on data-driven intelligent decision-making. Among many operation indicators, rural tourism occupancy rate is one of the core indicators for measuring the operation status and income capacity of rural tourism. Accurate prediction of occupancy rate not only helps to develop reasonable price strategies, optimize room resource allocation, and adjust human resource scheduling, but also supports smart operation modules such as holiday peak response, member management, and energy scheduling.
[0003] The current operation mode of commercial rural tourism and hotels is similar, and the occupancy rate prediction method mainly relies on static rule models, traditional regression models or short-term moving averages. Such methods have insufficient prediction accuracy when facing complex dynamic scenarios and are difficult to adapt to non-stationary changes in data in real time. For example, patent CN117370770B predicts hotel load by combining the Shapelet method with the XGboost model, but the model updating of this method lacks self-adaptability, and the dynamic changes of external environmental factors are not considered, which has significant limitations in multi-scenario adaptability and generalization ability. Secondly, patent CN118396665A predicts rural tourism sales based on a spatiotemporal relationship graph without historical data, but lacks modeling of micro factors such as customer behavior and price elasticity, making it difficult to guide specific operation strategies.
[0004] The original student interaction learning strategy in the language education optimization algorithm has the following problems: first, random selection of opponents lacks structure and guidance; second, difference perturbation lacks direction control and content decoupling mechanism; third, this stage only relies on fitness evaluation update strategy, ignoring the structural cooperation or antagonistic relationship in interaction behavior, making it difficult to reflect deep information flow and cognitive transfer process. SUMMARY
[0005] The present application proposes a rural tourism occupancy rate prediction method fusing multi-dimensional data to solve the problems of poor generalization ability, update lag and insufficient self-adaptability in existing rural tourism occupancy rate prediction methods. This method combines the improved language education optimization algorithm and time series convolution network (TCN) to build a self-adaptive learning driven rural tourism occupancy rate prediction model with dynamic adjustment capability and non-linear modeling capability. The method has the following advantages: it does not explicitly rely on a large number of manual feature selection processes, can dynamically adapt to diversified occupancy behavior patterns in different time periods and regions, and the prediction accuracy and model robustness are superior to existing benchmark models.
[0006] The application provides a rural tourism occupancy rate prediction method fusing multi-dimensional data, and specific steps are as follows:
[0007] S1, collecting historical occupancy rate data, weather information, holiday arrangement, access volume of surrounding tourist attractions and historical average price of rural tourism, and constructing a training set of rural tourism occupancy rate prediction according to input and output sequences;
[0008] The training set is taken as input to train a first occupancy rate prediction model;
[0009] S2, the training introduces an improved language education optimization algorithm to adaptively drive the convolution kernel and the number of TCN layers of the occupancy rate prediction model to update the occupancy rate prediction model, reconstructs the occupancy rate prediction model, and obtains a second occupancy rate prediction model;
[0010] The improved language education optimization algorithm is improved on the basis of the position update strategy of the original language education optimization algorithm;
[0011] The improvement includes: deriving a cognitive target position from the reverse direction of the state of a learning individual relative to the worst state of the current population, constructing a feedback correction factor based on the cognitive target position, dynamically adjusting the acceptance strength of the learning individual to the guide position, and performing asymmetric learning individual position update;
[0012] Secondly, the cognitive evolution trajectory with nonlinear jump and random disturbance characteristics is constructed by fusing the current population distribution, the cognitive deviation historical segment and the cognitive credibility interaction mechanism to update the position of the learning individual;
[0013] S4, occupancy rate prediction is performed according to the second occupancy rate prediction model, in the prediction process, prediction error feedback is introduced, historical prediction residual variance is calculated to dynamically adjust prediction output confidence, confidence fusion is performed on the prediction value and the sliding average, and finally the occupancy rate prediction value of rural tourism is obtained.
[0014] Preferably, the multi-dimensional input feature preprocessing of the historical occupancy rate data, the weather information, the holiday arrangement, the access volume of the surrounding tourist attractions and the historical average price of rural tourism enhances the adaptability and prediction accuracy of the occupancy rate prediction model to complex non-stationary sequences; wherein the preprocessing mode is different for different dimensional data features, including: according to the time sequence, aligning the historical occupancy rate, the weather, the holiday, the attraction passenger flow and the historical average price to one row as a group of data sets on the same day, wherein the holiday is converted into a numerical input by encoding, the working day is marked as 0, and the holiday is marked as 1; the attraction passenger flow is calculated by taking logarithm to suppress extreme values; the occupancy rate and the historical average price are standardized by normalization to eliminate the dimension effect.
[0015] Preferably, the standardized time sequence input sample sequence and the corresponding occupancy rate target value For a complete data set, the input samples are unfolded in time series, and each group of samples includes time series, multi-dimensional input features, and corresponding occupancy rate target values.
[0016] Preferably, the application preferably uses a time series deep prediction network (TCN) with long-term dependence modeling capability as the initial prediction structure. The network takes multi-dimensional input features with a fixed window length as input, extracts time-dependent and high-order interaction features layer by layer, realizes dynamic modeling of different time scales through one-dimensional causal convolution and dilated convolution mechanism, and finally outputs the prediction value corresponding to the time step. During the training process, the initial occupancy rate prediction model receives the input sample sequence of each time window in the training set , and takes the real occupancy rate as the supervision target, minimizes the regression error between the predicted value and the real value, and continuously updates the network parameters through the back propagation algorithm and the optimizer, so that the initial occupancy rate prediction model gradually learns the potential periodicity, seasonality and trend characteristics of the occupancy rate sequence. Wherein, L is the fixed window length, representing the number of historical times input into the prediction model each time, is the occupancy rate target value at the next step ts+1 after the historical features at the known time ts are known.
[0017] Preferably, the farmhouse occupancy rate prediction is divided into farmhouse occupancy rate prediction model training and real value prediction. In the training process, the improved language education optimization algorithm is introduced to adaptively update the convolution kernel and TCN layer number of the occupancy rate prediction model. In the process of optimizing the convolution kernel and TCN layer number of the occupancy rate prediction model by the improved language education optimization algorithm, the target function is constructed through the prediction error feedback to promote the optimization of the convolution kernel and TCN layer number of the occupancy rate prediction model by the improved language education optimization algorithm. The optimization needs to map the improved language education optimization algorithm and the convolution kernel and TCN layer number of the occupancy rate prediction model. Each learning individual position vector {X}_{i}=\left [ {{x}_{i1},{x}_{i2}} \right ] corresponds to the convolution kernel size and TCN layer number in the TCN network. Secondly, in the training process, the RMSE function is used as the target function to guide the network parameter update of the farmhouse occupancy rate prediction model to minimize the difference between the prediction result and the real occupancy rate, and complete the training of the initial occupancy rate prediction model.
[0018] Preferably, the original language education optimization algorithm follows the mode of external excellent individual transferring knowledge to student update, which is essentially a passive absorption learning mechanism; the application designs a reverse generation guiding mechanism from the perspective of cognitive constructivism, and proposes a completely new way of thinking: instead of imitating existing excellent individuals, students actively construct an ideal teacher according to their own state, guide their own growth through internal reasoning, simulation deviation and local cognitive dynamics, and have endogenous learning motivation and self-organizing target construction ability optimization strategy.
[0019] Preferably, the design method of the reverse generation guiding mechanism is:
[0020] S101, obtaining the position of the current learning individual in each dimension And the position of the global worst individual in the corresponding dimension in the population Based on the difference direction of the current learning individual and the global worst individual in the dimension, combined with the guiding intensity factor of the current learning individual, a reverse guiding vector is generated;
[0021] The guiding intensity factor is to obtain the target degree ranking value of the i-th learning individual in the current population And the maximum ranking value is calculated by calculating the individual ranking ratio, according to the individual ranking ratio and the ideal teacher position difference amplitude, and combining the individual and the population average position difference and the positive offset constant;
[0022] On the basis of the reverse guiding vector, a random disturbance term with mean zero and variance of a preset value is introduced to form a guiding position adjustment amount;
[0023] The guiding position adjustment amount is combined with the original position of the current learning individual to construct the ideal teacher position approached by the current learning individual;
[0024] S102, according to the difference direction of the current learning individual and the ideal teacher position approached by it, a proportion coefficient in the interval [0, 1] is generated, which is used as a feedback correction factor;
[0025] In the formula, The feedback correction factor of the j-th dimension of the i-th learning individual is Is the current iteration number;
[0026] S103, according to the corresponding feedback correction factor, adjust the position of the current learning individual in the difference direction; in the adjustment process, combine the feedback correction factor and apply it to the original position of the current learning individual Generate the updated learning individual position Realize the iterative update of nonlinear deviation.
[0027] Preferably, the language education optimization algorithm optimizes the original student interaction learning strategy by randomly selecting learning individuals for difference disturbance and comparing whether the fitness is better than the original solution to decide updating, which is difficult to realize efficient guidance and diversity maintenance in complex nonlinear problems, limiting the global optimization ability and generalization performance of the overall model; the application introduces a memory reconstruction collaborative mechanism under cognitive guidance to improve this stage, reconstructs the potential interaction object position by constructing a dynamic memory fragment set with the learning individual cognitive center as the reference, controls and guides the strength by combining the cognitive reverse collaborative factor, realizes the structure coupling learning update driven by the cognitive difference between learning individuals, and further applies the mechanism to the rural tourism occupancy rate prediction scene, optimizes the TCN network hyperparameter configuration for prediction modeling, so that the model has stronger nonlinear expression ability and multi-scene generalization ability.
[0028] Preferably, the method of the application first calculates the cognitive dynamic center of the learner population, generates a virtual memory fragment sequence of the cognitive deviation direction based on the center, and then fuses the fragment guide weight to reconstruct the interaction object, avoiding the directional missing problem caused by random selection of learning opponents in the original method; at the same time, the cognitive reverse collaborative factor is introduced to depict the relative difference degree between the cognitive states of learning individuals, realize the interaction intensity adjustment with more cognitive rationality, and finally, the update behavior is completed based on the disturbed bidirectional nonlinear jump function, which enhances the structure transition ability and learning adaptability, specifically:
[0029] S201, constructing a current cognitive dynamic center by taking the state position of all learning individuals in the current population as the weight coefficient of the learning individual target degree , the cognitive dynamic center is an adaptive cognitive reference point, which provides a center reference for subsequent memory reconstruction;
[0030] S202, randomly extracting K cognitive fragments from the population, constructing a fictitious memory fragment set guided by cognition by selecting the difference value of the kth historical individual and the cognitive dynamic center, and combining a random disturbance factor ;
[0031] S203, constructing weights for each item in the fragment set and its corresponding target degree , the weights are dynamically adjusted according to a preset exponential decay rule with the number of iterations; the difference vectors of the historical individuals corresponding to each fragment in the fragment set and the cognitive dynamic center are weighted and combined according to the weights, and a random disturbance factor is introduced to increase search diversity;
[0032] vector fusion is performed on the weighted combination result and the cognitive dynamic center to construct the potential interaction object position ;
[0033] S204, define the cognitive synergy factor to dynamically adjust the influence degree of cognitive difference, under the disturbance reference of potential interaction object position and multivariate normal distribution, guide the current learning individual to realize cognitive migration type update through nonlinear jump; the cognitive synergy factor considers the cognitive distribution deviation degree between the learning individual and the learner population, fuses the dynamic nonlinear mapping strategy, introduces the relative difference between the learning individual target degree and the mean value of the global learner population target degree as a criterion factor, and constructs the cognitive synergy factor.
[0034] Preferably, the cognitive synergy factor core lies in introducing the relative difference between the individual learning state and the global cognitive performance as a criterion factor, and constructing a cognitive synergy factor that can adaptively adjust the interaction intensity; the factor not only considers the cognitive distribution deviation degree between the individual and the group, but also fuses the dynamic nonlinear mapping strategy, realizes flexible control and adjustment of cognitive synergy, and further drives the learning individual to complete more collaborative knowledge migration update under the constraints of target orientation and disturbance.
[0035] Preferably, the set of fictitious memory fragments guided by cognition Emphasize non-direct imitation, but structural memory sampling of cognitive benchmark deviation, for the cognitive synergy factor, , it indicates that the learning individual learns well, and the guidance amplitude tends to be maximum; otherwise, the guidance tends to be weak, avoiding misleading excellent learning individuals. This mechanism plays a stabilizing role in collaborative update. Specifically, by constructing a set of fictitious memory fragments with cognition as the benchmark, the difference extraction process of learning individual cognition on historical experience is simulated, avoiding simple imitation of fixed patterns, so that the rural tourism occupancy rate prediction model can form "directional deviation" structural memory from historical occupancy behavior, thereby having stronger pre-response ability to possible future abnormal trends. This asymmetric cognitive disturbance mechanism enables the model to actively identify potential change paths when dealing with scenarios such as holiday occupancy surge or off-season drop, and to construct rural tourism occupancy rate prediction inputs with memory shift characteristics. The introduction of the cognitive synergy factor constructed based on the difference between individual fitness and group mean value realizes dynamic adjustment of the update guidance intensity: for the learning subject with better performance, increase its influence on behavior migration direction; for the subject with large fluctuations or high prediction error, weaken its guiding role to prevent the spread of false cognition, thereby improving the stability and robustness of the overall prediction process.
[0036] Preferably, an improved language education optimization algorithm is introduced to adaptively drive the convolution kernel and the number of TCN layers of the occupancy rate prediction model, and the specific method is:
[0037] S301, initialize the maximum number of iterations T of the improved language education optimization algorithm, the total size of the population N, the upper bound UB and the lower bound LB of the solution, and construct the initial position of the N learning individuals;
[0038] S302, determine whether the current iteration number is equal to the maximum iteration number, if yes, output the learning individual position corresponding to the minimum target degree value, and analyze the convolution kernel size and the TCN layer number of the occupancy rate prediction model, otherwise execute S303;
[0039] S303, calculate the target degree value of each learning individual position, and record the learning individual position corresponding to the maximum target degree as the worst learning individual position in the current population ;
[0040] S304, use the reverse generation guide mechanism to adjust the variable level according to the direction of the ideal teacher generated in reverse, and update the learning individual position through nonlinear offset;
[0041] S305, introduce the memory reconstruction collaborative mechanism under the guidance of cognition, realize the structural coupling learning update driven by the cognitive difference between learning individuals, and update the learning individual position;
[0042] S306, generate disturbance near the current solution to simulate the self-learning process of the learning individual, and update the learning individual position;
[0043] S307, the current iteration number is added one by one, and the updated agent individual position is returned to execute S302.
[0044] Preferably, in the prediction process, the reliability of the current prediction is dynamically judged through the fluctuation degree of the historical error, and is used to adjust the occupancy rate prediction value; including: in the initial occupancy rate prediction model, the historical prediction error sequence is extracted in the sliding time window, the variance of the prediction error sequence is taken as the basis, the form of is used to realize the measurement of the reliability degree of the prediction output, and a dynamic confidence factor is constructed, and the current prediction value and the sliding real value mean in the corresponding time window are weighted and fused according to the confidence factor, so as to generate the final prediction result after introducing dynamic correction; wherein, is the variance of the farmhouse occupancy rate prediction error sequence.
[0045] Compared with the prior art, the beneficial effects of the present application are that the farmhouse occupancy rate prediction method combining multi-dimensional data proposed in the present application breaks through the problems of low prediction accuracy and insufficient self-adaptability of the existing method by combining the improved language education optimization algorithm with the time sequence convolution network;
[0046] The method fully integrates historical occupancy rate, weather, holidays, scenic spot passenger flow and historical average price and the like multi-dimensional factors in modeling, eliminates the influence of different characteristics of dimension, and guarantees data integrity through resampling and missing value repair mechanism;
[0047] In the prediction structure optimization process, the improved language education optimization algorithm introduces a reverse generation guide mechanism and a cognitive memory reconstruction mechanism, which not only improves the global search ability of the hyperparameter optimization, but also enhances the nonlinear modeling ability and multi-scene generalization of the prediction model; and in the prediction link, a dynamic confidence factor is constructed by combining the historical residual variance to perform confidence fusion on the predicted value, which significantly reduces the prediction deviation in the scene of extreme weather, holiday sudden fluctuation and the like, so that the prediction result is more stable, robust and has engineering application feasibility. BRIEF DESCRIPTION OF DRAWINGS
[0048] Figure 1 is a flow chart of the farm tourism occupancy rate prediction of the present application fusing multi-dimensional data;
[0049] Figure 2 is a flow chart of the convolution kernel and the TCN layer number of the updated occupancy rate prediction model of the present application;
[0050] Figure 3 is a target degree value result chart of the convolution kernel and the TCN layer number of the updated occupancy rate prediction model;
[0051] Figure 4 is a trend curve of the convolution kernel value optimization of the existing method and the method of the present application with the change of the generation number;
[0052] Figure 5 is a trend curve of the TCN layer number optimization of the existing method and the method of the present application with the change of the generation number;
[0053] Figure 6 is a training result chart of the occupancy rate prediction model;
[0054] Figure 7 is a farm tourism occupancy rate prediction effect chart based on adaptive learning driving. DETAILED DESCRIPTION
[0055] To verify the effectiveness of the adaptive learning driven farm stay occupancy rate prediction method proposed in the application, a comparative experiment is constructed, and the prediction accuracy of the method of the application and an existing prediction model, i.e., a farm stay occupancy rate prediction model constructed by combining a standard language education optimization algorithm and a time sequence convolution network (TCN), is analyzed. The technical solutions in the embodiments of the application will be clearly and completely described in combination with the drawings in the embodiments of the application. Obviously, the described embodiments are only part of the embodiments of the application, not all the embodiments. Based on the embodiments in the application, all other embodiments obtained by those of ordinary skill in the art without creative labor fall within the scope of protection of the application.
[0056] Reference Figure 1 The embodiments of the application provide a farm stay occupancy rate prediction method fusing multi-dimensional data. The specific implementation steps of the application include Figure 1 S1 to S4 in MATLAB, a farm stay occupancy rate prediction model of the method of the application is constructed, and a prediction result is output.
[0057] S1, historical occupancy rate data, weather information, holiday arrangement, scenic spot passenger flow, and historical average price of a farm stay are collected, and a training set for farm stay occupancy rate prediction is constructed according to input and output sequences;
[0058] The training set is taken as input to train the first occupancy rate prediction model.
[0059] In this embodiment, 100 groups of training sets are collected, the data range of the training set is in the past 3 months, and daily occupancy rate records in the past 3 months are exported from a farm stay front desk management system as historical occupancy rate data; weather information of the corresponding date is obtained by interfacing an open interface of a local meteorological bureau; the number of holiday days in the past 3 months is counted; the number of scenic spot visits on the corresponding date is obtained by visiting a ticket office of a surrounding tourist attraction; and historical daily average prices of the farm stay are collected.
[0060] Further, in the implementation process, according to a time sequence, the historical occupancy rate, weather, holiday, scenic spot passenger flow, and historical average price are aligned to one row on the same day as a group of data sets, wherein the holiday is converted into a numerical input by an encoding method, a working day is marked as 0, and a holiday is marked as 1; the scenic spot passenger flow is calculated by taking logarithm to suppress extreme values; the occupancy rate and the historical average price are standardized by using normalization to eliminate the influence of dimension;
[0061] First, 100 groups of data are collected, corresponding to 3 months of historical data, containing multi-source input features of historical occupancy rate data of rural tourism, various data are read from CSV through self-defined scripts in MATLAB and time alignment is performed, and unified synchronization is performed as a single time sequence sample matrix with date as the primary key; after completing the original feature collection and alignment, the multi-dimensional features of each time step t are merged to build an input vector, and the output corresponding to each input vector is the occupancy rate target value; the sorted data is written in.xlsx file format.
[0062] In this embodiment, for the inconsistent behavior frequency problem existing in the data source, such as hourly price update and daily weather update, a resampling mechanism is used for unified time alignment processing, taking each day as the unified time reference, the house price data is aggregated into single-day price features through moving average, and the influence of holidays and regional events is converted into numerical input through target encoding method, which is mapped according to the average response of the target variable (occupancy rate), and all continuous variables such as occupancy rate and price are uniformly normalized by Min-Max method to linearly map them to the interval [0,1], so as to eliminate the influence of the dimension of different features.
[0063] In this embodiment, for the missing values and outliers that may exist in data collection, an adaptive error threshold rejection mechanism is used for repair, a dynamic error boundary is constructed by the mean and variance in the history window, and values with large deviation are automatically identified for interpolation or median replacement.
[0064] S2, the training, introducing the improved language education optimization algorithm to adaptively drive the update of the occupancy rate prediction model, reconstructing the occupancy rate prediction model, and obtaining a second occupancy rate prediction model.
[0065] In this embodiment, after completing the standardization data sample arrangement and.xlsx file saving, the sample sequence is divided into training set and test set in the MATLAB environment, and an initial time series deep prediction network model (TCN) is constructed for rural tourism occupancy rate prediction, the.xlsx file saved in step S1 is read through the readtable function, the specific implementation code is: data = readtable(rural tourism occupancy rate prediction data set.xlsx'); and the standardized samples therein are constructed in time sequence through sliding window to form input-output pairs.
[0066] In the embodiment, an initial occupancy rate prediction model based on a time series deep prediction network is constructed, including an input layer, a TCN layer, a nonlinear activation layer and an output layer, a regression layer; wherein the TCN layer is generated by self-definition, specifically, a multi-layer time series convolution network structure containing causal convolution, normalization, activation and residual connection is generated based on preset layer parameters and convolution kernel parameters; the nonlinear activation layer adopts a ReLU activation function, and the regression layer is used for loss calculation of the task, and the error between the occupancy rate prediction value and the true value is minimized through an objective function;
[0067] Further, in the implementation process, MATLAB uses sequenceInputLayer to construct causal TCN, cooperates with reluLayer and regressionLayer to form a prediction structure, in MATLAB, uses a training set to train the initial occupancy rate prediction model using trainNetwork, wherein Best_K(2) is the value of the second dimension of the position of the agent individual , that is, the mapped TCN layer number ; Best_K(1) is the value of the first dimension of the position of the agent individual , that is, the mapped convolution kernel The specific implementation code for constructing causal TCN is as follows:
[0068] layers = [
[0069] sequenceInputLayer(f_, 'Name', 'input') % input layer;
[0070] % Core TCN layer (optimized TCN layer number)
[0071] buildTCN_Layers(round(Best_K(1)), round(Best_K(2))) % self-defined function to generate TCN layer group;
[0072] reluLayer('Name','relu_final') % nonlinear activation layer
[0073] fullyConnectedLayer(outdim, 'Name', 'fc') % output layer;
[0074] regressionLayer('Name','regressionoutput') % regression layer;
[0075] ].
[0076] S3. The improved language education optimization algorithm is an improvement on the position update strategy of the original language education optimization algorithm. The improvement includes: constructing a guided enhancement position update method based on a reverse cognitive guidance mechanism, which derives the cognitive target position from the reverse direction of the learner's state relative to the worst state of the current population, and constructs a feedback correction factor based on the cognitive target position to dynamically adjust the learner's acceptance intensity of the guided position for asymmetric position update; constructing an individual dynamic cognitive update method driven by the cognitive transfer center, which constructs a cognitive evolution trajectory with nonlinear jump and random perturbation characteristics to update the learner's position by integrating the current population distribution, cognitive offset historical fragments and cognitive credibility interaction mechanism.
[0077] During training, an improved language education optimization algorithm is introduced to adaptively drive the updating of the convolutional kernel and TCN layer number of the occupancy rate prediction model, and the occupancy rate prediction model is reconstructed using the optimal convolutional kernel and TCN layer number.
[0078] In this embodiment, MATLAB uses the `trainingOptions` function to set the initial occupancy rate prediction model parameters, including the number of convolutional kernels and TCN layers, the number of training iterations, the gradient threshold, and the regularization parameters. The convolutional kernel value and the number of TCN layers are determined by the value of the first dimension of the agent's position. and the value of the second dimension Instead, the remaining specific settings, during the training process, the initial occupancy rate prediction model receives the input sample sequence for each time window in the training set. and based on actual occupancy rate To supervise the objective and minimize the regression error between predicted and true values, the network parameters are continuously updated using the backpropagation algorithm and the Adam optimizer. The specific implementation code is as follows:
[0079] options = trainingOptions('adam', ... % Optimize Adam)
[0080] 'MaxEpochs', 1000 ... % Maximum number of training iterations
[0081] 'ExecutionEnvironment','cpu',...
[0082] 'GradientThreshold', 1, ... % Gradient threshold
[0083] 'ConvFilters', Best_K(1), ... % Adaptive convolution kernel, Best_K(1) is the value of the first dimension of the surrogate individual position, which is the value of the convolution kernel after mapping;
[0084] 'ConvFiltersSchedule', 'piecewise',... % Convolution kernel adjustment
[0085] 'ConvFiltersDropPeriod', round(Best_K(1)*0.9),... % Start adjusting convolution kernel after 850 training
[0086] 'LearnRateDropFactor',0.2,... % Learning rate adjustment factor
[0087] 'L2Regularization',0.1,... % Regularization parameter
[0088] 'ExecutionEnvironment', 'cpu',... % Training environment
[0089] 'Verbose', 0,... % Turn off optimization process
[0090] 'Plots', 'training-progress')).
[0091] In step S3, the improved language education optimization algorithm is mapped to the convolution kernel and the number of TCN layers of the occupancy rate prediction model, and each learning individual position vector {X}_{i}=\left [ {{x}_{i1},{x}_{i2}} \right ] in the improved language education optimization algorithm is mapped to the convolution kernel size and the number of TCN layers in the TCN network. Secondly, in the training process, the RMSE function is used as the target degree function to guide the network parameter update of the rural tourism occupancy rate prediction model, so as to minimize the difference between the prediction result and the true occupancy rate, and complete the training of the initial occupancy rate prediction model. The target degree function is The mathematical model is implemented as follows:
[0092] .
[0093] More specifically, a reverse generation guide mechanism is designed, and the mathematical model is implemented as follows:
[0094] S101, obtaining the position of the current learning individual in each dimension and the position of the global worst individual in the corresponding dimension in the population , based on the difference direction of the current learning individual and the global worst individual in the dimension, combining the guide intensity factor of the current learning individual, generating a reverse guide vector;
[0095] The guiding intensity factor is a target degree ranking value of the ith learning individual in the current population The individual ranking proportion is calculated according to the proportion of the maximum ranking value, the difference amplitude between the individual ranking proportion and the ideal teacher position, the average position difference between the individual and the population, and the positive offset constant;
[0096] In this embodiment, the mathematical model for constructing the guiding intensity factor is:
[0097] ;
[0098] Among them, The guiding intensity parameter of the ith learning individual in the jth dimension is 0.1, and the value range is limited to 0 to 2, and the maximum is 2 if it exceeds; The updated position of the ith learning individual in the jth dimension is The average position of the current population in the jth dimension is It is a positive decimal number, which is set below 1 during implementation, and is set to 0.01, The position of the ideal teacher in the jth dimension is
[0099] A random disturbance term with a mean of zero and a preset variance is introduced on the basis of the reverse guiding vector to form a guiding position adjustment amount;
[0100] The guiding position adjustment amount is combined with the original position of the current learning individual to construct the ideal teacher position to which the current learning individual approaches;
[0101] In this embodiment, the mathematical model for constructing the ideal teacher position to which the current learning individual approaches is:
[0102] ;
[0103] In the formula, The cognitive target position of the jth dimension of the ith learning individual at the current time, i.e. the ideal teacher position, should approach; The position of the jth dimension of the current ith learning individual is The guiding intensity factor of the ith learning individual is The position of the jth dimension of the worst learning individual in the current population is It is a uniformly distributed random number with a mean of 0 and a variance of 2 ;
[0104] S102, according to the difference direction between the current learning individual and the ideal teacher position to which it approaches, a proportion coefficient in the interval [0, 1] is generated, which is used as a feedback correction factor;
[0105] In this embodiment, the mathematical model for constructing the feedback correction factor is as follows:
[0106] ;
[0107] In the formula, Let be the feedback correction factor for the j-th dimension of the i-th learning individual. This represents the current iteration number;
[0108] S103. Adjust the position of the current learning individual in the direction of difference according to the corresponding feedback correction factor; during the adjustment process, the feedback correction factor is combined and applied to the original position of the current learning individual. Generate updated learning individual locations This enables iterative updates of the nonlinear offset; in this embodiment, the mathematical model is:
[0109] ;
[0110] In the formula, This represents the updated value of the j-th dimension for the i-th learning individual. This represents the position of the j-th dimension of the current i-th learning individual.
[0111] In this embodiment, a cognitively guided memory reconstruction collaborative mechanism is designed, and the specific mathematical model for its implementation is as follows:
[0112] S201. Construct the current cognitive dynamic center by using the state positions of all learning individuals in the current population and the goal-orientation of each learning individual as a weighting coefficient. The cognitive dynamic center is an adaptively aggregated cognitive reference point that provides a central benchmark for subsequent memory reconstruction. The specific mathematical model for its implementation is as follows:
[0113] ;
[0114] In the formula, The total population size This represents the position of the current i-th learning individual. Let be the target degree value of the current i-th learning individual; where, The better the cognitive performance of a learner, and the closer they are to their ideal goal, the greater their weight.
[0115] S202. Randomly select K cognitive fragments from the population, and select the kth historical individual. The difference between the value and the cognitive dynamic center, combined with random perturbation factors, is used to construct a cognitively guided set of fictional memory fragments. The specific mathematical model for implementation is as follows:
[0116] ;
[0117] wherein, is a random historical individual from the population, is a random perturbation factor uniformly distributed for generating memory fragments of different scales, taking values ; wherein 5 cognitive fragments are selected in the implementation process, and K = 5 is set;
[0118] S203, by constructing the weight of each item in the fragment set and its corresponding target degree , the weight is dynamically adjusted according to the preset exponential decay rule with the number of iterations; the difference vector between each fragment in the fragment set and the cognitive dynamic center is weighted and combined according to the weight, and a random perturbation factor is introduced to increase the search diversity;
[0119] The weighted combination result and the cognitive dynamic center are vector fused to construct the potential interactive object position , and the specific mathematical model is:
[0120] ;
[0121] wherein, , which is used to strengthen the contribution of fragments with better fitness, thereby improving the credibility and directionality of the constructed target; this interaction point does not belong to the actual existing learning individual, but is an ideal jumping direction under the cognitive difference of the learning individual;
[0122] S204, define the cognitive synergy factor to dynamically adjust the influence degree of cognitive difference; under the potential interactive object position and the multivariate normal distribution perturbation reference, guide the current learning individual to realize cognitive migration type update through nonlinear jump; the cognitive synergy factor considers the cognitive distribution deviation degree between the learning individual and the learner population, fuses the dynamic nonlinear mapping strategy, introduces the relative difference between the learning individual target degree and the global learner population target degree mean as a criterion factor, and constructs the cognitive synergy factor; The specific mathematical model of the cognitive migration type individual position update is:
[0123] ;
[0124] wherein, is the updated position of the i-th learning individual, and u(0, I) is a multivariate normal distribution with mean 0 and covariance unit matrix, wherein I is a D x D unit matrix, and D is the problem dimension.
[0125] In this embodiment, the improved language education optimization algorithm is introduced to adaptively drive the update of the occupancy rate prediction model of the convolution kernel and the number of TCN layers, and the process is as followsFigure 2 As shown, the specific method is as follows:
[0126] S301. Initialize the maximum number of iterations T and the total population size N of the improved language education optimization algorithm, the upper bound UB and the lower bound LB of the solution, and construct the initial positions of N learning individuals.
[0127] S302. Determine if the current iteration number is equal to the maximum iteration number. If so, output the position of the learning individual corresponding to the minimum target degree value, which is parsed as the convolution kernel size and TCN layer number of the occupancy rate prediction model. Otherwise, execute S303.
[0128] S303. Calculate the target degree value for each learning individual's position, and record the learning individual position corresponding to the maximum target degree value as the worst learning individual position in the current population. ;
[0129] S304. Using a reverse generation guidance mechanism, the variable level is adjusted according to the direction of the ideal teacher generated in reverse, and the position of the learning individual is updated by non-linear offset.
[0130] S305. Introduce a cognitively guided memory reconstruction collaborative mechanism to achieve structural coupling learning updates driven by cognitive differences among learning individuals, and update the position of learning individuals.
[0131] S306. Generate perturbations near the current solution to simulate the self-learning process of the learning individual and update the position of the learning individual;
[0132] S307: The current iteration count is incremented by one, then return to execute S302 to loop and update the agent individual position.
[0133] S4. Based on the second occupancy rate prediction model, occupancy rate is predicted. During the prediction process, prediction error feedback is introduced, the historical prediction residual variance is calculated, the prediction output confidence is dynamically adjusted, and the prediction value is combined with the moving average for confidence fusion to obtain the final farmhouse occupancy rate prediction value.
[0134] In this embodiment, a reconstructed agritainment occupancy rate prediction model is used with the optimal convolutional kernel size and TCN layer number. The test set is input into the optimized occupancy rate prediction model for occupancy rate prediction. In step S4, within the initial occupancy rate prediction model, historical prediction error sequences are extracted within a sliding time window. Based on the variance of the prediction error sequences, a... This method measures the reliability of the predicted output and constructs a dynamic confidence factor. The current predicted value and the mean of the sliding true values within the corresponding time window are weighted and fused according to the confidence factor to generate the final prediction result after dynamic correction.
[0135] In the implementation process, the sliding time window is set to 30, and the final prediction result output mathematical model is: ;
[0136] wherein, is the final prediction value of the farmhouse occupancy rate prediction model output, is the prediction value of the farmhouse occupancy rate prediction model output, is the sliding average true value, specifically: , is the variance of the farmhouse occupancy rate prediction error sequence.
[0137] Further, the historical prediction error feedback in the sliding time window is specifically: let the prediction value of the farmhouse occupancy rate at the ts moment be , the true value of the farmhouse occupancy rate at the ts moment be , then the error sequence composed of the error values of the last k moments is: wherein, is the occupancy rate prediction error at the i-th time step;
[0138] Then, the variance of the prediction error of the past k moments reflects the prediction fluctuation degree of the occupancy rate, and the residual variance implementation model of the farmhouse occupancy rate prediction value is: , is the average occupancy rate prediction error in the current sliding window.
[0139] In this embodiment, a comparative experiment is constructed, and the method of the present application is compared with the existing method, wherein the existing method is to optimize the convolution kernel and the number of layers of the time sequence convolution network (TCN) by using the standard language education optimization algorithm, to construct a farmhouse occupancy rate prediction model of LEO-TCN, to run the Main function of the MATLAB project, to refer to Figure 3 , and output the target value result graph of the convolution kernel and the number of layers of the adaptive driving update occupancy rate prediction model; and to refer to Figure 4 and Figure 5 , the trend curves of the present application method and the existing method change with the generation number.
[0140] The final running result is shown in Figure 3 , which shows the change trend of the optimization target value of the two methods under different iteration numbers. As can be seen from the figure, the present application method realizes significant decline in the first 10 rounds, rapidly approaches the optimal structure region, compared with the smooth convergence of the existing method, the present method continuously optimizes in 30 times, and finally reduces the target error value to about 0.0358, which is significantly improved compared with the existing method; the present method has faster convergence speed and lower prediction error, and shows the stability of structure optimization in multiple independent experiments.
[0141] To further verify the interpretability and stability of the method of the present invention in the process of optimizing the structure of convolutional temporal prediction models, the dynamic evolution of key structural parameters during the optimization process was tracked and recorded, and compared with the traditional fixed structure method. Figure 4 and Figure 5 The trend curves of the convolution kernel value and the number of TCN layers in the model structure as algebraic change during the iteration process are shown respectively; Figure 4 The paper further demonstrates the adaptive adjustment trajectory of the convolution kernel. Existing methods struggle to automatically respond to error fluctuations during training after initial setup, exhibiting only a slight decrease in the convolution kernel size. In contrast, the method of this invention achieves large-scale iterative convergence in the early stages by rapidly reducing the convolution kernel size, and in the mid-to-late stages, it maintains a stable value of 1.9 × 10⁻³ within an approximately constant range through a high-dimensional error feedback mechanism. This achieves a balance between prediction accuracy and convergence speed under complex multi-factor perturbations.
[0142] Reference Figure 5 As shown, existing methods maintain the number of layers in the range of 4 to 6 throughout the optimization process, resulting in a rigid structure and a lack of flexible adjustment capabilities. In contrast, the method of this invention rapidly expands the number of layers from the initial 3 layers to 11 layers in the early stage of optimization, and then dynamically jumps to 13 layers according to the error gradient. Finally, it stably maintains the optimal structure in multiple consecutive iterations, demonstrating good local refinement capabilities and global search scalability.
[0143] Reference Figure 6 As shown, the training effect of the method of this invention on the prediction model of farmhouse occupancy rate is evident. The predicted values closely match the actual values at most time points, especially in several high-frequency fluctuation ranges, significantly outperforming existing methods. This indicates that it exhibits smaller deviations in both peak and trough regions, demonstrating superior global prediction capabilities. The effectiveness of predicting the occupancy rate of a farmhouse for the next 45 days was verified by using a set of input data for each day, and the prediction results are referenced... Figure 7 .
Claims
1. A method for predicting occupancy rates of agritainment businesses by integrating multidimensional data, characterized in that, The method is applied to predict the occupancy rate of agritainment businesses, including: Collect historical occupancy rate data, weather information, holiday schedules, visitor numbers of surrounding tourist attractions, and historical average prices for agritainment businesses. Construct a training set for predicting agritainment business occupancy rates based on the input and output sequences. The training set is used as input to train the first occupancy rate prediction model; The training process involves introducing an improved language education optimization algorithm to adaptively drive the updating of the convolutional kernels and TCN layers of the occupancy rate prediction model, reconstructing the occupancy rate prediction model, and obtaining a second occupancy rate prediction model. The improved language education optimization algorithm is an improvement on the position update strategy of the original language education optimization algorithm. Based on the original language education optimization algorithm, the position update strategy of its global search and local development stages is improved by using a reverse generation guidance mechanism and a memory reconstruction collaborative mechanism under cognitive guidance. The improvement includes: deriving the cognitive target position from the reverse direction of the learning individual's state relative to the worst state of the current population, constructing a feedback correction factor based on the cognitive target position, dynamically adjusting the learning individual's acceptance of the guided position, and performing asymmetric learning individual position updates. The design method for the reverse generation guidance mechanism is as follows: S101. Obtain the current learning individual's position in each dimension. And the position of the worst individual in the population in the corresponding dimension. Based on the difference direction between the current learning individual and the worst individual in the global dimension, and combined with the guidance strength factor of the current learning individual, a reverse guidance vector is generated. The guidance strength factor is used to obtain the target degree ranking value of the i-th learning individual in the current population. The individual ranking ratio is calculated based on the ratio of the individual ranking ratio to the maximum ranking value, the difference between the individual ranking ratio and the ideal teacher position, and the difference between the individual and the population average position and the positive offset constant. A random perturbation term with zero mean and a preset variance is introduced based on the reverse guidance vector to form the guidance position adjustment amount; The guided position adjustment amount is combined with the current learning individual's original position to construct the ideal teacher position that the current learning individual approaches; S102. Based on the difference direction between the current learning individual and the ideal teacher position that it approaches, a proportional coefficient in the interval [0,1] is generated, and the proportional coefficient is used as a feedback correction factor. S103. Adjust the position of the current learning individual in the direction of difference according to the corresponding feedback correction factor; during the adjustment process, the feedback correction factor is combined and applied to the original position of the current learning individual. Generate updated learning individual locations This enables iterative updates of nonlinear offsets; The cognitively guided memory reconstruction collaborative mechanism includes: S201. Construct the current cognitive dynamic center by using the state positions of all learning individuals in the current population and the goal-orientation of each learning individual as a weighting coefficient. The cognitive dynamic center is an adaptively aggregated cognitive reference point that provides a central benchmark for subsequent memory reconstruction; S202. Randomly select K cognitive fragments from the population, and select the kth historical individual. The difference between the value and the cognitive dynamic center, combined with random perturbation factors, is used to construct a cognitively guided set of fictional memory fragments. ; S203, through the fragment set Each item and its corresponding target degree Construct weights The weights are dynamically adjusted with the number of iterations according to a preset exponential decay rule; the historical individuals corresponding to each fragment in the fragment set are... The difference vectors from the cognitive dynamic center are weighted and combined according to the weights, and a random perturbation factor is introduced. To increase search diversity; The weighted combination result is then fused with the cognitive dynamic center to construct the location of potential interactive objects. ; S204. Define a cognitive synergy factor to dynamically adjust the degree of influence of cognitive differences. Under the reference of potential interaction object positions and multivariate normal distribution perturbation, guide the current learning individual to achieve cognitive transfer-style update through nonlinear jumps. The cognitive synergy factor considers the degree of cognitive distribution deviation between the learning individual and the learner population, integrates a dynamic nonlinear mapping strategy, and introduces the relative difference between the learning individual's goal degree and the mean of the global learner population's goal degree as a criterion factor to construct the cognitive synergy factor. Secondly, by integrating the current population distribution, historical fragments of cognitive shift, and the cognitive credibility interaction mechanism, a cognitive evolution trajectory with nonlinear jump and random perturbation characteristics is constructed to update the position of the learning individual. The occupancy rate is predicted based on the second occupancy rate prediction model. During the prediction process, prediction error feedback is introduced, the historical prediction residual variance is calculated to dynamically adjust the prediction output confidence level, and the prediction value is combined with the moving average for confidence fusion to obtain the final farmhouse occupancy rate prediction value.
2. The method for predicting occupancy rates of agritainment businesses by integrating multidimensional data as described in claim 1, characterized in that, The training includes: optimizing the convolutional kernel and TCN layer number of the occupancy rate prediction model using an improved language education optimization algorithm; constructing a target degree function through prediction error feedback to drive the improved language education optimization algorithm to optimize the convolutional kernel and TCN layer number of the occupancy rate prediction model; optimization requires mapping the improved language education optimization algorithm to the convolutional kernel and TCN layer number of the occupancy rate prediction model, and mapping the position vector of each learning individual in the improved language education optimization algorithm. The corresponding mapping is the convolution kernel size and the number of TCN layers in the TCN network. Secondly, during the training process, the mean squared error is used as the loss function to guide the network parameter update of the farmhouse occupancy rate prediction model, so as to minimize the difference between the prediction result and the actual occupancy rate, and complete the training of the initial occupancy rate prediction model.
3. The method for predicting occupancy rates of agritainment businesses by integrating multidimensional data according to claim 1, characterized in that, An improved language education optimization algorithm is introduced to adaptively drive the updating of the convolutional kernels and TCN layers in the occupancy rate prediction model. The specific method is as follows: S301. Initialize the maximum number of iterations T and the total population size N of the improved language education optimization algorithm, the upper bound UB and the lower bound LB of the solution, and construct the initial positions of N learning individuals. S302. Determine if the current iteration number is equal to the maximum iteration number. If so, output the position of the learning individual corresponding to the minimum target degree value, which is parsed as the convolution kernel size and TCN layer number of the occupancy rate prediction model. Otherwise, execute S303. S303. Calculate the target degree value for each learning individual's position, and record the learning individual position corresponding to the maximum target degree value as the worst learning individual position in the current population. ; S304. Using the reverse generation guidance mechanism, the variable level is adjusted according to the direction of the ideal teacher generated in reverse, and the position of the learning individual is updated by non-linear offset. S305. Introduce a cognitively guided memory reconstruction collaborative mechanism to achieve structural coupling learning updates driven by cognitive differences among learners, and update the position of learners. S306. Generate perturbations near the current solution to simulate the self-learning process of the learning individual and update the position of the learning individual; S307: The current iteration count is incremented by one, then return to execute S302 to continuously update the agent's position.
4. The method for predicting occupancy rates of agritainment businesses by integrating multidimensional data according to claim 3, characterized in that, The confidence fusion combining predicted values and moving averages includes: in the initial occupancy rate prediction model, extracting historical prediction error sequences within the moving time window, and using the variance of the prediction error sequences as a basis for... This method measures the reliability of the predicted output and constructs a dynamic confidence factor. The current predicted value and the mean of the sliding true values within the corresponding time window are weighted and fused according to the confidence factor to generate the final prediction result after dynamic correction.
Citation Information
Patent Citations
A comprehensive hotel load forecasting method based on Shapelet-XGboost
CN117370770B
Short-term Load Forecasting Method Based on TCN and IPSO-LSSVM Combined Model
AU2020104000A4
Method for predicting residual service life of aero-engine based on TCN optimized by IPSO
CN117574754A