A method, device and equipment for predicting trading technical indicators based on neural network

Through the transaction technical indicator prediction method based on the LSTM network, the problem of difficulty in predicting nonlinear periodic time series data in the prior art is solved, and high-accurate prediction results and timely fault alarms are achieved.

CN117455666BActive Publication Date: 2025-02-25XIAMEN INT BANK CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202311336618.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-16
Publication Date
2025-02-25
Estimated Expiration
2043-10-16

AI Technical Summary

Technical Problem

The prior art is difficult to accurately predict nonlinear periodic time series data, resulting in inaccurate and untimely prediction results.

Method used

Using the trading technical indicator prediction method based on the LSTM network, we obtain historical indicator data for preprocessing, extract seasonal characteristics, trend characteristics and residual characteristics, build an indicator prediction model, and determine the upper and lower baselines in the model for prediction.

Benefits of technology

Accurate prediction of nonlinear periodic time series data is achieved, and operation and maintenance personnel are informed in advance of possible failures, improving the accuracy and timeliness of predictions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117455666B_ABST
    Figure CN117455666B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, device, equipment and storage medium for predicting transaction technical indicators based on neural networks, which includes: obtaining historical indicator data, performing preprocessing including data division and data feature extraction on the historical indicator data, and obtaining a training data set, wherein the historical indicator data includes average response time, transaction success rate, and number of transactions; inputting the training data set into a model constructed based on an LSTM network for training, obtaining an indicator prediction model, and determining upper and lower baselines in the obtained indicator prediction model; inputting the indicator data to be predicted into the indicator prediction model for prediction, and obtaining the prediction result for the future time period. The method can more effectively identify periodic fluctuations, and can dynamically adjust the threshold, which is more in line with actual application scenarios and improves the accuracy of prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of banking business monitoring, and in particular to a method, device and equipment for predicting transaction technical indicators based on neural network. Background Art

[0002] Single indicator prediction is a very important type of algorithm in intelligent operation and maintenance indicator analysis. In the traditional mode, operation and maintenance personnel often learn about the failure only after it occurs, and then find the cause of the failure and solve the problem. This method has a certain lag. Some failures may have caused serious impacts before they are solved, which is not conducive to the normal operation of the production system.

[0003] Most of the previous prediction algorithms were to perform curve fitting on the collected historical data samples, calculate the overall operating trend of the data, and thus predict the direction of future data. The disadvantage of this type of algorithm is that it is difficult for the function to fit some fluctuations with time periodicity or nonlinear fluctuations. Without knowing the law of data change, it is impossible to pre-set the parameters of the fitting function to achieve it, resulting in inaccurate and untimely prediction results. It is impossible to successfully simulate the nonlinear data change trend, and it is impossible to deduce a reasonable data fluctuation range. Therefore, how to find an algorithm that can predict nonlinear periodic time series data is an important technical issue in current intelligent operation and maintenance work. Summary of the invention

[0004] In view of this, the purpose of the present invention is to propose a trading technical indicator prediction method, device and equipment based on neural network, aiming to solve the above-mentioned nonlinear data prediction and monitoring problems.

[0005] To achieve the above object, the present invention provides a method for predicting trading technical indicators based on a neural network, the method comprising:

[0006] Acquire historical indicator data, and perform preprocessing including data segmentation and data feature extraction on the historical indicator data to obtain a training data set, wherein the historical indicator data includes average response time, transaction success rate, and number of transactions;

[0007] Input the training data set into the model built based on the LSTM network for training to obtain an indicator prediction model, and determine the upper and lower baselines in the obtained indicator prediction model;

[0008] The indicator data to be predicted is input into the indicator prediction model for prediction to obtain the prediction result for the future time period.

[0009] Preferably, the method further comprises:

[0010] Determine whether the prediction result exceeds the alarm threshold, and if so, issue an abnormal alarm; the alarm threshold is constructed by using the baseline.

[0011] Preferably, the preprocessing of the historical indicator data including data partitioning and data feature extraction to obtain a training data set includes:

[0012] Dividing the historical indicator data according to the preset input length, output length and sliding window step size to obtain multiple groups of input and output data pairs;

[0013] The data features of each input-output data pair are extracted by the STL algorithm to obtain the training data set, wherein the data features include seasonal features, trend features and residual features.

[0014] Preferably, the STL algorithm includes an inner loop; the step of extracting data features of each input and output data pair through the STL algorithm includes:

[0015] Automatically inferring the corresponding seasonal cycle according to the index of the historical indicator data to obtain the length of the cycle;

[0016] Aggregating the historical indicator data at different times within a period to obtain a subsequence;

[0017] In each inner loop, the historical indicator data is subtracted from the previous trend characteristics obtained in the previous round, and each subsequence is regressed using the LOESS algorithm to obtain the first result;

[0018] Perform a sliding average of a preset length on the first result and regress each subsequence using the LOESS algorithm to obtain a second result;

[0019] Subtract the second result from the first result to obtain the seasonal characteristic;

[0020] Subtract the seasonal characteristics from the historical indicator data, and regress each subsequence using the LOESS algorithm to obtain the trend characteristics;

[0021] The seasonal characteristics and the trend characteristics are decomposed based on the historical indicator data to obtain the residual characteristics.

[0022] Preferably, the network architecture of the indicator prediction model includes an input layer, two LSTM network layers and a fully connected layer, wherein the two LSTM network layers include a hidden layer of a low-layer LSTM fully connected to a high-layer LSTM through a feedforward connection.

[0023] Preferably, inputting the training data set into a model constructed based on an LSTM network for training comprises:

[0024] The model is optimized by using the mean absolute error loss function and the softsign function for function activation.

[0025] Preferably, the determining of the upper and lower baselines includes:

[0026] The upper and lower baselines are obtained by calculating based on the historical indicator data of the previous day and the width coefficient; wherein,

[0027] The upper baseline is upper(x t )=estimation(x t )+width*x magnitude (x t ) / 2,

[0028] The lower baseline is lower(x t )=estimation(x t )-width*x magnitude (x t ) / 2, where

[0029] x magnitude =(mean(last day )+median(last day )) / 2, last day Represents the historical indicator data of the previous day, and width represents the width coefficient.

[0030] To achieve the above object, the present invention also provides a trading technical indicator prediction device based on a neural network, the device comprising:

[0031] A preprocessing unit, used to obtain historical indicator data, and perform preprocessing including data segmentation and data feature extraction on the historical indicator data to obtain a training data set, wherein the historical indicator data includes average response time, transaction success rate, and number of transactions;

[0032] A training unit, used for inputting the training data set into a model constructed based on an LSTM network for training, obtaining an indicator prediction model, and determining upper and lower baselines in the obtained indicator prediction model;

[0033] The prediction unit is used to input the indicator data to be predicted into the indicator prediction model for prediction, and obtain the prediction result for the future time period.

[0034] In order to achieve the above-mentioned purpose, the present invention also proposes a device, including a processor, a memory and a computer program stored in the memory, wherein the computer program is executed by the processor to implement the steps of a trading technical indicator prediction method based on a neural network as described in the above-mentioned embodiment.

[0035] In order to achieve the above-mentioned purpose, the present invention also proposes a computer-readable storage medium, on which a computer program is stored, and the computer program is executed by a processor to implement the steps of a trading technical indicator prediction method based on a neural network as described in the above embodiment.

[0036] Beneficial effects:

[0037] The above solution learns the historical data rules through the indicator prediction model built based on the LSTM network, and predicts the future data based on the current data, which can inform the operation and maintenance personnel in advance of the possible failures that may occur next. It can more effectively identify periodic fluctuations and dynamically adjust the threshold, which is more in line with the actual application scenario and improves the accuracy of the prediction.

[0038] The above scheme, through the indicator prediction model built based on the LSTM network, can have the ability to remember long-term data, high data utilization, and more comprehensive feature learning. The algorithm has a high degree of automation and can autonomously learn data patterns without manual parameter adjustment and effect adjustment.

[0039] The above scheme can effectively reduce the business interruption rate and interruption time by generating an alarm when an abnormality occurs during the prediction of transaction technical indicators, causing the above indicators to change abnormally or exceed the safety range, and sending it to the corresponding management personnel for investigation. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0041] Figure 1 A flowchart of a method for predicting trading technical indicators based on a neural network is provided in accordance with an embodiment of the present invention.

[0042] Figure 2 A schematic diagram of dividing indicator data provided by an embodiment of the present invention.

[0043] Figure 3 A schematic diagram of the network structure of the LSTM training process provided by one embodiment of the present invention.

[0044] FIG. 4(A) and FIG. 4(B) are screenshots of an alarm generated during a prediction process according to an embodiment of the present invention.

[0045] Figure 5 A schematic diagram of data fluctuation when an abnormality occurs corresponding to FIG4(B) provided in one embodiment of the present invention.

[0046] Figure 6 A screenshot showing an abnormality in the prediction process provided by one embodiment of the present invention.

[0047] Figure 7 A schematic diagram of the structure of a trading technical indicator prediction device based on a neural network provided by one embodiment of the present invention.

[0048] The realization of the purpose, functional features and advantages of the invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0049] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the invention claimed for protection, but merely represents the selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0050] In the description of the present invention, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features.

[0051] The content of the present invention is described in detail below with reference to embodiments.

[0052] Take an application scenario of prediction algorithms in technology operation and maintenance as an example. Due to the business operation rules, some tasks will only be run on fixed dates of each month. The batches related to these dates will run slower. How to enable the prediction algorithm to remember such time rules and other information has become the focus and difficulty of the research. Based on this, the present invention proposes to use machine learning algorithms to deal with it. It can predict the development trend for a period of time in the future based on the historical data; or predict whether it will deviate significantly from the normal track based on the current data. These scenarios are very meaningful in practical applications, such as predicting server capacity data to determine whether and when to expand capacity in the future; and generating early warnings through short-term predictions and real-time monitoring.

[0053] Reference Figure 1 The figure is a flow chart of a method for predicting trading technical indicators based on a neural network provided in one embodiment of the present invention.

[0054] In this embodiment, the method includes:

[0055] S11, obtaining historical indicator data, performing preprocessing including data segmentation and data feature extraction on the historical indicator data, and obtaining a training data set, wherein the historical indicator data includes average response time, transaction success rate, and number of transactions.

[0056] Furthermore, in step S11, the historical indicator data is preprocessed including data division and data feature extraction to obtain a training data set, including:

[0057] S11-1, dividing the historical indicator data according to the preset input length, output length and sliding window step size to obtain multiple groups of input and output data pairs;

[0058] S11-2, extracting data features of each input-output data pair through the STL algorithm to obtain the training data set, wherein the data features include seasonal features, trend features, and residual features.

[0059] Wherein, the STL algorithm includes an inner loop; the extracting data features of each input and output data pair by the STL algorithm includes:

[0060] Automatically inferring the corresponding seasonal cycle according to the index of the historical indicator data to obtain the length of the cycle;

[0061] Aggregating the historical indicator data at different times within a period to obtain a subsequence;

[0062] In each inner loop, the historical indicator data is subtracted from the previous trend characteristics obtained in the previous round, and each subsequence is regressed using the LOESS algorithm to obtain the first result;

[0063] Perform a sliding average of a preset length on the first result and regress each subsequence using the LOESS algorithm to obtain a second result;

[0064] Subtract the second result from the first result to obtain the seasonal characteristic;

[0065] Subtract the seasonal characteristics from the historical indicator data, and regress each subsequence using the LOESS algorithm to obtain the trend characteristics;

[0066] The seasonal characteristics and the trend characteristics are decomposed based on the historical indicator data to obtain the residual characteristics.

[0067] Further, the STL algorithm includes an outer loop; the LOESS algorithm is used to regress each subsequence to obtain a first result, including:

[0068] The first result is obtained by multiplying the regression result obtained by regressing each subsequence using the LOESS algorithm by a preset weight value; wherein the preset weight value is introduced based on the outer loop.

[0069] In this embodiment, the method is applied to the prediction of indicator data of the technology operation and maintenance system of the banking industry. By selecting a model built based on LSTM (Long Short-Term Memory Neural Network) to learn historical data, the biggest feature of this model is that it works better when processing data with large temporal correlation. The structure required for LSTM model training data is an input and an output, which means that the input will get the output after processing. When the algorithm has fully learned all possible situations, it can predict the value of the future output length based on the current input length data. For example: In an application scenario, assuming that a piece of data has a length of 1,000 units, the sliding window method is used to create a training set based on the temporal characteristics of the LSTM network. Refer to Figure 2 As shown. For example, the input length of each input data is set to 5, the output length is 2, and the step size of the sliding window is 1. After such settings, the data can be divided to obtain nearly 1,000 groups of corresponding input and output groups. This set of corresponding input and output data is used as the data set. Based on the above settings, when using the network for testing and actual application, the "data of the first five consecutive time points" is also input, and the network predicts the "data of the last two time points".

[0070] When using LSTM for time series prediction, time series data is often not used directly as the input of the algorithm, but features are extracted from the original data to the maximum extent for use by the algorithm and model, capturing more complex relationships between data and making the algorithm learn more accurately. Specifically, the average response time, total number of transactions, transaction success rate and other indicators of historical transactions of various transaction systems in the bank are used as raw data. The following three features of the raw data are extracted here, including: seasonal features, which contain information such as the day of the week, date, month, week, whether it is a working day, holiday, etc.; trend features, including information such as sliding average, sliding median, sliding maximum, sliding minimum, difference, exponentially weighted sliding average, exponentially weighted sliding standard deviation, etc.; residual features, including the residual after the original data decomposes the above two features (seasonal features and trend features). Among them, the algorithm used to extract features is the "Seasonal and Trend Decomposition Using LOESS Algorithm" (hereinafter referred to as STL Algorithm).

[0071] First, the LSTM model will automatically infer the seasonal cycle of the data based on the index of the data. In this case, it will infer that there are characteristic items such as weekends and holidays that will affect the operation of the system, and obtain the length of the cycle (also known as the time window). By gathering data at different times in a cycle together, a subsequence can be obtained. The STL algorithm can be mainly divided into an inner loop and an outer loop. In each inner loop, the trend feature T obtained by subtracting the result of the previous inner loop from the data is first obtained. Then, the LOESS algorithm is used to regress each subsequence (q=n1, d=1), (n is the number of samples in a cycle, n1 is the smallest odd number greater than or equal to n), and extend it one cycle forward and backward. The result is recorded as C. The sliding average of C is performed with lengths of n, n, and 3 in turn, and then LOESS (q=9, d=1) is regressed. The result L is used as the low flux of the periodic subsequence. The seasonal feature S is the result obtained by CL. After subtracting the seasonal feature S from the original data, LOESS (q=n2, d=1) regression is performed, where n2 is an odd number between n and 2n, to obtain the trend feature T. The three types of features extracted will convert the original 1-dimensional time series data into x+1-dimensional data (x is the number of features) after feature extraction. The outer loop of the STL algorithm introduces a robustness weight term, which is used in the inner loop to control the impact of outliers in the data. If the outlier of the data point is large, the weight value will become smaller, and this weight value is used in the LOESS regression process of the inner loop, and the regression result is multiplied by this weight value as the final result.

[0072] In the following application of this embodiment, suppose that the capacity change of a server needs to be predicted, and the following features of the sample data need to be paid attention to: the time information corresponding to each capacity data, and whether there is a large change due to the particularity of the date; then the various indicators of capacity change over time, as well as trends, residual values, etc., are extracted to facilitate the calculation of the change law by the neural network. The data after feature extraction can be used as the input of the neural network.

[0073] S12, inputting the training data set into the model constructed based on the LSTM network for training to obtain an indicator prediction model, and determining the upper and lower baselines in the obtained indicator prediction model.

[0074] S13, inputting the indicator data to be predicted into the indicator prediction model for prediction, and obtaining the prediction result for the future time period.

[0075] In this embodiment, the network architecture of the indicator prediction model constructed based on the LSTM network is as follows: Figure 3 As shown. LSTM is a recurrent neural network that can solve the problem of long-term dependency. Compared with the traditional recurrent neural network RNN, it adds three layers of valve nodes, namely forget gate, input gate, and output gate. This allows each layer of the network to determine which information can be input into the layer for calculation and which information can be output to the next layer for calculation. Therefore, it retains long-term information and is more suitable for time series prediction. The indicator prediction model consists of an input layer, two LSTM network layers, and a fully connected layer. The hidden layer of the low-level LSTM is fully connected with the high-level LSTM through a feedforward connection. Among them, the role of the input layer is to receive input data and pass it to the LSTM network layer. The role of the LSTM network layer is to convert the data obtained from the input layer into a higher-level feature representation for extracting data features. The role of the fully connected layer is to link each node with all the nodes of the LSTM layer and integrate the features extracted previously. In this network, the loss function uses the mean absolute error loss function, and the activation function uses the softsign function.

[0076] The input set obtained by the above division is subjected to feature extraction to obtain a training data set with features, which is then input into the LSTM network. The predicted data is used as output, and a suitable indicator prediction model is obtained through iterative learning. Prior to this, empirical parameters are given to ensure the fitting speed and effect of the algorithm, and the dropout mechanism is used in the network to prevent the model from overfitting.

[0077] The indicator prediction model is obtained by learning historical data, and then the future value is predicted based on this model. However, due to the complexity and changeability of actual scenarios, the prediction results cannot completely match the actual values. Therefore, in order to increase the fault tolerance of the algorithm, upper and lower baselines are added to the prediction results. The baseline value is calculated based on the data of the previous day of the prediction and a width coefficient width, where

[0078] upper(x t )=estimation(x t )+width*x magnitude (x t ) / 2

[0079] lower(x t )=estimation(x t )-width*x magnitude (x t ) / 2

[0080] where estimation(x t ) is the value of the predicted result, x magnitude =(mean(last day )+median(last day )) / 2, last day is the historical data of the previous day, mean is the function of taking the mean, and median is the function of taking the median. The result after processing is that after LSTM learns the changing rules of sample data, a function for predicting the changing trend of future data is formed inside the network, and the data stream to be predicted is input into this function, and the predicted output is obtained, that is, the prediction of the change of the input data stream in the next time or the next period of time.

[0081] In another embodiment, the method further comprises:

[0082] S14, determining whether the prediction result exceeds an alarm threshold, and if so, issuing an abnormal alarm; the alarm threshold is constructed by using a baseline.

[0083] In the specific implementation, baseline modeling is used to expand the predicted data values ​​into threshold ranges for easy monitoring. The specific monitoring process includes: within x minutes (detected once per minute, x is a manually set value, that is, anomalies occur for x consecutive minutes), if the real-time data exceeds the upper / lower limit of the predicted threshold range, and the number of transactions exceeds y (y is a manually set value, this step is to avoid occasional non-abnormal situations as much as possible), an alarm and notification will be issued.

[0084] Machine learning has many application scenarios in our bank's intelligent operation and maintenance system. In addition to the above-mentioned transaction indicator monitoring, it also includes monitoring of other indicators. For example, in server capacity prediction, the output of the network is the change in capacity over a period of time, which is convenient for managers to judge whether the server needs to be expanded or maintained.

[0085] At present, this method has been installed on the transaction technical indicator analysis center of our bank's intelligent operation and maintenance data analysis platform and is running stably. It is used to monitor the key technical indicators such as transaction success rate, average transaction response time, number of transactions, response rate, etc. of multiple business channels within the bank in real time. According to the historical data of the business system operation, the expected value of the current indicator is calculated and a threshold is given. Once abnormalities such as network fluctuations and server failures occur, which cause abnormal changes in the above indicators and exceed the safety range, an alarm will be generated and sent to the corresponding management personnel for investigation, which can effectively reduce the business interruption rate and interruption time. As shown in Figures 4 (A) and (B), these are two alarms generated when the average response time of the business exceeds the predicted alarm value. It can be seen that the predicted value generated by the prediction method used in the present invention is dynamic, and the predicted value of the target and the setting of the safety range are different at different time points. At the same time, at the front end of the system equipped with this algorithm, the data fluctuations when an abnormality occurs can be intuitively seen, such as Figure 5 As shown (this figure shows the alarm that occurred at 9:00 am on February 21, corresponding to the alarm screenshot shown above). Figure 5 In the graph, the light blue area indicates the normal range of the predicted value obtained through calculation, while the cyan curve is the real-time change of the actual production data. When the real-time data exceeds the normal range at 9:01, an alarm is issued to notify the technicians to analyze the health of the system to avoid problems such as business interruption.

[0086] Reference Figure 6 As shown in the figure, this figure is a screenshot of the monitoring value of the same indicator from September 21 to 27, 2023, and the prediction interval using this method by the system equipped with this algorithm. The light blue area in the figure represents the prediction interval obtained by calculation, and the cyan curve represents the real-time change of the actual production data. It can be seen that in the part marked with red boxes, the data fluctuated in the same time period for three consecutive days, and the predicted interval also fluctuated accordingly, proving that this method can effectively learn the periodic laws of the data; and in the part marked with purple boxes, the real-time data has produced abnormal fluctuations, which exceeds the prediction range and is identified as an abnormal point by the system and marked with a red dot.

[0087] Reference Figure 7 The figure is a schematic diagram of the structure of a trading technical indicator prediction device based on a neural network provided by an embodiment of the present invention.

[0088] In this embodiment, the device 60 includes:

[0089] A preprocessing unit 61 is used to obtain historical indicator data, and perform preprocessing including data segmentation and data feature extraction on the historical indicator data to obtain a training data set, wherein the historical indicator data includes average response time, transaction success rate, and number of transactions;

[0090] A training unit 62 is used to input the training data set into a model constructed based on an LSTM network for training, obtain an indicator prediction model, and determine upper and lower baselines in the obtained indicator prediction model;

[0091] The prediction unit 63 is used to input the indicator data to be predicted into the indicator prediction model for prediction, so as to obtain the prediction result for the future time period.

[0092] In another embodiment, the device 60 further includes:

[0093] The alarm unit is used to determine whether the prediction result exceeds the alarm threshold. If so, an abnormal alarm is issued; the alarm threshold is constructed by using the baseline.

[0094] Each unit module of the device 60 can respectively execute the corresponding steps in the above method embodiment, so each unit module will not be described in detail here. Please refer to the description of the above corresponding steps for details.

[0095] The embodiment of the present invention further provides a device, which includes the trading technical indicator prediction device based on the neural network as described above, wherein the trading technical indicator prediction device based on the neural network can adopt Figure 7 The structure of the embodiment can be executed accordingly. Figure 1 The technical solution of the method embodiment shown has similar implementation principles and technical effects. For details, please refer to the relevant records in the above embodiments, which will not be repeated here.

[0096] The device includes: a mobile phone, a digital camera, a tablet computer, or other devices with a camera function, or a device with an image processing function, or a device with an image display function. The device may include components such as a memory, a processor, an input unit, a display unit, and a power supply.

[0097] Among them, the memory can be used to store software programs and modules, and the processor executes various functional applications and data processing by running the software programs and modules stored in the memory. The memory may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as an image playback function, etc.), etc.; the data storage area may store data created according to the use of the device, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory may also include a memory controller to provide the processor and the input unit with access to the memory.

[0098] The input unit can be used to receive input digital or character or image information, and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control. Specifically, the input unit of this embodiment includes not only a camera, but also a touch-sensitive surface (such as a touch display) and other input devices.

[0099] The display unit can be used to display information input by the user or information provided to the user and various graphical user interfaces of the device, which can be composed of graphics, text, icons, videos and any combination thereof. The display unit may include a display panel, and optionally, the display panel may be configured in the form of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), etc. Further, the touch-sensitive surface may cover the display panel, and when the touch-sensitive surface detects a touch operation on or near it, it is transmitted to the processor to determine the type of touch event, and then the processor provides a corresponding visual output on the display panel according to the type of touch event.

[0100] The embodiment of the present invention further provides a computer-readable storage medium, which may be a computer-readable storage medium included in the memory in the above embodiment; or a computer-readable storage medium that exists independently and is not installed in a device. The computer-readable storage medium stores at least one instruction, which is loaded and executed by a processor to implement Figure 1 The trading technical indicator prediction method based on neural network is shown. The computer readable storage medium can be a read-only memory, a disk or an optical disk, etc.

[0101] It should be noted that each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referred to each other. For the device embodiment, equipment embodiment and storage medium embodiment, since they are basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0102] Furthermore, in this document, the terms "comprises," "comprising," or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or device that includes the element.

[0103] The above description shows and describes the preferred embodiments of the present invention. It should be understood that the present invention is not limited to the form disclosed herein, and should not be regarded as excluding other embodiments, but can be used in various other combinations, modifications and environments, and can be modified within the scope of the invention, through the above teachings or the technology or knowledge of the relevant field. The changes and modifications made by those skilled in the art shall not depart from the spirit and scope of the present invention, and shall be within the scope of protection of the claims attached to the present invention.

Claims

1. A method for predicting trading technical indicators based on neural networks, characterized in that: The method comprises: Acquire historical indicator data, perform preprocessing including data segmentation and data feature extraction on the historical indicator data, and obtain a training data set, wherein the historical indicator data includes average response time, transaction success rate, and number of transactions; The preprocessing of the historical indicator data including data division and data feature extraction to obtain a training data set includes: Dividing the historical indicator data according to the preset input length, output length and sliding window step size to obtain multiple groups of input and output data pairs; The data features of each input and output data pair are extracted by the STL algorithm to obtain the training data set, wherein the data features include seasonal features, trend features and residual features; wherein, The STL algorithm includes an inner loop and an outer loop; the data features of each input and output data pair are extracted by the STL algorithm, including: Automatically inferring the corresponding seasonal cycle according to the index of the historical indicator data to obtain the length of the cycle; Aggregating the historical indicator data at different times within a period to obtain a subsequence; In each inner loop, the historical indicator data is subtracted from the previous trend characteristics obtained in the previous round, and each subsequence is regressed using the LOESS algorithm to obtain the first result; Perform a sliding average of a preset length on the first result and regress each subsequence using the LOESS algorithm to obtain a second result; Subtract the second result from the first result to obtain the seasonal characteristic; Subtract the seasonal characteristics from the historical indicator data, and regress each subsequence using the LOESS algorithm to obtain the trend characteristics; The seasonal characteristics and the trend characteristics are decomposed based on the historical indicator data to obtain the residual characteristics; wherein, The method of regressing each subsequence using the LOESS algorithm to obtain a first result includes: The first result is obtained by multiplying the regression result obtained by regressing each subsequence using the LOESS algorithm by a preset weight value; wherein the preset weight value is introduced based on the outer loop; Inputting the training data set into the model built based on the LSTM network for training, obtaining an indicator prediction model, and determining the upper and lower baselines in the obtained indicator prediction model; inputting the training data set into the model built based on the LSTM network for training, including: By using the mean absolute error loss function for model optimization and the softsign function for function activation; Determining the upper and lower baselines includes: The upper and lower baselines are obtained by calculating based on the historical indicator data of the previous day and the width coefficient; wherein, The upper baseline is upper(x t )=estimation(x t )+width*x magnitude (x t ) / 2, The lower baseline is lower(x t )=estimation(x t )-width*x magnitude (x t ) / 2, where x magnitude =(mean(last day )+median(last day )) / 2, last day Indicates the historical indicator data of the previous day, and width indicates the width coefficient; Inputting the indicator data to be predicted into the indicator prediction model for prediction to obtain the prediction result for the future time period; the method further includes: Determine whether the prediction result exceeds the alarm threshold, and if so, issue an abnormal alarm; the alarm threshold is constructed by using the baseline.

2. A method for predicting trading technical indicators based on a neural network according to claim 1, characterized in that: The network architecture of the indicator prediction model includes an input layer, two LSTM network layers and a fully connected layer, wherein the two LSTM network layers include a hidden layer of a low-layer LSTM that is fully connected to a high-layer LSTM through a feedforward connection.

3. A trading technical indicator prediction device based on neural network, characterized in that: The device comprises: A preprocessing unit is used to obtain historical indicator data, perform preprocessing including data segmentation and data feature extraction on the historical indicator data, and obtain a training data set, wherein the historical indicator data includes average response time, transaction success rate, and number of transactions; wherein, The preprocessing of the historical indicator data including data division and data feature extraction to obtain a training data set includes: Dividing the historical indicator data according to the preset input length, output length and sliding window step size to obtain multiple groups of input and output data pairs; The data features of each input and output data pair are extracted by the STL algorithm to obtain the training data set, wherein the data features include seasonal features, trend features and residual features; wherein, The STL algorithm includes an inner loop and an outer loop; the data features of each input and output data pair are extracted by the STL algorithm, including: Automatically inferring the corresponding seasonal cycle according to the index of the historical indicator data to obtain the length of the cycle; Aggregating the historical indicator data at different times within a period to obtain a subsequence; In each inner loop, the historical indicator data is subtracted from the previous trend characteristics obtained in the previous round, and each subsequence is regressed using the LOESS algorithm to obtain the first result; Perform a sliding average of a preset length on the first result and regress each subsequence using the LOESS algorithm to obtain a second result; Subtract the second result from the first result to obtain the seasonal characteristic; Subtract the seasonal characteristics from the historical indicator data, and regress each subsequence using the LOESS algorithm to obtain the trend characteristics; The seasonal characteristics and the trend characteristics are decomposed based on the historical indicator data to obtain the residual characteristics; wherein, The method of regressing each subsequence using the LOESS algorithm to obtain a first result includes: The first result is obtained by multiplying the regression result obtained by regressing each subsequence using the LOESS algorithm by a preset weight value; wherein the preset weight value is introduced based on the outer loop; A training unit is used to input the training data set into a model built based on an LSTM network for training, obtain an indicator prediction model, and determine upper and lower baselines in the obtained indicator prediction model; the inputting the training data set into the model built based on the LSTM network for training includes: By using the mean absolute error loss function for model optimization and the softsign function for function activation; Determining the upper and lower baselines includes: The upper and lower baselines are obtained by calculating based on the historical indicator data of the previous day and the width coefficient; wherein, The upper baseline is upper(x t )=estimation(x t )+width*x magnitude (x t ) / 2, The lower baseline is lower(x t )=estimation(x t )-width*x magnitude (x t ) / 2, where x magnitude =(mean(last day )+median(last day )) / 2, last day Indicates the historical indicator data of the previous day, and width indicates the width coefficient; A prediction unit is used to input the indicator data to be predicted into the indicator prediction model for prediction, and obtain the prediction result for the future time period; the device also includes: The alarm unit is used to determine whether the prediction result exceeds the alarm threshold. If so, an abnormal alarm is issued; the alarm threshold is constructed by using the baseline.

4. A trading technical indicator prediction device based on a neural network, characterized in that: It includes a processor, a memory and a computer program stored in the memory, wherein the computer program is executed by the processor to implement the steps of a trading technical indicator prediction method based on a neural network as described in any one of claims 1 to 2.

5. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of a trading technical indicator prediction method based on a neural network as described in any one of claims 1 to 2.

Citation Information

Patent Citations

  • Transaction index abnormality monitoring method based on deep learning model LSTM

    CN108197845A

  • Network index prediction method and device based on ARIMA model and storage medium

    CN109587713A

  • LSTM-based data classification method, apparatus and device, and storage medium

    CN114218462A

  • STL decomposition and LSTM network-based time sequence prediction method

    CN115982412A