Methods, apparatus, equipment, and media for constructing financial misconduct detection models based on federated learning.
By leveraging blockchain and federated learning technologies, a financial misconduct detection model is collaboratively built, addressing the challenges of financial institutions independently identifying complex misconduct and the limitations of cross-institutional data sharing, thereby improving detection efficiency and privacy protection.
Patent Information
- Application Number
- CN202510020525.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-07
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2045-01-07
AI Technical Summary
Financial institutions struggle to independently and effectively identify complex financial violations, and limited cross-institutional data sharing leads to low efficiency in detecting financial violations.
A federated learning-based approach is adopted, using blockchain technology to distribute the global model parameters of the initial financial violation detection model to the sub-blockchains of various financial institutions. The model is trained using local data, the convergence of the model is judged, and weighted aggregation is performed until there are no unconverged parameters in the model training results, thus generating a trained detection model.
It has improved the efficiency of detecting financial violations and the level of data privacy protection while ensuring data privacy and security, and has enabled data collaboration among multiple institutions.
Smart Images

Figure CN119809782B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of blockchain technology, and in particular to a method, apparatus, device, and medium for constructing a financial violation detection model based on federated learning. Background Technology
[0002] Financial misconduct, such as anti-money laundering, poses a significant challenge to the global financial industry. Financial institutions must monitor a vast amount of transaction data to identify and prevent potential financial violations. However, transaction data from a single institution is often limited and insufficient to comprehensively detect complex patterns of financial misconduct. Furthermore, cross-institutional data sharing is frequently restricted by privacy concerns and regulatory limitations, further complicating the detection of financial misconduct.
[0003] Blockchain is a distributed data ledger that uses cryptographic technology to achieve decentralization, secure sharing, and tamper-proof data. Blockchain divides data into multiple blocks and links them together using cryptographic hash values to form a continuously growing chain structure. Blockchain possesses tamper-proof and traceable characteristics, ensuring data integrity and consistency.
[0004] The financial sector is one of the key application scenarios for blockchain technology. Because some financial violations involve multiple financial institutions and are highly complex, it is difficult for a single institution to independently and effectively identify these activities. Each financial institution typically possesses independent data related to customer transactions, but due to privacy and compliance requirements, this data cannot be directly shared. Furthermore, the data between financial institutions is often heterogeneous, further limiting the effective integration and utilization of data.
[0005] Therefore, how to use blockchain technology to build a more accurate and efficient model for detecting financial violations is an urgent problem to be solved. Summary of the Invention
[0006] In view of this, the purpose of this invention is to provide a method, apparatus, device, and medium for constructing a financial misconduct detection model based on federated learning, which can achieve more accurate and efficient construction of the financial misconduct detection model through blockchain technology. The specific solution is as follows:
[0007] Firstly, this application provides a method for constructing a financial violation detection model based on federated learning, applied to a centralized blockchain, including:
[0008] The global model parameters in the initial financial violation detection model are determined as the current global model parameters, and the current global model parameters are distributed to each sub-blockchain corresponding to each financial institution. The sub-blockchain uses a portion of the local financial institution's dataset to train the initial financial violation detection model to obtain the corresponding first post-training detection model, and determines whether the first post-training detection model has converged locally. If it has converged, the complete dataset of the local financial institution is used to train the first post-training detection model to obtain the second post-training detection model.
[0009] Obtain the current model training results uploaded by each of the sub-blockchains; wherein, the current model training results include the first model training results and the second model training results, the first model training results include the model parameters and model convergence status corresponding to the first training post-detection model being determined by the sub-blockchain to have not converged locally, and the second model training results include the model parameters and model convergence status of the second training post-detection model;
[0010] If there are unconverged model parameters in the current model training results, all the model parameters in the current model training results are weighted and aggregated to generate new current global model parameters, and then the process jumps to the step of distributing the current global model parameters to the respective sub-blockchains of each financial institution, until there are no unconverged model parameters in the current model training results, so as to obtain a trained financial violation detection model.
[0011] Optionally, determining whether the first trained detection model has converged locally includes:
[0012] Determine the difference between the model parameters in the first trained model and the current global model parameters;
[0013] Based on the difference, it is determined whether the first trained detection model has converged locally.
[0014] Optionally, after obtaining the current model training results uploaded by each of the sub-blockchains, the method further includes:
[0015] Determine whether there are any unconverged model parameters in the current model training results uploaded by each of the sub-blockchains;
[0016] If there are no unconverged model parameters in the current model training results, then the trained financial violation detection model is determined based on the current global model parameters corresponding to the current model training results.
[0017] Optionally, if there are unconverged model parameters in the current model training result, then a weighted aggregation of all the model parameters in the current model training result is performed to generate new current global model parameters, including:
[0018] If there are unconverged model parameters in the training results of the first model and / or the training results of the second model, then all the model parameters in the current model training results are weighted and aggregated according to the model convergence status of the first post-training detection model, the model convergence status of the second post-training detection model, and the dataset size of each financial institution, to generate new global model parameters.
[0019] Optionally, the step of weightedly aggregating all model parameters in the current model training result based on the model convergence of the first trained detection model, the model convergence of the second trained detection model, and the dataset size of each financial institution to generate new global model parameters includes:
[0020] The weighting factor for each sub-blockchain is determined based on the model convergence of the local first post-training detection model and the second post-training detection model of each sub-blockchain.
[0021] The first summation result is obtained by summing the product of the dataset size of the financial institution corresponding to each sub-blockchain, the weighting factor, and the model parameters uploaded by each sub-blockchain.
[0022] The product of the dataset size of the financial institution corresponding to each of the sub-blockchains and the weighting factor is summed to obtain a second summation result;
[0023] The new current global model parameters are determined based on the ratio of the first summation result to the second summation result.
[0024] Optionally, the trained financial violation detection model is a financial money laundering detection model.
[0025] Secondly, this application provides a method for constructing a financial violation detection model based on federated learning, applicable to any sub-blockchain corresponding to a financial institution, including:
[0026] The system receives the current global model parameters issued by the central blockchain and uses a portion of the dataset from the local financial institution to train the initial financial violation detection model corresponding to the current global model parameters to obtain the corresponding first post-training detection model. It then determines whether the first post-training detection model has converged locally. If it has converged, it uses the complete dataset from the local financial institution to train the first post-training detection model to obtain the second post-training detection model.
[0027] Determine the current model training result; wherein, the current model training result includes the first model training result and the second model training result, the first model training result includes the model parameters and model convergence status corresponding to the determination that the local first post-training detection model has not converged, and the second model training result includes the model parameters and model convergence status of the second post-training detection model;
[0028] The current model training results are sent to the central blockchain. When there are unconverged model parameters in the current model training results, the central blockchain performs weighted aggregation on all the model parameters in the current model training results to generate new current global model parameters. The current global model parameters are then distributed to the respective sub-blockchains of each financial institution to trigger the next round of model iteration training operations until there are no unconverged model parameters in the current model training results, thus obtaining a trained financial violation detection model.
[0029] Thirdly, this application provides a device for constructing a financial violation detection model based on federated learning, applicable to any sub-blockchain corresponding to a financial institution, including:
[0030] The model training module is used to receive the current global model parameters issued by the central blockchain, and use a portion of the dataset of the local financial institution to train the initial financial violation detection model corresponding to the current global model parameters to obtain the corresponding first post-training detection model. It also determines whether the first post-training detection model has converged locally. If it has converged, it uses the complete dataset of the local financial institution to train the first post-training detection model to obtain the second post-training detection model.
[0031] The training result sending module is used to send the current model training result to the central blockchain; wherein, the current model training result includes the first model training result and the second model training result, the first model training result includes the model parameters corresponding to the local determination that the first training post-detection model has not converged and the model convergence status, and the second model training result includes the model parameters of the second training post-detection model and the model convergence status;
[0032] The model training termination module is used to jump to the step of receiving the current global model parameters issued by the blockchain of the receiving center if there are unconverged model parameters in the current model training results, until there are no unconverged model parameters in the current model training results, so as to obtain the trained financial violation detection model.
[0033] Fourthly, this application provides an electronic device, comprising:
[0034] Memory, used to store computer programs;
[0035] A processor is used to execute the computer program to implement the aforementioned method for constructing a financial violation detection model based on federated learning.
[0036] Fifthly, this application provides a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned method for constructing a financial violation detection model based on federated learning.
[0037] In this application, the global model parameters in the initial financial violation detection model are first determined as the current global model parameters. These current global model parameters are then distributed to the respective sub-blockchains of each financial institution. Each sub-blockchain uses a portion of the local financial institution's dataset to train the initial financial violation detection model to obtain a corresponding first post-trained detection model. The application then determines whether the first post-trained detection model has converged locally. If it has converged, the application uses the complete dataset of the local financial institution to train the first post-trained detection model to obtain a second post-trained detection model. Finally, the application obtains the current model training results uploaded by each sub-blockchain. These current model training results include the first model training results and... The second model training result includes the model parameters and convergence status of the first model training result when the local sub-blockchain determines that the first post-training detection model has not converged. The second model training result includes the model parameters and convergence status of the second post-training detection model. If there are unconverged model parameters in the current model training result, all the model parameters in the current model training result are weighted and aggregated to generate new current global model parameters. Then, the process jumps to the step of distributing the current global model parameters to the respective sub-blockchains of each financial institution until there are no unconverged model parameters in the current model training result, so as to obtain a trained financial violation detection model. As can be seen from the above, this application first sends the current global model parameters in the initial financial violation detection model to each sub-blockchain so that each sub-blockchain can use a local partial dataset to train the initial financial violation detection model to obtain a first post-training detection model. If the first post-training detection model has converged, it continues to use the local complete dataset to train the first post-training detection model to obtain a second post-training detection model. Next, the current model training results uploaded by each of the sub-blockchains are obtained, and it is determined whether there are any unconverged model parameters in the current model training results. If so, all the model parameters in the current model training results are weighted and aggregated to generate new current global model parameters. Then, the new current global model parameters are distributed to each sub-blockchain, and the above steps are repeated until there are no unconverged model parameters in the current model training results, thus obtaining a trained financial violation detection model. In this way, by collaboratively constructing a financial violation detection model through blockchain, data collaboration among multiple financial institutions is achieved while ensuring data privacy and security, thereby improving the efficiency of financial violation detection and the level of data privacy protection. Attached Figure Description
[0038] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0039] Figure 1 This application discloses a system architecture diagram for a method of constructing a financial violation detection model based on federated learning.
[0040] Figure 2 This application discloses a flowchart of a method for constructing a financial violation detection model based on federated learning.
[0041] Figure 3 This application discloses a flowchart of a method for constructing a financial violation detection model based on federated learning.
[0042] Figure 4 This is a schematic diagram of the structure of a financial violation detection model construction device based on federated learning disclosed in this application;
[0043] Figure 5 This is a structural diagram of an electronic device disclosed in this application. Detailed Implementation
[0044] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0045] Financial misconduct is a major challenge facing the global financial industry. Because some misconduct involves multiple financial institutions and is highly complex, it is difficult for a single institution to independently and effectively identify these activities. Financial institutions typically possess independent data related to customer transactions, but due to privacy and compliance requirements, this data cannot be directly shared. Therefore, this application will specifically introduce a method for constructing a financial misconduct detection model that can address the aforementioned problems.
[0046] The system architecture diagram of this application is as follows: Figure 1As shown, there is a two-layer structure. The first layer consists of individual blockchains corresponding to each financial institution. These blockchains possess local transaction data, obtain global model parameters from the central blockchain, train the model locally, and then upload the updated local model parameters to the central blockchain. The second layer is the central blockchain, which is responsible for aggregating and updating the local model parameters uploaded by each financial institution's individual blockchains, and then sending the global model parameters to each financial institution's individual blockchains.
[0047] See Figure 2 As shown in the figure, this invention discloses a method for constructing a financial violation detection model based on federated learning, applied to a centralized blockchain, which may include:
[0048] Step S11: Determine the global model parameters in the initial financial violation detection model as the current global model parameters, and distribute the current global model parameters to each sub-blockchain corresponding to each financial institution, so that the sub-blockchain can use a portion of the local financial institution's dataset to train the initial financial violation detection model to obtain the corresponding first post-training detection model, and determine whether the first post-training detection model has converged locally. If it has converged, use the complete dataset of the local financial institution to train the first post-training detection model to obtain the second post-training detection model.
[0049] In this embodiment, the determined current global model parameters are distributed to the respective sub-blockchains of each financial institution, ensuring that each sub-blockchain receives the same current global model parameters. Then, based on these parameters and utilizing a portion of the local financial institution's dataset, the initial financial violation detection model is trained to obtain a corresponding first post-trained detection model. It should be noted that the dataset includes transaction records, customer information, and features such as whether the marked transactions involve financial violations. It is understood that each sub-blockchain updates the current global model parameters using a portion of the local financial institution's dataset. The local update calculation process is as follows:
[0050]
[0051] Where, θ t These are the current global model parameters. This is a partial dataset from local financial institutions. Here are the model parameters in the first training and detection model, where η is the learning rate. This represents the loss gradient calculated using a smaller database.
[0052] In this embodiment, determining whether the first trained detection model has converged locally may include: determining the difference between the model parameters in the first trained model and the current global model parameters; and determining whether the first trained detection model has converged locally based on the difference. Specifically, the convergence of the first trained detection model locally is determined using the following formula:
[0053]
[0054] Where, θ t These are the current global model parameters. The model parameters in the first training and detection model. It is the convergence threshold. This represents the square root of the square. Specifically, if the result of the above calculation is less than the convergence threshold... If the first trained detection model is determined to have converged locally, then the above calculation result is not less than the convergence threshold. If so, it is determined that the first trained detection model has not converged locally.
[0055] If the first trained detection model converges locally, each sub-blockchain then updates the current global model parameters using the complete dataset of the local financial institution. The calculation process for the local update is as follows:
[0056]
[0057] Among them, D i For the complete dataset of local financial institutions, θ i These are the model parameters in the second training and detection model.
[0058] In this embodiment, the convergence of the second trained detection model on a local basis is determined using the following formula:
[0059]
[0060] Where, θ i For the model parameters in the second training post-detection model, θ t These are the updated global model parameters. If the above calculation result is less than the convergence threshold... If the second trained detection model is determined to have converged locally, then the calculation result is considered to be not less than the convergence threshold. If so, it is determined that the second post-trained detection model has not converged locally.
[0061] Step S12: Obtain the current model training results uploaded by each of the sub-blockchains; wherein, the current model training results include the first model training results and the second model training results, the first model training results include the model parameters and model convergence status corresponding to the sub-blockchain when it determines that the first training post-detection model has not converged locally, and the second model training results include the model parameters and model convergence status of the second training post-detection model.
[0062] In this embodiment, after obtaining the current model training results uploaded by each of the sub-blockchains, the method further includes: determining whether there are any unconverged model parameters in the current model training results uploaded by each of the sub-blockchains; if there are no unconverged model parameters in the current model training results, then the trained financial violation detection model is determined based on the current global model parameters corresponding to the current model training results. That is, the current model training results uploaded by each of the sub-blockchains are summarized to determine whether all model parameters in the current model training results have converged. If all converged, it indicates that the current global model has converged. At this point, the current global model parameters corresponding to the current model training results are determined as the final converged parameters, thereby determining the trained financial violation detection model.
[0063] Step S13: If there are unconverged model parameters in the current model training results, then all the model parameters in the current model training results are weighted and aggregated to generate new current global model parameters, and then the process jumps to the step of distributing the current global model parameters to the respective sub-blockchains of each financial institution, until there are no unconverged model parameters in the current model training results, so as to obtain the trained financial violation detection model.
[0064] In this embodiment, if there are unconverged model parameters in the training results of the first model and / or the second model, then all the model parameters in the current model training results are weighted and aggregated according to the convergence status of the local first post-training detection model, the convergence status of the local second post-training detection model, and the dataset size of each financial institution, to generate new global model parameters. That is, if there are unconverged model parameters in the training results of the first model and / or the second model, then all the model parameters in the current model training results are weighted and aggregated to generate new current global model parameters, wherein the weight allocation is based on the convergence status of the local first post-training detection model and the second post-training detection model of each sub-blockchain, and the dataset size of each financial institution.
[0065] In this embodiment, the weighting factor of each sub-blockchain is determined based on the model convergence of the local first and second post-trained detection models of each sub-blockchain; the product of the dataset size of the financial institution corresponding to each sub-blockchain, the weighting factor, and the model parameters uploaded by each sub-blockchain is summed to obtain a first summation result; the product of the dataset size of the financial institution corresponding to each sub-blockchain and the weighting factor is summed to obtain a second summation result; the new current global model parameters are determined based on the ratio of the first summation result and the second summation result. The specific formula is as follows:
[0066]
[0067] Where, θ t+1 For the new current global model parameters, w represents the size of the local dataset of blockchain i. i The weighting factor for the i-th sub-blockchain depends on whether the local model converges. Specifically, if the local model converges, w will be... i Set to 1; if the local model does not converge, set w i Set to a value less than 1 to reduce its impact on the current global model, where N represents the total number of sub-blockchains, and θ i These are the local model parameters uploaded by each sub-blockchain i.
[0068] As shown above, this embodiment first sends the current global model parameters of the initial financial violation detection model to each sub-blockchain. Each sub-blockchain then uses its local partial dataset to train the initial financial violation detection model to obtain a first trained detection model. If the first trained detection model has converged, it continues to train the first trained detection model using the complete local dataset to obtain a second trained detection model. Next, the current model training results uploaded by each sub-blockchain are obtained, and it is determined whether there are any unconverged model parameters in the current model training results. If so, all the model parameters in the current model training results are weighted and aggregated to generate new current global model parameters. These new current global model parameters are then distributed to each sub-blockchain, and the above steps are repeated until there are no unconverged model parameters in the current model training results, resulting in a trained financial violation detection model. In this way, by collaboratively constructing a financial violation detection model through blockchain, data collaboration among multiple financial institutions is achieved while ensuring data privacy and security, improving the efficiency of financial violation detection and the level of data privacy protection.
[0069] Further, see Figure 3As shown in the embodiments of this application, a method for constructing a financial violation detection model based on federated learning is also provided, which can be applied to the sub-blockchain corresponding to any financial institution and may include:
[0070] Step S21: Receive the current global model parameters issued by the central blockchain, and use a portion of the dataset of the local financial institution to train the initial financial violation detection model corresponding to the current global model parameters to obtain the corresponding first post-training detection model. Determine whether the first post-training detection model has converged locally. If it has converged, use the complete dataset of the local financial institution to train the first post-training detection model to obtain the second post-training detection model.
[0071] Step S22: Determine the current model training result; wherein, the current model training result includes the first model training result and the second model training result, the first model training result includes the model parameters and model convergence status corresponding to the determination of the local first post-training detection model when it has not converged, and the second model training result includes the model parameters and model convergence status of the second post-training detection model.
[0072] Step S23: Send the current model training results to the central blockchain so that when there are unconverged model parameters in the current model training results, the central blockchain performs weighted aggregation on all the model parameters in the current model training results to generate new current global model parameters, and distributes the current global model parameters to the respective sub-blockchains of each financial institution to trigger the next round of model iteration training operation until there are no unconverged model parameters in the current model training results, and obtains the trained financial violation detection model.
[0073] For details on the specific implementation process of each of the above steps, please refer to the relevant content disclosed in the foregoing embodiments, which will not be repeated here.
[0074] In this way, by collaboratively building a financial misconduct detection model through blockchain, data collaboration among multiple financial institutions is achieved while ensuring data privacy and security, thereby improving the efficiency of financial misconduct detection and the level of data privacy protection.
[0075] Accordingly, see Figure 4 As shown in the illustration, this application also provides a device for constructing a financial violation detection model based on federated learning, applied to a central blockchain, which may include:
[0076] The model distribution module 11 is used to determine the global model parameters in the initial financial violation detection model as the current global model parameters, and distribute the current global model parameters to the respective sub-blockchains of each financial institution, so that the sub-blockchain can use a portion of the local financial institution's dataset to train the initial financial violation detection model to obtain the corresponding first post-training detection model, and determine whether the first post-training detection model has converged locally. If it has converged, the first post-training detection model can be trained using the complete dataset of the local financial institution to obtain the second post-training detection model.
[0077] The training result acquisition module 12 is used to acquire the current model training results uploaded by each of the sub-blockchains; wherein, the current model training results include the first model training results and the second model training results, the first model training results include the model parameters and model convergence status corresponding to the first training post-detection model being determined by the sub-blockchain when it determines that the local first training post-detection model has not converged; and the second model training results include the model parameters and model convergence status of the second training post-detection model.
[0078] The model parameter generation module 13 is used to perform weighted aggregation on all the model parameters in the current model training result to generate new current global model parameters if there are unconverged model parameters in the current model training result, and then jump to the step of distributing the current global model parameters to the respective sub-blockchains of each financial institution, until there are no unconverged model parameters in the current model training result, so as to obtain the trained financial violation detection model.
[0079] As shown above, this application first sends the current global model parameters of the initial financial violation detection model to each sub-blockchain, so that each sub-blockchain can use its local partial dataset to train the initial financial violation detection model to obtain a first post-trained detection model. If the first post-trained detection model has converged, it continues to train the first post-trained detection model using the local complete dataset to obtain a second post-trained detection model. Next, the current model training results uploaded by each sub-blockchain are obtained, and it is determined whether there are any unconverged model parameters in the current model training results. If so, all the model parameters in the current model training results are weighted and aggregated to generate new current global model parameters. Then, the new current global model parameters are distributed to each sub-blockchain, and the above steps are repeated until there are no unconverged model parameters in the current model training results to obtain a trained financial violation detection model. In this way, by collaboratively constructing a financial violation detection model through blockchain, data collaboration among multiple financial institutions is achieved while ensuring data privacy and security, thereby improving the efficiency of financial violation detection and the level of data privacy protection.
[0080] In some specific embodiments, the model distribution module 11 includes:
[0081] The difference determination unit is used to determine the difference between the model parameters in the first trained model and the current global model parameters;
[0082] The convergence determination unit is used to determine whether the first trained detection model has converged locally based on the difference.
[0083] In some specific embodiments, the training result acquisition module 12 further includes:
[0084] The model parameter judgment unit is used to determine whether there are unconverged model parameters in the current model training results uploaded by each of the sub-blocks;
[0085] The model determination unit is used to determine the trained financial violation detection model based on the current global model parameters corresponding to the current model training results if there are no unconverged model parameters in the current model training results.
[0086] In some specific embodiments, the model parameter generation module 13 includes:
[0087] The model parameter generation submodule is used to generate new global model parameters by weighting and aggregating all the model parameters in the current model training results if there are unconverged model parameters in the first model training results and / or the second model training results. This is done based on the model convergence status of the first post-training detection model, the model convergence status of the second post-training detection model, and the dataset size of each financial institution.
[0088] In some specific implementations, the model parameter generation submodule includes:
[0089] The weighting factor determination unit is used to determine the weighting factor of each sub-blockchain based on the model convergence of the local first post-trained detection model and the second post-trained detection model of each sub-blockchain.
[0090] The first summation result obtaining unit is used to sum the product of the dataset size of the financial institution corresponding to each of the sub-blocks, the weighting factor, and the model parameters uploaded by each of the sub-blocks to obtain the first summation result;
[0091] The second summation result obtaining unit is used to sum the product of the dataset size of the financial institution corresponding to each of the sub-blockchains and the weighting factor to obtain the second summation result;
[0092] The model parameter determination unit is used to determine the new current global model parameters based on the ratio of the first summation result and the second summation result.
[0093] In some specific implementations, the trained financial violation detection model is a financial money laundering detection model.
[0094] Furthermore, embodiments of this application also disclose an electronic device, Figure 5 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the federated learning-based financial violation detection model construction method disclosed in any of the foregoing embodiments. Furthermore, the electronic device 20 in this embodiment may specifically be a computer.
[0095] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.
[0096] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon can include operating system 221, computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0097] The operating system 221 is used to manage and control the various hardware devices on the electronic device 20 and the computer program 222, which may be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program capable of performing the federated learning-based financial violation detection model construction method executed by the electronic device 20 as disclosed in any of the foregoing embodiments, the computer program 222 may further include computer programs capable of performing other specific tasks.
[0098] Furthermore, this application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned disclosed method for constructing a financial violation detection model based on federated learning. Specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.
[0099] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.
[0100] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0101] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0102] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0103] The technical solutions provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for constructing a financial violation detection model based on federated learning, characterized in that, Applied to centralized blockchains, including: The global model parameters in the initial financial violation detection model are determined as the current global model parameters, and the current global model parameters are distributed to each sub-blockchain corresponding to each financial institution. The sub-blockchain uses a portion of the local financial institution's dataset to train the initial financial violation detection model to obtain the corresponding first post-training detection model, and determines whether the first post-training detection model has converged locally. If it has converged, the complete dataset of the local financial institution is used to train the first post-training detection model to obtain the second post-training detection model. Obtain the current model training results uploaded by each of the sub-blockchains; wherein, the current model training results include the first model training results and the second model training results, the first model training results include the model parameters and model convergence status corresponding to the first training post-detection model being determined by the sub-blockchain to have not converged locally, and the second model training results include the model parameters and model convergence status of the second training post-detection model; If there are unconverged model parameters in the current model training results, then all the model parameters in the current model training results are weighted and aggregated to generate new current global model parameters, and then the process jumps to the step of distributing the current global model parameters to the respective sub-blockchains of each financial institution, until there are no unconverged model parameters in the current model training results, so as to obtain a trained financial violation detection model. If there are unconverged model parameters in the current model training result, then all the model parameters in the current model training result are weighted and aggregated to generate new current global model parameters, including: If the training results of the first model and / or the second model contain unconverged model parameters, then based on the convergence status of the first post-trained detection model, the convergence status of the second post-trained detection model, and the dataset size of each financial institution, all model parameters in the current model training results are weighted and aggregated to generate new global model parameters; specifically including: The weighting factor for each sub-block is determined based on the convergence of the local first and second post-trained detection models of each sub-block; a first summation result is obtained by summing the product of the dataset size of the financial institution corresponding to each sub-block, the weighting factor, and the model parameters uploaded by each sub-block; a second summation result is obtained by summing the product of the dataset size of the financial institution corresponding to each sub-block and the weighting factor; and the new current global model parameters are determined based on the ratio of the first summation result to the second summation result. If the local model converges, the weighting factor is set to 1; if the local model does not converge, the weighting factor is set to a value less than 1.
2. The method for constructing a financial violation detection model based on federated learning according to claim 1, characterized in that, The step of determining whether the first trained detection model has converged locally includes: Determine the difference between the model parameters in the first trained model and the current global model parameters; Based on the difference, it is determined whether the first trained detection model has converged locally.
3. The method for constructing a financial violation detection model based on federated learning according to claim 1, characterized in that, After obtaining the current model training results uploaded by each of the sub-blockchains, the method further includes: Determine whether there are any unconverged model parameters in the current model training results uploaded by each of the sub-blocks; If there are no unconverged model parameters in the current model training results, then the trained financial violation detection model is determined based on the current global model parameters corresponding to the current model training results.
4. The method for constructing a financial violation detection model based on federated learning according to any one of claims 1 to 3, characterized in that, The trained financial violation detection model is a financial money laundering detection model.
5. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the method for constructing a financial violation detection model based on federated learning as described in any one of claims 1 to 4.
6. A computer-readable storage medium, characterized in that, Used to store computer programs; wherein, when the computer programs are executed by a processor, they implement the method for constructing a financial violation detection model based on federated learning as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Joint model training method, system and device and computer readable storage medium
CN109871702A
Parking prediction model training method and system based on federal learning and blockchain
CN113592102A