Intelligent early warning method of financial risks based on multi-source data fusion
By integrating multi-source data and utilizing principal component analysis and graph neural network technology to construct a financial correlation graph, combined with time series analysis and long-short-term memory networks, the limitations of existing financial risk warning methods are overcome, timely identification of abnormal transactions and dynamic warnings are achieved, and the intelligence and real-time nature of corporate financial risk management are improved.
Patent Information
- Application Number
- CN202510968704.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-15
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2045-07-15
AI Technical Summary
Existing financial risk warning methods rely on a single data source or simple statistical models, which makes it difficult to fully capture the dynamic characteristics of multi-dimensional heterogeneous data, resulting in insufficient timeliness and accuracy of warnings, and low intelligence, making it difficult to adapt to the rapidly changing market environment.
By integrating data from the company's internal financial system, external market databases, and industry reports, a standardized multi-source financial data set is generated. Principal component analysis and graph neural network technology are used to construct a financial correlation graph. Time series analysis and long-short-term memory networks are combined to predict revenue fluctuation trends, identify high-risk points, and generate dynamic early warning reports.
It enables timely discovery of abnormal transactions, provides dynamic early warning reports that include regional market differences, improves the intelligence and real-time nature of corporate financial risk management, and enhances the accuracy and timeliness of early warnings.
Smart Images

Figure CN120509981B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information technology, and in particular to a financial risk intelligent early warning method based on multi-source data fusion. Background Art
[0002] Financial risk warning is a crucial research area in corporate management and economic development, which is directly related to the survival of enterprises and social stability. With the advent of the data age, the identification and prevention of financial risks have become an indispensable part of ensuring economic security. Especially in the context of intensified global competition and increasing uncertainty factors, timely and accurate prediction of potential risks is particularly critical. However, existing methods often expose significant limitations when dealing with complex and changing economic environments. Traditional financial risk warnings often rely on a single data source or simple statistical models, which makes it difficult to fully capture the dynamic characteristics of risks. In addition, when processing multi-dimensional heterogeneous data, they are often distorted due to data silos or insufficient analysis depth, resulting in limited timeliness and accuracy of warnings.
[0003] These limitations stem from several core challenges. First, the integration of multi-source data is inefficient. Financial data is often scattered across different systems and formats, lacking a unified integration mechanism. Second, existing methods are incapable of uncovering deep correlations between data, making it difficult to reveal risk patterns hidden within multi-source data. Finally, traditional models lack a high level of intelligence. Traditional models often rely on manual experience or fixed rules, making them difficult to adapt to rapidly changing market environments and implement dynamic early warning systems. These technical factors have not been effectively addressed, resulting in risk warnings often lagging behind actual needs or leading to misjudgments in complex scenarios, creating technical challenges that urgently need to be overcome.
[0004] Therefore, a key issue in this research is how to construct a financial risk prediction method based on multi-source data fusion that efficiently integrates heterogeneous data, deeply mines correlation patterns, and implements intelligent dynamic early warning. Solving this problem requires not only overcoming the technical barriers of data fusion but also achieving breakthroughs in intelligent analysis and real-time performance to meet the high standards of risk management in the modern economic system. Summary of the Invention
[0005] This invention provides an intelligent early warning method for financial risks based on multi-source data fusion. It can promptly detect the impact of abnormal transactions, provide dynamic early warning reports that include regional market differences, and effectively enhance the financial risk management capabilities of enterprises. The method mainly includes:
[0006] Obtain revenue, cost, and profit data from the company's internal financial system, transaction volume and market price data from external market databases, and regional market trend data from industry reports. Pre-process the data to generate a standardized multi-source financial data set that includes a variety of financial indicators.
[0007] Generate a core set of financial indicators that include revenue synchronization and cyclical characteristics based on standardized multi-source financial data sets;
[0008] Generate revenue stability indicators reflecting demand drivers based on transaction volume data from external market databases;
[0009] If the trading volume volatility in the revenue stability indicator exceeds the preset threshold, the revenue data is processed to generate a smoothed revenue volatility series;
[0010] Generate market price sensitivity indicators that reflect market risk exposure using market price data from external market databases;
[0011] Based on the core financial indicator set, income stability indicator, and market price sensitivity indicator, a financial correlation graph structure including edge weights between nodes is generated;
[0012] If the edge weight in the financial association graph structure exceeds the preset threshold, it will be processed to generate a node-level risk set reflecting the impact of abnormal transactions;
[0013] Generate a dynamic risk prediction sequence including the impact of abnormal transactions based on the node-level risk set;
[0014] If the risk value at a certain point in time in the dynamic risk prediction sequence exceeds the preset warning threshold, the high-risk point driven by abnormal transactions is identified and a set of early warning signals containing timestamps and regional market differences is generated;
[0015] For the set of early warning signals, knowledge graph technology is used to associate and map high-risk points with the core financial indicators of revenue, trading volume volatility, and market price sensitivity. Through the semantic reasoning algorithm, the risk transmission path from trading volume fluctuations to revenue synchronization is generated, and a dynamic early warning report that includes regional market differences is obtained.
[0016] The above method obtains revenue, cost, and profit data from the enterprise's internal financial system, obtains transaction volume and market price data from an external market database, and obtains regional market trend data from industry reports, and pre-processes the data to generate a standardized multi-source financial data set containing a variety of financial indicators, including:
[0017] Obtain revenue data, cost data, profit data, transaction volume data, and market price data from the company's internal financial system and external market database, respectively. Extract market trend data based on industry reports to obtain a multi-source original data set.
[0018] For multi-source original data sets, linear interpolation is used to process missing data and generate a preliminary data set after filling.
[0019] Outliers were detected from the preliminary data set. If the record deviated from three times the standard deviation, the corresponding data point was removed to obtain the cleaned data set;
[0020] The cleaned dataset is processed through a timestamp-based matching method to unify the data granularity and generate an aligned time series dataset.
[0021] Based on the aligned time series data set, calculate the financial indicators including revenue data, cost data and profit data to obtain a standardized financial indicator set;
[0022] Multiple regression analysis is used to analyze the correlation between the standardized financial indicator set and transaction volume data, market price data and market trend data to determine the trend relationship between multiple source data;
[0023] Through trend relationships, a multi-source financial data set containing a variety of financial indicators is generated.
[0024] The above method generates a core set of financial indicators containing revenue synchronization and cyclical characteristics for a standardized multi-source financial data set, including the use of principal component analysis to extract linear combination features of revenue, cost, and profit, calculate the variance contribution rate of each feature in the data set, and eliminate redundant variables with variance contribution rates below a preset threshold through a recursive feature elimination algorithm. The specific process is as follows:
[0025] Obtain Z-score normalization results for revenue, cost, and profit characteristics from a standardized multi-source financial dataset;
[0026] Principal component analysis is used to calculate the eigenvectors and variance contribution rates of the standardized data, generating a preliminary feature set containing principal component scores and variance contribution rates;
[0027] According to the preset threshold, the principal components with the variance contribution rate meeting the standard are screened, and a simplified feature set is generated, which only retains the principal components with the variance contribution rate higher than the threshold.
[0028] For the principal components of income in the streamlined feature set, Fourier transform is used to extract the periodic features corresponding to the spectrum peaks. The sliding window Pearson correlation coefficient is used to calculate the synchronization features of income fluctuations between enterprises, generating a feature decomposition result containing periodicity and synchronization labels.
[0029] The Spearman rank correlation coefficient was used to calculate the nonlinear correlation between periodicity and synchronization features, and a symmetric feature correlation matrix was generated.
[0030] For the feature correlation matrix, the K-means clustering algorithm is used to group the features, the number of clusters is determined according to the maximum value of the silhouette coefficient, and a core financial indicator set containing the number of clusters is generated;
[0031] From the core financial indicator set, the revenue growth rate, gross profit margin fluctuation and accounts receivable turnover rate with the closest cluster center are extracted as representative indicators. The original data are merged with the principal component scores and cluster labels to generate the final data set with period synchronization marks.
[0032] The above method generates a revenue stability indicator reflecting demand drivers based on transaction volume data in an external market database. This includes calculating transaction volume volatility and regional market differences, combining it with revenue data from the company's internal financial system, and using principal component analysis to extract the principal components of the synchronization between transaction volume and revenue. The specific process is as follows:
[0033] Obtain trading volume time series data from an external market database and calculate multi-day rolling volatility at daily granularity. Volatility is equal to the standard deviation divided by the mean.
[0034] Calculate the median volatility of each region by grouping by administrative region to obtain the regional difference characteristic matrix;
[0035] Extract revenue data from the company's internal financial system for the same period and merge it with transaction volume data into an n×2 matrix, where n is the number of time points;
[0036] sklearn.decomposition.PCA was used to perform principal component analysis on the matrix and the first principal component score was extracted as the synchronization component;
[0037] Calculate the 60-day moving variance of the synchronization component, and multiply the inverse of the variance by 100 as the stability indicator of the demand driver factor;
[0038] When the volatility of any region exceeds the preset threshold, the ratio of the regional volatility to the global median is used as an adjustment coefficient to perform a linear weighted correction on the synchronization component;
[0039] K-means clustering was used to jointly group the regional difference feature matrix and stability index, and the number of clusters was determined by the elbow rule;
[0040] The cluster center coordinates are normalized and used as weight vectors to perform regional weighting on the revised demand driving factors;
[0041] The final output contains a triple data table of weighted demand drivers, regional cluster labels, and raw volatility, which serves as the basis for the quantitative model.
[0042] In the above method, if the trading volume volatility in the revenue stability indicator exceeds a preset threshold, the revenue data is processed to generate a smoothed revenue fluctuation series. The processing of the revenue data includes separating the cyclical characteristics of the revenue data from the impact of abnormal transactions through time series decomposition technology, and using a weighted moving average algorithm to smooth records with low data alignment accuracy. The specific process is as follows:
[0043] Obtain transaction volume time series data, calculate its 30-day rolling standard deviation, and set three times the standard deviation as the preset threshold;
[0044] When the trading volume fluctuation exceeds the preset threshold, the STL decomposition technology is used, and the period parameter is set to 7 days to decompose the trend term, the period term, and the residual term.
[0045] Extract abnormal transaction data points that exceed the 3σ range from the residual term, and calculate the difference between the maximum and minimum values as the fluctuation range;
[0046] The window size of the weighted moving average is determined to be 5 days based on the 75th percentile of the fluctuation range, and the weight vector is distributed in proportion to the inverse of the distance from the current time point;
[0047] Apply weights to records with accuracy below 80% in the original income fluctuation series to generate an initial version of the smoothed fluctuation series;
[0048] Calculate the timestamp offset between the smoothed sequence and the original sequence. If the offset exceeds 5% of the data collection interval, perform linear interpolation correction on two data points before and after the offset point, and output the aligned fluctuation sequence.
[0049] The maximum daily fluctuation amplitude and average daily fluctuation amplitude were extracted from the aligned sequences as features. The sequences were divided into three groups using K-means clustering, and the number of cluster centers was determined by the elbow rule.
[0050] According to the clustering labels, the weight of abnormal transactions in the high volatility group is reduced by 30%, the weight of the medium volatility group remains unchanged, and the weight of the low volatility group is increased by 20%, and the final smoothed income fluctuation series is output.
[0051] The above method generates a market price sensitivity index reflecting market risk exposure using market price data from an external market database, including calculating price fluctuations and regional market differences, combining it with revenue data from a core financial indicator set, and using principal component analysis to extract the principal components of price fluctuation and revenue synchronization. The specific process is as follows:
[0052] Obtain market price and revenue data from an external market database and calculate the daily volatility of the market price. The daily volatility is calculated by dividing the difference between the daily closing price and the previous day's closing price by the previous day's closing price.
[0053] Based on the daily volatility, the rolling standard deviation of price fluctuations is calculated. The calculation window of the rolling standard deviation is set to 30 days. If the standard deviation exceeds the preset threshold, it is marked as a high volatility point, and a high volatility point set is obtained;
[0054] We extract records aligned with high volatility points from the revenue data and use principal component analysis (PCA) to calculate the principal components of price fluctuations and revenue records. PCA is implemented using the Python sklearn library. We select the first two principal components to obtain the principal component vector.
[0055] Calculate the principal component score of each regional market through the principal component vector. The principal component score is obtained by multiplying the principal component vector and the original data to determine the price sensitivity ranking of the regional market.
[0056] Based on the price sensitivity ranking, we obtain the income data of highly sensitive regions and calculate the correlation coefficient between it and market price fluctuations. The correlation coefficient is calculated using the Pearson correlation coefficient to obtain a set of correlation coefficients.
[0057] Based on the set of correlation coefficients, a weighted average method is used to calculate the comprehensive market price sensitivity index. The weight of the weighted average is set according to the revenue share of each regional market to generate the final index value;
[0058] If the time series of the final indicator value is missing, the missing points are filled by linear interpolation, which is implemented using Python's pandas library to obtain a complete market price sensitivity indicator series.
[0059] The above method generates a financial correlation graph structure including edge weights between nodes based on the core financial indicator set, revenue stability indicator, and market price sensitivity indicator. It includes using graph neural network technology to build a feature correlation relationship model and using a node embedding method to capture the dependency between revenue synchronization and trading volume volatility. The specific process is as follows:
[0060] Obtain time series data from a core set of financial indicators, revenue stability data, and market price sensitivity data. Using data alignment methods, merge data from different sources based on timestamps to obtain a unified time series dataset.
[0061] Using a standardization method, the core financial indicators, revenue stability data, and market price sensitivity data in the unified time series data set are normalized by subtracting the mean and dividing by the standard deviation to obtain a standardized data set;
[0062] The core financial indicators, income stability data, and market price sensitivity data in the standardized data set are used as node features, and the adjacency matrix is used to represent the initial edge weights between nodes to obtain the initial financial association graph;
[0063] By aggregating node neighbor information, the dependency between revenue synchronization and trading volume volatility is calculated to obtain the updated node embedding vector.
[0064] Based on the updated node embedding vectors, the dynamic changes in the edge weights between nodes are calculated. The cosine similarity method is used to determine the correlation strength between revenue synchronization and trading volume volatility, resulting in an optimized financial correlation graph.
[0065] If there are isolated nodes in the optimized financial correlation graph, the connections with edge weights lower than the threshold are removed based on the preset threshold, and the edge weights between nodes are recalculated to obtain the final financial correlation graph;
[0066] By traversing the final financial correlation graph, extracting the edge weights between nodes, generating structured data containing the dependency relationship between revenue synchronization and trading volume volatility, and determining the financial correlation feature set.
[0067] The above method, if the edge weight in the financial association graph structure exceeds a preset threshold, is processed to generate a node-level risk set reflecting the impact of abnormal transactions, including using an attention mechanism to allocate more computing resources to high-weight edges related to transaction volume volatility and revenue synchronization, and calculating the dynamic risk contribution of each node through weighted aggregation. The specific process is as follows:
[0068] Obtain edge weight data from the financial correlation graph, compare it with the preset threshold, and filter out the high-weight edge set that exceeds the threshold;
[0069] The weighted average method is used to calculate the Pearson correlation coefficient of trading volume volatility and revenue synchronization to obtain the weight value of each high-weight edge;
[0070] The weight value is combined with the trading volume volatility, and the weighted average method is used to calculate the dynamic risk value of each node under the influence of high-weight edges;
[0071] Based on the dynamic risk value and income synchronization data, nodes with dynamic risk values greater than a preset threshold are set as abnormal transaction nodes, and a preliminary set of abnormal transaction nodes is obtained;
[0072] Obtain neighbor node data of abnormal transaction nodes from the financial association graph,
[0073] The weighted average method is used to calculate the risk transfer effect of neighbor nodes on abnormal transaction nodes and determine the updated node risk value;
[0074] Traverse the updated node risk values and combine them with node-level attributes to generate a node-level risk set that includes the impact of abnormal transactions;
[0075] If there are isolated nodes in the node-level risk set, the nodes with dynamic risk values lower than the threshold are eliminated through the preset threshold to obtain the optimized risk set.
[0076] The above method generates a dynamic risk prediction sequence including the impact of abnormal transactions based on the node-level risk set, including using time series analysis technology to model the cyclical characteristics of dynamic risk contribution, and using a long short-term memory network to predict the changing trend of the income fluctuation sequence in the future time period. The specific process is as follows:
[0077] Obtain dynamic risk contribution data from the node-level risk set and use a sliding window to calculate the daily risk contribution value of each node with a window size of 7 days;
[0078] Fast Fourier transform is performed on the dynamic risk contribution data with a sampling frequency of once a day. The first five significant periodic components are extracted to form a periodic pattern distribution.
[0079] Based on the Pearson correlation coefficient, the components with strong correlation with income fluctuations are screened from the periodic pattern distribution. The correlation coefficient threshold is set to 0.7 to obtain the income fluctuation correlation series.
[0080] The income fluctuation-related series is standardized and then input into the long short-term memory network. The input dimension is 30 days of historical data, and the output dimension is the predicted value for the next 30 days. The future trend prediction model is trained.
[0081] The future trend prediction model is used to calculate the risk value sequence of each node in the next 30 days. The risk contribution of the node in the past 90 days is normalized and weighted, with the weight being the proportion of historical contribution. After fusion, a preliminary risk prediction value is generated;
[0082] Extract abnormal impact data from historical abnormal transaction records, including abnormal transaction amount, frequency, and time interval;
[0083] If the node prediction value exceeds 1.5 times the median of the preset threshold, it is marked as a high-risk node, forming a high-risk node set;
[0084] Extract transaction link data between nodes from the high-risk node set and construct a directed weighted network, where the edge weight is the logarithm of the transaction amount;
[0085] The PageRank algorithm is used to calculate the importance of nodes, and the risk transfer matrix is generated after 10 iterations;
[0086] Multiply the risk transfer matrix with the preliminary forecast sequence to update the node risk value;
[0087] Perform mean smoothing on the updated sequence with a window size of 7 days to obtain the optimized dynamic risk prediction sequence;
[0088] The three features of abnormal transaction amount, frequency and time interval are extracted from the optimized sequence, and principal component analysis is performed. The two principal components with cumulative contribution rates exceeding the threshold are retained to generate the final prediction sequence.
[0089] The above method, if the risk value at a certain time point in the dynamic risk prediction sequence exceeds a preset warning threshold, identifies high-risk points driven by abnormal transactions, and generates a set of early warning signals containing timestamps and regional market differences, including:
[0090] Through the dynamic risk prediction sequence, we obtain the time point data that exceeds the preset warning threshold, and use the isolation forest algorithm to process the time point data to obtain the high-risk point set driven by abnormal transactions;
[0091] Extract timestamp information from the high-risk point set, match the regional market data with the timestamp information, and obtain the regional market difference distribution;
[0092] A weighted average method is used to integrate the high-risk point set and regional market difference distribution. The weights are determined according to the historical transaction frequency to obtain a preliminary warning signal sequence.
[0093] Extract abnormal transaction features from the preliminary warning signal sequence, process them using principal component analysis, and obtain an optimized warning signal set;
[0094] If the strength of a signal in the optimized early warning signal set exceeds the preset threshold, a corresponding signal identifier is generated through the timestamp and regional market data to obtain a marked signal set;
[0095] Obtain the time series data associated with high-risk points from the marked signal set, adjust the time series data using the mean smoothing method, and use a fixed-period smoothing window to obtain a smoothed dynamic risk series.
[0096] The final early warning signal set including timestamps and regional market differences is generated through the smoothed dynamic risk series.
[0097] The technical solution provided by the embodiment of the present invention may have the following beneficial effects:
[0098] The present invention discloses a dynamic risk warning method based on multi-source financial data. This method constructs a standardized multi-source financial data set by integrating data from the company's internal financial system, external market databases, and industry reports. It uses principal component analysis and recursive feature elimination algorithms to extract core financial indicators, and combines trading volume and market price data to generate revenue stability and market price sensitivity indicators. Graph neural network technology is further used to construct a financial correlation graph structure to capture the dependency between revenue synchronization and trading volume volatility. Based on this, the present invention uses time series analysis and long-short-term memory networks to predict revenue fluctuation trends, identify high-risk points, and generate risk transmission paths through knowledge graph technology. Ultimately, the present invention can promptly detect the impact of abnormal transactions, provide dynamic warning reports that include regional market differences, and effectively enhance the company's financial risk management capabilities. BRIEF DESCRIPTION OF THE DRAWINGS
[0099] Figure 1 Flow chart of the method of the present invention. DETAILED DESCRIPTION
[0100] The following will describe the technical solutions in the embodiments of the present invention in detail with reference to the accompanying drawings. The described embodiments are only a part of the embodiments of the present invention.
[0101] like Figure 1 As shown, this embodiment provides an intelligent early warning method for financial risks based on multi-source data fusion, which may specifically include:
[0102] S101. Obtain revenue, cost, and profit data from the company's internal financial system, obtain transaction volume and market price data from external market databases, and obtain regional market trend data from industry reports. Use interpolation to fill in data points with a data missing rate below the preset threshold, remove records that deviate from the outlier distribution by three times the standard deviation, unify data granularity differences through a time series alignment protocol, and generate a standardized multi-source financial data set that includes a variety of financial indicators.
[0103] Revenue data, cost data, profit data, transaction volume data, and market price data were obtained from the company's internal financial system and external market database, respectively. Market trend data was extracted in conjunction with industry reports to generate a multi-source original dataset. Linear interpolation was used to address missing data in the multi-source original dataset to generate a pre-filled preliminary dataset. Outliers were detected from the preliminary dataset. If a record deviated by three times the standard deviation, the corresponding data point was removed to obtain a cleaned dataset. The cleaned dataset was processed using a timestamp-based matching method to unify the data granularity and generate an aligned time series dataset. Based on the aligned time series dataset, financial indicators containing revenue data, cost data, and profit data were calculated to obtain a standardized financial indicator set. Multiple regression analysis was used to analyze the correlation between the standardized financial indicator set and transaction volume data, market price data, and market trend data to determine the trend relationship between the multi-source data. Through this trend relationship, a multi-source financial dataset containing a variety of financial indicators was generated.
[0104] In multiple regression analysis, the F statistic is used to test the significance of the regression equation, which is expressed as follows:
[0105]
[0106] Among them, F represents the F statistic, k represents the number of independent variables, and n represents the sample size, which is used to test the significance of the regression equation. It represents the coefficient of determination and is expressed as:
[0107]
[0108] in, represents the actual observed value, represents the predicted value, represents the mean of the dependent variable, which is used to measure the goodness of fit of the regression model;
[0109] For example, obtaining multi-source data from the company's internal financial system and external market database is the key to building an analytical foundation.
[0110] For example, a company's internal financial system can provide quarterly revenue data. For example, a retail company might record revenue of 50 million yuan, costs of 30 million yuan, and profits of 20 million yuan in the first quarter of 2025. External market databases, on the other hand, provide transaction volume data, such as 100,000 units traded in the same period, with an average market price of 600 yuan per unit. Industry reports indicate a market trend of "steady growth in consumer demand." These data together constitute a multi-source raw dataset covering both financial and market dimensions. Linear interpolation is a simple and effective method for addressing missing data.
[0111] For example, if Q2 revenue data is missing but Q1 revenue is 50 million yuan and Q3 revenue is 55 million yuan, linear interpolation can be used to estimate Q2 revenue to be 52.5 million yuan. This method, based on the assumption of time series continuity, can quickly fill in the gaps, ensuring data integrity while preserving the plausibility of the trend.
[0112] In one possible implementation, the three-times standard deviation rule may be used when detecting outliers from the preliminary data set.
[0113] Specifically, if the mean transaction volume in a certain month is 80,000 pieces and the standard deviation is 10,000 pieces, records exceeding 110,000 pieces or less than 50,000 pieces will be considered abnormal and eliminated.
[0114] For example, if the transaction volume suddenly increases to 150,000 pieces in a certain month, it may be due to a system error or promotional activities. Eliminating it can avoid interference with trend analysis, and the data will be more representative after cleaning.
[0115] It should be noted that the timestamp-based matching method can unify the data granularity.
[0116] For example, if internal financial data is recorded quarterly, while market price data is provided monthly, the monthly prices can be averaged to align to the quarterly level. For example, if the prices for the first three months of the first quarter were 600, 610, and 620 yuan, the average would be 610 yuan, generating an aligned time series dataset. This approach ensures consistency across the time dimension of multi-source data, facilitating subsequent analysis. When calculating financial indicators based on this aligned time series dataset, revenue, cost, and profit data can be directly utilized.
[0117] For example, profit margin = profit / revenue. The profit margin for the first quarter of 2025 is 2000 / 5000 = 40%. After standardization, these indicators can be compared with other companies or industry averages to obtain a standardized set of financial indicators that reflect the company's relative performance.
[0118] In one embodiment, multiple regression analysis can reveal correlations between data from multiple sources.
[0119] For example, if profit margin is the dependent variable and transaction volume, market price, and market trend are the independent variables, the analysis results may show that for every 10,000 units increase in transaction volume, profit margin increases by 2%, and for every 10 yuan increase in market price, profit margin increases by 1%. This indicates that transaction volume has a more significant impact on profit margin, providing data support for companies to optimize their sales strategies.
[0120] Preferably, the multi-source financial data set generated through trend relationships can reflect the diversity of financial indicators.
[0121] For example, by combining regression results, a company can predict that if transaction volume increases to 120,000 units and the market price rises to 620 yuan, the profit margin could reach 44%, thereby generating a financial data set encompassing multiple scenarios. This approach not only enhances the data's predictive power but also provides diverse perspectives for management decision-making, helping to develop more flexible business strategies.
[0122] As you can see, the above process gradually builds a logically rigorous dataset through multi-source data integration, cleansing, alignment, and analysis. Each step is implemented with the goal of improving data quality and analytical accuracy. The resulting financial dataset not only reflects historical performance but also predicts future trends, providing solid technical support for corporate strategic adjustments.
[0123] S102. For standardized multi-source financial data sets, principal component analysis technology is used to extract the linear combination features of income, cost, and profit, calculate the variance contribution rate of each feature in the data set, and use a recursive feature elimination algorithm to eliminate redundant variables with variance contribution rates below the preset threshold to generate a core financial indicator set that includes income synchronization and cyclical characteristics.
[0124] Z-score normalization results for revenue, cost, and profit characteristics were obtained from a standardized multi-source financial dataset. Principal component analysis was used to calculate the eigenvectors and variance contributions of the standardized data, generating a preliminary feature set containing principal component scores and variance contributions. Principal components with variance contributions exceeding the threshold of 0.05 were screened, generating a streamlined feature set that retained only those with variance contributions exceeding the threshold. For the revenue principal component in the streamlined feature set, a Fourier transform was used to extract the cyclical features corresponding to the spectral peaks. The sliding window Pearson correlation coefficient was used to calculate the synchronization characteristics of inter-firm revenue fluctuations, generating a feature decomposition result containing cyclical and synchronization labels. The Spearman rank correlation coefficient was used to calculate the nonlinear correlation between cyclical and synchronization features, generating a symmetric feature correlation matrix. Based on the feature correlation matrix, the K-means clustering algorithm was used to group features. The number of clusters was determined to be three based on the maximum value of the silhouette coefficient, generating a core financial indicator set containing three categories of labels. From the core financial indicator set, the revenue growth rate, gross profit margin fluctuation, and accounts receivable turnover rate with the closest cluster center are extracted as representative indicators. The original data are merged with the principal component scores and cluster labels to generate the final data set with period synchronization marks.
[0125] In specific implementation, the Spearman correlation coefficient ρ is expressed as:
[0126]
[0127] Where ρ represents the Spearman correlation coefficient, n represents the number of samples, Represents the square of the rank difference of the i-th pair of data; this formula is used to calculate the degree of rank correlation between two variables.
[0128] For example, when obtaining the Z-score normalization results of revenue, cost, and profit from a standardized multi-source financial data set, it can be understood as converting the original data into a standard score with a mean of 0 and a standard deviation of 1.
[0129] For example, a retail company's quarterly revenue data is 50 million yuan, 52 million yuan, and 48 million yuan, with a mean of 50 million yuan and a standard deviation of 2 million yuan. The calculated Z-scores are 0, 1, and -1, respectively. This method eliminates dimensional differences and facilitates subsequent analysis of relative changes between different characteristics.
[0130] In one possible implementation, principal component analysis, when applied to standardized data, generates eigenvectors and variance contributions.
[0131] For example, after analyzing the three variables of revenue, cost, and profit, the first principal component may explain 70% of the variance, the second 20%, and the third 10%. This reflects the underlying structural information in the data, and principal components with high variance contributions retain the main fluctuation characteristics. After screening principal components with variance contributions above 0.05, only the first two may be retained, generating a streamlined feature set that facilitates focusing on key information.
[0132] Specifically, the Fourier transform of the principal components of income can be used to extract periodic features.
[0133] For example, after transforming a company's revenue data, the spectrum peaks show a 12-month cyclical fluctuation, which may be related to the annual sales peak season. This cyclical signature provides temporal support for subsequent forecasts. The sliding window Pearson correlation coefficient is used to measure revenue synchronization between companies.
[0134] For example, the revenue fluctuations of two retail companies A and B have a correlation coefficient of 0.8 within a 6-month window, indicating that the market drivers are highly consistent, thus generating a synchronization feature.
[0135] It's important to note that the Spearman rank correlation coefficient focuses on nonlinear relationships when analyzing cyclical and synchronous characteristics. Assuming that companies with strong cyclicality also have high synchronization, the correlation coefficient might reach 0.7, forming a symmetrical feature correlation matrix. This matrix intuitively demonstrates the inherent connections between features and provides a basis for clustering and grouping.
[0136] In one embodiment, K-means clustering divides the features into three categories, and the maximum value of the silhouette coefficient determines the number of groups.
[0137] For example, after clustering, one characteristic might be concentrated in companies with high revenue growth and low volatility. Representative indicators corresponding to the cluster center might include revenue growth of 10%, gross profit margin volatility of 5%, and accounts receivable turnover of 8 times per year. These indicators are combined with principal component scores and cluster labels to generate the final dataset, which clearly identifies cyclical and synchronous characteristics.
[0138] Preferably, the application value of the final data set is to support comparative analysis between enterprises.
[0139] For example, if a company discovers that its revenue growth rate is 10% lower than that of its peer cluster, this may indicate a need for sales strategy adjustments. This approach, through feature decomposition and clustering, reveals underlying patterns in the data, helping to optimize resource allocation and market response strategies.
[0140] It is understandable that the above process, from standardization to feature extraction to clustering, gradually explores the diversity of data.
[0141] For example, cyclical features can be used to predict peak season sales, while synchronous features can help identify common market risks. The resulting dataset not only reflects historical performance but also provides a foundation for dynamic decision-making.
[0142] S103. Based on the transaction volume data in the external market database, calculate the transaction volume volatility and regional market difference characteristics. Combined with the revenue data of the enterprise's internal financial system, use principal component analysis technology to extract the principal components of the synchronization of transaction volume and revenue, and generate a revenue stability indicator that reflects the demand driving factor.
[0143] Trading volume time series data was obtained from an external market database. 20-day rolling volatility was calculated at a daily granularity, with volatility being equal to the standard deviation divided by the mean. The median volatility for each region was calculated, grouped by administrative region, to generate a regional variation feature matrix. Contemporaneous revenue data was extracted from the company's internal financial system and merged with trading volume data to form an n×2 matrix, where n is the number of time points. Principal component analysis (PCA) was performed on the matrix using sklearn.decomposition.PCA, and the score of the first principal component was extracted as the synchronicity component. The 60-day moving variance of the synchronicity component was calculated, and the inverse of the variance was multiplied by 100 to serve as an indicator of the stability of the demand driver. When the volatility of any region exceeded a preset threshold of 1.5 times, the ratio of that region's volatility to the global median was used as an adjustment factor to linearly weight the synchronicity component. K-means clustering was used to jointly group the regional variation feature matrix and the stability indicator, with the number of clusters determined using the elbow rule. The normalized coordinates of the cluster centers were used as weight vectors to apply regional weighting to the modified demand driver. The final output contains a triple data table of weighted demand driving factors, regional cluster labels, and raw volatility, which serves as the basis for the quantitative model.
[0144] In specific implementation, the regional difference feature matrix is expressed as:
[0145]
[0146] in, represents the regional difference feature matrix, m represents the number of administrative regions, n represents the feature dimension, represents the median volatility of the jth feature in the i-th region; this matrix records the volatility characteristics of each region in different feature dimensions;
[0147] For example, obtaining transaction volume time series data from an external market database is a basic step in quantitative analysis.
[0148] For example, let's consider analyzing a region's wholesale agricultural product markets. A database records daily trading volumes for each market, such as the total daily tonnage of corn traded. The data is organized by date, forming a time series, such as daily trading volume records for the past year.
[0149] It should be noted that data must be cleaned to remove outliers, such as negative trading volume due to system errors, to ensure the accuracy of subsequent calculations. When calculating 20-day rolling volatility, volatility is defined as the standard deviation divided by the mean, reflecting the relative volatility of trading volume.
[0150] In one possible implementation, for a certain market's trading volume sequence, take 20 consecutive days of trading volume, calculate the standard deviation of these 20 days, and then divide it by the mean to obtain the volatility of that day.
[0151] For example, a market's 20-day trading volume average is 1,000 tons, its standard deviation is 200 tons, and its volatility is 0.2. A daily rolling calculation forms a volatility time series. This volatility reflects market uncertainty and helps identify periods of active or anomalous trading. Calculating the median volatility by administrative region helps capture regional differences.
[0152] Specifically, assuming the country is divided into several regions, such as North China and East China, each containing multiple markets, after calculating the daily volatility for each market, the median volatility of all markets within a region is calculated as the representative value for that region.
[0153] For example, the median volatility for a given day in North China was 0.15, while that in East China was 0.25, reflecting higher uncertainty in trading in the East China market. The median volatility for all regions forms a feature matrix, with rows corresponding to the number of time points and columns corresponding to the number of regions. This matrix intuitively illustrates the differences in trading patterns between regions and provides a basis for subsequent analysis. Revenue data extracted from internal corporate financial systems and combined with trading volume to form the matrix captures the correlation between market activity and financial performance.
[0154] In one embodiment, a financial system provides daily revenue data, such as corn sales revenue in a market. Transaction volume and revenue are aligned by date to form an n×2 matrix, where n is the number of time points.
[0155] For example, the trading volume on a certain day is 1,000 tons and the revenue is 500,000 yuan, which is a row of the matrix.
[0156] The data should preferably be normalized to eliminate dimensional differences. This matrix provides a comprehensive perspective for subsequent principal component analysis, which is used to extract the components that correlate with the synchronicity between trading volume and revenue.
[0157] For example, applying principal component analysis to an n×2 matrix extracts the first principal component score, which represents the shared trend between trading volume and revenue. For example, if the score is 0.8 on a given day, this indicates a high degree of synchronization between trading volume and revenue. This synchronization component reflects the core drivers of market demand and helps predict market trends. Calculate the 60-day moving average of the synchronization component and multiply its inverse by 100 to obtain an indicator of the stability of the demand driver.
[0158] In one embodiment, a 60-day window with a variance of 0.01, an inverse of 100, and a stability index of 10,000 indicates a relatively stable demand driver. A high stability index indicates a more reliable market demand forecast. When the volatility of a region exceeds 1.5 times the global median, a correction to the synchronization component is required.
[0159] Assuming the global median volatility is 0.2 and a region's volatility is 0.4, exceeding the 1.5-fold threshold of 0.3, the ratio of the volatility in that region to the global median is set to 2, which serves as an adjustment factor. The synchronization component is linearly weighted by 2, amplifying the influence of that region. This correction enhances the model's sensitivity to outliers. K-means clustering is used to group the regional difference feature matrix and stability indicators, with the number of clusters determined using the elbow rule.
[0160] For example, if the elbow rule indicates that three clusters are optimal, the cluster center coordinates are normalized and used as weight vectors. Assume that a cluster center has a weight of 0.4, which is used to weight the modified demand driver. This clustering reveals differences in demand patterns between regions, improving the model's relevance. The final output is a triplet data table containing the weighted demand driver, regional cluster label, and raw volatility.
[0161] For example, the data for a particular day might include a factor value of 100, a Huabei label, and a volatility of 0.15. This data table provides a multi-dimensional perspective for quantitative models, supporting accurate market forecasting and decision-making.
[0162] S104. If the trading volume volatility in the revenue stability indicator exceeds the preset threshold, the time series decomposition technology is used to separate the cyclical characteristics of the revenue data from the impact of abnormal transactions, and the weighted moving average algorithm is used to smooth the records with low data alignment accuracy to generate a smoothed revenue fluctuation series.
[0163] Trading volume time series data is obtained, and its 30-day rolling standard deviation is calculated, with three times the standard deviation set as the preset threshold. When trading volume fluctuations exceed the preset threshold, the STL decomposition technique is used with a 7-day period parameter to decompose the data into trend, cycle, and residual terms. Anomalous trading data points outside the 3σ range are extracted from the residual term, and the difference between the maximum and minimum values is calculated as the fluctuation range. A weighted moving average window size of 5 days is determined based on the 75th percentile of the fluctuation range, with the weight vector distributed proportionally to the inverse of the distance from the current time point. Records with accuracy below 80% in the original revenue fluctuation series are weighted to generate an initial version of the smoothed fluctuation series. The timestamp offset between the smoothed series and the original series is calculated. If the offset exceeds 5% of the data collection interval, two data points before and after the offset are linearly interpolated to produce the aligned fluctuation series. The daily maximum and average fluctuation ranges are extracted from the aligned series as features. K-means clustering is used to partition the series into three groups, with the number of cluster centers determined using the elbow rule. According to the clustering labels, the weight of abnormal transactions in the high volatility group is reduced by 30%, the weight of the medium volatility group remains unchanged, and the weight of the low volatility group is increased by 20%, and the final smoothed income fluctuation series is output.
[0164] For example, acquiring time series data on trading volume is the starting point for analyzing market dynamics. For example, let's consider a regional grain wholesale market. The database records daily corn trading volume, forming a time series, such as daily tonnage traded over the past year. This data needs to be cleaned to remove invalid records, such as negative trading volumes. The 30-day rolling standard deviation is then calculated to reflect trading volume fluctuations.
[0165] For example, if the standard deviation of trading volume within a 30-day window is 150 tons, we can set three times the standard deviation, or 450 tons, as the preset threshold to detect abnormal fluctuations. This threshold setting makes it easier to capture significant market fluctuations.
[0166] In one possible implementation, when trading volume fluctuations exceed 450 tons, the data is analyzed using the STL decomposition technique. STL decomposition uses a 7-day period to break down the data into trend, cycle, and residual terms. The trend term reflects long-term changes in trading volume, the cycle term captures regular weekly fluctuations, and the residual term incorporates random perturbations.
[0167] For example, if the weekly residuals show a deviation from normal fluctuations on a particular day, we can identify points where the residuals exceed 3σ as abnormal trading points. For example, suppose the residual value on a particular day is 500 tons, far exceeding the 3σ range and recorded as an abnormal point. We then calculate the difference between the maximum and minimum values of the abnormal point, for example, 600 tons, as the fluctuation range, reflecting the intensity of the abnormal trading.
[0168] Specifically, the 75th percentile of the range determines the size of the weighted moving average window. Assuming the 75th percentile in the range dataset is 400 tons, this corresponds to a window size of 5 days. The weight vector is assigned based on the inverse of the distance between time points, giving higher weight to recent data.
[0169] For example, within a 5-day window, the weights are 5 / 15, 4 / 15, 3 / 15, 2 / 15, and 1 / 15, respectively. This weighting method makes the smoothed results more closely aligned with recent market dynamics.
[0170] Preferably, weights are applied to records in the income fluctuation series with an accuracy lower than 80%.
[0171] For example, the accuracy of a certain day's income data is 70% due to incomplete records. Its weight is reduced to 0.7 to generate an initial smoothed series.
[0172] It should be noted that there may be a timestamp offset between the smoothed and original series. If the data collection interval is 1 day, the offset exceeds 5%, or 0.05 days, and correction is required.
[0173] For example, if the data for a particular day is offset by 0.1 days, we can take two points before and after the offset point, such as the revenue values from the two days before and after, and perform linear interpolation to generate an aligned sequence. This correction ensures the continuity of the time series. From the aligned sequence, we extract the maximum daily fluctuation range and the average daily fluctuation range as features.
[0174] For example, the maximum fluctuation on a certain day is 2,000 yuan and the average fluctuation is 800 yuan, which is used for subsequent clustering.
[0175] In one embodiment, K-means clustering is used to divide the series into three groups, with the number of cluster centers determined using the elbow rule. Assume that one group is a high-volatility group, containing days with significant fluctuations. After weighting is adjusted, the weight of abnormal transactions in the high-volatility group is reduced by 30%, for example, from 1 to 0.7 on a given day; the weight of the medium-volatility group remains unchanged; and the weight of the low-volatility group is increased by 20%, for example, from 1 to 1.2 on a given day. The final output is a smoothed revenue fluctuation series, reflecting more stable market demand characteristics. This weighting adjustment highlights the contribution of stable transactions and improves the reliability of the analysis.
[0176] It can be understood that the above method ensures that the sequence reflects market laws more realistically through multi-level processing, from anomaly detection to smoothing correction.
[0177] For example, if a market experiences a surge in trading volume during peak season, STL decomposition can identify anomalies and adjust weights to reduce their impact on overall volatility, making the series more suitable for long-term trend analysis. This layered processing logic provides more accurate data support for market forecasts.
[0178] S105. Calculate the price fluctuation range and regional market differences through market price data in the external market database. Combined with the revenue data in the core financial indicator set, use principal component analysis technology to extract the principal components of price fluctuation and revenue synchronization, and generate a market price sensitivity index that reflects market risk exposure.
[0179] Market price and revenue data were obtained from an external market database. Daily market price volatility was calculated. The daily volatility was calculated by dividing the difference between the daily closing price and the previous day's closing price by the previous day's closing price. Based on the daily volatility, the rolling standard deviation of price fluctuations was calculated. The rolling standard deviation calculation window was set to 30 days. If the standard deviation exceeded the preset threshold of 0.05, it was marked as a high volatility point, resulting in a set of high volatility points. Records time-aligned with high volatility points were extracted from the revenue data. Principal component analysis was used to calculate the principal components of price fluctuations and revenue records. Principal component analysis was implemented using the Python sklearn library. The first two principal components were selected to obtain a principal component vector. Based on the principal component vector, a principal component score was calculated for each regional market. The principal component score was obtained by multiplying the principal component vector with the original data. This was used to determine the price sensitivity ranking of the regional markets. To determine the price sensitivity ranking, revenue data for highly sensitive regions was obtained and the correlation coefficient between this and market price fluctuations was calculated. The correlation coefficient was calculated using the Pearson correlation coefficient, resulting in a set of correlation coefficients. Based on the set of correlation coefficients, a weighted average method is used to calculate the comprehensive market price sensitivity index. The weights of the weighted average are set according to the revenue share of each regional market to generate the final index value. If there are missing points in the time series of the final index value, linear interpolation is used to fill in the missing points. Linear interpolation is implemented using the Python pandas library to obtain a complete market price sensitivity index series.
[0180] For example, obtaining market price and revenue data from external market databases is a fundamental step in analyzing market dynamics.
[0181] For example, let's consider a regional grain wholesale market. A database provides daily corn closing prices and corresponding revenue data for the past year. For example, the daily closing price ranges from 50 to 60 yuan per ton, while the revenue data records the total revenue for each trading day. The daily volatility is calculated by dividing the difference between the current day's closing price and the previous day's closing price by the previous day's closing price.
[0182] For example, the closing price on a certain day is 55 yuan / ton, and the previous day was 50 yuan / ton. The daily fluctuation range is (55-50) / 50=0.1, which reflects the short-term price change intensity.
[0183] In one possible implementation, the rolling standard deviation is used to measure the stability of price fluctuations. A 30-day window is set, and the standard deviation of daily price fluctuations is calculated within each 30-day period. For example, if the standard deviation within a window is 0.06, exceeding the preset threshold of 0.05, the point is marked as a high volatility point.
[0184] It should be noted that the 0.05 threshold can be adjusted based on market characteristics. If the market is highly volatile, the threshold can be appropriately raised. A high volatility point cluster might include trading days in a certain month where weather conditions cause sudden price fluctuations, such as a day with a fluctuation of 0.15, significantly deviating from the normal range.
[0185] Specifically, after extracting records aligned with high volatility points from the income data, principal component analysis helps to explore the potential relationship between price and income.
[0186] Preferably, assuming a high-volatility daily income of 100,000 yuan and a price fluctuation amplitude of 0.12, principal component analysis is used to extract the first two principal components. The first principal component may reflect the common trend of price and income, while the second principal component may capture short-term disturbances. A principal component vector is generated from this data. For example, a region with a principal component score of 2.5 indicates a strong response to price changes.
[0187] In one embodiment, the price sensitivity ranking is based on principal component scores.
[0188] For example, Region A scores 2.5, while Region B scores 1.8, making Region A more sensitive. For a highly sensitive region, such as Region A, calculate the correlation coefficient between its revenue and market price fluctuations. Assume that Region A's revenue rises in tandem with price fluctuations in a given month. The correlation coefficient reaches 0.85, indicating a strong correlation. A set of correlation coefficients may include values for multiple regions, such as 0.85 and 0.65, reflecting different market characteristics.
[0189] As you can understand, the weighted average method combines these correlation coefficients to produce a comprehensive market price sensitivity index. Weights are assigned based on revenue contribution. For example, if Region A accounts for 60% of revenue, its weight would be 0.6. Assuming Region A has a correlation coefficient of 0.85 and Region B has a correlation coefficient of 0.65, the final index value might be 0.85 × 0.6 + 0.65 × 0.4 = 0.77. This approach emphasizes the contribution of major markets.
[0190] For example, if a day's data is missing in an indicator time series, linear interpolation can be used to fill the gap. For example, if the indicator value for the previous day was 0.75 and the next day was 0.79, the average of the two points for the missing day would be used to estimate the value to 0.77. This method ensures the integrity of the series and facilitates subsequent analysis. A complete series can intuitively reflect the market's overall sensitivity to price changes, providing a reliable basis for forecasting.
[0191] In one embodiment, the daily maximum fluctuation range and the average fluctuation range are used as features to further enrich the analysis.
[0192] For example, if the maximum price fluctuation on a particular day is 5 yuan / ton and the average fluctuation is 2 yuan / ton, these characteristics can be used to distinguish market conditions and improve the ability to identify abnormal fluctuations. This multi-dimensional processing enhances the practicality of the data.
[0193] S106. Based on the core financial indicator set, revenue stability indicator, and market price sensitivity indicator, graph neural network technology is used to construct a feature correlation relationship model. The node embedding method is used to capture the dependency between revenue synchronization and trading volume volatility, and a financial correlation graph structure containing edge weights between nodes is generated.
[0194] Time series data is obtained from the core financial indicator set, revenue stability data, and market price sensitivity data. Data from different sources are merged according to timestamps using data alignment methods to obtain a unified time series data set. The core financial indicators, revenue stability data, and market price sensitivity data in the unified time series data set are normalized using a standardization method. The standardized data set is obtained by subtracting the mean and dividing by the standard deviation. The core financial indicators, revenue stability data, and market price sensitivity data in the standardized data set are used as node features, and the initial edge weights between nodes are represented by an adjacency matrix to obtain an initial financial association graph. The initial financial association graph is iteratively updated.
[0195] By aggregating node neighbor information, the dependency between revenue synchronization and trading volume volatility is calculated to obtain the updated node embedding vector.
[0196] Based on the updated node embedding vectors, the dynamic changes in the edge weights between nodes are calculated. The cosine similarity method is used to determine the correlation strength between revenue synchronization and trading volume volatility, resulting in an optimized financial correlation graph.
[0197] If isolated nodes exist in the optimized financial correlation graph, connections with edge weights below the threshold are removed based on a preset threshold, and the edge weights between nodes are recalculated to obtain the final financial correlation graph. By traversing the final financial correlation graph and extracting the edge weights between nodes, structured data containing the dependency relationship between revenue synchronization and trading volume volatility is generated to determine the financial correlation feature set.
[0198] For example, when obtaining time series data from a core set of financial indicators, revenue stability data, and market price sensitivity data.
[0199] For example, consider a business scenario involving a grain wholesale market. Suppose core financial indicators include monthly profit margins, revenue stability data captures the daily fluctuation range of revenue, and market price sensitivity data reflects the daily fluctuation range of corn prices. These data may come from different systems, such as financial statements and market transaction records, and timestamps may be misaligned. Data alignment can be used to align all data to the daily level by taking the end-of-day time point.
[0200] For example, the profit margin on a certain day is 5%, the revenue fluctuation range is ±20,000 yuan, and the price fluctuation range is 0.08. These data are merged into one record by timestamp to form a unified time series dataset.
[0201] In one possible implementation, normalization is accomplished by subtracting the mean and dividing by the standard deviation. For example, if the income stability data has a mean of 50,000 yuan and a standard deviation of 10,000 yuan, and a daily income fluctuation of 60,000 yuan is normalized to 1, then the normalized value is 1. Similarly, if the price fluctuation has a mean of 0.05 and a standard deviation of 0.02, a daily fluctuation of 0.08 yuan would be normalized to 1.5. This process makes data of different dimensions comparable.
[0202] Preferably, a standardized data set can be used as node features. For example, the node feature vector of a certain day includes a profit margin of 0.5, an income stability of 1, and a price sensitivity of 1.5. The initial adjacency matrix uses correlation coefficients to represent the edge weights between nodes. For example, the correlation coefficient between two days is 0.7.
[0203] Specifically, the iterative update of the initial financial correlation graph is achieved by aggregating neighbor information. Assuming a node represents a trading day, its neighbor nodes are the two days before and after. After aggregation, the dependence of revenue synchronization and trading volume volatility is calculated.
[0204] For example, if revenue on a certain day increases as transaction volume increases, the updated node embedding vector may change from [0.5, 1, 1.5] to [0.6, 1.2, 1.8].
[0205] It's important to note that cosine similarity measures the dynamic changes in edge weights. For example, if the similarity between node embedding vectors on two dates increases from 0.7 to 0.85, this indicates a stronger correlation, making the optimized financial correlation graph more accurate.
[0206] In one embodiment, if isolated nodes exist in the optimized graph, such as if the edge weights on a given day are all below a preset threshold of 0.3, these connections are removed. After recalculation, the edge weights on two days might increase from 0.25 to 0.4, reflecting a stronger dependency. The final financial correlation graph is traversed to generate structured data. For example, if the edge weight for revenue synchronization and trading volume volatility on a given day is 0.9, indicating a high correlation between the two.
[0207] Understandably, this structured data can be used for subsequent risk assessments to identify the potential impact of fluctuations in trading volume on revenue.
[0208] For example, if trading volume surges on a particular day within a particular month, and the edge weight shows a 0.95 synchronization with revenue, this suggests the market is highly sensitive to changes in trading volume. This analysis can help adjust strategies in advance.
[0209] In one embodiment, the feature set can be expanded to include multi-day trends. For example, edge weights for three consecutive days are 0.8, 0.85, and 0.9, respectively, reflecting a gradually increasing dependency. This multi-dimensional approach provides a more comprehensive perspective for analyzing market dynamics, helping to optimize resource allocation and respond to market fluctuations.
[0210] S107. If the edge weight in the financial correlation graph structure exceeds a preset threshold, an attention mechanism is used to allocate more computing resources to high-weight edges related to the synchronization of trading volume volatility and revenue. The dynamic risk contribution of each node is calculated through weighted aggregation to generate a node-level risk set that reflects the impact of abnormal transactions.
[0211] Edge weight data is obtained from the financial correlation graph and compared with a preset threshold to filter out high-weight edges exceeding the threshold. Using this set of high-weight edges as input, a weighted average method is used to calculate the Pearson correlation coefficient between trading volume volatility and revenue synchronization, yielding the weight of each high-weight edge. The weights are combined with trading volume volatility, and a weighted average method is used to calculate the dynamic risk value of each node under the influence of high-weight edges. Based on the dynamic risk value and revenue synchronization data, nodes with dynamic risk values exceeding a preset threshold are designated as abnormal trading nodes, yielding a preliminary set of abnormal trading nodes. Neighbor node data of abnormal trading nodes is obtained from the financial correlation graph, and a weighted average method is used to calculate the risk transmission effect of these neighboring nodes on the abnormal trading nodes, determining an updated node risk value. The updated node risk values are traversed and combined with node-level attributes to generate a node-level risk set that includes the impact of abnormal trading. If there are isolated nodes in the node-level risk set, nodes with dynamic risk values below the threshold are removed using a preset threshold to obtain an optimized risk set.
[0212] For example, in a grain wholesale market scenario, when obtaining edge weight data from a financial correlation graph, one can imagine a graph structure containing multi-day trading data. Edge weights reflect the strength of correlation between trading days, such as the synchronization between trading volume and revenue on two specific days. Assuming a preset threshold of 0.6, a set of high-weight edges with edge weights exceeding 0.6 is selected. In one possible implementation, an edge weight of 0.8 on two specific days indicates a high correlation between trading volume fluctuations and revenue. These high-weight edge sets provide the core data foundation for subsequent analysis.
[0213] Specifically, when calculating the Pearson correlation coefficient, a set of high-weight edges can be used as input.
[0214] For example, consider a high-weight edge connecting two trading days. The volume volatility data represents the percentage change in daily trading volume, while the revenue synchronization data represents the relative increase or decrease in daily revenue. Using the weighted average method, edge weights of 0.8 and 0.7 correspond to the two data sets, respectively. The resulting correlation coefficient is 0.75. This indicates a strong positive correlation between volume volatility and revenue synchronization, providing a quantitative basis for risk assessment.
[0215] In one embodiment, the dynamic risk value is calculated by combining the trading volume volatility and the edge weight.
[0216] For example, if the trading volume volatility of a node is 10%, the edge weight is 0.8, and the dynamic risk value after weighted average is 8. This method amplifies the impact of trading volume fluctuations through edge weights, reflecting the potential instability of the node in the market.
[0217] Preferably, if the dynamic risk value exceeds the preset threshold of 5, it is marked as an abnormal transaction node. Assuming that the risk value on a certain day is 9, which is significantly higher than the threshold, it will be included in the preliminary abnormal node set.
[0218] It should be noted that when analyzing the risk transfer effect of neighboring nodes, the upstream and downstream impacts of abnormal transaction nodes can be considered.
[0219] For example, the neighboring nodes of an abnormal node are trading records from the two days before and after, with edge weights of 0.7 and 0.6, respectively. Through weighted averaging, the risk value of the neighboring nodes may increase from an initial 4 to 6, reflecting the diffusion effect of risk. This method helps identify hidden associated risk points.
[0220] It is understandable that when generating the node-level risk set, node attributes such as transaction frequency are combined.
[0221] For example, if an abnormal node has 10 transactions per day, significantly higher than the average of 5, its risk value would be raised to 10. After traversal, if isolated nodes are found, such as those with a daily dynamic risk value of only 2, below the threshold of 3, they are removed. The optimized risk set focuses on high-risk nodes, reducing redundant information. This approach improves the accuracy of the analysis.
[0222] In a possible implementation, the optimized risk set can be further refined.
[0223] For example, a risk value of 8 on a given day, a neighboring node risk value of 6, and an edge weight of 0.9 indicate a high risk concentration. This multi-dimensional analysis helps identify key risk points in the market and supports subsequent decision-making.
[0224] S108. Based on the node-level risk set, time series analysis technology is used to model the cyclical characteristics of dynamic risk contribution, and the changing trend of the income fluctuation series in the future time period is predicted through the long-short-term memory network to generate a dynamic risk prediction series that includes the impact of abnormal transactions.
[0225] Dynamic risk contribution data is obtained from the node-level risk set. A sliding window with a 7-day window size is used to calculate the daily risk contribution value for each node. A fast Fourier transform is performed on the dynamic risk contribution data, sampling once daily. The top five significant cyclical components are extracted to form a cyclical pattern distribution. Components strongly correlated with revenue fluctuations are screened from the cyclical pattern distribution using the Pearson correlation coefficient, with a correlation coefficient threshold of 0.7. This yields a correlation series for revenue fluctuations. This correlation series is normalized and fed into a long-short-term memory network (LSTM) with 30 days of historical data as input and 30-day forecasts as output. This training generates a future trend prediction model. The future trend prediction model is used to calculate the risk value series for each node over the next 30 days. The series is normalized and weighted by the node's risk contribution over the past 90 days, with the weight being the historical contribution percentage. This fusion generates a preliminary risk prediction value. Abnormal impact data, including abnormal transaction amount, frequency, and time interval, is extracted from historical abnormal transaction records. Nodes with predicted values exceeding 1.5 times the median of a preset threshold are marked as high-risk, forming a high-risk node set. Transaction link data between nodes is extracted from the high-risk node set, and a directed weighted network is constructed, with edge weights equal to the logarithm of the transaction amount. The risk transfer matrix is multiplied by the preliminary prediction sequence to update the node risk value. Mean smoothing is performed on the updated sequence with a 7-day window size to obtain an optimized dynamic risk prediction sequence. Three features, namely abnormal transaction amount, frequency, and time interval, are extracted from the optimized sequence. Principal component analysis is performed, and the two principal components with cumulative contributions exceeding 85% are retained to generate the final prediction sequence.
[0226] For example, when extracting dynamic risk contribution data from a node-level risk set, consider a multi-day trading network in a grain wholesale market. Dynamic risk contribution reflects the risk fluctuations of each node over a specific period of time. Assuming the contribution data for a particular trading day represents the trend of daily trading volume, a seven-day trading time series can be extracted, with, for example, trading volume volatility of 3%, 5%, 7%, 4%, 6%, 8%, and 5%, respectively. Decomposing the cyclical features using a Fourier transform might reveal a three-day fluctuation pattern, providing a cyclical basis for subsequent analysis.
[0227] In one possible implementation, when extracting revenue fluctuation-related sequences from the cyclical pattern distribution, one can focus on the synchronization between revenue and trading volume fluctuations. For example, within a three-day period, revenue changes of 2%, 4%, and 6%, respectively, are highly correlated with trading volume fluctuation trends. When training this sequence using a long short-term memory network, the network can memorize the fluctuation characteristics of the previous few days and predict revenue trends for the next three days.
[0228] For example, the forecast results show that future revenue fluctuations may be 5%, 7%, or 9%, which lays the foundation for risk prediction.
[0229] Specifically, when calculating the prediction sequence for each node and integrating dynamic contribution data, weights can be assigned based on the node's historical risk contribution. For example, suppose a node has a high historical risk contribution and a weight of 0.7, while another node has a low historical risk contribution and a weight of 0.3. After weighted averaging, the initial risk prediction value for a particular day might increase from 6 to 7.2. If the preset threshold is 7, the node is marked as high-risk. This approach enhances the reliability of predictions by leveraging historical data.
[0230] It should be noted that when extracting risk data from a set of high-risk nodes and constructing a risk transfer matrix, the mutual influence between nodes can be analyzed.
[0231] For example, if the transaction volume volatility of a high-risk node is 8%, the probability of risk transmission to neighboring nodes is 0.6, indicating that the risk may spread outward from this node.
[0232] Preferably, when the PageRank algorithm is used to calculate the association strength, the PageRank value of a node is 0.9, indicating that it is highly important in the network and requires special attention.
[0233] In one embodiment, after the forecast sequence is updated using the risk transfer matrix, a mean smoothing method is used to adjust the trend.
[0234] For example, a 7-day forecast sequence is 7, 8, 9, 8, 7, 6, 5, which may become 7.2, 7.5, 7.8 after smoothing, improving the stability of the trend.
[0235] Understandably, when extracting abnormal impact features from the optimized sequence, principal component analysis may reveal that a surge in trading volume on a particular day is the primary source of risk. The resulting forecast sequence thus more accurately reflects the impact of abnormal trading. This multi-dimensional analysis helps provide early warning of potential market risks.
[0236] For example, the risk prediction value of a node was raised from an initial value of 6 to 8, and the risk value of its neighboring nodes was affected by it and increased to 6.5. This indicates that the risk transmission effect is significant, and timely identification can help reduce losses.
[0237] In one embodiment, if the trading frequency on a particular day is unusually high, such as 15 times per day, far exceeding the average, the forecast sequence will further increase the risk value. This refined analysis increases the model's sensitivity to abnormal events and provides more powerful decision support for market managers.
[0238] S109. If the risk value at a certain time point in the dynamic risk prediction sequence exceeds the preset warning threshold, the isolation forest algorithm is used to identify high-risk points driven by abnormal transactions, and a set of early warning signals including timestamps and regional market differences is generated.
[0239] The dynamic risk prediction sequence is used to obtain time point data exceeding a preset warning threshold. This time point data is processed using the isolation forest algorithm to obtain a set of high-risk points driven by abnormal transactions. Timestamp information is extracted from the high-risk point set and matched with regional market data using this timestamp information to obtain a regional market difference distribution. A weighted average method is used to fuse the high-risk point set with the regional market difference distribution, with weights determined based on historical transaction frequencies, to obtain a preliminary early warning signal sequence. Abnormal transaction features are extracted from the preliminary early warning signal sequence and processed using principal component analysis to obtain an optimized early warning signal set. If the strength of a signal in the optimized early warning signal set exceeds a preset threshold, a corresponding signal identifier is generated using the timestamp and regional market data to obtain a labeled signal set. Time series data associated with the high-risk points is obtained from the labeled signal set. This time series data is adjusted using mean smoothing with a fixed-period smoothing window size to obtain a smoothed dynamic risk sequence. The smoothed dynamic risk sequence is then used to generate a final early warning signal set that includes timestamps and regional market differences.
[0240] For example, when using a dynamic risk prediction sequence to obtain data at time points exceeding a preset warning threshold, consider a trading network in a grain wholesale market. Assume the warning threshold is set at 7, and the predicted sequence values for a certain period are 6, 7.5, 8, and 6.5. Of these, 7.5 and 8 exceed the threshold, corresponding to the time points on days 2 and 3. When the isolation forest algorithm is used to process these time point data, the algorithm identifies anomalies based on the data distribution.
[0241] For example, the value 8 on the third day is marked as a high-risk point driven by abnormal trading because it deviates far from the average level. Finally, the high-risk point set includes the third day.
[0242] In one possible implementation, when extracting timestamp information from a set of high-risk points and matching it with regional market data, assume that the timestamp on day 3 is "2025-04-03 10:00," corresponding to Region A. Historical data analysis reveals that Region A accounts for 30% of the total network transaction volume, Region B accounts for 50%, and Region C accounts for 20%, resulting in differentiated regional market distributions. When using a weighted average fusion method, weights are based on historical transaction frequency: Region A, with a higher frequency, is assigned a value of 0.6, Region B 0.3, and Region C 0.1. A preliminary warning signal sequence might indicate a higher signal value in Region A, such as 8.2.
[0243] Specifically, when extracting abnormal trading characteristics from the preliminary warning signal sequence, assuming that trading volume surged to twice the daily average on the third day, principal component analysis revealed that trading volume was the primary driving factor. The signal strength for region A in the optimized warning signal set rose to 8.5. If the preset threshold is 8, the signal flag "2025-04-03_A_High Risk" is generated.
[0244] It should be noted that when time series data is obtained from a labeled signal set and smoothed using the mean, for example, for Region A, the 7-day series is 6, 7, 8.5, 7, 6.5, 6, and 5, with a smoothing window of 3 days. After smoothing, the value on a particular day might change from 8.5 to 7.3. This smoothed dynamic risk series is more stable, reflecting trends rather than momentary fluctuations.
[0245] Preferably, when generating the final set of warning signals, timestamps and regional differences are combined. For example, the signal for a certain day in Region A might be "2025-04-03_A_7.3." This approach reduces false positives through smoothing while preserving regional characteristics, making it easier for market managers to locate the source of risk.
[0246] In one example, if the transaction frequency in Region B on a particular day is abnormal—for example, 20 transactions per day, far exceeding the average by 5—the Isolation Forest algorithm might flag it as a high-risk point. After optimization, the signal strength exceeds the threshold, generating the label "2025-04-04_B_High-Risk." This indirectly verifies the diffusibility of risk in Region A.
[0247] It is understandable that when principal component analysis is used to extract features, if it is found that the price fluctuations and trading volumes on a certain day are abnormally synchronized, the final set of warning signals can more accurately reflect the potential risks.
[0248] For example, the risk value of region A was adjusted from 7.3 to 7.8, and the risk value of region B was affected and rose to 6.5, prompting managers to pay attention to the risk transmission effect.
[0249] For example, when incorporating regional differences, if Region C has a low trading frequency but a sudden spike to 8 signals on a given day, even after adjusting for historical weights, this still exceeds the threshold, indicating that even a small percentage could harbor hidden risks. This multifaceted analysis ensures comprehensive early warning and facilitates timely intervention in market anomalies.
[0250] S1010. For the early warning signal set, the knowledge graph technology is used to associate and map high-risk points with the core financial indicators of revenue, trading volume volatility, and market price sensitivity. The semantic reasoning algorithm is used to generate the risk transmission path from trading volume fluctuation to revenue synchronization, and a dynamic early warning report that includes regional market differences is obtained.
[0251] Using knowledge graph technology to map the correlation between high-risk points and trading volume fluctuations, a graph neural network was used to extract risk transmission paths from the knowledge graph, generating an initial transmission sequence. From this initial transmission sequence, cross-distribution data on trading volume fluctuations and market price sensitivity were extracted. Using a weighted average method, weights were set based on regional market differences, and this data was integrated to produce an adjusted transmission distribution. Based on this adjusted transmission distribution, synchronization features between revenue indicators and core financial indicators were identified, and principal component analysis was used to generate a synchronization distribution sequence. If the signal strength in the synchronization distribution sequence exceeded a preset threshold, a corresponding dynamic warning indicator was generated based on regional market difference data, resulting in a marked warning set. From this marked warning set, time-series correlation data between high-risk points and risk transmission paths was extracted. This time-series correlation data was adjusted using a moving average method to generate a smoothed transmission trend. The smoothed transmission trend was then integrated with the market price sensitivity and dynamic warning sequence, and a linear regression method was used to generate an optimized warning signal that incorporates regional market differences. Based on the optimized warning signal, matching features between the synchronization distribution and the semantic reasoning path were extracted to produce the final dynamic warning sequence.
[0252] For example, when mapping the correlation between high-risk points and trading volume fluctuations through knowledge graph technology, we can imagine a grain wholesale market trading network.
[0253] For example, a knowledge graph constructs transaction nodes, timestamps, and trading volume fluctuations as entities and relationships. A high-risk point might be a node with a sudden increase in trading volume on a particular day. When a graph neural network analyzes neighboring nodes, it might discover a strong correlation between the high-risk point at a certain point in time and the previous day's trading volume fluctuations, generating an initial transmission sequence.
[0254] For example, trading volume surged on April 2, and April 3 was marked as a high-risk point. The transmission path shows that the risk spreads from abnormal trading volume to price-sensitive nodes.
[0255] In one possible implementation, when extracting the cross-distribution data of trading volume fluctuations and market price sensitivity from the initial transmission sequence, assuming that trading volume increased by 1.5 times the daily average on April 3rd and price sensitivity increased by 20%, using a weighted average fusion method, with a weight of 0.5 for Region A, 0.3 for Region B, and 0.2 for Region C, the adjusted transmission distribution shows that Region A has a more significant risk.
[0256] It should be noted that when obtaining the synchronization characteristics of revenue indicators and core financial indicators, it is assumed that revenue grows synchronously with trading volume by 10%. The principal component analysis generates a synchronization distribution sequence, and the signal strength reaches 8.5 on April 3.
[0257] Specifically, if the preset threshold is 8 and the signal in the synchronization distribution sequence exceeds the threshold, a dynamic warning indicator (e.g., "2025-04-03_A_High Risk") is generated based on regional differences. Extracting time-series correlation data from the labeled warning set reveals an increasing trend in trading volume and risk points from April 2nd to 4th. Using a moving average to smooth the trend further, the volatility decreases from 8.5 to 7.8.
[0258] Preferably, by integrating the market price sensitivity and dynamic warning sequence through the smoothed transmission trend, linear regression predicts that the risk value of region A will rise to 8.2 on April 4, generating an optimized warning signal "2025-04-04_A_8.2".
[0259] In one embodiment, when extracting the synchronization distribution and semantic reasoning path matching features, assuming that the semantic correlation between the high-risk points in region A and the price-sensitive nodes is strong, the final dynamic warning sequence shows that the risk is transmitted from region A to region B, and the signal value of region B rises to 6.5.
[0260] It is understandable that the trading volume in region B has not reached its peak but is affected by region A, prompting managers to pay attention to potential spread.
[0261] In one embodiment, the price in region C suddenly increases to 8 on a certain day, and still exceeds the threshold after the weight adjustment, generating the label "2025-04-05_C_High Risk", indicating that regions with low proportions also need to be vigilant.
[0262] For example, when a graph neural network extracts risk transmission pathways, if it discovers that trading volume fluctuations in region A trigger price anomalies in region B, the transmission sequence can provide an early warning. When incorporating regional differences, weighting is designed based on historical trading activity to ensure signal accuracy. This multi-dimensional analysis enhances risk identification capabilities and facilitates timely intervention by market managers.
[0263] It will be apparent to those skilled in the art that the present application is not limited to the details of the exemplary embodiments described above and that the present application can be implemented in other specific forms without departing from the spirit or essential characteristics of the present application. Therefore, the embodiments should be considered in all respects as illustrative and non-restrictive, and the scope of the present application is defined by the appended claims, not the foregoing description, and all variations within the meaning and range of equivalents of the claims are intended to be included therein. Any reference sign in a claim should not be construed as limiting the claim to which it relates.
Claims
1. A financial risk intelligent early warning method based on multi-source data fusion, characterized by: The method comprises: Obtain revenue, cost, and profit data from the company's internal financial system, transaction volume and market price data from external market databases, and regional market trend data from industry reports. Pre-process the data to generate a standardized multi-source financial data set that includes a variety of financial indicators. Generate a core set of financial indicators that include revenue synchronization and cyclical characteristics based on standardized multi-source financial data sets; Generate revenue stability indicators reflecting demand drivers based on transaction volume data from external market databases; If the trading volume volatility in the revenue stability indicator exceeds the preset threshold, the revenue data is processed to generate a smoothed revenue volatility series; Generate market price sensitivity indicators that reflect market risk exposure using market price data from external market databases; Based on the core financial indicator set, income stability indicator, and market price sensitivity indicator, a financial correlation graph structure including edge weights between nodes is generated; If the edge weight in the financial association graph structure exceeds the preset threshold, it will be processed to generate a node-level risk set reflecting the impact of abnormal transactions; Generate a dynamic risk prediction sequence including the impact of abnormal transactions based on the node-level risk set; If the risk value at a certain point in time in the dynamic risk prediction sequence exceeds the preset warning threshold, the high-risk point driven by abnormal transactions is identified and a set of early warning signals containing timestamps and regional market differences is generated; For the set of early warning signals, knowledge graph technology is used to associate and map high-risk points with the core financial indicators of revenue, trading volume volatility, and market price sensitivity. Through the semantic reasoning algorithm, the risk transmission path from trading volume fluctuations to revenue synchronization is generated, and a dynamic early warning report that includes regional market differences is obtained.
2. The method according to claim 1, characterized in that The method involves obtaining revenue, cost, and profit data from the enterprise's internal financial system, transaction volume and market price data from external market databases, and regional market trend data from industry reports. The data is pre-processed to generate a standardized multi-source financial data set that includes a variety of financial indicators, including: Obtain revenue data, cost data, profit data, transaction volume data, and market price data from the company's internal financial system and external market database, respectively. Extract market trend data based on industry reports to obtain a multi-source original data set. For multi-source original data sets, linear interpolation is used to process missing data and generate a preliminary data set after filling. Outliers were detected from the preliminary data set. If the record deviated from three times the standard deviation, the corresponding data point was removed to obtain the cleaned data set; The cleaned dataset is processed through a timestamp-based matching method to unify the data granularity and generate an aligned time series dataset. Based on the aligned time series data set, calculate the financial indicators including revenue data, cost data and profit data to obtain a standardized financial indicator set; Multiple regression analysis is used to analyze the correlation between the standardized financial indicator set and transaction volume data, market price data and market trend data to determine the trend relationship between multiple source data; Through trend relationships, a multi-source financial data set containing a variety of financial indicators is generated.
3. The method according to claim 1, characterized in that The method generates a core set of financial indicators containing revenue synchronization and cyclical characteristics for a standardized multi-source financial data set. This includes extracting linear combination features of revenue, cost, and profit using principal component analysis, calculating the variance contribution rate of each feature in the data set, and eliminating redundant variables with variance contribution rates below a preset threshold using a recursive feature elimination algorithm. The specific process is as follows: Obtain Z-score normalization results for revenue, cost, and profit characteristics from a standardized multi-source financial dataset; Principal component analysis is used to calculate the eigenvectors and variance contribution rates of the standardized data, generating a preliminary feature set containing principal component scores and variance contribution rates; According to the preset threshold, the principal components with the variance contribution rate meeting the standard are screened, and a simplified feature set is generated, which only retains the principal components with the variance contribution rate higher than the threshold. For the principal components of income in the streamlined feature set, Fourier transform is used to extract the periodic features corresponding to the spectrum peaks. The sliding window Pearson correlation coefficient is used to calculate the synchronization features of income fluctuations between enterprises, generating a feature decomposition result containing periodicity and synchronization labels. The Spearman rank correlation coefficient was used to calculate the nonlinear correlation between periodicity and synchronization features, and a symmetric feature correlation matrix was generated. For the feature correlation matrix, the K-means clustering algorithm is used to group the features, the number of clusters is determined according to the maximum value of the silhouette coefficient, and a core financial indicator set containing the number of clusters is generated; From the core financial indicator set, the revenue growth rate, gross profit margin fluctuation and accounts receivable turnover rate with the closest cluster center are extracted as representative indicators. The original data are merged with the principal component scores and cluster labels to generate the final data set with period synchronization marks.
4. The method according to claim 1, wherein The aforementioned method generates a revenue stability indicator reflecting demand drivers based on transaction volume data in an external market database. This includes calculating transaction volume volatility and regional market differences, combining it with revenue data from the company's internal financial system, and using principal component analysis to extract the principal components of the synchronization between transaction volume and revenue. The specific process is as follows: Obtain trading volume time series data from an external market database and calculate multi-day rolling volatility at daily granularity. Volatility is equal to the standard deviation divided by the mean. Calculate the median volatility of each region by grouping by administrative region to obtain the regional difference characteristic matrix; Extract revenue data from the company's internal financial system for the same period and merge it with transaction volume data into an n×2 matrix, where n is the number of time points; sklearn.decomposition.PCA was used to perform principal component analysis on the matrix and the first principal component score was extracted as the synchronization component; Calculate the 60-day moving variance of the synchronization component, and multiply the inverse of the variance by 100 as the stability indicator of the demand driver factor; When the volatility of any region exceeds the preset threshold, the ratio of the regional volatility to the global median is used as an adjustment coefficient to perform a linear weighted correction on the synchronization component; K-means clustering was used to jointly group the regional difference feature matrix and stability index, and the number of clusters was determined by the elbow rule; The cluster center coordinates are normalized and used as weight vectors to perform regional weighting on the revised demand driving factors; The final output contains a triple data table of weighted demand drivers, regional cluster labels, and raw volatility, which serves as the basis for the quantitative model.
5. The method according to claim 1, characterized in that If the trading volume volatility in the revenue stability indicator exceeds a preset threshold, the revenue data is processed to generate a smoothed revenue fluctuation series. The processing of the revenue data includes separating the cyclical characteristics of the revenue data from the impact of abnormal transactions through time series decomposition technology, and using a weighted moving average algorithm to smooth records with low data alignment accuracy. The specific process is as follows: Obtain transaction volume time series data, calculate its 30-day rolling standard deviation, and set three times the standard deviation as the preset threshold; When the trading volume fluctuation exceeds the preset threshold, the STL decomposition technology is used, and the period parameter is set to 7 days to decompose the trend term, the period term, and the residual term. Extract abnormal transaction data points that exceed the 3σ range from the residual term, and calculate the difference between the maximum and minimum values as the fluctuation range; The window size of the weighted moving average is determined to be 5 days based on the 75th percentile of the fluctuation range, and the weight vector is distributed in proportion to the inverse of the distance from the current time point; Apply weights to records with accuracy below 80% in the original income fluctuation series to generate an initial version of the smoothed fluctuation series; Calculate the timestamp offset between the smoothed sequence and the original sequence. If the offset exceeds 5% of the data collection interval, perform linear interpolation correction on two data points before and after the offset point, and output the aligned fluctuation sequence. The maximum daily fluctuation amplitude and average daily fluctuation amplitude were extracted from the aligned sequences as features. The sequences were divided into three groups using K-means clustering, and the number of cluster centers was determined by the elbow rule. According to the clustering labels, the weight of abnormal transactions in the high volatility group is reduced by 30%, the weight of the medium volatility group remains unchanged, and the weight of the low volatility group is increased by 20%, and the final smoothed income fluctuation series is output.
6. The method according to claim 1, characterized in that The market price sensitivity index reflecting market risk exposure is generated by using market price data in the external market database, including calculating price fluctuations and regional market differences. Combined with the revenue data in the core financial indicator set, principal component analysis technology is used to extract the principal components of price fluctuation and revenue synchronization. The specific process is as follows: Obtain market price and revenue data from an external market database and calculate the daily volatility of the market price. The daily volatility is calculated by dividing the difference between the daily closing price and the previous day's closing price by the previous day's closing price. Based on the daily volatility, the rolling standard deviation of price fluctuations is calculated. The calculation window of the rolling standard deviation is set to 30 days. If the standard deviation exceeds the preset threshold, it is marked as a high volatility point, and a high volatility point set is obtained; We extract records aligned with high volatility points from the revenue data and use principal component analysis (PCA) to calculate the principal components of price fluctuations and revenue records. PCA is implemented using the Python sklearn library. We select the first two principal components to obtain the principal component vector. Calculate the principal component score of each regional market through the principal component vector. The principal component score is obtained by multiplying the principal component vector and the original data to determine the price sensitivity ranking of the regional market. Based on the price sensitivity ranking, we obtain the income data of highly sensitive regions and calculate the correlation coefficient between it and market price fluctuations. The correlation coefficient is calculated using the Pearson correlation coefficient to obtain a set of correlation coefficients. Based on the set of correlation coefficients, a weighted average method is used to calculate the comprehensive market price sensitivity index. The weight of the weighted average is set according to the revenue share of each regional market to generate the final index value; If the time series of the final indicator value is missing, the missing points are filled by linear interpolation, which is implemented using Python's pandas library to obtain a complete market price sensitivity indicator series.
7. The method according to claim 1, characterized in that Based on the core financial indicator set, revenue stability indicator, and market price sensitivity indicator, a financial correlation graph structure including edge weights between nodes is generated. This includes using graph neural network technology to build a feature correlation relationship model and using a node embedding method to capture the dependency between revenue synchronization and trading volume volatility. The specific process is as follows: Obtain time series data from a core set of financial indicators, revenue stability data, and market price sensitivity data. Using data alignment methods, merge data from different sources based on timestamps to obtain a unified time series dataset. Using a standardization method, the core financial indicators, revenue stability data, and market price sensitivity data in the unified time series data set are normalized by subtracting the mean and dividing by the standard deviation to obtain a standardized data set; The core financial indicators, income stability data, and market price sensitivity data in the standardized data set are used as node features, and the adjacency matrix is used to represent the initial edge weights between nodes to obtain the initial financial association graph; By aggregating node neighbor information, the dependency between revenue synchronization and trading volume volatility is calculated to obtain the updated node embedding vector. Based on the updated node embedding vectors, the dynamic changes in the edge weights between nodes are calculated. The cosine similarity method is used to determine the correlation strength between revenue synchronization and trading volume volatility, resulting in an optimized financial correlation graph. If there are isolated nodes in the optimized financial correlation graph, the connections with edge weights lower than the threshold are removed based on the preset threshold, and the edge weights between nodes are recalculated to obtain the final financial correlation graph; By traversing the final financial correlation graph, extracting the edge weights between nodes, generating structured data containing the dependency relationship between revenue synchronization and trading volume volatility, and determining the financial correlation feature set.
8. The method according to claim 1, characterized in that If the edge weight in the financial association graph structure exceeds a preset threshold, processing is performed to generate a node-level risk set reflecting the impact of abnormal transactions. This involves using an attention mechanism to allocate more computing resources to high-weight edges related to transaction volume volatility and revenue synchronization, and calculating the dynamic risk contribution of each node through weighted aggregation. The specific process is as follows: Obtain edge weight data from the financial correlation graph, compare it with the preset threshold, and filter out the high-weight edge set that exceeds the threshold; The weighted average method is used to calculate the Pearson correlation coefficient of trading volume volatility and revenue synchronization to obtain the weight value of each high-weight edge; The weight value is combined with the trading volume volatility, and the weighted average method is used to calculate the dynamic risk value of each node under the influence of high-weight edges; Based on the dynamic risk value and income synchronization data, nodes with dynamic risk values greater than a preset threshold are set as abnormal transaction nodes, and a preliminary set of abnormal transaction nodes is obtained; Obtain neighbor node data of abnormal transaction nodes from the financial association graph, The weighted average method is used to calculate the risk transfer effect of neighbor nodes on abnormal transaction nodes and determine the updated node risk value; Traverse the updated node risk values and combine them with node-level attributes to generate a node-level risk set that includes the impact of abnormal transactions; If there are isolated nodes in the node-level risk set, the nodes with dynamic risk values lower than the threshold are eliminated through the preset threshold to obtain the optimized risk set.
9. The method according to claim 1, characterized in that The above method generates a dynamic risk prediction sequence including the impact of abnormal transactions based on the node-level risk set, including modeling the periodic characteristics of the dynamic risk contribution using time series analysis technology, and predicting the changing trend of the income fluctuation sequence in the future time period through the long short-term memory network. The specific process is as follows: Obtain dynamic risk contribution data from the node-level risk set and use a sliding window to calculate the daily risk contribution value of each node with a window size of 7 days; Fast Fourier transform is performed on the dynamic risk contribution data with a sampling frequency of once a day. The first five significant periodic components are extracted to form a periodic pattern distribution. Based on the Pearson correlation coefficient, the components with strong correlation with income fluctuations are screened from the periodic pattern distribution. The correlation coefficient threshold is set to 0.7 to obtain the income fluctuation correlation series. The income fluctuation-related series is standardized and then input into the long short-term memory network. The input dimension is 30 days of historical data, and the output dimension is the predicted value for the next 30 days. The future trend prediction model is trained. The future trend prediction model is used to calculate the risk value sequence of each node in the next 30 days. The risk contribution of the node in the past 90 days is normalized and weighted, with the weight being the proportion of historical contribution. After fusion, a preliminary risk prediction value is generated; Extract abnormal impact data from historical abnormal transaction records, including abnormal transaction amount, frequency, and time interval; If the node prediction value exceeds 1.5 times the median of the preset threshold, it is marked as a high-risk node, forming a high-risk node set; Extract transaction link data between nodes from the high-risk node set and construct a directed weighted network, where the edge weight is the logarithm of the transaction amount; The PageRank algorithm is used to calculate the importance of nodes, and the risk transfer matrix is generated after 10 iterations; Multiply the risk transfer matrix with the preliminary forecast sequence to update the node risk value; Perform mean smoothing on the updated sequence with a window size of 7 days to obtain the optimized dynamic risk prediction sequence; The three features of abnormal transaction amount, frequency and time interval are extracted from the optimized sequence, and principal component analysis is performed. The two principal components with cumulative contribution rates exceeding the threshold are retained to generate the final prediction sequence.
10. The method according to claim 1, characterized in that If the risk value at a certain time point in the dynamic risk prediction sequence exceeds the preset warning threshold, the high-risk point driven by abnormal transactions is identified, and a warning signal set containing timestamps and regional market differences is generated, including: Through the dynamic risk prediction sequence, we obtain the time point data that exceeds the preset warning threshold, and use the isolation forest algorithm to process the time point data to obtain the high-risk point set driven by abnormal transactions; Extract timestamp information from the high-risk point set, match the regional market data with the timestamp information, and obtain the regional market difference distribution; A weighted average method is used to integrate the high-risk point set and regional market difference distribution. The weights are determined according to the historical transaction frequency to obtain a preliminary warning signal sequence. Extract abnormal transaction features from the preliminary warning signal sequence, process them using principal component analysis, and obtain an optimized warning signal set; If the strength of a signal in the optimized early warning signal set exceeds the preset threshold, a corresponding signal identifier is generated through the timestamp and regional market data to obtain a marked signal set; Obtain the time series data associated with high-risk points from the marked signal set, adjust the time series data using the mean smoothing method, and use a fixed-period smoothing window to obtain a smoothed dynamic risk series. The final early warning signal set including timestamps and regional market differences is generated through the smoothed dynamic risk series.
Citation Information
Patent Citations
Financial data anomaly detection method and system based on artificial intelligence
CN118673430A