A medical data encryption transmission system and method

By using the encryption method of SM2 signature verification and SM4 CBC mode in medical data transmission, combined with historical model parameters as keys, the security and computing resource occupation of fixed encryption algorithms in medical data transmission are solved, higher stability and security are achieved, and the data transmission volume is reduced.

CN119232496BActive Publication Date: 2025-03-25PEKING UNION MEDICAL COLLEGE HOSPITAL +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411746983.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-02
Publication Date
2025-03-25
Estimated Expiration
2044-12-02

AI Technical Summary

Technical Problem

During the medical data transmission process, fixed encryption algorithms cause frequent publication of keys between the server and the client, which is easy to be cracked and occupies a large amount of computing resources.

Method used

The encryption method of SM2 signature verification and SM4 CBC mode is adopted, and the model parameters transmitted in history are combined as the encryption key of SM4 CBC mode to encrypt and transmit the model parameters.

Benefits of technology

Improve the stability and security of medical data transmission, while reducing the amount of data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119232496B_ABST
    Figure CN119232496B_ABST
Patent Text Reader

Abstract

The present application provides a medical data encryption transmission system and method, which relates to the field of data processing technology, wherein a server responds to a medical data analysis request and performs encrypted transmission of model parameters with each client through the following steps: the server receives a model parameter acquisition request sent by the client; the server authenticates the client based on request verification information corresponding to the client; if the client identity authentication is passed, the server generates a key string based on the historical optimization model parameters corresponding to the client, encrypts the optimization model parameters to be sent in this round, so as to generate a ciphertext data packet and send it to the client; the client determines a decryption key based on an identifier, decrypts the received ciphertext data packet, so as to obtain the optimization model parameters; the client updates the local local analysis model based on the acquired optimization model parameters, so that the server determines the optimization model parameters of the client for the next round.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of medical data technology, and in particular to a system and method for encrypting and transmitting medical data. Background Art

[0002] With the development of science and technology, more and more digital technologies are used in the medical field to build medical platforms. However, since most medical data involves personal privacy, medical platforms often use a federated learning mechanism to iteratively generate AI models for medical data. However, during the data transmission process of the medical platform, if a fixed encryption algorithm is used for encryption, it is necessary to frequently disclose the key between the server and the client. This step is not only easy to crack, but also takes up a lot of computing resources. Summary of the invention

[0003] The purpose of the embodiments of the present application is to provide a medical data encryption transmission system and method to improve the stability and security of medical data transmission and reduce the data transmission volume.

[0004] In a first aspect, the present invention provides an encrypted transmission system for medical data, the encrypted transmission system comprising a server and multiple clients, each of which is deployed in a different medical institution, the server responds to a medical data analysis request, and performs encrypted transmission of model parameters with each client through the following steps to generate an optimized analysis model for the client that issues the medical data analysis request, the optimized analysis model being used to analyze the type of medical data and rare diseases indicated by the medical data analysis request:

[0005] The server receives a model parameter acquisition request sent by the client, and the model parameter acquisition request includes at least request verification information; the server authenticates the client based on the request verification information corresponding to the client; if the client identity authentication is passed, the server generates a key string based on the historical optimization model parameters corresponding to the client, encrypts the optimization model parameters to be sent in this round, so as to generate a ciphertext data packet and send it to the client, and the ciphertext data packet includes at least ciphertext data and an identifier of the historical optimization model parameters used to generate the key string; the client determines a decryption key based on the identifier, decrypts the received ciphertext data packet, and obtains the optimization model parameters; the client updates the local local analysis model based on the obtained optimization model parameters, and sends the updated local model parameters and loss function values ​​of the local analysis model to the server, so that the server determines the optimization model parameters of the client for the next round, and the local analysis model is generated by the client based on the initial analysis model sent by the server and the local medical data training of the client.

[0006] In an optional implementation, each model parameter is represented by a parameter name field and a parameter value field that are associated with each other, and the server converts the historical optimization model parameters into a key string of a first length in the following manner: for each model parameter, converting the corresponding parameter name field into a first English character based on a first mapping rule, and converting the corresponding parameter value field into a second English character based on a second mapping rule; for each model parameter, concatenating the first English character and the second English character corresponding to the model parameter into a first English string; concatenating the first English strings corresponding to all model parameters in sequence to generate an English string of a second length; and converting the English string of the second length into a key string of the first length.

[0007] In an optional implementation, the server encrypts the optimization model parameters of this round in the following manner to generate ciphertext data: converting the optimization model parameters to be sent in this round into a character string to be encrypted of a first length; dividing the character string to be encrypted of the first length into multiple character segments to be encrypted of a third length; performing an XOR operation on the first character segment to be encrypted and the initial vector character segment, and encrypting the XOR result through the SM4 encryption algorithm to generate a ciphertext block corresponding to the first character segment to be encrypted; for each remaining character segment to be encrypted other than the first character segment to be encrypted, performing an XOR operation on the remaining character segment to be encrypted and the ciphertext block corresponding to the previous character segment to be encrypted, and encrypting the XOR result through the SM4 encryption algorithm to generate a ciphertext block corresponding to the remaining character segment to be encrypted; and concatenating all the ciphertext blocks in sequence to generate ciphertext data.

[0008] In an optional implementation, before performing each XOR operation step, the server also replaces each English character in the encrypted character segment in the following manner: based on the position sequence of the English character to be replaced in the character string to be encrypted, searching for the first target English character at the same position sequence in the key character string; based on the first target English character, determining the target displacement distance corresponding to the first target English character; replacing the English character to be replaced with a second target English character, wherein the distance between the second target English character and the English character to be replaced in the English letter sequence is the target displacement distance.

[0009] In an optional implementation, the model parameter acquisition request includes at least a request string and a first identification value and a second identification value. The server authenticates each client in the following manner: respectively determining whether the first identification value and the second identification value are within a range of identification values; if both are within the range of identification values, calculating a third identification value based on the request string; determining whether the first identification value is equal to the third identification value; if they are equal, determining that the client identity authentication is successful.

[0010] In an optional implementation manner, the server calculates the third identification value R in the following manner:

[0011] R=(e+ ) mod n;

[0012] e=Hash( );

[0013] ;

[0014] ( , ) = [s]G + [t]Pub ( , );

[0015] t = (r + s) mod n;

[0016] in, is the request string, r is the first identification value, s is the second identification value, Pub ( , ) is the encryption public key.

[0017] In an optional implementation, the first mapping rule is used to indicate the relationship between the parameter name field and the English character, and the server is specifically used to determine that the English character associated with the parameter name field in the first mapping rule is the first English character.

[0018] In an optional implementation, the server is specifically configured to calculate the product of the parameter value of the model parameter and a preset value, and round the product; based on a Base64 index table, determine a second English character corresponding to the product.

[0019] In an optional implementation, the client determines the historical optimization model parameters from the decrypted optimization model parameters based on the identifier, and determines a key string of the first length based on the historical optimization model parameters.

[0020] In a second aspect, the present invention provides a method for encrypting and transmitting medical data, wherein each client is deployed in a different medical institution.

[0021] The server responds to the medical data analysis request and performs encrypted transmission of model parameters with each client through the following steps to generate an optimized analysis model for the client that issued the medical data analysis request. The optimized analysis model is used to analyze the medical data types and rare diseases indicated by the medical data analysis request:

[0022] The server responds to the model parameter acquisition request sent by the client, where the model parameter acquisition request at least includes request verification information;

[0023] The server authenticates the client based on the request verification information corresponding to the client;

[0024] If the client identity authentication is passed, the server generates a key string based on the historical optimization model parameters corresponding to the client, encrypts the optimization model parameters to be sent in this round, generates a ciphertext data packet and sends it to the client. The ciphertext data packet includes at least the ciphertext data and the identifier of the historical optimization model parameters used to generate the key string;

[0025] The client determines a decryption key based on the identifier and decrypts the received ciphertext data packet to obtain the optimized model parameters;

[0026] The client updates the local partial analysis model based on the acquired optimization model parameters, and sends the updated local model parameters and loss function values ​​of the local analysis model to the server, so that the server determines the next round of optimization model parameters of the client. The local analysis model is generated by the client based on the initial analysis model sent by the server and the local medical data training of the client.

[0027] The present application provides a medical data encryption transmission system and method. Model training is performed between the server and the client based on the federated learning mode. In the process of transmitting model parameters between the server and the client, the SM2 signature verification and SM4 CBC mode encryption methods are combined, and the historically transmitted model parameters are used as the encryption key of the SM4 CBC mode, which ensures the stability and security of medical data transmission while reducing the amount of data transmission. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0029] Figure 1 A schematic diagram of the structure of a medical data processing system provided in an embodiment of the present application;

[0030] Figure 2 A flowchart of a method for processing medical data provided in an embodiment of the present application;

[0031] Figure 3 A flowchart of a method for encrypting and transmitting medical data provided in an embodiment of the present application;

[0032] Figure 4 A schematic diagram of the structure of a medical data encryption transmission system provided in an embodiment of the present application. DETAILED DESCRIPTION

[0033] First, the applicable scenarios of this application are described. The technical solution of this application can be applied to a medical data processing system, specifically a medical data processing system built based on federated learning. The processing system includes a server and multiple clients, each of which is deployed in a different medical institution.

[0034] The existing federated learning model training mechanism is usually: the server sends the model to the client of each medical institution for local training, and then aggregates and evaluates the models uploaded by each client. When training the model between the server and the clients, frequent data transmission is required, which not only takes up a lot of computing resources, but also increases the possibility of being attacked.

[0035] Therefore, the present application provides a medical data encryption transmission system and method to improve the stability and security of medical data transmission and reduce the data transmission volume.

[0036] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.

[0037] Embodiment 1

[0038] Figure 1 This is a schematic diagram of the structure of a medical data processing system provided in an embodiment of the present application. Figure 1 As shown, the encrypted transmission system (which can also be a medical data processing system) includes a server and multiple clients, each of which is deployed in a different medical institution. The server responds to medical data analysis requests to generate an optimized analysis model for the client that issues the medical data analysis request. The optimized analysis model is used to analyze the types of medical data and rare diseases indicated by the medical data analysis request.

[0039] Further, such as Figure 2 As shown, the server and client can complete model training through the following steps:

[0040] Step 1: The server generates global model parameters and initial analysis model based on the medical data analysis request initiated by the target client, and sends them to multiple clients.

[0041] The target client here is the target medical institution that initiates the medical data analysis request. After the medical data analysis request is sent to the server, the server will broadcast it to the corresponding clients of the remaining medical institutions.

[0042] Among them, the medical data analysis request is used to indicate the types of medical data and rare diseases to be analyzed by the medical institution corresponding to the target client, and the multiple clients include the target client and other clients that join the medical data analysis request.

[0043] The remaining medical institutions can choose whether to respond to the medical data analysis request and use local medical data to help the target medical institutions jointly train and generate AI models.

[0044] The medical data types here can include images, case forms, records, gene sequences, etc. Rare diseases can be divided into multiple systems, such as blood system diseases, nervous system diseases, cardiovascular system diseases, urinary system diseases, endocrine system diseases, skeletal system diseases, respiratory system diseases, immune system diseases, digestive system diseases, ophthalmic system diseases, skin system diseases, pediatric system diseases and obstetrics and gynecology system diseases. Each system includes at least one disease, such as respiratory system diseases, including lymphangioleiomyomatosis, alveolar proteinosis, and idiopathic pulmonary fibrosis.

[0045] For example, the target medical institution A initiates a medical data analysis request, which indicates that the type of medical data to be analyzed is medical images, specifically coronary CTA images, and the medical data analysis request indicates that the rare disease to be analyzed may be coronary artery ectasia. That is, the input of the AI ​​model that the target medical institution A wants to build may be the coronary CTA image of the patient, and the output may be the probability value of the disease, the degree of the disease, or the identification of the key areas of the disease, and other analysis results.

[0046] The remaining medical institutions can choose whether to join the medical data analysis request of target medical institution A based on the situation of local medical data.

[0047] Furthermore, the server can determine the target medical institution A and other medical institutions B, C, D, E that join the medical data analysis request and send global model parameters and initial analysis models to the respective clients of medical institutions A, B, C, D, E.

[0048] The server can match the appropriate AI model and the corresponding global model parameters according to the type of medical data and rare diseases to be analyzed by the target medical institution indicated by the medical data analysis request. For example, when the medical data type is medical imaging, CNN (Convolutional Neural Networks) can be selected as the initial analysis model. When the medical data type is time series data such as electrocardiogram, RNN (Recurrent Neural Network) can be selected as the initial analysis model. The global model parameters here can be the commonly used initial values ​​of the model set based on experience.

[0049] Step 2: For each client, the initial analysis model is trained based on the local medical data of the client to obtain the local analysis model of the client, and the local model parameters and loss function values ​​of the local analysis model are sent to the server, and the local medical data is matched with the medical data type and rare disease type.

[0050] For the clients of different medical institutions A, B, C, D, and E, the clients start to train the initial analysis model using local medical data. The training loss function, number of iterations, and other training methods can be uniformly specified by the server, such as 5 or 10 rounds per round, for a total of 10 rounds. For example, medical institution A inputs the coronary CTA image of patient a into the initial analysis model, and trains it to output the probability value of patient a being sick. Then medical institution B can input the coronary CTA image of patient b into the initial analysis model, and train it to output the probability value of patient b being sick, and so on, to obtain local analysis models respectively.

[0051] After each round of iteration, each client can feed back the local model parameters and loss function value of the current local analysis model to the server, which can be specifically expressed as , ,……, ,in, , , , They are different sub-parameter items of the local analysis model. Lost is the loss function value.

[0052] Step 3: The server inputs the multiple local model parameters and loss function values ​​received in this round into the particle swarm optimization model to obtain the optimized model parameters output by the particle swarm optimization model, and sends the optimized model parameters to each client to update the model parameters of the initial analysis model in the client.

[0053] The server receives each round - Input to the particle swarm optimization model, such as Figure 2 As shown, the particle swarm optimization model can output the optimization model parameters of each round in the following ways:

[0054] S100, taking the local model parameters sent by each client in this round as the position of particle i, and taking the loss function difference of each client as the speed of the corresponding particle i.

[0055] Among them, the loss function difference is the difference between the loss function value sent by the client in this round and the average of the loss function value in the previous round.

[0056] For each particle i, its position can be expressed as , ,……, .

[0057] For each particle i, its velocity can be expressed as = - , = - ,……, = - .in, It is the mean of the loss function values ​​corresponding to all clients in the previous round.

[0058] S101: Determine whether a convergence condition is met.

[0059] The convergence condition here may be the number of iterations, etc.

[0060] And the fitness value of each particle is calculated through the objective function and compared with the optimal position of the particle to update the optimal position of the particle.

[0061] S102: If not, update the position and velocity of each particle i, and return to the step of determining whether the convergence condition is met.

[0062] In step S102, the position and velocity of each particle i can be updated in the following way:

[0063] + + ( );

[0064] + ;

[0065] in, is the updated velocity of particle i, is the velocity of particle i before updating, is the updated position of particle i, is the position of particle i before updating, is the optimal position of particle i, is the global optimal position, , is the learning parameter value (usually = =2), , is a random parameter value, taking the value [0,1], i=1, 2, 3...N, N is the total number of particles.

[0066] S103: If yes, output the optimal particle position and the global optimal position of each particle i as optimization model parameters.

[0067] Finally, when the convergence condition is met, the optimal particle position and the global optimal position of each particle i can be obtained.

[0068] Step 4: The server determines an optimization analysis model based on the optimization model parameters, and determines whether the optimization analysis model meets the preset conditions. If not, the server returns to execute step 2. If yes, the server sends the optimization analysis model to the target client.

[0069] The server can use the optimized model parameters as the model parameters of the initial analysis model to determine the optimized analysis model, and then calculate the accuracy of the optimized analysis model. When the accuracy meets the requirements, the iteration can be ended and the obtained optimized analysis model can be sent to the target client. If the accuracy is not satisfied, the optimized model parameters are fed back to each client so that the client can continue iterative training.

[0070] Step 5: The target client inputs the medical data to be tested that matches the medical data type into the optimization analysis model to obtain the analysis results corresponding to the rare diseases output by the optimization analysis model.

[0071] The target client can obtain the corresponding analysis results through the final optimized analysis model. The optimized analysis model here has higher accuracy and better generalization ability, which can provide better auxiliary effect in the analysis of rare diseases.

[0072] The medical data processing system provided in this application combines the particle swarm optimization algorithm with the medical data processing system of the federated learning structure, balances the impact of data differences in different clients on model training, is conducive to the integration of the global model, and can further improve the accuracy and generalization ability of the construction of rare disease analysis models.

[0073] Embodiment 2

[0074] For the aforementioned medical data processing system, in order to further improve the security of medical data, especially data of patients with rare diseases, when data is transmitted between the server and the client, consider limiting the server to only open port 8443 to interact with the Internet. The server is also equipped with security protections such as firewalls and whitelists.

[0075] like Figure 3 As shown, some sensitive data can also be encrypted for transmission. Below, taking model parameters as an example, the data transmission process between the server and the client is explained:

[0076] S20. The server receives a model parameter acquisition request sent by the client, where the model parameter acquisition request at least includes request verification information.

[0077] After local training is completed, each client can send a model parameter acquisition request to the server to inform the server that the client can perform the next round of training. The model parameter acquisition request here includes at least a request string and a first identification value and a second identification value. Among them, the request string is the actual string data of the model parameter acquisition request, which can be composed of the client ID and other addresses or instructions. The first identification value and the second identification value are the signatures of the model parameter acquisition request, which are used by the server to verify the signature of the client.

[0078] S21. The server authenticates the client based on the request verification information corresponding to the client.

[0079] Specifically, verification is implemented based on the SM2 algorithm. The server can authenticate each client in the following ways:

[0080] Determine whether the first identification value r and the second identification value s are within the identification value range [1, n-1]. Where n is the base point of the elliptic curve ( ) of order.

[0081] And calculate t = (r + s) mod n. If t = 0, the verification fails.

[0082] If both are within the range of identification values, a third identification value is calculated based on the request character string.

[0083] The server can calculate the third identification value R in the following way:

[0084] R=(e+ ) mod n;

[0085] e=Hash( );

[0086] ;

[0087] ( , ) = [s]G + [t]Pub ( , );

[0088] t = (r + s) mod n;

[0089] in, is the request string, r is the first identification value, s is the second identification value, Pub ( , ) is the encrypted public key, and e needs to be rounded.

[0090] Where [s]G represents the point s on the preset elliptic curve multiplied by the base point G, [t]Pub ( , ) represents the point PA corresponding to the point t times the encrypted public key on the preset elliptic curve.

[0091] Among them, client A has a distinguishable identifier IDA of length entlen bits, a private key dA, and a public key PA=(xA, yA)=Pub( , ), the server has a private key dB of length entlen bits and a public key PB = (xB, yB). The SM3 hash algorithm can be used to calculate the hash value Za of length 256 by the following formula:

[0092] ;

[0093] Among them, a and b are the parameters of the preset elliptic curve equation. Used to represent concatenation between strings.

[0094] Determine whether the first identification value is equal to the third identification value. If they are equal, it is determined that the client identity authentication is passed, and if they are not equal, the authentication fails.

[0095] S22. If the client identity authentication is passed, the server generates a key string based on the historical optimization model parameters corresponding to the client, encrypts the optimization model parameters to be sent in this round to generate a ciphertext data packet and sends it to the client. The ciphertext data packet includes at least ciphertext data and an identifier of the historical optimization model parameters used to generate the key string.

[0096] In step S22, the SM4 CBC model may be used to encrypt the optimization model parameters. In the first round of iterative training, a preset key string may be used, and in subsequent iterative training, historical optimization model parameters may be randomly selected to generate a key string.

[0097] It is understandable that each model parameter is represented by a parameter name field and a parameter value field that are associated with each other. For example, the model parameter may be [lr, 0.1], [n_epoch, 10], etc.

[0098] The server can convert the historical optimization model parameters into a key string of the first length in the following way:

[0099] For each model parameter, the corresponding parameter name field is converted into first English characters based on the first mapping rule, and the corresponding parameter value field is converted into second English characters based on the second mapping rule.

[0100] The first mapping rule here is used to indicate the relationship between the parameter name field and the English character, and the server is specifically used to determine that the English character associated with the parameter name field in the first mapping rule is the first English character.

[0101] The first mapping rule may be in the form of a mapping table. Each model parameter corresponds to an English character. For example, the English character associated with lr is A, the English character associated with n_epoch is B, and so on.

[0102] The second mapping rule here can be Base64 encoding. The server converts the corresponding parameter value into the second English character. Specifically, the server can calculate the product of the parameter value of the model parameter and the preset value, and round the product. Based on the Base64 index table, determine the second English character corresponding to the product.

[0103] For example, the parameter value field 0.1 multiplied by 16 is 2, and the English character C corresponding to 2 is the second English character. The parameter value field 10 multiplied by 16 is 160, and 1-B, 6-G, 0-A, that is, BGA can be obtained as the second English character.

[0104] Other encoding methods can also be used here to convert the parameter value field into English characters without limitation.

[0105] For each model parameter, the first English character and the second English character corresponding to the model parameter are concatenated into a first English character string.

[0106] For example, [lr, 0.1] and [n_epoch, 10] can be concatenated into the corresponding first English character strings “AC” and “BBGA”, respectively.

[0107] The first English character strings corresponding to all the model parameters are concatenated in sequence to generate an English character string of a second length.

[0108] Then you can concatenate "AC" and "BBGA" into "ACBBGA".

[0109] Convert the English character string of the second length into a key character string of the first length.

[0110] Since the key string here needs to be 16 characters long (i.e. 128 bits), when the second length of the final concatenated English string is less than 16, you can fill in the digits. When the second length of the final concatenated English string exceeds 16, you can trim it. It should be noted that the conversion method here needs to be synchronized to the client. For example, when the second length of the final concatenated English string exceeds 16, you can start from the 3rd character and intercept 16 English characters. Then you can add an identifier to indicate the number of English characters to be intercepted when sending the corresponding ciphertext data packet.

[0111] Once the key string is determined, the server can encrypt the optimization model parameters of this round in the following way to generate ciphertext data:

[0112] The optimization model parameters to be sent in this round are converted into a character string to be encrypted of the first length.

[0113] Here, the optimization model parameters need to be converted into English characters and divided into 128-bit strings to be encrypted. The processing steps for each string to be encrypted are the same.

[0114] The character string to be encrypted of the first length is divided into a plurality of character segments to be encrypted of the third length.

[0115] For each 128-bit character string to be encrypted, it is evenly divided into four 32-bit character segments to be encrypted, which can be character segment 1 to be encrypted, character segment 2 to be encrypted, character segment 3 to be encrypted, and character segment 4 to be encrypted.

[0116] The first character segment to be encrypted is XORed with the initial vector character segment, and the XOR result is encrypted using the SM4 encryption algorithm to generate a ciphertext block corresponding to the first character segment to be encrypted.

[0117] The initial vector segment here can be pre-set or randomly generated. The length of the initial vector segment is equal to the length of the segment to be encrypted. First, the segment to be encrypted 1 is XORed with the initial vector segment, and then the XOR result is SM4 encrypted to generate ciphertext block 1.

[0118] For each remaining character segment to be encrypted other than the first character segment to be encrypted, perform XOR on the remaining character segment to be encrypted and the ciphertext block corresponding to the previous character segment to be encrypted, and encrypt the XOR result using the SM4 encryption algorithm to generate the ciphertext block corresponding to the remaining character segment to be encrypted.

[0119] Next, perform an XOR operation on ciphertext block 1 and character segment 2 to be decrypted, and then perform SM4 encryption on the XOR result to generate ciphertext block 2. Similarly, ciphertext block 1, ciphertext block 2, ciphertext block 3, and ciphertext block 4 can be obtained in the end.

[0120] All ciphertext blocks are concatenated in sequence to generate ciphertext data.

[0121] By concatenating ciphertext block 1, ciphertext block 2, ciphertext block 3, and ciphertext block 4, the corresponding ciphertext data is obtained.

[0122] It can be understood that the number of ciphertext data corresponds one-to-one to the number of character strings to be encrypted.

[0123] S23: The client determines a decryption key based on the identifier, and decrypts the received ciphertext data packet to obtain optimized model parameters.

[0124] Different from the prior art, the server does not need to send the model parameters used to generate the key to the client, but instead sends the identifier of the historically optimized model parameters used to generate the key string, which greatly reduces the amount of data transmission between the server and the client. In addition, the historically optimized model parameters exist locally on the client and do not need to be transmitted over the network, which can prevent attacks and theft of medical data.

[0125] The identifier here may be the iteration round, generation time, etc. corresponding to the historical optimization model parameters. Based on the identifier, the client determines the historical optimization model parameters from the decrypted optimization model parameters, and determines a key string of the first length based on the historical optimization model parameters.

[0126] Based on the identifier, the client can determine the historical optimization model parameters used by the server to generate the encryption key string, and generate the corresponding decryption key string in a similar way to the server. Then, the ciphertext data packet is decrypted to obtain the optimization model parameters of this round.

[0127] S24. The client updates the local partial analysis model based on the obtained optimization model parameters, and sends the updated local model parameters and loss function values ​​of the local analysis model to the server, so that the server determines the next round of optimization model parameters of the client. The local analysis model is generated by the client based on the initial analysis model sent by the server and the local medical data training of the client.

[0128] Embodiment 3

[0129] In one embodiment of the present application, in order to further improve the security of data transmission, the present application proposes an improved SM4 CBC algorithm, which specifically includes:

[0130] Before performing each XOR operation, the server also replaces each English character in the encrypted character segment in the following way:

[0131] Based on the position sequence of the English character to be replaced in the character string to be encrypted, the first target English character in the same position sequence is searched in the key character string.

[0132] Exemplarily, the character segment 2 to be encrypted of the character string to be encrypted may be "DHAC", taking D as an example, its position order is 5, and the first target English character at the same position order in the key character string is G.

[0133] Based on the first target English character, a target displacement distance corresponding to the first target English character is determined.

[0134] Here G is the 7th in the English alphabet sequence, so the target displacement distance is 7.

[0135] The English character to be replaced is replaced with a second target English character, wherein the distance between the second target English character and the English character to be replaced in the English letter sequence is the target displacement distance.

[0136] In the English letter sequence, the letter 7 characters away from D is determined to be L, which is the second target English letter. Then H is replaced by J, A is replaced by C, and C is replaced by E. Finally, it can be concluded that "DHAC" is replaced by "LJCE".

[0137] In this way, each character segment to be encrypted is irregularly replaced before the XOR operation, and the replacement rule can be determined by the key generated by the model parameters. In other words, the difficulty of cracking the ciphertext is increased, and the security of rare disease data transmission is improved.

[0138] Embodiment 4

[0139] like Figure 4 As shown, the medical data processing system (which may also be an encrypted transmission system) provided by the present application may include an application service system, a file server, a database server, a backup database, and a backup storage server. The application service system may serve as the server in the aforementioned embodiment to perform the steps of data transmission and model iteration training.

[0140] Different clients or users have different access rights to different modules or functions. We also designed an anti-replay attack strategy to prevent attackers from replaying intercepted network requests. At the same time, we can filter data transmitted from the client (such as medical data analysis requests, model parameter acquisition requests, etc.) to prevent malicious users from using SQL injection attacks to obtain sensitive information.

[0141] Embodiment 5

[0142] Based on the same inventive concept, an embodiment of the present application also provides an encrypted transmission method for medical data, where each client is deployed in a different medical institution.

[0143] The server responds to the medical data analysis request and performs encrypted transmission of model parameters with each client through the following steps to generate an optimized analysis model for the client that issued the medical data analysis request. The optimized analysis model is used to analyze the medical data types and rare diseases indicated by the medical data analysis request:

[0144] The server responds to the model parameter acquisition request sent by the client, where the model parameter acquisition request at least includes request verification information;

[0145] The server authenticates the client based on the request verification information corresponding to the client;

[0146] If the client identity authentication is passed, the server generates a key string based on the historical optimization model parameters corresponding to the client, encrypts the optimization model parameters to be sent in this round, generates a ciphertext data packet and sends it to the client. The ciphertext data packet includes at least the ciphertext data and the identifier of the historical optimization model parameters used to generate the key string;

[0147] The client determines a decryption key based on the identifier and decrypts the received ciphertext data packet to obtain the optimized model parameters;

[0148] The client updates the local partial analysis model based on the acquired optimization model parameters, and sends the updated local model parameters and loss function values ​​of the local analysis model to the server, so that the server determines the next round of optimization model parameters of the client. The local analysis model is generated by the client based on the initial analysis model sent by the server and the local medical data training of the client.

[0149] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0150] In addition, the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0151] Furthermore, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

[0152] It should be noted that if the function is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, and other media that can store program codes.

[0153] In this document, relational terms such as first and second, etc. are used merely to distinguish one entity or operation from another entity or operation, but do not necessarily require or imply any such actual relationship or order between these entities or operations.

[0154] The above description is only an embodiment of the present application and is not intended to limit the protection scope of the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A medical data encryption transmission system, characterized in that: The encrypted transmission system includes a server and multiple clients, each of which is deployed in a different medical institution. The server responds to the medical data analysis request and performs encrypted transmission of model parameters with each client through the following steps to generate an optimized analysis model for the client that issued the medical data analysis request, wherein the optimized analysis model is used to analyze the type of medical data and rare diseases indicated by the medical data analysis request: The server receives a model parameter acquisition request sent by the client, wherein the model parameter acquisition request at least includes request verification information; The server performs identity authentication on the client based on the request verification information corresponding to the client; If the identity authentication of the client is passed, the server generates a key string based on the historical optimization model parameters corresponding to the client, encrypts the optimization model parameters to be sent in this round, generates a ciphertext data packet and sends it to the client, wherein the ciphertext data packet includes at least the ciphertext data and the identifier of the historical optimization model parameters used to generate the key string; The client determines a decryption key based on the identifier, and decrypts the received ciphertext data packet to obtain the optimization model parameters; The client updates the local partial analysis model based on the obtained optimization model parameters, and sends the updated local model parameters and loss function values ​​of the local analysis model to the server, so that the server determines the next round of optimization model parameters of the client, wherein the local analysis model is generated by the client based on the initial analysis model sent by the server and the local medical data training of the client; The server encrypts the optimization model parameters of this round in the following way to generate ciphertext data: Convert the optimization model parameters to be sent in this round into a character string to be encrypted with a first length; Splitting the to-be-encrypted character string of the first length into a plurality of to-be-encrypted character segments of a third length; Perform an XOR operation on the first character segment to be encrypted and the initial vector character segment, and encrypt the XOR result using the SM4 encryption algorithm to generate a ciphertext block corresponding to the first character segment to be encrypted; For each remaining character segment to be encrypted other than the first character segment to be encrypted, perform XOR on the remaining character segment to be encrypted and the ciphertext block corresponding to the previous character segment to be encrypted, and encrypt the XOR result using the SM4 encryption algorithm to generate the ciphertext block corresponding to the remaining character segment to be encrypted; All ciphertext blocks are concatenated in sequence to generate the ciphertext data.

2. The system according to claim 1, characterized in that Each model parameter is represented by a parameter name field and a parameter value field that are associated with each other. The server converts the historical optimization model parameter into a key string of the first length in the following manner: For each model parameter, convert the corresponding parameter name field into a first English character based on a first mapping rule, and convert the corresponding parameter value field into a second English character based on a second mapping rule; For each model parameter, concatenate a first English character and a second English character corresponding to the model parameter into a first English character string; Sequentially concatenate the first English character strings corresponding to all model parameters to generate an English character string of a second length; Convert the English character string of the second length into a key character string of the first length.

3. The system according to claim 1, characterized in that Before performing each XOR operation, the server also replaces each English character in the encrypted character segment in the following manner: Based on the position sequence of the English character to be replaced in the character string to be encrypted, searching the key character string for the first target English character in the same position sequence; Based on the first target English character, determining a target displacement distance corresponding to the first target English character; The English character to be replaced is replaced with a second target English character, wherein the distance between the second target English character and the English character to be replaced in the English letter sequence is a target displacement distance.

4. The system according to claim 1, characterized in that The model parameter acquisition request includes at least a request string and a first identification value and a second identification value. The server authenticates each client in the following manner: Determine whether the first identification value and the second identification value are within the identification value range respectively; If both are within the range of identification values, a third identification value is calculated based on the request character string; Determining whether the first identification value is equal to the third identification value; If they are equal, the client authentication is confirmed to be successful.

5. The system according to claim 4, characterized in that The server calculates the third identification value R in the following manner: R=(e+ ) against n; e=Hash( ); ; ( , )=[s]G+[t]Pub( , ); t = (r + s) mod n; in, is the request string, r is the first identification value, s is the second identification value, Pub ( , ) is the encryption public key.

6. The system according to claim 2, characterized in that The first mapping rule is used to indicate the relationship between the parameter name field and the English character, and the server is specifically used to determine that the English character associated with the parameter name field in the first mapping rule is the first English character.

7. The system according to claim 2, characterized in that The server is specifically used to calculate the product of the parameter value of the model parameter and the preset value, and the product is rounded; Based on the Base64 index table, determine the second English character corresponding to the product.

8. The system according to claim 1, characterized in that The client determines the historical optimization model parameters from the decrypted optimization model parameters based on the identifier, and determines a key character string of the first length based on the historical optimization model parameters.

9. A method for encrypting and transmitting medical data, characterized in that: Each client is deployed in a different medical institution. The server responds to the medical data analysis request and performs encrypted transmission of model parameters with each client through the following steps to generate an optimized analysis model for the client that issued the medical data analysis request. The optimized analysis model is used to analyze the type of medical data and rare diseases indicated by the medical data analysis request: The server responds to the model parameter acquisition request sent by the client, where the model parameter acquisition request at least includes request verification information; The server performs identity authentication on the client based on the request verification information corresponding to the client; If the identity authentication of the client is passed, the server generates a key string based on the historical optimization model parameters corresponding to the client, encrypts the optimization model parameters to be sent in this round, generates a ciphertext data packet and sends it to the client, wherein the ciphertext data packet includes at least the ciphertext data and the identifier of the historical optimization model parameters used to generate the key string; The client determines a decryption key based on the identifier, and decrypts the received ciphertext data packet to obtain the optimization model parameters; The client updates the local partial analysis model based on the obtained optimization model parameters, and sends the updated local model parameters and loss function values ​​of the local analysis model to the server, so that the server determines the next round of optimization model parameters of the client, wherein the local analysis model is generated by the client based on the initial analysis model sent by the server and the local medical data training of the client; The server encrypts the optimization model parameters of this round in the following way to generate ciphertext data: Convert the optimization model parameters to be sent in this round into a character string to be encrypted with a first length; Splitting the to-be-encrypted character string of the first length into a plurality of to-be-encrypted character segments of a third length; Perform an XOR operation on the first character segment to be encrypted and the initial vector character segment, and encrypt the XOR result using the SM4 encryption algorithm to generate a ciphertext block corresponding to the first character segment to be encrypted; For each remaining character segment to be encrypted other than the first character segment to be encrypted, perform XOR on the remaining character segment to be encrypted and the ciphertext block corresponding to the previous character segment to be encrypted, and encrypt the XOR result using the SM4 encryption algorithm to generate the ciphertext block corresponding to the remaining character segment to be encrypted; All ciphertext blocks are concatenated in sequence to generate the ciphertext data.

Citation Information

Patent Citations

  • Medical data federal learning method and system based on trusted execution environment

    CN116484426A

  • Local model parameter aggregation method for federal learning

    CN116702191A