Financial illegal behavior detection model construction method and device based on federated learning, equipment and medium
Through the blockchain technology based on federated learning, the problems of data limitations and sharing restrictions in financial violation detection are solved, and efficient and accurate financial violation detection model is achieved, which improves detection efficiency and privacy protection level.
Patent Information
- Application Number
- CN202510020525.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-07
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2045-01-07
AI Technical Summary
In the detection of financial violations, it is difficult to fully detect complex financial violations in a single institution's transaction data limitations, and cross-institutional data sharing is limited by privacy protection and regulatory restrictions, which increases the difficulty of detection.
Using a federated learning-based method, the global model parameters of the initial financial violation detection model are distributed to the partitioned blockchains of each financial institution through blockchain technology. The local data set is used for model training, the training results are obtained and weighted aggregation is performed until the model converges.
It has achieved a more accurate and efficient construction of the financial violation detection model, ensured data privacy and security, realized data collaboration between multiple financial institutions, and improved detection efficiency and privacy protection level.
Smart Images

Figure CN119809782A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of blockchain technology, and in particular to a method, device, equipment and medium for constructing a financial irregularities detection model based on federated learning. Background Art
[0002] Financial violations are a major challenge facing the global financial industry, such as anti-money laundering. Financial institutions must monitor a large number of transactions to identify and prevent potential financial violations. However, transaction data from a single institution often has limitations, making it difficult to fully detect complex financial violation patterns. At the same time, cross-institutional data sharing is often restricted due to privacy protection, regulatory restrictions and other issues, further increasing the difficulty of detecting financial violations.
[0003] Blockchain is a distributed data ledger that uses cryptography to achieve decentralization, secure sharing and tamper-proof. Blockchain divides data into multiple blocks and connects them in series through encrypted hash values to form a growing chain structure. Blockchain has the characteristics of tamper-proof and traceable, which can ensure the integrity and consistency of data.
[0004] The financial sector is one of the important application scenarios of blockchain technology. Since some financial violations involve multiple financial institutions and are highly complex, it is difficult for a single institution to independently and effectively identify these behaviors. Each financial institution usually has independent data related to customer transactions, but due to privacy and compliance requirements, the data cannot be directly shared. In addition, the data between financial institutions is usually heterogeneous, which further limits the effective integration and utilization of data.
[0005] Therefore, how to use blockchain technology to achieve a more accurate and efficient construction of financial violation detection models is an urgent problem to be solved. Summary of the invention
[0006] In view of this, the purpose of the present invention is to provide a method, device, equipment and medium for constructing a financial irregularities detection model based on federated learning, which can realize a more accurate and efficient construction of a financial irregularities detection model through blockchain technology. The specific scheme is as follows:
[0007] In the first aspect, the present application provides a method for constructing a financial irregularities detection model based on federated learning, which is applied to a central blockchain, including:
[0008] Determine the global model parameters in the initial financial irregularities 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 uses a partial data set of the local financial institution to train the initial financial irregularities detection model to obtain a corresponding first trained detection model, and judge whether the first trained detection model has converged locally. If it has converged, use the complete data set of the local financial institution to train the first trained detection model to obtain a second trained detection model;
[0009] Obtain the current model training results uploaded by each of the sub-blockchains; wherein the current model training results include a first model training result and a second model training result, wherein the first model training result includes the model parameters and model convergence status corresponding to the sub-blockchain when it is determined 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;
[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 aggregated to generate new current global model parameters, and the process jumps to the step of distributing the current global model parameters to the sub-blockchains corresponding to the financial institutions, until there are no unconverged model parameters in the current model training results, so as to obtain a trained financial irregularities detection model.
[0011] Optionally, the determining whether the first post-training detection model converges locally includes:
[0012] Determining 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 converges locally.
[0014] Optionally, after obtaining the current model training results uploaded by each of the sub-block chains, the method further includes:
[0015] Determine whether there are unconverged model parameters in the current model training results uploaded by each of the sub-block chains;
[0016] If there are no unconverged model parameters in the current model training results, 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, weighted aggregation is performed on all the model parameters in the current model training result to generate new current global model parameters, including:
[0018] If there are non-converged model parameters in the first model training results and / or the second model training results, all the model parameters in the current model training results are weighted aggregated according to the model convergence of the local first post-training detection model, the model convergence of the second post-training detection model and the data set size of each of the financial institutions to generate new global model parameters.
[0019] Optionally, the weighted aggregation of all the model parameters in the current model training result to generate new global model parameters is performed according to the model convergence of the first local trained detection model, the model convergence of the second local trained detection model, and the data set size of each financial institution, including:
[0020] Determine a weighting factor of each of the block chain components based on the local first trained detection model and the second trained detection model of each of the block chain components;
[0021] Summing the product of the data set size of the financial institution corresponding to each of the sub-blockchains, the weighting factor, and the model parameter uploaded by each of the sub-blockchains to obtain a first summation result;
[0022] Summing the product of the data set size of the financial institution corresponding to each of the sub-blockchains and the weighting factor to obtain a second summation result;
[0023] The new current global model parameter is determined based on a ratio of the first summation result and the second summation result.
[0024] Optionally, the trained financial irregularities detection model is a financial money laundering behavior detection model.
[0025] In the second aspect, the present application provides a method for constructing a financial irregularities detection model based on federated learning, which is applied to a sub-blockchain corresponding to any financial institution, including:
[0026] Receive the current global model parameters issued by the central blockchain, and use a partial data set of the local financial institution to train the initial financial violation detection model corresponding to the current global model parameters to obtain a corresponding first trained detection model, and determine whether the first trained detection model has converged locally. If it has converged, use the complete data set of the local financial institution to train the first trained detection model to obtain a second trained detection model;
[0027] Determine the current model training result; wherein the current model training result includes a first model training result and a second model training result, the first model training result includes the model parameters and model convergence status corresponding to when it is determined that the first trained detection model locally has not converged, and the second model training result includes the model parameters and model convergence status of the second trained detection model;
[0028] The current model training results are sent 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 sub-blockchains corresponding to each financial institution to trigger the next round of model iterative training operations, until there are no unconverged model parameters in the current model training results, and a trained financial violation detection model is obtained.
[0029] In a third aspect, the present application provides a device for constructing a financial irregularities detection model based on federated learning, which is applied to a sub-blockchain corresponding to any financial institution, including:
[0030] A model training module is used to receive the current global model parameters issued by the central blockchain, and use a partial data set of a local financial institution to train the initial financial violation detection model corresponding to the current global model parameters to obtain a corresponding first trained detection model, and determine whether the first trained detection model has converged locally. If it has converged, the first trained detection model is trained using the complete data set of the local financial institution to obtain a second trained detection model;
[0031] A training result sending module, used to send the current model training result to the central blockchain; wherein the current model training result includes a first model training result and a second model training result, wherein the first model training result includes the model parameters and model convergence status corresponding to when it is determined that the first trained detection model locally has not converged, and the second model training result includes the model parameters and model convergence status of the second trained detection model;
[0032] The model training end module is used to jump to the step of receiving the current global model parameters issued by the receiving center blockchain 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 a trained financial violation detection model.
[0033] In a fourth aspect, the present application provides an electronic device, including:
[0034] Memory, used to store computer programs;
[0035] A processor is used to execute the computer program to implement the aforementioned method for building a financial violation detection model based on federated learning.
[0036] In a fifth aspect, the present application provides a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the aforementioned method for constructing a financial irregularities detection model based on federated learning is implemented.
[0037] In the present application, the global model parameters in the initial financial irregularities detection model are first determined as the current global model parameters, and the current global model parameters are distributed to the sub-blockchains corresponding to the financial institutions, so that the sub-blockchains use a partial data set of the local financial institution to train the initial financial irregularities detection model to obtain a corresponding first trained detection model, and determine whether the first trained detection model has converged locally. If it has converged, the first trained detection model is trained using the complete data set of the local financial institution to obtain a second trained detection model; the current model training results uploaded by each of the sub-blockchains are obtained; wherein the current model training results include the first model training results and The second model training result, the first model training result includes the model parameters and model convergence status corresponding to the sub-blockchain when determining that the first local 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; 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, and jump to the step of distributing the current global model parameters to each sub-blockchain corresponding to 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, the present application first sends the current global model parameters in the initial financial violation detection model to each sub-blockchain, so that each sub-blockchain uses a local partial data set 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, the first post-training detection model is continued to be trained using the local complete data set 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 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, and 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 between 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. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0039] Figure 1 A system architecture diagram of a method for building a financial irregularities detection model based on federated learning disclosed in this application;
[0040] Figure 2 A flowchart of a method for constructing a financial irregularities detection model based on federated learning disclosed in this application;
[0041] Figure 3 A flowchart of a method for constructing a financial irregularities detection model based on federated learning disclosed in this application;
[0042] Figure 4 A schematic diagram of the structure of a device for building a financial irregularities detection model 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 DESCRIPTION
[0044] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0045] Currently, financial irregularities are a major challenge facing the global financial industry. Since some financial irregularities involve multiple financial institutions and are highly complex, it is difficult for a single institution to independently and effectively identify these behaviors. Each financial institution usually has independent data related to customer transactions, but due to privacy and compliance requirements, the data cannot be directly shared. Therefore, this application will specifically introduce a method for building a financial irregularities detection model that can solve the above problems.
[0046] The system architecture diagram of this application is as follows Figure 1As shown in the figure, there are two layers of structure. The first layer is the sub-blockchains corresponding to each financial institution, which have local transaction data, obtain global model parameters from the central blockchain, perform model training locally, and 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 sub-blockchain corresponding to each financial institution, and sending the global model parameters to each sub-blockchain corresponding to each financial institution.
[0047] See also Figure 2 As shown, the embodiment of the present invention discloses a method for constructing a financial violation detection model based on federated learning, which is applied to a central blockchain and may include:
[0048] Step S11: determine the global model parameters in the initial financial irregularities 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 uses a partial data set of the local financial institution to train the initial financial irregularities detection model to obtain a corresponding first trained detection model, and determines whether the first trained detection model has converged locally. If it has converged, use the complete data set of the local financial institution to train the first trained detection model to obtain a second trained detection model.
[0049] In this embodiment, the determined current global model parameters are distributed to each sub-blockchain corresponding to each financial institution, so that each sub-blockchain receives the same current global model parameters, and then the initial financial violation detection model is trained based on the current global model parameters and using a partial data set of a local financial institution to obtain a corresponding first trained detection model. It should be noted that the data set contains transaction records, customer information, and features such as whether the marked transaction involves financial violations. It is understandable that each sub-blockchain uses a partial data set of a local financial institution to update the current global model parameters, and the calculation process of the local update is as follows:
[0050]
[0051] Among them, θ t is the current global model parameter, Part of the dataset for local financial institutions. is the model parameter in the detection model after the first training, η is the learning rate, Represents the loss gradient calculated on the smaller database.
[0052] In this embodiment, the determination of 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 following formula is used to determine the convergence of the first trained detection model locally:
[0053]
[0054] Among them, θ t is the current global model parameter, are the model parameters in the first post-training detection model, is the convergence threshold, Specifically, if the above calculation result is less than the convergence threshold , it is determined that the first trained detection model converges locally; if the above calculation result is not less than the convergence threshold , it is determined that the first post-training detection model has not converged locally.
[0055] If the first post-training detection model converges locally, each of the sub-blockchains uses the complete data set of the local financial institution to update the updated current global model parameters. The calculation process of the local update is as follows:
[0056]
[0057] Among them, D i is the complete dataset of local financial institutions, θ i are the model parameters in the second trained detection model.
[0058] In this embodiment, the following formula is used to judge the local convergence of the second trained detection model:
[0059]
[0060] Among them, θ i is the model parameter in the second post-training detection model, θ t is the updated current global model parameter. If the above calculation result is less than the convergence threshold , then it is determined that the second trained detection model converges locally; if the above calculation result is not less than the convergence threshold , it is determined that the second post-training detection model has not converged locally.
[0061] Step S12, obtaining the current model training results uploaded by each of the sub-block chains; wherein the current model training results include a first model training result and a second model training result, the first model training result includes the model parameters and model convergence status corresponding to the sub-block chain when it is determined that the local first training detection model has not converged, and the second model training result includes the model parameters and model convergence status of the second training detection model.
[0062] In this embodiment, after obtaining the current model training results uploaded by each of the sub-block chains, it also includes: judging whether there are unconverged model parameters in the current model training results uploaded by each of the sub-block chains; if there are no unconverged model parameters in the current model training results, then determining the trained financial irregularities detection model based on the current global model parameters corresponding to the current model training results. In other words, the current model training results uploaded by each of the sub-block chains are summarized to determine whether the model parameters in the current model training results have all converged. If they have all converged, it indicates that the current global model has converged. At this time, the current global model parameters corresponding to the current model training results are determined as the final convergence parameters, and then the trained financial irregularities detection model is determined.
[0063] Step S13: 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, and jump to the step of distributing the current global model parameters to the sub-blockchains corresponding to 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.
[0064] In this embodiment, if there are unconverged model parameters in the first model training result and / or the second model training result, all the model parameters in the current model training result are weighted and aggregated according to the local model convergence of the first post-training detection model, the model convergence of the second post-training detection model, and the data set size of each financial institution to generate new global model parameters. That is to say, if there are unconverged model parameters in the first model training result and / or the second model training result, all the model parameters in the current model training result are weighted and aggregated to generate new current global model parameters, wherein the weight allocation is based on the convergence of the local first post-training detection model and the second post-training detection model of each sub-block chain and the data set size of each financial institution.
[0065] In this embodiment, the weighting factor of each sub-block chain is determined based on the local first post-training detection model and the model convergence of the second post-training detection model of each sub-block chain; the data set size of the financial institution corresponding to each sub-block chain, the weighting factor and the product of the model parameters uploaded by each sub-block chain are summed to obtain a first summation result; the data set size of the financial institution corresponding to each sub-block chain and the product of the weighting factor are 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] Among them, θ t+1 is the new current global model parameter, represents the size of the local dataset of blockchain i, w i represents the weighting factor of the ith blockchain, which depends on whether the local model converges. Specifically, if the local model converges, w i Set to 1; if the local model does not converge, w i is set to a value less than 1 to reduce its impact on the current global model. N represents the total number of blockchains. θ i It is the local model parameter uploaded by each blockchain i.
[0068] As can be seen from the above, this embodiment first sends the current global model parameters in the initial financial violation detection model to each sub-blockchain, so that each sub-blockchain uses a local partial data set to train the initial financial violation detection model to obtain a first trained detection model. If the first trained detection model has converged, the first trained detection model is continued to be trained using the local complete data set to obtain a second trained detection model. Next, the current model training results uploaded by each of the sub-blockchains are obtained, and it is determined whether there are 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, and 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 blockchains, data collaboration between multiple financial institutions is achieved under the premise of ensuring data privacy and security, thereby improving the efficiency of financial violation detection and the level of data privacy protection.
[0069] For further information, see Figure 3As shown, the embodiment of the present application also provides a method for constructing a financial irregularities detection model based on federated learning, which is applied to a sub-blockchain corresponding to any financial institution and may include:
[0070] Step S21, receiving the current global model parameters issued by the central blockchain, and using a partial data set of a local financial institution to train the initial financial violation detection model corresponding to the current global model parameters to obtain a corresponding first trained detection model, and determine whether the first trained detection model has converged locally. If it has converged, use the complete data set of the local financial institution to train the first trained detection model to obtain a second trained detection model.
[0071] Step S22, determine the current model training result; wherein the current model training result includes a first model training result and a second model training result, the first model training result includes the model parameters and model convergence status corresponding to when it is determined that the local first trained detection model has not converged, and the second model training result includes the model parameters and model convergence status of the second trained detection model.
[0072] Step S23: Send the current model training result to the central blockchain so that when there are unconverged model parameters in the current model training result, the central blockchain performs weighted aggregation on all the model parameters in the current model training result to generate new current global model parameters, and distributes the current global model parameters to each sub-blockchain corresponding to each financial institution to trigger the next round of model iterative training operation, until there are no unconverged model parameters in the current model training result, and a trained financial violation detection model is obtained.
[0073] Among them, the specific implementation process of each of the above steps can refer to the corresponding content disclosed in the above embodiments, which will not be repeated here.
[0074] In this way, by collaboratively building 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.
[0075] Accordingly, see Figure 4 As shown, the embodiment of the present application also provides a device for constructing a financial irregularities detection model based on federated learning, which is applied to a central blockchain and may include:
[0076] The model distribution module 11 is used to determine the global model parameters in the initial financial irregularities 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 uses a partial data set of the local financial institution to train the initial financial irregularities detection model to obtain a corresponding first trained detection model, and determines whether the first trained detection model has converged locally. If converged, the first trained detection model is trained using the complete data set of the local financial institution to obtain a second trained detection model;
[0077] The training result acquisition module 12 is used to obtain the current model training results uploaded by each of the sub-block chains; wherein the current model training results include a first model training result and a second model training result, wherein the first model training result includes the model parameters and model convergence status corresponding to the sub-block chain when it is determined that the first post-training detection model of the local area has not converged, and the second model training result includes the model parameters and model convergence status of the second post-training 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 results to generate new current global model parameters if there are unconverged model parameters in the current model training results, and jump to the step of distributing the current global model parameters to each sub-blockchain corresponding to 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.
[0079] As can be seen from the above, the present application first sends the current global model parameters in the initial financial violation detection model to each sub-blockchain, so that each sub-blockchain uses a local partial data set to train the initial financial violation detection model to obtain a first trained detection model. If the first trained detection model has converged, the first trained detection model is continued to be trained using the local complete data set to obtain a second trained detection model. Next, the current model training results uploaded by each of the sub-blockchains are obtained, and it is determined whether there are 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, and 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 blockchains, data collaboration between multiple financial institutions is achieved on the premise of ensuring data privacy and security, thereby improving the efficiency of financial violation detection and the level of data privacy protection.
[0080] In some specific implementations, the model distribution module 11 includes:
[0081] A difference determination unit, used to determine the difference between the model parameters in the first trained model and the current global model parameters;
[0082] A convergence status judgment unit is used to judge whether the first post-training detection model is converged locally based on the difference.
[0083] In some specific implementations, the training result acquisition module 12 further includes:
[0084] A model parameter determination unit, used to determine whether there are unconverged model parameters in the current model training results uploaded by each of the sub-block chains;
[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 implementations, the model parameter generation module 13 includes:
[0087] A model parameter generation submodule is used to perform weighted aggregation on all the model parameters in the current model training results according to the model convergence of the first local detection model after training, the model convergence of the second local detection model after training and the data set size of each financial institution, if there are unconverged model parameters in the first model training results and / or the second model training results, so as to generate new global model parameters.
[0088] In some specific embodiments, the model parameter generation submodule includes:
[0089] A weighting factor determination unit, configured to determine a weighting factor of each of the block chain components based on a local first trained detection model and a second trained detection model of each of the block chain components;
[0090] A first summation result obtaining unit, configured to sum the product of the data set size of the financial institution corresponding to each of the sub-blockchains, the weighting factor, and the model parameter uploaded by each of the sub-blockchains to obtain a first summation result;
[0091] A second summation result obtaining unit, used for summing the product of the data set size of the financial institution corresponding to each of the sub-blockchains and the weighting factor to obtain a second summation result;
[0092] A model parameter determination unit is used to determine the new current global model parameter based on the ratio of the first summation result to the second summation result.
[0093] In some specific implementations, the trained financial irregularities detection model is a financial money laundering behavior detection model.
[0094] Furthermore, the present application also discloses an electronic device. Figure 5 It is a structural diagram of an electronic device 20 according to an exemplary embodiment, and the content in the figure cannot be regarded as any limitation on the scope of use 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. Among them, the memory 22 is used to store a computer program, and the computer program is loaded and executed by the processor 21 to implement the relevant steps in the method for building a financial irregularities detection model based on federated learning disclosed in any of the aforementioned embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0095] In this embodiment, the power supply 23 is used to provide working 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 the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain 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 storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon can include an operating system 221, a 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 hardware devices and computer program 222 on the electronic device 20, which can be Windows Server, Netware, Unix, Linux, etc. In addition to the computer program that can be used to complete the method for building a financial irregularities detection model based on federated learning performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can further include computer programs that can be used to complete other specific tasks.
[0098] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the aforementioned method for constructing a financial irregularities detection model based on federated learning is implemented. The specific steps of the method can be referred to the corresponding contents disclosed in the aforementioned embodiments, and will not be repeated here.
[0099] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0100] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0101] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0102] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0103] The technical solution provided by the present application is introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for general technicians in this field, according to the idea of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A method for constructing a financial irregularities detection model based on federated learning, characterized in that: Applied to the central blockchain, including: Determine the global model parameters in the initial financial irregularities 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 uses a partial data set of the local financial institution to train the initial financial irregularities detection model to obtain a corresponding first trained detection model, and judge whether the first trained detection model has converged locally. If it has converged, use the complete data set of the local financial institution to train the first trained detection model to obtain a second trained detection model; Obtain the current model training results uploaded by each of the sub-blockchains; wherein the current model training results include a first model training result and a second model training result, wherein the first model training result includes the model parameters and model convergence status corresponding to the sub-blockchain when it is determined 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; If there are unconverged model parameters in the current model training results, all the model parameters in the current model training results are weighted aggregated to generate new current global model parameters, and the process jumps to the step of distributing the current global model parameters to the sub-blockchains corresponding to the financial institutions, until there are no unconverged model parameters in the current model training results, so as to obtain a trained financial irregularities detection model.
2. The method for constructing a financial irregularities detection model based on federated learning according to claim 1, characterized in that: The determining whether the first post-training detection model converges locally includes: Determining 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 converges locally.
3. The method for constructing a financial irregularities 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-block chains, the method further includes: Determine whether there are unconverged model parameters in the current model training results uploaded by each of the sub-block chains; If there are no unconverged model parameters in the current model training results, 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 irregularities detection model based on federated learning according to claim 1, characterized in that: If there are unconverged model parameters in the current model training result, weighted aggregation is performed on all the model parameters in the current model training result to generate new current global model parameters, including: If there are non-converged model parameters in the first model training results and / or the second model training results, all the model parameters in the current model training results are weighted aggregated according to the model convergence of the local first post-training detection model, the model convergence of the second post-training detection model and the data set size of each of the financial institutions to generate new global model parameters.
5. The method for constructing a financial irregularities detection model based on federated learning according to claim 4, characterized in that: The step of weighting and aggregating all the model parameters in the current model training result according to the local model convergence of the first trained detection model, the model convergence of the second trained detection model, and the data set size of each financial institution to generate new global model parameters includes: Determine a weighting factor of each of the block chain components based on the local first trained detection model and the second trained detection model of each of the block chain components; Summing the product of the data set size of the financial institution corresponding to each of the sub-blockchains, the weighting factor, and the model parameter uploaded by each of the sub-blockchains to obtain a first summation result; Summing the product of the data set size of the financial institution corresponding to each of the sub-blockchains and the weighting factor to obtain a second summation result; The new current global model parameter is determined based on a ratio of the first summation result and the second summation result.
6. The method for constructing a financial irregularities detection model based on federated learning according to any one of claims 1 to 5, characterized in that: The trained financial irregularities detection model is a financial money laundering behavior detection model.
7. A method for constructing a financial irregularities detection model based on federated learning, characterized in that: Applicable to the corresponding sub-blockchain of any financial institution, including: Receive the current global model parameters issued by the central blockchain, and use a partial data set of the local financial institution to train the initial financial violation detection model corresponding to the current global model parameters to obtain a corresponding first trained detection model, and determine whether the first trained detection model has converged locally. If it has converged, use the complete data set of the local financial institution to train the first trained detection model to obtain a second trained detection model; Determine the current model training result; wherein the current model training result includes a first model training result and a second model training result, the first model training result includes the model parameters and model convergence status corresponding to when it is determined that the first trained detection model locally has not converged, and the second model training result includes the model parameters and model convergence status of the second trained detection model; The current model training results are sent 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 sub-blockchains corresponding to each financial institution to trigger the next round of model iterative training operations, until there are no unconverged model parameters in the current model training results, and a trained financial violation detection model is obtained.
8. A device for constructing a financial irregularities detection model based on federated learning, characterized in that: Applicable to the corresponding sub-blockchain of any financial institution, including: A model training module is used to receive the current global model parameters issued by the central blockchain, and use a partial data set of a local financial institution to train the initial financial violation detection model corresponding to the current global model parameters to obtain a corresponding first trained detection model, and determine whether the first trained detection model has converged locally. If it has converged, the first trained detection model is trained using the complete data set of the local financial institution to obtain a second trained detection model; A training result sending module, used to send the current model training result to the central blockchain; wherein the current model training result includes a first model training result and a second model training result, wherein the first model training result includes the model parameters and model convergence status corresponding to when it is determined that the first trained detection model locally has not converged, and the second model training result includes the model parameters and model convergence status of the second trained detection model; The model training end module is used to jump to the step of receiving the current global model parameters issued by the receiving center blockchain 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 a trained financial violation detection model.
9. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the method for building a financial irregularities detection model based on federated learning as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: Used to store computer programs; wherein, when the computer program is executed by a processor, it implements the method for building a financial irregularities detection model based on federated learning as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Learning tags for video annotation using latent subtags
CN103299324A
Joint model training method, system and device and computer readable storage medium
CN109871702A
Federal learning model training method and device, terminal equipment and storage medium
CN112132277A
Parking prediction model training method and system based on federal learning and blockchain
CN113592102A
Big model neural architecture search-oriented federal cooperative training method
CN117952190A