Financial data intelligent management method and system based on cloud platform
By combining the improved Transformer model with differential privacy and blockchain technology, efficient, secure, and intelligent management of financial data has been achieved, solving the problems of low data utilization and insufficient security in existing technologies, and improving the accuracy and security of data analysis.
Patent Information
- Application Number
- CN202511207054.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-27
- Publication Date
- 2025-12-12
AI Technical Summary
Existing financial data management methods suffer from insufficient data utilization, low processing efficiency, inadequate intelligence and self-learning capabilities, and high data security and compliance risks, especially lacking effective mechanisms for data privacy protection and supervision.
An improved Transformer model is adopted, combined with differential privacy and blockchain to create a secure and trustworthy collaborative mechanism for financial data. Through local and global dual-scale attention mechanisms, adaptive model optimization, and differential privacy budget control, the accuracy, security, and trustworthiness of data processing are improved.
It has achieved accurate capture of short-term local fluctuations and long-term overall trends in financial data, improved the accuracy and generalization ability of data analysis, significantly enhanced data security and model calculation efficiency, and solved the problems of insufficient self-learning ability and lack of effective supervision of data processing.
Smart Images

Figure CN121120278A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data security, and particularly relates to a financial data intelligent management method and system based on a cloud platform. BACKGROUND
[0002] With the rapid development of information technology and the Internet, the scale of financial data is rapidly expanding, and a large amount of multi-source heterogeneous financial data is emerging. The traditional financial data management method has gradually been difficult to meet the current large-scale and complex scene financial data analysis requirements. The current mainstream financial data management scheme mostly adopts data warehouse and relational database for centralized storage, and uses statistical analysis tools for data processing. Although centralized storage and basic query of data are realized, there are generally problems such as low data utilization rate, low processing efficiency and insufficient intelligence.
[0003] In recent years, data analysis methods based on artificial intelligence have been gradually introduced into the field of financial data management. Among them, the data feature extraction technology based on self-attention structure has attracted much attention because it can fully utilize the long-term and short-term correlation characteristics between data sequences. For example, through a single-scale feature extraction method, the correlation between financial data sequences is captured, and data features are extracted through a fixed attention window mechanism. However, it is difficult to capture both the local fluctuation characteristics of short-period financial indicators and the overall trend characteristics of long-period indicators, resulting in low accuracy of financial data analysis and insufficient generalization ability, which cannot adapt to the complex and variable characteristics of financial data.
[0004] In addition, the existing financial data management method mostly adopts the traditional model parameter optimization mechanism, and does not fully consider the real-time influence of the change of financial data characteristics on the model training and optimization process, so the autonomous learning ability of the model is obviously insufficient. At the same time, in terms of privacy protection of financial data, the current financial data management generally lacks effective privacy protection mechanism, and sensitive data has a high risk of leakage in the analysis process, which is difficult to meet the increasingly strict data privacy compliance requirements. In addition, the traditional financial data management means lacks data calling, permission supervision and audit traceability mechanism, and cannot effectively guarantee the security, credibility and transparency of the data processing process, which is difficult to meet the increasingly strict requirements of financial data supervision.
[0005] Therefore, how to provide a financial data intelligent management method and system based on a cloud platform is a problem to be solved by those skilled in the art. SUMMARY
[0006] One objective of this invention is to propose a cloud-based intelligent financial data management method and system. Addressing the technical problems of existing financial data management methods, such as insufficient data utilization, low processing efficiency, inadequate intelligence and self-learning capabilities, and high data security and compliance risks, this invention proposes a secure and reliable collaborative mechanism for financial data based on an improved Transformer model combined with differential privacy and blockchain. Through a dual-scale attention mechanism (local and global), adaptive model optimization, and differential privacy budget control, the accuracy, security, and reliability of financial data processing are improved.
[0007] A cloud-based intelligent management method for financial data according to an embodiment of the present invention includes:
[0008] Collect raw financial data from multiple sources and heterogeneous structures, and classify and preprocess the data according to data category and sensitivity level to obtain sensitive data category classification results and data preprocessing results;
[0009] Based on the data preprocessing results, feature masking and reconstruction are performed on the unlabeled financial data to obtain preliminary feature representation data. Then, similar and dissimilar data features in the preliminary feature representation data are distinguished and reinforced to obtain financial data feature representation.
[0010] The financial data feature representations are input into the improved Transformer model to capture the local fluctuation characteristics of financial indicators in the short period and the overall change pattern and potential deep correlation characteristics of financial indicators in the long period. They are then fused in parallel to form a comprehensive financial data feature representation.
[0011] Based on the comprehensive financial data feature representation, an adaptive contrastive loss function is used to optimize and train the improved Transformer model;
[0012] Based on the classification results of sensitive data, the range of differential privacy budget values for sensitive data is determined, and the differential privacy budget is adaptively adjusted based on the optimized and improved Transformer model to obtain a privacy feature representation of financial data.
[0013] The data usage records generated during the financial data privacy feature representation and processing are uploaded to the cloud platform in real time, and the data call process and call permissions are automatically monitored and audited through smart contracts.
[0014] Optionally, the data categories include financial statement data, financial transaction data, financial audit data, financial budget data, and financial forecast data. The sensitivity levels are divided into three levels—highly sensitive, moderately sensitive, and lowly sensitive—based on the degree of risk that data leakage poses to business or personal privacy, from high to low. The data classification method involves marking the collected raw financial data with sensitivity levels and data types based on preset data sensitivity attributes and data source tags, and then performing outlier cleanup, missing value imputation, and data normalization on the marked data.
[0015] Optionally, based on the data preprocessing results, feature masking and reconstruction are performed on the unlabeled financial data to obtain preliminary feature representation data. Then, similar and dissimilar data features in the preliminary feature representation data are distinguished and reinforced through training to obtain a financial data feature representation. Specifically:
[0016] Based on the data preprocessing results, the unlabeled financial data sequence to be processed is determined, and data features are selected from the unlabeled financial data sequence for masking processing to obtain the financial data sequence.
[0017] By using financial data sequences, the data features at the masked locations are predicted and reconstructed through a context prediction mechanism to obtain the predicted and reconstructed data sequences.
[0018] The predicted and reconstructed data sequence is compared one by one with the real data sequence before masking at the corresponding location to obtain prediction error feedback information.
[0019] The first loss value corresponding to the masking prediction task is calculated based on the prediction error feedback information, and the context prediction mechanism is updated based on the first loss value to obtain preliminary feature representation data.
[0020] Positive sample data features that are sensitive to data changes are selected from the preliminary feature characterization data, and negative sample data features that differ from the positive sample data features are randomly selected from the preliminary feature characterization data to form several pairs of positive and negative samples.
[0021] The data features of each positive and negative sample pair are encoded to obtain the feature embedding vector corresponding to each positive and negative sample pair. The similarity value between the feature embedding vectors of each positive and negative sample pair is calculated to obtain the sample pair similarity calculation result.
[0022] The second loss value corresponding to the contrastive learning task is calculated based on the similarity calculation results of the sample pairs. The context prediction mechanism is updated based on the second loss value to obtain the feature representation of the financial data.
[0023] Optionally, the context prediction mechanism specifically includes:
[0024] Based on the masked financial data sequence, the self-attention weight between each masked position and the data features of other positions in the sequence is calculated, and the self-attention weights of all positions are normalized to obtain the degree of contextual association between the data features corresponding to each masked position and the data features of other positions in the sequence.
[0025] Based on the aforementioned contextual correlation, and using the unmasked data features in the sequence as a basis, the initial predicted values of the data features at the masked locations in the sequence are calculated.
[0026] The initial predicted value of the data features at the masking location is compared with the actual data features at the corresponding location before masking to obtain the prediction error value, and the first loss value corresponding to the masking prediction task is calculated based on the prediction error value.
[0027] Based on the first loss value, the gradient calculation and update optimization of the self-attention weight parameters corresponding to each location data feature in the context prediction mechanism are performed through the backpropagation algorithm.
[0028] Using the updated self-attention weight parameters, feature encoding is performed on the data features of each pair of positive and negative samples selected in the preliminary feature representation data to obtain the feature embedding vector corresponding to each pair of positive and negative samples.
[0029] Calculate the similarity value between the feature embedding vectors of each pair of positive and negative samples to obtain the sample pair similarity calculation results, and calculate the second loss value corresponding to the contrastive learning task based on the similarity calculation results;
[0030] Based on the second loss value, the self-attention weight parameters used for feature encoding in the context prediction mechanism are updated again through the backpropagation algorithm to obtain the updated context prediction mechanism.
[0031] Optionally, the step of inputting the financial data feature representations into the improved Transformer model to form a comprehensive financial data feature representation specifically involves:
[0032] Based on the characteristics of financial data, a first time window and a second time window are set.
[0033] Based on the first time window, the financial data feature representation is segmented, and the self-attention weights between each data feature in each local data segment are calculated to obtain several local attention weight matrices.
[0034] Feature aggregation is performed on each local attention weight matrix to obtain local trend features;
[0035] Based on the second time window, the financial data feature representation is segmented, and the self-attention weights between each data feature within each overall data segment are calculated to obtain several global attention weight matrices.
[0036] Feature aggregation is performed on each global attention weight matrix to obtain global trend features;
[0037] The local trend features of the short-cycle financial data and the global trend features of the long-cycle financial data are spliced and weighted in parallel fusion processing to obtain a fused attention feature representation.
[0038] Based on the aforementioned fusion attention feature representation, a comprehensive financial data feature representation is achieved through linear mapping and feature dimension adjustment.
[0039] Optionally, the improved Transformer model specifically includes a local and global dual-scale self-attention computation unit, a dual-scale attention feature adaptive fusion unit, an attention feature sparsity control unit, and an attention time window dynamic adjustment unit:
[0040] The local and global dual-scale self-attention computing unit is used to receive the feature representation of financial data and extract the attention weight features at the local and global scales in parallel using the local self-attention computing channel and the global self-attention computing channel, respectively.
[0041] The dual-scale attention feature adaptive fusion unit is used to obtain a comprehensive attention feature representation through attention weight features at the local and global scales.
[0042] The attention feature sparsification control unit is used to perform sparsification operation on the comprehensive attention feature representation based on the information entropy value of the attention weight;
[0043] The attention time window dynamic adjustment unit is used to dynamically adjust the window lengths of the first time window and the second time window in real time.
[0044] Optionally, the improved Transformer model is optimized and trained using an adaptive contrastive loss function based on the comprehensive financial data feature representation, specifically as follows:
[0045] Based on the comprehensive attention feature representation, multiple sets of positive sample feature embedding vectors that are sensitive to data changes are randomly extracted, and multiple negative sample feature embedding vectors that have significant feature differences from them are randomly selected to form multiple positive and negative sample feature pairs respectively.
[0046] For each pair of positive and negative sample feature vectors, calculate the cosine similarity between the vectors to obtain the similarity value;
[0047] For similarity values, a dynamic comparison boundary threshold function is used to differentiate between positive and negative samples, and the comparison boundary threshold for distinguishing between positive and negative samples is adjusted.
[0048] Based on the results of differential differentiation of each positive and negative sample feature pair, the value of the corresponding contrast loss sub-item for each positive and negative sample feature pair is calculated, and the preliminary loss value of the adaptive contrast loss function is obtained by performing a weighted summation on all the contrast loss sub-item values.
[0049] Based on the preliminary loss value obtained in the current training round, the loss values in the historical training rounds are processed by moving average to obtain a smoothed loss value;
[0050] Based on the degree of difference between the initial loss value and the smoothed loss value, adjust the ratio coefficient of positive and negative samples selected in the next training round and the sensitivity parameter of the dynamic contrast boundary threshold function;
[0051] The improved Transformer model parameters are optimized by performing gradient updates on all self-attention weights based on the adjusted adaptive contrastive loss function.
[0052] Optionally, the step of determining the range of differential privacy budget values for sensitive data based on the sensitive data category classification results, and adaptively adjusting the differential privacy budget based on the optimized and improved Transformer model to obtain a privacy feature representation of financial data, specifically involves:
[0053] Based on the classification results of sensitive data, the initial range of differential privacy budget values is set for highly sensitive, moderately sensitive, and lowly sensitive data respectively;
[0054] Based on the optimized and improved Transformer model parameters, the importance of each data feature in the comprehensive financial data feature representation is calculated to obtain the corresponding feature importance value.
[0055] The contribution of each data feature to the model prediction result is determined based on the feature importance value, and the data features in the comprehensive financial data feature representation are divided according to the contribution.
[0056] A dual assessment is conducted based on both the data sensitivity level and the contribution of data features, and the differential privacy budget value corresponding to each data feature is adjusted accordingly.
[0057] Based on the determined differential privacy budget value, a random noise sequence satisfying the corresponding privacy budget value is generated through a Laplace distribution;
[0058] The random noise sequence is superimposed on the corresponding data features to obtain the privacy feature representation of the financial data after superimposing random noise.
[0059] Optionally, a cloud-based intelligent management system for financial data includes:
[0060] The data acquisition and preprocessing module is used to collect multi-source heterogeneous raw financial data and classify and preprocess the data according to data category and sensitivity level.
[0061] The masking prediction and contrastive learning module is used to perform masking prediction and feature reconstruction based on the data preprocessing results, and to generate financial data feature representations with generalizability and sensitivity to data changes through contrastive learning tasks;
[0062] The improved Transformer model module is used to perform attention feature extraction, adaptive fusion and sparsification at the local and global scales based on the financial data feature representation, dynamically adjust the lengths of the first and second time windows in real time, and output a comprehensive financial data feature representation.
[0063] The model parameter optimization module is used to optimize the improved Transformer model parameters based on the comprehensive financial data feature representation through an adaptive contrastive loss function.
[0064] The differential privacy control module is used to adaptively adjust the differential privacy budget according to the category of sensitive data and the degree of contribution of data features, generate and superimpose random noise, and obtain a privacy feature representation of financial data.
[0065] The blockchain trusted collaboration module is used to upload the privacy features of financial data and the processing records to the cloud platform blockchain system, and to complete the supervision and audit traceability management of data access permissions through smart contracts.
[0066] The beneficial effects of this invention are:
[0067] (1) This invention achieves simultaneous and accurate capture of short-cycle local fluctuation features and long-cycle overall trend features of financial data by using a local and global dual-scale self-attention calculation unit and an attention feature adaptive fusion unit. This effectively improves the accuracy and generalization ability of financial data analysis and breaks through the problems of single attention scale and insufficient feature mining in the prior art.
[0068] (2) This invention realizes dynamic differential privacy budget adjustment and attention weight sparsification processing of financial data through differential privacy control module and attention feature sparsification control unit, which significantly improves data security and model calculation efficiency in financial data analysis and application process, and shows better adaptability and practical application effect in cloud platform data security management application scenarios.
[0069] (3) In terms of data security and trustworthy collaborative management, this invention effectively solves the problems of insufficient self-learning ability of financial data models and lack of effective supervision and traceability mechanism in data processing by optimizing the parameters of Transformer model through adaptive comparative loss function and combining it with blockchain trustworthy collaboration mechanism. It breaks through the technical bottleneck of insufficient intelligence and trustworthy supervision of traditional financial data management models, realizes specific and significant progress in financial data intelligent management methods and systems, and effectively improves the application level in the field of financial data intelligent analysis and security management. Attached Figure Description
[0070] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:
[0071] Figure 1 This is an overall flowchart of a cloud-based intelligent financial data management method proposed in this invention. Detailed Implementation
[0072] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.
[0073] refer to Figure 1 A cloud-based intelligent management method for financial data includes:
[0074] Collect heterogeneous raw financial data from multiple sources, classify and preprocess the raw financial data according to data category and sensitivity level, and obtain the sensitive data category classification results and data preprocessing results;
[0075] Based on the data preprocessing results, a masking prediction task is used to perform feature masking and reconstruction training on unlabeled financial data to obtain preliminary feature representation data. A contrastive learning task is then used to distinguish and reinforce similar and dissimilar data features in the preliminary feature representation data, thereby obtaining a financial data feature representation that has both generalization properties and sensitivity to data changes.
[0076] The obtained financial data feature representations are input into the improved Transformer model. The local attention mechanism captures the local fluctuation features of financial indicators in the short period to obtain local trend features. The global attention mechanism captures the overall change pattern and potential deep correlation features of financial indicators in the long period to obtain global trend features. The local trend features and global trend features are fused in parallel to form a comprehensive financial data feature representation that includes both short-term and long-term trends.
[0077] Based on the comprehensive financial data feature representation, an adaptive contrastive loss function is used to optimize and train the improved Transformer model parameters. The adaptive contrastive loss function adaptively adjusts the optimization direction of the improved Transformer model parameters according to the changes in financial data features, thereby obtaining optimized improved Transformer model parameters with self-learning capabilities.
[0078] The range of differential privacy budget values for sensitive data is determined based on the classification results of sensitive data categories. The differential privacy budget is then adaptively adjusted based on the optimized and improved Transformer model parameters. Random noise that meets the privacy budget conditions is superimposed on the comprehensive financial data feature representation to obtain a financial data privacy feature representation that meets the differential privacy protection conditions.
[0079] The data usage records generated during the processing of financial data privacy features are uploaded to the blockchain system on the cloud platform in real time. Through smart contracts, the data access process and access permissions are automatically monitored and audited to achieve trusted collaboration and secure and compliant management of financial data.
[0080] In this embodiment, the process of collecting multi-source heterogeneous raw financial data, classifying and preprocessing the raw financial data according to data category and sensitivity level, and obtaining sensitive data category classification results and data preprocessing results are as follows:
[0081] The collected multi-source heterogeneous raw financial data covers financial statement data, financial transaction data, financial audit data, financial budget data, and financial forecast data from enterprise operations.
[0082] Financial statement data includes all structured table data;
[0083] Financial transaction data includes bank account statements, payment records, accounts receivable and accounts payable details;
[0084] Financial audit data includes audit opinions, audit working papers, and audit adjustment records;
[0085] Financial budget data includes the annual financial budget plan and budget execution progress data;
[0086] Financial forecast data includes predictive indicators such as sales forecasts, cost forecasts, and profit forecasts.
[0087] Based on the potential risks that data breaches may pose to business operations or personal privacy, the sensitivity levels of the original financial data are clearly divided into three levels—highly sensitive, moderately sensitive, and low sensitive—according to their degree of risk, from highest to lowest:
[0088] Data involving customer accounts, transaction details, bank account information, etc., which may cause significant financial losses or serious privacy risks if leaked, are defined as highly sensitive data.
[0089] Data involving the disclosure of a company's profit and loss statement, cost details, audit working papers, etc., which may affect the company's operational strategy but will not directly cause serious losses, are defined as moderately sensitive data.
[0090] Data that, if disclosed, would not significantly affect a company’s operations or pose a substantial risk, such as publicly released financial budget summaries or forecast trend data, is defined as low-sensitivity data.
[0091] During data collection, data sensitivity attributes and data source labels are predefined. Sensitivity levels and data types are marked for various types of raw financial data. After data marking, data cleaning and normalization preprocessing are performed on the marked financial data. Statistical methods are used to identify and remove obviously abnormal values or records in the financial data. Missing values in the dataset are filled using the mean or median. For data characteristics of different dimensions, the min-max normalization method is used to normalize the data, so that all financial data are unified to a reasonable and calculable range.
[0092] In this embodiment, based on the data preprocessing results, feature masking and reconstruction are performed on the unlabeled financial data to obtain preliminary feature representation data. Then, similar and dissimilar data features in the preliminary feature representation data are distinguished and reinforced through training to obtain a financial data feature representation. Specifically:
[0093] Based on the data preprocessing results, the unlabeled financial data sequence to be processed is determined. A certain proportion of data features are randomly selected from the determined unlabeled financial data sequence and masked according to the set proportion. That is, the selected data features are masked and replaced with special identifiers to obtain the masked financial data sequence. The method of determining the unlabeled financial data sequence to be processed is as follows: based on the data type identifier obtained in the data preprocessing process, data sequences that have not been manually labeled or classified are selected from the financial dataset after preprocessing. The sequences that meet the preset length threshold requirement and whose data integrity is higher than the set integrity threshold are selected as the unlabeled financial data sequence to be processed.
[0094] The masked financial data sequence is input into the context prediction mechanism. Attention weights are calculated for the data features before and after the masking position of the sequence, the intrinsic relationship between the data features in the sequence is explored, and the missing data features at each masking position in the sequence are predicted and reconstructed based on the calculated context correlation degree, so as to obtain the predicted and reconstructed data sequence.
[0095] The reconstructed data sequence predicted by the context prediction mechanism is compared one by one with the real data sequence at the corresponding position before the masking process. The prediction error feedback information for each masking position is obtained by calculating the numerical difference.
[0096] After obtaining the prediction error feedback information, the first loss value corresponding to the masking prediction task is calculated based on the prediction error feedback information. Specifically, methods such as mean squared error or cross-entropy can be used to calculate the loss value. The calculated first loss value is used to update the self-attention weight parameters in the context prediction mechanism through the backpropagation algorithm, so that the features of the reconstructed sequence data can more accurately approximate the features of the real data, and finally the preliminary feature representation data after the masking prediction is completed is obtained.
[0097] After obtaining the prediction error feedback information, the first loss value corresponding to the masking prediction task is calculated based on the prediction error feedback information. Specifically, methods such as mean squared error or cross-entropy can be used to calculate the loss value. The calculated first loss value is used to update the self-attention weight parameters in the context prediction mechanism through the backpropagation algorithm, so that the features of the reconstructed sequence data can more accurately approximate the features of the real data, and finally the preliminary feature representation data after the masking prediction is completed is obtained.
[0098] By calculating the cosine similarity between data sequences and setting a threshold condition, data features with a similarity to the financial feature pattern higher than the set threshold are selected from the preliminary feature representation data as positive sample data features; then, using the same method, data features with a similarity to the positive sample data features lower than another set threshold are randomly selected from the preliminary feature representation data as negative sample data features, thus forming several pairs of positive and negative samples.
[0099] The context prediction mechanism is used to encode the data features of each positive and negative sample pair. The context prediction mechanism extracts the data features of each sample through a self-attention structure and maps them into a high-dimensional feature space to obtain the feature embedding vector corresponding to each positive and negative sample pair. The similarity value between the feature embedding vectors of each positive and negative sample pair is calculated to obtain the similarity calculation results of all positive and negative sample pairs.
[0100] Based on the obtained sample pair similarity calculation results, the second loss value corresponding to the contrastive learning task is calculated through the InfoNCE contrastive loss function, and the self-attention weight parameters of the context prediction mechanism are updated again based on the second loss value through the backpropagation algorithm, finally forming a financial data feature representation that has both generalization characteristics and data change sensitivity.
[0101] In this embodiment, the context prediction mechanism is specifically as follows:
[0102] After obtaining the masked financial data sequence, each masking position is determined one by one, and the self-attention weight between the data features of each masking position and all other positions in the sequence is calculated. The self-attention weights of all positions are then normalized to obtain the degree of contextual association between the data features corresponding to each masking position and the data features of other positions in the sequence.
[0103] The data features of each unmasked location are multiplied by the corresponding normalized self-attention weight value and then summed to obtain the initial predicted value of the data features of the masked location.
[0104] The prediction error value at each masking position is obtained by subtracting the element-wise values, and the prediction error value at all masking positions is calculated using the mean square error formula to obtain the first loss value corresponding to the masking prediction task.
[0105] By backpropagating the first loss value to calculate the gradient of each self-attention weight parameter, and using stochastic gradient descent or Adam optimization algorithm to update each self-attention weight parameter, the parameters of the context prediction mechanism can be optimized.
[0106] The data features of each sample pair are multiplied by the updated self-attention weight parameters to achieve the mapping of data features to a high-dimensional space, resulting in the feature embedding vector corresponding to each pair of positive and negative samples.
[0107] The similarity value between the feature embedding vectors of each pair of positive and negative samples is calculated by cosine similarity to obtain the sample pair similarity calculation result. The second loss value corresponding to the contrastive learning task is then calculated based on the similarity calculation result.
[0108] The InfoNCE contrastive loss function is used to calculate the similarity between each positive sample and its corresponding negative sample and form a loss value. Then, the backpropagation algorithm is used to calculate the gradient of the self-attention weight parameters used for feature encoding in the context prediction mechanism based on the second loss value and optimize and update them. This allows the context prediction mechanism to obtain further optimized self-attention weight parameters, and finally obtain a financial data feature representation that has both generalization properties and sensitivity to data changes.
[0109] In this embodiment, the step of inputting the financial data feature representations into the improved Transformer model to form a comprehensive financial data feature representation specifically involves:
[0110] Based on the characteristics of financial data, specific first and second time windows are defined, wherein:
[0111] The first time window is set at 7 days to capture local fluctuations in financial indicators within a short period.
[0112] The second time window is set at 90 days to capture the overall change patterns and potential deep correlations of financial indicators over a long period.
[0113] Based on the set first time window, the financial data feature representation is segmented into sequence data. The self-attention weights between data features within each segment are calculated for each obtained local data segment. The attention correlation score between any two data features within a segment is calculated. All attention correlation scores for each segment are normalized to obtain the local attention weight matrix corresponding to each local data segment.
[0114] The obtained local attention weight matrices are subjected to feature aggregation processing. The aggregation method is to perform a weighted average of the weights corresponding to the same data feature in each matrix to obtain a vector representing the local trend features of the data segment within a short period, thereby obtaining multiple local trend features.
[0115] Based on the set second time window, the financial data feature representation is divided into overall data segments with a longer period. The self-attention weights between data features within each overall data segment are calculated. The attention correlation score is calculated for any two data features in the overall segment. All scores are normalized to obtain the global attention weight matrix corresponding to each overall data segment.
[0116] The obtained global attention weight matrices are subjected to feature aggregation processing. The aggregation method is to perform a weighted average of the weights corresponding to the same data feature in each matrix to obtain a vector that accurately reflects the overall change pattern of long-term financial indicators and the potential deep correlation between data features, thereby obtaining multiple global trend features.
[0117] The local trend features of short-cycle financial data and the global trend features of long-cycle financial data are spliced and weighted in parallel fusion processing to obtain a fused attention feature representation.
[0118] Based on the fusion attention feature representation, a comprehensive financial data feature representation is obtained by performing matrix multiplication between a pre-trained linear mapping matrix and the fusion attention feature representation.
[0119] In this embodiment, the improved Transformer model specifically includes a local and global dual-scale self-attention computation unit, a dual-scale attention feature adaptive fusion unit, an attention feature sparsity control unit, and an attention time window dynamic adjustment unit:
[0120] The local and global dual-scale self-attention computing unit receives the financial data feature representations after the previous processing and processes them through the local self-attention computing channel and the global self-attention computing channel respectively. The local self-attention computing channel performs windowing segmentation on the financial data feature representations according to the preset first time window, and segments the continuous financial data feature sequence into short time periods. Then, within each local data segment, the standard self-attention mechanism is used to calculate the local attention weight matrix between data features one by one, capturing the details of local fluctuations of financial indicators in the short term.
[0121] The global self-attention calculation channel uses a second time window to divide the financial data feature representation into a whole window, and processes the data into fragments on a longer time scale. Similarly, the self-attention mechanism is used to calculate the global self-attention weight of the data features within each fragment, so as to fully capture the overall trend and potential correlation of financial data over a long period.
[0122] In the dual-scale attention feature adaptive fusion unit, the local self-attention weight matrix obtained from the local self-attention calculation channel and the global self-attention weight matrix obtained from the global self-attention calculation channel are linearly mapped respectively. By calculating the cosine similarity between the local attention feature vector and the global attention feature vector, the corresponding fusion weight coefficient is dynamically generated according to the magnitude of the similarity, thereby realizing the adaptive weighted fusion of the two-scale attention features and obtaining a comprehensive attention feature representation that effectively integrates short-cycle local information and long-cycle overall information.
[0123] In the attention feature sparsification control unit, the information entropy of each attention weight in the comprehensive attention feature representation is calculated and compared with the preset information entropy threshold one by one. Attention weights with information entropy less than the preset threshold are regarded as redundant features and dynamically filtered out. Only high-contribution attention weight features that are higher than or equal to the information entropy threshold are retained. After sparsification, the complexity of the attention weight matrix can be effectively reduced, the model running efficiency can be greatly improved, and key features that make significant contributions to the final analysis and prediction can be retained.
[0124] In the dynamic adjustment unit of the attention time window, the gradient of short-period local attention weight change and the gradient of long-period global attention weight change are calculated in real time. The difference between the gradient and the set gradient threshold is calculated. Based on the difference, the length of the first time window at the local scale and the second time window at the global scale are adjusted in real time. When the gradient of weight change exceeds the gradient threshold, that is, the window length is too small, the window will be adaptively increased to enhance the completeness of information capture. When the gradient of weight change is lower than the gradient threshold, that is, the window length is too long, the window will be adaptively shortened to improve the sensitivity and timeliness of feature capture.
[0125] In this embodiment, the step of optimizing and training the improved Transformer model based on the comprehensive financial data feature representation using an adaptive contrastive loss function specifically involves:
[0126] Based on the comprehensive attention feature representation, 20 sets of positive sample feature embedding vectors that are sensitive to the changing trends of financial data are randomly selected. For each positive sample feature embedding vector, 10 negative sample feature embedding vectors that are far away from the positive sample in the feature space and have significant feature differences are randomly selected from the remaining comprehensive attention feature representations to form 20 sets of positive and negative sample feature pairs.
[0127] For each pair of positive and negative sample features, calculate the cosine similarity between the feature embedding vectors.
[0128] A dynamic comparison boundary threshold function is used to differentiate the similarity values of each sample pair. Based on the distribution of all similarity values within the current training round, an optimal dynamic threshold is determined in real-time using statistical analysis. The specific calculation formula is as follows:
[0129]
[0130] Among them, T d The dynamic contrast threshold, μ, is used to distinguish positive and negative sample feature pairs in contrastive learning tasks. s σ is the average similarity value of all positive and negative sample feature pairs in the current training round. s L represents the standard deviation of the similarity values between all positive and negative sample feature pairs in the current training epoch. c L is the initial loss value calculated for the current training round. p The smoothed loss value is obtained based on the moving average of historical loss values. α is the standard deviation adjustment coefficient, β is the boundary threshold adjustment amplitude coefficient, and γ is the threshold sensitivity parameter. The effective distinction between positive and negative samples is determined based on this threshold to achieve dynamic optimization of the similarity feature space.
[0131] Based on the differentiation results, the contrastive loss sub-item value for each positive and negative sample feature pair is calculated. For each positive and negative sample pair, if the similarity value exceeds the determined dynamic threshold, a larger penalty loss is set for the loss sub-item of that sample pair; conversely, if it does not exceed the dynamic threshold, a smaller loss value is set. The loss sub-item values of all 20 sample pairs are weighted and summed to obtain the preliminary loss value of the adaptive contrastive loss function for this round. The specific calculation formula is as follows:
[0132]
[0133] Among them, L ACLThe final loss value of the adaptive contrastive loss function is used to optimize model parameters, where N is the total number of all positive and negative sample feature pairs in the current training epoch, and s i Y represents the cosine similarity value between the i-th positive and negative sample feature pairs, indicating the degree of similarity between the sample feature pairs. i Let T be the class label of the i-th sample pair, taking the value 1 when it is a positive sample pair and taking the value 0 when it is a negative sample pair. d The dynamic contrast threshold is determined in real time by the dynamic contrast threshold function and is used to dynamically distinguish between positive and negative samples. c L represents the initial loss value within the current training epoch, characterizing the current optimization level of the model. p λ is the smoothed loss value based on the moving average of historical loss values, representing the recent loss trend of the model. λ is the loss value difference adjustment coefficient, which is used to adjust the degree of influence of historical trends on the final loss value during model optimization.
[0134] The initial loss value obtained in this round is combined with the historical loss values from the last 5 rounds and then subjected to a moving average. The initial loss value and the historical loss value are multiplied by different weight coefficients and then added together to obtain a smooth loss value that can more stably reflect the training trend of the model.
[0135] Based on the numerical difference between the initial loss value and the smoothed loss value in this round, if the difference is large, it indicates that the model has not yet converged sufficiently. In this case, the positive and negative sample selection ratio coefficient for the next training round is increased, and the sensitivity parameter of the dynamic contrast boundary threshold function is increased to accelerate the model convergence speed. Conversely, if the difference is small, the positive and negative sample selection ratio coefficient is decreased, and the sensitivity parameter of the dynamic contrast boundary threshold function is reduced to stabilize the model training state.
[0136] By utilizing a dynamically adjusted adaptive contrastive loss function, gradient calculations are performed on all self-attention weight parameters in the improved Transformer model through backpropagation, and the gradient results are updated and optimized. This allows for the real-time acquisition of improved Transformer model parameters that exhibit better generalization and sensitivity to changes in financial data.
[0137] In this embodiment, the step of determining the range of differential privacy budget values for sensitive data based on the sensitive data category classification results, and adaptively adjusting the differential privacy budget based on the optimized and improved Transformer model to obtain a privacy feature representation of financial data, specifically involves:
[0138] Based on the data categories and sensitivity levels, the collected financial data were divided into three sensitivity levels: highly sensitive, moderately sensitive, and low sensitive. Initial ranges for differential privacy budgets were set for each sensitivity level: 0.1 to 0.5 for highly sensitive data, 0.5 to 1.0 for moderately sensitive data, and 1.0 to 2.0 for low sensitive data.
[0139] Based on the optimized and improved Transformer model parameters, the attention weight values corresponding to each data feature are summed, and then the summed attention weights are normalized to obtain the importance values of each data feature.
[0140] Based on the obtained data feature importance values, the contribution of each data feature to the model prediction results is determined. The contribution of data features is then divided into three levels: high contribution, medium contribution, and low contribution, according to predetermined contribution thresholds. Specifically, contribution thresholds are set at 0.7 and 0.3. Data features with a value greater than or equal to 0.7 are classified as high contribution data features, those between 0.3 and 0.7 are classified as medium contribution data features, and those less than 0.3 are classified as low contribution data features.
[0141] Based on the contribution level classification, each data feature is evaluated by combining both sensitivity level and contribution level to dynamically adjust the differential privacy budget value. Specifically, a smaller differential privacy budget value is allocated to data features with high sensitivity and high contribution to ensure strong data privacy protection; a moderate differential privacy budget value is allocated to data features with high sensitivity but medium or low contribution to balance data privacy and model accuracy; and a larger differential privacy budget value is allocated to data features with medium or low sensitivity and low contribution to improve the overall accuracy and generalization performance of the model.
[0142] Based on the specific differential privacy budget value determined for each data feature, a random noise sequence satisfying the respective differential privacy budget requirement is generated using a Laplace distribution. For data feature x... i The corresponding differential privacy budget value is denoted as ∈ i The corresponding random noise sequence added to the data features is:
[0143]
[0144] Where, Δf i Representing data feature x i In the improved Transformer model, the sensitivity to changes in data features is denoted as the sensitivity parameter of the corresponding feature, which is obtained through prior sensitivity assessment.
[0145] The generated random noise sequences are superimposed one by one onto the corresponding original data features, i.e., for data feature x i Perform the following processing:
[0146]
[0147] Obtain privacy features of financial data after random noise processing
[0148] In this embodiment, the process of uploading data usage records generated during the financial data privacy feature representation and processing to the cloud platform in real time, and using smart contracts to automatically monitor and audit the data access process and access permissions, specifically involves:
[0149] The financial data privacy feature representation sequence is used as the data subject, and all data usage records generated during the data processing are fully recorded. The data usage records include data feature call timestamp, identity information of the caller, data call permission information, specific data feature identifier of the call, description of the purpose of the data call, number of calls, call operation type, and intermediate results obtained by model inference or analysis during the call process.
[0150] The aforementioned financial data privacy feature sequence and the data usage records are uploaded to a consortium blockchain system deployed on a cloud platform via a secure communication protocol. The cloud platform is based on a distributed architecture and contains several authorized nodes, including data provider nodes, data caller nodes, third-party regulatory nodes, and auditer nodes. A consensus mechanism is used among the nodes to ensure data storage consistency and immutability. Among them, the data provider nodes are responsible for uploading and verifying the validity of the data, the data caller nodes are responsible for applying for data call permissions and executing the call operation, the third-party regulatory nodes are responsible for real-time monitoring and supervision of the data call process, and the auditer nodes are responsible for auditing and tracing the compliance and legality of the data call behavior.
[0151] The blockchain system utilizes smart contract technology to automate the monitoring and auditing of financial data privacy feature representation sequences and data usage records. Specifically, the smart contracts include a data access permission contract, a data usage monitoring contract, and a data auditing and tracing contract.
[0152] The data access permission contract is used to automate the approval and access control of data access permissions. After the data access party submits the access request, the contract automatically verifies the access party's identity information and permission level. Only when the access party's permission level meets the sensitivity level requirements corresponding to the data access characteristics will the smart contract automatically authorize the data access request.
[0153] The data usage supervision contract is used to monitor the specific operations of the data caller in real time when calling the data. The contract automatically records the calling entity, data characteristics, calling time and number of calls during the data calling process, and compares them with the calling operation specifications preset in the smart contract in real time. Once it is found that the calling operation exceeds the scope of authority or the data is not used for the prescribed purpose, an alert is automatically triggered and the corresponding data calling behavior is immediately terminated. At the same time, abnormal calling operation records are automatically generated and stored in the blockchain system in real time.
[0154] The data audit and traceability contract is used to audit all data call behaviors in real time and trace them afterward. The audit and traceability contract automatically forms a complete call chain record of the call subject's identity information, data call time, call data feature identifier, call purpose, call permission information and call intermediate results and automatically stores it on the blockchain. The chain record is stored in an encrypted block structure, thereby ensuring the immutability and transparency of the entire data call process record, and providing real-time auditing and subsequent traceability for the auditing node.
[0155] Each node in the consortium blockchain system periodically executes the PBFT algorithm to achieve consistency in the storage of data usage records, ensuring that the data records of each node are synchronized and consistent in real time. Third-party regulatory nodes and auditing nodes periodically perform compliance checks and audits on the call records stored on the blockchain, and promptly issue rectification instructions for abnormal or illegal data call behaviors found during the audit process. The rectification instructions are also automatically recorded in the blockchain by smart contracts.
[0156] In this embodiment, a cloud-based intelligent management system for financial data includes:
[0157] The data acquisition and preprocessing module is used to collect raw financial data from multiple sources and heterogeneous structures, classify and preprocess the data according to data categories and sensitivity levels, and generate sensitive data category classification results and data preprocessing results.
[0158] The masking prediction and contrastive learning module receives data preprocessing results, randomly masks data features in unlabeled financial data sequences according to a preset ratio, predicts and reconstructs data features at masked locations through a context prediction mechanism, calculates prediction error feedback information, and obtains preliminary feature representation data. It then extracts positive and negative sample feature pairs from the preliminary feature representation data, calculates similarity values, calculates the second loss value corresponding to the contrastive learning task based on the similarity values, updates the parameters of the context prediction mechanism, and outputs a financial data feature representation that simultaneously possesses generalization characteristics and data change sensitivity.
[0159] The improved Transformer model module is used to receive the financial data feature representation, extract attention weight features of local scale and global scale in parallel through local and global dual-scale self-attention computing units based on preset first and second time windows, obtain comprehensive attention feature representation through dual-scale attention feature adaptive fusion unit, perform sparsification operation through attention feature sparsification control unit, and dynamically adjust the length of the first and second time windows in real time through attention time window dynamic adjustment unit, and output a comprehensive financial data feature representation that includes both short-term and long-term trends.
[0160] The model parameter optimization module is used to optimize and train the improved Transformer model parameters using an adaptive contrastive loss function based on the comprehensive financial data feature representation, and dynamically adjust the improved Transformer model parameters according to the loss feedback of the adaptive contrastive loss function, and output the optimized improved Transformer model parameters.
[0161] The differential privacy control module is used to determine the range of differential privacy budget values corresponding to sensitive data based on the classification results of sensitive data categories, calculate the importance and contribution of data features based on the improved Transformer model parameters, adaptively adjust the differential privacy budget value corresponding to each data feature, generate a random noise sequence that meets the privacy budget value, superimpose the random noise sequence onto the corresponding data feature, and output a financial data privacy feature representation that meets the differential privacy protection conditions.
[0162] The blockchain trusted collaboration module is used to upload the data usage records generated during the processing of the financial data privacy features to the blockchain system on the cloud platform in real time. Through smart contracts deployed in the blockchain system, it automatically monitors data access permissions and audits the data operation process to complete the trusted collaboration and secure compliance management of financial data.
[0163] Example 1:
[0164] To verify the feasibility of this invention in practice, it was applied to the intelligent financial data management scenario of a large enterprise cloud platform. The invention performs intelligent predictive analysis and security management on the multi-source heterogeneous data accumulated by the enterprise in the past year, including financial statements, financial transactions, financial audits, financial budgets, and financial forecasts, in order to assist the enterprise in achieving accurate, efficient, and secure financial decision support.
[0165] In the aforementioned real-world scenarios, traditional financial data management methods typically rely on centralized data warehouses and relational databases, using only conventional statistical analysis tools for data querying and analysis. This approach is inefficient when handling large-scale, complex financial data, and lacks sufficient intelligence and accuracy in data analysis. Furthermore, due to the lack of effective privacy protection and oversight mechanisms for sensitive data, there are high compliance risks and potential data breaches, making it difficult to meet the stringent data security needs and regulatory requirements of current enterprises.
[0166] In actual implementation, the system first collects multi-source, heterogeneous raw financial data from multiple business departments within the enterprise and categorizes it according to data sensitivity levels. Then, it performs outlier cleanup and missing value imputation preprocessing. After preprocessing, the system randomly masks the unlabeled financial data and uses a context prediction mechanism to reconstruct and predict the data at the masked locations. Preliminary feature representation data is generated by calculating the prediction error.
[0167] The system then constructs positive and negative sample feature pairs based on the above data, calculates the cosine similarity between feature embedding vectors, distinguishes positive and negative samples based on a dynamically adjusted contrast boundary threshold function, and optimizes the improved Transformer model parameters using an adaptive contrast loss function, thereby generating a financial data feature representation that simultaneously possesses generalization ability and sensitivity to data changes.
[0168] The system then utilizes a dual-scale attention mechanism (local and global) to extract local fluctuation features within short periods and overall trend features within long periods of financial data, respectively. These features are then adaptively fused to form a comprehensive financial data feature representation. Furthermore, the system adaptively adjusts the differential privacy budget based on data sensitivity levels and feature contribution, and uses a Laplace distribution to generate random noise that is superimposed on the data features, thus obtaining a privacy-preserving financial data feature representation that meets privacy protection requirements.
[0169] Finally, the system uploads the aforementioned feature representations and processing records to the cloud platform blockchain in real time. Through smart contracts, it enables automatic supervision and auditing of data access permissions and operations, significantly improving the credibility, security, and compliance of financial data processing.
[0170] To visually demonstrate the practical effects of this invention, five financial indicators selected by the company are used as examples. The prediction results and measured data of the traditional method and the method of this invention are compared. The specific data are shown in Table 1.
[0171] Table 1 Comparison of Predicted and Actual Performance of Financial Indicators
[0172]
[0173] As clearly shown in Table 1, the method of this invention significantly improves the accuracy of predictions for several key financial indicators compared to traditional methods. Taking revenue as an example, the prediction error of this invention is only 120,000 yuan, while the traditional method has an error of 2.3 million yuan, demonstrating a significant improvement in accuracy. In net profit prediction, the prediction error of this invention is only 50,000 yuan, showing a clear predictive advantage compared to the 680,000 yuan error of the traditional method. In cost and expense prediction, the error of this invention is less than 100,000 yuan, while the error of the traditional method exceeds 2 million yuan. In cash flow prediction, the error of this invention is only 30,000 yuan, significantly better than the 1.05 million yuan error of the traditional method. Regarding the debt-to-equity ratio, the prediction error of this invention is controlled at 0.2%, far lower than the 1.6% of the traditional method.
[0174] Furthermore, during the model training phase, the adaptive contrast loss function of this invention, compared with the improved Transformer model, underwent 32 rounds of iterative training in model parameter optimization. The model converged and stabilized, with the prediction error reduced by approximately 87% compared to the initial state, verifying the significant effect of this invention in improving model autonomous learning and generalization capabilities. Simultaneously, through adaptive adjustment of the differential privacy budget, different differential privacy budgets were set for data features with different levels of sensitivity, achieving a dynamic and effective balance between privacy protection and analytical accuracy for financial data. Experimental results show that privacy features effectively reduced the risk of data leakage by over 92%, meeting stringent data security management requirements.
[0175] In summary, this embodiment fully verifies that the present invention can significantly improve the accuracy of data prediction, data processing efficiency, and data security and compliance in the application of intelligent financial data management, providing reliable data support and security for corporate financial decision-making, and has significant industrial application value and broad prospects for promotion and application.
[0176] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A cloud-based intelligent management method for financial data, characterized in that, include: Collect raw financial data from multiple sources and heterogeneous structures, and classify and preprocess the data according to data category and sensitivity level to obtain sensitive data category classification results and data preprocessing results; Based on the data preprocessing results, feature masking and reconstruction are performed on the unlabeled financial data to obtain preliminary feature representation data. Then, similar and dissimilar data features in the preliminary feature representation data are distinguished and reinforced to obtain financial data feature representation. The financial data feature representations are input into the improved Transformer model to capture the local fluctuation characteristics of financial indicators in the short period and the overall change pattern and potential deep correlation characteristics of financial indicators in the long period. They are then fused in parallel to form a comprehensive financial data feature representation. Based on the comprehensive financial data feature representation, an adaptive contrastive loss function is used to optimize and train the improved Transformer model; Based on the classification results of sensitive data, the range of differential privacy budget values for sensitive data is determined, and the differential privacy budget is adaptively adjusted based on the optimized and improved Transformer model to obtain a privacy feature representation of financial data. The data usage records generated during the financial data privacy feature representation and processing are uploaded to the cloud platform in real time, and the data call process and call permissions are automatically monitored and audited through smart contracts.
2. The intelligent financial data management method based on a cloud platform according to claim 1, characterized in that, The data categories include financial statement data, financial transaction data, financial audit data, financial budget data, and financial forecast data. The sensitivity levels are divided into three levels from high to low: highly sensitive, moderately sensitive, and low sensitive, based on the degree of risk that data leakage poses to business or personal privacy. The data classification method involves marking the collected raw financial data with sensitivity levels and data types based on preset data sensitivity attributes and data source tags, and then performing outlier cleanup, missing value imputation, and data normalization on the marked data.
3. The intelligent financial data management method based on a cloud platform according to claim 1, characterized in that, Based on the data preprocessing results, feature masking and reconstruction are performed on the unlabeled financial data to obtain preliminary feature representation data. Then, similar and dissimilar data features in the preliminary feature representation data are distinguished and reinforced through training to obtain financial data feature representations. Specifically: Based on the data preprocessing results, the unlabeled financial data sequence to be processed is determined, and data features are selected from the unlabeled financial data sequence for masking processing to obtain the financial data sequence. By using financial data sequences, the data features at the masked locations are predicted and reconstructed through a context prediction mechanism to obtain the predicted and reconstructed data sequences. The predicted and reconstructed data sequence is compared one by one with the real data sequence before masking at the corresponding location to obtain prediction error feedback information. The first loss value corresponding to the masking prediction task is calculated based on the prediction error feedback information, and the context prediction mechanism is updated based on the first loss value to obtain preliminary feature representation data. Positive sample data features that are sensitive to data changes are selected from the preliminary feature characterization data, and negative sample data features that differ from the positive sample data features are randomly selected from the preliminary feature characterization data to form several pairs of positive and negative samples. The data features of each positive and negative sample pair are encoded to obtain the feature embedding vector corresponding to each positive and negative sample pair. The similarity value between the feature embedding vectors of each positive and negative sample pair is calculated to obtain the sample pair similarity calculation result. The second loss value corresponding to the contrastive learning task is calculated based on the similarity calculation results of the sample pairs. The context prediction mechanism is updated based on the second loss value to obtain the feature representation of the financial data.
4. The intelligent financial data management method based on a cloud platform according to claim 3, characterized in that, The context prediction mechanism is specifically as follows: Based on the masked financial data sequence, the self-attention weight between each masked position and the data features of other positions in the sequence is calculated, and the self-attention weights of all positions are normalized to obtain the degree of contextual association between the data features corresponding to each masked position and the data features of other positions in the sequence. Based on the aforementioned contextual correlation, and using the unmasked data features in the sequence as a basis, the initial predicted values of the data features at the masked locations in the sequence are calculated. The initial predicted value of the data features at the masking location is compared with the actual data features at the corresponding location before masking to obtain the prediction error value, and the first loss value corresponding to the masking prediction task is calculated based on the prediction error value. Based on the first loss value, the gradient calculation and update optimization of the self-attention weight parameters corresponding to each location data feature in the context prediction mechanism are performed through the backpropagation algorithm. Using the updated self-attention weight parameters, feature encoding is performed on the data features of each pair of positive and negative samples selected in the preliminary feature representation data to obtain the feature embedding vector corresponding to each pair of positive and negative samples. Calculate the similarity value between the feature embedding vectors of each pair of positive and negative samples to obtain the sample pair similarity calculation results, and calculate the second loss value corresponding to the contrastive learning task based on the similarity calculation results; Based on the second loss value, the self-attention weight parameters used for feature encoding in the context prediction mechanism are updated again through the backpropagation algorithm to obtain the updated context prediction mechanism.
5. The intelligent financial data management method based on a cloud platform according to claim 1, characterized in that, The step of inputting the financial data feature representations into the improved Transformer model to form a comprehensive financial data feature representation is as follows: Based on the characteristics of financial data, a first time window and a second time window are set. Based on the first time window, the financial data feature representation is segmented, and the self-attention weights between each data feature in each local data segment are calculated to obtain several local attention weight matrices. Feature aggregation is performed on each local attention weight matrix to obtain local trend features; Based on the second time window, the financial data feature representation is segmented, and the self-attention weights between each data feature within each overall data segment are calculated to obtain several global attention weight matrices. Feature aggregation is performed on each global attention weight matrix to obtain global trend features; The local trend features of the short-cycle financial data and the global trend features of the long-cycle financial data are spliced and weighted in parallel fusion processing to obtain a fused attention feature representation. Based on the aforementioned fusion attention feature representation, a comprehensive financial data feature representation is achieved through linear mapping and feature dimension adjustment.
6. The intelligent financial data management method based on a cloud platform according to claim 5, characterized in that, The improved Transformer model specifically includes a local and global dual-scale self-attention computation unit, a dual-scale attention feature adaptive fusion unit, an attention feature sparsity control unit, and an attention time window dynamic adjustment unit: The local and global dual-scale self-attention computing unit is used to receive the feature representation of financial data and extract the attention weight features at the local and global scales in parallel using the local self-attention computing channel and the global self-attention computing channel, respectively. The dual-scale attention feature adaptive fusion unit is used to obtain a comprehensive attention feature representation through attention weight features at the local and global scales. The attention feature sparsification control unit is used to perform sparsification operation on the comprehensive attention feature representation based on the information entropy value of the attention weight; The attention time window dynamic adjustment unit is used to dynamically adjust the window lengths of the first time window and the second time window in real time.
7. The intelligent financial data management method based on a cloud platform according to claim 1, characterized in that, The improved Transformer model, based on comprehensive financial data feature representation, is optimized and trained using an adaptive contrastive loss function, specifically as follows: Based on the comprehensive attention feature representation, multiple sets of positive sample feature embedding vectors that are sensitive to data changes are randomly extracted, and multiple negative sample feature embedding vectors that have significant feature differences from them are randomly selected to form multiple positive and negative sample feature pairs respectively. For each pair of positive and negative sample feature vectors, calculate the cosine similarity between the vectors to obtain the similarity value; For similarity values, a dynamic comparison boundary threshold function is used to differentiate between positive and negative samples, and the comparison boundary threshold for distinguishing between positive and negative samples is adjusted. Based on the results of differential differentiation of each positive and negative sample feature pair, the value of the corresponding contrast loss sub-item for each positive and negative sample feature pair is calculated, and the preliminary loss value of the adaptive contrast loss function is obtained by performing a weighted summation on all the contrast loss sub-item values. Based on the preliminary loss value obtained in the current training round, the loss values in the historical training rounds are processed by moving average to obtain a smoothed loss value; Based on the degree of difference between the initial loss value and the smoothed loss value, adjust the ratio coefficient of positive and negative samples selected in the next training round and the sensitivity parameter of the dynamic contrast boundary threshold function; The improved Transformer model parameters are optimized by performing gradient updates on all self-attention weights based on the adjusted adaptive contrastive loss function.
8. The intelligent financial data management method based on a cloud platform according to claim 1, characterized in that, The process involves determining the range of differential privacy budget values for sensitive data based on the sensitive data category classification results, and adaptively adjusting the differential privacy budget based on the optimized and improved Transformer model to obtain a privacy feature representation of financial data. Specifically: Based on the classification results of sensitive data, the initial range of differential privacy budget values is set for highly sensitive, moderately sensitive, and lowly sensitive data respectively; Based on the optimized and improved Transformer model parameters, the importance of each data feature in the comprehensive financial data feature representation is calculated to obtain the corresponding feature importance value. The contribution of each data feature to the model prediction result is determined based on the feature importance value, and the data features in the comprehensive financial data feature representation are divided according to the contribution. A dual assessment is conducted based on both the data sensitivity level and the contribution of data features, and the differential privacy budget value corresponding to each data feature is adjusted accordingly. Based on the determined differential privacy budget value, a random noise sequence satisfying the corresponding privacy budget value is generated through a Laplace distribution; The random noise sequence is superimposed on the corresponding data features to obtain the privacy feature representation of the financial data after superimposing random noise.
9. A cloud-based intelligent management system for financial data, comprising executing the cloud-based intelligent management method for financial data as described in any one of claims 1 to 8, characterized in that, include: The data acquisition and preprocessing module is used to collect multi-source heterogeneous raw financial data and classify and preprocess the data according to data category and sensitivity level. The masking prediction and contrastive learning module is used to perform masking prediction and feature reconstruction based on the data preprocessing results, and to generate financial data feature representations with generalizability and sensitivity to data changes through contrastive learning tasks; The improved Transformer model module is used to perform attention feature extraction, adaptive fusion and sparsification at the local and global scales based on the financial data feature representation, dynamically adjust the lengths of the first and second time windows in real time, and output a comprehensive financial data feature representation. The model parameter optimization module is used to optimize the improved Transformer model parameters based on the comprehensive financial data feature representation through an adaptive contrastive loss function. The differential privacy control module is used to adaptively adjust the differential privacy budget according to the category of sensitive data and the degree of contribution of data features, generate and superimpose random noise, and obtain a privacy feature representation of financial data. The blockchain trusted collaboration module is used to upload the privacy features of financial data and the processing records to the cloud platform blockchain system, and to complete the supervision and audit traceability management of data access permissions through smart contracts.