A privacy-preserving ship name recognition model training method using federated learning
By using the Paillier cryptosystem to encrypt and partially decrypt model parameters in federated learning, the problem of data islands and privacy protection in the maritime field is solved, the decryption overhead of participants is reduced, and efficient privacy-protecting ship name recognition model training is achieved.
Patent Information
- Application Number
- CN202111680336.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-30
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2041-12-30
AI Technical Summary
In the existing technology, the application of federated learning in the maritime field has problems of data islands and model parameter leakage, and participants face high decryption overhead, making it difficult to effectively protect the privacy of training data.
The Paillier cryptosystem is used to encrypt the model parameters, and the decryption overhead of participants is reduced through partial decryption, allowing aggregation and training of model parameters without leaking training data.
It effectively solves the problem of maritime data islanding and training data privacy protection, significantly reduces the decryption overhead of participants, prevents the leakage of model parameters, and improves the security of data privacy protection.
Smart Images

Figure CN114337987B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information security technology, and in particular to a privacy protection ship name recognition model training method using federated learning. Background Art
[0002] Federated machine learning (Federated Machine Learning) is also known as federated learning. Federated machine learning is a machine learning framework that can effectively help multiple institutions use data and conduct machine learning modeling while meeting the requirements of user privacy protection, data security, and government regulations. As a type of machine learning paradigm for federated learning, federated learning can effectively solve the problem of data silos, allowing participants to jointly model without sharing data, which can technically break data silos and achieve AI collaboration.
[0003] At present, it is difficult to combine federated learning with the maritime field. Different maritime departments have different ship name datasets, but due to information security restrictions, different maritime departments cannot share ship name datasets. However, ships can indeed cross the scope of management of different maritime departments. How to solve the data island problem caused by information security issues and how to use the ship name datasets of different maritime departments to improve model accuracy are the difficulties faced by artificial intelligence technology in the application of smart water transportation. Fortunately, federated learning provides a potential solution to the above two problems, that is, each maritime department trains the model locally, and then the trained model is aggregated by an aggregation server to jointly train a more efficient model. Intuitively, this can effectively solve the above problems. However, existing studies have shown that model parameters will still leak training data. For this reason, if a privacy-preserving ship name recognition model training method using federated learning is designed, participants only upload encrypted training models to the aggregation server, and the server executes the federated average algorithm on the encrypted model, the data privacy of the participants can be protected. However, there are some defects in this, such as participants have to share private keys and participants face high decryption costs.
[0004] Therefore, in view of the problems existing in the existing technology, it is particularly important to provide a privacy-preserving ship name recognition model training technology using federated learning that will not leak training data and reduce decryption overhead. Summary of the invention
[0005] The purpose of the present invention is to propose a privacy-preserving ship name recognition model training method using federated learning, aiming at solving the problems of ship name data silos in each maritime department, model parameter data training data privacy, and high decryption overhead for participants. Specifically, in order to solve the problem of data silos in maritime departments, the present invention adopts a federated learning approach to enable multiple maritime departments with ship name data sets to jointly train a ship name recognition model; in order to prevent model parameters from leaking training data, the present method uses the Paillier cryptographic system to encrypt the trained model; in order to reduce the decryption overhead of participants, the present invention proposes to use partial decryption to significantly reduce the decryption overhead of participants.
[0006] In order to achieve the above object, the present invention adopts the following technical solutions:
[0007] The present invention provides a privacy-preserving ship name recognition model training method using federated learning, including a joint training initiator, a model aggregation server, and n federated model training participants (hereinafter referred to as the initiator, the aggregation server, and the n participants); the method comprises the following steps:
[0008] Step S1. Initiate the joint training ship name recognition model task: The initiator initializes the ship name recognition model And recruit n participants to send the model aggregation task to the aggregation server;
[0009] In step S1, in order to protect the data privacy of the participants, it also includes: the initiator initializes the public-private key pair (pk, sk) of the Paillier cryptographic system, wherein the initiator divides the private key sk into two partial private keys sk1 and sk2; the initiator sends (pk, sk1) to the aggregation server and Sent to n participants.
[0010] Step S2. The participant trains a local model and encrypts it: The participant uses the local ship name dataset and the initial model or the decrypted aggregate model to train a new local model; the training process is formally expressed as:
[0011]
[0012] Where f represents the local training function, d represents the participant’s local ship name dataset, and t represents the number of aggregations;
[0013] After completing the training, the participants call the encryption algorithm Enc of the Paillier cryptosystem to encrypt the model parameters. The encryption process is formally expressed as:
[0014]
[0015] Afterwards, participants will use the encrypted training model and the amount of local data of the participants |d| sent to the aggregation server;
[0016] Step S3. Aggregate the encryption models of the participants and execute the federated average algorithm: The aggregation server receives the encryption models of n participants. Afterwards, the aggregation server uses the scalar multiplication homomorphism and scalar addition homomorphism of the Paillier cryptosystem to perform the following computation:
[0017]
[0018] Step S4. The aggregation server partially decrypts the aggregation model: The aggregation server determines whether the termination condition is met (for example, whether the required number of aggregations has been reached), and the determination method is as follows:
[0019] If the set termination condition is not met, the aggregation server performs a partial decryption operation on the encrypted aggregation model. The aggregation server is formally calculated as follows:
[0020]
[0021] Where N is the public key parameter; In addition, in step S4, the aggregation server also calculates the sum of the local data volume of all participants and sends D to the participants; the aggregation server will Sent to participants;
[0022] If the set termination condition has been reached, the aggregation server will and D are sent to the initiator as output, where T represents the maximum number of aggregations;
[0023] Step S5. Participant partially decrypts the aggregation model: After receiving the aggregation model information (i.e. ), the participant performs a partial decryption operation to obtain the decrypted aggregate model. The participant formally performs the following calculations:
[0024]
[0025] Among them, N is the public key parameter; after obtaining the decrypted model, the participants continue to calculate Get the average model of the aggregation
[0026] Preferably, in step S1, the initialized ship name recognition model is a recurrent neural network CRNN, where Including model structure and model parameters;
[0027] The public key pk=(N+1,N), where N=pq, p and q are two strong prime numbers with sufficient security length (such as 512 bits); the private key sk=(λ,μ), where λ=pq-p-q+1, μ=λ -1 mod N, that is, μ is the inverse element of λ mod N; the partial private key sk2 is an 80-bit random number, and the partial private key sk1 = λμ-sk2modλN; when sk2 is selected as a smaller number, the decryption overhead of the participants will be significantly reduced.
[0028] Preferably, in step S2, the Enc encryption model is Wherein, r is a random positive integer less than N.
[0029] Specifically, the participants used the last trained model and the ship name dataset as input to retrain a new model; in order to prevent attackers from guessing the training data based on the model parameters, the participants used Paillier encryption to encrypt the model parameters. Specifically, the Enc encryption model is Where r is a random positive integer not exceeding N. It is worth noting that for the sake of simplicity, the present invention uses To replace the CRNN model, in actual operation, we need to Perform an operation on each parameter in .
[0030] Preferably, in step S3, the scalar multiplication is homomorphic to The scalar addition homomorphism is Where Dec is the decryption algorithm of the Paillier cryptosystem. Formally, the decryption algorithm is expressed as The aggregation server uses scalar multiplication homomorphism and scalar addition homomorphism to calculate Easy to launch
[0031] Preferably, in step S4, the aggregation server performs partial decryption operation only before reaching the maximum number of aggregation times T. When the maximum number of aggregation times T is reached, the aggregation server sends the aggregation model to the initiator; after the aggregation server performs partial decryption once, the participant performs a partial decryption operation once to obtain the decrypted model. The purpose of the aggregation server performing partial decryption is to reduce the decryption overhead of the participant by performing a partial decryption operation once.
[0032] Specifically, in step S5, given the ciphertext calculate And continue to calculate Since sk1+sk2=0modλ and sk1+sk2=1mod N, we can deduce
[0033] Because r λN =1mod N 2 , so, [x]1·[x]2=1+xN mod N 2 Due to the existence of the above properties, through two partial decryptions, participants can obtain the decrypted aggregate model. It is worth noting that after decryption, participants perform a division (i.e. ) to obtain the average model after aggregation.
[0034] The present invention also provides a storage device, in which a plurality of instructions are stored, and the instructions are suitable for being loaded by a processor and executing the step operations of the aforementioned privacy protection ship name recognition model training method.
[0035] The present invention further provides an intelligent terminal, comprising a processor for executing various instructions and a storage device for storing multiple instructions, wherein the instructions are suitable for being loaded by the processor and executing the steps of the aforementioned privacy protection ship name recognition model training.
[0036] Compared with the prior art, the present invention achieves the following beneficial effects:
[0037] The privacy-preserving ship name recognition model training method provided by the present invention has many advantages: (1) It can solve the problem of maritime data islands, specifically by adopting a federated learning model to enable multiple maritime departments with data to jointly train a ship name recognition model, thereby solving the problem of maritime data islands caused by information security issues; (2) It can solve the problem of training data privacy, by adopting an encryption method to prevent attackers from inferring training data based on model parameters, thereby protecting the privacy of training data. (3) It can reduce the decryption overhead of participants, by adopting a partial decryption method, that is, the aggregation server performs decryption once and the participant performs decryption once, by setting a smaller partial private key for the participant to reduce the decryption overhead of the participant, and prevent the participant from obtaining the complete private key. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 is a flow chart of the privacy protection ship name recognition model training method provided by the present invention;
[0039] Figure 2 It is a schematic diagram of the system structure of the privacy protection ship name recognition model training method provided by the present invention. DETAILED DESCRIPTION
[0040] The specific implementation of the present invention will be further described below in conjunction with the accompanying drawings.
[0041] like Figures 1-2As shown in FIG. 1 , this embodiment discloses a privacy-preserving ship name recognition model training method using federated learning, which jointly trains a ship name recognition model without leaking the privacy of maritime data. Figure 1 and attached Figure 2 , this method involves an initiator, an aggregation server and n participants; the privacy protection ship name recognition model training method provided in this embodiment specifically includes the following steps:
[0042] Step S1. Initiate the joint training ship name recognition model task: Initialize the system. The initiator uses federated learning to initialize the ship name recognition model. The ship name recognition model A convolutional recurrent neural network CRNN is used, and 4 participants are recruited. 4 maritime departments jointly train a ship name recognition model. In order to simplify the description, this embodiment abstracts the model into 1 parameter and uses decimals to illustrate the encryption and decryption process; the initiator initializes the public and private key pair (pk, sk) of the Paillier cryptographic system, where pk = (36, 35), sk = (24, 19), sk2 = 2, sk1 = 454.
[0043] Step S2. Participants train local models and encrypt them: Assume that the amount of data owned by the four participants is 1, 1, 2, and 2 respectively, and the model parameters they train are 1, 2, 3, and 4 respectively. The four participants encrypt the model parameters they train, i.e. Participants send the encrypted model and data volume to the aggregation server.
[0044] Step S3. Aggregate the encryption models of the participants and execute the federated average algorithm: After receiving the encryption models of the four participants {(648,1),(222,2),(44,3),(141,4)}, the aggregation server uses the scalar multiplication homomorphism and scalar addition homomorphism of the Paillier cryptosystem to perform the following calculations:
[0045] 346←648 1 ·222 1 ·44 2 ·141 2 mod 35 2 ;
[0046] Step S4. The aggregation server partially decrypts the aggregation model: The aggregation server first determines whether the termination condition is obtained. In this embodiment, the termination condition is whether the required number of aggregations is achieved. The determination method is as follows:
[0047] If the set termination condition is not met, the aggregation server performs a partial decryption operation on the encrypted aggregation model. The aggregation server is formally calculated as follows:
[0048] 431←268 454 mod 35 2 ;
[0049] In addition, the aggregation server also calculates D = 1 + 1 + 2 + 2. The aggregation server sends (431, 346, 6) to the participants.
[0050] If the set termination condition has been met, the participant sends 346 and 6 as output to the initiator.
[0051] Step S5. The participant partially decrypts the aggregation model: After receiving the aggregation model information (431, 346, 6) from the aggregation server, the participant performs a partial decryption operation to obtain the decrypted aggregation model. The participant formally performs the following calculations:
[0052]
[0053] After obtaining the decrypted model, participants continue to calculate The average model obtained for the aggregation was 2.833.
[0054] According to the disclosure and teaching of the above description, those skilled in the art to which the present invention belongs may also make changes and modifications to the above embodiments. Therefore, the present invention is not limited to the specific embodiments disclosed and described above, and some modifications and changes to the invention should also fall within the scope of protection of the claims of the present invention. In addition, although some specific terms are used in this specification, these terms are only for the convenience of description and do not constitute any limitation to the present invention.
Claims
1. A privacy-preserving ship name recognition model training method using federated learning, characterized in that: The method comprises an initiator, an aggregation server and n participants; the method comprises the following steps: Step S1. Initiate the joint training ship name recognition model task: The initiator initializes the ship name recognition model And recruit n participants, send the model aggregation task to the aggregation server; the ship name recognition model A recurrent neural network CRNN is used, where Including model structure and model parameters; The initiator initializes the public-private key pair (pk, sk) of the Paillier cryptographic system, where the initiator splits the private key sk into two parts, private keys sk1 and sk2; the initiator sends (pk, sk1) to the aggregation server and Send to n participants; The public key pk=(N+1,N), where N=pq, p and q are strong prime numbers; the private key sk=(λ,μ), where λ=pq-p-q+1, μ=λ -1 mod N, that is, μ is the inverse of λ mod N; the partial private key sk2 is an 80-bit random number, and the partial private key sk1 = λμ-sk2modλN; when sk2 is selected as a smaller number, the decryption cost of the participants will be significantly reduced; Step S2. The participant trains a local model and encrypts it: The participant uses the local ship name dataset and the initial model or the decrypted aggregate model to train a new local model; the training process is formally expressed as: Where f represents the local training function, d represents the participant’s local ship name dataset, and t represents the number of aggregations; After completing the training, the participants call the encryption algorithm Enc of the Paillier cryptographic system to encrypt the model parameters. The encryption process is formally expressed as: Where r is a random positive integer less than N; then, the participants will and the amount of local data of the participants |d| sent to the aggregation server; Step S3. Aggregate the encryption models of the participants and execute the federated average algorithm: The aggregation server receives the encryption models of n participants. Afterwards, the aggregation server uses the scalar multiplication homomorphism and scalar addition homomorphism of the Paillier cryptosystem to perform the following computation: The scalar multiplication homomorphism is The scalar addition homomorphism is Where Dec is the decryption algorithm of the Paillier cryptosystem. Formally, the decryption algorithm is expressed as Step S4. The aggregation server partially decrypts the aggregation model: The aggregation server determines whether the termination condition is met, and the determination method is as follows: If the set termination condition is not met, the aggregation server performs a partial decryption operation on the encrypted aggregation model. The aggregation server is formally calculated as follows: Where N is the public key parameter; In addition, in step S4, the aggregation server also calculates the sum of the local data volume of all participants And send D to the participants, the aggregation server will Sent to participants; If the set termination condition has been reached, the aggregation server will and D are sent to the initiator as output, where T represents the maximum number of aggregations; The aggregation server only performs partial decryption operations before reaching the maximum number of aggregation times T. When the maximum number of aggregation times T is reached, the aggregation server sends the aggregation model to the initiator; after the aggregation server performs a partial decryption, the participant performs a partial decryption operation to obtain the decrypted model; Step S5. Participants partially decrypt the aggregation model: After receiving the aggregation model information from the aggregation server, the participants perform a partial decryption operation to obtain the decrypted aggregation model; the partial decryption operation is to obtain the decrypted aggregation model for a given ciphertext. calculate And continue to calculate The participants formally perform the following computation: Among them, N is the public key parameter; after obtaining the decrypted model, the participants continue to calculate Get the average model of the aggregation 2. The privacy-preserving ship name recognition model training method according to claim 1 is characterized in that: In step S5, the aggregation model information includes and D.
3. A storage device, wherein a plurality of instructions are stored in the storage device, characterized in that: The instructions are suitable for being loaded by a processor and executing the step operations described in any one of claims 1-2.
4. An intelligent terminal, comprising a processor for executing each instruction and a storage device for storing multiple instructions, characterized in that: The instructions are suitable for being loaded by the processor and executing the step operations as described in any one of claims 1-2.
