Financial product recommendation method, system, device and medium based on semi-Gaussian sampling
By using the combination of semi-Gaussian sampling and dynamic time convolutional neural network in the financial product recommendation system, the shortcomings in the existing system's popularity and dynamic changes in financial product data are solved, and more accurate and timely financial product recommendation results are achieved.
Patent Information
- Application Number
- CN202411718037.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2044-11-28
AI Technical Summary
When using the popularity and trend time series data of financial product recommendation systems, the existing financial product recommendation system fails to fully consider the dynamic changes of the data, resulting in the model relying too much on historical data and neglecting important recent information, which affects the timeliness and accuracy of the recommendation results.
A semi-Gaussian sampling method is adopted, combined with dynamic time convolutional neural network (DTCN), and the time series data is given higher weights to the time series data through semi-Gaussian sampling. The dynamic time convolutional network adaptively adjusts the feature extraction of time series data by dynamically learning the importance of different time steps.
It effectively solves the problem of insufficient recent samples in traditional methods, improves the model's attention to recent popularity, improves the timeliness and accuracy of recommended results, and enhances the modeling ability of multi-scale dynamic features.
Smart Images

Figure CN119205281B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data mining technology, and in particular to a financial product recommendation method, system, device and medium based on semi-Gaussian sampling. Background Art
[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.
[0003] With the rapid development of science and technology and the continuous innovation in the financial field, the types and number of financial products are increasing. Users need to face a huge amount of information when choosing financial products, and the recommendation system can effectively reduce the user's search cost and improve the efficiency of product selection. The financial industry has accumulated a large amount of time series data on the popularity of financial products and their historical trends in long-term operations. These data include the degree of attention of the product in the market and its past performance, which is the core basis for optimizing the recommendation system. However, the current recommendation system still has many shortcomings when using this data.
[0004] Most existing recommendation methods use an equal-weight training strategy, which assigns the same weight to all time series samples. This method fails to fully consider the dynamic characteristics of the popularity and trends of financial products. The financial market environment changes rapidly, and recent popularity and trend data usually better reflect the current market conditions, while older data has less influence. The equal-weight strategy may cause the model to rely too much on historical data when making recommendations and ignore recent important information, thus affecting the timeliness and accuracy of the recommendation results.
[0005] In addition, the traditional one-dimensional convolutional neural network (CNN) has a natural advantage in processing multi-dimensional time series data. It can process multiple features at the same time point in parallel, improve operating efficiency, and extract local features through convolution operations. However, due to the fixed size of the convolution kernel and the use of the same weight in the time dimension, it cannot flexibly adapt to the importance of different time points. This feature makes it difficult to capture the dependencies and dynamic changes between time steps in the short term in the popularity and trends of financial products.
[0006] Therefore, existing methods may not be able to fully handle the long-term and short-term dependencies and dynamic changes in the short term in time series data, resulting in a decrease in the effectiveness and reliability of the recommendation results of financial products. Summary of the invention
[0007] In order to solve the technical problems existing in the above-mentioned background technology, the present invention provides a financial product recommendation method, system, device and medium based on semi-Gaussian sampling. The present invention combines the dual advantages of semi-Gaussian sampling and dynamic temporal convolutional neural network (Dynamic Temporal Convolutional Network, DTCN), and can more comprehensively utilize the popularity and historical trend time series data of financial products to generate more accurate recommendation results, thereby providing users with better decision support.
[0008] In order to achieve the above object, the present invention adopts the following technical solution:
[0009] A first aspect of the present invention provides a financial product recommendation method based on semi-Gaussian sampling.
[0010] The financial product recommendation method based on semi-Gaussian sampling includes:
[0011] Obtain historical attribute data and historical popularity data of multiple financial products, perform preprocessing, and construct a sample set, where each sample in the sample set includes standardized historical attribute data and historical popularity data of all financial samples;
[0012] The sample set is divided into a training set and a test set, the sample numbers in the training set are mapped to the x-axis interval [μ-3σ, μ] of the semi-Gaussian distribution, the weight of each sample is calculated, and the weight is converted into a probability value; the multinomial distribution uses the probability value to extract a number of samples with replacement;
[0013] Based on several extracted samples and the true value corresponding to each sample, the dynamic time convolutional network is trained to obtain a trained dynamic time convolutional network, which is used to predict the rankings of all financial products and recommend several top-ranked financial products to users.
[0014] Furthermore, the dynamic temporal convolutional network includes a combination of several time-step dependent modules and time convolution modules, and a fully connected module, wherein the time-step dependent module is used to perform a point multiplication operation on the weights and input data, wherein the input data includes several samples extracted in the training phase, or the current attribute data and current heat data of the financial product after standardization in the prediction phase.
[0015] Furthermore, the temporal convolution module includes: a one-dimensional convolution layer, a batch normalization layer, an activation layer (LeakyReLU) and a random dropout layer; the fully connected module includes a fully connected layer, a batch normalization layer, an activation layer and a normalized exponential function (SoftMax).
[0016] Furthermore, during the training process, the Spearman rank correlation coefficient loss is used to optimize the hyperparameters of the dynamic temporal convolutional network.
[0017] Furthermore, the true value corresponding to each sample is ranked by the heat value corresponding to each sample.
[0018] Furthermore, the preprocessing includes: standardizing the historical attribute data and the historical popularity data, and after the standardization, ranking the historical popularity data of all financial products at each time step, with the highest popularity ranking being 1.
[0019] Furthermore, the historical attribute data includes time points, daily yields, daily fluctuations and daily trading volumes, and the historical popularity data is the search index or market attention index of financial products.
[0020] A second aspect of the present invention provides a financial product recommendation system based on semi-Gaussian sampling.
[0021] Financial product recommendation system based on semi-Gaussian sampling, including:
[0022] An acquisition and preprocessing module is configured to: acquire historical attribute data and historical popularity data of multiple financial products, perform preprocessing, and construct a sample set, wherein each sample in the sample set includes standardized historical attribute data and historical popularity data of all financial samples;
[0023] A weight module is configured to: divide the sample set into a training set and a test set, map the sample sequence numbers in the training set to the x-axis interval [μ-3σ, μ] of the semi-Gaussian distribution, calculate the weight of each sample, and convert the weight into a probability value; and extract a number of samples with replacement using the probability value using the multinomial distribution;
[0024] The training and prediction module is configured to: train the dynamic time convolution network based on a number of extracted samples and the true value corresponding to each sample, obtain a trained dynamic time convolution network, and use it to predict the ranking of all financial products, and recommend several top-ranked financial products to users.
[0025] A third aspect of the present invention provides a computer-readable storage medium.
[0026] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps in the financial product recommendation method based on semi-Gaussian sampling as described in the first aspect above.
[0027] A fourth aspect of the present invention provides a computer device.
[0028] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps in the method for recommending financial products based on semi-Gaussian sampling as described in the first aspect above are implemented.
[0029] Compared with the prior art, the present invention has the following beneficial effects:
[0030] The present invention obtains and preprocesses the time series data of the popularity of financial products and their historical change trends, divides the data samples and assigns weights to the samples, uses the dynamic time convolutional neural network (DTCN) to obtain the predicted ranking of financial products, and selects the financial products with higher rankings to display to users. The present invention effectively solves the problem of insufficient importance of recent samples in traditional equal-weight training, and improves the model's attention to recent popularity; at the same time, the time step dependency module dynamically learns the dynamic dependency relationship between each time step in the sample through the model, thereby improving the reliability and effectiveness of the recommendation results.
[0031] The present invention uses semi-Gaussian sampling to highlight the importance of recent data, so that the model can more accurately capture short-term changes in the market, thereby improving the timeliness of recommendation results.
[0032] The present invention adopts DTCN to dynamically learn the importance of different time steps and adaptively adjust the feature extraction of time series data, so that the model can simultaneously capture the dependencies of each time step in the short term, thereby improving the modeling ability of multi-scale dynamic features.
[0033] The present invention combines the dual advantages of semi-Gaussian sampling and DTCN, and can more comprehensively utilize the popularity of financial products and historical trend time series data to generate more accurate recommendation results and provide users with better decision support. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0035] Figure 1 is a flow chart of a financial product recommendation method based on semi-Gaussian sampling shown in the present invention;
[0036] Figure 2 is a semi-Gaussian distribution diagram shown in the present invention;
[0037] Figure 3 is a structural diagram of a temporal convolution module shown in the present invention;
[0038] Figure 4 is a structural diagram of a time step dependent module shown in the present invention;
[0039] Figure 5 is a structural diagram of a full convolution module shown in the present invention;
[0040] Figure 6 is a structural diagram of the dynamic time convolutional network shown in the present invention. DETAILED DESCRIPTION
[0041] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0042] It should be noted that the following detailed descriptions are all illustrative and intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.
[0043] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0044] It should be noted that the flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the methods and systems according to various embodiments of the present disclosure. It should be noted that each box in the flowchart or block diagram can represent a module, a program segment, or a part of a code, and the module, program segment, or a part of a code may include one or more executable instructions for implementing the logical functions specified in each embodiment. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, or they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the flowchart and / or block diagram, and the combination of boxes in the flowchart and / or block diagram can be implemented using a dedicated hardware-based system that performs a specified function or operation, or can be implemented using a combination of dedicated hardware and computer instructions.
[0045] Embodiment 1
[0046] The present embodiment provides a financial product recommendation method based on semi-Gaussian sampling. The present embodiment uses the method applied to a server as an example for illustration. It is understandable that the method can also be applied to a terminal, and can also be applied to a terminal, a server, and a system, and is implemented through the interaction between the terminal and the server. The server can be an independent physical server, or a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network servers, cloud communications, middleware services, domain name services, security services CDN, and big data and artificial intelligence platforms. The terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited thereto. The terminal and the server can be directly or indirectly connected via wired or wireless communication, which is not limited in this application. In the present embodiment, the method includes the following steps:
[0047] Obtain historical attribute data and historical popularity data of multiple financial products, perform preprocessing, and construct a sample set, where each sample in the sample set includes standardized historical attribute data and historical popularity data of all financial samples;
[0048] The sample set is divided into a training set and a test set, the sample numbers in the training set are mapped to the x-axis interval [μ-3σ, μ] of the semi-Gaussian distribution, the weight of each sample is calculated, and the weight is converted into a probability value; the multinomial distribution uses the probability value to extract a number of samples with replacement;
[0049] Based on several extracted samples and the true value corresponding to each sample, the dynamic time convolutional network is trained to obtain a trained dynamic time convolutional network, which is used to predict the rankings of all financial products and recommend several top-ranked financial products to users.
[0050] The present invention adopts semi-Gaussian sampling and introduces a time decay mechanism to dynamically weight samples in time series data according to their time interval from the current moment. Specifically, data closer to the current moment is given a higher weight to highlight its importance in capturing the latest market dynamics, while older data is appropriately weakened in terms of its influence. This method can not only enhance the model's sensitivity to recent market changes, but also effectively retain long-term trend information, ensuring the comprehensiveness and accuracy of the recommendation results.
[0051] By combining semi-Gaussian sampling with DTCN, the present invention can not only achieve efficient modeling of time series data, but also differentiate the importance of different time points, thereby optimizing the reliability and timeliness of recommendation results.
[0052] The present embodiment is described in detail below with reference to the accompanying drawings:
[0053] Step 1: This step corresponds to Figure 1 In the data collection part shown in the figure, historical attribute data and historical popularity data of M financial products are obtained. The attribute data include four attribute values: time point, daily yield, daily fluctuation range and daily trading volume, as well as the historical popularity values of M financial products.
[0054] Step 2: This step corresponds to Figure 1 In the data preprocessing part shown in the figure, z-soccer normalization is performed on other attributes (daily yield, daily volatility, daily trading volume) and heat values except the time attribute.
[0055] Step 201: Taking the daily rate of return attribute as an example, calculate the mean of all time steps (i.e. all data) and standard deviation , standardize the daily data according to the z-score formula:
[0056]
[0057] in, represents the i-th time step.
[0058] The remaining daily volatility attributes, daily trading volume attributes and heat values are normalized in the same way as the daily yield attribute.
[0059] Step 202: rank the current popularity values of the M financial products at each time step, with the highest popularity value ranked as 1 and the lowest popularity value ranked as M.
[0060] Step 3: This step corresponds to Figure 1 The data samples and data set division parts are shown in the figure.
[0061] Step 301: Set the sliding window W to 32, i.e. the first sample Depend on , , , …, That is, the data of M financial products for 32 days. It consists of the standardized values of daily yield, daily fluctuation, daily trading volume and heat value of M financial products, with a total of 4×M values. Therefore, each sample contains the standardized yield value, daily fluctuation value, daily trading volume value and heat value of M financial products for 32 days. Corresponding true value Ranking the popularity of M financial products at the 32nd time step. Sample The corresponding formula is:
[0062]
[0063] Among them, s is the sample sequence number. The dimension of is [32,4×M]. In order to fit the input of one-dimensional convolution, The dimension is transformed to [4×M,32], The size is [M].
[0064] Step 302: For the total number of samples obtained by division, the first 80% of the samples are used as a training set, and the last 20% of the samples are used as a test set.
[0065] Step 4: This step corresponds to Figure 1 As shown in the weight allocation part, assume that the total number of training set samples is N, and now the sample numbered 0 to N, the sample number farthest from the current time is 0, and the other sample numbers are mapped to the x-axis interval [μ-3σ, μ] of the semi-Gaussian distribution, where μ is the mean of the Gaussian distribution and σ is the standard deviation of the Gaussian distribution. The mapping formula is:
[0066]
[0067] Then calculate the weight corresponding to each sample , the formula is:
[0068]
[0069] The corresponding weight distribution is as follows Figure 2 As shown in the figure, the horizontal axis is the sample number and the vertical axis is the weight value. In order to meet the subsequent sampling requirements, the weight is normalized and converted into a probability value. :
[0070]
[0071] Step 5: This step corresponds to Figure 1 In the data sampling part shown, the multinomial distribution uses the probability values of the training samples , extract 256 items with replacement each time Samples (i.e. batch size is 256) are used for subsequent model training. The sample contains the standardized daily yield value, daily volatility value, daily trading volume value and heat value of M financial products for 32 days.
[0072] Step 6: This step corresponds to Figure 1 The dynamic time convolution network part shown in the figure, because each The sample contains the standardized daily yield value, daily volatility value, daily trading volume value and heat value of M financial products. The receptive field of the last layer needs to cover the entire sample length, which is 32. Therefore, a total of 5 time step dependency modules and time convolution modules are required. The overall structure is as follows: Figure 6 shown.
[0073] Step 601: Set the batchsize bar Samples, each sample contains the standardized daily return value, daily volatility value, daily trading volume value and heat value of M financial products, with a size of [batchsize,4×M,32] as the input of the first layer time step dependency module. Then randomly generate batches of size [batchsize,32] from the Gaussian distribution and expand them to [batchsize,1,32] The dynamic weight D1 is point-multiplied with the input and then sent to the first time convolution module, where the one-dimensional convolution layer-1 has an input channel of 4×M, an output channel of 256, a convolution kernel size of 2, a dilation coefficient of 1, and a padding of 1 0 value before and after the last dimension, with a stride of 1. The output size of the one-dimensional convolution layer-1 block is [batchsize, 256, 33]; the truncation layer will discard the last value of the last dimension, so the output size is [batchsize, 256, 32] to keep the last dimension value unchanged at 32; the batch normalization layer parameter is 256; the activation layer (LeakyReLU) parameter is 0.2, and the random activation layer dropout rate is 0.2; the one-dimensional convolution layer-2 has an input channel of 4×M, an output channel of 256, a convolution kernel size of 1, a dilation coefficient of 1, no padding, and a stride of 1; the output of the random dropout layer is added to the output of the one-dimensional convolution layer-2 to obtain Output1. The size of Output1 of the temporal convolution module is [batchsize, 256, 32].
[0074] Step 602: Randomly generate a dynamic weight D2 of size [batchsize, 32] from a Gaussian distribution and expand it to [batchsize, 1, 32], perform a dot multiplication operation with the output Output1 of step 601 and size [batchsize, 256, 32], and then send it to the second temporal convolution module, where the one-dimensional convolution layer-1 has an input channel of 256, an output channel of 128, a convolution kernel size of 2, a dilation coefficient of 2, and two zero values are filled before and after the last dimension. The stride is 1, and the output size of the one-dimensional convolution layer-1 is [batchsize, 256, 32]. hsize,128,34]; the truncation layer will discard the last two values of the last dimension, so the output size is [batchsize,128,32] to keep the last dimension value unchanged at 32; the batch normalization layer parameter is 128; the activation layer (LeakyReLU) parameter is 0.2; the random activation layer dropout rate is 0.2; the one-dimensional convolution layer-2 uses a one-dimensional convolution with 256 input channels, 128 output channels, a convolution kernel size of 1, a dilation coefficient of 1, no padding, and a stride of 1; the output of the random dropout layer is added to the output of the one-dimensional convolution layer-2 to obtain Output2. The size of Output2 of the temporal convolution module is [batchsize,128,32].
[0075] Step 603: A dynamic weight D3 of size [batchsize, 32] is randomly generated from a Gaussian distribution and expanded to [batchsize, 1, 32]. The dynamic weight D3 is dot-multiplied with the output Output2 of step 602 and size [batchsize, 128, 32], and then sent to the third temporal convolution module, where the one-dimensional convolution layer-1 has 128 input channels, 64 output channels, a convolution kernel size of 2, a dilation coefficient of 4, and 4 zero values are filled before and after the last dimension. The stride is 1, and the output size of the one-dimensional convolution layer-1 is [batchsize, 128, 32]. tchsize,64,36]; the truncation layer will discard the last 4 values of the last dimension, so the output size is [batchsize,64,32] to keep the last dimension value unchanged at 32; the batch normalization layer parameter is 64; the activation layer (LeakyReLU) parameter is 0.2; the random activation layer dropout rate is 0.2; the one-dimensional convolution layer-2 uses a one-dimensional convolution with 128 input channels, 64 output channels, a convolution kernel size of 1, a dilation coefficient of 1, no padding, and a stride of 1; the output of the random dropout layer is added to the output of the one-dimensional convolution layer-2 to obtain Output3. The size of Output3 of the temporal convolution module is [batchsize,64,32].
[0076] Step 604: Randomly generate a dynamic weight D4 of size [batchsize, 32] from a Gaussian distribution and expand it to [batchsize, 1, 32], perform a dot multiplication operation with the output Output3 of step 603 and size [batchsize, 64, 32], and then send it to the fourth temporal convolution module, where the one-dimensional convolution layer-1 has 64 input channels, 32 output channels, a convolution kernel size of 2, a dilation coefficient of 8, 8 zero values are filled before and after the last dimension, the stride is 1, and the output size of the one-dimensional convolution layer-1 is [batchsize, 64, 32]. chsize,32,40]; the truncation layer will discard the last 8 values of the last dimension, so the output size is [batchsize,32,32] to keep the last dimension value unchanged at 32; the batch normalization layer parameter is 32; the activation layer (LeakyReLU) parameter is 0.2; the random activation layer dropout rate is 0.2; the one-dimensional convolution layer-2 uses a one-dimensional convolution with 64 input channels, 32 output channels, a convolution kernel size of 1, a dilation coefficient of 1, no padding, and a stride of 1; the output of the random dropout layer is added to the output of the one-dimensional convolution layer-2 to obtain Output4. The size of Output4 of the temporal convolution module is [batchsize,32,32].
[0077] Step 605: A dynamic weight D5 of size [batchsize, 32] is randomly generated from a Gaussian distribution and expanded to [batchsize, 1, 32]. The dynamic weight D5 is multiplied with the input Input of size [batchsize, 32, 32] and then sent to the fifth temporal convolution module, where the one-dimensional convolution layer-1 has 32 input channels, 24 output channels, a convolution kernel size of 2, a dilation coefficient of 16, 16 zero values are filled before and after the last dimension, the stride is 1, and the output size of the one-dimensional convolution layer-1 is [batchs ize,24,48]; the truncation layer will discard the last 16 values of the last dimension, so the output size is [batchsize,24,32] to keep the last dimension value unchanged at 32; the batch normalization layer parameter is 24; the activation layer (LeakyReLU) parameter is 0.2; the random dropout layer dropout rate is 0.2; the one-dimensional convolution layer-2 uses a one-dimensional convolution with 32 input channels, 24 output channels, a convolution kernel size of 1, a dilation coefficient of 1, no padding, and a stride of 1; the output of the random dropout layer is added to the output of the one-dimensional convolution layer-2 to obtain Output5. At this time, only the last value of the last dimension in Output5 is selected as the new Output6 with a size of [batchsize,24,1] and the size is transformed to [batchsize,24]. As the input of the fully connected module.
[0078] Step 606: Send the input sent in the previous step to the fully connected layer-1, and the number of input neurons is 24, and the number of output neurons is 16; the batch normalization layer parameter is 16; the activation layer parameter is 0.2; the number of input neurons in the fully connected layer-2 is 16, and the number of output neurons is M; at this time, the output size is [batchsize, M], and the output is sent to the normalized exponential function (SoftMax) to obtain the probability value P, the size is [batchsize, M], and the M values of the last dimension of each group in the probability value P are sorted from large to small, the largest probability value is ranked 1, and the smallest probability value is ranked M, and finally the predicted value is obtained .
[0079] This paper proposes a dynamic temporal convolutional neural network (DTCN). DTCN can automatically learn the weight of the influence of each time step in the time series on the recommendation results by introducing a dynamic weight mechanism, thereby solving the problem that traditional convolutional networks rely too evenly on each time step of samples in the short term.
[0080] Step 7: Calculate the predicted value for each sample and the true value The Spearman rank correlation coefficient loss is:
[0081]
[0082] in, refers to the i-th sample, It refers to The sample financial products, M is the number of financial products, For the Financial products in the The ranking of the model predictions in the sample, This is the real ranking.
[0083] The total loss is:
[0084]
[0085] Among them, B refers to the size of batchsize.
[0086] Step 8: Repeat steps 5 to 7 until the total loss curve converges, then save the model.
[0087] Step 9: Feed the test set data into the saved model to obtain the predicted ranking.
[0088] Step 10: Select the top-ranked financial product categories and recommend them to users, reducing user search time, providing users with choices, and reducing user decision-making time.
[0089] Embodiment 2
[0090] This embodiment provides a financial product recommendation system based on semi-Gaussian sampling.
[0091] An acquisition and preprocessing module is configured to: acquire historical attribute data and historical popularity data of multiple financial products, perform preprocessing, and construct a sample set, wherein each sample in the sample set includes standardized historical attribute data and historical popularity data of all financial samples;
[0092] A weight module is configured to: divide the sample set into a training set and a test set, map the sample sequence numbers in the training set to the x-axis interval [μ-3σ, μ] of the semi-Gaussian distribution, calculate the weight of each sample, and convert the weight into a probability value; and extract a number of samples with replacement using the probability value using the multinomial distribution;
[0093] The training and prediction module is configured to: train the dynamic time convolution network based on a number of extracted samples and the true value corresponding to each sample, obtain a trained dynamic time convolution network, and use it to predict the ranking of all financial products, and recommend several top-ranked financial products to users.
[0094] Among them, the acquisition and preprocessing module is also configured to: obtain historical data and historical popularity values of M kinds of financial products, and the historical data should include N attribute values at each time step, and each time step interval is 1 day. The historical popularity value can be the search index of the financial product, or one of the market attention index. This value fully reflects the social popularity of the current financial product. The N attribute values and popularity values in the historical data are standardized respectively to eliminate dimensional differences. The current popularity values of the M financial products are ranked at each time step, with the highest ranking of popularity value being 1 and the lowest ranking of popularity value being M. The standardized attribute values and popularity values are divided into data in a sliding window manner to obtain a sample set.
[0095] Among them, the sliding window needs a fixed window size. For example, if the window size is 10, then the first input X sample is the standardized attribute value and heat value of M financial products from the 0th time step to the 9th time step, forming a two-dimensional data sample with a size of [10, M*(N+1)], where N is the standardized attribute value and 1 is the standardized heat value. The size is converted to [M*(N+1),10], so that the convolution slides in the time dimension. This method is consistent with the time series processing method. Secondly, the corresponding first Y sample is the heat ranking of M financial products at the 10th time step, and the size should be [M].
[0096] Among them, the weight module is also configured to: divide the obtained sample set into a training set and a test set in proportion, wherein each sample in the training set is numbered from 0 according to the time from far to near. Weights are assigned to the training set samples, and the weights are obtained according to the semi-Gaussian distribution, wherein the semi-Gaussian distribution refers to the [μ-3σ,μ] interval part of the Gaussian distribution. Through this method, the weights of samples with a longer time are smaller, and the weights of samples with a shorter time are larger. At this time, we can not only learn from the laws of historical changes in the longer time, but also pay more attention to the laws of recent changes. The two can correct each other and enhance the reliability and effectiveness of the prediction results. The sample weights of the training set are normalized and converted from weights to probabilities for easy sampling. Using the multinomial distribution according to the probability of the samples in the training set, batch samples are extracted each time in a replacement manner to participate in the training of the dynamic time convolutional neural network (DTCN). At this time, samples with a shorter time have a greater chance of being extracted multiple times, and samples with a longer time also have a chance of being extracted.
[0097] The training and prediction module is also configured as follows: The dynamic temporal convolutional neural network consists of multiple time-step dependent modules and a temporal convolution module (TCN) and a fully connected module. Among them, the time-step dependent module refers to the point multiplication operation between the learnable parameters and the input data. Assume that the input data size is [batchsize, D, L], where batchsize is the total number of samples in a batch, D refers to the number of features in each time step, and L refers to the length of each sample containing the time step. The learnable parameters are randomly generated and have a size of [batchsize, 1, L]. This operation means that different features of the same time step have the same impact on the prediction results, and different time steps have different impacts on the prediction results. In addition, through the continuous iteration of the model, the weight distribution of each time step in the input sequence is dynamically adjusted. This determines the impact of abnormal fluctuations in the sample on the final prediction result, and improves the reliability and effectiveness of the prediction result. The temporal convolution module (TCN) is composed of a convolution layer, a batch normalization layer, an activation layer, and a random inactivation layer. This module can learn the correlation between the features in each time step in the data. At this point, the above two modules can not only capture the correlation between the eigenvalues, but also dynamically assign weights to each time step.
[0098] The fully connected module consists of a fully connected layer, a batch normalization layer, an activation layer, and a normalized exponential function (SoftMax). The output of the last time convolution module takes the value of the last time step as the input of the fully connected model. At this time, the fully connected module learns the correlation between the features of the time step through nonlinear changes, and obtains the output probability of size [batchsize, M] through the final normalized exponential function (SoftMax). According to the output probability, each group of M values is sorted, with the maximum value being 1 and the minimum value being M, to obtain the popularity ranking of the predicted M financial products.
[0099] Finally, the Spearman rank correlation coefficient between the predicted result and the true label is calculated as the loss function. When the loss function is stable, save the model.
[0100] The ranking of M financial products is predicted through the saved model, and the top-ranked financial products are recommended to users according to the current situation for them to choose from, thereby reducing the cost of information retrieval for users and improving user decision-making efficiency.
[0101] Embodiment 3
[0102] This embodiment provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps in the financial product recommendation method based on semi-Gaussian sampling as described in the first embodiment above are implemented.
[0103] Embodiment 4
[0104] This embodiment provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the steps in the financial product recommendation method based on semi-Gaussian sampling as described in the first embodiment are implemented.
[0105] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of hardware embodiments, software embodiments, or embodiments combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) containing computer-usable program code.
[0106] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0107] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0108] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0109] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0110] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A financial product recommendation method based on semi-Gaussian sampling, characterized in that: include: Obtain historical attribute data and historical popularity data of multiple financial products, perform preprocessing, and construct a sample set, where each sample in the sample set includes standardized historical attribute data and historical popularity data of all financial samples; The sample set is divided into a training set and a test set, the sample numbers in the training set are mapped to the x-axis interval [μ-3σ, μ] of the semi-Gaussian distribution, the weight of each sample is calculated, and the weight is converted into a probability value; the multinomial distribution uses the probability value to extract a number of samples with replacement; Based on the extracted samples and the true value corresponding to each sample, the dynamic time convolutional network is trained to obtain a trained dynamic time convolutional network, which is used to predict the rankings of all financial products and recommend several top-ranked financial products to users; The dynamic time convolution network includes a combination of several time step dependent modules and time convolution modules, and a fully connected module, wherein the time step dependent module is used to perform a point multiplication operation on the weight and the input data, wherein the input data includes several samples extracted in the training phase, or the current attribute data and current popularity data of the financial product after standardization in the prediction phase; The temporal convolution module includes: a one-dimensional convolution layer, a batch normalization layer, an activation layer and a random inactivation layer; the fully connected module includes a fully connected layer, a batch normalization layer, an activation layer and a normalized exponential function; During the training process, the Spearman rank correlation coefficient loss is used to optimize the hyperparameters of the dynamic temporal convolutional network.
2. The financial product recommendation method based on semi-Gaussian sampling according to claim 1, characterized in that: The true value corresponding to each sample is a ranking of the heat value corresponding to each sample.
3. The financial product recommendation method based on semi-Gaussian sampling according to claim 1, characterized in that: The preprocessing includes: standardizing the historical attribute data and the historical popularity data, and after the standardization, ranking the historical popularity data of all financial products according to each time step, with the highest popularity ranking being 1.
4. The financial product recommendation method based on semi-Gaussian sampling according to claim 1, characterized in that: The historical attribute data includes time points, daily yields, daily fluctuations and daily trading volumes, and the historical popularity data is the search index or market attention index of financial products.
5. A financial product recommendation system based on semi-Gaussian sampling, characterized in that: include: An acquisition and preprocessing module, which is configured to: acquire historical attribute data and historical popularity data of multiple financial products, perform preprocessing, and construct a sample set, wherein each sample in the sample set includes standardized historical attribute data and historical popularity data of all financial samples; A weight module is configured to: divide the sample set into a training set and a test set, map the sample sequence numbers in the training set to the x-axis interval [μ-3σ, μ] of the semi-Gaussian distribution, calculate the weight of each sample, and convert the weight into a probability value; and extract a number of samples with replacement using the probability value using the multinomial distribution; The training and prediction module is configured to: train the dynamic time convolution network based on the extracted samples and the true value corresponding to each sample, obtain the trained dynamic time convolution network, and use it to predict the ranking of all financial products, and recommend several top-ranked financial products to users; The dynamic time convolution network includes a combination of several time step dependent modules and time convolution modules, and a fully connected module, wherein the time step dependent module is used to perform a point multiplication operation on the weight and the input data, wherein the input data includes several samples extracted in the training phase, or the current attribute data and current popularity data of the financial product after standardization in the prediction phase; The temporal convolution module includes: a one-dimensional convolution layer, a batch normalization layer, an activation layer and a random inactivation layer; the fully connected module includes a fully connected layer, a batch normalization layer, an activation layer and a normalized exponential function; During the training process, the Spearman rank correlation coefficient loss is used to optimize the hyperparameters of the dynamic temporal convolutional network.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps in the financial product recommendation method based on semi-Gaussian sampling as described in any one of claims 1 to 4 are implemented.
7. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps in the financial product recommendation method based on semi-Gaussian sampling as described in any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Stock market prediction method based on hidden Markov and deep learning
CN110400222A
Financial product recommendation method and system
CN111489203A