Disclosure of Invention
The embodiment of the disclosure provides a prediction method, a prediction device, electronic equipment and a computer-readable storage medium.
In a first aspect, an embodiment of the present disclosure provides a prediction method, including:
acquiring cross-border tour data related to a predetermined country; wherein the cross-border tour data at least comprises user attention data to the cross-border tour of the predetermined country and historical foreign exchange transaction data related to the cross-border tour generated by the predetermined country;
and predicting foreign exchange transaction data related to cross-border travel generated by the predetermined country in a future predetermined time period according to the cross-border travel data and a pre-trained prediction model.
Further, the prediction method further comprises:
obtaining a plurality of training samples; the training sample comprises cross-border travel data and real foreign exchange transaction data corresponding to the cross-border travel data;
and training a machine self-learning model by using the training samples to obtain the prediction model.
Further, the machine self-learning model includes at least a deep neural network.
Further, the cross-border game data further comprises user data.
Further, predicting the foreign exchange transaction data related to the cross-border tour generated by the predetermined country in a future predetermined time period according to the cross-border tour data and a pre-trained prediction model, comprising:
predicting the number of people who travel to the predetermined country in the future predetermined time period according to cross-border travel attention data of the user to the predetermined country and a pre-trained first prediction model, and determining a cross-border travel related first foreign exchange transaction amount in the future predetermined time period according to the number of people and per-person travel consumption in the predetermined country;
predicting a second foreign exchange transaction amount related to the cross-border tour generated by the predetermined country in the future predetermined time period according to historical foreign exchange transaction data related to the cross-border tour generated by the predetermined country and a second pre-trained prediction model;
predicting a third foreign exchange transaction amount related to cross-border travel generated by the predetermined country by the user in the future predetermined time period according to the user data and a pre-trained third prediction model;
and predicting the foreign exchange transaction amount related to cross-border travel generated by the predetermined country in the future predetermined time period according to the first foreign exchange transaction amount, the second foreign exchange transaction amount, the third foreign exchange transaction amount and a pre-trained fourth prediction model.
Further, the prediction method further comprises:
obtaining a plurality of first training samples; wherein the first training sample comprises at least cross-border travel interest data of the user for the predetermined country collected over a first predetermined historical period of time, and a real number of people traveling to the predetermined country after the first predetermined historical period of time;
and training a pre-established first machine self-learning model by using the plurality of first training samples to obtain the first prediction model.
Further, the prediction method further comprises:
obtaining a plurality of second training samples; wherein the second training sample comprises at least a sample foreign exchange transaction amount related to the cross-border trip generated by the predetermined country within a second predetermined historical time period, and a result foreign exchange transaction amount related to the cross-border trip generated by the predetermined country after the second predetermined historical time period;
and training a pre-established second machine self-learning model according to the plurality of second training samples to obtain the second prediction model.
Further, the prediction method further comprises:
obtaining a plurality of third training samples; wherein the third training sample comprises at least user data collected within a third predetermined historical time period and user foreign exchange transaction amounts corresponding to the user data and related to cross-border tours generated by the predetermined country after the third predetermined historical time period;
and training a pre-established third machine self-learning model by using the plurality of third training samples to obtain the third prediction model.
Further, the prediction method further comprises:
obtaining a plurality of fourth training samples; wherein the fourth training sample comprises at least the first, second, third, and fourth predetermined historical time periods of the foreign exchange traffic associated with cross-border tours generated in the predetermined country;
and training a pre-established fourth machine self-learning model by using the plurality of fourth training samples to obtain the fourth prediction model.
Further, the first, second, third and/or fourth machine self-learning models include at least a deep neural network.
Further, the data of interest of the user to the predetermined country cross-border tour comprises comment data of the user to the predetermined country cross-border tour.
In a second aspect, an embodiment of the present disclosure provides a prediction apparatus, including:
a first acquisition module configured to acquire cross-border travel data related to a predetermined country; wherein the cross-border tour data at least comprises user attention data to the cross-border tour of the predetermined country and historical foreign exchange transaction data related to the cross-border tour generated by the predetermined country;
and the prediction module is configured to predict foreign exchange transaction data related to the cross-border tour generated by the predetermined country in a future predetermined time period according to the cross-border tour data and a pre-trained prediction model.
Further, the prediction apparatus further includes:
a second acquisition module configured to acquire a plurality of training samples; the training sample comprises cross-border travel data and real foreign exchange transaction data corresponding to the cross-border travel data;
a first training module configured to train a machine self-learning model using the plurality of training samples, obtaining the predictive model.
Further, the machine self-learning model includes at least a deep neural network.
Further, the cross-border game data further comprises user data.
Further, the prediction module includes:
a first prediction submodule configured to predict the number of people traveling to the predetermined country within the future predetermined time period according to cross-border travel attention data of the user to the predetermined country and a pre-trained first prediction model, and determine a first foreign exchange transaction amount related to cross-border travel within the future predetermined time period according to the number of people and per-person travel consumption in the predetermined country;
a second prediction submodule configured to predict a second amount of foreign exchange transactions related to the cross-border trip generated by the predetermined country in the future predetermined time period, based on historical foreign exchange transaction data related to the cross-border trip generated by the predetermined country and a second pre-trained prediction model;
a third prediction submodule configured to predict a third foreign exchange transaction amount related to cross-border travel generated by the predetermined country by the user in the future predetermined time period according to the user data and a pre-trained third prediction model;
a fourth prediction sub-module configured to predict the foreign exchange transaction amount related to the cross-border tour generated in the predetermined country in the future predetermined time period according to the first, second and third foreign exchange transaction amounts and a pre-trained fourth prediction model.
Further, the prediction apparatus further includes:
a third acquisition module configured to acquire a plurality of first training samples; wherein the first training sample comprises at least cross-border travel interest data of the user for the predetermined country collected over a first predetermined historical period of time, and a real number of people traveling to the predetermined country after the first predetermined historical period of time;
a second training module configured to train a pre-established first machine self-learning model with the plurality of first training samples to obtain the first prediction model.
Further, the prediction apparatus further includes:
a fourth acquisition module configured to acquire a plurality of second training samples; wherein the second training sample comprises at least a sample foreign exchange transaction amount related to the cross-border trip generated by the predetermined country within a second predetermined historical time period, and a result foreign exchange transaction amount related to the cross-border trip generated by the predetermined country after the second predetermined historical time period;
a third training module configured to train a pre-established second machine self-learning model according to the plurality of second training samples to obtain the second prediction model.
Further, the prediction apparatus further includes:
a fifth obtaining module configured to obtain a plurality of third training samples; wherein the third training sample comprises at least user data collected within a third predetermined historical time period and user foreign exchange transaction amounts corresponding to the user data and related to cross-border tours generated by the predetermined country after the third predetermined historical time period;
a fourth training module configured to train a pre-established third machine self-learning model with the plurality of third training samples to obtain the third prediction model.
Further, the prediction apparatus further includes:
a sixth acquisition module configured to acquire a plurality of fourth training samples; wherein the fourth training sample comprises at least the first, second, third, and fourth predetermined historical time periods of the foreign exchange traffic associated with cross-border tours generated in the predetermined country;
a fifth training module configured to train a pre-established fourth machine self-learning model with the plurality of fourth training samples to obtain the fourth prediction model.
Further, the first, second, third and/or fourth machine self-learning models include at least a deep neural network.
Further, the data of interest of the user to the predetermined country cross-border tour comprises comment data of the user to the predetermined country cross-border tour.
The functions can be realized by hardware, and the functions can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the above-described functions.
In one possible design, the prediction apparatus includes a memory and a processor, the memory is used for storing one or more computer instructions for supporting the prediction apparatus to execute the prediction method in the first aspect, and the processor is configured to execute the computer instructions stored in the memory. The predicting means may further comprise a communication interface for communicating the predicting means with other devices or a communication network.
In a third aspect, an embodiment of the present disclosure provides an electronic device, including a memory and a processor; wherein the memory is configured to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement the method steps of the first aspect.
In a fourth aspect, the disclosed embodiments provide a computer-readable storage medium for storing computer instructions for a prediction apparatus, which contains computer instructions for performing the prediction method in the first aspect.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
according to the embodiment of the disclosure, the cross-border travel data is acquired, and then the acquired cross-border travel data is subjected to predictive analysis by using a predictive model trained by sample data in advance, so that the foreign exchange transaction data related to the cross-border travel generated in the predetermined country in the future predetermined time period is finally obtained. Because the cross-border trip data adopted by the mode disclosed by the invention not only comprises historical foreign exchange transaction data, but also comprises data concerning the cross-border trip of the predetermined country, the predicted foreign exchange transaction data related to the cross-border trip is more objective and accurate, some emergency situations can be embodied, and data support is provided for relevant departments to take counter measures.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Detailed Description
Hereinafter, exemplary embodiments of the present disclosure will be described in detail with reference to the accompanying drawings so that those skilled in the art can easily implement them. Also, for the sake of clarity, parts not relevant to the description of the exemplary embodiments are omitted in the drawings.
In the present disclosure, it is to be understood that terms such as "including" or "having," etc., are intended to indicate the presence of the disclosed features, numbers, steps, behaviors, components, parts, or combinations thereof, and are not intended to preclude the possibility that one or more other features, numbers, steps, behaviors, components, parts, or combinations thereof may be present or added.
It should be further noted that the embodiments and features of the embodiments in the present disclosure may be combined with each other without conflict. The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
Fig. 1 shows a flow diagram of a prediction method according to an embodiment of the present disclosure. As shown in fig. 1, the prediction method includes the following steps S101 to S102:
in step S101, cross-border tour data related to a predetermined country is acquired; wherein the cross-border tour data at least comprises user attention data to the cross-border tour of the predetermined country and historical foreign exchange transaction data related to the cross-border tour generated by the predetermined country;
in step S102, forex trading data related to cross-border tours generated in the predetermined country in a future predetermined time period is predicted according to the cross-border tour data and a pre-trained prediction model.
Steps S101 and S102 will be further described below, respectively.
Step S101
In the present embodiment, the predetermined country may be any one or more countries using the same currency other than the own country, such as japan, the united states, countries of the european union, and the like. The cross-border swimming data at least comprises cross-border swimming attention data of the user to the predetermined country aiming at any country or region. The cross-border tour attention data of the user to the predetermined country can be acquired through various known channels, for example, the user can crawl comment data of the cross-border tour of the predetermined country through a web crawler, and the number of people who intend to travel to the predetermined country can be obtained after the comment data are subjected to sentiment analysis and the like. And the data of people concerning the cross-border tour of the predetermined country can be obtained through the statistical analysis of the consulting data of the tourism company. The foreign exchange transaction data associated with the cross-border tour may be foreign exchange transaction data generated by tourists traveling to a predetermined country within a predetermined historical period of time and the tourists converting currency of the predetermined country. In one embodiment, the historical fx transaction data may include fx transaction amounts. In another embodiment, the historical fx transaction data may also include the number of people traveling to a predetermined country within a predetermined historical period of time, user data for each guest, etc.; the data for each guest includes, but is not limited to, the amount of the foreign exchange transaction for each guest, the time when the foreign exchange transaction was made, the location, the number of times to go to the predetermined country, etc. The historical foreign exchange transaction data may be foreign exchange transaction data historically related across the travel with the predetermined country, as authentic data. The historical foreign exchange transaction data has a certain development rule in a longer period, so that the foreign exchange transaction data related to cross-border travel generated by the predetermined country in the future predetermined time period can be reflected to a certain extent. For example, with the rapid development of national economy, more and more users select cross-border tours on holidays, and thus the foreign exchange transaction data related to cross-border tours generated in most countries is on the rise.
In one embodiment, the data of interest of the user to the cross-border tour of the predetermined country is data having an influence on the cross-border tour of the predetermined country within a predetermined period of time in the future, rather than some data of interest that is expired. Therefore, when acquiring the attention data of the user to the predetermined country cross-border tour, a time limit can be set, and the attention data generated within the time limit can be acquired. For example, the term may be set as a time period between the last travel season and the next travel season of the predetermined country. In practical application, the time limit can be set according to actual conditions such as national conditions of a predetermined country, conditions of scenic spots, statistical requirements and the like, so that the acquired attention data can more accurately reflect the foreign exchange transaction data related to cross-border travel in a future predetermined time period.
Step S102
In this embodiment, the predictive model may be a machine self-learning model. The machine self-learning model includes, but is not limited to, a convolutional neural network, a deep neural network, a support vector machine, K-means, K-neighbors, decision trees, random forests, Bayesian networks, or a combination of one or more thereof. After the machine self-learning model is trained by a plurality of training samples, conclusive data related to parameters can be predicted based on the corresponding parameters. The machine self-learning model in the embodiment can predict and obtain the foreign exchange transaction data related to the cross-border tour generated by the predetermined country in the future predetermined time period at least through the cross-border tour data of the predetermined country. The predicted foreign exchange transaction data includes at least the amount of foreign exchange transactions that a guest traveling to the predetermined country will likely generate within a predetermined time period in the future. The foreign exchange transaction data may include the number of persons who may travel to the predetermined country, data of each visitor, and the like in a predetermined time period in the future, in addition to the foreign exchange transaction amount; the data for each guest includes, but is not limited to, the amount of foreign exchange transactions for each guest, and the like.
The prior art also has a technical scheme for predicting the foreign exchange transaction data, but the prediction in the prior art is usually based on single historical foreign exchange transaction data, and can not effectively cope with sudden scenes, such as sudden typhoons, so that a certain foreign scenic spot goes out of business, and foreign exchange transactions generated by cross-border tourism are avoided; there are also prior art techniques that make predictions based on total historical transaction data, resulting in insufficient transaction data mining dimensions. In the embodiment of the disclosure, the cross-border travel data is acquired, and the acquired cross-border travel data is subjected to predictive analysis by using a predictive model trained by sample data in advance, so that the foreign exchange transaction data related to the cross-border travel generated in the predetermined country in the future predetermined time period is finally acquired. Because the cross-border trip data adopted by the mode disclosed by the invention not only comprises historical foreign exchange transaction data, but also comprises data concerning the cross-border trip of the predetermined country, the predicted cross-border trip related foreign exchange transaction data is more objective and accurate, some emergency situations can be embodied, and data support is provided for relevant departments to take counter measures.
In an optional implementation manner of this embodiment, as shown in fig. 2, the method further includes the following steps S201 to S202:
in step S201, a plurality of training samples are acquired; the training sample comprises cross-border travel data and real foreign exchange transaction data corresponding to the cross-border travel data;
in step S202, a machine self-learning model is trained by using the training samples, and the prediction model is obtained.
In the optional implementation manner, a suitable machine self-learning model can be selected according to actual conditions, and the structure of the machine self-learning model is established. For example, the neural network model is selected, the convolutional neural network model or the deep learning neural network model is selected according to actual conditions, an input layer, an output layer and an intermediate layer of the neural network model are set, and an objective function of the neural network can be set. The establishment of the machine self-learning model may be based on the prior art and will not be described herein.
The training sample in this embodiment includes cross-border travel data and real foreign exchange transaction data corresponding to the cross-border travel data. The cross-border tour data refers to cross-border tour data in a historical time period, and real foreign exchange transaction data has been generated for the cross-border tour data in the historical time period. For example, if cross-border data of the last year is collected as training samples with a frequency of one training sample per week, 52 training samples may be generated, and the nth set (0 < N ═ 52) of training samples includes cross-border data of 1 st to 6 th days in the nth week of the last year and real foreign exchange transaction data related to cross-border data of 7 th day. It is understood that the acquisition period and the acquisition frequency of the training samples can be set according to practical situations, and are not limited herein.
After enough training samples are collected, the machine self-learning model can be trained by using the training samples, and finally the trained prediction model is obtained. The training process differs according to the type of the machine self-learning model, and the existing technology can be adopted, which is not described herein again.
In an optional implementation manner of the embodiment, the machine self-learning model at least comprises a deep neural network.
In the optional implementation mode, a deep neural network can be used as a machine self-learning model, the deep neural network is more universal and flexible, and the deep neural network is an incremental learning model, so that the repeated calculation amount caused by data updating can be effectively reduced, and resources can be saved.
The following describes the process of establishing and training a machine self-learning model by taking a 4-layer deep neural network as an example.
As shown in FIG. 3, the 4-layer deep neural network includes an input layer z1Two hidden layers z2And z3Output layer z4The forward conduction formula of the 4-layer deep neural network is as follows:
al+1=Wlzl+bl
zl+1=fl+1(al+1)
wherein Zl1 ≦ 4, representing the vector for layer l, (w)l,bl) Is the network weight between the l layer and the l +1 layer.
When 0 < l < 4, a sigmoid function can be adopted as the excitation function of each layer, and when l is 4, a softmax function can be adopted as the excitation function.
The training process of the 4-layer deep neural network is as follows:
let a given training sample be (X ═ X)1,x2,...,xN],Y=[y1,y2,...,yN]) Taking X as input, N as the number of the input X, and Y as the labeling result of X;representing the output of the l-th layer of the deep neural network. The network training formula is as follows:
Wl=Wl-ηΔl+1(Zl)T
bl=bl-ηΔl+11
wherein, L is 4, L is L-1, L-2, 1,η is learning rate, when training with training sample, the network weight is adjusted by repeatedly using the above training formula until the network weight is stable or the training times reaches a certain value.
In an optional implementation manner of this embodiment, the cross-border game data further includes user data.
In an embodiment, the cross-border game data may also include user data. The user data may include historical foreign exchange transaction data for the user. A user who intends to travel to a predetermined country may exchange the currency of the predetermined country in advance, and thus may count historical transaction data of users who have exchanged the currency of the predetermined country but have not exited. In addition, each user has different attitudes towards cross-border swimming, some users may choose different countries for cross-border swimming every year in holidays, some users may like to go to a specific country or countries for cross-border swimming, and some users may not wish to play abroad. The user data may also include user profile data, such as a number of users who are willing to travel across predetermined countries in a predetermined time period in the future, predicted by analyzing the user profile data.
In an alternative implementation manner of this embodiment, as shown in fig. 4, the step S102 of predicting the foreign exchange transaction data related to the cross-border tour generated in the predetermined country in a future predetermined time period according to the cross-border tour data and the pre-trained prediction model further includes the following steps S401-S404:
in step S401, predicting the number of people who travel to the predetermined country in the future predetermined time period according to cross-border tour attention data of the user to the predetermined country and a pre-trained first prediction model, and determining a cross-border tour related first foreign exchange transaction amount in the future predetermined time period according to the number of people and per-person tour consumption in the predetermined country;
predicting a second foreign exchange transaction amount related to the cross-border trip generated by the predetermined country in the future predetermined time period according to historical foreign exchange transaction data related to the cross-border trip generated by the predetermined country and a second pre-trained prediction model in step S402;
in step S403, predicting a third foreign exchange transaction amount related to the cross-country trip generated by the user in the predetermined country in the future predetermined time period according to the user data and a pre-trained third prediction model;
in step S404, the foreign exchange transaction amount related to the cross-border tour generated in the predetermined country in the future predetermined time period is predicted according to the first, second and third foreign exchange transaction amounts and a pre-trained fourth prediction model.
In this optional implementation manner, in order to predict the foreign exchange transaction data related to the cross-border travel generated by the predetermined country more accurately, different types of cross-border travel data may be predicted respectively for different prediction models to obtain respective corresponding prediction results, and then the prediction results are integrated to obtain the final foreign exchange transaction data. The different kinds of cross-border tour data can comprise cross-border tour comment data of the predetermined country by the user, historical transaction data related to cross-border tours generated by the predetermined country and user data; for the three kinds of cross-border tour data, three different prediction models, namely a first prediction model, a second prediction model and a third prediction model, can be trained in advance. The first prediction model, the second prediction model and the third prediction model respectively predict the three types of cross-border travel data to obtain the number of people traveling to a predetermined country in a future predetermined time period, obtain a first foreign exchange transaction amount related to cross-border travel generated by the predetermined country in the future predetermined time period according to the number of people, obtain a second foreign exchange transaction amount related to cross-border travel generated by the predetermined country in the future predetermined time period according to historical transaction data, and predict a third foreign exchange transaction amount related to cross-border travel generated by the predetermined country in the future predetermined time period according to user data. And then, carrying out predictive analysis on the first foreign exchange transaction amount, the second foreign exchange transaction amount and the third foreign exchange transaction amount through a fourth predictive model, and finally obtaining the foreign exchange transaction amount related to cross-border travel generated by a predetermined country in a future predetermined time period.
When the optional implementation mode predicts the foreign exchange transaction data related to the cross-border tour generated by the predetermined country in the future predetermined time period, not only the historical transaction data is considered, but also the comment data of the cross-border tour of the predetermined country is analyzed and predicted in a more targeted manner by the user, and the number of people who may travel to the predetermined country in the future predetermined time period and the amount of foreign exchange transactions generated are determined; besides, the behavior of the user is considered, the potential foreign exchange transaction amount of each user is mined from a finer granularity level according to the foreign exchange transaction behavior of the user and other portrait data, and finally the foreign exchange transaction data in a future preset time period is obtained after the foreign exchange transaction data are comprehensively considered, so that the prediction result is more accurate, and the method can predict in advance when an emergency occurs and provides good data support for a corresponding coping strategy of the layout.
In an optional implementation manner of this embodiment, as shown in fig. 5, the method further includes the following steps S501 to S502:
in step S501, a plurality of first training samples are obtained; wherein the first training sample comprises at least cross-border travel interest data of the user for the predetermined country collected over a predetermined historical period of time, and a real number of people traveling to the predetermined country after the predetermined historical period of time;
in step S502, a pre-established first machine self-learning model is trained by using the plurality of first training samples, so as to obtain the first prediction model.
In this alternative implementation, the first predetermined historical time period may be a certain past time period, the cross-border tour attention data in the collected first training samples is collected in the first predetermined historical time period, for example, the first predetermined historical time period is N days in the past, the attention data in each first training sample is attention data in N (0 < N < 365) days in the past, and the number of real people who travel to the predetermined country after the first predetermined historical time period in each first training sample is the number of people on the N +1 th day. Of course, it is understood that the first predetermined historical time period may be the past M (M > 1) weeks, months or years, the data of interest in the first training sample may also be data collected once M (M > 1) days, weeks or months in the past M weeks, months or years, and the actual number of people who travel to the predetermined country may also be the number of people who travel the next n (n > 1) weeks, months or years, which is set according to practical situations and is not limited herein. After the plurality of first training samples are collected in the above manner, the first machine self-learning model can be trained by using the first training samples. The first machine self-learning model includes, but is not limited to, a convolutional neural network, a deep neural network, a support vector machine, K-means, K-neighbors, decision trees, random forests, Bayesian networks, or a combination of one or more thereof. The structure of the first machine self-learning model can be constructed by utilizing the prior art and the actual conditions, and the detailed description is omitted. After the first machine self-learning model is trained by a plurality of first training samples, the number of people who travel to the predetermined country in the future can be predicted based on the data collected in a certain historical stage and focused on cross-border travel of the predetermined country by the user.
The following illustrates the construction of the first training sample and the training process of the first machine self-learning model.
Assume that the first predetermined historical time period is the past N days, let xk=[a,b]Data of interest for day k statistics, positiveThe negative samples are a and b respectively, that is, the positive sample is data of a concerned predetermined country, and the negative sample is a sample of a non-concerned predetermined country. [ X, Y ]]Forming a first training sample, X ═ X1,x2,...,xN]And Y ═ c, where X is the data of interest for N days and c is the number of people actually traveling to the predetermined country on day N + 1. The meaning of this first training sample is to use the data of interest from the previous N days as input and the number of people who actually travel to the predetermined country on day N +1 as the labeling result. The more the first training samples constructed in the same way, the better, X is taken as the input of the first machine self-learning model during training, the output of the first machine self-learning model is compared with the labeling result c, the parameters of the first machine self-learning model are continuously adjusted, and after repeated training, the training can be ended until the parameters of the first machine self-learning model tend to be stable, or the training times exceed a certain number, and the first prediction model is obtained.
In an optional implementation manner of this embodiment, as shown in fig. 6, the method further includes the following steps S601-S602:
in step S601, a plurality of second training samples are obtained; wherein the second training sample comprises at least a sample foreign exchange transaction amount related to the cross-border trip generated by the predetermined country within a second predetermined historical time period, and a result foreign exchange transaction amount related to the cross-border trip generated by the predetermined country after the second predetermined historical time period;
in step S602, a pre-established second machine self-learning model is trained according to the plurality of second training samples, so as to obtain the second prediction model.
In this alternative implementation, the second predetermined historical time period may be a certain time period in the past, for example, the second predetermined historical time period is N days in the past, and the sample foreign exchange transaction amount in each second training sample is the cross-border foreign exchange transaction amount in N (0 < N < 365) days in the past, and the result foreign exchange transaction amount in each second training sample is the foreign exchange transaction amount in N +1 day. Of course, it is understood that the second predetermined historical time period may be the past M (M > 1) weeks, months or years, the sample foreign exchange transaction amount in the second training sample may also be data collected once M (M > 1) days, weeks or months in the past M weeks, months or years, and the result foreign exchange transaction amount may also be the foreign exchange transaction amount in n (n > 1) weeks, months or years after the second predetermined historical time period, which is set according to the actual situation and is not limited herein. After the plurality of second training samples are collected in the above manner, the second machine self-learning model can be trained by using the second training samples. The second machine self-learning model includes, but is not limited to, a convolutional neural network, a deep neural network, a support vector machine, K-means, K-neighbors, decision trees, random forests, Bayesian networks, or any combination thereof. The structure of the second machine self-learning model can be constructed based on actual conditions by using the prior art, and is not described in detail herein. After the second machine self-learning model is trained by a plurality of second training samples, the foreign exchange transaction amount related to the cross-border trip generated by the predetermined country in the future predetermined time period can be predicted based on the foreign exchange transaction amount related to the cross-border trip collected in a certain historical stage.
The following is an example of the training process of the second training sample configuration and the second machine self-learning model.
Assuming that the second predetermined historical time period is the past N days, [ X, Y]Forming a second training sample, X ═ X1,x2,...,xN]And Y is c, wherein X is the transaction amount of the sample foreign exchange related to the cross-border tour in the past N days of the predetermined country, and c is the transaction amount of the result foreign exchange related to the cross-border tour in the N +1 th day of the predetermined country. The meaning of the second training sample is that the foren days of the foreign exchange transaction data are used as input, and the N +1 th day of the actual foreign exchange transaction amount c is used as the labeling result. The more the second training samples constructed in the same way, the better, X is taken as the input of the second machine self-learning model during training, the output of the second machine self-learning model is compared with the labeling result c, the parameters of the second machine self-learning model are continuously adjusted, and repeated training is carried out until the parameters of the second machine self-learning model tend to trend to the standardAnd if the training times are stable or exceed a certain number, the training can be ended, and a second prediction model is obtained.
In an optional implementation manner of this embodiment, as shown in fig. 7, the method further includes the following steps S701 to S702:
in step S701, a plurality of third training samples are obtained; wherein the third training sample comprises at least user data collected within a third predetermined historical time period and user foreign exchange transaction amounts corresponding to the user data and related to cross-border tours generated by the predetermined country after the third predetermined historical time period;
in step S702, a third machine self-learning model established in advance is trained by using the plurality of third training samples, so as to obtain the third prediction model.
In this alternative implementation, third sample data may be collected for each potential user and trained to obtain a third predictive model. The potential user may be a user who is interested in traveling to the predetermined country or may be interested in cross-border travel. Of course, in other embodiments, the data collection method may be applied to all users capable of collecting user data, which is determined according to the actual situation, and is not limited herein. The third predetermined historical period of time may be a period of time in the past, and the user data in the collected third training samples is collected in the third predetermined historical period of time, for example, the third predetermined historical period of time is N days in the past, while the user data in each third training sample is user data in N (0 < N < 365) days in the past, and the user's fx transaction amount after the third predetermined historical period of time in each third training sample is the fx transaction amount of the user on the N +1 th day. Of course, it is understood that the third predetermined historical time period may be M (M > 1) weeks, months or years in the past, the user data in the third training sample may also be data acquired once M (M > 1) days, weeks or months in the past M weeks, months or years, and the foreign exchange transaction amount of each user in the predetermined country may also be the foreign exchange transaction amount of the user in n (n > 1) weeks, months or years after the third predetermined historical time period, which is set according to the actual situation and is not limited herein. After a plurality of third training samples are collected in the above manner, the third machine self-learning model can be trained by using the third training samples. The third machine self-learning model includes, but is not limited to, a convolutional neural network, a deep neural network, a support vector machine, K-means, K-neighbors, decision trees, random forests, Bayesian networks, or any combination thereof. The structure of the third machine self-learning model can be constructed based on actual conditions by utilizing the prior art, and is not described herein again. After the third machine self-learning model is trained by a plurality of third training samples, the foreign exchange transaction amount generated by the user and the predetermined country in the future predetermined time period can be predicted based on the user data collected in a certain historical stage.
The following is an example of the construction of the third training sample and the training process of the third machine self-learning model.
For a user, assume that the second predetermined historical time period is the past N days, [ X, Y]Form a third training sample, X ═ X1,x2,...,xN]And Y is c, wherein X is the user data of the user in each day in the past N days, and c is the foreign exchange transaction amount generated by the user for the predetermined country on the (N + 1) th day. The meaning of the third training sample is to use the user data X of the previous N days as input, and the actual foreign exchange transaction amount c of the user for the predetermined country on the (N + 1) th day as the labeling result. The more the third training samples constructed in the same way, the better, X is taken as the input of the third machine self-learning model during training, the output of the third machine self-learning model is compared with the labeling result c, the parameters of the third machine self-learning model are continuously adjusted, and after repeated training, the training can be ended until the parameters of the third machine self-learning model tend to be stable, or the training times exceed a certain number, and the third prediction model is obtained.
In an optional implementation manner of this embodiment, as shown in fig. 8, the method further includes the following steps S801 to S802:
in step S801, a plurality of fourth training samples are obtained; wherein the fourth training sample comprises at least the first foreign exchange transaction amount, the second foreign exchange transaction amount, the third foreign exchange transaction amount and the foreign exchange transaction amount related to the cross-border tour generated by the predetermined country in a fourth predetermined historical time period;
in step S802, a fourth machine self-learning model established in advance is trained by using the plurality of fourth training samples, so as to obtain the fourth prediction model.
In this alternative implementation, the fourth predetermined historical period of time may be a certain period of time in the past. And the fourth training sample is formed by the prediction results of the first prediction model, the second prediction model and the third prediction model and the real foreign exchange transaction amount. For example, the fourth predetermined historical period is the past N +1(0 < N < 364) th day, and the first foreign exchange transaction amount, the second foreign exchange transaction amount and the third foreign exchange transaction amount in each fourth training sample are respectively data of the N +1 th day (the foreign exchange transaction amounts predicted by the first prediction model, the second prediction model and the third prediction model, respectively, and the training samples used by the first prediction model, the second prediction model and the third prediction model are collected before the N th day in the past), then the foreign exchange transaction amount related to the cross-border tour generated by the predetermined country after the fourth predetermined historical period in the fourth training sample is the real foreign exchange transaction amount of the N +1 th day. Of course, it is understood that the fourth predetermined historical time period may be the last M +1(M > 1) th week, month or year, the first foreign exchange transaction amount, the second foreign exchange transaction amount and the third foreign exchange transaction amount in the fourth training sample may also be predicted data of the last M +1 th week, month or year, and the actual foreign exchange transaction amount of the M +1 th week, month or year after the foreign exchange transaction amount related to the country cross-border trip after the fourth predetermined historical time period is set according to the actual situation, and is not limited herein. After the plurality of fourth training samples are collected in the above manner, the fourth machine self-learning model can be trained by using the fourth training samples. The fourth machine self-learning model includes, but is not limited to, a convolutional neural network, a deep neural network, a support vector machine, K-means, K-neighbors, decision trees, random forests, Bayesian networks, or any combination thereof. The structure of the fourth machine self-learning model can be constructed based on actual conditions by using the prior art, and is not described herein again. After the fourth machine self-learning model is trained by a plurality of fourth training samples, the first foreign exchange transaction amount, the second foreign exchange transaction amount and the third foreign exchange transaction amount predicted and obtained based on the first prediction model, the second prediction model and the third prediction model can be predicted to obtain the foreign exchange transaction amount related to the cross-border trip generated in the predetermined country in the future predetermined time period.
In an optional implementation manner of the embodiment, the first machine self-learning model, the second machine self-learning model, the third machine self-learning model and/or the fourth machine self-learning model at least comprise a deep neural network.
In the optional implementation manner, the deep neural network can also be used as the first machine self-learning model, the second machine self-learning model, the third machine self-learning model and/or the fourth machine self-learning model, the deep neural network is more universal and flexible, and the deep neural network is an incremental learning model, so that the repeated calculation amount caused by data updating can be effectively reduced, and resources can be saved. The details of the deep neural network are described above and will not be described herein.
In an optional implementation manner of the embodiment, the data of interest of the user to the predetermined country cross-border tour includes comment data of the user to the predetermined country cross-border tour.
In this optional implementation, the data of interest of the user to the predetermined country cross-border tour may be comment data of the user to the predetermined country cross-border tour. If a user is interested in a predetermined country and is interested in traveling to the country, the user may learn about the country through various channels including online or offline channels and issue some comments, while if the user is not interested in the predetermined country, the user may not be concerned with the predetermined country, or if the user is dissatisfied with a tourist attraction of the predetermined country, some negative comments may be issued on the network. Therefore, comment data of the user on or off the line for a predetermined country can be taken as the user's attention data. In one embodiment, cross-border tour comment data of a user on a predetermined country in various forums may be crawled by a web crawler. In other embodiments, cross-border tour comment data of the predetermined country under the subscriber line can be obtained through statistical data of the tourism company.
The following are embodiments of the disclosed apparatus that may be used to perform embodiments of the disclosed methods.
Fig. 9 shows a block diagram of a prediction apparatus according to an embodiment of the present disclosure, which may be implemented as part or all of an electronic device by software, hardware, or a combination of both. As shown in fig. 9, the prediction apparatus includes a first obtaining module 901 and a prediction module 902:
a first obtaining module 901 configured to obtain cross-border tour data related to a predetermined country; wherein the cross-border tour data at least comprises user attention data to the cross-border tour of the predetermined country and historical foreign exchange transaction data related to the cross-border tour generated by the predetermined country;
a prediction module 902 configured to predict, based on the cross-border tour data and a pre-trained prediction model, forex trading data related to cross-border tours generated in the predetermined country in a future predetermined time period.
The first obtaining module 901 and the predicting module 902 will be further described below, respectively.
First obtaining module 901
In this embodiment, the first obtaining module 901 may obtain, through various known channels, cross-border tour concern data of a user to a predetermined country, for example, crawl comment data of the user to the predetermined country through a web crawler, and obtain, after performing emotion analysis and other processing on the comment data, the number of people who intend to travel to the predetermined country. And the data of people concerning the cross-border tour of the predetermined country can be obtained through analysis and statistics of the consulting data of the tourism company. The foreign exchange transaction data associated with the cross-border tour may be foreign exchange transaction data generated by tourists traveling to a predetermined country within a predetermined historical period of time and the tourists converting currency of the predetermined country. In one embodiment, the historical fx transaction data may include fx transaction amounts. In another embodiment, the historical fx transaction data may also include the number of people traveling to a predetermined country within a predetermined historical period of time, user data for each guest, etc.; the data for each guest includes, but is not limited to, the amount of the foreign exchange transaction for each guest, the time when the foreign exchange transaction was made, the location, the number of times to go to the predetermined country, etc. The historical foreign exchange transaction data may be foreign exchange transaction data historically related across the travel with the predetermined country, as authentic data. The historical foreign exchange transaction data has a certain development rule in a longer period, so that the foreign exchange transaction data related to cross-border travel generated by the predetermined country in the future predetermined time period can be reflected to a certain extent. For example, with the rapid development of national economy, more and more users select cross-border tours on holidays, and thus the foreign exchange transaction data related to cross-border tours generated in most countries is on the rise.
In one embodiment, the data of interest of the user to the cross-border tour of the predetermined country is data having an influence on the cross-border tour of the predetermined country within a predetermined period of time in the future, rather than some data of interest that is expired. Therefore, the first obtaining module 901 may set a time limit when obtaining the attention data of the user for the predetermined country cross-border tour, and obtain the attention data generated within the time limit. For example, the term may be set as a time period between the last travel season and the next travel season of the predetermined country. In practical application, the time limit can be set according to actual conditions such as national conditions of a predetermined country, conditions of scenic spots, statistical requirements and the like, so that the acquired attention data can more accurately reflect the foreign exchange transaction data related to cross-border travel in a future predetermined time period.
Prediction module 902
In this embodiment, the predictive model may be a machine self-learning model. The machine self-learning model includes, but is not limited to, a convolutional neural network, a deep neural network, a support vector machine, K-means, K-neighbors, decision trees, random forests, Bayesian networks, or a combination of one or more thereof. After the machine self-learning model is trained by a plurality of training samples, conclusive data related to parameters can be predicted based on the corresponding parameters. The machine self-learning model in the embodiment can predict and obtain the foreign exchange transaction data related to the cross-border tour generated by the predetermined country in the future predetermined time period at least through the cross-border tour data of the predetermined country. The predicted foreign exchange transaction data includes at least the amount of foreign exchange transactions that a guest traveling to the predetermined country will likely generate within a predetermined time period in the future. The foreign exchange transaction data may include the number of persons who may travel to the predetermined country, data of each visitor, and the like in a predetermined time period in the future, in addition to the foreign exchange transaction amount; the data for each guest includes, but is not limited to, the amount of foreign exchange transactions for each guest, and the like.
In an optional implementation manner of this embodiment, as shown in fig. 10, the prediction apparatus further includes the following modules:
a second obtaining module 1001 configured to obtain a plurality of training samples; the training sample comprises cross-border travel data and real foreign exchange transaction data corresponding to the cross-border travel data;
a first training module 1002 configured to train a machine self-learning model using the plurality of training samples, obtaining the predictive model.
In the optional implementation manner, a suitable machine self-learning model can be selected according to actual conditions, and the structure of the machine self-learning model is established. For example, the neural network model is selected, the convolutional neural network model or the deep learning neural network model is selected according to actual conditions, an input layer, an output layer and an intermediate layer of the neural network model are set, and an objective function of the neural network can be set. The establishment of the machine self-learning model may be based on the prior art and will not be described herein.
The training sample in this embodiment includes cross-border travel data and real foreign exchange transaction data corresponding to the cross-border travel data. The cross-border tour data refers to cross-border tour data in a historical time period, and real foreign exchange transaction data has been generated for the cross-border tour data in the historical time period.
After enough training samples are collected, the machine self-learning model can be trained by using the training samples, and finally the trained prediction model is obtained. The training process differs according to the type of the machine self-learning model, and the existing technology can be adopted, which is not described herein again.
In an optional implementation manner of the embodiment, the machine self-learning model at least comprises a deep neural network.
In the optional implementation mode, a deep neural network can be used as a machine self-learning model, the deep neural network is more universal and flexible, and the deep neural network is an incremental learning model, so that the repeated calculation amount caused by data updating can be effectively reduced, and resources can be saved.
In an optional implementation manner of this embodiment, the cross-border game data further includes user data.
In an embodiment, the cross-border game data may also include user data. The user data may include historical foreign exchange transaction data for the user. A user who intends to travel to a predetermined country may exchange the currency of the predetermined country in advance, and thus may count historical transaction data of users who have exchanged the currency of the predetermined country but have not exited. In addition, each user has different attitudes towards cross-border swimming, some users may choose different countries for cross-border swimming every year in holidays, some users may like to go to a specific country or countries for cross-border swimming, and some users may not wish to play abroad. The user data may also include user profile data, such as a number of users who are willing to travel across predetermined countries in a predetermined time period in the future, predicted by analyzing the user profile data.
In an optional implementation manner of this embodiment, as shown in fig. 11, the prediction module 902 further includes the following modules:
a first prediction sub-module 1101 configured to predict the number of people traveling to the predetermined country in the future predetermined time period according to the cross-border travel attention data of the user to the predetermined country and a pre-trained first prediction model, and determine a first foreign exchange transaction amount related to the cross-border travel in the future predetermined time period according to the number of people and per-person travel consumption in the predetermined country;
a second prediction submodule 1102 configured to predict a second amount of foreign exchange transactions related to the cross-border trip generated in the predetermined country in the future predetermined time period, based on the historical foreign exchange transaction data related to the cross-border trip generated in the predetermined country and a second pre-trained prediction model;
a third prediction submodule 1103 configured to predict, according to the user data and a third pre-trained prediction model, a third foreign exchange transaction amount of the user related to cross-border travel generated by the predetermined country in the future predetermined time period;
a fourth prediction sub-module 1104 configured to predict the foreign exchange transaction amount related to the cross-border tour generated in the predetermined country in the future predetermined time period according to the first, second and third foreign exchange transaction amounts and a pre-trained fourth prediction model.
In this optional implementation manner, in order to predict the foreign exchange transaction data related to the cross-border travel generated by the predetermined country more accurately, different types of cross-border travel data may be predicted respectively for different prediction models to obtain respective corresponding prediction results, and then the prediction results are integrated to obtain the final foreign exchange transaction data. The different kinds of cross-border tour data can comprise cross-border tour comment data of the predetermined country by the user, historical transaction data related to cross-border tours generated by the predetermined country and user data; for the three kinds of cross-border tour data, three different prediction models, namely a first prediction model, a second prediction model and a third prediction model, can be trained in advance. The first prediction model, the second prediction model and the third prediction model respectively predict the three types of cross-border travel data to obtain the number of people traveling to a predetermined country in a future predetermined time period, obtain a first foreign exchange transaction amount related to cross-border travel generated by the predetermined country in the future predetermined time period according to the number of people, obtain a second foreign exchange transaction amount related to cross-border travel generated by the predetermined country in the future predetermined time period according to historical transaction data, and predict a third foreign exchange transaction amount related to cross-border travel generated by the predetermined country in the future predetermined time period according to user data. And then, carrying out predictive analysis on the first foreign exchange transaction amount, the second foreign exchange transaction amount and the third foreign exchange transaction amount through a fourth predictive model, and finally obtaining the foreign exchange transaction amount related to cross-border travel generated by a predetermined country in a future predetermined time period.
When the optional implementation mode predicts the foreign exchange transaction data related to the cross-border tour generated by the predetermined country in the future predetermined time period, not only the historical transaction data is considered, but also the comment data of the cross-border tour of the predetermined country is analyzed and predicted in a more targeted manner by the user, and the number of people who may travel to the predetermined country in the future predetermined time period and the amount of foreign exchange transactions generated are determined; besides, the behavior of the user is considered, the potential foreign exchange transaction amount of each user is mined from a finer granularity level according to the foreign exchange transaction behavior of the user and other portrait data, and finally the foreign exchange transaction data in a future preset time period is obtained after the foreign exchange transaction data are comprehensively considered, so that the prediction result is more accurate, and the method can predict in advance when an emergency occurs and provides good data support for a corresponding coping strategy of the layout.
In an optional implementation manner of this embodiment, as shown in fig. 12, the prediction apparatus further includes the following modules:
a third obtaining module 1201 configured to obtain a plurality of first training samples; wherein the first training sample comprises at least cross-border travel interest data of the user for the predetermined country collected over a first predetermined historical period of time, and a real number of people traveling to the predetermined country after the first predetermined historical period of time;
a second training module 1202 configured to train a pre-established first machine self-learning model with the plurality of first training samples, obtaining the first prediction model.
In this alternative implementation, the first predetermined historical time period may be a certain past time period, the cross-border tour attention data in the collected first training samples is collected in the first predetermined historical time period, for example, the first predetermined historical time period is N days in the past, the attention data in each first training sample is attention data in N (0 < N < 365) days in the past, and the number of real people who travel to the predetermined country after the first predetermined historical time period in each first training sample is the number of people on the N +1 th day. Of course, it is understood that the first predetermined historical time period may be the past M (M > 1) weeks, months or years, the data of interest in the first training sample may also be data collected once M (M > 1) days, weeks or months in the past M weeks, months or years, and the actual number of people who travel to the predetermined country may also be the number of people who travel the next n (n > 1) weeks, months or years, which is set according to practical situations and is not limited herein. After the third obtaining module 1201 collects the plurality of first training samples in the above manner, the second training module 1202 may train the first machine self-learning model by using the first training samples. The first machine self-learning model includes, but is not limited to, a convolutional neural network, a deep neural network, a support vector machine, K-means, K-neighbors, decision trees, random forests, Bayesian networks, or a combination of one or more thereof. The structure of the first machine self-learning model can be constructed by utilizing the prior art and the actual conditions, and the detailed description is omitted. After the first machine self-learning model is trained by a plurality of first training samples, the number of people who travel to the predetermined country in the future can be predicted based on the data collected in a certain historical stage and focused on cross-border travel of the predetermined country by the user.
In an optional implementation manner of this embodiment, as shown in fig. 13, the prediction apparatus further includes the following modules:
a fourth obtaining module 1301 configured to obtain a plurality of second training samples; wherein the second training sample comprises at least a sample foreign exchange transaction amount related to the cross-border trip generated by the predetermined country within a second predetermined historical time period, and a result foreign exchange transaction amount related to the cross-border trip generated by the predetermined country after the second predetermined historical time period;
a third training module 1302, configured to train a pre-established second machine self-learning model according to the plurality of second training samples, to obtain the second prediction model.
In this alternative implementation, the second predetermined historical time period may be a certain time period in the past, for example, the second predetermined historical time period is N days in the past, and the sample foreign exchange transaction amount in each second training sample is the cross-border foreign exchange transaction amount in N (0 < N < 365) days in the past, and the result foreign exchange transaction amount in each second training sample is the foreign exchange transaction amount in N +1 day. Of course, it is understood that the second predetermined historical time period may be the past M (M > 1) weeks, months or years, the sample foreign exchange transaction amount in the second training sample may also be data collected once M (M > 1) days, weeks or months in the past M weeks, months or years, and the result foreign exchange transaction amount may also be the foreign exchange transaction amount in n (n > 1) weeks, months or years after the second predetermined historical time period, which is set according to the actual situation and is not limited herein. After the fourth obtaining module 1301 collects a plurality of second training samples in the above manner, the third training module 1302 may train the second machine self-learning model by using the second training samples. The second machine self-learning model includes, but is not limited to, a convolutional neural network, a deep neural network, a support vector machine, K-means, K-neighbors, decision trees, random forests, Bayesian networks, or any combination thereof. The structure of the second machine self-learning model can be constructed based on actual conditions by using the prior art, and is not described in detail herein. After the second machine self-learning model is trained by a plurality of second training samples, the foreign exchange transaction amount related to the cross-border trip generated by the predetermined country in the future predetermined time period can be predicted based on the foreign exchange transaction amount related to the cross-border trip collected in a certain historical stage.
In an optional implementation manner of this embodiment, as shown in fig. 14, the prediction apparatus further includes the following modules:
a fifth obtaining module 1401 configured to obtain a plurality of third training samples; wherein the third training sample comprises at least user data collected within a third predetermined historical time period and user foreign exchange transaction amounts corresponding to the user data and related to cross-border tours generated by the predetermined country after the third predetermined historical time period;
a fourth training module 1402 configured to train a pre-established third machine self-learning model with the plurality of third training samples, to obtain the third prediction model.
In this alternative implementation, third sample data may be collected for each potential user and trained to obtain a third predictive model. The potential user may be a user who is interested in traveling to the predetermined country or may be interested in cross-border travel. Of course, in other embodiments, the data collection method may be applied to all users capable of collecting user data, which is determined according to the actual situation, and is not limited herein. The third predetermined historical period of time may be a period of time in the past, and the user data in the collected third training samples is collected in the third predetermined historical period of time, for example, the third predetermined historical period of time is N days in the past, while the user data in each third training sample is user data in N (0 < N < 365) days in the past, and the user's fx transaction amount after the third predetermined historical period of time in each third training sample is the fx transaction amount of the user on the N +1 th day. Of course, it is understood that the third predetermined historical time period may be M (M > 1) weeks, months or years in the past, the user data in the third training sample may also be data acquired once M (M > 1) days, weeks or months in the past M weeks, months or years, and the foreign exchange transaction amount of each user in the predetermined country may also be the foreign exchange transaction amount of the user in n (n > 1) weeks, months or years after the third predetermined historical time period, which is set according to the actual situation and is not limited herein. After the fifth obtaining module 1401 collects a plurality of third training samples in the above manner, the fourth training module 1402 may train the third machine self-learning model by using the third training samples. The third machine self-learning model includes, but is not limited to, a convolutional neural network, a deep neural network, a support vector machine, K-means, K-neighbors, decision trees, random forests, Bayesian networks, or any combination thereof. The structure of the third machine self-learning model can be constructed based on actual conditions by utilizing the prior art, and is not described herein again. After the third machine self-learning model is trained by a plurality of third training samples, the foreign exchange transaction amount generated by the user and the predetermined country in the future predetermined time period can be predicted based on the user data collected in a certain historical stage.
In an optional implementation manner of this embodiment, as shown in fig. 15, the prediction apparatus further includes the following modules:
a sixth obtaining module 1501 configured to obtain a plurality of fourth training samples; wherein the fourth training sample comprises at least the first, second, third, and fourth predetermined historical time periods of the foreign exchange traffic associated with cross-border tours generated in the predetermined country;
a fifth training module 1502 configured to train a pre-established fourth machine self-learning model with the plurality of fourth training samples, obtaining the fourth prediction model.
In this alternative implementation, the fourth predetermined historical period of time may be a certain period of time in the past. And the fourth training sample is formed by the prediction results of the first prediction model, the second prediction model and the third prediction model and the real foreign exchange transaction amount. For example, the fourth predetermined historical period is the past N +1(0 < N < 364) th day, and the first foreign exchange transaction amount, the second foreign exchange transaction amount and the third foreign exchange transaction amount in each fourth training sample are respectively data of the N +1 th day (the foreign exchange transaction amounts predicted by the first prediction model, the second prediction model and the third prediction model, respectively, and the training samples used by the first prediction model, the second prediction model and the third prediction model are collected before the N th day in the past), then the foreign exchange transaction amount related to the cross-border tour generated by the predetermined country after the fourth predetermined historical period in the fourth training sample is the real foreign exchange transaction amount of the N +1 th day. Of course, it is understood that the fourth predetermined historical time period may be the last M +1(M > 1) th week, month or year, the first foreign exchange transaction amount, the second foreign exchange transaction amount and the third foreign exchange transaction amount in the fourth training sample may also be predicted data of the last M +1 th week, month or year, and the actual foreign exchange transaction amount of the M +1 th week, month or year after the foreign exchange transaction amount related to the country cross-border trip after the fourth predetermined historical time period is set according to the actual situation, and is not limited herein. After the sixth obtaining module 1501 collects a plurality of fourth training samples in the above manner, the fifth training module 1502 may train the fourth machine self-learning model by using the fourth training samples. The fourth machine self-learning model includes, but is not limited to, a convolutional neural network, a deep neural network, a support vector machine, K-means, K-neighbors, decision trees, random forests, Bayesian networks, or any combination thereof. The structure of the fourth machine self-learning model can be constructed based on actual conditions by using the prior art, and is not described herein again. After the fourth machine self-learning model is trained by a plurality of fourth training samples, the first foreign exchange transaction amount, the second foreign exchange transaction amount and the third foreign exchange transaction amount predicted and obtained based on the first prediction model, the second prediction model and the third prediction model can be predicted to obtain the foreign exchange transaction amount related to the cross-border trip generated in the predetermined country in the future predetermined time period.
In an optional implementation manner of the embodiment, the first machine self-learning model, the second machine self-learning model, the third machine self-learning model and/or the fourth machine self-learning model at least comprise a deep neural network.
In the optional implementation manner, the deep neural network can also be used as the first machine self-learning model, the second machine self-learning model, the third machine self-learning model and/or the fourth machine self-learning model, the deep neural network is more universal and flexible, and the deep neural network is an incremental learning model, so that the repeated calculation amount caused by data updating can be effectively reduced, and resources can be saved. The details of the deep neural network are described above and will not be described herein.
In an optional implementation manner of the embodiment, the data of interest of the user to the predetermined country cross-border tour includes comment data of the user to the predetermined country cross-border tour.
In this optional implementation, the data of interest of the user to the predetermined country cross-border tour may be comment data of the user to the predetermined country cross-border tour. If a user is interested in a predetermined country and is interested in traveling to the country, the user may learn about the country through various channels including online or offline channels and issue some comments, while if the user is not interested in the predetermined country, the user may not be concerned with the predetermined country, or if the user is dissatisfied with a tourist attraction of the predetermined country, some negative comments may be issued on the network. Therefore, comment data of the user on or off the line for a predetermined country can be taken as the user's attention data. In one embodiment, cross-border tour comment data of a user on a predetermined country in various forums may be crawled by a web crawler. In other embodiments, cross-border tour comment data of the predetermined country under the subscriber line can be obtained through statistical data of the tourism company.
Fig. 16 is a schematic structural diagram of an electronic device suitable for implementing a prediction method according to an embodiment of the present disclosure.
As shown in fig. 16, the electronic apparatus 1600 includes a Central Processing Unit (CPU)1601 that can execute various processes in the above-described embodiment shown in fig. 1 in accordance with a program stored in a Read Only Memory (ROM)1602 or a program loaded from a storage portion 1608 into a Random Access Memory (RAM) 1603. In the RAM1603, various programs and data necessary for the operation of the electronic apparatus 1600 are also stored. The CPU1601, ROM1602, and RAM1603 are connected to each other via a bus 1604. An input/output (I/0) interface 1605 is also connected to the bus 1604.
The following components are connected to the I/0 interface 1605: an input portion 1606 including a keyboard, a mouse, and the like; an output portion 1607 including a display device such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and a speaker; a storage portion 1608 including a hard disk and the like; and a communication section 1609 including a network interface card such as a LAN card, a modem, or the like. The communication section 1609 performs communication processing via a network such as the internet. The driver 1610 is also connected to the I/0 interface 1605 as needed. A removable medium 1611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 1610 as necessary, so that a computer program read out therefrom is mounted in the storage portion 1608 as necessary.
In particular, according to embodiments of the present disclosure, the method described above with reference to fig. 1 may be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program tangibly embodied on a medium readable thereby, the computer program comprising program code for performing the method of fig. 1. In such embodiments, the computer program may be downloaded and installed from a network via the communication portion 1609, and/or installed from the removable media 1611.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowcharts or block diagrams may represent a module, a program segment, or a portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units or modules described in the embodiments of the present disclosure may be implemented by software or hardware. The units or modules described may also be provided in a processor, and the names of the units or modules do not in some cases constitute a limitation of the units or modules themselves.
As another aspect, the present disclosure also provides a computer-readable storage medium, which may be the computer-readable storage medium included in the apparatus in the above-described embodiment; or it may be a separate computer readable storage medium not incorporated into the device. The computer readable storage medium stores one or more programs for use by one or more processors in performing the methods described in the present disclosure.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention in the present disclosure is not limited to the specific combination of the above-mentioned features, but also encompasses other embodiments in which any combination of the above-mentioned features or their equivalents is possible without departing from the inventive concept. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.