Methods, devices, equipment and storage media for predicting visitor flow in scenic areas

By acquiring information about the target scenic area and surrounding scenic areas, constructing a visitor flow observation sequence and probability distribution matrix, and using a preset model to predict visitor flow, the problem of low prediction accuracy caused by not considering the influence of surrounding scenic areas in existing technologies is solved, and higher prediction accuracy is achieved.

CN116843079BActive Publication Date: 2026-11-17CHINA MOBILE GROUP JIANGSU +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310838858.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-07
Publication Date
2026-11-17
Estimated Expiration
2043-07-07

AI Technical Summary

Technical Problem

Existing technologies do not consider the impact of visitor flow in surrounding scenic areas when predicting visitor flow in scenic areas, resulting in low prediction accuracy.

Method used

By acquiring information about the target scenic area and surrounding scenic areas, a visitor flow observation sequence is determined, a visitor flow probability distribution matrix is ​​constructed, and a pre-set visitor flow prediction model is used to predict visitor flow. The accuracy of the prediction is improved by combining the influencing factors and fluctuation factors of surrounding scenic areas.

Benefits of technology

It improves the accuracy of visitor flow forecasting in scenic areas and enhances the precision of the forecasting model by taking into account the influence of surrounding scenic areas.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116843079B_ABST
    Figure CN116843079B_ABST
Patent Text Reader

Abstract

This invention belongs to the field of computer science and discloses a method, apparatus, device, and storage medium for predicting visitor flow in scenic areas. The method includes: acquiring information about the target scenic area and information about surrounding scenic areas; determining a visitor flow observation sequence based on the target scenic area information and the surrounding scenic area information; determining a visitor flow probability distribution matrix based on the visitor flow observation sequence; and predicting visitor flow in the target scenic area using the visitor flow probability distribution matrix based on a preset visitor flow prediction model. Compared to existing methods that predict visitor flow based on historical visitor flow of the target scenic area, this invention combines information about surrounding scenic areas to predict visitor flow in the target scenic area, improving the accuracy of visitor flow prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to a method, apparatus, equipment, and storage medium for predicting visitor flow in scenic areas. Background Technology

[0002] In predicting visitor flow to scenic areas, existing technologies mostly rely on traditional machine learning models, such as multiple linear regression and random forest ensembles, to predict visitor flow based on historical data. While these models are diverse, they fail to consider the impact of visitor flow from surrounding scenic areas on the target area, significantly reducing prediction accuracy. Therefore, improving the accuracy of visitor flow prediction has become a pressing technical challenge.

[0003] The above content is only used to help understand the technical solution of the present invention and does not represent an admission that the above content is prior art. Summary of the Invention

[0004] The main objective of this invention is to provide a method, apparatus, device, and storage medium for predicting visitor flow in scenic areas, aiming to solve the technical problem of low accuracy in existing scenic area visitor flow prediction technologies.

[0005] To achieve the above objectives, the present invention provides a method for predicting visitor flow in scenic areas, the method comprising the following steps:

[0006] Obtain information about the target scenic area and surrounding scenic areas;

[0007] A visitor flow observation sequence is determined based on the target scenic area information and the surrounding scenic area information;

[0008] Determine the passenger flow probability distribution matrix based on the passenger flow observation sequence;

[0009] Based on the preset passenger flow prediction model, the passenger flow probability distribution matrix is ​​used to predict the passenger flow of the target scenic area.

[0010] Optionally, before the step of predicting the passenger flow of the target scenic area using the passenger flow probability distribution matrix based on the preset passenger flow prediction model, the following steps are included:

[0011] Determine the passenger flow influencing characteristic factors and obtain the relevant information corresponding to the passenger flow influencing characteristic factors;

[0012] Construct a passenger flow data matrix based on the aforementioned passenger flow influencing characteristic factors and the aforementioned relevant information;

[0013] The step of predicting the passenger flow of the target scenic area based on the preset passenger flow prediction model and the passenger flow probability distribution matrix includes:

[0014] Based on a preset passenger flow prediction model, the passenger flow probability distribution matrix and the passenger flow data matrix are used to predict the passenger flow of the target scenic area.

[0015] Optionally, the step of determining the visitor flow observation sequence based on the target scenic area information and the surrounding scenic area information includes:

[0016] Based on the target scenic area information and the surrounding scenic area information, determine the impact factor of park closure and the visitor flow fluctuation factor;

[0017] A passenger flow observation sequence is constructed based on the park closure impact factor and the passenger flow fluctuation factor.

[0018] Optionally, the step of determining the impact factor of park closure and the visitor flow fluctuation factor based on the target scenic area information and the surrounding scenic area information includes:

[0019] Obtain the preset weights of scenic area opening status;

[0020] The closure sequence of surrounding scenic spots is determined based on the surrounding scenic spot information, and the opening status weight sequence of scenic spots is determined based on the preset scenic spot opening status weight and the surrounding scenic spot closure sequence.

[0021] The IDW weights of the surrounding scenic areas are determined based on the spherical distance between the surrounding scenic areas and the target scenic area;

[0022] The impact factor of park closure is determined based on the closure time sequence of the surrounding scenic spots and the IDW weights.

[0023] The visitor flow fluctuation factor is determined based on the weight sequence of the scenic area's opening status and the information of the surrounding scenic areas.

[0024] Optionally, before the step of determining the passenger flow probability distribution matrix based on the passenger flow observation sequence, the method further includes:

[0025] Obtain a training dataset, and determine the observation sequence variables of the preset first prediction model based on the training dataset;

[0026] Obtain a predefined hidden state of the first prediction model, and determine the joint probability based on the hidden state of the first prediction model and the observed sequence variables;

[0027] Establish a preset second prediction model, and construct a preset third prediction model based on the preset second prediction model and the preset first prediction model;

[0028] The target prediction model is obtained by training the preset third prediction model based on the joint probability.

[0029] Optionally, before the step of predicting the passenger flow of the target scenic area using the passenger flow probability distribution matrix based on the preset passenger flow prediction model, the method further includes:

[0030] Obtain the sample passenger flow probability distribution matrix output by the target prediction model;

[0031] The sample passenger flow probability distribution matrix and the sample data matrix are concatenated to obtain the sample training set;

[0032] The initial passenger flow prediction model is trained based on the sample training set and the preset model hyperparameters to obtain the preset passenger flow prediction model.

[0033] Optionally, after the step of training the initial passenger flow prediction model based on the sample training set and preset model hyperparameters to obtain the preset passenger flow prediction model, the method further includes:

[0034] The test set in the sample training set is input into the preset passenger flow prediction model to obtain the prediction result output by the preset passenger flow prediction model.

[0035] The evaluation index of the preset passenger flow prediction model is determined based on the prediction results and the passenger flow data corresponding to the test set.

[0036] The prediction performance of the preset passenger flow prediction model is determined based on the evaluation indicators.

[0037] Furthermore, to achieve the above objectives, the present invention also provides a scenic area visitor flow prediction device, the device comprising:

[0038] The acquisition module is used to acquire information about the target scenic area and surrounding scenic areas.

[0039] A passenger flow observation sequence determination module is used to determine a passenger flow observation sequence based on the target scenic area information and the surrounding scenic area information;

[0040] The passenger flow probability distribution matrix prediction module is used to determine the passenger flow probability distribution matrix based on the passenger flow observation sequence.

[0041] The passenger flow prediction module is used to predict the passenger flow of the target scenic area based on the passenger flow probability distribution matrix using a preset passenger flow prediction model.

[0042] Furthermore, to achieve the above objectives, the present invention also proposes a scenic area visitor flow prediction device, the device comprising: a memory, a processor, and a scenic area visitor flow prediction program stored in the memory and executable on the processor, the scenic area visitor flow prediction program being configured to implement the steps of the scenic area visitor flow prediction method described above.

[0043] In addition, to achieve the above objectives, the present invention also proposes a storage medium storing a scenic area visitor flow prediction program, which, when executed by a processor, implements the steps of the scenic area visitor flow prediction method described above.

[0044] This invention acquires information about the target scenic area and surrounding scenic areas; determines a visitor flow observation sequence based on the target scenic area information and the surrounding scenic area information; determines a visitor flow probability distribution matrix based on the visitor flow observation sequence; and predicts visitor flow for the target scenic area using the visitor flow probability distribution matrix based on a preset visitor flow prediction model. Compared to existing methods that predict visitor flow based on historical visitor flow of the target scenic area, this invention combines information from surrounding scenic areas to predict visitor flow for the target scenic area, improving the accuracy of visitor flow prediction. Attached Figure Description

[0045] Figure 1 This is a schematic diagram of the structure of a scenic area visitor flow prediction device in the hardware operating environment involved in the embodiments of the present invention;

[0046] Figure 2 This is a flowchart illustrating the first embodiment of the scenic area visitor flow prediction method of the present invention;

[0047] Figure 3 This is a flowchart illustrating the second embodiment of the scenic area visitor flow prediction method of the present invention;

[0048] Figure 4 This is a flowchart illustrating the third embodiment of the scenic area visitor flow prediction method of the present invention;

[0049] Figure 5 This is a structural block diagram of the first embodiment of the scenic area visitor flow prediction device of the present invention.

[0050] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0051] It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the invention.

[0052] Reference Figure 1 , Figure 1 This is a schematic diagram of the scenic area visitor flow prediction device structure in the hardware operating environment involved in the embodiments of the present invention.

[0053] like Figure 1 As shown, the tourist flow prediction device for the scenic area may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen and an input unit such as a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wireless Fidelity (Wi-Fi) interface). The memory 1005 may be high-speed random access memory (RAM) or stable non-volatile memory (NVM), such as a disk storage device. The memory 1005 may also optionally be a storage device independent of the aforementioned processor 1001.

[0054] Those skilled in the art will understand that Figure 1 The structure shown does not constitute a limitation on the tourist flow prediction equipment for scenic spots. It may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0055] like Figure 1 As shown, the memory 1005, which serves as a storage medium, may include an operating system, a network communication module, a user interface module, and a scenic area visitor flow prediction program.

[0056] exist Figure 1 In the scenic area visitor flow prediction device shown, the network interface 1004 is mainly used for data communication with the network server; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the scenic area visitor flow prediction device of the present invention can be set in the scenic area visitor flow prediction device. The scenic area visitor flow prediction device calls the scenic area visitor flow prediction program stored in the memory 1005 through the processor 1001 and executes the scenic area visitor flow prediction method provided in the embodiment of the present invention.

[0057] Based on the aforementioned scenic area visitor flow prediction equipment, this invention provides a method for predicting scenic area visitor flow, referring to... Figure 2 , Figure 2 This is a flowchart illustrating the first embodiment of the scenic area visitor flow prediction method of the present invention.

[0058] In this embodiment, the scenic area visitor flow prediction method includes the following steps:

[0059] Step S10: Obtain information about the target scenic area and information about the surrounding scenic areas.

[0060] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a mobile phone, tablet computer, or personal computer, or an electronic device or scenic area visitor flow prediction device capable of the above functions. The following description uses the scenic area visitor flow prediction device as an example to illustrate this embodiment and the subsequent embodiments.

[0061] It should be noted that the target scenic area can be a scenic area for which visitor flow prediction is to be performed. The target scenic area information may include the scenic area's closure time series data (which can be obtained by collecting and sorting information released by the scenic area and / or official channels such as the cultural and tourism bureau, e.g., routine closures / venue closures, temporary closures / venue closures), historical visitor flow data, and the latitude and longitude data of the scenic area's location. The surrounding scenic areas can be scenic areas around the target scenic area, such as scenic areas in the same province or city, or scenic areas within a preset distance threshold from the target scenic area. The surrounding scenic area information may include the surrounding scenic area's closure time series data, historical visitor flow data, and latitude and longitude data of the scenic area's location.

[0062] Step S20: Determine the passenger flow observation sequence based on the target scenic area information and the surrounding scenic area information.

[0063] It should be noted that determining the passenger flow observation sequence based on the target scenic area information and the surrounding scenic area information can be done by determining the influencing factors affecting the passenger flow of the scenic area based on the target scenic area information and the surrounding scenic area information, and constructing the passenger flow observation sequence based on the influencing factors.

[0064] Furthermore, in order to accurately predict the visitor flow of the scenic area, step S20 may include: determining the impact factor of park closure and the visitor flow fluctuation factor based on the target scenic area information and the surrounding scenic area information;

[0065] A passenger flow observation sequence is constructed based on the park closure impact factor and the passenger flow fluctuation factor.

[0066] It should be noted that determining the impact factor of park closure based on the target scenic area information and the surrounding scenic area information can be achieved by determining the spherical distance between the surrounding scenic areas and the target scenic area based on the target scenic area information and the surrounding scenic area information, and calculating the IDW weight of the surrounding scenic areas based on the distance between the surrounding scenic areas and the target scenic area. Here, IDW is the inverse distance weighting method, and the IDW weight of the surrounding scenic area h can be calculated using the following IDW formula:

[0067]

[0068] Among them, idw h The IDW weight used to characterize the h-th surrounding scenic area, dis h The spherical distance between the h-th surrounding scenic area and the target scenic area is used to represent the total number of surrounding scenic areas.

[0069] The closing times of surrounding scenic spots are determined based on the closing time sequence data in the surrounding scenic spot information. The closing time sequence can be the closing time of the surrounding scenic spot within a period of length T. For example, the closing time sequence of surrounding scenic spot h is "closed". h for:

[0070] closed h =[closed h,1 closed h,2 ..., closed h,t ..., closed h,T ]

[0071] h = 1, 2, ..., H

[0072] Where H represents the total number of surrounding scenic spots, t represents the closing time, and T represents the statistical length of the closing time.

[0073] The impact factor of closure, determined based on the closing times of surrounding scenic spots and their IDW weights, can be calculated using the following formula: the impact factor epi of closure for surrounding scenic spot h is calculated. 1,h :

[0074] epi 1,h =closed h ·idw h

[0075] It should be noted that the construction of the passenger flow observation sequence based on the park closure impact factor and the passenger flow fluctuation factor can be achieved by composing the passenger flow observation sequence according to the park closure impact factor and the passenger flow fluctuation factor. For example, the park closure impact factor is epi. 1,h Passenger flow fluctuation factor is epi 2,h The passenger flow observation sequence O can be:

[0076] O = [epi] 1,1 epi 1,2 , ..., epi 1,H epi 2,1 epi 2,2 , ..., epi 2,H ]

[0077] Furthermore, in order to accurately calculate the visitor flow observation sequence, the step of determining the impact factor of park closure and the visitor flow fluctuation factor based on the target scenic area information and the surrounding scenic area information includes:

[0078] Obtain the preset weights of scenic area opening status;

[0079] The closure sequence of surrounding scenic spots is determined based on the surrounding scenic spot information, and the opening status weight sequence of scenic spots is determined based on the preset scenic spot opening status weight and the surrounding scenic spot closure sequence.

[0080] The IDW weights of the surrounding scenic areas are determined based on the spherical distance between the surrounding scenic areas and the target scenic area;

[0081] The impact factor of park closure is determined based on the closure time sequence of the surrounding scenic spots and the IDW weights.

[0082] The visitor flow fluctuation factor is determined based on the weight sequence of the scenic area's opening status and the information of the surrounding scenic areas.

[0083] It should be noted that the preset scenic area opening status weight can be a pre-set weight indicating the impact of whether surrounding scenic areas are open on the visitor flow prediction of the target scenic area. For example, a preset scenic area opening status weight w can be set. state for:

[0084]

[0085] The closing sequence of surrounding scenic spots can be a sequence of closing times of surrounding scenic spots within a time period of T. For example, the closing sequence of surrounding scenic spot h can be:

[0086] closed h =[closed h,1 closed h,2 ..., closed h,t ..., closed h,T ]

[0087] Each component is closed. h,t Let be a binary variable of 0 and 1, representing "whether the park is closed due to epidemic control or other factors". If the surrounding scenic area h is closed at time t, then is closed. h,t =1, if the surrounding scenic area h is not closed at time t, then closed. h,t =0.

[0088] The method of determining the scenic area opening status weight sequence based on the preset scenic area opening status weight and the closing time sequence of surrounding scenic areas can be: defining the scenic area opening status weight sequence as cw h , making CWh =closed h Where h = 1, 2, ..., H, and cw h Each element component is re-denoted as cw h,t Then we have:

[0089] cw h =[cw h,1 cw h,2 ...,cw h,t , ..., cw h,T ]

[0090] Iterate through the surrounding scenic areas h of the target scenic area, h = 1, 2, 3, ... H. The iteration time t = 1, 2, 3... T. If cw h,t When = 1, let cw h,t =0.8 (meaning the surrounding scenic area h is closed at this time, take w) state =0.8) If cw h,t =0, let cw h,t =0.2 (meaning the surrounding scenic area h is not closed at this time, take w) state =0.2), by adding the influence of the preset scenic area opening status weight, the scenic area opening status weight sequence is obtained.

[0091] It should be noted that the spherical distance between the surrounding scenic areas and the target scenic area can be calculated as follows: Let the latitude and longitude coordinates of the scenic areas be [Long(i), lat(i)], then the spherical distance between any scenic area i and the target scenic area j can be calculated using the following formula:

[0092]

[0093] Where a = Lat(j) - Lat(i), b = Long(j) - Long(i), and the calculated S(i,j) is in kilometers. The spherical distances between the target scenic area and its surrounding scenic areas can be calculated using the above formula, denoted as:

[0094] dis=[dis1, dis2,..., dis h , ...,dis H ]

[0095] In this embodiment, based on the pre-set effective influence radius of surrounding scenic areas, scenic areas whose spherical distance from the target scenic area is less than or equal to the effective influence radius can be included as surrounding scenic areas in the prediction of visitor flow. For example, if the effective influence radius of surrounding scenic areas is D = 6.5KM, the 5 surrounding scenic areas closest to the target scenic area can be selected based on the effective influence radius of surrounding scenic areas, then H equals 5.

[0096] And take the number of surrounding scenic areas for each research scenic area, that is, take the nearest surrounding scenic areas.

[0097] The determination of the IDW weight of the surrounding scenic areas based on the spherical distance between the surrounding scenic areas and the target scenic area can be calculated using the following formula:

[0098]

[0099] The determination of the closure impact factor based on the closure time sequence of the surrounding scenic spots and the IDW weight can be calculated using the following formula to calculate the closure impact factor of the h-th scenic spot:

[0100] epi 1,h =closed h ·idw h

[0101] Among them, epi 1, h The factor used to characterize the impact of closing the h-th scenic area can be a time series, closed h Used to characterize the closing time sequence of surrounding scenic areas of the h-th scenic area, idw h The IDW weights are used to characterize the h-th scenic area. Due to epi 1,h This is the time series of the impact factor of the closure of the h-th surrounding scenic spot, and each component is denoted as... The impact factor of the closure of the h-th scenic spot can be obtained as follows:

[0102]

[0103] The impact factor of park closure, which is composed of the time series of the impact factors of the closure of H surrounding scenic spots, can be:

[0104] epi 1 =[epi 1,1 epi 1,2 , ..., epi 1,h , ..., epi 1,H ]

[0105] It should be noted that the determination of the visitor flow fluctuation factor based on the scenic area's opening status weight sequence and the surrounding scenic area information can be achieved by calculating the visitor flow fluctuation factor of the h-th surrounding scenic area at time t using the following formula:

[0106]

[0107] in, The passDiff factor is used to characterize the passenger flow fluctuation of the h-th surrounding scenic spot at time t.h,t cw is used to characterize the temporal difference component of the h-th surrounding scenic area at time t. h,t The weights of the h-th surrounding scenic area at time t represent the open state of the area.

[0108] The temporal difference component of the h-th surrounding scenic spot at time t can be determined in the following way:

[0109] Extract the historical visitor flow time sequence of surrounding scenic spots with a time length of T from the surrounding scenic spot information, and record it as:

[0110] pass h =[pass h,1 pass h,2 ... pass h,t ... pass h,T ]

[0111] h = 1, 2, ..., H

[0112] The temporal difference component of the h-th surrounding scenic spot at time t is calculated using the following formula:

[0113] passDiff h,t =pass h,t-i -pass h,t

[0114] t = 1, 2, ..., T

[0115] h = 1, 2, ..., H

[0116] In this embodiment, the first-order difference of the visitor flow time series of the scenic area is constructed, i.e., i = 1. Then the first-order time series difference sequence of the surrounding scenic area h is:

[0117] passDiff h =[passDiff h,1 passDiff h,2 ...,passDiff h,t ...passDiff h,T ]

[0118] In this embodiment, it can also be determined whether the spherical distance between the surrounding scenic area and the target scenic area is greater than the pre-set effective influence radius D of the surrounding scenic area. If the spherical distance between the surrounding scenic area and the target scenic area is greater than the pre-set effective influence radius D of the surrounding scenic area, then it can be made

[0119] By iterating through the time period T, we can obtain the visitor flow fluctuation factor of the h-th surrounding scenic spot:

[0120]

[0121] Where h = 1, 2, 3...H, we can obtain the passenger flow fluctuation factor that includes various surrounding scenic spots:

[0122] epi 2 =[epi 2,1 epi 2,2 , ..., epi 2,h , ..., epi 2,H ]

[0123] Based on the above calculations, the resulting factors for the impact of park closure and passenger flow fluctuations can be:

[0124] epi 1 =[epi 1,1 epi 1,2 , ..., epi 1,h , ..., epi 1,H ]

[0125] epi 2 =[epi 2,1 epi 2,2 , ..., epi 2,h , ..., epi 2,H ]

[0126] The passenger flow observation sequence O constructed based on the park closure impact factor and the passenger flow fluctuation factor can be:

[0127] O = [epi] 1 epi 2 ]

[0128] Expanding O further, we get:

[0129] O = [epi] 1,1 epi 1,2 , ..., epi 1,H epi 2,1 epi 2,2 , ..., epi 2,H ]

[0130] The passenger flow observation sequence O at each time t t It could be:

[0131]

[0132] For convenience, in this embodiment, each component can be uniformly represented as... (where g = 1, 2, ..., G, and G represents the passenger flow observation sequence O) t The element in the middle represents that O is about to be... t element epif,h Use in the following order express:

[0133]

[0134] Therefore, the passenger flow observation sequence O at each time t t It can be rewritten as:

[0135]

[0136] Where G = 2H, and if the number of surrounding scenic spots selected is 5, then G = 10.

[0137] Step S30: Determine the passenger flow probability distribution matrix based on the passenger flow observation sequence.

[0138] It should be noted that the passenger flow probability distribution matrix can include the distribution probability of the passenger flow of the target scenic area compared to historical passenger flow under various hidden states. The hidden states can include: "increasing passenger flow," "decreasing passenger flow," and "causing fluctuations in passenger flow." Therefore, the passenger flow probability distribution matrix can include the probability that the passenger flow of the target scenic area will increase, decrease, and fluctuate. Determining the passenger flow probability distribution matrix based on the passenger flow observation sequence can be achieved by inputting the passenger flow observation sequence into a pre-trained prediction model to obtain the passenger flow probability distribution matrix output by the prediction model. The prediction model can be a model obtained by pre-training a neural network model based on historical passenger flow information of the target scenic area and surrounding scenic areas, which can accurately predict the passenger flow probability distribution matrix of the target scenic area. The neural network model can be a GMM-CHMM joint model.

[0139] Step S40: Based on the preset passenger flow prediction model, use the passenger flow probability distribution matrix to predict the passenger flow of the target scenic area.

[0140] It should be noted that the preset passenger flow prediction model can be a model obtained by training a neural network model in advance based on the historical passenger flow information of the target scenic spot and the historical passenger flow information of surrounding scenic spots. It can accurately predict the passenger flow of the target scenic spot. The neural network model can be a long short-term memory network model.

[0141] Furthermore, in order to accurately predict the visitor flow of the target scenic spot, before step S40, the following may be included: determining the visitor flow influencing characteristic factors and obtaining the relevant information corresponding to the visitor flow influencing characteristic factors;

[0142] Construct a passenger flow data matrix based on the aforementioned passenger flow influencing characteristic factors and the aforementioned relevant information;

[0143] The step of predicting the passenger flow of the target scenic area based on the preset passenger flow prediction model and the passenger flow probability distribution matrix includes:

[0144] Based on a preset passenger flow prediction model, the passenger flow probability distribution matrix and the passenger flow data matrix are used to predict the passenger flow of the target scenic area.

[0145] It should be noted that the passenger flow influencing factor can be a pre-set factor that may affect the passenger flow of the scenic area. For example, whether it is a holiday, whether it is raining, temperature, and if there is an epidemic, the number of confirmed cases in the province or city where the target scenic area is located can also be included. The relevant information corresponding to the passenger flow influencing factor can be: if the passenger flow influencing factor is weather, then the relevant information can include weather information; if the passenger flow influencing factor is whether it is a holiday, then the relevant information can include holiday information... The passenger flow data matrix constructed based on the passenger flow influencing factor and the relevant information can be constructed based on the passenger flow influencing factor and the relevant information using the following formula:

[0146]

[0147]

[0148]

[0149] F5 = [num1, ..., num] t , ...,num T ]

[0150] It should be understood that F2 can be used to characterize the passenger flow data matrix corresponding to whether it is a holiday or not, which can contain two binary variables that change with time t: whether it is a holiday or not is represented by variable I. 1,t Indicates whether to use variable I for weekends. 2,1 This indicates that the values ​​are either 0 or 1, with 1 for "yes" and 0 for "no". F3 can be used to characterize the passenger flow data matrix corresponding to temperature as a characteristic factor affecting passenger flow, containing two continuous variables that change over time: the highest temperature tpr max,t The lowest temperature TPR min,t F4 can be used to characterize passenger flow data matrices corresponding to weather conditions, which are influenced by passenger flow characteristics. It contains four time-varying binary variables: whether it is cloudy (wtr1), whether it is raining (wtr2), whether it is snowing (wtr3), and whether it is sunny (wtr4), each taking a value of 0 or 1, with 1 for "yes" and 0 for "no". F5 can be used to characterize passenger flow data matrices corresponding to the number of confirmed COVID-19 cases in the city on a given day, and can be a continuous variable (num) that changes over time (t). t .

[0151] The method of predicting visitor flow to the target scenic area using the visitor flow probability distribution matrix and the visitor flow data matrix based on the preset visitor flow prediction model can be achieved by inputting the visitor flow probability distribution matrix and the visitor flow data matrix into the preset visitor flow prediction model to obtain the prediction result output by the preset visitor flow prediction model. The prediction result can be one of the following: the visitor flow to the target scenic area will increase, decrease, or fluctuate.

[0152] This embodiment acquires information about the target scenic area and surrounding scenic areas; determines a visitor flow observation sequence based on the target scenic area information and the surrounding scenic area information; determines a visitor flow probability distribution matrix based on the visitor flow observation sequence; and predicts visitor flow for the target scenic area using the visitor flow probability distribution matrix based on a preset visitor flow prediction model. Compared to existing methods that predict visitor flow based on historical visitor flow of the target scenic area, this embodiment combines information from surrounding scenic areas to predict visitor flow for the target scenic area, improving the accuracy of visitor flow prediction.

[0153] refer to Figure 3 , Figure 3 This is a flowchart illustrating the second embodiment of the scenic area visitor flow prediction method of the present invention.

[0154] Based on the first embodiment described above, in this embodiment, the steps preceding step S30 include:

[0155] Step S001: Obtain the training dataset and determine the observation sequence variables of the preset first prediction model based on the training dataset.

[0156] It should be noted that the training dataset can be historical visitor flow information of the target scenic area and surrounding scenic areas, including visitor flow and closing information at various times. The step of determining the observation sequence variables of the preset first prediction model based on the training dataset can refer to the steps in the above embodiment for determining the visitor flow observation sequence based on the target scenic area information and the surrounding scenic area information. This embodiment will not repeat the steps here. In this embodiment, the observation sequence variables are 2H, where H is the number of surrounding scenic areas. When represented as a sequence, the steps are consistent with those in the above embodiment for calculating the visitor flow observation sequence. The preset first prediction model can be a probabilistic graphical model, such as a CHMM model.

[0157] Step S002: Obtain the predefined hidden state of the first prediction model, and determine the joint probability based on the hidden state of the first prediction model and the observed sequence variables.

[0158] It should be noted that the predefined hidden states of the first prediction model can include three hidden states: "increasing visitor flow," "decreasing visitor flow," and "causing fluctuations in visitor flow." The number of hidden states N = 3. The hidden state sequence of the surrounding scenic areas can be obtained based on visitor flow information from the surrounding scenic area information, which can be represented by Q. This sequence can include the hidden states corresponding to each time t. Determining the joint probability based on the hidden states of the first prediction model and the observed sequence variables can be achieved by determining the hidden state sequence Q of the surrounding scenic areas based on the hidden states of the first prediction model and visitor flow information from the surrounding scenic area information. The hidden state sequence Q contains q... t Let represent the hidden state variable corresponding to time t. The joint probability p(O,Q|λ) determined based on the hidden state sequence Q and the observed sequence variables can be:

[0159]

[0160] Where λ = {π, A, B} are the model parameters in the preset first prediction model. The output observation probability B is represented by a continuous probability distribution. Since the Gaussian Mixture Model (GMM) is suitable for representing any form of continuous probability distribution, this embodiment will use a preset second prediction model to fit one of the parameters of the preset first prediction model—the output observation probability B.

[0161] Step S003: Establish a preset second prediction model, and construct a preset third prediction model based on the preset second prediction model and the preset first prediction model.

[0162] It should be noted that the preset second prediction model can be a probabilistic graphical model, such as a GMM model. The following uses the GMM model as an example to detail the steps for establishing the preset second prediction model:

[0163] Suppose that the GMM is composed of M G-dimensional (single) Gaussian distribution models superimposed, and the probability density function of each G-dimensional (single) Gaussian distribution model is:

[0164]

[0165] Where, μ im ∈R G×1 and ∑ im ∈R G×G Let G be the G×1 dimensional mean vector and G×G dimensional covariance matrix of the Gaussian distribution, respectively. And let them be denoted as... That is, for the observed variables of the epidemic factors in the surrounding scenic areas at each time t, we have:

[0166]

[0167] Let c im Let m be the Gaussian distribution in the GMM at state i. The weighting coefficients (m = 1, 2, 3...M) are then used in accordance with the Gaussian probability density function of the GMM. To fit the probability density function b of the observation sequence O generated by various hidden states i (O), as shown in the following formula:

[0168]

[0169] Where N is the number of hidden states, which is 3 in this embodiment. In this embodiment, M is set to 2, that is, two dimensional (single) Gaussian distribution models are superimposed.

[0170] It should be noted that the construction of the preset third prediction model based on the preset second prediction model and the preset first prediction model can be:

[0171] Based on the established second-prediction model, the parameters of the output observation probability B of the first-prediction model can be uniformly rewritten as φ = {c, μ, ∑}. Therefore, the HCMM model parameters can be rewritten as λ = {π, A, φ}. By rewriting the parameters in the two models, and combining the second-prediction model and the first-prediction model, a third-prediction model is obtained.

[0172] Step S004: Train the preset third prediction model based on the joint probability to obtain the target prediction model.

[0173] It should be noted that the training of the preset third prediction model based on the joint probability to obtain the target prediction model can be achieved by marginalizing the observed sequence variables and the hidden variables of the joint probability function, i.e.:

[0174]

[0175] Where p(O|λ) represents the likelihood function of the observation sequence O, O represents the observation sequence corresponding to the observation sequence variable of the preset first prediction model, p(O, Q|λ) represents the joint probability, and Q represents the hidden state sequence.

[0176] For the likelihood function p(O|λ), this embodiment uses an algorithm based on the EM method framework to maximize the likelihood function and then estimate the model parameters. Specifically, it can be:

[0177] First, select a set of initial parameters for the model, denoted as λ. Since the EM method framework includes an iterative process, let the iteration number variable be n (where n = 1, 2, 3, ...). Before entering the iterative process within the EM method framework, it is necessary to assign initial values ​​to the parameters in the model. Usually, the initial values ​​of π and A have little impact on the model. The initial values ​​in this embodiment are as follows:

[0178] The initial value of the hidden state probability distribution matrix is ​​[1, 0, 0], and denoted as π. (0) ,Right now:

[0179] π (0) =[1, 0, 0]

[0180] Let A be the initial value of the initial state transition matrix. (0) Specifically:

[0181]

[0182] For φ, based on the characteristics of scenic area visitor flow data, this embodiment sets the number M of Gaussian distributions in the GMM to 1. Initialization of φ (0) Other parameters are set randomly while the constraints are met.

[0183] From the initialization, the model parameters are obtained here:

[0184] λ (0) ={π (0) A (0) φ (0)}

[0185] E-step of the EM algorithm:

[0186] In step E, this embodiment will use the initialized model parameters λ to calculate the posterior probability distribution p(Q|O, λ) of the hidden variables, specifically:

[0187] According to the EM algorithm, the expected value of the logarithm of the complete data likelihood function is defined. Using this posterior probability distribution to estimate the expected value of the logarithm of the complete data likelihood function, a function with respect to the parameter λ can be obtained, defined as:

[0188]

[0189] Define the relevant variables for the posterior probability:

[0190] For convenience, this embodiment will hide the variable q. t The marginal posterior probability is denoted as γ t (i) represents the hidden state s at time t, given a "preset third prediction model" and an observation sequence O. i Given the posterior probability, we have:

[0191]

[0192] Hidden variables q that are consecutively adjacent at two time points t t and q t+1 The joint posterior probability distribution is denoted as ξ. t (i, j) represents: given the model's preset third prediction model and the observation sequence O, the hidden state of the surrounding scenic area at time t is s. i And the hidden state at time t+1 is s. j The posterior joint probability is then:

[0193]

[0194] Where, γ t (i) and ξ t Each (i, j) satisfies a normalization relation, which can be expressed mathematically as follows:

[0195]

[0196]

[0197] Solve for γ t (i) and ξ t The formula for calculating (i, j): Substitute the joint probability density function of O and Q into formula (2) (i.e.) From this, we can obtain formula (3):

[0198]

[0199]

[0200]

[0201] Furthermore, based on the underlying mathematical theory, γ t (i) can be transformed using Bayes' theorem as follows:

[0202]

[0203] ξ t (i, j) is transformed into:

[0204]

[0205] Define the forward joint probability α t (i) and the backward joint probability β t (i):

[0206] In this embodiment, p(o1o2...o)t q t =s i |λ) is denoted as α t (i), which represents the forward joint probability in the forward algorithm for solving the likelihood of a Hidden Markov Model, i.e.:

[0207] α t (i) = p(o1, o2, ..., o t q t =s i |λ)

[0208] And when t = 1, α1(i) is:

[0209] α1(i)=π (n) ·b i (O1)

[0210] p(o) t+1 o t+2 ...o T |q t =s i ,λ) is denoted as β t (i) represents the backward joint probability in the backward algorithm for solving the likelihood of a Hidden Markov Model, i.e.:

[0211] β t (i)=p(O t+1 O t+2 ...O T |q t =s i ,λ)

[0212] And when t = T, β t (i) is:

[0213] β T (i)=1

[0214] Therefore, γ t (i) and ξ t (i, j) is represented as:

[0215]

[0216] Thus, γ was obtained. t (i) and ξ t The final calculation formula for (i, j) is obtained, and the goal of the E-step is to derive the efficient calculation formula for γ. t (i) and ξ t The calculation formula for (i, j).

[0217] M-step of the EM algorithm:

[0218] In M steps, maximize the parameter λ = {π, A, φ}. You can get The estimated value. The algorithm iteration process begins: based on the observation sequence O and the preset first prediction model parameters λ recursively estimated in the previous iteration. (n) ={π (n) A (n) φ (n)}, and in each iteration, γt(i) and ξ t (i, j) are treated as constants.

[0219] Since the number of iterations in this embodiment is represented by n, the calculation of the nth iteration can be expressed as: the parameter λ of the (n+1)th group of the "preset third prediction model" obtained recursively in the nth iteration. (n+1) ={π (n+1) A (n+1) φ (n+1)}, where n = 1, 2, 3...

[0220] For n = 0, 1, 2, ..., iteratively calculate the forward probability. Let n = 0, and in the nth iteration, recursively calculate the forward probability. (Where t = 2, 3, ... T, I = 1, 2, 3... N) (The algorithm in this embodiment is also called the forward algorithm)

[0221] Based on the initialized "preset third prediction model" model parameters λ (0) ={π (0) A (0) φ (0) (When the number of iterations n = 0) or the model parameter λ obtained from the (n-1)th iteration. (n) ={π (n) A (n) φ (n) (When the number of iterations n is greater than or equal to 1), the forward probability is calculated recursively. Where t = 2, 3, ..., T, I = 1, 2, 3...N. Let time t = 1, and calculate the forward probability α at time t+1 according to the following formula. t+1 (i):

[0222]

[0223] Let time t = t+1, return to the next step: calculate the forward probability α at time t+1 according to the following formula. t+1 (i), and repeatedly calculate the forward probability α at time t+1 according to the following formula. t+1 (i), and the step of setting time t = t + 1, when t = T, stop the iterative calculation of this layer.

[0224] In the nth iteration, the backward probability is calculated recursively. (where t = T-1, T-2, ..., 1; I = 1, 2, ..., N) (This algorithm in this embodiment is also called the "backward algorithm"), based on the initialized "preset third prediction model" model parameters λ (0) ={π (0) A (0) φ (0) (When the number of iterations n = 0) or the model parameter λ obtained from the (n-1)th iteration. (n) ={π (n) A (n) φ (n) (When the number of iterations n is greater than or equal to 1), the backward probability β is calculated recursively. t (i) (where t=T-1, T-2,...,1; I=1,2,...,N)

[0225] Let time t = T-1, and calculate the backward probability at time t using the following formula.

[0226]

[0227] Let time t = t-1, then return to the formula for calculating the backward probability at time t. The steps are repeated, and the backward probability at time t is calculated using the following formula. Let the step at time t = t-1 be completed. When t = 0, stop the iterative calculation of this layer.

[0228] In the nth iteration, calculate and The values ​​of (where t = 1, 2, 3, ..., T) will be calculated for all... and Substitute the following formulas (4) and (5) to calculate the current model parameters. and (where t = 1, 2, 3, ..., T).

[0229]

[0230]

[0231] Then calculate the model parameters obtained in the nth iteration. It can be the result calculated using the above formulas (4) and (5). Substituting into equation (6) obtained by the Lagrange multiplier method, we can calculate the (n+1)th set of model parameters obtained in the nth iteration.

[0232]

[0233] Where N can be the number of hidden states of a predefined first prediction model.

[0234] Calculate the model parameters obtained in the nth iteration It can be the result calculated using the above formulas (4) and (5). and (where t = 1, 2, 3, ..., T) Substitute these values ​​into the formula (7) for maximizing the estimate of A obtained through the Lagrange multiplier method:

[0235]

[0236] Calculate the model parameters obtained in the nth iteration Specifically, it could be:

[0237] First calculate in the nth iteration Value of γ: Define γ t (i,m) represents the m-th Gaussian distribution interpretation of the output observation probability of the system at time t with hidden state i and m. t The probability of (where i = 1, 2...N; m = 1, 2...M) can be calculated using the following formula.

[0238]

[0239] The result of the calculation in the current nth iteration and the initial value φ (0) In (When n-1 = 0) or the result of the previous (n-1)th iteration (When n-1 is greater than or equal to 1), substitute into the above formula In formula (8), the result calculated in the nth iteration is obtained. The value of .

[0240] In the nth iteration, calculate respectively Based on the theoretical derivation of the underlying mathematics for solving the model parameter problem using Gaussian mixture models, the parameters of the Gaussian mixture model are obtained. The calculation formulas for the estimated results are as follows: formulas (9)-(11). The calculated results... and Substitute them separately and and The calculation formula:

[0241]

[0242]

[0243]

[0244] Let n = n + 1. When n is greater than or equal to end, set end = 1000, terminate the recursive iteration, and obtain the final estimated parameter λ of the "preset third prediction model". (end) ={π (end) A (end) φ (end)}

[0245] The probability distribution matrix of the target scenic area is output based on the "preset third prediction model": the final model estimate λ is obtained according to the EM method framework. (end) The parameters are then recursively calculated again using the aforementioned forward algorithm to determine the final α. t (i).

[0246] Similarly, the final model estimation parameter λ obtained based on the EM method framework (end) Then, using the aforementioned backward algorithm, the final determined β is recursively calculated. t (i).

[0247] Based on the calculated α t (i) and β t (i) γ is calculated using the following formula t (i), where: t=2, 3,...T, i=1, 2,...N.

[0248]

[0249] Based on the calculated γ t (i) Observation sequence O, final model parameters λ (end) This allows us to obtain the probability distribution matrix [γ] corresponding to the target scenic area. t (i)] N×T (Since the hidden state variable in this embodiment is 3, N=3, and the resulting probability distribution matrix is ​​a 3-row matrix):

[0250]

[0251] By training the preset third prediction model through the above steps, a target prediction model that can output the passenger flow probability distribution matrix can be obtained.

[0252] This embodiment acquires a training dataset and determines the observation sequence variables of a preset first prediction model based on the training dataset; it acquires the predefined hidden states of the preset first prediction model and determines the joint probability based on the hidden states and the observation sequence variables; it establishes a preset second prediction model and constructs a preset third prediction model based on the preset second prediction model and the preset first prediction model; it trains the preset third prediction model based on the joint probability to obtain a target prediction model. This embodiment obtains a target prediction model capable of predicting the probability distribution matrix of passenger flow by training the preset third prediction model, which can assist users in predicting passenger flow in scenic areas and improve user experience.

[0253] refer to Figure 4 , Figure 4 This is a flowchart illustrating the third embodiment of the scenic area visitor flow prediction method of the present invention.

[0254] Based on the above embodiments, in this embodiment, before step S40, the method further includes:

[0255] Step S005: Obtain the sample passenger flow probability distribution matrix output by the target prediction model.

[0256] It should be noted that the passenger flow probability distribution matrix may be a probability distribution matrix generated by the target prediction model based on the training dataset during the model training phase.

[0257] Step S006: Concatenate the sample passenger flow probability distribution matrix and the sample data matrix to obtain the sample training set.

[0258] It should be noted that the sample data matrix can be a data matrix corresponding to the influencing factors affecting passenger flow generated from the training data. The steps for generating F2, F2, F4, and F5 in the above embodiments can be referred to, and will not be repeated here. The concatenation of the sample passenger flow probability distribution matrix and the sample data matrix can be achieved by first normalizing the range of the continuous variables in F3 and F5, and then vertically concatenating and transposing the normalized F3 and F5, as well as F2 and F4, to obtain the sample training set X:

[0259]

[0260] Where F1 is the sample passenger flow probability distribution matrix output by the target prediction model, i.e., [γ t (i)] N×T .

[0261] Step S007: Train the initial passenger flow prediction model based on the sample training set and the preset model hyperparameters to obtain the preset passenger flow prediction model.

[0262] It should be noted that the initial passenger flow prediction model can be a neural network model, such as a Long Short-Term Memory (LSTM) network model. The following explanation will use the LSTM model as an example.

[0263] It should be understood that the LSTM model is a process of mapping x to y, where X is a T×K dimension matrix and Y is a T-row column vector. An LSTM can have multiple x values ​​corresponding to the same y. This embodiment uses this model for the final tourist flow prediction. The sample tourist flow probability distribution matrix output by the target prediction model is used to construct the X variable of the LSTM model. The historical tourist flow time series data of the target scenic area is denoted as Y, which contains the tourist flow of the target scenic area at each time point within a time period of length T, denoted as:

[0264] Y = [y1, y2, ..., y] T ]

[0265] It should be noted that the process of training the initial passenger flow prediction model based on the sample training set and preset model hyperparameters to obtain the preset passenger flow prediction model can be as follows: Y is used as the main prediction variable, and X is used as the auxiliary prediction variable. X and Y constitute a complete dataset for model learning and prediction. The dataset is divided into time intervals according to a preset ratio (the preset ratio can be a pre-set ratio, for example, 7:1:2), and the dataset for model learning is divided according to the divided time intervals: the data corresponding to the time interval [0, 0.7T] is used as the training set [Y]. train X train The data corresponding to the time interval (0.7T, 0.8T) is used as the validation set [Y]. valid X valid The data corresponding to (0.8T, T) is used as the test set [Y]. test X test ]. Divide the [Y] train X train ]、[Y valid X valid ]、[Y test X test Input the LSTM model together. Specify the following preset model hyperparameters: historical fitting days (day_his), prediction days (day_pred), prediction lag (lag), batch size (batch_size), number of LSTM layers (layers), hidden layer dimension (hidden_dim), learning rate (lr), and number of epochs (epochs). Train the model using the TensorFlow framework. This example provides reference model parameter settings as shown in Table 1 below:

[0266] Table 1 - Model Parameter Settings

[0267] hyperparameter name Reference settings day_his 250 day_pred 6 lag 8 batch_size 32 layers 2 hidden_dim 16 lr 0.01 epochs 300

[0268] Furthermore, in order to improve the accuracy of passenger flow prediction, after step S007, the method further includes: inputting the test set in the sample training set into the preset passenger flow prediction model to obtain the prediction result output by the preset passenger flow prediction model; determining the evaluation index of the preset passenger flow prediction model based on the prediction result and the passenger flow data corresponding to the test set; and determining the prediction effect of the preset passenger flow prediction model based on the evaluation index.

[0269] It should be noted that the prediction result can be the result of the preset passenger flow prediction model applied to the X values ​​in the test set. test The prediction result output can be denoted as: The visitor flow data corresponding to the test set can be the actual visitor flow data of the scenic area corresponding to the test set, denoted as: Y test,pred = [y1, y2, ..., y t , ..., Y day_his ],

[0270] The evaluation index of the preset passenger flow prediction model, determined based on the prediction results and the passenger flow data corresponding to the test set, can be calculated using the following formula: Evaluation index R 2 And MAPE:

[0271]

[0272]

[0273] Among them, R 2 The range of is 0 to 1. The closer its value is to 1, the stronger the explanatory power of variable X on Y, and the better the model fits the data. For MAPE, the smaller its value, the better the model fit and the higher its accuracy. Overall, R... 2 And MAPE can be used to evaluate the model's effectiveness in predicting visitor flow in scenic areas.

[0274] This embodiment obtains the sample passenger flow probability distribution matrix output by the target prediction model; it concatenates the sample passenger flow probability distribution matrix and the sample data matrix to obtain a sample training set; and it trains the initial passenger flow prediction model based on the sample training set and preset model hyperparameters to obtain a preset passenger flow prediction model. This embodiment improves the accuracy of passenger flow prediction.

[0275] Reference Figure 5 , Figure 5This is a structural block diagram of the first embodiment of the scenic area visitor flow prediction device of the present invention.

[0276] like Figure 5 As shown, the scenic area visitor flow prediction device proposed in this embodiment of the invention includes:

[0277] The acquisition module 10 is used to acquire information about the target scenic area and information about the surrounding scenic areas.

[0278] The passenger flow observation sequence determination module 20 is used to determine the passenger flow observation sequence based on the target scenic area information and the surrounding scenic area information;

[0279] Passenger flow probability distribution matrix prediction module 30 is used to determine the passenger flow probability distribution matrix based on the passenger flow observation sequence;

[0280] The passenger flow prediction module 40 is used to predict the passenger flow of the target scenic area based on the passenger flow probability distribution matrix using a preset passenger flow prediction model.

[0281] This embodiment acquires information about the target scenic area and surrounding scenic areas; determines a visitor flow observation sequence based on the target scenic area information and the surrounding scenic area information; determines a visitor flow probability distribution matrix based on the visitor flow observation sequence; and predicts visitor flow for the target scenic area using the visitor flow probability distribution matrix based on a preset visitor flow prediction model. Compared to existing methods that predict visitor flow based on historical visitor flow of the target scenic area, this embodiment combines information from surrounding scenic areas to predict visitor flow for the target scenic area, improving the accuracy of visitor flow prediction.

[0282] It should be noted that the workflow described above is merely illustrative and does not limit the scope of protection of this invention. In practical applications, those skilled in the art can select some or all of the workflow to achieve the purpose of this embodiment according to actual needs, and no restrictions are imposed here.

[0283] In addition, for technical details not described in detail in this embodiment, please refer to the scenic area visitor flow prediction method provided in any embodiment of the present invention, which will not be repeated here.

[0284] Based on the first embodiment of the scenic area visitor flow prediction device of the present invention, a second embodiment of the scenic area visitor flow prediction device of the present invention is proposed.

[0285] In this embodiment, the passenger flow prediction module 40 is further configured to determine passenger flow influencing characteristic factors and obtain relevant information corresponding to the passenger flow influencing characteristic factors;

[0286] Construct a passenger flow data matrix based on the aforementioned passenger flow influencing characteristic factors and the aforementioned relevant information;

[0287] The step of predicting the passenger flow of the target scenic area based on the preset passenger flow prediction model using the passenger flow probability distribution matrix includes: predicting the passenger flow of the target scenic area based on the preset passenger flow prediction model using the passenger flow probability distribution matrix and the passenger flow data matrix.

[0288] Furthermore, the passenger flow observation sequence determination module 20 is also used to determine the impact factor of park closure and the passenger flow fluctuation factor based on the target scenic area information and the surrounding scenic area information;

[0289] A passenger flow observation sequence is constructed based on the park closure impact factor and the passenger flow fluctuation factor.

[0290] Furthermore, the passenger flow observation sequence determination module 20 is also used to obtain preset scenic area opening status weights;

[0291] The closure sequence of surrounding scenic spots is determined based on the surrounding scenic spot information, and the opening status weight sequence of scenic spots is determined based on the preset scenic spot opening status weight and the surrounding scenic spot closure sequence.

[0292] The IDW weights of the surrounding scenic areas are determined based on the spherical distance between the surrounding scenic areas and the target scenic area;

[0293] The impact factor of park closure is determined based on the closure time sequence of the surrounding scenic spots and the IDW weights.

[0294] The visitor flow fluctuation factor is determined based on the weight sequence of the scenic area's opening status and the information of the surrounding scenic areas.

[0295] Furthermore, the passenger flow probability distribution matrix prediction module 30 is also used to acquire a training dataset and determine the observation sequence variables of the preset first prediction model based on the training dataset.

[0296] Obtain a predefined hidden state of the first prediction model, and determine the joint probability based on the hidden state of the first prediction model and the observed sequence variables;

[0297] Establish a preset second prediction model, and construct a preset third prediction model based on the preset second prediction model and the preset first prediction model;

[0298] The target prediction model is obtained by training the preset third prediction model based on the joint probability.

[0299] Furthermore, the passenger flow prediction module 40 is also used to obtain the sample passenger flow probability distribution matrix output by the target prediction model;

[0300] The sample passenger flow probability distribution matrix and the sample data matrix are concatenated to obtain the sample training set;

[0301] The initial passenger flow prediction model is trained based on the sample training set and the preset model hyperparameters to obtain the preset passenger flow prediction model.

[0302] Furthermore, the passenger flow prediction module 40 is also used to input the test set in the sample training set into the preset passenger flow prediction model to obtain the prediction result output by the preset passenger flow prediction model.

[0303] The evaluation index of the preset passenger flow prediction model is determined based on the prediction results and the passenger flow data corresponding to the test set.

[0304] The prediction performance of the preset passenger flow prediction model is determined based on the evaluation indicators.

[0305] Other embodiments or specific implementations of the scenic area visitor flow prediction device of the present invention can be referred to the above-described method embodiments, and will not be repeated here.

[0306] Furthermore, this embodiment of the invention also proposes a storage medium storing a scenic area visitor flow prediction program, which, when executed by a processor, implements the steps of the scenic area visitor flow prediction method described above.

[0307] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.

[0308] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0309] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as read-only memory / random access memory, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0310] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.

Claims

1. A method for predicting visitor flow in a scenic area, characterized in that, The method for predicting visitor flow in scenic areas includes the following steps: Obtain information about the target scenic area and surrounding scenic areas; A visitor flow observation sequence is determined based on the target scenic area information and the surrounding scenic area information; Determine the passenger flow probability distribution matrix based on the passenger flow observation sequence; Based on the preset passenger flow prediction model, the passenger flow probability distribution matrix is ​​used to predict the passenger flow of the target scenic area. The step of determining the visitor flow observation sequence based on the target scenic area information and the surrounding scenic area information includes: Obtain the preset weights of scenic area opening status; The closure sequence of surrounding scenic spots is determined based on the surrounding scenic spot information, and the opening status weight sequence of scenic spots is determined based on the preset scenic spot opening status weight and the surrounding scenic spot closure sequence. The IDW weights of the surrounding scenic areas are determined based on the spherical distance between the surrounding scenic areas and the target scenic area; The impact factor of park closure is determined based on the closure time sequence of the surrounding scenic spots and the IDW weights. The visitor flow fluctuation factor is determined based on the weight sequence of the scenic area's opening status and the information of the surrounding scenic areas. A passenger flow observation sequence is constructed based on the park closure impact factor and the passenger flow fluctuation factor; The target scenic area information and the surrounding scenic area information include scenic area closure time data, scenic area historical visitor flow data, and latitude and longitude data of the scenic area location.

2. The scenic area visitor flow prediction method as described in claim 1, characterized in that, Before the step of predicting the passenger flow of the target scenic area using the passenger flow probability distribution matrix based on the preset passenger flow prediction model, the following steps are included: Identify the characteristic factors affecting passenger flow and obtain the relevant information corresponding to the characteristic factors affecting passenger flow, wherein the characteristic factors affecting passenger flow include factors influencing passenger flow in scenic areas; A passenger flow data matrix is ​​constructed based on the aforementioned passenger flow influencing characteristic factors and the aforementioned relevant information; The step of predicting the passenger flow of the target scenic area based on the preset passenger flow prediction model and the passenger flow probability distribution matrix includes: Based on a preset passenger flow prediction model, the passenger flow probability distribution matrix and the passenger flow data matrix are used to predict the passenger flow of the target scenic area.

3. The scenic area visitor flow prediction method as described in any one of claims 1-2, characterized in that, Before the step of determining the passenger flow probability distribution matrix based on the passenger flow observation sequence, the method further includes: Obtain a training dataset, and determine the observation sequence variables of the preset first prediction model based on the training dataset; Obtain a predefined hidden state of the first prediction model, and determine the joint probability based on the hidden state of the first prediction model and the observed sequence variables; Establish a preset second prediction model, and construct a preset third prediction model based on the preset second prediction model and the preset first prediction model; The target prediction model is obtained by training the preset third prediction model based on the joint probability. The preset first prediction model and the preset second prediction model are probabilistic graphical models.

4. The scenic area visitor flow prediction method as described in claim 3, characterized in that, Before the step of predicting the passenger flow of the target scenic area using the passenger flow probability distribution matrix based on the preset passenger flow prediction model, the method further includes: Obtain the sample passenger flow probability distribution matrix output by the target prediction model; The sample passenger flow probability distribution matrix and the sample data matrix are concatenated to obtain the sample training set; The initial passenger flow prediction model is trained based on the sample training set and the preset model hyperparameters to obtain the preset passenger flow prediction model.

5. The scenic area visitor flow prediction method as described in claim 4, characterized in that, After the step of training the initial passenger flow prediction model based on the sample training set and preset model hyperparameters to obtain the preset passenger flow prediction model, the method further includes: The test set in the sample training set is input into the preset passenger flow prediction model to obtain the prediction result output by the preset passenger flow prediction model. The evaluation index of the preset passenger flow prediction model is determined based on the prediction results and the passenger flow data corresponding to the test set. The prediction performance of the preset passenger flow prediction model is determined based on the evaluation indicators.

6. A tourist flow prediction device for scenic areas, characterized in that, The scenic area visitor flow prediction device includes: The acquisition module is used to acquire information about the target scenic area and surrounding scenic areas. A passenger flow observation sequence determination module is used to determine a passenger flow observation sequence based on the target scenic area information and the surrounding scenic area information; The passenger flow probability distribution matrix prediction module is used to determine the passenger flow probability distribution matrix based on the passenger flow observation sequence. The passenger flow prediction module is used to predict the passenger flow of the target scenic area based on the passenger flow probability distribution matrix using a preset passenger flow prediction model. The passenger flow observation sequence determination module is also used to obtain preset scenic area opening status weights; The closure sequence of surrounding scenic spots is determined based on the surrounding scenic spot information, and the opening status weight sequence of scenic spots is determined based on the preset scenic spot opening status weight and the surrounding scenic spot closure sequence. The IDW weights of the surrounding scenic areas are determined based on the spherical distance between the surrounding scenic areas and the target scenic area; The impact factor of park closure is determined based on the closure time sequence of the surrounding scenic spots and the IDW weights. The visitor flow fluctuation factor is determined based on the weight sequence of the scenic area's opening status and the information of the surrounding scenic areas. A passenger flow observation sequence is constructed based on the park closure impact factor and the passenger flow fluctuation factor; The target scenic area information and the surrounding scenic area information include scenic area closure time data, scenic area historical visitor flow data, and latitude and longitude data of the scenic area location.

7. A tourist flow prediction device for scenic areas, characterized in that, The device includes: a memory, a processor, and a scenic area visitor flow prediction program stored in the memory and executable on the processor, the scenic area visitor flow prediction program being configured to implement the steps of the scenic area visitor flow prediction method as described in any one of claims 1 to 5.

8. A storage medium, characterized in that, The storage medium stores a scenic area visitor flow prediction program, which, when executed by a processor, implements the steps of the scenic area visitor flow prediction method as described in any one of claims 1 to 5.