Financial early warning method and device based on FEDform model
Through the timing decomposition mechanism and frequency domain enhancement mechanism of the FEDformer model, the problem of insufficient monitoring of small amount flows in long periods in the existing technology is solved, and a higher accuracy and timely financial warning is achieved.
Patent Information
- Application Number
- CN202510435132.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-08
- Publication Date
- 2025-07-08
AI Technical Summary
The existing enterprise financial crisis warning methods lack the treatment of multiple frequency small amount flows over a long period, resulting in insufficient warning accuracy and difficulty in detecting risks in a timely manner.
The financial early warning method based on the FEDformer model is adopted, and the encoder and decoder with a timing decomposition mechanism are introduced to extract trend and periodic terms in the financial data, and combined with the frequency domain enhancement mechanism, the allocation of attention resources is optimized and the monitoring ability of small amounts of flows is improved.
It improves the monitoring accuracy of small and medium-sized financial data flows, reduces noise interference in long-term data, enhances the accuracy and timeliness of financial warnings, and reduces the computational complexity.
Smart Images

Figure CN120278836A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of asset supervision technology, and in particular to a financial early warning method, device, computer-readable storage medium and asset monitoring system based on a FEDformer model. Background Art
[0002] In the existing corporate fund supervision system, despite the strict review and monitoring mechanism, the following problems still exist due to the lack of effective means of early warning of corporate financial crises:
[0003] Although there is strict supervision over large sums of funds in existing corporate financial crisis warning measures, in actual operations, the "breakdown into small pieces" and "steady stream" types of cash flows are often overlooked, resulting in the accumulation of small amounts of cash flows and causing serious financial crises.
[0004] Existing corporate financial crisis early warning methods are usually based on historical data monitoring. Due to the lag in the compilation of financial information, it is difficult to detect risks in a timely manner before or during the event. The above-mentioned data that relies on post-screening statistics has delays and lags.
[0005] The financial statements in the existing corporate financial crisis early warning methods include hundreds of indicator data. It takes a lot of time to analyze each financial attribute, and not all indicators have a direct impact on the financial crisis. The above method is difficult to reasonably filter and use financial data.
[0006] In summary, the prior art lacks a financial early warning method that can meet the accuracy requirements over a long period of time. Summary of the invention
[0007] The main purpose of the present application is to provide a financial early warning method, device, computer-readable storage medium and asset monitoring system based on the FEDformer model, so as to at least solve the problem that the financial early warning method in the prior art mainly focuses on large-amount cash flow changes, lacks the processing of multi-frequency small-amount cash flow in a long period, resulting in insufficient accuracy.
[0008] To achieve the above object, according to one aspect of the present application, a financial early warning method based on the FEDformer model is provided, including: receiving business data of different clients within a first preset period, and converting all the business data into a sequence form for representation according to the temporal relationship of the business data to obtain a first data sequence, where multiple clients correspond to the same target object, and the end moment of the first preset period is the current moment; extracting features from the first data sequence through an improved encoder of the FEDformer model to obtain a second data sequence, where the improved encoder is an encoder with a temporal decomposition mechanism added; predicting financial data within a second preset duration after the current moment according to the second data sequence through an improved decoder of the FEDformer model to obtain a predicted financial sequence, where the improved decoder is a decoder with a temporal decomposition mechanism added, and the FEDformer model is trained according to the business data within a second preset period and the financial data within a third preset period, and the end moment of the second preset period is the start moment of the third preset period; generating an early warning information according to the predicted financial sequence and sending it to the target user terminal through a preset path, where the early warning information is used to prompt the staff that there are abnormal fluctuations in the assets.
[0009] Optionally, after converting all the business data into a sequence form for representation according to the temporal relationship of the business data to obtain a first data sequence, the method further includes: processing the first data sequence through a temporal decomposition mechanism to extract the trend item data and the periodic item data in the first data sequence to obtain a first trend data and a first periodic data.
[0010] Optionally, the first trend data is obtained by processing the first data sequence according to a preset window through the moving average method of the temporal decomposition mechanism; the first periodic data is obtained by calculating the difference between the first data sequence and the first trend data through the temporal decomposition mechanism based on an additive model.
[0011] Optionally, a linear transformation is performed on the first data sequence through the improved encoder to obtain a third data sequence, a Fourier transform and frequency domain information sampling are performed on the third data sequence to obtain a fourth data sequence; the improved encoder performs a dot product on the fourth data sequence according to a randomly initialized parameter matrix, and performs complementation and inverse Fourier transform on the dot producted third data sequence to obtain a fifth data sequence; the fifth data sequence is processed through the temporal decomposition mechanism of the improved encoder to obtain a second trend data and a second periodic data; the second trend data and the second periodic data are processed through the first feedforward neural network of the improved encoder to obtain a second data sequence.
[0012] Optionally, by improving the decoder to decode the second data sequence according to the first trend data and the first cycle data, a sixth data sequence is obtained; by processing the sixth data sequence through the time series decomposition mechanism of the improved decoder, third cycle data and third trend data are obtained; by linearly transforming the third cycle data and the third trend data through the fully connected layer of the improved decoder to extract query vectors, key vectors, and value vectors; by respectively performing Fourier transform and frequency domain information sampling on the query vectors, key vectors, and value vectors through the improved decoder to obtain query frequency components, key frequency components, and value frequency components, and processing and calculating the dot product of the query frequency components and the key frequency components according to the activation function to obtain a first target feature, complementing the first target feature and calculating the dot product of the complemented first target feature and the value frequency component to obtain a second target feature; by performing inverse Fourier transform on the second target feature through the improved decoder to obtain a predicted financial sequence.
[0013] Optionally, before generating a warning message according to the predicted financial sequence, the method further includes: obtaining a first preset index set, where the first preset index set includes multiple preset indexes for characterizing asset fluctuations; determining whether each preset index follows a normal distribution through the K-S test according to the first data sequence; in the case where the preset index follows a normal distribution, screening the preset index through an independent sample T test to obtain a first target index; in the case where the preset index does not follow a normal distribution, screening through the Wilcoxon test to obtain a second target index; constructing a second preset index set according to the first target index and the second target index.
[0014] Optionally, generating a warning message according to the predicted financial sequence includes: calculating each preset index in the second preset index set according to the predicted financial sequence to obtain a target financial statement; comparing each preset index in the target financial statement with the corresponding preset range, and in the case where any preset index exceeds the corresponding preset range, generating a warning message according to the target financial statement.
[0015] According to another aspect of the present application, a financial warning device based on the FEDformer model is provided. The device includes: a first acquisition unit, configured to receive real-time business data of different clients within a first preset period, and convert it into a sequence form according to the temporal relationship for representation to obtain a first data sequence. Multiple clients correspond to the same target object, and the end moment of the first preset period is the current moment; a first processing unit, configured to perform feature extraction on the first data sequence through an improved encoder of the FEDformer model to obtain a second data sequence; a prediction unit, configured to predict financial data within a second preset duration after the current moment according to the second data sequence through an improved decoder of the FEDformer model to obtain a predicted financial sequence; an alarm unit, configured to generate a warning message according to the predicted financial sequence and send it to the target user terminal through a preset path. The warning message is used to prompt the staff that there are abnormal fluctuations in the assets.
[0016] According to yet another aspect of the present application, a computer-readable storage medium is provided. The computer-readable storage medium includes a stored program, wherein when the program runs, it controls the device where the computer-readable storage medium is located to execute any one of the methods.
[0017] According to still another aspect of the present application, an asset monitoring system is provided, including: one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors. The one or more programs include those for executing any one of the methods.
[0018] Applying the technical solution of the present application, in the above financial early warning method based on the FEDformer model, first, business data of different clients within the first preset period is received, and all the business data is converted into a sequence form for representation according to the temporal relationship of the business data, obtaining a first data sequence. Multiple clients correspond to the same target object, and the end moment of the first preset period is the current moment. Then, the improved encoder of the FEDformer model is used to extract features from the first data sequence, obtaining a second data sequence. The improved encoder is an encoder added with a temporal decomposition mechanism. After that, the improved decoder of the FEDformer model is used to predict the financial data within the second preset duration after the current moment according to the second data sequence, obtaining a predicted financial sequence. The improved decoder is a decoder added with a temporal decomposition mechanism. The FEDformer model is trained according to the business data within the second preset period and the financial data within the third preset period. The end moment of the second preset period is the start moment of the third preset period. Finally, an early warning message is generated according to the predicted financial sequence and sent to the target user terminal through a preset path. The early warning message is used to prompt the staff that there are abnormal fluctuations in the assets. The application sets to introduce a temporal decomposition mechanism into the encoder and decoder of the model to extract the trend items and periodic items in the financial data. The improved FEDformeer model is used to make predictions according to the real-time financial data, avoiding the interference of noise items in the long-period data. Among them, the combination of the temporal decomposition mechanism and the frequency domain enhancement mechanism of the FEDformer model enhances the understanding and prediction ability of the FEB module in the encoder for specific frequencies, and optimizes the allocation of attention resources in the FEA module, which can improve the monitoring of small-amount transactions in the financial data, solving the problem in the prior art that the financial early warning method mainly targets large-amount transaction changes and lacks the processing of multi-frequency small-amount transactions within a long period, resulting in errors in the early warning results. Description of the Drawings
[0019] Figure 1 Fig. shows a hardware structure block diagram of a mobile terminal for a financial early warning method based on the FEDformer model provided in an embodiment of the present application;
[0020] Figure 2 Fig. shows a flowchart of a financial early warning method based on the FEDformer model provided in an embodiment of the present application;
[0021] Figure 3 Fig. shows a system architecture diagram of an asset monitoring system provided in an embodiment of the present application;
[0022] Figure 4 Fig. shows a flowchart of a specific financial early warning method based on the FEDformer model provided in another embodiment of the present application;
[0023] Figure 5 The block diagram of a financial warning device based on the FEDformer model provided according to an embodiment of the present application is shown.
[0024] Among them, the above-mentioned drawings include the following reference numerals:
[0025] 102, processor; 104, memory; 106, transmission device; 108, input / output device. Detailed implementation manners
[0026] It should be noted that, without conflict, the embodiments in the present application and the features in the embodiments may be combined with each other. The present application will be described in detail below with reference to the drawings and in combination with the embodiments.
[0027] In order to enable those skilled in the art of this technology to better understand the solution of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without making creative efforts shall fall within the protection scope of the present application.
[0028] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily need to be used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so as to describe the embodiments of the present application here. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device including a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0029] For the convenience of description, some nouns or terms related to the embodiments of the present application are described below:
[0030] FEDformer model: including an encoder and a decoder, which combines the Transformer with a seasonal trend decomposition method, utilizes the fact that most time series tend to be sparsely represented based on well-known bases (such as the Fourier transform), and develops a model of a frequency-enhanced transformer, which has higher efficiency and is more efficient than the standard transformer with linear complexity of the sequence length.
[0031] As introduced in the background technology, the prior art lacks a financial early warning method that can meet the accuracy requirements over a long period. In order to solve the problem that the financial early warning methods in the prior art mainly focus on large-amount cash flow changes, lack the processing of multi-frequency small-amount cash flows over a long period, resulting in insufficient accuracy, the embodiments of the present application provide a financial early warning method, device, computer-readable storage medium and asset monitoring system based on a FEDformer model.
[0032] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0033] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 FIG. 1 is a hardware structure block diagram of a mobile terminal of a financial early warning method based on a FEDformer model according to an embodiment of the present invention. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.
[0034] The memory 104 can be used to store computer programs, such as software programs and modules of application software, such as the computer program corresponding to the financial early warning method based on the FEDformer model in the embodiments of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, the above method is implemented. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some instances, the memory 104 may further include a memory remotely disposed relative to the processor 102, and these remote memories may be connected to the mobile terminal through a network. Examples of the above network include but are not limited to the Internet, intranet, local area network, mobile communication network, and combinations thereof. The transmission device 106 is used to receive or send data via a network. Specific examples of the above network may include a wireless network provided by a communication provider of the mobile terminal. In one instance, the transmission device 106 includes a network adapter (Network Interface Controller, abbreviated as NIC), which can be connected to other network devices through a base station and thus communicate with the Internet. In one instance, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0035] In this embodiment, a financial early warning method based on the FEDformer model running on a mobile terminal, a computer terminal, or a similar computing device is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.
[0036] Figure 2 It is a flowchart of the financial early warning method based on the FEDformer model according to the embodiments of the present application. As Figure 2 shown, the method includes the following steps:
[0037] Step S201, receiving service data of different clients within a first preset period, and converting all the service data into a sequence form for representation according to the temporal relationship of the service data to obtain a first data sequence. Multiple clients correspond to the same target object, and the end moment of the first preset period is the current moment;
[0038] Specifically, in the fund supervision system, multiple enterprise clients (such as Figure 3Local clients 1 to n) upload business data to the system server in real time. Subsequently, the system server receives the business data, stores it in the enterprise fund supervision system, and converts all the business data into a sequence form for representation according to the chronological relationship of the business data, obtaining the first data sequence mentioned above.
[0039] It can be understood that the above-mentioned business data may include data covering the flow of enterprise funds such as contract data, budget data, fund appropriation data, account information, and approval information.
[0040] Step S202, extract features from the first data sequence through the improved encoder of the FEDformer model to obtain a second data sequence, where the improved encoder is an encoder with a time series decomposition mechanism;
[0041] Specifically, the encoder of the improved FEDformer model introduces a time series decomposition mechanism to decompose the data sequence into a trend term and a periodic term, so that the FEDformer can more effectively capture the long-term change trend and periodic pattern of the time series.
[0042] It can be understood that the above encoder introduces a time series decomposition mechanism by decomposing complex time series signals into different frequencies to form subsequences carrying different features. For the encoder, this application adopts a strategy of decomposing the periodic term and the trend term. When decomposing the time domain information into frequency domain information, it utilizes the characteristic that most time series have sparse representations in the Fourier transform. By decomposing multiple times, the fluctuations of the input and output are reduced. When randomly sampling some of the decomposed frequency domains and projecting them back to the time domain, noise is removed while reducing complexity, significantly reducing the computational amount. Moreover, time series decomposition decomposes the components with different time scales and features in the original time series data, enabling the encoder to focus more on enhancing specific frequency ranges or features (i.e., small-scale transaction flows). At the same time, after time series decomposition, the encoder can better process each part of the decomposed signal, enabling it to better learn the dependencies of long time series (to improve the accuracy in long-term supervision).
[0043] In one embodiment, the improved encoder performs time series decomposition on each data point in the first data sequence to identify the long-term cash flow trend and seasonal fluctuations (such as the expenditure peak at the end of each year), thereby obtaining a second data sequence that contains a more refined feature representation.
[0044] Step S203: Use the improved decoder of the FEDformer model to predict the financial data within the second preset duration after the current moment based on the second data sequence, and obtain a predicted financial sequence. The improved decoder is a decoder with a time series decomposition mechanism added. The FEDformer model is trained based on the business data within the second preset period and the financial data within the third preset period. The end moment of the second preset period is the start moment of the third preset period;
[0045] Specifically, the improved FEDformer decoder also applies a time series decomposition mechanism to predict the second data sequence and generate a predicted financial sequence to foresee the future financial change trend of the enterprise and obtain the above-mentioned predicted financial sequence.
[0046] It can be understood that through time series decomposition, the information contained in each decomposed component is more concentrated and single compared to the original financial transaction information sequence. When converting it to the frequency domain for calculation, the temperature and scale of the financial data processed by the decoder are effectively reduced. Especially for the large-scale fund supervision flow data in this application, the features contained in the decomposed subsequences are more concentrated and convenient for analysis. At the same time, there is no need to extract from complex data, which also reduces the computational complexity. Furthermore, the decoder focuses on attention calculation based on the extracted features, improving the operation efficiency and accuracy of the model. After time series decomposition, the feature information captured on different time scales and frequency domain components is richer, enabling the decoder to understand the dependency relationships in the time series more deeply and comprehensively. Specifically, the decomposed trend term and cycle term can enable the decoder to learn the duration fluctuation characteristics at different frequencies.
[0047] Step S204: Generate a warning message based on the predicted financial sequence and send it to the target user terminal through a preset path. The warning message is used to prompt the staff that there are abnormal fluctuations in the assets.
[0048] Specifically, the system generates a warning message based on the deviation degree between the predicted financial sequence and the normal financial status, and timely notifies the enterprise (local client) and the supervisor (supervisor) of potential financial risks.
[0049] In a specific embodiment, the comparison results between the prediction results of the improved FEDformer model and the traditional financial prediction model are shown in Table 1.
[0050] Table 1
[0051]
[0052] Note: Hit rate = number of positive samples classified as positive samples / total number of positive samples; False alarm rate = number of negative samples classified as positive samples / total number of negative samples; Accuracy = (number of positive samples classified as positive samples + number of negative samples classified as negative samples) / total number of samples.
[0053] It can be seen that in the fund supervision scenario, the improved FEDformer model has the highest combined accuracy, both being 92.30%. Moreover, the hit rates of the discrimination and classification of ST companies and non-ST companies by the system in this paper are also the same, indicating that there is no over-determination of ST companies and under-determination of non-ST companies.
[0054] This benefits from its introduction of a frequency enhancement mechanism and a time series decomposition mechanism. The frequency domain enhancement mechanism allows FEDformer to better learn data at different time scales, while the time series decomposition mechanism can decompose the data into different time scales and frequency components, thus better capturing the periodic patterns of the data.
[0055] In this embodiment, first, business data of different clients within a first preset time period is received, and all the business data is converted into a sequence form for representation according to the time series relationship of the business data to obtain a first data sequence. Multiple clients correspond to the same target object, and the end moment of the first preset time period is the current moment. Then, feature extraction is performed on the first data sequence through the improved encoder of the FEDformer model to obtain a second data sequence. The improved encoder is an encoder added with a time series decomposition mechanism. After that, the improved decoder of the FEDformer model predicts the financial data within a second preset duration after the current moment according to the second data sequence to obtain a predicted financial sequence. The improved decoder is a decoder added with a time series decomposition mechanism. The FEDformer model is trained according to the business data within a second preset time period and the financial data within a third preset time period. The end moment of the second preset time period is the start moment of the third preset time period. Finally, a warning message is generated according to the predicted financial sequence and sent to the target user terminal through a preset path. The warning message is used to prompt the staff that there are abnormal fluctuations in the assets. It is applied to introduce a time series decomposition mechanism into the encoder and decoder of the model to extract the trend items and periodic items in the financial data. The improved FEDformeer model is used to make predictions according to the real-time financial data, avoiding the interference of noise items in the long-period data. Among them, the combination of the time series decomposition mechanism and the frequency domain enhancement mechanism of the FEDformer model enhances the understanding and prediction ability of the FEB module in the encoder for specific frequencies and optimizes the allocation of attention resources in the FEA module, which can improve the monitoring of small-amount transactions in financial data and solve the problem in the existing financial warning methods that mainly target large-amount transaction changes and lack the processing of multiple small-amount transactions within a long period, resulting in errors in the warning results.
[0056] To enable the decoder to decode smoothly, in an optional implementation manner, after converting all the business data into a sequence form for representation according to the time series relationship of the business data to obtain a first data sequence, the method further includes:
[0057] Step S301: Process the first data sequence through a time series decomposition mechanism to extract the trend item data and periodic item data in the first data sequence, obtaining the first trend data and the first periodic data.
[0058] Specifically, first, the system server applies the time series decomposition mechanism to process the above first data sequence, obtaining the above first trend data and the above first periodic data. It can be understood that the time series decomposition mechanism can be based on a multiplicative model or an additive model. In a specific implementation, the present application uses an additive model for processing.
[0059] Through the above embodiments, a complex data sequence can be decomposed into a trend item and a periodic item, thus more clearly revealing the internal law of the data. For example, for a quarterly sales data sequence, the trend item may reflect the overall growth trend of sales volume over time, while the periodic item may reveal seasonal sales fluctuations. By decomposing the first data sequence, the future financial situation can be more accurately identified and predicted, especially in industries highly affected by seasonality, such as retail and tourism. This decomposition mechanism combined with the improved encoder and decoder of the FEDformer model can significantly improve the prediction accuracy, thus more effectively conducting financial early warning.
[0060] To implement the above time series decomposition mechanism, in an alternative embodiment, the above step S301 includes:
[0061] Step S3011: Process the first data sequence according to a preset window through the moving average method of the time series decomposition mechanism to obtain the first trend data;
[0062] Specifically, select an appropriate window size according to the periodicity of the financial data. The selection of the window size will affect the smoothness of trend extraction and the degree of detail retention. For each data point in the first data sequence, calculate its average value within the moving window. The window slides on the sequence until the end of the sequence. The obtained average value sequence is the first trend data. The specific formula is as follows:
[0063] X t = AvgPooling(Padding(X))
[0064] where X t is the trend item, Padding represents complementing the frequency domain information, and AvgPooling represents the preset window of the moving average method.
[0065] Step S3012: Based on the additive model, calculate the difference between the first data sequence and the first trend data through the time series decomposition mechanism to obtain the first periodic data.
[0066] Specifically, based on the above addition model, by subtracting each data point in the first data sequence from its corresponding trend data point, the first periodic data reflecting the short-term fluctuations and seasonal patterns of the sequence can be obtained. The specific formula is as follows:
[0067] X s = X - X t
[0068] Wherein, X s is the periodic term, and X is the above-mentioned first data sequence.
[0069] In order to extract features from the above first data sequence, in an optional implementation manner, the above step S202 includes:
[0070] Step S2021: Perform a linear transformation on the first data sequence through an improved encoder to obtain a third data sequence, and perform a Fourier transform and frequency-domain information sampling on the third data sequence to obtain a fourth data sequence;
[0071] Specifically, based on the FEB module of the encoder, perform a linear transformation on the above first data sequence. Among them, the data is mapped to a higher or lower dimensional space through one or more linear layers to facilitate subsequent feature extraction. Perform a Fourier transform on the third data sequence to convert the time-domain signal into a frequency-domain signal. Subsequently, perform frequency-domain information sampling to retain key frequency information, reduce the dimension, and enhance the model's ability to capture frequency features.
[0072] The specific formula is as follows:
[0073]
[0074] Wherein, is the above-mentioned fourth data sequence, Select is the frequency-domain information sampling (the data dimension after sampling is M), w is the weight of the linear transformation, x is the input of x ∈ X N*D , N and D are used to limit the data dimension, and F is the Fourier transform.
[0075] Step S2022: Perform a dot product on the fourth data sequence with a randomly initialized parameter matrix through an improved encoder, and perform completion and inverse Fourier transform on the third data sequence after the dot product to obtain a fifth data sequence;
[0076] Specifically, perform a dot product on the fourth data sequence with a randomly initialized parameter matrix to weight the frequency-domain information and enhance the sequence information. Then, complete the fourth data sequence to the original length, and through the inverse Fourier transform, convert the data from the frequency domain back to the time domain to obtain a fifth data sequence. The above operations retain the original timing characteristics of the data after performing frequency-domain operations. The specific formula is as follows:
[0077]
[0078] Among them, FEB(x) is the above-mentioned fifth data sequence, and F -1 is the inverse Fourier transform, R is the above-mentioned parameter matrix, satisfying R ∈ C D*D*M , and M is used to limit the data dimension.
[0079] Step S2023: Process the fifth data sequence through an improved timing decomposition mechanism of the encoder to obtain second trend data and second periodic data;
[0080] Specifically, use the timing decomposition mechanism to process the fifth data sequence, and decompose it into second trend data reflecting the long-term trend and second periodic data reflecting seasonal or periodic patterns.
[0081] Step S2024: Process the second trend data and second periodic data through the first feedforward neural network of the improved encoder to obtain a second data sequence.
[0082] Specifically, further feature extraction and non-linear transformation are performed on the second trend data and second periodic data through the first feedforward neural network, and finally a second data sequence is obtained, providing a rich and enhanced feature representation for subsequent decoding and prediction steps.
[0083] Through the above embodiments, a linear transformation is performed on the first data sequence to convert it into a more easily processed form, and then the data is transformed into the frequency domain through the Fourier transform, and frequency domain information sampling is performed, which helps to extract periodic features in the data. The dot product operation of the parameter matrix and the inverse Fourier transform further enhance the feature extraction ability of the model, enabling the model to more accurately identify the trend and periodic components in the data. Among them, frequency domain information sampling and the reduction of data dimension not only reduce the demand for computing resources, but also speed up the processing speed of the model, facilitating financial prediction of large-scale data sets.
[0084] In order to make a prediction based on the above second data sequence, in an optional implementation manner, the above step S203 includes:
[0085] Step S2031: Decode the second data sequence through an improved decoder according to the first trend data and the first periodic data to obtain a sixth data sequence;
[0086] Specifically, the decoder decodes the encoded second data sequence according to the trend data and periodic data in the original data, that is, the above-mentioned first trend data and first periodic data, to obtain the above-mentioned sixth data sequence.
[0087] Step S2032: Process the sixth data sequence by improving the timing decomposition mechanism of the decoder to obtain the third cycle data and the third trend data;
[0088] Specifically, the decoder uses the timing decomposition mechanism again to process the sixth data sequence and decomposes it into the third cycle data and the third trend data.
[0089] Step S2033: Perform a linear transformation on the third cycle data and the third trend data through the improved fully connected layer of the decoder to extract the query vector, key vector, and value vector;
[0090] Specifically, perform a linear transformation on the third cycle data and the third trend data through the fully connected layer to generate the query vector, key vector, and value vector, so as to perform attention adjustment through the multi-head attention mechanism subsequently.
[0091] Step S2034: Respectively perform Fourier transform and frequency domain information sampling on the query vector, key vector, and value vector through the improved decoder to obtain the query frequency component, key frequency component, and value frequency component, and process and calculate the dot product of the query frequency component and the key frequency component according to the activation function to obtain the first target feature, and complete the first target feature and calculate the dot product of the completed first target feature and the value frequency component to obtain the second target feature;
[0092] Specifically, perform Fourier transform on the query vector, key vector, and value vector respectively to convert the time series into a frequency domain representation, and perform frequency domain information sampling to retain the key frequency components. Furthermore, use the activation function to process the query frequency component and the key frequency component, and then calculate their dot product to obtain the first target feature. Then, complete the first target feature and calculate the dot product of the completed feature and the value frequency component to obtain the second target feature. The above operations utilize the dynamic modeling ability of the multi-head self-attention mechanism for sequence features and can capture the complex dependencies between sequences. The formula is as follows:
[0093]
[0094] Where q, k, and v are the above-mentioned query vector, key vector, and value vector, σ is the correction coefficient, and FEA(q, k, v) is the above-mentioned predicted financial sequence.
[0095] Step S2035: Perform an inverse Fourier transform on the second target feature through the improved decoder to obtain the predicted financial sequence.
[0096] Specifically, perform an inverse Fourier transform on the second target feature to convert it back from the frequency domain to the time domain to obtain the predicted financial sequence.
[0097] Through the above embodiments, the second data sequence is decoded according to the first trend data and the first cycle data, and the decoded sequence is further processed by a time series decomposition mechanism to extract more detailed periodic and trend features. By further processing the decoded sequence through the time series decomposition mechanism, more detailed periodic and trend features are extracted. For frequency domain self-attention adjustment (FEA), where through Fourier transform and frequency domain information sampling, the periodic components of these vectors can be further refined, and the use of activation functions increases the non-linear expression ability of the model, enabling the model to better fit complex data relationships.
[0098] To facilitate the analysis of financial abnormal fluctuations, in an alternative embodiment, before generating early warning information based on the predicted financial sequence, the method further includes:
[0099] Step S401: Obtain a first preset index set, where the first preset index set includes multiple preset indexes for characterizing asset fluctuations;
[0100] Specifically, first, the system pre-defines a set including multiple financial indexes for characterizing asset fluctuations. These indexes may include, but are not limited to, current ratio, quick ratio, asset-liability ratio, interest coverage ratio, etc., covering multiple aspects such as an enterprise's debt repayment ability, profitability, and cash flow.
[0101] Step S402: Determine whether each preset index follows a normal distribution according to the first data sequence through the K-S test;
[0102] Specifically, traverse each index in the first preset index set, and use the first data sequence (historical financial data) to determine whether the index data follows a normal distribution through the K-S test. The K-S test compares the sample cumulative distribution function with the cumulative distribution function of the theoretical distribution, calculates the maximum difference value, and evaluates whether the difference is significant by looking up the statistical table.
[0103] Step S403: When the preset index follows a normal distribution, screen the preset index through an independent samples T-test to obtain a first target index;
[0104] Specifically, for the indexes that follow a normal distribution, an independent samples T-test is used for screening to determine the significant differences between financially distressed companies and non-financially distressed companies in these indexes.
[0105] Step S404: When the preset index does not follow a normal distribution, screen through the Wilcoxon test to obtain a second target index;
[0106] Specifically, for indicators that do not follow a normal distribution, the Wilcoxon test is used for screening. These statistical test methods can help us find those indicators that have significant differences between companies with different financial health statuses, thereby improving the accuracy of early warning.
[0107] Step S405, construct a second preset indicator set according to the first target indicator and the second target indicator.
[0108] Specifically, merge the first target indicator and the second target indicator screened by the independent sample T-test and the Wilcoxon test to construct a second preset indicator set. This indicator set is more concise and effective, and contains the most valuable financial indicators for early warning.
[0109] In a specific embodiment, the possible financial indicators and screening results included in the above first preset indicator set are shown in Table 2.
[0110] Table 2
[0111]
[0112] Note: ** indicates that the indicator is excluded after screening.
[0113] Through the above embodiments, by screening out the most differential and valuable financial indicators for early warning, the present invention can construct a more accurate and effective financial crisis early warning model.
[0114] In order to generate the above early warning information, in an optional implementation manner, the above step S204 includes:
[0115] Step S2041, calculate each preset indicator in the second preset indicator set according to the predicted financial sequence to obtain a target financial statement;
[0116] Specifically, use the data in the predicted financial sequence to calculate each preset indicator (such as current ratio, quick ratio, asset-liability ratio, etc.) in the second preset indicator set, so as to generate a target financial statement.
[0117] Step S2042, compare each preset indicator in the target financial statement with the corresponding preset range, and in the case where any preset indicator exceeds the corresponding preset range, generate early warning information according to the target financial statement.
[0118] Specifically, the system compares the values of each preset indicator in the target financial statement with the preset safety range. The preset range is based on historical data, industry standards, or expert evaluations. If one or more indicators exceed the safety range, this may indicate that the enterprise has financial risks. When it is detected that any preset indicator exceeds its preset range, the system will generate a warning message to notify the relevant regulatory or enterprise parties. The warning message will include the name of the indicator that exceeds the range, the actual value, and the recommended countermeasures.
[0119] Through the above embodiments, each indicator in the second preset indicator set calculated based on the predicted financial sequence forms the target financial statement. Comparing the predicted results with the preset financial indicator range can timely detect possible financial risks, accurately warn of abnormal fluctuations in assets in a timely manner, provide strong support for financial decision-making, and prevent the enterprise from suffering losses due to financial risks.
[0120] In order to enable those skilled in the art to more clearly understand the technical solution of the present application, the implementation process of the financial warning method based on the FEDformer model of the present application will be described in detail below with specific embodiments.
[0121] This embodiment relates to a specific financial warning method based on the FEDformer model, as Figure 4 shown, including the following steps:
[0122] Step S1: The system server periodically obtains historical financial data, and classifies, filters, integrates, and transforms the obtained historical financial data to form sequence data containing time series information;
[0123] Step S2: Decompose the above sequence data through a time series decomposition mechanism into a trend component and a periodic component;
[0124] Step S3: Input the above sequence data into the FEDformer encoder to process the above sequence data through the frequency domain enhancement module FEB to enhance the sequence information;
[0125] Step S4: Decompose the enhanced sequence information through a time series decomposition mechanism;
[0126] Step S6: Input the trend component, the periodic component, and the encoded sequence into the FEDformer decoder, process and restore them to sequence data, and decompose them through a time series decomposition mechanism to obtain periodic item data and trend item data;
[0127] Step S6: Input the trend component, the periodic component, and the encoded sequence into the FEDformer decoder, process and restore them to sequence data, and decompose them through a time series decomposition mechanism to obtain periodic item data and trend item data;
[0128] Step S7: Process the periodic item data and trend item data through the frequency domain enhanced attention module FEA.
[0129] Step S8: Perform financial data prediction through a feedforward neural network based on the processed periodic item data and trend item data to obtain a predicted financial sequence.
[0130] Step S9: Perform operations based on the predicted financial sequence, calculate the predicted financial indicators after screening, and convert the predicted financial sequence into more intuitive predicted financial indicators.
[0131] Step S10: The fund supervision system sends the above predicted financial indicator data to the client.
[0132] Step S11: The client configures supervision rules and approval processes to adjust based on the above predicted financial indicator data.
[0133] Step S12: Based on the new business data, the financial early warning model (the above FEDformer model) is run at regular intervals with a preset period.
[0134] It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.
[0135] The embodiment of the present application also provides a financial early warning device based on the FEDformer model. It should be noted that the financial early warning device based on the FEDformer model in the embodiment of the present application can be used to execute the financial early warning method based on the FEDformer model provided by the embodiment of the present application. This device is used to implement the above embodiments and preferred implementation manners, and those that have been described will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that can achieve a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.
[0136] The following introduces the financial early warning device based on the FEDformer model provided by the embodiment of the present application.
[0137] Figure 5 It is a structural block diagram of the financial early warning device based on the FEDformer model according to the embodiment of the present application. As Figure 5 shown, the device includes:
[0138] The first acquisition unit 10 is configured to receive the service data of different clients within the first preset period, and convert all the service data into a sequence form for representation according to the timing relationship of the service data, so as to obtain a first data sequence. Multiple clients correspond to the same target object, and the end time of the first preset period is the current time;
[0139] The first processing unit 20 is configured to extract features from the first data sequence through an improved encoder of the FEDformer model to obtain a second data sequence. The improved encoder is an encoder added with a time series decomposition mechanism;
[0140] The prediction unit 30 is configured to predict the financial data within the second preset duration after the current time through an improved decoder of the FEDformer model according to the second data sequence, so as to obtain a predicted financial sequence. The improved decoder is a decoder added with a time series decomposition mechanism. The FEDformer model is trained according to the service data within the second preset period and the financial data within the third preset period. The end time of the second preset period is the start time of the third preset period;
[0141] The alarm unit 40 is configured to generate a warning message according to the predicted financial sequence and send it to the target user terminal through a preset path. The warning message is used to prompt the staff that there are abnormal fluctuations in the assets.
[0142] Through this embodiment, the first acquisition unit receives service data of different clients within a first preset time period, and converts all the service data into a sequence form according to the time sequence relationship of the service data for representation, obtaining a first data sequence. Multiple clients correspond to the same target object, and the end time of the first preset time period is the current time; the first processing unit extracts features from the first data sequence through an improved encoder of the FEDformer model, obtaining a second data sequence. The improved encoder is an encoder with a time series decomposition mechanism added; the prediction unit predicts the financial data within a second preset duration after the current time according to the second data sequence through an improved decoder of the FEDformer model, obtaining a predicted financial sequence. The improved decoder is a decoder with a time series decomposition mechanism added. The FEDformer model is trained according to the service data within a second preset time period and the financial data within a third preset time period. The end time of the second preset time period is the start time of the third preset time period; the alarm unit generates a warning message according to the predicted financial sequence and sends it to the target user terminal through a preset path. The warning message is used to prompt the staff that there are abnormal fluctuations in the assets. It is applied to introduce a time series decomposition mechanism into the encoder and decoder of the model to extract the trend term and cycle term in the financial data. The improved FEDformeer model makes predictions according to the real-time financial data, avoiding the interference of noise terms in the long-cycle data. Among them, the combination of the time series decomposition mechanism and the frequency domain enhancement mechanism of the FEDformer model enhances the understanding and prediction ability of the FEB module in the encoder for specific frequencies, and optimizes the allocation of attention resources in the FEA module, which can improve the monitoring of small-amount transactions in financial data, and solves the problem that the existing financial warning methods mainly target large-amount transaction changes and lack the processing of multiple small-amount transactions within a long cycle, resulting in errors in the warning results.
[0143] In an optional implementation manner, to enable the decoder to decode smoothly, the above device further includes:
[0144] A second processing unit, configured to, after converting all the service data into a sequence form according to the time sequence relationship of the service data for representation and obtaining a first data sequence, process the first data sequence through a time series decomposition mechanism to extract the trend term data and cycle term data in the first data sequence, obtaining a first trend data and a first cycle data.
[0145] In an optional implementation manner, to implement the above time series decomposition mechanism, the above second processing unit includes:
[0146] A first calculation module, configured to process the first data sequence according to a preset window through the moving average method of the time series decomposition mechanism to obtain the first trend data;
[0147] A second calculation module, configured to calculate a difference between a first data sequence and first trend data through a time series decomposition mechanism based on an addition model, so as to obtain first periodic data.
[0148] To extract features from the above-mentioned first data sequence, in an alternative embodiment, the above-mentioned first processing unit includes:
[0149] A sampling module, configured to perform a linear transformation on the first data sequence through an improved encoder to obtain a third data sequence, perform a Fourier transform and frequency domain information sampling on the third data sequence to obtain a fourth data sequence;
[0150] A third calculation module, configured to perform a dot product of a randomly initialized parameter matrix and the fourth data sequence through an improved encoder, and perform completion and inverse Fourier transform on the dot product result of the third data sequence to obtain a fifth data sequence;
[0151] A fourth calculation module, configured to process the fifth data sequence through a time series decomposition mechanism of an improved encoder to obtain second trend data and second periodic data;
[0152] A fifth calculation module, configured to process the second trend data and the second periodic data through a first feed-forward neural network of an improved encoder to obtain a second data sequence.
[0153] To make a prediction based on the above-mentioned second data sequence, in an alternative embodiment, the above-mentioned prediction unit includes:
[0154] A first processing module, configured to decode the second data sequence through an improved decoder according to the first trend data and the first periodic data to obtain a sixth data sequence;
[0155] A second processing module, configured to process the sixth data sequence through a time series decomposition mechanism of an improved decoder to obtain third periodic data and third trend data;
[0156] A third processing module, configured to perform a linear transformation on the third periodic data and the third trend data through a fully connected layer of an improved decoder to extract a query vector, a key vector, and a value vector;
[0157] A sixth calculation module, configured to perform a Fourier transform and frequency domain information sampling on the query vector, the key vector, and the value vector respectively through an improved decoder to obtain a query frequency component, a key frequency component, and a value frequency component, and process and calculate a dot product of the query frequency component and the key frequency component according to an activation function to obtain a first target feature, complete the first target feature and calculate a dot product of the completed first target feature and the value frequency component to obtain a second target feature;
[0158] A fourth processing module, configured to perform an inverse Fourier transform on the second target feature through an improved decoder to obtain a predicted financial sequence.
[0159] To facilitate the analysis of financial abnormal fluctuations, in an alternative embodiment, the above device further includes:
[0160] A second acquisition unit, configured to acquire a first preset index set before generating a warning message according to the predicted financial sequence, where the first preset index set includes a plurality of preset indexes for characterizing asset fluctuations;
[0161] A first calculation unit, configured to determine whether each preset index follows a normal distribution according to the first data sequence through a K-S test;
[0162] A second calculation unit, configured to screen the preset indexes through an independent sample T test to obtain a first target index in the case that the preset index follows a normal distribution;
[0163] A third calculation unit, configured to screen through a Wilcoxon test to obtain a second target index in the case that the preset index does not follow a normal distribution;
[0164] A construction unit, configured to construct a second preset index set according to the first target index and the second target index.
[0165] To generate the above warning message, in an alternative embodiment, the above alarm unit includes:
[0166] A seventh calculation module, configured to calculate each preset index in the second preset index set according to the predicted financial sequence to obtain a target financial statement;
[0167] Specifically, using the data in the predicted financial sequence, calculate each preset index in the second preset index set (such as current ratio, quick ratio, asset-liability ratio, etc.), so as to generate a target financial statement.
[0168] A generation module, configured to compare each preset index in the target financial statement with the corresponding preset range, and generate a warning message according to the target financial statement in the case that any preset index exceeds the corresponding preset range.
[0169] The above financial warning device based on the FEDformer model includes a processor and a memory. The above first acquisition unit, first processing unit, prediction unit, alarm unit, etc. are all stored in the memory as program units, and the processor executes the above program units stored in the memory to implement corresponding functions. The above modules are all located in the same processor; or, the above modules are respectively located in different processors in any combination form.
[0170] The processor contains cores, which retrieve corresponding program units from the memory. One or more cores can be set, and the accuracy of financial warning can be improved by adjusting the core parameters.
[0171] The memory may include non-permanent memory in the form of computer-readable media, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.
[0172] An embodiment of the present invention provides a computer-readable storage medium, and the above computer-readable storage medium includes a stored program. When the above program runs, it controls the device where the computer-readable storage medium is located to execute the above financial warning method based on the FEDformer model.
[0173] An embodiment of the present invention provides a processor, and the above processor is used to run a program. When the above program runs, it executes the above financial warning method based on the FEDformer model.
[0174] An embodiment of the present invention provides a communication system, which includes a primary communication domain, a secondary communication domain processor, a memory, and a program stored on the memory and executable on the processor. When the processor executes the program, it implements at least the steps of the financial warning method based on the FEDformer model.
[0175] This application also provides a computer program product, which, when executed on a data processing device, is adapted to execute a program initialized with at least the steps of the financial warning method based on the FEDformer model.
[0176] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general-purpose computing device. They can be concentrated on a single computing device or distributed on a network composed of multiple computing devices. They can be implemented by program codes executable by the computing device, so that they can be stored in the storage device and executed by the computing device. And in some cases, the steps shown or described can be executed in a different order from here, or they can be separately made into individual integrated circuit modules, or multiple modules or steps among them can be made into a single integrated circuit module to implement. In this way, the present invention is not limited to any specific combination of hardware and software.
[0177] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of an all-hardware embodiment, an all-software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0178] The present application is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram, as well as the combination of flows 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 the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the functions specified in Figure 1 one or more flows and / or blocks Figure 1 one or more blocks.
[0179] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured article including instruction means, and the instruction means implement the functions specified in Figure 1 one or more flows and / or blocks Figure 1 one or more blocks.
[0180] These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in Figure 1 one or more flows and / or blocks Figure 1 one or more blocks.
[0181] In a typical configuration, a computing device includes one or more processors (CPUs), an input / output interface, a network interface, and a memory.
[0182] The memory may include non-permanent memory in the computer-readable medium, in the form of random access memory (RAM) and / or non-volatile memory such as read-only memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
[0183] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0184] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0185] From the above description, it can be seen that the above embodiments of the present application achieve the following technical effects:
[0186] 1) The financial warning method based on the FEDformer model of the present application first receives business data of different clients within a first preset time period, and converts all the business data into a sequence form for representation according to the time series relationship of the business data to obtain a first data sequence. Multiple clients correspond to the same target object, and the end time of the first preset time period is the current time. Then, the improved encoder of the FEDformer model is used to extract features from the first data sequence to obtain a second data sequence. The improved encoder is an encoder added with a time series decomposition mechanism. After that, the improved decoder of the FEDformer model is used to predict the financial data within a second preset duration after the current time according to the second data sequence to obtain a predicted financial sequence. The improved decoder is a decoder added with a time series decomposition mechanism. The FEDformer model is trained according to the business data within a second preset time period and the financial data within a third preset time period. The end time of the second preset time period is the start time of the third preset time period. Finally, a warning message is generated according to the predicted financial sequence and sent to the target user terminal through a preset path. The warning message is used to prompt the staff that there are abnormal fluctuations in the assets. The application sets to introduce a time series decomposition mechanism in the encoder and decoder of the model to extract the trend term and cycle term in the financial data, and predicts according to the real-time financial data through the improved FEDformeer model, avoiding the interference of the noise term in the long-cycle data. Among them, the combination of the time series decomposition mechanism and the frequency domain enhancement mechanism of the FEDformer model enhances the understanding and prediction ability of the FEB module in the encoder for specific frequencies, and optimizes the allocation of attention resources in the FEA module, which can improve the monitoring of small-amount transactions in financial data, and solves the problem that the existing financial warning methods mainly target large-amount transaction changes and lack the processing of multi-frequency small-amount transactions within a long cycle, resulting in errors in the warning results.
[0187] 2) The financial warning device based on the FEDformer model of the present application. The first acquisition unit receives the business data of different clients within the first preset time period, and converts all the business data into a sequence form for representation according to the time series relationship of the business data, obtaining a first data sequence. Multiple clients correspond to the same target object, and the end time of the first preset time period is the current time. The first processing unit extracts features from the first data sequence through the improved encoder of the FEDformer model, obtaining a second data sequence. The improved encoder is an encoder added with a time series decomposition mechanism. The prediction unit predicts the financial data within the second preset duration after the current time according to the second data sequence through the improved decoder of the FEDformer model, obtaining a predicted financial sequence. The improved decoder is a decoder added with a time series decomposition mechanism. The FEDformer model is trained according to the business data within the second preset time period and the financial data within the third preset time period. The end time of the second preset time period is the start time of the third preset time period. The alarm unit generates a warning message according to the predicted financial sequence and sends it to the target user terminal through a preset path. The warning message is used to prompt the staff that there are abnormal fluctuations in the assets. The application is set to introduce a time series decomposition mechanism into the encoder and decoder of the model, extract the trend term and cycle term in the financial data, and predict according to the real-time financial data through the improved FEDformeer model, avoiding the interference of the noise term in the long-period data. Among them, the combination of the time series decomposition mechanism and the frequency domain enhancement mechanism of the FEDformer model enhances the understanding and prediction ability of the FEB module in the encoder for specific frequencies, and optimizes the allocation of attention resources in the FEA module, which can improve the monitoring of small-amount transactions in financial data, and solves the problem in the prior art that the financial warning method mainly targets large-amount transaction changes and lacks the processing of multiple small-amount transactions within a long period, resulting in errors in the warning results.
[0188] The above are only the preferred embodiments of the present application and are not used to limit the present application. For those skilled in the art, the present application can have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A financial early warning method based on the FEDformer model, characterized in that, Including: Receiving service data of different clients within a first preset time period, and converting all the service data into a sequence form for representation according to the time sequence relationship of the service data to obtain a first data sequence. Multiple clients correspond to the same target object, and the end time of the first preset time period is the current time; Performing feature extraction on the first data sequence through an improved encoder of the FEDformer model to obtain a second data sequence, where the improved encoder is an encoder added with a time series decomposition mechanism; Predicting financial data within a second preset time period after the current time according to the second data sequence through an improved decoder of the FEDformer model to obtain a predicted financial sequence. The improved decoder is a decoder added with a time series decomposition mechanism, and the FEDformer model is trained according to the service data within a second preset time period and the financial data within a third preset time period. The end time of the second preset time period is the start time of the third preset time period; Generating a warning message according to the predicted financial sequence and sending it to the target user terminal through a preset path. The warning message is used to prompt the staff that there are abnormal fluctuations in the assets.
2. The method according to claim 1, wherein After converting all the service data into a sequence form for representation according to the time sequence relationship of the service data to obtain a first data sequence, the method further includes: Processing the first data sequence through the time series decomposition mechanism to extract the trend item data and periodic item data in the first data sequence to obtain first trend data and first periodic data.
3. The method according to claim 2, characterized in that Processing the first data sequence through the time series decomposition mechanism to extract the trend item data and periodic item data in the first data sequence to obtain first trend data and first periodic data, including: Processing the first data sequence through the moving average method of the time series decomposition mechanism according to a preset window to obtain the first trend data; Calculating the difference between the first data sequence and the first trend data through the time series decomposition mechanism based on an additive model to obtain the first periodic data.
4. The method according to claim 2, wherein Performing feature extraction on the first data sequence through an improved encoder of the FEDformer model to obtain a second data sequence, including: Performing a linear transformation on the first data sequence through the improved encoder to obtain a third data sequence, performing a Fourier transform and frequency domain information sampling on the third data sequence to obtain a fourth data sequence; Performing a dot product on the fourth data sequence according to a randomly initialized parameter matrix through the improved encoder, and performing complementation and inverse Fourier transform on the third data sequence after the dot product to obtain a fifth data sequence; Processing the fifth data sequence through the time series decomposition mechanism of the improved encoder to obtain second trend data and second periodic data; Processing the second trend data and the second periodic data through a first feedforward neural network of the improved encoder to obtain a second data sequence.
5. The method according to claim 4, wherein Predicting financial data within a second preset duration after the current moment based on the second data sequence through an improved decoder of the FEDformer model to obtain a predicted financial sequence, including: Decoding the second data sequence by the improved decoder according to the first trend data and the first cycle data to obtain a sixth data sequence; Processing the sixth data sequence by the time series decomposition mechanism of the improved decoder to obtain third cycle data and third trend data; Performing a linear transformation on the third cycle data and the third trend data by a fully connected layer of the improved decoder to extract a query vector, a key vector, and a value vector; Performing a Fourier transform and frequency domain information sampling on the query vector, the key vector, and the value vector respectively by the improved decoder to obtain a query frequency component, a key frequency component, and a value frequency component, and processing and calculating a dot product of the query frequency component and the key frequency component according to an activation function to obtain a first target feature, complementing the first target feature and calculating a dot product of the complemented first target feature and the value frequency component to obtain a second target feature; Performing an inverse Fourier transform on the second target feature by the improved decoder to obtain the predicted financial sequence.
6. The method according to claim 1, characterized in that, Before generating a warning message according to the predicted financial sequence, the method further includes: Obtaining a first preset index set, where the first preset index set includes a plurality of preset indexes for characterizing asset fluctuations; Determining whether each of the preset indexes follows a normal distribution according to the first data sequence through a K-S test; In the case where the preset index follows a normal distribution, screening the preset index through an independent sample T test to obtain a first target index; In the case where the preset index does not follow a normal distribution, screening through a Wilcoxon test to obtain a second target index; Constructing a second preset index set according to the first target index and the second target index.
7. The method according to claim 6, wherein Generating a warning message according to the predicted financial sequence, including: Calculating each of the preset indexes in the second preset index set according to the predicted financial sequence to obtain a target financial statement; Comparing each of the preset indexes in the target financial statement with a corresponding preset range, and generating the warning message according to the target financial statement in the case where any of the preset indexes exceeds the corresponding preset range.
8. A financial early warning device based on the FEDformer model, characterized in that, The device includes: A first acquisition unit, configured to receive real-time service data of different clients within a first preset period and convert it into a sequence form for representation according to a time series relationship to obtain a first data sequence, where the multiple clients correspond to the same target object, and the end moment of the first preset period is the current moment; A first processing unit, configured to perform feature extraction on the first data sequence through an improved encoder of the FEDformer model to obtain a second data sequence, where the improved encoder is an encoder added with a time series decomposition mechanism; A prediction unit, configured to predict financial data within a second preset duration after the current moment based on the second data sequence through an improved decoder of the FEDformer model, so as to obtain a predicted financial sequence. The improved decoder is a decoder added with a time series decomposition mechanism. The FEDformer model is trained based on the service data within a second preset period and the financial data within a third preset period. The end moment of the second preset period is the start moment of the third preset period; An alarm unit, configured to generate a warning message according to the predicted financial sequence and send it to a target client through a preset path. The warning message is used to prompt the staff that there are abnormal fluctuations in assets.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein when the program runs, it controls the device where the computer-readable storage medium is located to execute the method according to any one of claims 1 to 7.
10. An asset monitoring system, characterized in that, Comprising: One or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors. The one or more programs include those for executing the method according to any one of claims 1 to 7.