Financial artificial intelligence integration method based on block chain
By adopting blockchain technology and smart contracts in the field of financial artificial intelligence, the problems of data security, algorithm integration complexity, scalability and transparency are solved, and higher security, integration efficiency and transparency are achieved.
Patent Information
- Application Number
- CN202411475289.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-22
- Publication Date
- 2025-02-18
AI Technical Summary
Current financial artificial intelligence algorithms have challenges in data security and privacy protection, the complexity of algorithm integration, scalability and verifiability, and execution transparency and traceability.
Adopting a blockchain-based financial artificial intelligence integration method, an open algorithm library is provided by building smart contracts on the blockchain platform, using homomorphic encryption and zero-knowledge proof technology, modular design and distributed ledger technology application and dynamic optimization mechanism.
Improve data security and privacy protection, simplify algorithm integration and management processes, enhance algorithm scalability and verification, and improve execution transparency and traceability.
Smart Images

Figure CN119475414A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of financial technology, and in particular to a financial artificial intelligence integration method based on blockchain. Background Art
[0002] In recent years, with the increasing complexity and diversity of financial markets, the demand for artificial intelligence (AI) technology in financial analysis and decision-making has continued to grow. Traditional financial analysis methods have been unable to handle large-scale and complex financial data, so the application of financial artificial intelligence algorithms in forecasting, risk management, asset allocation, etc. has become more and more common. However, the current application and integration of financial artificial intelligence algorithms faces the following challenges:
[0003] 1. Data security and privacy protection: Financial data usually involves a large amount of sensitive information, such as customer transaction records, investment portfolios, etc. How to protect the security and privacy of this data during algorithm execution becomes an important issue.
[0004] 2. Complexity of algorithm integration: In actual applications, financial institutions often need to integrate multiple different algorithms to complete complex tasks. These algorithms may involve multiple aspects such as prediction, risk assessment, and asset allocation, but they are usually designed by different development teams and use different implementation technologies. How to effectively integrate and manage these algorithms is an important technical challenge.
[0005] 3. Algorithm scalability and verifiability: As the market changes, financial artificial intelligence algorithms need to be constantly updated and optimized to adapt to the new market environment. However, when introducing new algorithms, how to ensure their compatibility and stability, and how to verify their effectiveness without revealing the specific algorithm logic, is a difficult problem.
[0006] 4. Transparency and traceability of algorithm execution: In the financial field, the algorithm execution process and its results need to be highly transparent and traceable to meet regulatory requirements and user trust needs.
[0007] The existing financial analysis method uses regression analysis, which is a statistical analysis method that studies the relationship between two or more variables by establishing a mathematical model.
[0008] Existing financial analysis methods lack adequate protection for data security and privacy, have poor algorithm scalability and verifiability, and low transparency and traceability of algorithm execution. Summary of the invention
[0009] In view of the above problems, the present invention is proposed to provide a blockchain-based financial artificial intelligence integration method that overcomes the above problems or at least partially solves the above problems.
[0010] According to one aspect of the present invention, a financial artificial intelligence integration method based on blockchain is provided, and the integration method comprises:
[0011] S10: Building smart contracts on the blockchain platform;
[0012] S20: Encrypt the algorithm input data using homomorphic encryption technology, and verify the correctness of the algorithm execution through zero-knowledge proof technology;
[0013] S30: Modularize the design of financial artificial intelligence algorithms, implement specific algorithms in each module, and exchange and call data between modules through standardized interfaces;
[0014] S40: Use blockchain’s distributed ledger technology to store and record the input data, execution results, and execution logs of each algorithm execution. The data is encrypted and stored on the chain, and the on-chain storage location records the hash value of the off-chain storage data.
[0015] S50: Provides an open algorithm library, allowing third-party developers to upload new financial AI algorithms;
[0016] S60: Dynamically optimize financial artificial intelligence algorithms through deep learning algorithms based on historical execution data stored in the blockchain.
[0017] Optionally, the modular design of the financial artificial intelligence algorithm specifically includes: a time series prediction module, a risk assessment module, an asset allocation decision module, a smart contract including a rights management module and a blockchain storage module.
[0018] Optionally, the time series prediction module adopts a prediction algorithm based on a long short-term memory (LSTM) neural network to predict the prices of assets such as stocks and bonds in the financial market. The specific algorithm formula is:
[0019] h t =σ(W x ·x t +W h ·h t-1 +b)
[0020] y t =W y ·h t +b y
[0021] Among them, h t is the hidden state, x t is the input data, W x and W h is the weight matrix, b and b yis the bias and σ is the activation function.
[0022] Optionally, the risk assessment module uses a risk assessment algorithm based on Monte Carlo simulation to assess the potential risk of a financial investment portfolio. The specific algorithm includes:
[0023] Simulate the future return distribution of multiple portfolios;
[0024] Calculate the mean and variance of investment returns under different circumstances;
[0025] Through repeated simulations, the risk probability of the investment portfolio under different market conditions is determined;
[0026] Its formula is:
[0027] VaR=μ-σ·Z 1-α
[0028] Among them, μ is the expected return of the portfolio, σ is the standard deviation of the return, and Z 1-α is the quantile of the standard normal distribution.
[0029] Optionally, the asset allocation decision module
[0030] The algorithm based on the Markowitz mean-variance model is used to make optimal allocations among multiple assets, maximize the expected return of the portfolio and minimize risk. The algorithm includes:
[0031] Determine the expected rate of return E(R) of each asset i ) and covariance matrix ∑;
[0032] Solve the optimization problem and find the portfolio weight w that minimizes the portfolio variance;
[0033] The formula is:
[0034]
[0035] subject to∑w i E(R i )=E(R p )
[0036] Among them, w is the weight vector of assets, E(R p ) is the expected rate of return of the investment portfolio.
[0037] Optionally, the smart contract includes: a rights management module; controlling different users' calling rights to the algorithm module through a preset rights strategy, and the rights strategy is implemented based on user identity authentication and an access control list on the blockchain.
[0038] Optionally, the homomorphic encryption technology uses an encryption algorithm based on a public key encryption system to perform arithmetic operations while keeping the data encrypted. The specific algorithm includes:
[0039] Additive homomorphism and multiplicative homomorphism operations, the additive homomorphism formula is:
[0040] E(m1+m2)=E(m1)·E(m2)
[0041] Among them, E(m) represents the ciphertext, and the additive homomorphic operation allows the addition operation to be performed in the ciphertext state. The calculation result is the same as the plaintext addition operation result after decryption.
[0042] Optionally, the blockchain storage module adopts an on-chain and off-chain hybrid storage structure, in which important data and log records are stored on the chain, original data is stored off the chain, and the on-chain storage location records the hash value of the off-chain data.
[0043] Optionally, the dynamic optimization of the financial artificial intelligence algorithm specifically includes:
[0044] Adopt an optimization algorithm based on a deep neural network model, learn the data recorded on the blockchain in real time, and continuously adjust the parameters of the existing algorithm. The optimization methods include:
[0045] Gradient descent method is used to adjust weight parameters;
[0046] Use experience replay mechanism to improve the generalization ability of the model;
[0047] The decision path is optimized using reinforcement learning method. The algorithm formula is as follows:
[0048]
[0049] Among them, θ represents the parameters of the model, η is the learning rate, is the gradient of the objective function.
[0050] The present invention provides a financial artificial intelligence integration method based on blockchain, the integration method comprising: S10: constructing a smart contract on a blockchain platform; S20: using homomorphic encryption technology to encrypt algorithm input data, and verifying the correctness of algorithm execution through zero-knowledge proof technology; S30: modularizing the financial artificial intelligence algorithm, implementing a specific algorithm in each module, and exchanging and calling data between modules through standardized interfaces; S40: using the distributed ledger technology of blockchain to store and record the input data, execution results and execution logs of each algorithm execution, the data is encrypted and stored on the chain, and the storage location on the chain records the hash value of the data stored off the chain; S50: providing an open algorithm library, allowing third-party developers to upload new financial artificial intelligence algorithms; S60: based on the historical execution data stored in the blockchain, dynamically optimizing the financial artificial intelligence algorithm through a deep learning algorithm. The calculation can be completed in a data encrypted state, thereby improving the security and privacy protection of the data.
[0051] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0053] Figure 1 A flowchart of a blockchain-based financial artificial intelligence integration method provided by an embodiment of the present invention;
[0054] Figure 2 A schematic diagram of a hidden layer provided by an embodiment of the present invention;
[0055] Figure 3 A schematic diagram of an LSTM neural network provided by an embodiment of the present invention;
[0056] Figure 4 A Monte Carlo simulation flow chart provided for an embodiment of the present invention;
[0057] Figure 5 A flowchart of a multi-party secure computation provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0058] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0059] The terms "comprises" and "having" and any variations thereof in the description embodiments, claims and drawings of the present invention are intended to cover non-exclusive inclusions, for example, including a series of steps or units.
[0060] The technical solution of the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments.
[0061] like Figure 1 As shown, a financial artificial intelligence algorithm integration method based on blockchain includes:
[0062] S10. Build smart contracts on the blockchain platform to define the unique identifier, execution rules, call permissions, input and output interfaces, and security policies of each financial artificial intelligence algorithm module. The smart contract is responsible for managing the algorithm's call logic, data flow, and execution process;
[0063] S20. Use homomorphic encryption technology to encrypt algorithm input data to ensure the privacy of data during algorithm execution, and use zero-knowledge proof technology to verify the correctness of algorithm execution. Use multi-party secure computing (MPC) technology to allow multiple data holders to perform joint computing without exposing data;
[0064] S30. Modularize the financial artificial intelligence algorithm and divide it into multiple functional modules, such as time series prediction module, risk assessment module and asset allocation decision module. Each module implements a specific algorithm. The modules interact and call data through standardized interfaces. The interface definition includes data format, call parameters and output format.
[0065] S40. Use the distributed ledger technology of blockchain to store and record the input data, execution results and execution logs of each algorithm execution. The data is encrypted and stored on the chain to ensure its immutability and traceability. At the same time, the storage location on the chain records the hash value of the data stored off the chain;
[0066] S50. Provide an open algorithm library to allow third-party developers to upload new financial artificial intelligence algorithms. After the submitted algorithms go through an automated review process triggered by smart contracts, the reviewed algorithms are assigned unique identifiers and integrated into existing systems. The review content includes the security, compatibility and computing performance of the algorithms.
[0067] S60. Based on the historical execution data stored in the blockchain, the existing financial artificial intelligence algorithms are dynamically optimized through deep learning algorithms. The optimization results are automatically updated to the algorithm library and recorded in the blockchain for subsequent calls and verification.
[0068] The time series prediction module uses a prediction algorithm based on the long short-term memory (LSTM) neural network to predict the prices of assets such as stocks and bonds in the financial market. The specific algorithm formula is:
[0069] h t =σ(W x ·x t +W h ·h t-1 +b)
[0070] y t =W y ·h t +b y
[0071] Among them, h t is the hidden state, x t is the input data, W x and W h is the weight matrix, b and b y is the bias and σ is the activation function.
[0072] The structure of the hidden layer is as follows Figure 2 As shown; LSTM neural network as Figure 3 shown.
[0073] Monte Carlo simulation flow chart, such as Figure 4 As shown; the process of multi-party secure computation is as follows Figure 5 shown.
[0074] The risk assessment module uses a risk assessment algorithm based on Monte Carlo simulation to assess the potential risk of financial investment portfolios. The specific algorithm includes the following steps:
[0075] 1. Simulate the future return distribution of multiple investment portfolios;
[0076] 2. Calculate the mean and variance of investment returns under different circumstances;
[0077] 3. Through repeated simulations, determine the risk probability of the investment portfolio under different market conditions.
[0078] Its formula is:
[0079] VaR=μ-σ·Z 1-α
[0080] Among them, μ is the expected return of the portfolio, σ is the standard deviation of the return, and Z 1-α is the quantile of the standard normal distribution.
[0081] The asset allocation decision module uses an algorithm based on the Markowitz mean-variance model to make optimal allocations among multiple assets, maximize the expected return of the investment portfolio and minimize its risk. The specific algorithms include:
[0082] 1. Determine the expected rate of return E(R) of each asset i ) and covariance matrix ∑;
[0083] 2. Solve the optimization problem and find the portfolio weight w so that the variance of the portfolio is minimized;
[0084] The formula is:
[0085]
[0086] subject to∑w i E(R i )=E(R p )
[0087] Among them, w is the weight vector of assets, E(R p ) is the expected rate of return of the investment portfolio.
[0088] The smart contract includes a permission management module, which controls the calling permissions of different users to the algorithm module through preset permission strategies. The permission strategies are based on user identity authentication and the access control list (ACL) on the blockchain.
[0089] Homomorphic encryption technology uses an encryption algorithm based on a public key encryption system to perform arithmetic operations while keeping the data encrypted. The specific algorithm includes addition homomorphism and multiplication homomorphism. The addition homomorphism formula is:
[0090] E(m1+m2)=E(m1)·E(m2)
[0091] Among them, E(m) represents the ciphertext, and the additive homomorphic operation allows the addition operation to be performed in the ciphertext state. The calculation result is the same as the plaintext addition operation result after decryption.
[0092] The blockchain storage module adopts an on-chain and off-chain hybrid storage structure, in which important data and log records are stored on the chain, and original data is stored off the chain. The on-chain storage location records the hash value of the off-chain data to ensure the integrity and security of the data.
[0093] The review process of the open algorithm library includes static analysis and dynamic testing. Static analysis includes algorithm code security testing, such as code vulnerability scanning and malicious code detection. Dynamic testing includes performance testing and compatibility testing with existing systems.
[0094] The dynamic algorithm optimization process uses an optimization algorithm based on a deep neural network (DNN) model. The algorithm continuously adjusts the parameters of the existing algorithm by learning the data recorded on the blockchain in real time. The optimization methods include:
[0095] 1. Gradient descent method is used to adjust weight parameters;
[0096] 2. Use the experience replay mechanism to improve the generalization ability of the model;
[0097] 3. Use reinforcement learning method to optimize the decision path. The algorithm formula is as follows:
[0098]
[0099] Among them, θ represents the parameters of the model, η is the learning rate, is the gradient of the objective function.
[0100] The method is suitable for joint computing scenarios in distributed financial systems, allowing multiple financial institutions to share algorithm resources while protecting data privacy, and controlling the joint execution of algorithms through smart contracts to achieve multi-party collaborative computing and risk sharing.
[0101] Example 1: Prediction of a stock price
[0102] In this embodiment, the blockchain-based financial artificial intelligence algorithm integration method is used to build a stock price prediction system. The specific implementation steps are as follows:
[0103] 1. System architecture design: The system consists of a data input module, an LSTM prediction algorithm module, a smart contract management module, and a result output module. The data input module is responsible for receiving historical transaction data, and the LSTM prediction algorithm module uses this data for training and prediction. The smart contract management module controls the execution of the algorithm and data flow, and the result output module stores the prediction results on the blockchain.
[0104] 2. LSTM algorithm training and prediction: Use historical transaction data to train the LSTM neural network model. After the model training is completed, the smart contract is responsible for calling the model for prediction. The prediction results are recorded through the blockchain to ensure their immutability and transparency.
[0105] 3. Data privacy protection: The privacy of input data is protected through homomorphic encryption technology. The LSTM algorithm performs operations on encrypted data to ensure the privacy of the data.
[0106] 4. Prediction result verification: Use zero-knowledge proof technology to verify the correctness of the prediction results without revealing the specific prediction process and algorithm parameters.
[0107] Example 2: Financial risk assessment
[0108] This embodiment describes a blockchain-based financial risk assessment platform, which is mainly used for risk analysis and management of investment portfolios. The specific implementation steps are as follows:
[0109] 1. Platform architecture design: The platform includes data collection module, risk assessment module (based on Monte Carlo simulation), smart contract management module and report generation module. The data collection module obtains data from different financial databases, the risk assessment module evaluates the risk of the investment portfolio through the Monte Carlo simulation algorithm, the smart contract management module controls the evaluation process, and the report generation module is responsible for generating and storing risk analysis reports.
[0110] 2. Monte Carlo simulation algorithm: The risk assessment module uses Monte Carlo simulation to perform multiple random simulations on different investment portfolios to generate the future return distribution of the investment portfolio. The specific formula is:
[0111] VaR=μ-σ·Z 1-α
[0112] Among them, μ is the expected return of the portfolio, σ is the standard deviation of the return, and Z 1-α is the quantile of the standard normal distribution.
[0113] 3. Report storage and access control: After the risk assessment report is generated, the smart contract stores the report’s hash value on the blockchain, and the report content is stored in the off-chain database. When accessing the report, users need to verify permissions through the smart contract to ensure that only authorized users can access the report.
[0114] Beneficial effects: The blockchain-based financial artificial intelligence algorithm integration method uses technologies such as homomorphic encryption, zero-knowledge proof, and multi-party secure computing to ensure that the algorithm does not leak sensitive data during execution and can complete the calculation under data encryption, thereby improving data security and privacy protection;
[0115] The blockchain-based financial artificial intelligence algorithm integration method simplifies the integration and management process of various financial artificial intelligence algorithms through smart contracts and blockchain technology, so that the algorithm calling, execution, recording and other steps can be automated, improving the system's integration efficiency and management capabilities;
[0116] The blockchain-based financial artificial intelligence algorithm integration method provides an open algorithm library and an automated review mechanism, allowing third-party developers to easily submit new algorithms and ensure the security and compatibility of new algorithms. At the same time, through smart contracts and blockchain, dynamic optimization and verification of algorithm execution are achieved, improving the scalability and effectiveness of the algorithm.
[0117] The blockchain-based financial artificial intelligence algorithm integration method utilizes the distributed ledger technology of blockchain to record the input data, results and logs of each algorithm execution in an unalterable manner, thereby improving the transparency and traceability of algorithm execution and meeting the compliance requirements of the financial industry.
[0118] The above specific implementation methods further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above are only specific implementation methods of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A financial artificial intelligence integration method based on blockchain, characterized in that: The integration method comprises: S10: Building smart contracts on the blockchain platform; S20: Encrypt the algorithm input data using homomorphic encryption technology, and verify the correctness of the algorithm execution through zero-knowledge proof technology; S30: Modularize the design of financial artificial intelligence algorithms, implement specific algorithms in each module, and exchange and call data between modules through standardized interfaces; S40: Use blockchain’s distributed ledger technology to store and record the input data, execution results, and execution logs of each algorithm execution. The data is encrypted and stored on the chain, and the on-chain storage location records the hash value of the off-chain storage data. S50: Provides an open algorithm library, allowing third-party developers to upload new financial AI algorithms; S60: Dynamically optimize financial artificial intelligence algorithms through deep learning algorithms based on historical execution data stored in the blockchain.
2. According to a blockchain-based financial artificial intelligence integration method according to claim 1, it is characterized in that: The modular design of the financial artificial intelligence algorithm specifically includes: a time series prediction module, a risk assessment module, an asset allocation decision module, a smart contract including a rights management module and a blockchain storage module.
3. According to a blockchain-based financial artificial intelligence integration method according to claim 1, it is characterized in that: The time series prediction module adopts a prediction algorithm based on a long short-term memory (LSTM) neural network to predict the prices of assets such as stocks and bonds in the financial market. The specific algorithm formula is: h t =σ(W x ·x t +W h ·h t-1 +b) y t =W y ·h t +b y Among them, h t is the hidden state, x t is the input data, W x and W h is the weight matrix, b and b y is the bias and σ is the activation function.
4. According to a blockchain-based financial artificial intelligence integration method according to claim 1, it is characterized in that: The risk assessment module adopts a risk assessment algorithm based on Monte Carlo simulation to assess the potential risks of financial investment portfolios. The specific algorithm includes: Simulate the future return distribution of multiple portfolios; Calculate the mean and variance of investment returns under different circumstances; Through repeated simulations, the risk probability of the investment portfolio under different market conditions is determined; Its formula is expressed as: VaR=μ-σ·Z 1-α Among them, μ is the expected return of the portfolio, σ is the standard deviation of the return, and Z 1-α is the quantile of the standard normal distribution.
5. According to a blockchain-based financial artificial intelligence integration method according to claim 1, it is characterized in that: The asset allocation decision module The algorithm based on the Markowitz mean-variance model is used to make optimal allocations among multiple assets, maximize the expected return of the portfolio and minimize risk. The algorithm includes: Determine the expected rate of return E(R) of each asset i ) and covariance matrix ∑; Solve the optimization problem and find the portfolio weight w that minimizes the portfolio variance; The formula is: Among them, w is the weight vector of assets, E(R p ) is the expected rate of return of the investment portfolio.
6. The financial artificial intelligence integration method based on blockchain according to claim 1 is characterized in that: The smart contract includes: a rights management module; a preset rights strategy is used to control the calling rights of different users to the algorithm module, and the rights strategy is implemented based on user identity authentication and the access control list on the blockchain.
7. The financial artificial intelligence integration method based on blockchain according to claim 1 is characterized in that: The homomorphic encryption technology uses an encryption algorithm based on a public key encryption system to perform arithmetic operations while keeping the data encrypted. The specific algorithms include: Additive homomorphism and multiplicative homomorphism operations, the additive homomorphism formula is: E(m1+m2)=E(m1)·E(m2) Among them, E(m) represents the ciphertext, and the additive homomorphic operation allows the addition operation to be performed in the ciphertext state. The calculation result is the same as the plaintext addition operation result after decryption.
8. The financial artificial intelligence integration method based on blockchain according to claim 1 is characterized in that: The blockchain storage module adopts an on-chain and off-chain hybrid storage structure, in which important data and log records are stored on the chain, original data is stored off the chain, and the on-chain storage location records the hash value of the off-chain data.
9. The financial artificial intelligence integration method based on blockchain according to claim 1 is characterized in that: The dynamic optimization of the financial artificial intelligence algorithm specifically includes: Adopt an optimization algorithm based on a deep neural network model, learn the data recorded on the blockchain in real time, and continuously adjust the parameters of the existing algorithm. The optimization methods include: Gradient descent method is used to adjust weight parameters; Use experience replay mechanism to improve the generalization ability of the model; The decision path is optimized using reinforcement learning method. The algorithm formula is as follows: Among them, θ represents the parameters of the model, η is the learning rate, is the gradient of the objective function.
Citation Information
Cited By
Digital resource full life cycle management method and device based on block chain
CN119834957A
A Blockchain-Based Digital Resource Full Lifecycle Management Method and Device
CN119834957B