CN-122023002-A - Method, device and equipment for processing blockchain data
Abstract
The embodiment of the specification discloses a processing method, a device and equipment of blockchain data, the method comprises the steps of constructing a private test chain identical to a target public chain based on information of the target public chain, generating a transaction strategy aiming at preset risks based on risk behaviors corresponding to the preset risks in the target public chain, executing preset transaction processing on the private test chain based on the transaction strategy, acquiring transaction behavior data comprising upstream and downstream resource link information generated by executing preset transaction processing on the private test chain, and performing data expansion processing on the acquired transaction behavior data comprising the upstream and downstream resource link information based on the acquired transaction behavior data comprising the upstream and downstream resource link information through preset expansion rules to obtain a transaction behavior data set aiming at the preset risks in the blockchain.
Inventors
- WU FAJIE
- WU ZHIYING
- WANG TAO
- SONG BOWEN
- CHEN JUN
Assignees
- 支付宝(杭州)数字服务技术有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260130
Claims (10)
- 1. A method of processing blockchain data, the method comprising: constructing a private test chain identical to a target public chain based on information of the target public chain; generating a transaction strategy aiming at the preset risk based on a risk behavior corresponding to the preset risk in the target public chain; Executing preset transaction processing on the private test chain based on the transaction policy, and acquiring transaction behavior data containing upstream and downstream resource link information generated by executing preset transaction processing on the private test chain; based on the acquired transaction behavior data containing the upstream and downstream resource link information, carrying out data expansion processing on the acquired transaction behavior data containing the upstream and downstream resource link information through a preset expansion rule to obtain a transaction behavior data set aiming at preset risks in the blockchain.
- 2. The method of claim 1, the constructing a private test chain that is identical to the target public chain based on information of the target public chain, comprising: Creating a bifurcation chain on the target public chain, and re-engraving information of the target public chain at a preset block height, wherein the re-engraving information comprises one or more of deployed intelligent contracts, the number of residual resources in an account and historical transaction data; Based on the information of the re-etching, configuring the created bifurcation chain to obtain an initial private test chain which is the same as the target public chain and controllable, distributing test resources for each simulated account preset in the initial private test chain, and configuring network parameters of the initial private test chain to enable a corresponding network to be matched with an actual network so as to obtain the private test chain which is the same as the target public chain.
- 3. The method of claim 1, the generating a transaction policy for the preset risk based on risk behaviors corresponding to the preset risk in the target public chain, comprising: Determining a transaction processing rule required by preset transaction processing to be executed based on risk behaviors corresponding to preset risks in the target public chain, wherein the transaction processing rule comprises one or more of a resource dismantling rule, a resource extraction time sequence rule, a repeater selection rule and a Gas price selection rule, the resource dismantling rule is used for dismantling resources to be saved into a plurality of resources conforming to the fixed resource quantity in a coin mixing pool, the resource extraction time sequence rule is used for extracting resources according to the preset time sequence rule, and the Gas price selection rule is used for selecting Gas price according to network conditions; based on the determined transaction processing rules, a transaction policy is generated for the preset risk.
- 4. A method according to claim 3, the transaction processing rules comprising Gas price selection rules, the generating a transaction policy for the preset risk based on the determined transaction processing rules comprising: Determining a transaction confirmation mode corresponding to preset transaction processing to be executed through a preset Gas price fluctuation model based on risk behaviors corresponding to preset risks in the target public chain, wherein the transaction confirmation mode comprises a quick confirmation mode and a delay confirmation mode; And generating a transaction strategy aiming at the preset risk based on the transaction confirmation mode and a preset data recording rule, wherein the data recording rule is used for recording one or more of Gas price information, gas consumption and transaction confirmation duration.
- 5. The method of claim 1, the method further comprising: acquiring a resource access address pair subjected to the mixed coin transaction from a preset security report of the coin theft event; Executing preset transaction processing on the private test chain based on the transaction policy, and acquiring transaction behavior data containing upstream and downstream resource link information generated by executing preset transaction processing on the private test chain, wherein the transaction behavior data comprises: Executing preset transaction processing on the private test chain based on the transaction policy, and calling a blockchain crawler to crawl upstream and downstream resource link information generated by executing preset transaction processing on the private test chain based on the resource access address pair, wherein the upstream and downstream resource link information comprises one or more of resource sources, information of associated interactive intelligent contracts, resource directions, transaction frequency and a resource dismantling mode; The transaction performance data is determined based on the upstream and downstream resource link information.
- 6. The method of claim 5, the determining the transaction behavior data based on the upstream and downstream resource link information comprising: Constructing a resource flow graph based on the upstream and downstream resource link information, wherein the resource flow graph comprises nodes and edges, the nodes are constructed by resource extraction addresses, resource saving addresses or intelligent contracts, the edges represent that transactions exist between the two nodes, and the edges also comprise attribute information, and the attribute information comprises one or more of resource quantity, time stamp and transaction type; And determining the transaction behavior data based on the resource flow graph.
- 7. The method according to claim 1 or 6, wherein the performing data expansion processing on the acquired transaction behavior data including the upstream and downstream resource link information according to a preset expansion rule based on the acquired transaction behavior data including the upstream and downstream resource link information to obtain a transaction behavior data set aiming at a preset risk in a blockchain includes: performing text description on the transaction behavior data to obtain a description text corresponding to the transaction behavior data; Generating corresponding prompt information based on the description text corresponding to the transaction behavior data, inputting the prompt information and the description text corresponding to the transaction behavior data into a large language model, and guiding the large language model to perform data expansion processing on the transaction behavior data through the prompt information to obtain expanded transaction behavior data; And constructing a transaction behavior data set aiming at preset risks in a blockchain based on the transaction behavior data and the expanded transaction behavior data.
- 8. The method according to claim 1 or 6, wherein the performing data expansion processing on the acquired transaction behavior data including the upstream and downstream resource link information according to a preset expansion rule based on the acquired transaction behavior data including the upstream and downstream resource link information to obtain a transaction behavior data set aiming at a preset risk in a blockchain includes: acquiring target transaction behavior data from the target public chain based on the acquired transaction behavior data containing the upstream and downstream resource link information; And constructing a transaction behavior data set aiming at preset risks in the blockchain based on the acquired transaction behavior data containing the upstream and downstream resource link information and the target transaction behavior data.
- 9. A processing apparatus of blockchain data, the apparatus comprising: the private chain creation module is used for constructing a private test chain identical to the target public chain based on the information of the target public chain; The transaction strategy generation module is used for generating a transaction strategy aiming at the preset risk based on the risk behavior corresponding to the preset risk in the target public chain; the transaction execution module is used for executing preset transaction processing on the private test chain based on the transaction strategy and acquiring transaction behavior data containing upstream and downstream resource link information generated by executing the preset transaction processing on the private test chain; the data acquisition module is used for carrying out data expansion processing on the acquired transaction behavior data containing the upstream and downstream resource link information through a preset expansion rule based on the acquired transaction behavior data containing the upstream and downstream resource link information, so as to obtain a transaction behavior data set aiming at preset risks in the blockchain.
- 10. A processing apparatus of blockchain data, the processing apparatus of blockchain data comprising: Processor, and A memory arranged to store computer executable instructions that, when executed, cause the processor to: constructing a private test chain identical to a target public chain based on information of the target public chain; generating a transaction strategy aiming at the preset risk based on a risk behavior corresponding to the preset risk in the target public chain; Executing preset transaction processing on the private test chain based on the transaction policy, and acquiring transaction behavior data containing upstream and downstream resource link information generated by executing preset transaction processing on the private test chain; based on the acquired transaction behavior data containing the upstream and downstream resource link information, carrying out data expansion processing on the acquired transaction behavior data containing the upstream and downstream resource link information through a preset expansion rule to obtain a transaction behavior data set aiming at preset risks in the blockchain.
Description
Method, device and equipment for processing blockchain data Technical Field The present disclosure relates to the field of computer technologies, and in particular, to a method, an apparatus, and a device for processing blockchain data. Background The blockchain technology is widely applied in the field of financial transactions by virtue of the characteristic of non-tampering and decentralization, but also provides convenience for a plurality of illegal activities due to anonymity. The coin-mixing service is used as a key technology for enhancing the privacy of blockchain transactions, and by collecting resources of a plurality of users and reallocating the resources with new addresses, the source and destination association of the resources are cut off. Based on the recognition model of preset risks (such as fraud risks, privacy data leakage risks, illegal financial activity risks and the like) of machine learning, huge potential is presented in the aspect of recognizing complex resource network modes, but the performance of the model is highly dependent on high-quality training data. However, the anonymous nature of the mixing service makes it extremely difficult to obtain large-scale transaction data with accurate tags, which has become a key bottleneck limiting the development of risk identification technologies in the mixing service. Therefore, a technical scheme capable of accurately displaying the mixed coin transaction scene and providing reliable label data is required to be constructed so as to improve the performance of risk identification models such as illegal financial activities in the block chain mixed coin service. Disclosure of Invention The embodiment of the specification aims to construct a technical scheme capable of accurately displaying a mixed coin transaction scene and providing reliable tag data so as to improve the performance of risk identification models such as illegal financial activities in a blockchain mixed coin service. In order to achieve the above technical solution, the embodiments of the present specification are implemented as follows: The method for processing the blockchain data comprises the steps of constructing a private test chain identical to a target public chain based on information of the target public chain, generating a transaction strategy aiming at preset risks based on risk behaviors corresponding to the preset risks in the target public chain, executing preset transaction processing on the private test chain based on the transaction strategy, acquiring transaction behavior data comprising upstream and downstream resource link information generated by executing the preset transaction processing on the private test chain, and performing data expansion processing on the acquired transaction behavior data comprising the upstream and downstream resource link information based on the acquired transaction behavior data comprising the upstream and downstream resource link information through preset expansion rules to obtain a transaction behavior data set aiming at the preset risks in the blockchain. The device for processing the blockchain data comprises a private chain creation module, a transaction strategy generation module, a transaction execution module and a data acquisition module, wherein the private chain creation module is used for building a private test chain identical to a target public chain based on information of the target public chain, the transaction strategy generation module is used for generating a transaction strategy aiming at preset risks based on risk behaviors corresponding to the preset risks in the target public chain, the transaction execution module is used for executing preset transaction processing on the private test chain based on the transaction strategy and acquiring transaction behavior data comprising upstream and downstream resource link information generated by executing the preset transaction processing on the private test chain, and the data acquisition module is used for carrying out data expansion processing on the acquired transaction behavior data comprising the upstream and downstream resource link information based on the acquired transaction behavior data comprising the upstream and downstream resource link information through preset expansion rules to acquire a transaction behavior data set aiming at the preset risks in the blockchain. The processing device of the blockchain data comprises a processor and a memory, wherein the memory is arranged to store computer executable instructions, the executable instructions enable the processor to construct a private test chain identical to a target public chain based on information of the target public chain when being executed, generate a transaction strategy aiming at the preset risk based on risk behaviors corresponding to the preset risk in the target public chain, execute preset transaction processing on the private test chain based on the transaction strategy,