Gold transaction market transaction data prediction method and system
By analyzing the quantifiable influencing factors of the gold trading market and screening out the main factors and their weights, combined with the LSTM-CNN-LSTM model fusion structure and improved optimization algorithm, the overfitting and overfitting of the existing gold trading market transaction data prediction methods are solved. Historical data dependence and unquantifiable factors are dealt with, improving the accuracy and adaptability of forecasts.
Patent Information
- Application Number
- CN202411337828.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-24
- Publication Date
- 2025-01-17
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing gold trading market trading data prediction methods have problems such as overfitting, historical data dependence and inability to effectively deal with unquantifiable factors, resulting in insufficient prediction accuracy and adaptability.
By analyzing multiple quantifiable influencing factors, the main influencing factors and their weights were screened out, and the model fusion structure of LSTM-CNN-LSTM was used to build a gold transaction data prediction model. The model includes a data preprocessing layer, a data prediction layer and a result output layer. It is trained through the prediction time window and the advance prediction step length, and uses an improved optimization algorithm to determine the actual values of the model parameters.
It improves the accuracy and adaptability of gold trading market transaction data prediction, can more accurately capture the characteristics and changes of complex market data, and enhances the flexibility and prediction effect of the model.
Smart Images

Figure CN119323476A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of financial transaction prediction, and in particular to a method and system for predicting transaction data in a gold trading market. Background Art
[0002] The current transaction data prediction methods in the gold trading market, despite the use of advanced technologies and algorithms, still have some shortcomings; for example, the prediction model may overfit on the training data, resulting in a lack of generalization ability, because overfitting makes the model over-adapt to the specific patterns in the training data and ignores the general laws in the data; in addition, the prediction model is overly dependent on historical data and may not be able to effectively predict when the market environment changes, because historical data may not fully reflect the current and future market conditions; at the same time, the financial market is affected by a variety of unquantifiable factors, such as market sentiment, political events, etc., which increase the difficulty of prediction; in order to improve the accuracy of the prediction, it is necessary to screen and process the historical data set, and optimize the prediction model so that it can adapt to the continuous changes in the financial market, which includes introducing more influencing factors, using more complex model structures, or using real-time data to enhance the adaptability and prediction ability of the prediction model. Summary of the invention
[0003] The present invention aims to provide a method and system for predicting transaction data in the gold trading market, so as to improve the accuracy and security of predicting transaction data in the gold trading market.
[0004] A method for predicting transaction data in a gold trading market comprises the following steps:
[0005] S1. Obtain the gold transaction data set to be predicted according to the prediction time window; obtain the gold transaction influencing factor data set according to the prediction time window; the gold transaction influencing factor data set contains M quantifiable influencing factors R m , m=1,2,…,M; quantifiable influencing factors R m contains N data points, R m = {R m1 , R m2 , …, R mn , …, R mN}, n=1, 2, …, N, N>M; construct a matrix based on the gold trading influencing factor data set to obtain the gold trading influencing factor data matrix; use the gold trading influencing factor analysis model to analyze the gold trading influencing factor data matrix and determine the main influencing factor Z i And the weight of the main influencing factors W i , i = 1, 2, ..., I, I is the total number of main influencing factors after screening M quantifiable influencing factors after analysis; the main influencing factors Z iAnd the weight of the main influencing factors W i Combine them to obtain the data set of the main influencing factors to be predicted; set the prediction time window length to L, the advance prediction step length to P, and use the improved optimization algorithm to determine the actual values of L and P;
[0006] S2. Input the gold transaction data set to be predicted and the data set of main influencing factors to be predicted into the gold transaction data prediction model for analysis to obtain predicted gold transaction data; use the predicted gold transaction data for subsequent analysis; the gold transaction data prediction model includes a data preprocessing layer, a data prediction layer and a result output layer; use the LSTM-CNN-LSTM model fusion structure as the basic model of the gold transaction data prediction model to obtain the initial gold transaction data prediction model; use the prediction time window and the advance prediction step to train the initial gold transaction data prediction model to obtain the gold transaction data prediction model.
[0007] As a preferred technical solution of the present invention, the gold transaction influencing factor analysis model includes a preliminary dimension reduction layer, a feature selection layer, an adaptive weight layer and a result output layer;
[0008] The preliminary dimension reduction layer is used to reduce the dimension of the gold trading influencing factors data matrix using the principal component analysis method to obtain the reduced dimension gold trading influencing factors data matrix;
[0009] The feature selection layer is used to further screen the reduced-dimensional gold trading influencing factor data matrix using the recursive feature elimination method to obtain the main influencing factor matrix;
[0010] The adaptive weight layer is used to extract the feature importance scores from the main influencing factor matrix to obtain the main influencing factor score matrix;
[0011] The result output layer is used to obtain the main influencing factors Z according to the main influencing factor scoring matrix i And the weight of the main influencing factors W i .
[0012] As a preferred technical solution of the present invention, the specific steps of training the adaptive weight layer include:
[0013] Collecting a number of adaptive weight training samples; each adaptive weight training sample contains an analyzed influencing factor matrix with annotated feature importance scores; combining the number of adaptive weight training samples to obtain an adaptive weight training set;
[0014] The initial adaptive weight layer is constructed using the random forest model and the adaptive weight training set, and a model evaluation is performed on the initial adaptive weight layer to obtain an initial adaptive weight layer model evaluation result; if the initial adaptive weight layer model evaluation result is passed, the initial adaptive weight layer is used as the adaptive weight layer; otherwise, the adaptive weight training set is used to continue model training.
[0015] As a preferred technical solution of the present invention, the specific steps of using the improved optimization algorithm to determine the actual values of L and P include:
[0016] Construct K prediction model individuals G k , k = 1, 2, ..., K; each prediction model individual G k Contains a set of L and P values; constructs K prediction model individuals G k When , we use prior knowledge to control the preset value range of L and P, and use Circle mapping to randomly generate K prediction model individuals G within the preset value range. k ; K prediction model individuals G k Combine to obtain the prediction model optimization iteration population; set t as the current iteration number, t = 1, 2, ..., T;
[0017] The prediction model optimization iteration population is divided into four classification iteration populations D(j), j = 1, 2, 3, 4; the classification iteration population update library is used to update the position of the classification iteration population D(j) and calculate the fitness to obtain the prediction model individual G k The fitness S k ; The classification iterative population update library includes the classification iterative population D(j) and the corresponding population iteration method F(j);
[0018] Calculate the fitness S k The specific steps include:
[0019] Obtain a historical gold transaction data set; the historical gold transaction data set includes historical gold transaction data within a preset time range and the corresponding main influencing factor data set; according to the prediction model individual G k The historical gold transaction data set is divided according to the value of L to obtain several gold transaction training samples; each gold transaction training sample contains a model input value and a model target value. The model input value is the gold transaction input data set after the historical gold transaction data set is divided according to the value of L and the corresponding main influencing factor feature fusion factor; the corresponding main influencing factor feature fusion factor is calculated according to the main influencing factor weight W. i The feature fusion calculation is performed on the corresponding main influencing factor data set after division; the model target value is the sample target value corresponding to the model input value selected according to the value of P;
[0020] Several gold transaction training samples are input into the initial gold transaction data prediction model for training to obtain a simulated gold transaction data prediction model; the average absolute percentage error of the simulated gold transaction data prediction model is calculated using the historical gold transaction data set to obtain the simulated evaluation accuracy; the simulated evaluation accuracy is used as the prediction model individual G k The fitness S k ;
[0021] When the current iteration number is t, set B A (t) is the prediction model individual G k The best position in the tth iteration corresponds to the current best fitness S max (t); Using formula B C (t) = B A (t)*[1+E 1 *Cauchy(0,1)+E 2 *Causs(0,1)] for B A (t) Update and obtain the updated best position B C (t); Calculate and update the best position B C (t) to get the current best fitness S new (t); where E 1 =1-t / T,E 2 =t / T; Cauchy(0,1) is a random number that obeys Cauchy distribution, Causs(0,1) is a random number that obeys Gaussian distribution;
[0022] If S new (t)>S max (t), then for B A (t) is updated, and B C (t) Replace B A (t), S new (t) Replace S max (t); otherwise, no operation is performed and the population iteration continues;
[0023] When t = T, the prediction model individual G corresponding to the maximum output fitness k , which is the optimal prediction model individual; the values of L and P in the optimal prediction model individual are used as the values of the prediction time window length and the advance prediction step length to build a gold trading data prediction model.
[0024] As a preferred technical solution of the present invention, the gold transaction data prediction model includes a data preprocessing layer, a data prediction layer and a result output layer;
[0025] The data preprocessing layer is used to preprocess the input gold transaction data set to be predicted to obtain the preprocessed gold transaction data set; using the main influencing factor weight W i Calculate the data set of the main influencing factors to be predicted and obtain the feature fusion factor of the influencing factors;
[0026] The data prediction layer is constructed using the LSTM-CNN-LSTM model fusion structure to perform predictive analysis on the pre-processed gold transaction data set and the influencing factor feature fusion factors to obtain the predicted gold transaction data;
[0027] The result output layer is used to output predicted gold transaction data.
[0028] As a preferred technical solution of the present invention, the optimization algorithm used to determine the actual values of L and P using the improved optimization algorithm is the dung beetle optimization algorithm, and the classification iterative population update library is constructed based on the dung beetle optimization algorithm.
[0029] As a preferred technical solution of the present invention, the gold transaction data prediction model is obtained by training the initial gold transaction data prediction model using the prediction time window, the advance prediction step and the historical gold transaction data set, and the gold transaction data prediction model is updated at preset time intervals.
[0030] A gold trading market transaction data prediction system, comprising:
[0031] Prediction model building module, influencing factor determination module and transaction data prediction and analysis module;
[0032] The prediction model construction module includes a parameter optimization unit and a model construction unit. The parameter optimization unit is used to set the prediction time window length as L and the advance prediction step length as P, and use the improved optimization algorithm to determine the actual values of L and P; the model construction unit is used to use the LSTM-CNN-LSTM model fusion structure as the basic model of the gold trading data prediction model to obtain the initial gold trading data prediction model; the initial gold trading data prediction model is trained using the prediction time window and the advance prediction step to obtain the gold trading data prediction model; the gold trading data prediction model includes a data preprocessing layer, a data prediction layer and a result output layer;
[0033] The influencing factor determination module includes a data acquisition unit and a data analysis unit. The data acquisition unit is used to obtain a data set of influencing factors of gold trading according to the prediction time window. The data set of influencing factors of gold trading includes M quantifiable influencing factors R m , m=1,2,…,M; quantifiable influencing factors R m contains N data points, R m = {R m1 , Rm2 , …, R mn , …, R mN}, n=1, 2, …, N, N>M; the data analysis unit is used to construct a matrix according to the gold trading influencing factor data set to obtain the gold trading influencing factor data matrix; the gold trading influencing factor analysis model is used to analyze the gold trading influencing factor data matrix to determine the main influencing factors Zi and the main influencing factor weights W i , i = 1, 2, ..., I, I is the total number of main influencing factors after screening M quantifiable influencing factors after analysis; the main influencing factors Z i And the weight of the main influencing factors W i Combine them to obtain the data set of main influencing factors to be predicted;
[0034] The transaction data prediction and analysis module includes a data preparation unit and a data prediction unit. The data preparation unit is used to obtain the gold transaction data set to be predicted according to the prediction time window; the data prediction unit is used to input the gold transaction data set to be predicted and the data set of main influencing factors to be predicted into the gold transaction data prediction model for analysis to obtain predicted gold transaction data; and the predicted gold transaction data is used for subsequent analysis.
[0035] The present invention has the following advantages:
[0036] 1. The present invention can more accurately predict the trend of the gold trading market by analyzing multiple quantifiable influencing factors and screening out the main influencing factors and their weights; using the LSTM-CNN-LSTM model fusion structure as the basic model, combined with the multi-layer structure of data preprocessing, prediction and result output, it can improve the model's processing ability and prediction effect on complex market data, and improve the accuracy and practicality of predicting gold trading market transaction data; by setting the prediction time window length and the advance prediction step length, and using the improved optimization algorithm to determine the actual values of these parameters, it can adapt to changes in the gold trading market and improve the flexibility and adaptability of the prediction.
[0037] 2. The present invention can more accurately determine the key parameters affecting gold trading predictions by continuously iterating the optimization algorithm, thereby improving the accuracy of the entire prediction model. The improved optimization algorithm can dynamically adjust the parameters of the prediction model according to different gold trading market conditions and data characteristics, so that the model can adapt to market changes; the introduction of Circle chaos mapping and updating the current optimal position after population iteration and other improved methods can enhance the global search capability of the algorithm and avoid falling into the local optimal solution. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 The present invention is a schematic diagram of the structure of a gold trading market transaction data prediction system used in an embodiment of the present invention. DETAILED DESCRIPTION
[0039] In order to enable persons skilled in the art to better understand the technical solutions in the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0040] Embodiment 1, a method for predicting transaction data in a gold trading market, comprising:
[0041] S1. Obtain the gold transaction data set to be predicted according to the prediction time window; obtain the gold transaction influencing factor data set according to the prediction time window; the gold transaction influencing factor data set contains M quantifiable influencing factors R m , m=1,2,…,M; quantifiable influencing factors R m contains N data points, R m = {R m1 , R m2 , …, R mn , …, R mN}, n=1, 2, …, N, N>M; construct a matrix based on the gold trading influencing factor data set to obtain the gold trading influencing factor data matrix; use the gold trading influencing factor analysis model to analyze the gold trading influencing factor data matrix and determine the main influencing factor Z i And the weight of the main influencing factors W i , i = 1, 2, ..., I, I is the total number of main influencing factors after screening M quantifiable influencing factors after analysis; the main influencing factors Z i And the weight of the main influencing factors W i Combine them to obtain the data set of the main influencing factors to be predicted; set the prediction time window length to L, the advance prediction step length to P, and use the improved optimization algorithm to determine the actual values of L and P;
[0042] Assuming that the prediction time window is 6 months and the forward prediction step length is 6 months, the gold transaction data set to be predicted and the gold transaction influencing factor data set of the previous 6 months are obtained at the current time node; the gold transaction data set of the sixth month in the future is predicted based on the real-time fluctuating gold transaction influencing factor data set, at which time the prediction accuracy is the highest and the prediction effect is the best; if the prediction time window length and the forward prediction step length need to be adjusted, the improved optimization algorithm is reused to determine the actual values of L and P; quantifiable influencing factors may include the current economic market, current time popularity and other influencing factors;
[0043] The gold trading influencing factor analysis model includes a preliminary dimension reduction layer, a feature selection layer, an adaptive weight layer and a result output layer;
[0044] The preliminary dimension reduction layer is used to reduce the dimension of the gold trading influencing factors data matrix using the principal component analysis method to obtain the reduced dimension gold trading influencing factors data matrix;
[0045] The feature selection layer is used to further screen the reduced-dimensional gold trading influencing factor data matrix using the recursive feature elimination method to obtain the main influencing factor matrix;
[0046] The adaptive weight layer is used to extract the feature importance scores from the main influencing factor matrix to obtain the main influencing factor score matrix;
[0047] The result output layer is used to obtain the main influencing factors Z according to the main influencing factor scoring matrix i And the weight of the main influencing factors W i ;
[0048] The specific steps for training the adaptive weight layer include:
[0049] Collecting a number of adaptive weight training samples; each adaptive weight training sample contains an analyzed influencing factor matrix with annotated feature importance scores; combining the number of adaptive weight training samples to obtain an adaptive weight training set;
[0050] An initial adaptive weight layer is constructed using the random forest model and the adaptive weight training set, and a model evaluation is performed on the initial adaptive weight layer to obtain an initial adaptive weight layer model evaluation result; if the initial adaptive weight layer model evaluation result is passed, the initial adaptive weight layer is used as the adaptive weight layer; otherwise, the adaptive weight training set is used to continue model training;
[0051] The preliminary dimensionality reduction layer can reduce the dimension of the data, remove noise and redundant information, and thus improve the efficiency of subsequent analysis; the feature selection layer uses the recursive feature elimination method to screen out the most relevant influencing factors for gold trading, thereby enhancing the feature relevance and prediction accuracy of the model; the adaptive weight layer can automatically adjust the weight according to the importance of the feature, so that the model pays more attention to the factors that have a greater impact on gold trading. Through the training and evaluation of the random forest model, an adaptive weight layer with strong generalization ability can be constructed to improve the model's prediction ability on unknown data; at the same time, the gold trading influencing factor analysis model can be updated according to real-time market changes to adapt to the factors that have the greatest impact on gold trading, thereby improving the quality of the predicted data;
[0052] The specific steps of using the improved optimization algorithm to determine the actual values of L and P include:
[0053] Construct K prediction model individuals G k , k = 1, 2, ..., K; each prediction model individual G kContains a set of L and P values; constructs K prediction model individuals G k When , we use prior knowledge to control the preset value range of L and P, and use Circle mapping to randomly generate K prediction model individuals G within the preset value range. k ; K prediction model individuals G k Combine to obtain the prediction model optimization iteration population; set t as the current iteration number, t = 1, 2, ..., T;
[0054] The prediction model optimization iteration population is divided into four classification iteration populations D(j), j = 1, 2, 3, 4; the classification iteration population update library is used to update the position of the classification iteration population D(j) and calculate the fitness to obtain the prediction model individual G k The fitness S k ; The classification iterative population update library includes the classification iterative population D(j) and the corresponding population iteration method F(j);
[0055] Calculate the fitness S k The specific steps include:
[0056] Obtain a historical gold transaction data set; the historical gold transaction data set includes historical gold transaction data within a preset time range and the corresponding main influencing factor data set; according to the prediction model individual G k The historical gold transaction data set is divided according to the value of L to obtain several gold transaction training samples; each gold transaction training sample contains a model input value and a model target value. The model input value is the gold transaction input data set after the historical gold transaction data set is divided according to the value of L and the corresponding main influencing factor feature fusion factor; the corresponding main influencing factor feature fusion factor is calculated according to the main influencing factor weight W. i The feature fusion calculation is performed on the corresponding main influencing factor data set after division; the model target value is the sample target value corresponding to the model input value selected according to the value of P;
[0057] Several gold transaction training samples are input into the initial gold transaction data prediction model for training to obtain a simulated gold transaction data prediction model; the average absolute percentage error of the simulated gold transaction data prediction model is calculated using the historical gold transaction data set to obtain the simulated evaluation accuracy; the simulated evaluation accuracy is used as the prediction model individual G k The fitness S k ;
[0058] When the current iteration number is t, set B A (t) is the prediction model individual G k The best position in the tth iteration corresponds to the current best fitness S max (t); Using formula BC (t) = B A (t)*[1+E 1 *Cauchy(0,1)+E 2 *Causs(0,1)] for B A (t) Update and obtain the updated best position B C (t); Calculate and update the best position B C (t) to get the current best fitness S new (t); where E 1 =1-t / T,E 2 =t / T; Cauchy(0,1) is a random number that obeys Cauchy distribution, and Causs(0,1) is a random number that obeys Gaussian distribution; in the early stage of iteration, E1 is large and E2 is small. As the number of iterations increases, E1 gradually decreases and E2 gradually increases. As the number of iterations changes, the optimal position gradually changes to avoid falling into the local optimum;
[0059] If S new (t)>S max (t), then for B A (t) is updated, and B C (t) Replace B A (t), S new (t) Replace S max (t); otherwise, no operation is performed and the population iteration continues;
[0060] When t = T, the prediction model individual G corresponding to the maximum output fitness k , which is the optimal prediction model individual; the values of L and P in the optimal prediction model individual are used as the values of the prediction time window length and the advance prediction step length to construct the gold transaction data prediction model;
[0061] By simulating the gold trading data prediction model and calculating the mean absolute percentage error, the prediction performance of the model can be evaluated more accurately, thereby selecting the optimal L and P values; introducing the randomness of the Cauchy distribution and Gaussian distribution, as well as the dynamically adjusted E 1 and E 2 Parameters help the algorithm to jump out of the local optimum and find the global optimal solution; through classification, iterative population and fitness evaluation, it can quickly identify model individuals with poor performance, reduce the input of computing resources for them, and improve the overall computing efficiency; accurate L and P values help to build a more reliable gold trading prediction model and provide investors and decision makers with higher quality decision support;
[0062] The optimization algorithm used in the actual value determination of L and P is the dung beetle optimization algorithm. The classification iterative population update library is constructed based on the dung beetle optimization algorithm. According to the dung beetle optimization algorithm, the prediction model optimization iterative population is divided into rolling dung beetles, breeding dung beetles, small dung beetles, and stealing dung beetles in proportion, and different position update methods are set for different dung beetle individuals to expand the search range of the population and find the global optimal position.
[0063] S2. Input the gold transaction data set to be predicted and the data set of main influencing factors to be predicted into the gold transaction data prediction model for analysis to obtain predicted gold transaction data; use the predicted gold transaction data for subsequent analysis; the gold transaction data prediction model includes a data preprocessing layer, a data prediction layer and a result output layer; use the LSTM-CNN-LSTM model fusion structure as the basic model of the gold transaction data prediction model to obtain an initial gold transaction data prediction model; use the prediction time window and the advance prediction step to train the initial gold transaction data prediction model to obtain the gold transaction data prediction model;
[0064] The gold transaction data prediction model includes a data preprocessing layer, a data prediction layer, and a result output layer;
[0065] The data preprocessing layer is used to preprocess the input gold transaction data set to be predicted to obtain the preprocessed gold transaction data set; using the main influencing factor weight W i Calculate the data set of the main influencing factors to be predicted and obtain the feature fusion factor of the influencing factors;
[0066] The data prediction layer is constructed using the LSTM-CNN-LSTM model fusion structure to perform predictive analysis on the pre-processed gold transaction data set and the influencing factor feature fusion factors to obtain the predicted gold transaction data;
[0067] The result output layer is used to output the predicted gold transaction data;
[0068] CNN is good at extracting local features, while LSTM is good at processing sequence data. By combining the two, the model can capture both the spatial and time series features of the data, which is particularly important for complex and changeable data such as the financial market. This combination can improve the model's ability to understand market trends, thereby improving the accuracy of predictions; LSTM can effectively handle nonlinear relationships and high-dimensional data due to its gating mechanism, while CNN can learn local features of data through convolutional layers. This structural fusion makes the model more flexible and effective in processing complex financial time series data; financial markets are affected by a variety of factors, including macroeconomic indicators, market sentiment, policy changes, etc. The LSTM-CNN-LSTM structure model can adapt to these different conditions and predict future market trends by learning patterns in historical data; the LSTM-CNN-LSTM model fusion structure in the data prediction layer of the gold trading data prediction model can provide more accurate, efficient, and stable prediction results by combining the advantages of the two models;
[0069] The gold trading data prediction model is obtained by training the initial gold trading data prediction model using the prediction time window, the advance prediction step and the historical gold trading data set. The gold trading data prediction model is updated at preset time intervals. The preset time interval is set by professional and technical personnel according to actual conditions. The prediction time window, the advance prediction step and the historical gold trading data set are updated and trained to obtain a new gold trading data prediction model. This training mechanism allows the model to be adjusted according to different prediction needs, improves the flexibility and practicality of the model, and is more in line with actual usage needs. Accurate trading data prediction results can help traders and analysts better understand market trends and make more informed trading decisions.
[0070] Example 2, a gold trading market transaction data prediction system, see Figure 1 As shown, including:
[0071] Prediction model building module, influencing factor determination module and transaction data prediction and analysis module;
[0072] The prediction model construction module includes a parameter optimization unit and a model construction unit. The parameter optimization unit is used to set the prediction time window length as L and the advance prediction step length as P, and use the improved optimization algorithm to determine the actual values of L and P; the model construction unit is used to use the LSTM-CNN-LSTM model fusion structure as the basic model of the gold trading data prediction model to obtain the initial gold trading data prediction model; the initial gold trading data prediction model is trained using the prediction time window and the advance prediction step to obtain the gold trading data prediction model; the gold trading data prediction model includes a data preprocessing layer, a data prediction layer and a result output layer;
[0073] The influencing factor determination module includes a data acquisition unit and a data analysis unit. The data acquisition unit is used to obtain a data set of influencing factors of gold trading according to the prediction time window. The data set of influencing factors of gold trading includes M quantifiable influencing factors R m , m=1,2,…,M; quantifiable influencing factors R m contains N data points, R m = {R m1 , R m2 , …, R mn , …, R mN}, n=1, 2, …, N, N>M; the data analysis unit is used to construct a matrix according to the gold trading influencing factor data set to obtain the gold trading influencing factor data matrix; the gold trading influencing factor analysis model is used to analyze the gold trading influencing factor data matrix to determine the main influencing factors Zi and the main influencing factor weights W i , i = 1, 2, ..., I, I is the total number of main influencing factors after screening M quantifiable influencing factors after analysis; the main influencing factors Z i And the weight of the main influencing factors W i Combine them to obtain the data set of main influencing factors to be predicted;
[0074] The transaction data prediction and analysis module includes a data preparation unit and a data prediction unit. The data preparation unit is used to obtain the gold transaction data set to be predicted according to the prediction time window; the data prediction unit is used to input the gold transaction data set to be predicted and the data set of main influencing factors to be predicted into the gold transaction data prediction model for analysis to obtain predicted gold transaction data; and the predicted gold transaction data is used for subsequent analysis.
[0075] It should be understood that those skilled in the art can make improvements or changes based on the above description, and all such improvements and changes should fall within the scope of protection of the appended claims of the present invention. Parts not described in detail in this specification belong to the prior art known to those skilled in the art.
Claims
1. A method for predicting transaction data in a gold trading market, characterized in that: The following steps are involved: S1. Obtain the gold transaction data set to be predicted according to the prediction time window; obtain the gold transaction influencing factor data set according to the prediction time window; the gold transaction influencing factor data set contains M quantifiable influencing factors R m , m=1,2,…,M; Quantifiable influencing factors R m contains N data points, R m = {R m1 , R m2 , …, R mn , …, R mN }, n=1, 2, …, N, N>M; construct a matrix based on the gold trading influencing factor data set to obtain the gold trading influencing factor data matrix; use the gold trading influencing factor analysis model to analyze the gold trading influencing factor data matrix and determine the main influencing factor Z i And the weight of the main influencing factors W i , i = 1, 2, ..., I, I is the total number of main influencing factors after screening M quantifiable influencing factors after analysis; the main influencing factors Z i And the weight of the main influencing factors W i Combine them to obtain the data set of main influencing factors to be predicted; Set the prediction time window length to L, the advance prediction step length to P, and use the improved optimization algorithm to determine the actual values of L and P; S2. Input the gold transaction data set to be predicted and the data set of main influencing factors to be predicted into the gold transaction data prediction model for analysis to obtain predicted gold transaction data; use the predicted gold transaction data for subsequent analysis; the gold transaction data prediction model includes a data preprocessing layer, a data prediction layer and a result output layer; use the LSTM-CNN-LSTM model fusion structure as the basic model of the gold transaction data prediction model to obtain the initial gold transaction data prediction model; use the prediction time window and the advance prediction step to train the initial gold transaction data prediction model to obtain the gold transaction data prediction model.
2. A method for predicting transaction data in a gold trading market according to claim 1, characterized in that: The gold trading influencing factor analysis model includes a preliminary dimension reduction layer, a feature selection layer, an adaptive weight layer and a result output layer; The preliminary dimension reduction layer is used to reduce the dimension of the gold trading influencing factors data matrix using the principal component analysis method to obtain the reduced dimension gold trading influencing factors data matrix; The feature selection layer is used to further screen the reduced-dimensional gold trading influencing factor data matrix using the recursive feature elimination method to obtain the main influencing factor matrix; The adaptive weight layer is used to extract the feature importance scores from the main influencing factor matrix to obtain the main influencing factor score matrix; The result output layer is used to obtain the main influencing factors Z according to the main influencing factor scoring matrix i And the weight of the main influencing factors W i .
3. A method for predicting transaction data in a gold trading market according to claim 2, characterized in that: The specific steps for training the adaptive weight layer include: Collecting a number of adaptive weight training samples; each adaptive weight training sample contains an analyzed influencing factor matrix with annotated feature importance scores; combining the number of adaptive weight training samples to obtain an adaptive weight training set; The initial adaptive weight layer is constructed using the random forest model and the adaptive weight training set, and a model evaluation is performed on the initial adaptive weight layer to obtain an initial adaptive weight layer model evaluation result; if the initial adaptive weight layer model evaluation result is passed, the initial adaptive weight layer is used as the adaptive weight layer; otherwise, the adaptive weight training set is used to continue model training.
4. A method for predicting transaction data in a gold trading market according to claim 3, characterized in that: The specific steps of using the improved optimization algorithm to determine the actual values of L and P include: Construct K prediction model individuals G k , k = 1, 2, ..., K; each prediction model individual G k Contains a set of L and P values; constructs K prediction model individuals G k When , we use prior knowledge to control the preset value range of L and P, and use Circle mapping to randomly generate K prediction model individuals G within the preset value range. k ; K prediction model individuals G k Combine to obtain the prediction model optimization iteration population; set t as the current iteration number, t = 1, 2, ..., T; The prediction model optimization iteration population is divided into four classification iteration populations D(j), j = 1, 2, 3, 4; the classification iteration population update library is used to update the position of the classification iteration population D(j) and calculate the fitness to obtain the prediction model individual G k The fitness S k ; The classification iterative population update library includes the classification iterative population D(j) and the corresponding population iteration method F(j); Calculate the fitness S k The specific steps include: Obtain a historical gold transaction data set; the historical gold transaction data set includes historical gold transaction data within a preset time range and the corresponding main influencing factor data set; according to the prediction model individual G k The historical gold transaction data set is divided according to the value of L to obtain several gold transaction training samples; each gold transaction training sample contains a model input value and a model target value. The model input value is the gold transaction input data set after the historical gold transaction data set is divided according to the value of L and the corresponding main influencing factor feature fusion factor; the corresponding main influencing factor feature fusion factor is calculated according to the main influencing factor weight W. i The feature fusion calculation is performed on the corresponding main influencing factor data set after the division; The model target value is the sample target value corresponding to the model input value selected according to the value of P; Several gold transaction training samples are input into the initial gold transaction data prediction model for training to obtain a simulated gold transaction data prediction model; the average absolute percentage error of the simulated gold transaction data prediction model is calculated using the historical gold transaction data set to obtain the simulated evaluation accuracy; the simulated evaluation accuracy is used as the prediction model individual G k The fitness S k ; When the current iteration number is t, set B A (t) is the prediction model individual G k The best position in the tth iteration corresponds to the current best fitness S max (t); using formula B C (t) = B A (t)*[1+E1*Cauchy(0,1)+E2*Causs(0,1)] for B A (t) Update and obtain the updated best position B C (t); Calculate and update the best position B C (t) to get the current best fitness S new (t); where E1 = 1-t / T, E2 = t / T; Cauchy(0,1) is a random number that obeys the Cauchy distribution, and Causs(0,1) is a random number that obeys the Gaussian distribution; If S new (t)>S max (t), then for B A (t) is updated, and B C (t) Replace B A (t), S new (t) Replace S max (t); otherwise, no operation is performed and the population iteration continues; When t = T, the prediction model individual G corresponding to the maximum output fitness k , which is the optimal prediction model individual; the values of L and P in the optimal prediction model individual are used as the values of the prediction time window length and the advance prediction step length to build a gold trading data prediction model.
5. A method for predicting transaction data in the gold trading market according to claim 4, characterized in that: The gold transaction data prediction model includes a data preprocessing layer, a data prediction layer, and a result output layer; The data preprocessing layer is used to preprocess the input gold transaction data set to be predicted to obtain the preprocessed gold transaction data set; using the main influencing factor weight W i Calculate the data set of the main influencing factors to be predicted and obtain the feature fusion factor of the influencing factors; The data prediction layer is constructed using the LSTM-CNN-LSTM model fusion structure to perform predictive analysis on the pre-processed gold transaction data set and the influencing factor feature fusion factors to obtain the predicted gold transaction data; The result output layer is used to output predicted gold transaction data.
6. A method for predicting transaction data in the gold trading market according to claim 5, characterized in that: The improved optimization algorithm is used to determine the actual values of L and P. The optimization algorithm is the dung beetle optimization algorithm, and the classification iterative population update library is constructed based on the dung beetle optimization algorithm.
7. A method for predicting transaction data in the gold trading market according to claim 6, characterized in that: The gold transaction data prediction model is obtained by training the initial gold transaction data prediction model using the prediction time window, the advance prediction step and the historical gold transaction data set, and the gold transaction data prediction model is updated at preset time intervals.
8. A gold trading market transaction data prediction system, characterized in that: The system applies a gold trading market transaction data prediction method as described in any one of claims 1 to 7, including: Prediction model building module, influencing factor determination module and transaction data prediction and analysis module; The prediction model construction module includes a parameter optimization unit and a model construction unit. The parameter optimization unit is used to set the prediction time window length as L and the advance prediction step length as P, and use the improved optimization algorithm to determine the actual values of L and P; the model construction unit is used to use the LSTM-CNN-LSTM model fusion structure as the basic model of the gold trading data prediction model to obtain the initial gold trading data prediction model; the initial gold trading data prediction model is trained using the prediction time window and the advance prediction step to obtain the gold trading data prediction model; the gold trading data prediction model includes a data preprocessing layer, a data prediction layer and a result output layer; The influencing factor determination module includes a data acquisition unit and a data analysis unit. The data acquisition unit is used to obtain a data set of influencing factors of gold trading according to the prediction time window. The data set of influencing factors of gold trading includes M quantifiable influencing factors R m , m=1,2,…,M; quantifiable influencing factors R m contains N data points, R m = {R m1 , R m2 , …, R mn , …, R mN }, n=1, 2, …, N, N>M; the data analysis unit is used to construct a matrix according to the gold trading influencing factor data set to obtain the gold trading influencing factor data matrix; the gold trading influencing factor analysis model is used to analyze the gold trading influencing factor data matrix to determine the main influencing factor Z i And the weight of the main influencing factors W i , i = 1, 2, ..., I, I is the total number of main influencing factors after screening M quantifiable influencing factors after analysis; the main influencing factors Z i And the weight of the main influencing factors W i Combine them to obtain the data set of main influencing factors to be predicted; The transaction data prediction and analysis module includes a data preparation unit and a data prediction unit. The data preparation unit is used to obtain the gold transaction data set to be predicted according to the prediction time window; the data prediction unit is used to input the gold transaction data set to be predicted and the data set of main influencing factors to be predicted into the gold transaction data prediction model for analysis to obtain predicted gold transaction data; and the predicted gold transaction data is used for subsequent analysis.