Strategy transaction processing method and device, equipment and medium

Through blockchain smart contracts and asymmetric encryption mechanisms, a trusted decentralized strategy trading system is designed to solve the problems of information leakage and low security in strategy trading, and to achieve secure, transparent and trusted execution of strategy trading.

CN120655421APending Publication Date: 2025-09-16AGRICULTURAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510663545.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-21
Publication Date
2025-09-16

AI Technical Summary

Technical Problem

Existing quantitative trading strategy trading platforms have problems with strategy trading information leakage and low security. They lack a decentralized trust mechanism, which leads to data tampering, financial fraud and strategy leakage. Traditional strategy code trading cannot complete real and verifiable transactions without exposing the source code.

Method used

We use blockchain smart contracts, asymmetric encryption, and delayed decryption mechanisms to verify execution consistency by comparing strategy codes with trading signals. We design a trusted decentralized strategy trading system to ensure that the execution effect of the strategy is displayed to the public before trading without leaking the source code.

Benefits of technology

It realizes trusted decentralized transactions without leaking strategy logic, provides a replicable and auditable transaction mechanism, improves the security and transparency of strategy transactions, and reduces the cost of trust.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120655421A_ABST
    Figure CN120655421A_ABST
Patent Text Reader

Abstract

The invention provides a policy transaction processing method and device, equipment and a medium. The method comprises the steps of obtaining at least one strategy code and a code identifier of each strategy code, wherein the at least one strategy code is obtained by optimizing a code of at least one developed strategy according to historical transaction information of historical strategy codes; for each strategy code, executing the strategy code, and generating transaction information; determining strategy information according to the transaction information and the code identifier of the strategy code, the strategy information being used for indicating a transaction execution logic corresponding to the transaction information; the strategy information corresponding to each strategy code is displayed through a smart contract, so that a user determines target strategy information from at least one piece of strategy information, and the smart contract is used for indicating execution of the strategy information and the strategy transaction; and according to the target policy information and the smart contract, the policy transaction is completed, and the security of the policy transaction process is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer and financial technology, and in particular to a method, apparatus, device and medium for processing strategic transactions. Background Art

[0002] With the deep integration of computer technology and financial markets, quantitative trading, with its decision-making characteristics based on mathematical models and algorithms, has demonstrated advantages such as efficiency, accuracy, and replicability, and has gradually become a key trading method in the market. To meet the needs of quantitative trading strategy development and execution, quantitative trading strategy trading platforms have emerged, aiming to provide trading strategy developers with convenient and efficient tools and environments, and promote the practical application and market practice of quantitative trading strategies.

[0003] Currently, most quantitative trading strategy trading platforms adopt a centralized architecture. Developers of trading strategies need to upload their strategy codes to the platform, which then executes these strategies and provides trading signals.

[0004] However, the above-mentioned strategy trading platform requires the strategy code and transaction information to be fully visualized, which may easily lead to the leakage of strategy trading information and reduce the security of strategy trading. Summary of the Invention

[0005] The present application provides a method, apparatus, device and medium for processing strategic transactions, which are used to solve the technical problems in the prior art of easy leakage of strategic transaction information and low security of strategic transactions.

[0006] In a first aspect, the present application provides a method for processing strategic transactions, comprising:

[0007] Obtaining at least one strategy code and a code identifier for each strategy code, wherein the at least one strategy code is obtained by optimizing the code of at least one developed strategy based on historical transaction information of historical strategy codes;

[0008] For each strategy code, executing the strategy code to generate transaction information;

[0009] determining, according to the transaction information and the code identifier of the policy code, policy information for indicating a transaction execution logic corresponding to the transaction information;

[0010] The policy information corresponding to each policy code is displayed through a smart contract, so that a user can determine target policy information from at least one policy information, and the smart contract is used to instruct the execution of the policy information and policy transactions;

[0011] Complete the strategy transaction according to the target strategy information and the smart contract.

[0012] Furthermore, obtaining at least one policy code and a code identifier for each policy code includes:

[0013] Obtain historical transaction information of at least one initial strategy code and a historical strategy code;

[0014] Optimizing and adjusting the at least one initial strategy code according to historical transaction information of the historical strategy code to obtain at least one strategy code;

[0015] Perform hash calculation on the at least one policy code according to a hash algorithm to obtain a code identifier of each policy code.

[0016] Furthermore, determining the policy information according to the transaction information and the code identifier of the policy code includes:

[0017] Determining, based on the transaction information, key pair information and a transaction execution list corresponding to the transaction information, wherein the transaction information list includes transaction execution logic corresponding to the transaction information;

[0018] Policy information is determined according to the code identifier, the key pair information, and the transaction information list.

[0019] Furthermore, determining policy information based on the code identifier, the key pair information, and the transaction information list includes:

[0020] Determining public key information and secret key information according to the key pair information;

[0021] Encrypting the transaction information according to the public key information to obtain encrypted transaction information;

[0022] Delay decryption of the encrypted transaction information according to the preset delayed decryption time and the secret key information to obtain the target transaction information;

[0023] Strategy information is determined according to the code identifier, the target transaction information, and the transaction information list.

[0024] Furthermore, the policy information corresponding to each policy code is displayed through a smart contract, so that the user can determine the target policy information from at least one policy information, including:

[0025] The policy information corresponding to each policy code is displayed through a smart contract, so that the user can determine at least one initial policy information from at least one policy information;

[0026] Verifying the at least one initial policy information according to the historical policy information of the historical policy code to obtain a verification result of the at least one initial policy information, wherein the verification result is used to indicate policy execution performance of the at least one initial policy information;

[0027] The verification result of the at least one initial policy information is displayed through the smart contract, so that the user can determine the target policy information from the at least one initial policy information.

[0028] Furthermore, according to the target policy information and the smart contract, a policy transaction is completed, including:

[0029] Receive target code identification and target key pair information sent by the user through the smart contract;

[0030] Encrypting the plaintext code in the target policy information according to the target public key information in the target key pair information to obtain encrypted policy information;

[0031] The encrypted policy information is displayed through the smart contract, so that the user can decrypt the encrypted policy information according to the target private key information in the target key pair information to obtain the target policy code;

[0032] The target strategy code is verified to complete the strategy transaction.

[0033] Furthermore, the target strategy code is verified to complete the strategy transaction, including:

[0034] Performing hash calculation on the target policy code based on a hash algorithm to obtain a code identifier to be verified;

[0035] Comparing the code identifier to be verified with the code identifier of each policy code to obtain an identifier verification result;

[0036] Verify the target strategy code according to the transaction information list to obtain a code verification result;

[0037] When both the identification verification result and the code verification result meet the preset verification requirements, the strategic transaction is completed.

[0038] In a second aspect, the present application proposes a strategic trading processing device, comprising:

[0039] an acquisition module, configured to acquire at least one strategy code and a code identifier of each strategy code, wherein the at least one strategy code is obtained by optimizing the code of at least one developed strategy based on historical transaction information of the historical strategy code;

[0040] A transaction information generation module, configured to execute each policy code and generate transaction information;

[0041] a policy information determination module, configured to determine policy information based on the transaction information and a code identifier of the policy code, wherein the policy information is used to indicate a transaction execution logic corresponding to the transaction information;

[0042] a target policy information determination module, configured to display the policy information corresponding to each policy code through a smart contract, so that a user can determine the target policy information from at least one policy information, wherein the smart contract is configured to instruct the execution of the policy information and policy transactions;

[0043] The strategy transaction completion module is used to complete the strategy transaction according to the target strategy information and the smart contract.

[0044] In a third aspect, the present application provides an electronic device, comprising: a processor, and a memory communicatively connected to the processor;

[0045] The memory stores computer-executable instructions;

[0046] The processor executes the computer-executable instructions stored in the memory to implement the method of the embodiment of the present application.

[0047] In a fourth aspect, the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the method of the embodiment of the present application.

[0048] In a fifth aspect, the present application provides a computer program product, comprising a computer program, which implements the method as described in any one of the first aspects when executed by a processor.

[0049] The present application provides a method, apparatus, device and medium for processing strategy transactions, which obtains at least one strategy code and a code identifier of each strategy code, and optimizes the code of at least one developed strategy based on historical transaction information of the historical strategy code; for each strategy code, executes the strategy code to generate transaction information; determines the strategy information based on the transaction information and the code identifier of the strategy code, and the strategy information is used to indicate the transaction execution logic corresponding to the transaction information; displays the strategy information corresponding to each strategy code through a smart contract, so that the user can determine the target strategy information from the at least one strategy information, and the smart contract is used to indicate the execution of the strategy information and the strategy transaction; completes the strategy transaction based on the target strategy information and the smart contract, thereby improving the security of the strategy transaction process. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0051] Figure 1 This is a flow chart of the first embodiment of the method for processing strategic transactions proposed in this application;

[0052] Figure 2 This is a flow chart of the second embodiment of the method for processing strategic transactions proposed in this application;

[0053] Figure 3 This is a flow chart of the third embodiment of the method for processing strategic transactions proposed in this application;

[0054] Figure 4 This is a flow chart of the fourth embodiment of the method for processing strategic transactions proposed in this application;

[0055] Figure 5 This is a flowchart of the fifth embodiment of the method for processing strategic transactions proposed in this application;

[0056] Figure 6 This is a flowchart of Example 6 of the processing method for strategic trading proposed in this application;

[0057] Figure 7 This is a schematic diagram of the structure of the processing device for strategic trading proposed in this application;

[0058] Figure 8 This is a schematic diagram of the structure of the electronic device proposed in this application.

[0059] The above drawings illustrate specific embodiments of the present application, which will be described in more detail below. These drawings and the textual description are not intended to limit the scope of the present application in any way, but rather to illustrate the concepts of the present application to those skilled in the art by reference to specific embodiments. DETAILED DESCRIPTION

[0060] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.

[0061] Existing quantitative trading strategies rely heavily on centralized platforms and lack decentralized trust mechanisms, leading to data tampering, financial fraud, and strategy leaks between trading parties. Furthermore, traditional strategy code trading methods cannot complete authentic and verifiable transactions without exposing the strategy's source code. The lack of code execution consistency verification makes it difficult to disprove strategy performance, severely impacting the efficiency and trust of the strategy market. Therefore, a trustworthy decentralized strategy trading system that maintains the integrity of strategy logic is urgently needed to address these technical challenges.

[0062] To address these issues, this paper, inspired by the "programmable transaction mechanism" of blockchain smart contracts, designs a decentralized strategy trading method. By introducing asymmetric encryption and delayed decryption mechanisms, this method allows the execution of strategies to be publicly displayed before a transaction without revealing the source code, achieving a verifiable yet irreversible technical effect. By comparing strategy code with transaction signals, execution consistency verification is achieved, addressing the technical issue of untrustworthy traditional strategy trading code and providing a replicable and auditable mechanism design for strategy trading.

[0063] The following specific embodiments describe in detail the technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0064] Figure 1 This is a flow chart of the first embodiment of the processing method of strategic trading proposed in this application. Figure 1 Shown, including:

[0065] S101: Obtain at least one policy code and a code identifier for each policy code.

[0066] The at least one strategy code is obtained by optimizing the code of the at least one developed strategy based on historical transaction information of the historical strategy code.

[0067] Specifically, this step first involves obtaining one or more optimized strategy codes. Each strategy code has a unique code identifier (such as a hash value or signature) that is used to identify and distinguish it during subsequent strategy trading and verification. These strategy codes are expressions of the strategy logic generated by developers after optimizing and adjusting historical trading information (e.g., yield, drawdown, and transaction rate) based on existing historical strategies. For example, by backtesting and analyzing historical market data, the strategy logic and parameter configuration can be automatically or semi-automatically optimized to obtain a quantitative trading strategy code that meets current market conditions.

[0068] S102: For each strategy code, execute the strategy code and generate transaction information.

[0069] After obtaining the strategy code, you can run each section of the strategy code in an isolated execution environment and perform simulated trading based on pre-set market data (such as the last 30 days of K-line data) to generate corresponding trading information. This trading information includes but is not limited to: trading signals, order generation records, yield curves, and other results data. This data is used to evaluate the performance of the strategy and is also an important basis for subsequent demonstration and verification.

[0070] S103: Determine the policy information according to the transaction information and the code identifier of the policy code.

[0071] Strategy information indicates the execution logic corresponding to the transaction information. It includes the strategy code identifier, corresponding transaction performance, and expected return performance indicators, forming a summary view of the strategy for user decision-making. Specifically, this step binds the aforementioned transaction information with the strategy code identifier to generate a strategy information object. This ensures that during the display and trading process, users can make choices based on strategy performance without having to access the source code, thus protecting the intellectual property rights of strategy developers.

[0072] S104. The policy information corresponding to each policy code is displayed through a smart contract, so that the user can determine the target policy information from at least one policy information.

[0073] Smart contracts are used to indicate the execution of policy information and policy transactions. Specifically, policy information can be published through a display contract deployed on the blockchain.

[0074] In this step, the smart contract receives the uploaded strategy information and records it on-chain, transparently displaying it to users. The smart contract in the display module ensures that each strategy information is readable by any user on the chain but cannot be tampered with. Users can also view the trading performance of multiple strategies through the client interface and select a target strategy for trading based on the strategy identifier.

[0075] It should be noted that this smart contract also plays the role of triggering the execution logic: when the user selects the target strategy, it will automatically enter the transaction process contract, which will control the locking of funds, the calling and delivery of strategies, the verification of results and other links.

[0076] S105. Complete the strategy transaction based on the target strategy information and the smart contract.

[0077] In the final transaction stage, the strategy transaction is executed based on the target strategy information selected by the user and the corresponding smart contract.

[0078] Specifically, users pay transaction fees to the smart contract, which automatically completes the following operations: locks user funds; verifies the validity of the selected strategy identifier; invokes the delivery method set by the strategy provider; ensures the authenticity of trading signals and profit information through encrypted calculations without disclosing the strategy code; and, after verification, feeds the profit return and strategy call results back to the user, transferring the fees to the strategy provider. As a "trusted intermediary," the smart contract automates the core links of the entire transaction process, including strategy call, execution, and verification, significantly reducing the trust cost in transactions.

[0079] The processing method for strategy trading proposed in the embodiment of the present application realizes a closed loop of the entire process from strategy generation to trading, and has the characteristics of decentralization, automatic execution, data immutability, security and privacy protection, etc., which can effectively meet the security and transparency requirements of the current quantitative trading strategy trading market.

[0080] Figure 2 This is a flow chart of the second embodiment of the processing method of strategic trading proposed in this application. Figure 2 As shown, in Figure 1 Based on the embodiment, obtaining at least one policy code and a code identifier of each policy code includes:

[0081] S201: Obtain historical transaction information of at least one initial strategy code and historical strategy code.

[0082] Initial strategy code refers to the original, unoptimized strategy implementation, such as when first written for a strategy seller or adapted from an existing model. Historical trading information for historical strategy codes refers to the results of executing these strategies under specific market conditions, including profit and loss records, signal responses, execution rates, and maximum drawdowns.

[0083] In this step, the strategy seller first downloads the data set used for strategy development from the data provider or platform. This data contains complete historical market data (such as K-line, trading volume, buy and sell depth, order book, etc.).

[0084] Subsequently, developers develop strategies locally using an integrated development environment (IDE) and generate initial strategy code. This IDE can be a development platform supported by a quantitative framework. Simultaneously, strategy sellers collect historical strategy trading information, including but not limited to: the strategy's actual execution performance over various time periods, financial indicators such as profit / loss ratios, Sharpe ratios, and Karma ratios, and robustness analysis results under various market conditions. This historical trading information serves as evaluation criteria for subsequent strategy optimization.

[0085] S202: Optimize and adjust at least one initial strategy code according to historical transaction information of the historical strategy code to obtain at least one strategy code.

[0086] This step is used to iteratively optimize the initial strategy code to make it perform better in the historical market environment and form a new candidate strategy code.

[0087] Specifically, after the initial strategy code is developed, developers use a backtesting system to simulate trading the strategy against historical market data to obtain historical trading performance. Strategy parameters, such as stop-loss thresholds, entry conditions, and holding periods, are then adjusted automatically or manually based on the backtesting results. For example, hyperparameters can be fine-tuned through grid search or Bayesian optimization; the strategy logic structure can be evolved through genetic algorithms or reinforcement learning methods; or strategy stability can be enhanced by integrating multiple strategy submodules. Each optimization is followed by a backtest and compared with historical strategy performance to identify strategy versions with significant optimization effects and stability, ultimately outputting one or more improved strategy codes.

[0088] S203: Perform hash calculation on at least one policy code according to a hash algorithm to obtain a code identifier of each policy code.

[0089] Among them, "hash calculation" is used to uniquely identify the strategy code, so that subsequent display, verification, and call are based on the identification rather than the code itself, protecting strategy transactions.

[0090] Specifically, for each optimized strategy code, its content is irreversibly encoded using a hash algorithm. For example, the entire content of the strategy code file is read (which can be in .py, .cpp, and other file formats); the content is formatted in a standard way (such as unifying spaces and line breaks) to prevent format differences from affecting the hash result; the processed text is input into the hash function to generate a unique code identifier (strategy ID); this code identifier is bound to the transaction information, verification records, and identity identifier of the strategy during the transaction process. The strategy ID is used as the unique reference identifier of the strategy in subsequent transaction, verification, and display modules to avoid direct disclosure of the strategy code content.

[0091] The embodiment of the present application constitutes the starting point of the policy life cycle through the process from data acquisition, policy development, performance evaluation to optimization output and unique identifier generation, laying the foundation for the secure display and trusted transactions of subsequent modules.

[0092] Figure 3 This is a flow chart of the third embodiment of the processing method of strategic trading proposed in this application. Figure 3 As shown, in Figure 1Based on the embodiment, the policy information is determined according to the code identifier of the transaction information and the policy code, including:

[0093] S301. Determine, based on transaction information, key pair information and a transaction execution list corresponding to the transaction information.

[0094] This step is a core pre-process for the strategy release process, aiming to structure and encrypt trading signals. The transaction information list includes the corresponding trade execution logic. "Key pair information" refers to a pair of asymmetric encryption keys (public and private keys) generated by the strategy executor, used to encrypt and protect trade information from leaks. The "trade execution list" is a sequence of trade actions automatically generated from the actual execution of the strategy code, serving as a trusted representation of the strategy's performance and logic.

[0095] Specifically, before a strategy seller prepares to launch a strategy, they initiate a simulated or real-time run of the strategy through an "auto-execution program." This program accesses real-time market data (such as K-line charts, trading volume, and order books) and continuously executes the strategy logic to generate real-time trading signals.

[0096] For example, the signal generation process involves recording each buy / sell / close action generated by the strategy execution as a trading instruction, creating a trade execution list with timestamp, underlying asset, direction, and strength. This list serves as the behavioral output of the strategy execution. The automated execution program then generates a random asymmetric key pair for each trade signal. The public key is used to encrypt the trade signal, and the private key is used to decrypt it after a set time. Each trade signal is signed using the corresponding public key, or the trade information is encrypted and encapsulated. This prevents external parties from inferring the strategy logic, even if the signal is exposed prematurely. All of these trade signals, encrypted information, and public key signatures are uploaded to the smart contract registry upon strategy release, pending verification after delayed decryption.

[0097] Then, based on the code identifier, key pair information, and transaction information list, the policy information is determined. “Policy information” is an abstract encapsulation of the entire policy displayed and invoked on-chain, including identification, verification mechanisms, signaling, and latency control. Specifically, the process of determining policy information is as follows:

[0098] S302: Determine the public key information and the secret key information according to the key pair information.

[0099] The purpose of this step is to extract the public key information and private key information from the key pair information in order to perform subsequent data encryption and delayed decryption.

[0100] S303: Encrypt the transaction information according to the public key information to obtain encrypted transaction information.

[0101] This step, specifically the encryption and encapsulation phase of strategy execution, aims to encrypt raw transaction information (such as transaction direction, quantity, price range, etc.) to prevent premature leakage. For example, each transaction is asymmetrically encrypted using public key information and stored in a local cache. Simultaneously, it is published to the blockchain or to all nodes in the global network for subsequent verification. Furthermore, this step requires the addition of a signature to the encrypted information to verify the identity of the creator of the information.

[0102] S304: Delay decryption of the encrypted transaction information according to the preset delayed decryption time and key information to obtain target transaction information.

[0103] This step is the process of decapsulating the policy information, which ensures that the policy seller can publish the encrypted content after the set event, thereby realizing the verification of the transaction.

[0104] Specifically, during the strategy release phase, the strategy seller sets a decryption delay in the smart contract. After this delay, the encrypted information can be decrypted to obtain the target transaction information, including the execution action, conditions, and timestamp. This information is then compared with the transaction information list to ensure data authenticity. This decryption process has an irreversible time threshold; external decryption is impossible before the delay is reached, ensuring the security of the strategy.

[0105] S305: Determine strategy information based on the code identifier, target transaction information, and transaction information list.

[0106] This step is the final packaging stage of the policy information, which can generate a "policy information" object that can be viewed by users and called by contracts. For example, after decryption is completed, the following elements can be structured and packaged: policy code identifier, target transaction information, transaction information list, encrypted original text and signature information, and delayed decryption configuration. Among them, the policy code identifier is calculated by a hash algorithm and is used to uniquely identify the policy logic; the target transaction information is the actual execution signal obtained by decryption; the transaction execution list is the complete transaction action sequence generated during the operation of the strategy; the encrypted original text and signature information are used for historical traceability and authenticity verification; the delayed decryption configuration includes the set time point and the actual decryption timestamp.

[0107] The final constructed "strategy information" will be uploaded to the chain and displayed to users. When a user selects the strategy for trading, the smart contract can call the strategy information structure, execute the verification logic, and initiate the strategy delivery process.

[0108] The embodiments of the present application introduce asymmetric encryption, delayed decryption mechanism and strategy execution logic binding to achieve encrypted protection and time-controlled disclosure of trading signals during the strategy trading process, effectively preventing the strategy logic from being leaked before the transaction is completed, while ensuring the authenticity and verifiability of transaction information, significantly improving the security, credibility and anti-attack ability of strategy release, and providing a high-credibility, low-trust-cost technical foundation for quantitative strategy trading in a decentralized environment.

[0109] Figure 4 This is a flow chart of the fourth embodiment of the processing method of strategic trading proposed in this application. Figure 4 As shown, in Figure 1 Based on the embodiment, the policy information corresponding to each policy code is displayed through a smart contract, so that the user can determine the target policy information from at least one policy information, including:

[0110] S401. Display the policy information corresponding to each policy code through a smart contract, so that a user can determine at least one initial policy information from at least one policy information.

[0111] This step uses smart contracts to publicly display available policy information to users for preliminary selection. Initial policy information refers to the candidate policy objects selected by users before policy verification.

[0112] Specifically, users use the client to pull this strategy information from the on-chain smart contract. The front end of the smart contract displays a summary of the strategy, such as the strategy code identifier and seller address, price and expiration date, an encrypted summary of historical trading signals (before decryption), and a decryption countdown (if the private key has not yet been released). Users can browse, filter, or bookmark this initial strategy information in the interface to form their own selection area.

[0113] S402: Verify at least one initial policy information according to the historical policy information of the historical policy code to obtain a verification result of the at least one initial policy information.

[0114] This step verifies the authenticity and validity of the strategy information. The verification result is obtained by decrypting the historical trading signals and comparing and backtesting with the historical data. The verification result is used to indicate the strategy execution performance of at least one initial strategy information.

[0115] For example, the user client automatically calls the decentralized storage node, downloads the published historical private key, and decrypts each trading signal to obtain the corresponding target trading information, which is the actual historical execution behavior record of the strategy. The user client will then obtain the corresponding historical market data (market data set) from the chain or data provider and perform a verification process, including backtest matching, performance evaluation, and stability analysis. For example, the decrypted trading signals are mapped to the historical data in sequence to determine their execution effect for backtest matching; statistics such as yield, maximum drawdown, Sharpe ratio, and strategy win rate are used for performance evaluation; the performance of the strategy in different volatility ranges is observed to identify the strategy's sensitivity to specific market conditions, and then a stability analysis is performed. Finally, a "strategy verification report" is generated for the user, including analysis charts and comprehensive scores.

[0116] S403: Display the verification result of at least one initial policy information through a smart contract, so that the user can determine the target policy information from the at least one initial policy information.

[0117] This step is to display the verified results on the blockchain so that users can reliably select target strategy information based on data and performance to conduct transactions.

[0118] For example, user verification results can be uploaded to the blockchain or summarized via smart contracts to form a trusted scoring mechanism. For example, a front-end graphical interface could be integrated to display each strategy's backtesting results (returns, stability), simulated performance across various markets, and decryption success rate and verification consistency. Based on these metrics, users can determine their final target strategy. This step ensures that user decisions are based on verifiable historical performance, rather than subjective descriptions by strategy sellers, effectively reducing the risk of misleading advertising.

[0119] The embodiments of the present application can ensure that all strategy information is publicly and transparently accessible; support users to backtest strategies based on historical data; establish a quantitative decision-making basis for strategy selection, significantly improving transaction trust; and execute the entire process on-chain to prevent information tampering, thereby ensuring the security, credibility, and scientific nature of strategy selection.

[0120] Figure 5 This is a flow chart of the fifth embodiment of the processing method of strategic transactions proposed in this application. Figure 5 As shown, in Figure 1 Based on the embodiment, according to the target policy information and the smart contract, the policy transaction is completed, including:

[0121] S501. Receive the target code identifier and target key pair information sent by the user through the smart contract.

[0122] The target code identifier refers to the unique code identifier (such as the SM3 hash value) corresponding to the strategy selected by the user. The target key pair information refers to the public key and private key combination randomly generated by the user before the transaction, which is used for the subsequent encryption, transmission and decryption operations of the strategy code.

[0123] Specifically, the buyer generates an asymmetric key pair through the client, ensuring that the private key is stored locally and the public key is used for communication with the seller. For example, the buyer submits the target strategy's strategy code identifier, the target private key generated by the buyer, the wallet address and identity information, and a snapshot of the current account through a smart contract on the blockchain. The smart contract then checks whether the buyer's balance is sufficient based on the strategy price. If sufficient, it automatically transfers an equivalent amount of digital assets from the buyer's wallet to the seller's address, or temporarily freezes the funds at the contract address and releases them to the seller after the transaction is successfully verified.

[0124] S502: Encrypt the plaintext code in the target policy information according to the target public key information in the target key pair information to obtain encrypted policy information.

[0125] This step is to encrypt the policy code (plain text) stored locally by the seller using the public key provided by the buyer, so that the policy cannot be obtained by a third party during transmission.

[0126] For example, after receiving the public key information forwarded by the smart contract, the seller extracts the plaintext policy code identified by the local policy code and then performs encryption using an asymmetric encryption algorithm. This means that the seller uploads the plaintext policy code to the blockchain through the smart contract for the buyer to access. This process ensures that even if an intermediary node or external user reads the data, they cannot obtain the actual policy content.

[0127] S503. The encrypted policy information is displayed through a smart contract, so that the user can decrypt the encrypted policy information according to the target private key information in the target key pair information to obtain the target policy code.

[0128] In this step, the purpose of displaying the encrypted policy information is to make the policy delivery behavior publicly verifiable, while allowing the buyer to decrypt it using the private key to obtain the plaintext policy code.

[0129] For example, the encrypted policy information is displayed on the front-end and synchronized to the blockchain, along with metadata such as upload time and policy code identifier. The buyer uses their local private key to decrypt the policy through the client. Upon successful decryption, the buyer obtains the policy source code, which can be deployed and executed locally or used for further verification. It is important to note that the policy decryption process is performed only by the buyer's client, ensuring that other nodes cannot reproduce or copy the policy.

[0130] S504: Verify the target strategy code and complete the strategy transaction.

[0131] In the embodiment of the present application, the prerequisite for the completion of the transaction is that the buyer verifies the obtained strategy code to ensure its consistency and integrity, thereby triggering the smart contract to release funds and complete the final delivery.

[0132] The embodiments of the present application utilize asymmetric encryption to ensure privacy in strategy transmission, support hash verification of strategy codes, ensure consistency and authenticity of delivery, effectively solve problems such as "lack of delivery trust" in traditional strategy trading, and provide solid technical support for the quantitative strategy market.

[0133] Figure 6 This is a flow chart of the sixth embodiment of the processing method for strategic transactions proposed in this application. Figure 6 As shown, in Figure 5 Based on the embodiment, the target policy code is verified and the policy transaction is completed, including:

[0134] S601: Perform hash calculation on the target policy code based on a hash algorithm to obtain a code identifier to be verified.

[0135] Among them, the code identifier to be verified refers to the unique identification value calculated by the buyer based on the received plaintext policy code using the same hash algorithm, and is expected to be consistent with the original policy code identifier.

[0136] Specifically, after the buyer decrypts and obtains the plaintext of the target policy code, they use a hash algorithm to perform an irreversible encoding calculation and use the result as the code identifier to be verified for the next step of verification. This step ensures that the target policy code has not been tampered with by a middleman, providing a structural anti-counterfeiting verification method.

[0137] S602: Compare the code identifier to be verified with the code identifier of each policy code to obtain an identifier verification result.

[0138] This step is the strategy code identity verification, that is, determining whether the code actually received by the buyer is indeed the version previously registered by the seller in the smart contract.

[0139] For example, the smart contract stores the seller's provided policy code identifier, which is then compared with the user-generated code identifier to be verified. If the comparison result indicates a match, the code identifier verification is successful. If the comparison result indicates a disagreement, the code identifier verification failure is recorded and the subsequent processing flow is entered. This verification process prevents sellers from surreptitiously replacing policy codes before and after a transaction, ensuring the consistency of policy information.

[0140] S603: Verify the target strategy code according to the transaction information list to obtain a code verification result.

[0141] This step determines whether the target strategy code is consistent by executing the target strategy code and comparing it with the aforementioned transaction information list. Specifically, the transaction information list is obtained, that is, the sequence of transaction signals generated and signed when the strategy is released. The buyer loads the target strategy code into the backtesting engine and inputs the same historical data for simulated execution to obtain the backtesting results. The backtesting results are then compared with the transaction information list to determine whether the timestamps are consistent, whether the instruction direction (buy / sell) is consistent, and whether the target and execution volume match. If the comparison result indicates a high degree of match in the transaction behavior, it is considered that the strategy can indeed generate the published signal and the verification is successful; otherwise, it is considered to be data falsification or inconsistent execution, and the verification fails. This process ensures that the strategy trading signal is a real and reproducible code running result.

[0142] S604: When both the identification verification result and the code verification result meet the preset verification requirements, the policy transaction is completed.

[0143] This step is the confirmation mechanism for strategic trading. The smart contract releases the strategy information only after both code consistency verification and trading signal backtesting are successful. If both the first two steps pass, the buyer's node uploads a verification success signal to the smart contract. The contract automatically triggers: unfreezing the seller's digital assets; transferring the frozen assets to the seller's account; and completing the transaction record on-chain. If any verification fails, the buyer can broadcast the transaction private key to the entire network for verification by other nodes. If the network-wide consensus verification fails, the smart contract returns the buyer's assets and deducts the seller's pledged credit assets. If the buyer does not provide feedback within the preset time, the system assumes the transaction verification is successful, and the assets are automatically released.

[0144] The embodiment of the present application realizes a double verification closed loop in the quantitative strategy trading process, effectively ensuring the authenticity and consistency of the trading code and signal data, significantly enhancing the credibility, fairness and user security of the strategy trading process, and providing rigorous and effective trading guarantees for the decentralized strategy market.

[0145] Figure 7 This is a schematic diagram of the structure of the strategic transaction processing device proposed in this application. Figure 7 As shown, the strategic transaction processing device 70 includes:

[0146] An acquisition module 701 is configured to acquire at least one strategy code and a code identifier for each strategy code, wherein the at least one strategy code is obtained by optimizing the code of at least one developed strategy based on historical transaction information of the historical strategy code;

[0147] The transaction information generation module 702 is used to execute the policy code and generate transaction information for each policy code;

[0148] A policy information determination module 703 is configured to determine policy information based on the transaction information and the code identifier of the policy code, where the policy information is used to indicate the transaction execution logic corresponding to the transaction information;

[0149] Target policy information determination module 704, configured to display the policy information corresponding to each policy code through a smart contract, so that a user can determine the target policy information from at least one policy information. The smart contract is used to instruct the execution of policy information and policy transactions;

[0150] The strategy transaction completion module 705 is used to complete the strategy transaction according to the target strategy information and the smart contract.

[0151] Furthermore, the acquisition module 701 is further specifically configured to:

[0152] Obtain historical transaction information of at least one initial strategy code and a historical strategy code;

[0153] Optimizing and adjusting at least one initial strategy code based on historical transaction information of the historical strategy code to obtain at least one strategy code;

[0154] Perform hash calculation on at least one policy code according to a hash algorithm to obtain a code identifier of each policy code.

[0155] Furthermore, the policy information determination module 703 is further specifically configured to:

[0156] Determine, based on the transaction information, key pair information and a transaction execution list corresponding to the transaction information, wherein the transaction information list includes transaction execution logic corresponding to the transaction information;

[0157] Determine the policy information based on the code identifier, key pair information, and transaction information list.

[0158] Furthermore, the policy information determination module 703 is further specifically configured to:

[0159] Determine the public key information and the secret key information according to the key pair information;

[0160] Encrypting the transaction information according to the public key information to obtain encrypted transaction information;

[0161] Delay decryption of encrypted transaction information based on the preset delayed decryption time and key information to obtain the target transaction information;

[0162] Determine strategy information based on the code identifier, target transaction information, and transaction information list.

[0163] Furthermore, the target policy information determination module 704 is further specifically configured to:

[0164] The policy information corresponding to each policy code is displayed through a smart contract, so that the user can determine at least one initial policy information from at least one policy information;

[0165] Verifying the at least one initial policy information according to the historical policy information of the historical policy code to obtain a verification result of the at least one initial policy information, the verification result being used to indicate policy execution performance of the at least one initial policy information;

[0166] The verification result of at least one initial policy information is displayed through a smart contract, so that the user can determine the target policy information from the at least one initial policy information.

[0167] Furthermore, the strategic transaction completion module 705 is further specifically configured to:

[0168] Receive the target code identifier and target key pair information sent by the user through the smart contract;

[0169] Encrypt the plaintext code in the target policy information according to the target public key information in the target key pair information to obtain encrypted policy information;

[0170] The encrypted policy information is displayed through a smart contract, so that the user can decrypt the encrypted policy information according to the target private key information in the target key pair information to obtain the target policy code;

[0171] Verify the target strategy code and complete the strategy transaction.

[0172] Furthermore, the strategic transaction completion module 705 is further specifically configured to:

[0173] Perform hash calculation on the target policy code based on the hash algorithm to obtain the code identifier to be verified;

[0174] Compare the code identifier to be verified with the code identifier of each policy code to obtain an identifier verification result;

[0175] Verify the target strategy code according to the transaction information list and obtain the code verification result;

[0176] When both the identification verification result and the code verification result meet the preset verification requirements, the strategy transaction is completed.

[0177] Figure 8 This is a schematic diagram of the structure of the electronic device provided in the embodiment of the present application. Figure 8 As shown, the electronic device 80 includes:

[0178] The electronic device 80 may include one or more processors 801 , one or more computer-readable storage media memories 802 , and a communication component 803 . The processor 801 , the memory 802 , and the communication component 803 are connected via a bus 804 .

[0179] In a specific implementation process, at least one processor 801 executes the computer-executable instructions stored in the memory 802 , so that at least one processor 801 executes the above-mentioned processing method for strategic trading.

[0180] The specific implementation process of the processor 801 can be found in the above method embodiment. Its implementation principle and technical effects are similar and will not be repeated here in this embodiment.

[0181] In the above Figure 8 In the illustrated embodiment, it should be understood that the processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASICs), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the present invention may be directly executed by a hardware processor or by a combination of hardware and software modules in the processor.

[0182] The memory may include a high-speed memory (Random Access Memory, RAM), and may also include a non-volatile memory (NVM), such as at least one disk memory.

[0183] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. Buses can be classified as address buses, data buses, and control buses. For ease of illustration, the buses in the drawings of this application are not limited to just one bus or just one type of bus.

[0184] The specific implementation of the above operations can be found in the previous embodiments and will not be repeated here.

[0185] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be accomplished by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0186] To this end, an embodiment of the present application provides a computer-readable storage medium, which stores multiple instructions. The instructions can be loaded by a processor to execute the steps in any one of the strategic transaction processing methods provided in the embodiment of the present application.

[0187] The storage medium may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0188] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present application that follow the general principles of the present application and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, and the true scope and spirit of the present application are indicated by the following claims.

[0189] It should be noted that for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all optional embodiments, and the actions and modules involved are not necessarily required by this application.

[0190] It should be further noted that, although the various steps in the flowchart are shown in sequence as indicated by the arrows, these steps are not necessarily performed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps may be performed in other orders. Moreover, at least a portion of the steps in the flowchart may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily performed at the same time, but may be performed at different times. The execution order of these sub-steps or stages is not necessarily to be performed in sequence, but may be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.

[0191] It should be understood that the above-described device embodiments are merely illustrative, and the device of the present application may also be implemented in other ways. For example, the division of units / modules in the above-described embodiments is merely a logical functional division, and actual implementations may employ other division methods. For example, multiple units, modules, or components may be combined or integrated into another system, or some features may be omitted or not implemented.

[0192] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present application that follow the general principles of the present application and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, and the true scope and spirit of the present application are indicated by the following claims.

[0193] It should be understood that the present application is not limited to the exact structure described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A method for processing strategic trading, characterized in that: include: Obtaining at least one strategy code and a code identifier for each strategy code, wherein the at least one strategy code is obtained by optimizing the code of at least one developed strategy based on historical transaction information of historical strategy codes; For each strategy code, executing the strategy code to generate transaction information; determining, according to the transaction information and the code identifier of the policy code, policy information for indicating a transaction execution logic corresponding to the transaction information; The policy information corresponding to each policy code is displayed through a smart contract, so that a user can determine target policy information from at least one policy information, and the smart contract is used to instruct the execution of the policy information and policy transactions; Complete the strategy transaction according to the target strategy information and the smart contract.

2. The processing method according to claim 1, characterized in that Get at least one policy code and the code identifier for each policy code, including: Obtain historical transaction information of at least one initial strategy code and a historical strategy code; Optimizing and adjusting the at least one initial strategy code according to historical transaction information of the historical strategy code to obtain at least one strategy code; Perform hash calculation on the at least one policy code according to a hash algorithm to obtain a code identifier of each policy code.

3. The processing method according to claim 1, characterized in that Determining policy information according to the transaction information and the code identifier of the policy code includes: Determining, based on the transaction information, key pair information and a transaction execution list corresponding to the transaction information, wherein the transaction information list includes transaction execution logic corresponding to the transaction information; Policy information is determined according to the code identifier, the key pair information, and the transaction information list.

4. The processing method according to claim 3, characterized in that Determining policy information according to the code identifier, the key pair information, and the transaction information list includes: Determining public key information and secret key information according to the key pair information; Encrypting the transaction information according to the public key information to obtain encrypted transaction information; Delay decryption of the encrypted transaction information according to the preset delayed decryption time and the secret key information to obtain the target transaction information; Strategy information is determined according to the code identifier, the target transaction information, and the transaction information list.

5. The processing method according to any one of claims 1 to 3, characterized in that The policy information corresponding to each policy code is displayed through a smart contract, so that users can determine the target policy information from at least one policy information, including: The policy information corresponding to each policy code is displayed through a smart contract, so that the user can determine at least one initial policy information from at least one policy information; Verifying the at least one initial policy information according to the historical policy information of the historical policy code to obtain a verification result of the at least one initial policy information, wherein the verification result is used to indicate policy execution performance of the at least one initial policy information; The verification result of the at least one initial policy information is displayed through the smart contract, so that the user can determine the target policy information from the at least one initial policy information.

6. The processing method according to any one of claims 1 to 3, characterized in that: According to the target policy information and the smart contract, a policy transaction is completed, including: Receive target code identification and target key pair information sent by the user through the smart contract; Encrypting the plaintext code in the target policy information according to the target public key information in the target key pair information to obtain encrypted policy information; The encrypted policy information is displayed through the smart contract, so that the user can decrypt the encrypted policy information according to the target private key information in the target key pair information to obtain the target policy code; The target strategy code is verified to complete the strategy transaction.

7. The strategic trading method according to claim 6, characterized in that: Verify the target strategy code and complete the strategy transaction, including: Performing hash calculation on the target policy code based on a hash algorithm to obtain a code identifier to be verified; Comparing the code identifier to be verified with the code identifier of each policy code to obtain an identifier verification result; Verify the target strategy code according to the transaction information list to obtain a code verification result; When both the identification verification result and the code verification result meet the preset verification requirements, the strategic transaction is completed.

8. A strategic trading processing device, characterized in that: include: an acquisition module, configured to acquire at least one strategy code and a code identifier of each strategy code, wherein the at least one strategy code is obtained by optimizing the code of at least one developed strategy based on historical transaction information of the historical strategy code; A transaction information generation module, configured to execute each policy code and generate transaction information; a policy information determination module, configured to determine policy information based on the transaction information and a code identifier of the policy code, wherein the policy information is used to indicate a transaction execution logic corresponding to the transaction information; a target policy information determination module, configured to display the policy information corresponding to each policy code through a smart contract, so that a user can determine the target policy information from at least one policy information, wherein the smart contract is configured to instruct the execution of the policy information and policy transactions; The strategy transaction completion module is used to complete the strategy transaction according to the target strategy information and the smart contract.

9. An electronic device, characterized in that: include: a processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 7 when executed by a processor.