Digital currency data processing system and method based on block chain
By building a digital currency data processing system on the blockchain network, using integrated models and smart contract interactions, the management lag and complexity problems of detecting abnormal transaction behaviors of digital currency in the existing technology are solved, and the effect of high accuracy and dynamic management is achieved.
Patent Information
- Application Number
- CN202411755008.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-02
- Publication Date
- 2025-04-18
AI Technical Summary
The existing technology has problems such as management lag when detecting abnormal transaction behaviors of digital currency, the inability of a single machine learning model to cope with complex trading scenarios, and the lack of unified management standards.
The blockchain-based digital currency data processing system is adopted to build an integrated model to detect abnormal transaction behaviors through the smart contract interaction between management nodes, service nodes, model scheduling modules and integrated management modules, and ensure the unity of information sharing and management strategies through the incentive mechanism module and management consensus module.
It realizes accurate and timely detection of abnormal transaction behaviors of digital currency, improves the accuracy of detection results, can dynamically adjust the model to deal with changing transaction scenarios, and realizes information transparency, immutability and security through the decentralized characteristics of blockchain.
Smart Images

Figure CN119850211A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of blockchain technology, and specifically to a blockchain-based digital currency data processing system and method. Background Art
[0002] Digital currency is a type of encrypted virtual currency. Currently, the management of digital currency transactions has the following main problems: (1) The use of static strategies for management is prone to management lags and the inability to detect abnormal transactions in a timely manner. Specifically, static strategies are based on the type of abnormal transaction behavior to be monitored (i.e., monitoring requirements) and behavioral characteristics, and then screen digital currency transactions based on the rules to determine abnormal transactions. With the rapid development of digital currency technology, monitoring requirements and behavioral characteristics of abnormal transactions are constantly changing. Pre-set rules usually cannot meet monitoring requirements or cannot screen out abnormal transactions, resulting in management lags. (2) Using a single machine learning model to detect abnormal transactions of digital currencies, this method can only detect whether there is abnormal transaction behavior in some relatively simple transaction scenarios, and cannot cope with more complex transaction scenarios, resulting in missed detection and false detection of abnormal transactions. (3) The existing management methods lack unified management standards, and different management agencies cannot effectively share management information, which also leads to management lags.
[0003] Accordingly, the art needs a new technical solution to solve the above problems. Summary of the invention
[0004] In order to overcome the above-mentioned defects, the present application is proposed to solve or at least partially solve the following technical problem: how to accurately and timely detect abnormal transaction behavior of digital currency.
[0005] In a first aspect, a digital currency data processing system based on blockchain is provided, the system comprising a management node, a service node, a model scheduling module and an integrated management module deployed on a blockchain network, wherein the management node, the service node, the model scheduling module and the integrated management module interact with each other through a smart contract of the blockchain network;
[0006] The management node is configured to: issue a management task to the blockchain network, wherein the management task is to detect whether the transaction behavior of the digital currency is an abnormal transaction behavior of a preset type;
[0007] The service node is configured to: upload a base model applied to the management task to the blockchain network, register the base model in the model library of the model scheduling module as a candidate base model, and the base model is a machine learning model for detecting whether the transaction behavior of digital currency is the abnormal transaction behavior;
[0008] The model scheduling module is configured to: select multiple candidate base models from the model library as target base models, and combine all target base models to form an integrated model;
[0009] The integrated management module is configured to: use the integrated model to detect the transaction behavior of the digital currency to obtain a detection result, and the detection result is used to indicate whether the transaction behavior to be detected is an abnormal transaction behavior of the preset type.
[0010] In a technical solution of the digital currency data processing system, the model scheduling module is configured to select multiple candidate base models as target base models in the following manner:
[0011] Acquire all candidate base models in the model library that are applied to the management task;
[0012] All the candidate base models are used as the target base models, or a plurality of the candidate base models are selected as the target base models according to the performance of each of the candidate base models among all the candidate base models.
[0013] In a technical solution of the above digital currency data processing system, the model scheduling module is configured to:
[0014] If it is detected that the behavior characteristics of the preset type of abnormal transaction behavior have changed, and at least one target base model in the integrated model is invalid, multiple valid candidate base models are re-selected from the model library as target base models, and all target base models are combined to form an integrated model;
[0015] in,
[0016] The failure of the target base model indicates that the target base model cannot detect whether the transaction behavior to be detected is an abnormal transaction behavior of a preset type;
[0017] The effective candidate base model is capable of detecting whether the transaction behavior to be detected is an abnormal transaction behavior of a preset type.
[0018] In a technical solution of the digital currency data processing system, the integrated management module is configured to detect the transaction behavior of the digital currency to be detected by using the integrated model to obtain the detection result in the following manner:
[0019] Obtaining each target base model in the integrated model;
[0020] Using each of the target base models to detect the transaction behavior to be detected, respectively, to obtain a first detection result of each of the target base models;
[0021] The first detection results of all target base models are fused to obtain the second detection result of the integrated model.
[0022] In a technical solution of the digital currency data processing system, the value of the first detection result is 0 or 1, 0 indicates that the transaction behavior to be detected is not the abnormal transaction behavior, and 1 indicates that the transaction behavior to be detected is the abnormal transaction behavior, and the integrated management module is configured to fuse the first detection results of all target base models in the following manner:
[0023] Obtaining the largest value among the values of the first detection results of all target base models as the target value;
[0024] According to the target value, a second detection result of the integrated model is obtained.
[0025] In a technical solution of the digital currency data processing system, the value of the first detection result is the probability that the transaction behavior to be detected is the abnormal transaction behavior, and the integrated management module is configured to fuse the first detection results of all target base models in the following manner:
[0026] Obtaining a weighted average of the values of the first detection results of all target base models;
[0027] According to the weighted average value, a second detection result of the integrated model is obtained.
[0028] In a technical solution of the digital currency data processing system, the integrated management module is configured to obtain a weighted average value of the values of the first detection results of all target base models in the following manner:
[0029] Obtaining the weight of each target base model;
[0030] Performing weighted sum calculation according to the weight of each target base model and the value of the first detection result of each target base model to obtain the weighted average value;
[0031] in,
[0032] The weight of the i-th target base model is F1 i represents the performance index value of the i-th target base model, i=1,…,N, and N represents the total number of the target base models.
[0033] In a technical solution of the above digital currency data processing system, the system further includes an incentive mechanism module deployed on the blockchain network, and the incentive mechanism module is configured to:
[0034] Obtaining the service nodes corresponding to each target base model in the integrated model;
[0035] An incentive value is allocated to the service node corresponding to each target base model.
[0036] In a technical solution of the digital currency data processing system, the incentive mechanism module is configured to allocate incentive values to the service nodes corresponding to the target base models in the following manner:
[0037] The contribution of each target base model is obtained by using the Shapley value method;
[0038] According to the contribution of each target base model, an incentive value is allocated to the service node corresponding to each target base model.
[0039] In a technical solution of the digital currency data processing system, the management node is configured to: determine a management strategy for the transaction behavior to be detected based on the detection result obtained by the integrated model;
[0040] The system also includes a management consensus module deployed on the blockchain network, and the management consensus module is configured to: perform consensus processing on the management strategy based on the consensus mechanism of the blockchain network.
[0041] In a second aspect, a blockchain-based digital currency data processing method is provided, which is applied to the blockchain-based digital currency data processing system provided in the first aspect, wherein the management node in the system is a node registered by the management agency on the blockchain network, and the service node is a node registered by the service agency on the blockchain network, and the method includes:
[0042] The management agency issues management tasks to the blockchain network through the management node;
[0043] The service agency uploads the base model applied to the management task to the blockchain network through the service node, and registers the base model in the model library of the model scheduling module as a candidate base model;
[0044] The management agency selects a plurality of candidate base models as target base models from the model library through the model scheduling module in the system, and combines all target base models together to form an integrated model;
[0045] The management agency uses the integrated model to detect the transaction behavior of the digital currency to be detected through the integrated management module in the system to obtain the detection result.
[0046] In a technical solution of the above-mentioned digital currency data processing method, the method includes: the management agency obtains the service nodes corresponding to each target base model in the integrated model through the incentive mechanism module in the system, and allocates incentive values to the service nodes corresponding to each target base model.
[0047] The above one or more technical solutions of the present application have at least one or more of the following beneficial effects:
[0048] In a technical solution for implementing a blockchain-based digital currency data processing system provided by the present application, the system includes a management node, a service node, a model scheduling module and an integrated management module deployed on a blockchain network, and the management node, the service node, the model scheduling module and the integrated management module interact with each other through the smart contract of the blockchain network; the management node is configured to issue a management task to the blockchain network, and the management task is to detect whether the transaction behavior of the digital currency is an abnormal transaction behavior of a preset type; the service node is configured to upload a base model applied to the management task to the blockchain network, and register the base model in the model library of the model scheduling module as a candidate base model, and the base model is a machine learning model for detecting whether the transaction behavior of the digital currency is an abnormal transaction behavior; the model scheduling module is configured to select multiple candidate base models from the model library as target base models, and combine all target base models together to form an integrated model; the integrated management module is configured to use the integrated model to detect the transaction behavior to be detected of the digital currency to obtain a detection result, and the detection result is used to indicate whether the transaction behavior to be detected is an abnormal transaction behavior of a preset type.
[0049] In the above system, an integrated model is used to detect the transaction behavior of digital currency to be detected. The integrated model is composed of multiple target base models or integrated together. Compared with the use of a single machine learning model, it can significantly improve the accuracy of the detection results. In addition, when the monitoring needs and the behavioral characteristics of abnormal transaction behaviors change, the target base model in the integrated model can be dynamically adjusted through the model scheduling module to meet the monitoring needs and accurately detect abnormal transaction behaviors, thereby realizing the dynamic management of digital currency transaction behaviors. In addition, the management nodes, service nodes, model scheduling modules and integrated management modules in the above system are all deployed on the blockchain network, and interact through the smart contracts of the blockchain network. Based on this, with the help of the decentralized characteristics of the blockchain network, effective information sharing can be achieved between management nodes and service nodes and between different management nodes, and the transparency, immutability and security of information can be guaranteed. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] The disclosure of the present application will become easier to understand with reference to the accompanying drawings. It is easy for those skilled in the art to understand that these drawings are only for illustrative purposes and are not intended to limit the scope of protection of the present application. Among them:
[0051] Figure 1 This is a schematic diagram of the main structure of a digital currency data processing system based on blockchain according to an embodiment of the present application. Figure 1 ;
[0052] Figure 2 This is a schematic diagram of the main structure of a digital currency data processing system based on blockchain according to an embodiment of the present application. Figure 2 ;
[0053] Figure 3 It is a flowchart of the main steps of a blockchain-based digital currency data processing method according to an embodiment of the present application. DETAILED DESCRIPTION
[0054] Some embodiments of the present application are described below with reference to the accompanying drawings. Those skilled in the art should understand that these embodiments are only used to explain the technical principles of the present application and are not intended to limit the protection scope of the present application.
[0055] The digital currency involved in each embodiment of the present application is a digital currency that is legally permitted to be traded. The digital currency transactions involved in each embodiment of the present application are all obtained in strict accordance with the requirements of laws and regulations, following the principles of legality, legitimacy and necessity, and based on the reasonable purpose of abnormal transaction behavior detection.
[0056] The following is a description of an embodiment of a blockchain-based digital currency data processing system provided by the present application.
[0057] See attached Figure 1 , Figure 1 FIG. 1 is a schematic diagram of the main structure of a digital currency data processing system according to an embodiment of the present application. Figure 1 As shown, the digital currency data processing system in the embodiment of the present application mainly includes a management node, a service node, a model scheduling module and an integrated management module deployed on the blockchain network, and the management node, the service node, the model scheduling module and the integrated management module interact with each other through the smart contract of the blockchain network. The management node, the service node, the model scheduling module and the integrated management module are described below.
[0058] 1. Describe the management node.
[0059] The management node is a node registered by the management agency on the blockchain network. The management agency is an agency that manages digital currency, such as a bank, a financial supervision and management agency, etc. The system provided by the present application may also include a management node module deployed on the blockchain network, which may be configured to verify the identity of the management agency, ensuring that all management agencies are authorized and have legal management authority, that is, ensuring the legitimacy, traceability, transparency and security of the management agency's identity.
[0060] The management node can be configured to issue management tasks to the blockchain network. The management task is to detect whether the transaction behavior of digital currency is a preset type of abnormal transaction behavior. The management agency can pre-set the type of abnormal transaction behavior (i.e. the above preset type), specify the management task according to the preset type, and issue the management task to the blockchain network through the management node.
[0061] Abnormal trading behavior can be understood as trading behavior that is not conducted in accordance with the requirements of laws and regulations, and normal trading behavior can be understood as trading behavior that is conducted in accordance with the requirements of laws and regulations.
[0062] 2. Describe the service node.
[0063] A service node is a node registered by a service agency on the blockchain network. Registration can ensure the legitimacy and traceability of the service agency's identity.
[0064] After the management node publishes the management task to the blockchain network, the blockchain network will automatically notify the service node to encourage the service agency to actively participate in the management task and upload the machine learning model applied to the management task to the blockchain network. The service agency can obtain the management task from the blockchain network through the service node, and train a machine learning model according to the preset type of abnormal transaction behavior specified by the management task. This machine learning model is used to detect whether the transaction behavior of digital currency is an abnormal transaction behavior of the preset type, that is, this machine learning model is actually a binary classification model. The service agency then uploads this machine learning model to the blockchain network through the service node. Specifically, the service node can be configured to upload the base model applied to the management task to the blockchain network, register the base model in the model library of the model scheduling module as a candidate base model, and the base model is the above-mentioned machine learning model. The base model is used to detect whether the transaction behavior of digital currency is an abnormal transaction behavior of the preset type. After the service node uploads the base model to the blockchain network, the blockchain network will automatically notify the management node to notify the management agency to obtain the base model uploaded by the service node, and then verify and use the base model.
[0065] In some embodiments, when issuing management tasks to the blockchain network, the management node can also upload training data related to the management tasks to the blockchain network. The service agency can obtain the training data from the blockchain network through the service node, and then use the training data to train the machine learning model. In addition, the service agency can also use the above training data and combine it with its own private training data to train the machine learning model. When the service agency uploads the machine learning model to the blockchain network through the service node, it can also upload the accuracy report of the machine learning model together, so that the management agency can review the machine learning model according to the accuracy report. The accuracy report can record the performance indicators of the machine learning model (such as precision, recall, etc.). In some embodiments, the management agency can upload a part of the training data to the blockchain network through the management node, and keep the remaining training data confidential. After the service node uploads the base model to the blockchain network, the management agency can use the remaining training data through the management node to verify the performance of the base model (such as precision, recall, etc.).
[0066] For example, the training data can be data from the Elliptic dataset. In addition, the training data can also contain information such as the transaction frequency, scale and pattern of digital currencies. The transaction frequency refers to the number of transactions of a digital currency in a specific time (such as per second, per minute, per hour). The transaction scale refers to the total number of transactions of a certain digital currency in a period of time. Transaction behavior patterns (such as multiple small transfers in a short period of time, frequent changes in transaction addresses) are often typical characteristics of abnormal transactions.
[0067] 3. Explain the model scheduling module.
[0068] The model scheduling module can be configured to select multiple candidate base models from the model library as target base models, and combine all target base models to form an integrated model. In other words, the integrated model consists of multiple target base models. Compared with using a single machine learning model, the integrated model can significantly improve the accuracy of the detection results.
[0069] When a new type of abnormal transaction behavior needs to be detected (i.e., there is a new management requirement), a new management task can be issued through the management node. This new management task is used to detect whether the transaction behavior of digital currency is the above-mentioned new type of abnormal transaction behavior. Each service agency obtains this new management task through the service node, and trains a base model according to this new management task, uploads the base model to the blockchain network, and registers it in the model library of the model scheduling module. Then, the model scheduling module selects multiple base models from the base models uploaded by these service agencies as target base models, and combines all target base models to form an integrated model. At this time, this integrated model is used for the above-mentioned new type of abnormal transaction behavior. In the above manner, no matter when new management requirements are added, no matter how many types of management requirements are added, each management requirement can be responded to, and an integrated model applied to each management requirement can be obtained.
[0070] With the rapid development of digital currency technology, the behavioral characteristics of abnormal trading behaviors (such as transaction scale, transaction frequency, etc.) may change. Some of the original target base models in the integrated model (hereinafter described as invalid base models) may not be able to accurately detect the above abnormal trading behaviors. If new base models (base models for detecting the above abnormal trading behaviors) are registered in the model library and the performance of these new base models is higher than that of the above invalid base models, and can accurately detect the above abnormal trading behaviors, then these new base models will be used as valid base models. The model scheduling module can select these valid base models to replace the above invalid base models as new target base models to obtain an integrated model again. The subsequent system will use this newly obtained integrated model to detect the above abnormal trading behaviors. Based on this, the dynamic adjustment of the target base model in the integrated model is realized to ensure that the integrated model can effectively detect whether the digital currency trading behavior is abnormal trading behavior in the long term.
[0071] For example, the base modules for management task A in the model library include model 1, model 2, model 3, model 4, and model 5, and the performance (precision or recall, etc.) of model 1, model 2, model 3, model 4, and model 5 decreases in sequence. The model scheduling module selects model 1, model 2, and model 3 as target base models, and combines all target base models to form an integrated model for management task A. After a period of time, due to the change in the behavioral characteristics (such as transaction scale, transaction frequency, etc.) of the abnormal transaction behavior to be detected by management task A, the performance of models 2 to 5 is reduced, and the abnormal transaction behavior cannot be accurately detected. At this time, models 6 and 7 are added to the model library. The performance of models 6 and 7 is higher than that of models 2 to 5, and the abnormal transaction behavior can be accurately detected. According to the model performance from high to low, they are model 6, model 7, model 1, model 2, model 3, model 4, and model 5. The model scheduling module selects model 6, model 7, and model 1 as target base models, and combines all target base models to form an integrated model for management task A.
[0072] Specifically, in some embodiments, the model scheduling module can be configured to reselect multiple valid candidate base models from the model library as target base models if the behavior characteristics of the preset type of abnormal transaction behavior are detected to have changed, and at least one target base model in the integrated model fails, and all target base models are combined to form an integrated model; wherein the failure of the target base model indicates that the target base model cannot detect whether the transaction behavior to be detected is an abnormal transaction behavior of the preset type; the valid candidate base model is able to detect whether the transaction behavior to be detected is an abnormal transaction behavior of the preset type. The valid candidate base model can be a base model that already exists in the model library before the behavior characteristics of the abnormal transaction behavior, or it can be a base model newly added to the model library after the behavior characteristics of the abnormal transaction behavior.
[0073] In some embodiments, the model scheduling module may be configured to select multiple candidate base models as target base models in the following manner:
[0074] Obtain all candidate base models applied to management tasks in the model library; use all candidate base models as target base models, or select multiple candidate base models as target base models according to the performance of each candidate base model among all candidate base models. For example, sort the candidate base models according to the order of performance from high to low, and select the candidate base models ranked from the 1st to the kth, where k≥2. When determining the performance of the candidate base model, the performance indicators (such as precision, recall, etc.) of the candidate base model can be obtained, and the performance can be determined according to the size of the performance indicators. For example, the greater the precision, the higher the performance; the smaller the precision, the lower the performance.
[0075] 4. Explain the integrated management module.
[0076] The integrated management module can be configured to use an integrated model to detect the transaction behavior of the digital currency to be detected and obtain a detection result, and the detection result is used to indicate whether the transaction behavior to be detected is an abnormal transaction behavior of a preset type.
[0077] The integrated model consists of multiple target base models. When the integrated model is used to detect the transaction behavior of digital currency to be detected, each target base model can be used to detect the transaction behavior to be detected separately, and the detection results of all target base models are integrated using ensemble learning technology to obtain the final detection result. Through this implementation method, the accuracy of the detection results can be significantly improved, which helps the management agency to determine accurate and reliable management strategies based on the detection results when facing complex transaction behaviors.
[0078] In some implementations, after obtaining the detection results through the integrated management module, the management agency can obtain the detection results obtained by the integrated model through the management node, determine the management strategy for the transaction behavior to be detected based on the detection results, and publish the management strategy on the blockchain network. In other words, the management node can be configured to determine the management strategy for the transaction behavior to be detected based on the detection results obtained by the integrated model.
[0079] In some embodiments, the system provided by the present application also includes a management consensus module deployed on the blockchain network, and the management consensus module can be configured to perform consensus processing on the above-mentioned management strategy determined by the management node based on the consensus mechanism of the blockchain network. Through consensus processing, it can be ensured that each management node in the system reaches a consensus on the management strategy of the current transaction behavior to be detected, ensure the unity and consistency of the management strategy, and prevent the erroneous behavior of a single management node from affecting the entire management process of the current transaction behavior to be detected. In this embodiment, a conventional consensus mechanism can be used to perform consensus processing on the management strategy, for example, a Byzantine Fault Tolerance consensus (Practical Byzantine Fault Tolerance, PBFT) can be used.
[0080] Based on the digital currency data processing system composed of the above-mentioned management nodes, service nodes, model scheduling modules and integrated management modules, the detection accuracy of abnormal digital currency trading behaviors can be significantly improved, and the target base model in the integrated model can be dynamically adjusted according to the monitoring needs and the behavioral characteristics of abnormal trading behaviors, thus realizing the dynamic management of digital currency trading behaviors. In addition, with the help of the decentralized characteristics of the blockchain network, effective information sharing can be achieved between management nodes and service nodes, as well as between different management nodes, and the transparency, immutability and security of information can be guaranteed.
[0081] The following is a description of an embodiment of the blockchain-based digital currency data processing system provided by this application.
[0082] In some embodiments, the integrated management module implements the following steps 11 to 13 when using the integrated model to detect the transaction behavior of the digital currency to be detected.
[0083] Step 11: Obtain each target base model in the integrated model.
[0084] Step 12: Use each target base model to detect the transaction behavior to be detected, and obtain a first detection result of each target base model, where the first detection result is used to indicate whether the transaction behavior to be detected is an abnormal transaction behavior of a preset type specified by the management task.
[0085] Step 13: Fusing the first detection results of all target base models to obtain the second detection result of the integrated model. Specifically, the detection results of all target base models can be fused using Ensemble Learning technology.
[0086] Based on the methods described in steps 11 to 13 above, the accuracy of the integrated model in detecting the transaction behaviors of digital currencies to be detected can be improved.
[0087] In some implementations of the above step 13, the value of the first detection result is 0 or 1, 0 indicates that the transaction behavior to be detected is not an abnormal transaction behavior, and 1 indicates that the transaction behavior to be detected is an abnormal transaction behavior. The integrated management module can be configured to fuse the first detection results of all target base models in the following manner:
[0088] The largest value among the values of the first detection results of all target base models is obtained as the target value; according to the target value, the second detection result of the integrated model is obtained. Specifically, the value of the second detection result is set as the target value. If the target value is 0, the second detection result indicates that the transaction behavior to be detected is not an abnormal transaction behavior; if the target value is 1, the second detection result indicates that the transaction behavior to be detected is an abnormal transaction behavior. The above implementation can also be understood as a hard voting process for the first detection result. Through the above implementation, the fusion of the first detection result can be completed conveniently and accurately to obtain a highly accurate second detection result.
[0089] In some implementations of the above step 13, the value of the first detection result is the probability that the transaction behavior to be detected is an abnormal transaction behavior, and the integrated management module is configured to fuse the first detection results of all target base models in the following manner:
[0090] Obtain a weighted average of the numerical values of the first detection results of all target base models, and obtain the second detection result of the integrated model based on the weighted average value. Specifically, the weighted average value is used as the numerical value of the second detection result, and the numerical value of the second detection result is still the probability that the transaction behavior to be detected is an abnormal transaction behavior. If the numerical value of the second detection result is greater than the preset probability threshold, the second detection result indicates that the transaction behavior to be detected is an abnormal transaction behavior, otherwise the second detection result indicates that the transaction behavior to be detected is not an abnormal transaction behavior. When setting the numerical value of the probability threshold, those skilled in the art can obtain the detection probabilities of a large number of abnormal transaction behaviors, and then obtain the minimum detection probability, and set the numerical value of the probability threshold according to this minimum detection probability. The above implementation can also be understood as a soft voting process for the first detection result. Through the above implementation, the fusion of the first detection result can also be completed conveniently and accurately to obtain a highly accurate second detection result.
[0091] In some implementations, the integrated management module may be configured to obtain a weighted average value of the first detection results of all target base models in the following manner:
[0092] Obtain the weight of each target basis model, and perform weighted sum calculation based on the weight of each target basis model and the value of the first detection result of each target basis model to obtain a weighted average value. If there are 4 target basis models, the values of the first detection results of these 4 target basis models are d1, d2, d3, and d4 respectively, and the weights of these 4 target basis models are w1, w2, w3, and w4 respectively, and the weighted average value is d = d1×w1+d2×w2+d3×w3+d4×w4. In this embodiment, the weight of the i-th target basis model is F1 i represents the performance index value of the i-th target base model, i=1,…,N, N represents the total number of target base models. The performance index may be precision, recall, etc. In some embodiments, F1 i It can be the harmonic mean of precision and recall, Precision means precision, and Recall means recall.
[0093] Through the above implementation, the proportion of the first detection results of the target base model with higher performance in the fusion process can be increased, and the proportion of the first detection results of the target base model with lower performance in the fusion process can be reduced, thereby further improving the accuracy of the second detection result.
[0094] The following is a description of an embodiment of the blockchain-based digital currency data processing system provided by this application.
[0095] In some embodiments, the system provided by the present application also includes an incentive mechanism module deployed on the blockchain network. The incentive mechanism module can be configured to obtain the service nodes corresponding to each target base model in the integrated model and assign incentive values to the service nodes corresponding to each target base model.
[0096] After training the base model, the service agency can upload the base model to the blockchain network through the service node and register it in the model library. The service node corresponding to the target base model refers to the service node that uploads the target base model to the blockchain network. The incentive value can be understood as a reward for the service agency. By allocating incentive values to service nodes, more service agencies can be encouraged to participate in management tasks and upload base models applied to management tasks to the blockchain network.
[0097] In some embodiments, the incentive mechanism module can be configured to allocate incentive values to the service nodes corresponding to each target base model in the following manner: using the Shapley value method to obtain the contribution of each target base model respectively, and according to the contribution of each target base model, allocating incentive values to the service nodes corresponding to each target base model. The contribution degree can be understood as the contribution degree of the target base model to the integrated model. The higher the contribution degree, the more incentive values are allocated to the service nodes corresponding to the target base model, and vice versa.
[0098] According to the above embodiments, the management agency can upload a part of the training data to the blockchain network through the management node, and keep the remaining training data confidential. After the service node uploads the base model to the blockchain network, the management agency can use the remaining training data through the management node to verify the performance of the base model (such as precision, recall, etc.). In some embodiments, the verification results of each target base model can be obtained, and the contribution of each target base model can be determined based on the verification results. Based on this, the service agency can be encouraged to continuously optimize the model performance to ensure the long-term operation and efficient iteration of the digital currency data processing system.
[0099] The following is combined with Figure 2 , the digital currency data processing system embodiment provided by this application is described. Figure 2 As shown, the management node and service node in the digital currency data processing system ( Figure 2 The management node is a node registered by the management agency on the blockchain network, and the service node is a node registered by the service agency on the blockchain network.
[0100] The management agency can manage processing rules and entity relationship databases through management nodes, and obtain risk reports through the management chain service platform. The risk report includes risk types such as financial risk, technical risk, and content risk. These risk types can be obtained by the management agency after the management node obtains the detection results of the transaction behavior to be detected through the integrated management module, and the management agency further analyzes the detection results.
[0101] Managing node management processing rules can be understood as managing the risk disposal rule base, consensus protocol base, management strategy integration base, incentive mechanism base, and model scheduling rule base in the personalized management strategy rule base. Maintaining the entity relationship database can be understood as managing the user identity base in the personalized management strategy rule base. The following is an explanation of the contents of each library in the personalized management strategy rule base.
[0102] 1. Explain the management of user identity database.
[0103] The management user identity database may contain identity information of each management agency.
[0104] 2. Explain the risk management rule base.
[0105] The risk handling rule base may include handling rules for abnormal transaction behaviors, and the management node may determine a handling strategy for abnormal transaction behaviors (ie, the management strategy in the aforementioned embodiment) based on the handling rules.
[0106] 3. Explain the consensus protocol library.
[0107] The consensus protocol library contains the consensus protocols used by the consensus mechanism of the blockchain network. For example, the consensus protocols may include PoW (Proof of Work), PBFT (Practical Byzantine Fault Tolerance), PoA (Proof of Authority), etc. PoW is a consensus mechanism based on proof of work, mostly used in public chains; PBFT can achieve fault-tolerant and high-availability distributed consensus algorithms, mostly used in alliance chains; PoA is a consensus mechanism based on verifying node permissions.
[0108] 4. Explain the management strategy integration library.
[0109] The management strategy integration library can include various integrated learning methods for integrating the detection results of each target base model in the integrated model. Integrated learning includes bagging method, stacking method, etc. When using the bagging method, the first detection results of each target base model in the integrated model can be voted to obtain the second detection result of the integrated model. Voting processing includes hard voting, soft voting, etc. When using the stacking method, a meta model can be trained using the prediction from the target base model (the first detection result of the target base model), and the meta model can be used to detect the transaction behavior to be detected, and the detection result of the meta model is used as the second detection result of the integrated model. The meta model is also a binary classification model, which is used to detect whether the transaction behavior of digital currency is an abnormal transaction behavior of a preset type. When the management node publishes a management task to the blockchain network, it can also publish the integrated rules or integrated learning methods used by the management task to the blockchain network.
[0110] 5. Explain the incentive mechanism library.
[0111] The incentive mechanism library includes a method for evaluating the contribution of each target base model in the integrated model, and a method for allocating incentive values to the service nodes corresponding to each target base model. In some embodiments, the Shapley value method can be used to obtain the contribution of each target base model, that is, to obtain the Shapley value of each target base model, determine the size of the contribution of each target base model according to the size of the Shapley value, and fairly determine the incentive value corresponding to each target base model according to the contribution of each target base model, and allocate the incentive value to the service node corresponding to each target base model. When obtaining the Shapley value, a conventional Shapley value method can be used to obtain the Shapley value of each target base model. For example, the Shapley value can be approximately calculated by guiding the truncated gradient, or the Shapley value can be approximately calculated by the subset sampling method. When the management node publishes the management task to the blockchain network, the incentive mechanism used by the management task can also be published to the blockchain network.
[0112] 6. Explain the model scheduling rule base.
[0113] The model library of the model scheduling module records the base models registered by each service node in this model library, and the model scheduling rule library can contain rules for the model scheduling module to select multiple candidate base models from the model library as target base models. For example, all candidate base models are used as target base models, or multiple base models are selected as target base models based on the performance of each candidate base model among all candidate base models. The base models registered by each service node in this model library can include machine learning models such as logistic regression (LR), random forest (RF) and support vector machine (SVM), as well as deep learning models such as long short-term memory network (LSTM) and graph convolutional network (GCN).
[0114] Next, continue Figure 2 Please explain the service agencies in the article.
[0115] Service agencies can obtain management tasks from the blockchain network through service nodes. According to the needs of management tasks, they use the training data uploaded to the blockchain network by management nodes and combine them with their own private training data (i.e. Figure 2 The private data in the training) is used to obtain a machine learning model (i.e. Figure 2 The data analysis model in the data analysis model is used to detect whether the transaction behavior of digital currency is an abnormal transaction behavior of a preset type, which is the type specified by the management task.
[0116] The service agency uploads the trained machine learning model to the blockchain network and registers it in the model library of the model scheduling module so that the model scheduling module can choose whether to use this machine learning model as the target base model and form an integrated model based on the target base model.
[0117] The following is a description of an embodiment of the blockchain-based digital currency data processing method provided in the present application. The method is applied to the blockchain-based digital currency data processing system described in the aforementioned system embodiment. The management node in the system is a node registered by the management agency on the blockchain network, and the service node is a node registered by the service agency on the blockchain network.
[0118] See attached Figure 3 , Figure 3 1 is a flow chart of the main steps of a digital currency data processing method according to an embodiment of the present application. Figure 3 As shown, the digital currency data processing method in the embodiment of the present application mainly includes the following steps S101 to S104.
[0119] Step S101: The management agency publishes management tasks to the blockchain network through the management node. After the management node publishes the management task to the blockchain network, the blockchain network will automatically notify the service node to encourage the service agency to actively participate in the management task and upload the machine learning model applied to the management task to the blockchain network.
[0120] When issuing management tasks to the blockchain network, the management node can also upload to the blockchain network the training data related to the management tasks, the integrated rules or integrated learning methods used by the management tasks, and the incentive mechanisms used by the management tasks.
[0121] Step S102: The service agency uploads the base model applied to the management task to the blockchain network through the service node, and registers the base model in the model library of the model scheduling module as a candidate base model. The base model is a machine learning model used to detect whether the transaction behavior of digital currency is an abnormal transaction behavior of a preset type, and the preset type is the type specified by the management task.
[0122] Service agencies can obtain training data uploaded to the blockchain network by management agencies through management nodes from the blockchain network through service nodes, and train machine learning models with their own private training data. When uploading machine learning models to the blockchain network through service nodes, service agencies can also upload the accuracy report of the machine learning model. The accuracy report can record the performance indicators of the machine learning model (such as precision, recall, etc.).
[0123] Step S103: The management agency selects multiple candidate base models as target base models from the model library through the model scheduling module in the system, and combines all the target base models together to form an integrated model.
[0124] According to the aforementioned system embodiment, the management agency can upload a portion of the training data to the blockchain network through the management node and keep the remaining training data confidential. After the service node uploads the base model to the blockchain network, the management agency can use the remaining training data through the management node to verify the performance of the base model (such as precision, recall, etc.).
[0125] In some embodiments, after selecting multiple candidate base models, the management agency can also use the remaining training data to verify the selected candidate base models, and then upload the verification results and the remaining training data to the blockchain network. The service agency can obtain the verification results and the remaining training data through the service node, and then use the verification results and the remaining training data to cross-validate the base model provided by itself to ensure that the model performance meets the requirements of the management task. After the verification is qualified, the management agency combines all target base models together through the model scheduling module to form an integrated model.
[0126] Step S104: The management agency uses the integrated model to detect the transaction behavior of the digital currency to be detected through the integrated management module in the system to obtain the detection result.
[0127] Based on the methods described in steps S101 to S104 above, the management agency can use the digital currency data processing system to accurately and timely detect abnormal transaction behaviors of digital currencies.
[0128] In some embodiments, the management agency can obtain the service nodes corresponding to each target base model in the integrated model through the incentive mechanism module in the system, and allocate incentive values to the service nodes corresponding to each target base model. Based on this, the service agency can be encouraged to actively participate in management tasks and upload machine learning models applied to management tasks to the blockchain network. The service agency can also cross-validate and confirm the incentive value according to the incentive mechanism.
[0129] After obtaining the integrated model and completing the allocation of incentive values, the management agency will use the consensus mechanism of the blockchain to process all the data of the management task (including the base model uploaded to the blockchain network and the test results of the base model) to ensure that all management nodes reach a consensus on these data. The above process can be understood as verifying all the data uploaded to the blockchain network. After reaching a consensus, all the data of the management task will be packaged and attached to the blockchain network to ensure that the entire management process is transparent and traceable, and all data can be safely stored on the blockchain network.
[0130] So far, the technical solution of the present application has been described in conjunction with an embodiment shown in the accompanying drawings, but it is easy for those skilled in the art to understand that the protection scope of the present application is obviously not limited to these specific embodiments. Without departing from the principles of the present application, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will fall within the protection scope of the present application.
Claims
1. A digital currency data processing system based on blockchain, characterized in that: The system includes a management node, a service node, a model scheduling module and an integrated management module deployed on the blockchain network, and the management node, the service node, the model scheduling module and the integrated management module interact with each other through the smart contract of the blockchain network; The management node is configured to: issue a management task to the blockchain network, wherein the management task is to detect whether the transaction behavior of the digital currency is an abnormal transaction behavior of a preset type; The service node is configured to: upload a base model applied to the management task to the blockchain network, register the base model in the model library of the model scheduling module as a candidate base model, and the base model is a machine learning model for detecting whether the transaction behavior of digital currency is the abnormal transaction behavior; The model scheduling module is configured to: select multiple candidate base models from the model library as target base models, and combine all target base models to form an integrated model; The integrated management module is configured to: use the integrated model to detect the transaction behavior of the digital currency to obtain a detection result, and the detection result is used to indicate whether the transaction behavior to be detected is an abnormal transaction behavior of the preset type.
2. The system according to claim 1, characterized in that The model scheduling module is configured to select multiple candidate base models as target base models in the following manner: Acquire all candidate base models in the model library that are applied to the management task; All the candidate base models are used as the target base models, or a plurality of the candidate base models are selected as the target base models according to the performance of each of the candidate base models among all the candidate base models.
3. The system according to claim 1, characterized in that The integrated management module is configured to detect the transaction behavior of the digital currency to be detected by using the integrated model to obtain the detection result in the following manner: Obtaining each target base model in the integrated model; Using each of the target base models to detect the transaction behavior to be detected, respectively, to obtain a first detection result of each of the target base models; The first detection results of all target base models are fused to obtain the second detection result of the integrated model.
4. The system according to claim 3, characterized in that The value of the first detection result is 0 or 1, 0 indicates that the transaction behavior to be detected is not the abnormal transaction behavior, and 1 indicates that the transaction behavior to be detected is the abnormal transaction behavior. The integrated management module is configured to fuse the first detection results of all target base models in the following manner: Obtaining the largest value among the values of the first detection results of all target base models as the target value; According to the target value, a second detection result of the integrated model is obtained.
5. The system according to claim 3, characterized in that The value of the first detection result is the probability that the transaction behavior to be detected is the abnormal transaction behavior. The integrated management module is configured to fuse the first detection results of all target base models in the following manner: Obtaining a weighted average of the values of the first detection results of all target base models; According to the weighted average value, a second detection result of the integrated model is obtained.
6. The system according to claim 4, characterized in that The integrated management module is configured to obtain a weighted average value of the first detection results of all target base models in the following manner: Obtaining the weight of each target base model; Performing weighted sum calculation according to the weight of each target base model and the value of the first detection result of each target base model to obtain the weighted average value; in, The weight of the i-th target base model is F1 i represents the performance index value of the i-th target base model, i=1,…,N, and N represents the total number of the target base models.
7. The system according to claim 1, characterized in that The system further includes an incentive mechanism module deployed on the blockchain network, wherein the incentive mechanism module is configured to: Obtaining the service nodes corresponding to each target base model in the integrated model; An incentive value is allocated to the service node corresponding to each target base model.
8. The system according to claim 7, characterized in that The incentive mechanism module is configured to allocate incentive values to the service nodes corresponding to the target base models in the following manner: The contribution of each target base model is obtained by using the Shapley value method; According to the contribution of each target base model, an incentive value is allocated to the service node corresponding to each target base model.
9. The system according to claim 1, characterized in that The management node is configured to: determine a management strategy for the transaction behavior to be detected according to the detection result obtained by the integrated model; The system also includes a management consensus module deployed on the blockchain network, and the management consensus module is configured to: perform consensus processing on the management strategy based on the consensus mechanism of the blockchain network.
10. A digital currency data processing method based on blockchain, characterized in that: A blockchain-based digital currency data processing system applied to any one of claims 1 to 9, wherein the management node in the system is a node registered by the management agency on the blockchain network, and the service node is a node registered by the service agency on the blockchain network, and the method comprises: The management agency issues management tasks to the blockchain network through the management node; The service agency uploads the base model applied to the management task to the blockchain network through the service node, and registers the base model in the model library of the model scheduling module as a candidate base model; The management agency selects a plurality of candidate base models as target base models from the model library through the model scheduling module in the system, and combines all target base models together to form an integrated model; The management agency uses the integrated model to detect the transaction behavior of the digital currency to be detected through the integrated management module in the system to obtain the detection result.
11. The method according to claim 10, characterized in that The method comprises: The management agency obtains the service nodes corresponding to each target base model in the integrated model through the incentive mechanism module in the system, and allocates incentive values to the service nodes corresponding to each target base model.
Citation Information
Patent Citations
Differential privacy federal learning method based on random election verification block chain
CN117077806A
Time series data anomaly detection model generation method and device and electronic equipment
CN118133103A
Automatic machine learning method and system based on structured data
CN118520303A
Transaction risk real-time early warning method and device
CN118537014A
Systems and methods for identifying ransomware actors in digital currency networks
US20230376594A1