Intelligent cultural and tourism scenic spot passenger flow analysis and early warning method and system based on big data

Through big data technology and deep learning models (long and short-term memory network, attention mechanism Transformer and gated attention), and multi-source data to predict passenger flow, the problem that traditional methods are difficult to accurately analyze is solved, and cultural and tourism attractions are realized effective early warning and resource management.

CN118780847BActive Publication Date: 2024-12-06BEIJING TIANQI CHUANGZHAN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411281835.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-13
Publication Date
2024-12-06
Estimated Expiration
2044-09-13

AI Technical Summary

Technical Problem

Traditional passenger flow forecasting methods are difficult to deal with complex and changeable data relationships and nonlinear influencing factors, making it difficult to achieve accurate analysis and early warning of cultural and tourism attractions.

Method used

Using smart cultural and tourism attractions based on big data, the early warning method is used to obtain historical passenger flow data, tourist behavior pattern data, social media evaluation data and weather forecast data, and then input it based on long-term memory network and attention mechanism. The model built by Transformer and gated attention makes predictions and sends early warning information when the prediction data is greater than the preset passenger flow safety threshold.

Benefits of technology

Accurate analysis and early warning of passenger flow has been achieved, helping scenic spot management departments to take measures in advance to protect the tourist experience and the sustainability of scenic spot resources and environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118780847B_ABST
    Figure CN118780847B_ABST
Patent Text Reader

Abstract

The present application provides a method and system for analyzing and warning passenger flow at smart cultural and tourism attractions based on big data. By comprehensively applying big data technology, integrating LSTM, advanced attention mechanism and prediction model of gated attention unit, integrating multi-source heterogeneous data such as historical passenger flow, tourist behavior, social media feedback and weather forecast, and through intelligent analysis, real-time evaluation of potential passenger flow overload risks is achieved, thereby achieving the effect of accurate analysis and warning of passenger flow.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of data analysis technology, and in particular to a method and system for analyzing and warning passenger flow at smart cultural and tourism attractions based on big data. Background Art

[0002] With the vigorous development of the tourism industry and the continuous advancement of information technology, smart cultural tourism has become a key force in promoting the upgrading of the tourism industry. However, with the increasing frequency of tourism activities, popular attractions often face the problem of a surge in passenger flow, which not only affects the tourist experience, but may also cause safety risks, excessive resource consumption and environmental pressure.

[0003] However, traditional passenger flow forecasting methods mainly rely on statistical analysis and simple trend extrapolation. These methods are unable to cope with complex and changeable data relationships and nonlinear influencing factors, making it difficult to achieve accurate analysis and early warning of cultural and tourism attractions. Summary of the invention

[0004] The embodiments of the present application provide a method and system for analyzing and warning passenger flow at a smart cultural and tourism attraction based on big data, so as to solve the problems existing in the above-mentioned background technology.

[0005] In the first aspect, an embodiment of the present application provides a smart cultural and tourism scenic spot passenger flow analysis and early warning based on big data, including: obtaining target data of the scenic spot to be analyzed, wherein the target data includes: historical passenger flow data, tourist behavior pattern data, social media evaluation data and weather forecast data; preprocessing the target data to obtain preprocessed target data, wherein the preprocessing includes: data cleaning, missing value processing and numerical feature standardization; inputting the preprocessed target data into a target model to obtain passenger flow prediction data of the scenic spot to be analyzed, wherein the target model is a model constructed based on long short-term memory network, attention mechanism Transformer and gated attention; when the passenger flow prediction data is greater than a preset passenger flow safety threshold, sending an early warning message to the management personnel of the scenic spot to be analyzed.

[0006] Furthermore, the method for determining the preset passenger flow safety threshold includes:

[0007] Determining a baseline safety threshold based on the historical passenger flow data;

[0008] Inputting the tourist behavior pattern data, the social media evaluation data and the weather forecast data into a preset neural network model to obtain the crowding probability of the scenic spot to be analyzed;

[0009] Determining the preset passenger flow safety threshold based on the target data and the congestion probability;

[0010] The expression of the preset passenger flow safety threshold is:

[0011] ;

[0012] in, The preset passenger flow safety threshold, is the security threshold currently being executed, is the smoothing factor, Unsmoothed dynamically adjusted threshold, , is the baseline safety threshold, is the dynamic adjustment factor, , , For the Target data The transformation function of for The corresponding weights, is the total number of target data.

[0013] Furthermore, the preprocessed target data is input into the target model to obtain the passenger flow prediction data of the scenic spot to be analyzed, including: inputting the historical passenger flow data into the long short-term memory network layer to obtain time series features; inputting the tourist behavior pattern data, the social media evaluation data and the weather forecast data into the attention mechanism Transformer layer combined with the gated attention unit to obtain the attention scores corresponding to the tourist behavior pattern data, the social media evaluation data and the weather forecast data; inputting the time series features and the attention scores into the fusion layer to obtain fusion features; inputting the fusion features into the output layer to obtain the passenger flow prediction data.

[0014] Furthermore, the expression of the long short-term memory network layer is:

[0015] ;

[0016] ;

[0017] ;

[0018] ;

[0019] ;

[0020] in, for The forget gate output corresponding to the historical passenger flow data at the time, for The input gate output corresponding to the historical passenger flow data at the time, for The output gate output corresponding to the historical passenger flow data at the time, for The unit status corresponding to the historical passenger flow data at the time, for The hidden state corresponding to the historical passenger flow data at the time, is the sigmoid activation function, is element-wise multiplication, is the hyperbolic tangent activation function, for The hidden state corresponding to the historical passenger flow data at the time The row vector of Historical passenger flow data at each time The column vector obtained by transposing the row vector of the row vector, , , and is the weight value, , , and is the bias term.

[0021] Furthermore, the expression of the attention mechanism Transformer layer combined with the gated attention unit is:

[0022] ;

[0023] in, is the query matrix, is the key matrix, is the value matrix, , , and is the weight matrix, and is the bias term, is the gating factor, Representation weight normalization, is the matching score, is the attention score.

[0024] Furthermore, the expression of the fusion layer is:

[0025] ;

[0026] in, is the fusion feature, is layer normalization, is a fully connected layer, and the final hidden state corresponding to the historical passenger flow data , is the attention score, for Attention scores of tourist behavior pattern data at all times, for Attention scores of social media evaluation data at all times, for Attention scores for moment-by-moment weather forecast data.

[0027] Furthermore, the expression of the output layer is:

[0028] ;

[0029] in, is the passenger flow prediction data, is the weight of the output layer, is the bias term of the output layer.

[0030] Furthermore, the method also includes: using an ε-greedy strategy to initially optimize the target model to obtain an initially optimized target model; and using a greedy strategy to optimize the initially optimized target model to obtain an optimized target model.

[0031] In the second aspect, an embodiment of the present application provides a smart cultural and tourism scenic spot passenger flow analysis and early warning system based on big data, including: an acquisition unit, used to acquire target data of the scenic spot to be analyzed, wherein the target data includes: historical passenger flow data, tourist behavior pattern data, social media evaluation data and weather forecast data; a preprocessing unit, used to preprocess the target data to obtain preprocessed target data, wherein the preprocessing includes: data cleaning, missing value processing and numerical feature standardization; a prediction unit, used to input the preprocessed target data into a target model to obtain passenger flow prediction data of the scenic spot to be analyzed, wherein the target model is a model constructed based on long short-term memory network, attention mechanism Transformer and gated attention; an early warning unit, used to send early warning information to the management personnel of the scenic spot to be analyzed when the passenger flow prediction data is greater than a preset passenger flow safety threshold.

[0032] In a third aspect, an embodiment of the present application provides a computing device, including a processing component and a storage component; the storage component stores one or more computer instructions; the one or more computer instructions are used to be called and executed by the processing component to implement the method described in the first aspect above.

[0033] In an embodiment of the present invention, by comprehensively applying big data technology, integrating LSTM, advanced attention mechanism and prediction model of gated attention unit, integrating multi-source heterogeneous data such as historical passenger flow, tourist behavior, social media feedback and weather forecast, and through intelligent analysis, the potential passenger flow overload risk is evaluated in real time, thereby achieving the effect of accurate analysis and early warning of passenger flow.

[0034] These and other aspects of the present application will become more clearly understood in the description of the following embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0036] Figure 1 A flowchart of a method for analyzing and warning passenger flow at a smart cultural and tourism attraction based on big data provided in an embodiment of the present application;

[0037] Figure 2 A schematic diagram of a smart cultural and tourism scenic spot passenger flow analysis and early warning system based on big data provided in an embodiment of the present application;

[0038] Figure 3 A schematic diagram of a computing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0039] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0040] Embodiment 1:

[0041] According to an embodiment of the present invention, an embodiment of a method for analyzing and warning passenger flow at a smart cultural and tourism attraction based on big data is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in an order different from that shown here.

[0042] Figure 1is a flow chart of a method for analyzing and warning passenger flow of smart cultural and tourism attractions based on big data according to an embodiment of the present invention. Figure 1 As shown, the method comprises the following steps:

[0043] Step S102, obtaining target data of the scenic spot to be analyzed, wherein the target data includes: historical passenger flow data, tourist behavior pattern data, social media evaluation data and weather forecast data;

[0044] Step S104, preprocessing the target data to obtain preprocessed target data, wherein the preprocessing includes: data cleaning, missing value processing and numerical feature standardization;

[0045] Step S106, inputting the preprocessed target data into a target model to obtain passenger flow prediction data of the scenic spot to be analyzed, wherein the target model is a model constructed based on a long short-term memory network, an attention mechanism Transformer, and a gated attention;

[0046] Step S108, when the passenger flow prediction data is greater than a preset passenger flow safety threshold, sending a warning message to the management personnel of the scenic spot to be analyzed.

[0047] The above steps are described in detail below.

[0048] Obtaining the target data of the scenic spot to be analyzed includes the following steps:

[0049] Collect daily, weekly, and holiday passenger flow data for the past five years, including entrance counting data and online ticketing records.

[0050] Through Wi-Fi probes and video surveillance in the scenic area, the distribution and length of stay of tourists in different time periods and attractions are analyzed.

[0051] Capture tourist comments on social platforms, conduct sentiment analysis, and understand tourists’ satisfaction with and interests in scenic spots.

[0052] Integrate the daily weather forecast for the next two weeks provided by the local meteorological bureau of the scenic spot, including temperature, precipitation, wind speed and other indicators.

[0053] Next, invalid, duplicate, and erroneous data records in the target data are removed.

[0054] Fill in missing traffic data using interpolation or model-based methods; for social media data, majority voting or time series-based forecasting can be used.

[0055] All numerical features are normalized to ensure that they have the same scale when training the model.

[0056] Then, an LSTM-based model is built to capture long-term dependencies in time series data, and Transformer is used in combination with the gated attention mechanism (GAU) to process non-time series data (such as social media sentiment analysis and weather characteristics) to enhance the model’s sensitivity and screening ability for key information.

[0057] When training the model, a cross-validation strategy is used to evaluate model performance and adjust hyperparameters to ensure that the model can accurately predict passenger flow and effectively integrate information from multiple data sources.

[0058] Finally, the preprocessed data is input into the model to obtain the predicted passenger flow for each day in the next week.

[0059] Set a safe threshold for passenger flow based on the maximum capacity of the attraction and the comfort level of visitors. When the predicted value exceeds the threshold, the system automatically triggers an early warning mechanism.

[0060] The early warning information includes the predicted peak passenger flow time, affected areas and recommended response measures, and is sent instantly to scenic area managers through multiple channels such as SMS, email, and management platforms.

[0061] By adopting the method of this embodiment, the potential of big data technology can be fully utilized, and multiple complex data sources can be integrated into the prediction model, thereby improving the prediction accuracy. Through timely warning, the scenic spot can take measures in advance to effectively manage the passenger flow, which not only protects the tourists' tour experience, but also ensures the sustainability of the scenic spot resources and environment, demonstrating the advancement and necessity of smart cultural tourism management.

[0062] It should be noted that the method for determining the preset passenger flow safety threshold includes:

[0063] Determining a baseline safety threshold based on the historical passenger flow data;

[0064] Inputting the tourist behavior pattern data, the social media evaluation data and the weather forecast data into a preset neural network model to obtain the crowding probability of the scenic spot to be analyzed;

[0065] Determining the preset passenger flow safety threshold based on the target data and the congestion probability;

[0066] The expression of the preset passenger flow safety threshold is:

[0067] ;

[0068] in, The preset passenger flow safety threshold, is the security threshold currently being executed, is the smoothing factor, Unsmoothed dynamically adjusted threshold, , is the baseline safety threshold, is the dynamic adjustment factor, , , For the Target data The transformation function of for The corresponding weights, is the total number of target data.

[0069] In an embodiment of the present invention, the pre-processed target data is input into a target model to obtain passenger flow prediction data of the scenic spot to be analyzed, including:

[0070] Inputting the historical passenger flow data into the long short-term memory network layer to obtain time series features;

[0071] Input the tourist behavior pattern data, the social media evaluation data and the weather forecast data into the attention mechanism Transformer layer combined with the gated attention unit to obtain the attention scores corresponding to the tourist behavior pattern data, the social media evaluation data and the weather forecast data;

[0072] Inputting the time series feature and the attention score into a fusion layer to obtain a fusion feature;

[0073] The fused features are input into the output layer to obtain the passenger flow prediction data.

[0074] In an embodiment of the present invention, the long short-term memory network layer inputs the preprocessed historical passenger flow data into the LSTM network to capture the long-term dependency of the time series and extract the time series features.

[0075] Specifically, the expression of the long short-term memory network layer is:

[0076] ;

[0077] ;

[0078] ;

[0079] ;

[0080] ;

[0081] in, for The forget gate output corresponding to the historical passenger flow data at the time, for The input gate output corresponding to the historical passenger flow data at the time, for The output gate output corresponding to the historical passenger flow data at the time, for The unit status corresponding to the historical passenger flow data at the time, for The hidden state corresponding to the historical passenger flow data at the time, is the sigmoid activation function, is element-wise multiplication, is the hyperbolic tangent activation function, for The hidden state corresponding to the historical passenger flow data at the time The row vector of Historical passenger flow data at each time The column vector obtained by transposing the row vector of the row vector, , , and is the weight value, , , and is the bias term.

[0082] Through the Transformer model and the GAU (gated attention) mechanism, different attention weights are assigned to different areas and time points according to the visitors’ activity level and points of interest in the park.

[0083] According to the distribution of positive and negative emotions, different degrees of importance are given to the corresponding emotional features.

[0084] Adjust the weights of weather characteristics based on the impact of weather conditions on tourists' travel intentions.

[0085] Specifically, the expression of the attention mechanism Transformer layer combined with the gated attention unit is:

[0086] ;

[0087] in, is the query matrix, is the key matrix, is the value matrix, , , and is the weight matrix, and is the bias term, is the gating factor, Representation weight normalization, is the matching score, is the attention score.

[0088] The time series features extracted by LSTM are fused with the tourist behavior patterns, social media reviews, and attention scores of weather forecasts processed by Transformer-GAU to form a comprehensive feature representation.

[0089] The expression of the fusion layer is:

[0090] ;

[0091] in, is the fusion feature, is layer normalization, is a fully connected layer, and the final hidden state corresponding to the historical passenger flow data , is the attention score, for Attention scores of tourist behavior pattern data at all times, for Attention scores of social media evaluation data at all times, for Attention scores for moment-by-moment weather forecast data.

[0092] The fused features are input into the fully connected layer and converted through an activation function (such as ReLU or Sigmoid) to finally obtain the passenger flow prediction value.

[0093] The expression of the output layer is:

[0094] ;

[0095] in, is the passenger flow prediction data, is the weight of the output layer, is the bias term of the output layer.

[0096] By combining LSTM with the Transformer-GAU model, we can deeply analyze the factors affecting passenger flow from multiple dimensions, not only considering the inherent laws of time series, but also fully integrating the influence of tourist behavior, market sentiment and environmental factors, so as to achieve more accurate passenger flow prediction. This helps scenic spot management departments to prepare for staffing, traffic diversion and safety precautions in advance, improve tourist experience, and protect scenic spot resources and environment.

[0097] In an embodiment of the present invention, the method further includes:

[0098] Using an ε-greedy strategy to initially optimize the target model, to obtain an initially optimized target model;

[0099] The target model after the initial optimization is optimized using a greedy strategy to obtain a target model that has been optimized.

[0100] In order to further improve the prediction accuracy and model efficiency of the target model, this embodiment introduces a reinforcement learning strategy to gradually optimize the model parameters through ε-greedy and greedy strategies to ensure that the target model improves resource utilization efficiency while maintaining high prediction accuracy.

[0101] Specifically, the initial parameter set of the target model is set as , including all weights and biases of LSTM, Transformer-GAU and output layers.

[0102] Set the ε value (exploration probability) to a small positive number, such as ε = 0.1, for initial exploration of the ε-greedy strategy.

[0103] The specific optimization process of ε-greedy strategy optimization is as follows:

[0104] At each model training iteration, the current best parameter configuration (i.e., the parameters selected based on historical rewards) is selected with probability 1-ε, and a new configuration within a neighborhood of the model parameters is randomly selected with probability ε. This aims to extensively explore the parameter space and find possible better solutions.

[0105] For each prediction, calculate a comprehensive reward , reflecting the balance between prediction accuracy and resource consumption, ,in, and is the weight factor, MSE is the mean square error between the predicted value and the true value, Resource consumption (such as computing time and memory usage) during model training or prediction.

[0106] Based on the rewards received , updating parameter configurations, tending to retain those that bring higher rewards.

[0107] When the exploration phase is over, based on the optimal or approximately optimal parameter configuration that has been explored, the greedy strategy is switched to always select the currently known best parameter configuration for training and prediction, and no longer perform random exploration.

[0108] In this stage, the model is further fine-tuned through gradient descent or other optimization algorithms to further optimize the model performance. At this time, the ε value can be set to 0 or a very small value, which depends almost entirely on the optimal solution found.

[0109] The ε-greedy strategy avoids the local optimal trap through random exploration in the early stage, which helps to discover potential high-quality solutions in a wider parameter space.

[0110] The greedy strategy is adopted after the exploration phase, focusing on the optimal solution discovered, and further improving the model performance through fine-grained parameter optimization, ensuring that in practical applications the model can both accurately predict and operate efficiently in an environment with limited resources.

[0111] Combining these two strategies, a two-stage strategy for model optimization is implemented, which not only takes into account the breadth of exploration but also ensures the depth of optimization. It is an effective means to improve the overall performance of the model.

[0112] Embodiment 2:

[0113] An embodiment of the present invention also provides a smart cultural and tourism scenic spot passenger flow analysis and early warning system based on big data. The smart cultural and tourism scenic spot passenger flow analysis and early warning system based on big data is used to execute the smart cultural and tourism scenic spot passenger flow analysis and early warning method based on big data provided by the above content of the embodiment of the present invention. The following is a specific introduction to the smart cultural and tourism scenic spot passenger flow analysis and early warning system based on big data provided by an embodiment of the present invention.

[0114] like Figure 2 As shown, Figure 2 This is a schematic diagram of the above-mentioned smart cultural and tourism scenic spot passenger flow analysis and early warning system based on big data, which includes:

[0115] An acquisition unit 10 is used to acquire target data of the scenic spot to be analyzed, wherein the target data includes: historical passenger flow data, tourist behavior pattern data, social media evaluation data and weather forecast data;

[0116] A preprocessing unit 20 is used to preprocess the target data to obtain preprocessed target data, wherein the preprocessing includes: data cleaning, missing value processing and numerical feature standardization;

[0117] A prediction unit 30 is used to input the preprocessed target data into a target model to obtain passenger flow prediction data of the scenic spot to be analyzed, wherein the target model is a model constructed based on a long short-term memory network, an attention mechanism Transformer, and a gated attention;

[0118] The early warning unit 40 is used to send early warning information to the management personnel of the scenic spot to be analyzed when the passenger flow prediction data is greater than a preset passenger flow safety threshold.

[0119] In an embodiment of the present invention, by comprehensively applying big data technology, integrating LSTM, advanced attention mechanism and prediction model of gated attention unit, integrating multi-source heterogeneous data such as historical passenger flow, tourist behavior, social media feedback and weather forecast, and through intelligent analysis, the potential passenger flow overload risk is evaluated in real time, thereby achieving the effect of accurate analysis and early warning of passenger flow.

[0120] Embodiment three:

[0121] The embodiment of the present invention further provides a computing device for executing a program of the method described in the first embodiment, such as Figure 3 As shown, the computing device may include a storage component 41 and a processing component 42;

[0122] The storage component 41 stores one or more computer instructions, wherein the one or more computer instructions are called and executed by the processing component 42 .

[0123] The processing component 42 may include one or more processors to execute computer instructions to complete all or part of the steps in the method of embodiment 1. Of course, the processing component may also be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above method.

[0124] The storage component 41 is configured to store various types of data to support operations at the terminal. The storage component can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0125] The display component 43 may be an electroluminescent (EL) element, a liquid crystal display or a micro display having a similar structure, or a retinal direct display or a similar laser scanning display.

[0126] Of course, a computing device may also include other components, such as input / output interfaces, communication components, etc.

[0127] The input / output interface provides an interface between the processing component and the peripheral interface module, which may be an output device, an input device, etc.

[0128] The communication component is configured to facilitate, among other things, wired or wireless communications between the computing device and other devices.

[0129] Among them, the computing device can be a physical device or an elastic computing host provided by a cloud computing platform, etc. In this case, the computing device can refer to a cloud server, and the above-mentioned processing components, storage components, etc. can be basic server resources rented or purchased from the cloud computing platform.

[0130] Embodiment 4:

[0131] The present application also provides a computer storage medium storing a computer program, wherein the computer program can achieve the above-mentioned Figure 1 The method of the illustrated embodiment.

[0132] 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.

[0133] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0134] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0135] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for analyzing and warning passenger flow of smart cultural and tourism attractions based on big data, characterized in that: include: Obtain target data of the scenic spot to be analyzed, wherein the target data includes: historical passenger flow data, tourist behavior pattern data, social media evaluation data and weather forecast data; Preprocessing the target data to obtain preprocessed target data, wherein the preprocessing includes: data cleaning, missing value processing and numerical feature standardization; Input the preprocessed target data into the target model to obtain the passenger flow prediction data of the scenic spot to be analyzed, wherein the target model is a model constructed based on the long short-term memory network, the attention mechanism Transformer and the gated attention; When the passenger flow forecast data is greater than a preset passenger flow safety threshold, sending an early warning message to the management personnel of the scenic spot to be analyzed, wherein the preset passenger flow safety threshold is a passenger flow safety threshold determined based on the target data and a dynamic adjustment algorithm; The method for determining the preset passenger flow safety threshold includes: Determining a baseline safety threshold based on the historical passenger flow data; Determining the preset passenger flow safety threshold based on the target data and the baseline safety threshold; The expression of the preset passenger flow safety threshold is: ; in, is the preset passenger flow safety threshold, is the security threshold currently being executed, is the smoothing factor, is the dynamically adjusted threshold value without smoothing, , is the baseline safety threshold, is the dynamic adjustment factor, , , For the Target data The transformation function of for The corresponding weight, is the total number of target data.

2. The method according to claim 1, characterized in that The pre-processed target data is input into the target model to obtain the passenger flow prediction data of the scenic spot to be analyzed, including: Inputting the historical passenger flow data into the long short-term memory network to obtain time series features; Input the tourist behavior pattern data, the social media evaluation data and the weather forecast data into the attention mechanism Transformer combined with the gated attention unit to obtain the attention scores corresponding to the tourist behavior pattern data, the social media evaluation data and the weather forecast data; Inputting the time series feature and the attention score into a fusion layer to obtain a fusion feature; The fused features are input into the output layer to obtain the passenger flow prediction data.

3. The method according to claim 2, characterized in that The expression of the long short-term memory network layer is: ; ; ; ; ; in, for The forget gate output corresponding to the historical passenger flow data at the time, for The input gate output corresponding to the historical passenger flow data at the time, for The output gate output corresponding to the historical passenger flow data at the time, for The unit status corresponding to the historical passenger flow data at the time, for The hidden state corresponding to the historical passenger flow data at the time, is the sigmoid activation function, is element-wise multiplication, is the hyperbolic tangent activation function, for The hidden state corresponding to the historical passenger flow data at the time The row vector of Historical passenger flow data at each time The column vector obtained by transposing the row vector of the row vector, , , and is the weight value, , , and is the bias term.

4. The method according to claim 3, characterized in that The expression of the attention mechanism Transformer layer combined with the gated attention unit is: ; in, is the query matrix, is the key matrix, is the value matrix, , , and is the weight matrix, and is the bias term, is the gating factor, Representation weight normalization, is the matching score, is the attention score.

5. The method according to claim 4, characterized in that The expression of the fusion layer is: ; in, is the fusion feature, is layer normalization, is a fully connected layer, and the final hidden state corresponding to the historical passenger flow data , is the attention score, for Attention scores of tourist behavior pattern data at all times, for Attention scores of social media evaluation data at all times, for Attention scores for moment-by-moment weather forecast data.

6. The method according to claim 5, characterized in that The expression of the output layer is: ; in, is the passenger flow prediction data, is the weight of the output layer, is the bias term of the output layer.

7. The method according to claim 1, characterized in that The method further comprises: Performing initial optimization on the target model using an ε-greedy strategy to obtain an initially optimized target model; The target model after the initial optimization is optimized using a greedy strategy to obtain a target model that has been optimized.

8. A smart tourist attraction passenger flow analysis and early warning system based on big data, characterized in that: include: An acquisition unit, used to acquire target data of the scenic spot to be analyzed, wherein the target data includes: historical passenger flow data, tourist behavior pattern data, social media evaluation data and weather forecast data; A preprocessing unit, used to preprocess the target data to obtain preprocessed target data, wherein the preprocessing includes: data cleaning, missing value processing and numerical feature standardization; A prediction unit, used to input the preprocessed target data into a target model to obtain passenger flow prediction data of the scenic spot to be analyzed, wherein the target model is a model constructed based on a long short-term memory network, an attention mechanism Transformer, and a gated attention; An early warning unit, configured to send an early warning message to the management personnel of the scenic spot to be analyzed when the passenger flow forecast data is greater than a preset passenger flow safety threshold; The method for determining the preset passenger flow safety threshold includes: Determining a baseline safety threshold based on the historical passenger flow data; Determining the preset passenger flow safety threshold based on the target data and the baseline safety threshold; The expression of the preset passenger flow safety threshold is: ; in, is the preset passenger flow safety threshold, is the security threshold currently being executed, is the smoothing factor, is the dynamically adjusted threshold value without smoothing, , is the baseline safety threshold, is the dynamic adjustment factor, , , For the Target data The transformation function of for The corresponding weight, is the total number of target data.

9. A computing device, characterized in that It comprises a processing component and a storage component; the storage component stores one or more computer instructions; the one or more computer instructions are used to be called and executed by the processing component to implement the method according to any one of claims 1 to 7.