A pathological section recognition neural network model weight encryption method
By encrypting the weights of the neural network model for pathological slide recognition through chaotic mapping and secure channel transmission, the problem of insufficient weight security is solved, achieving efficient encryption processing and security assurance.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING THOROUGH FUTURE INC
- Filing Date
- 2024-12-27
- Publication Date
- 2026-05-01
AI Technical Summary
The neural network model for pathological slide recognition has poor weight security protection and lacks effective encryption measures, which leads to security risks in the transmission and storage of weights.
A chaotic mapping algorithm is used to encrypt the weights of the neural network model for pathological slide recognition. Through steps such as digital conversion, element data processing, and position scrambling, an encrypted weight vector matrix is formed, which is then transmitted and stored through a secure channel. Security is ensured by combining it with a ciphertext management system.
The security of the weights in the neural network model for pathological slide recognition has been improved, preventing the weights from being easily cracked, ensuring that the model operates normally under safe conditions, and avoiding unauthorized access and data corruption.
Smart Images

Figure CN119885225B_ABST
Abstract
Description
A method for weight encryption in a neural network model for pathological slide recognition Technical Field
[0001] This invention relates to the field of neural network model technology, and in particular to a method for encrypting the weights of a neural network model for pathological slide recognition. Background Technology
[0002] In recent years, emerging technologies such as deep neural networks (DNNs) have been widely developed and applied in medical pathology slide recognition with unprecedented performance. Deep neural networks simulate the neural connection structure of the human brain by building models and describe data features hierarchically through multiple transformation stages, bringing breakthrough progress to large-scale data processing tasks such as images, videos, and audio. Applying deep neural networks to medical case slide recognition has resulted in a neural network model for pathology slide recognition, which provides an auxiliary role in medical diagnosis. It can not only reduce the workload of diagnostic physicians and save time in analyzing medical case slides, but also assist diagnostic physicians by providing accurate analytical data information and improving the accuracy of diagnosis.
[0003] Before being put into formal use, the neural network model for pathological slide recognition usually needs to be trained. During the training process, it is necessary to capture a large amount of proprietary data from different scenarios in the target application, utilize extensive computing resources, and adjust the network topology and train the weights correctly with the assistance of experts. Therefore, the weights of the neural network model for pathological slide recognition have extremely high economic value and practical significance.
[0004] Currently, the security protection level of weights in the processing of neural network models for pathological slide recognition is relatively poor. Therefore, this invention proposes a method for encrypting the weights of neural network models for pathological slide recognition. Based on chaotic mapping, the weights of the neural network models for pathological slide recognition are encrypted, which can improve the security of the neural network weights while ensuring that the neural network models for pathological slide recognition can run. Summary of the Invention
[0005] The purpose of this invention is to provide a method for encrypting the weights of a neural network model for pathological slide recognition, so as to solve the problems mentioned in the background art.
[0006] To achieve the above objectives, the present invention provides the following technical solution: a method for weight encryption of a neural network model for pathological slide recognition, comprising:
[0007] Obtain the bit string as the weight key for the neural network model for pathological slide recognition;
[0008] The weight key of the pathological slide recognition neural network model is written into the lower triangular matrix as an 8-bit number to obtain the first data matrix;
[0009] The first 8 bits of the bit string are digitized to obtain the first element data.
[0010] The weight matrix of the pathological slide recognition neural network model is read into the blank matrix as a sub-element to obtain the weight vector matrix.
[0011] The first element data matrix is combined with the weight vector matrix to obtain the first data vector;
[0012] The intermediate ciphertext vector is obtained by using a chaotic mapping algorithm based on the first data matrix and the first data vector.
[0013] Element data processing is performed on the intermediate ciphertext vector to obtain the intermediate encryption matrix of the weight vector; the first 8 elements in the intermediate ciphertext vector are selected as the first part of the weight ciphertext in the weight vector matrix, and the encryption of the second part of the weight in the weight vector matrix is updated using the last element to obtain the second part of the weight ciphertext in the weight vector matrix. The intermediate encryption matrix of the weight vector is obtained based on the first part of the weight ciphertext and the second part of the weight ciphertext.
[0014] The positions of the intermediate encryption matrix of the weight vector are shuffled to obtain the encrypted weight vector matrix.
[0015] Furthermore, the lower triangular matrix is a 9×9 integer matrix. When the weight key of the pathological slide recognition neural network model is written into the lower triangular matrix in 8-bit increments, the elements on the diagonal are all 3, and the writing order is from row data 2 to 9 and column data 1 to row data minus 1.
[0016] Furthermore, based on the first data matrix and the first data vector, a chaotic mapping algorithm is used to obtain the intermediate ciphertext vector, including:
[0017] Transpose the first data vector to obtain the first data vector processing vector;
[0018] Perform matrix operations on the first data matrix and the first data vector processing vector to obtain the intermediate ciphertext vector.
[0019] Furthermore, after obtaining the encrypted weight vector matrix, the encrypted weight vector matrix is used to update the weight vector matrix to obtain the updated weight vector matrix. Then, based on the updated weight vector matrix, the intermediate encrypted weight vector matrix is obtained again. When updating the weight vector matrix using the encrypted weight vector matrix, the target number of iterations is determined. According to the target number of iterations, the encrypted weight vector matrix is updated and iterated multiple times to obtain the final encrypted weight vector matrix.
[0020] Furthermore, after obtaining the encrypted weight vector matrix, the encrypted weight vector matrix is stored and transmitted. The encrypted weight vector matrix, the first element data, and the number of rows of the weight vector matrix are combined to form ciphertext data, which is then stored. When applying the pathological slide recognition neural network model, the ciphertext data is transmitted through a secure channel, and then decrypted to obtain the plaintext data of the weight data. Finally, the plaintext data of the weight data is applied to the pathological slide recognition neural network model for model processing.
[0021] Furthermore, the plaintext data obtained after decrypting the ciphertext data includes:
[0022] After obtaining the weight key of the neural network model for pathological slide recognition, write it into the lower triangular matrix as an 8-bit number, and then perform the inverse matrix on the lower triangular matrix containing the written data to obtain the decryption transformation matrix;
[0023] Extract the encrypted weight vector matrix from the encrypted data, obtain the data in the second part from the encrypted weight vector matrix, and combine the data in the second part with the first element data in the encrypted data to obtain the second data vector;
[0024] The intermediate decryption vector is obtained by using a chaotic mapping algorithm based on the decryption transformation matrix and the second data vector.
[0025] The intermediate decryption vector is processed to obtain the intermediate plaintext matrix of the weight vector. The first element of the intermediate decryption vector is used to update the first element data. Then, the first data is used to decrypt the last 8 elements and combined with the updated first element data to obtain the intermediate plaintext matrix of the weight vector.
[0026] The plaintext data of the pathological slide recognition neural network model weights are obtained by arranging the rows and columns of the plaintext matrix in the middle of the weight vector.
[0027] Furthermore, when decrypting the encrypted data, the key source is shared through a cryptographic channel to obtain the weight key bit string of the pathological slide recognition neural network model during the encryption process, thus obtaining the weight key of the pathological slide recognition neural network model.
[0028] Furthermore, when writing data into the lower triangular matrix in groups of 8 bits, the data is added to the lower triangular matrix according to the index information and the two-layer hash table, following the cache eviction mechanism.
[0029] Furthermore, when storing encrypted data, the encrypted data is stored in the encrypted data storage module, and the encrypted data storage module stores the encrypted data in data blocks, including:
[0030] Obtain the number of data block nodes in the encrypted data storage module;
[0031] The encrypted data is divided into multiple sub-data according to the number of data block nodes using a local mapping method;
[0032] For sub-data, perform data block node matching, and based on the matching results, encrypt the sub-data again and store it in the data block node.
[0033] Furthermore, a ciphertext management system is constructed based on the ciphertext data storage module. The ciphertext management system includes: a model application terminal, a ciphertext data storage module, a secure channel establishment module, and a security verification management module.
[0034] The model application is used to request encrypted data and issue a request based on the identification information.
[0035] The security verification management module is used to verify the identification information of the data block node in response to the request, obtain the verification result, issue a read command to the encrypted data storage module based on the verification result, and change and combine the sub-data obtained from the encrypted data storage module to obtain encrypted data.
[0036] The encrypted data storage module is used to verify read commands in the data block node. When the read command verification is successful, the information stored in the data block node is decrypted and read, and the resulting sub-data is provided to the security verification management module.
[0037] The secure channel establishment module is used to establish a secure channel between the secure verification management module and the model application terminal based on the verification results, and to transmit the encrypted data to the model application terminal through the secure channel after the secure verification management module obtains the encrypted data.
[0038] This invention achieves efficient encryption processing of the weights of the neural network model for pathological slide recognition, improves the security coefficient of the weights of the neural network model for pathological slide recognition, and resists attacks during the encryption process, thus ensuring the security of the weights of the neural network model for pathological slide recognition.
[0039] This invention digitizes and processes the weight keys of a neural network model for pathological slide recognition, enabling the generation of data suitable for chaotic mapping algorithms. This provides convenience for the implementation of chaotic mapping algorithms, which are simple and convenient, quickly obtaining an intermediate ciphertext vector, effectively reducing the time spent on encryption processing. Furthermore, after obtaining the intermediate ciphertext vector, element data processing and position scrambling are performed on the vector, further enhancing the security of the encrypted weight vector matrix and preventing it from being easily cracked.
[0040] Other features and advantages of the invention will be set forth in the following description, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures particularly pointed out in the written description and the accompanying drawings.
[0041] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0042] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:
[0043] Figure 1 is a schematic diagram of the steps of the method described in this invention;
[0044] Figure 2 is a schematic diagram of step six in the method described in this invention;
[0045] Figure 3 is a schematic diagram showing the relationship between the encryption process and the decryption process in the method described in this invention;
[0046] Figure 4 is a schematic diagram of the decryption process steps in the method described in this invention;
[0047] Figure 5 is a schematic diagram of the encrypted management system in the method described in this invention. Detailed Implementation
[0048] The preferred embodiments of the present invention will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.
[0049] As shown in Figure 1, this embodiment of the invention provides a method for encrypting the weights of a neural network model for pathological slide recognition, including:
[0050] Step 1: Obtain the bit string as the weight key for the pathological slide recognition neural network model;
[0051] Step 2: Write the weight key of the pathological slide recognition neural network model into the lower triangular matrix as an 8-bit number to obtain the first data matrix;
[0052] Step 3: Digitize the first 8 bits of the bit string to obtain the first element data;
[0053] Step 4: Read the weight matrix of the pathological slide recognition neural network model as a sub-element of the blank matrix to obtain the weight vector matrix;
[0054] Step 5: Combine the first element data matrix with the weight vector matrix to obtain the first data vector;
[0055] Step 6: Obtain the intermediate ciphertext vector using the chaotic mapping algorithm based on the first data matrix and the first data vector;
[0056] Step 7: Perform element data processing on the intermediate ciphertext vector to obtain the intermediate encryption matrix of the weight vector; select the first 8 elements in the intermediate ciphertext vector as the first part of the weight ciphertext in the weight vector matrix, and use the last element to update the encryption of the second part of the weight in the weight vector matrix to obtain the second part of the weight ciphertext in the weight vector matrix. Obtain the intermediate encryption matrix of the weight vector based on the first part of the weight ciphertext and the second part of the weight ciphertext.
[0057] Step 8: Shuffle the positions of the middle encryption matrix of the weight vector to obtain the encrypted weight vector matrix.
[0058] In the above technical solution, the weight key of the pathological slide recognition neural network model is a randomly generated bit string of length 8×n, where n<28.
[0059] In the above technical solution, the lower triangular matrix is a 9×9 integer matrix.
[0060] In the above technical solution, when the first element data matrix and the weight vector matrix are combined, the first element data is used as the first element in the first data vector, and the subsequent elements form the weight vector matrix. For example, if the first element vector is u0 and the weight vector matrix is IME... 1×mn IME 1×mn Specifically, this is represented as: IME 1×mn =[IME 1×mn(1,1),IME 1×mn (1,2),IME 1×mn When (1,8)], the first data vector is P=[u0,IME 1×mn (1,1),IME 1×mn (1,2),…,IME 1×mn (1,8)].
[0061] In the above technical solution, the first part of the weight vector matrix consists of the first 8 elements, and the second part consists of the remaining elements.
[0062] The above technical solution achieves efficient encryption processing of the weights of the neural network model for pathological slide recognition, improving the security coefficient of the weights and resisting attacks during the encryption process, thus ensuring the security of the weights. By digitizing and processing the weight key of the neural network model for pathological slide recognition, data suitable for chaotic mapping algorithms can be obtained based on the weight key, facilitating the implementation of chaotic mapping algorithms. Furthermore, the chaotic mapping algorithm is simple and convenient, quickly obtaining an intermediate ciphertext vector, effectively reducing the time consumption of encryption processing. After obtaining the intermediate ciphertext vector, element data processing and position scrambling are performed on the intermediate ciphertext vector, further improving the security of the encrypted weight vector matrix and preventing it from being easily cracked.
[0063] In one embodiment of the present invention, the lower triangular matrix is a 9×9 integer matrix. When the weight key of the pathological slide recognition neural network model is written into the lower triangular matrix in the form of 8 bits as a number, the elements on the diagonal are all 3, and the writing order is from row data 2 to 9 and column data from 1 to row data minus 1.
[0064] In the above technical solution, when the writing order is based on row data from 2 to 9 and column data from 1 to row data minus 1, for example, if row data i = 2, 3, 4, 5, 6, 7, 8, 9, then j = 1, 2, ..., i-1.
[0065] The above technical solution ensures that the determinant of the lower triangular matrix is always odd by taking 3 for all diagonal elements, thus guaranteeing that the determinant of the triangular matrix is coprime to the modulus 256, thereby ensuring the existence of the period. Furthermore, when writing the weight key of the pathological slide recognition neural network model into the lower triangular matrix in 8-bit increments, the data is written sequentially to avoid data corruption affecting the attribute characteristics of the lower triangular matrix.
[0066] As shown in Figure 2, in one embodiment of the present invention, an intermediate ciphertext vector is obtained using a chaotic mapping algorithm based on a first data matrix and a first data vector, including:
[0067] A1. Transpose the first data vector to obtain the first data vector processing vector;
[0068] A2. Perform matrix operations on the first data matrix and the first data vector processing vector to obtain the intermediate ciphertext vector.
[0069] In the above technical solution, when transposing the first data vector, the first data vector is converted from a row vector to a column vector.
[0070] In the above technical solution, the number of rows in the first data vector processing vector is equal to the number of columns in the first data vector.
[0071] The above technical solution ensures the execution of the chaotic mapping algorithm by transposing the first data vector so that the first data matrix and the first data vector can be operated on. This enables area-preserving mapping and hides the weights in the weight vector matrix in the mapping result, thereby improving the security of the weights. This ensures that the pathological slide recognition neural network model can only obtain the weights for model training and processing under secure conditions through decryption, preventing anyone from arbitrarily obtaining the weights and applying them to the pathological slide recognition neural network model.
[0072] In one embodiment of the present invention, after obtaining the encrypted weight vector matrix, the encrypted weight vector matrix is used to update the weight vector matrix to obtain the updated weight vector matrix. Then, the intermediate encrypted weight vector matrix is obtained again based on the updated weight vector matrix. When updating the weight vector matrix using the encrypted weight vector matrix, a target number of iterations is determined. The encrypted weight vector matrix is updated and iterated multiple times according to the target number of iterations to obtain the final encrypted weight vector matrix.
[0073] In the above technical solution, the target number of cycles can be set by the user.
[0074] In the above technical solution, updating the weight vector matrix using the encrypted weight vector matrix means that the number of iterations is 1. When the number of iterations is 3, it means that the weight vector matrix has been updated three times. The encrypted weight vector matrix obtained by processing steps five, six, seven and eight based on the updated weight vector matrix obtained in the third iteration is the final encrypted weight vector matrix.
[0075] The above technical solution uses the encrypted weight vector matrix to update the weight vector matrix, enabling multiple iterations of obtaining the encrypted weight vector matrix, thereby achieving multiple encryptions of the weight vector matrix and improving the security of the encrypted weight vector matrix.
[0076] In one embodiment of the present invention, after obtaining the encrypted weight vector matrix, the encrypted weight vector matrix is stored and transmitted. The encrypted weight vector matrix, the first element data, and the row number of the weight vector matrix are combined to form ciphertext data, which is then stored. As shown in Figure 3, when the pathological slide recognition neural network model is applied, the ciphertext data is obtained through a secure channel and decrypted to obtain the plaintext data of the weight data. The plaintext data of the weight data is then applied to the pathological slide recognition neural network model for model processing.
[0077] In the above technical solution, the encrypted data exists in the form of data pairs, for example: the encrypted weight vector matrix is CIE. 1×mn If the first element vector is u0, and the weight vector matrix has n rows, then the ciphertext data is (CIE) 1×mn ,u0,n).
[0078] In the above technical solutions, the secure channel is a transmission path with a high level of security.
[0079] The above technical solution enables the weights of the pathological slide recognition neural network model to be retained and used for a long time by storing encrypted data, ensuring the effectiveness of the pathological slide recognition neural network model. Moreover, when applying the pathological slide recognition neural network model, transmitting encrypted data through a secure channel not only ensures the success rate of encrypted data transmission, but also guarantees the security of encrypted data, preventing unauthorized acquisition of encrypted data or damage to encrypted data during encrypted transmission.
[0080] As shown in Figure 4, in one embodiment of the present invention, the plaintext data obtained after decrypting the ciphertext data includes:
[0081] S1. After obtaining the weight key of the neural network model for pathological slide recognition, write it into the lower triangular matrix as an 8-bit number, and then perform the inverse matrix acquisition on the lower triangular matrix containing the written data to obtain the decryption transformation matrix.
[0082] S2. Extract the encrypted weight vector matrix from the encrypted data, obtain the data in the second part from the encrypted weight vector matrix, and combine the data in the second part with the first element data in the encrypted data to obtain the second data vector.
[0083] S3. Obtain the intermediate decryption vector using the chaotic mapping algorithm based on the decryption transformation matrix and the second data vector;
[0084] S4. Perform element data processing on the intermediate decryption vector to obtain the intermediate plaintext matrix of the weight vector; use the first element in the intermediate decryption vector to update the first element data, and then use the first data to decrypt the last 8 elements and combine them with the updated first element data to obtain the intermediate plaintext matrix of the weight vector.
[0085] S5. Obtain the plaintext weight data of the pathological slide recognition neural network model by arranging the rows and columns of the plaintext matrix in the middle of the weight vector.
[0086] In the above technical solution, the decryption and encryption processes for encrypted data are inverses of each other.
[0087] In the above technical solution, when combining the data in the second part with the first element data in the ciphertext data, the first element data is used as the last element in the second data vector. For example, if the ciphertext data is CIE... 1×mn At this time, the data in the second part of the encrypted weight vector matrix is: CIE(1,mn-7),CIE(1,mn-6),CIE(1,mn-5),……,CIE(1,mn), with the first element vector being u0. The second data vector C obtained at this time is C=[CIE(1,mn-7),CIE(1,mn-6),CIE(1,mn-5),……,CIE(1,mn),u0].
[0088] In the above technical solution, when obtaining the intermediate decryption vector using a chaotic mapping algorithm based on the decryption transformation matrix and the second data vector, the intermediate decryption vector is obtained by performing operations using the decryption transformation matrix and the transpose of the second data vector, i.e.: D = IE 9×9 ·C T Where D is the intermediate decryption vector, IE 9×9 To decrypt the transformation matrix, C is the second data vector, and T is the transpose symbol.
[0089] In the above technical solution, when the first element in the intermediate decryption vector is used to update the first element data, u0 = D(1,1), where u0 is the first element vector and D(1,1) is the first element in the intermediate decryption vector.
[0090] The above technical solution enables the decryption of encrypted data, allowing the determination of the weights of the pathological slide recognition neural network model based on the encrypted data. This allows for the training and application of the neural network model based on the existing weights, providing convenience for diagnostic physicians. It enables physicians to directly utilize the pathological slide recognition neural network model without spending time training and determining the weights. Furthermore, it avoids arbitrarily decrypting encrypted data to obtain the plaintext data of the weights, thus improving the security of the pathological slide recognition neural network model weights and ensuring their value.
[0091] In one embodiment of the present invention, when decrypting encrypted data, a key source is shared through a cryptographic channel to obtain the weight key bit string of the pathological slide recognition neural network model during the encryption process, thereby obtaining the weight key of the pathological slide recognition neural network model.
[0092] In the above technical solution, the pathological slide recognition neural network model weight key bit string obtained during decryption is consistent with the bit string randomly generated during encryption as the pathological slide recognition neural network model weight key.
[0093] The above technical solution achieves the sharing of the weight key of the neural network model for pathological slide recognition during encryption and decryption by sharing the key source through a cryptographic channel. Moreover, the key source can only be shared through a cryptographic channel, which has a high security level and is not easily tampered with or destroyed.
[0094] In one embodiment of the present invention, when writing a number into the lower triangular matrix in the form of 8 bits, the data is added to the lower triangular matrix according to the index information and the two-layer hash table, following the cache eviction mechanism.
[0095] In the above technical solution, the cache eviction mechanism is implemented by a combination of the LRU (Least Recently Used) algorithm and a timeout period.
[0096] The above technical solution uses a cache eviction mechanism to ensure that data that has been recently accessed is more likely to be accessed in the future. Data can be evicted based on historical access records, keeping the accessed data active and facilitating the writing of numbers in the lower triangular matrix.
[0097] In one embodiment of the present invention, when storing encrypted data, the encrypted data is stored in an encrypted data storage module, and the encrypted data storage module stores the encrypted data in a data block manner, including:
[0098] Obtain the number of data block nodes in the encrypted data storage module;
[0099] The encrypted data is divided into multiple sub-data according to the number of data block nodes using a local mapping method;
[0100] For sub-data, perform data block node matching, and based on the matching results, encrypt the sub-data again and store it in the data block node.
[0101] In the above technical solution, when storing sub-data in data block nodes with secondary encryption based on the matching results, different data block nodes can use the same secondary encryption storage method or different secondary encryption storage methods. However, at least two secondary encryption storage methods should be used in all nodes of the data block and they should be used in combination in the data block nodes.
[0102] In the above technical solution, when the encrypted data is mapped locally, the local mapping includes multiple branches. In each branch, only a portion of the encrypted data can be output based on the encrypted data, thereby splitting the encrypted data and obtaining multiple sub-data.
[0103] The above technical solution stores encrypted data through an encrypted data storage module, enabling the plaintext data of the weights to be obtained during the training or application of the pathological slide recognition neural network model. This improves the confidentiality of the weights of the pathological slide recognition neural network model, ensures the security of the weights, and prevents the encrypted data from being damaged or lost. Furthermore, the encrypted data storage module uses a data block approach to store the encrypted data, effectively improving the security performance of the encrypted storage module and ensuring that only authorized personnel can fully access the encrypted data. In addition, the sub-data is encrypted a second time and stored in the data block node based on the matching results, increasing the security of the sub-data and preventing the data stored in the data block node from being easily cracked by abnormal means.
[0104] As shown in Figure 5, in one embodiment of the present invention, a ciphertext management system is constructed based on the ciphertext data storage module. The ciphertext management system includes: a model application terminal, a ciphertext data storage module, a secure channel establishment module, and a security verification management module.
[0105] The model application is used to request encrypted data and issue a request based on the identification information.
[0106] The security verification management module is used to verify the identification information of the data block node in response to the request, obtain the verification result, issue a read command to the encrypted data storage module based on the verification result, and change and combine the sub-data obtained from the encrypted data storage module to obtain encrypted data.
[0107] The encrypted data storage module is used to verify read commands in the data block node. When the read command verification is successful, the information stored in the data block node is decrypted and read, and the resulting sub-data is provided to the security verification management module.
[0108] The secure channel establishment module is used to establish a secure channel between the secure verification management module and the model application terminal based on the verification results, and to transmit the encrypted data to the model application terminal through the secure channel after the secure verification management module obtains the encrypted data.
[0109] In the above technical solution, after the security verification management module obtains the encrypted data and transmits it to the model application terminal through a secure channel, monitoring is performed on the secure channel and the encrypted data. This includes: acquiring the initial state information of the secure channel and the initial information of the encrypted data within the secure channel; real-time monitoring of the encrypted data transmission within the secure channel as it enters the secure channel, acquiring the monitoring data of the encrypted data within the secure channel, and obtaining the current monitoring data; comparing the current monitoring data with the monitoring data from the previous time period to obtain the current monitoring difference information; performing a rationality analysis on the current monitoring difference information based on the initial state information of the secure channel and the initial information of the encrypted data within the secure channel to determine whether the current monitoring difference information is caused by the transmission of encrypted data within the secure channel, and obtaining the analysis and judgment result; and issuing an early warning when the current monitoring difference information is not caused by the transmission of encrypted data within the secure channel, and simultaneously locking and stopping the transmission of encrypted data within the secure channel.
[0110] In the above technical solutions, the number of model application terminals is not unique.
[0111] In the above technical solution, the model application sends a request based on the instructions of the diagnosing doctor.
[0112] In the above technical solution, the model application terminal is connected to the security verification management module, which in turn is connected to the encrypted data storage module and the secure channel establishment module.
[0113] In the above technical solution, when a read instruction is sent to the encrypted data storage module based on the verification result, the read instruction is generated by generating multiple read instructions based on the identification information of the model application terminal, and each read instruction acts on a data block node.
[0114] The aforementioned technical solution manages encrypted data through a encrypted management system, seamlessly integrating the encryption and decryption processes. This allows diagnostic physicians to securely obtain encrypted data and decrypt it to obtain plaintext data of the neural network model weights when needed for pathological slide identification. Furthermore, the security verification management module verifies the identifier information, while the encrypted data storage module verifies the read command, achieving dual verification. This prevents unqualified model applications from stealing encrypted data from the encrypted data storage module through illegitimate means, ensuring the value of the pathological slide identification neural network model weights and guaranteeing the security of the encrypted data. The secure channel establishment module only establishes a secure channel between the security verification management module and the model application after the security verification management module has verified the identifier information. This not only ensures that the security verification management module responds to requests from the model application and securely transmits the encrypted data, but also effectively prevents encrypted data leakage due to transmission errors. Furthermore, after the security verification and management module obtains the encrypted data and transmits it to the model application through a secure channel, it monitors the secure channel and the encrypted data to promptly detect any tampering with the secure channel or the encrypted data, thereby ensuring the security of the encrypted data. Moreover, by comparing the current monitoring data with the monitoring data from the previous time, it performs real-time analysis of the real-time monitoring data, which can promptly detect the theft of encrypted data and take timely action to block it, reducing the possibility of encrypted data leakage.
[0115] Those skilled in the art should understand that the terms "first" and "second" in this invention merely refer to different application stages.
[0116] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the disclosure herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.
[0117] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. A method for weight encryption in a neural network model for pathological slide recognition, characterized in that, The method includes: obtaining a bit string as the weight key of a pathological slide recognition neural network model; writing the weight key of the pathological slide recognition neural network model into a lower triangular matrix with 8 bits as a number to obtain a first data matrix; digitizing the first 8 bits of the bit string to obtain first element data; reading the weight matrix of the pathological slide recognition neural network model as a sub-element of a blank matrix to obtain a weight vector matrix; combining the first element data matrix and the weight vector matrix to obtain a first data vector; using a chaotic mapping algorithm to obtain an intermediate ciphertext vector based on the first data matrix and the first data vector; performing element data processing on the intermediate ciphertext vector to obtain a weight vector intermediate encryption matrix; selecting the first 8 elements in the intermediate ciphertext vector as the first part of the weight ciphertext in the weight vector matrix, and using the last element to update the encryption of the second part of the weight in the weight vector matrix to obtain the second part of the weight ciphertext; obtaining the weight vector intermediate encryption matrix based on the first part of the weight ciphertext and the second part of the weight ciphertext; and scrambling the positions of the weight vector intermediate encryption matrix to obtain the encrypted weight vector matrix.
2. The method according to claim 1, characterized in that, The lower triangular matrix is a 9×9 integer matrix. When the weight key of the pathological slide recognition neural network model is written into the lower triangular matrix in 8-bit increments, the elements on the diagonal are all 3, and the writing order is from row data 2 to 9 and column data 1 to row data minus 1.
3. The method according to claim 1, characterized in that, The intermediate ciphertext vector is obtained by using a chaotic mapping algorithm based on the first data matrix and the first data vector, including: transposing the first data vector to obtain the first data vector processing vector; and performing matrix operations on the first data matrix and the first data vector processing vector to obtain the intermediate ciphertext vector.
4. The method according to claim 1, characterized in that, After obtaining the encrypted weight vector matrix, the encrypted weight vector matrix is used to update the weight vector matrix to obtain the updated weight vector matrix. Then, based on the updated weight vector matrix, the intermediate encrypted weight vector matrix is obtained again. When updating the weight vector matrix using the encrypted weight vector matrix, the target number of iterations is determined. The encrypted weight vector matrix is updated and iterated multiple times according to the target number of iterations to obtain the final encrypted weight vector matrix.
5. The method according to claim 1, characterized in that, After obtaining the encrypted weight vector matrix, the encrypted weight vector matrix is stored and transmitted. The encrypted weight vector matrix, the first element data, and the row number of the weight vector matrix are combined to form ciphertext data, which is then stored. When applying the pathological slide recognition neural network model, the ciphertext data is transmitted through a secure channel and decrypted to obtain the plaintext weight data. The plaintext weight data is then applied to the pathological slide recognition neural network model for model processing.
6. The method according to claim 5, characterized in that, The plaintext data for obtaining weight data after decrypting the encrypted data includes: obtaining the weight key of the pathological slide recognition neural network model and writing it into a lower triangular matrix in 8-bit increments; obtaining the decryption transformation matrix by performing the inverse matrix on the lower triangular matrix containing the written data; extracting the encrypted weight vector matrix from the encrypted data; obtaining the data in the second part of the encrypted weight vector matrix and combining the data in the second part with the first element data in the encrypted data to obtain the second data vector; obtaining the intermediate decryption vector using a chaotic mapping algorithm based on the decryption transformation matrix and the second data vector; processing the element data of the intermediate decryption vector to obtain the intermediate plaintext matrix of the weight vector; using the first element of the intermediate decryption vector to update the first element data; then using the first data to decrypt the last 8 elements and combining them with the updated first element data to obtain the intermediate plaintext matrix of the weight vector; and finally, arranging the rows and columns of the intermediate plaintext matrix of the weight vector to obtain the plaintext weight data of the pathological slide recognition neural network model.
7. The method according to claim 6, characterized in that, When decrypting encrypted data, the key source is shared through a cryptographic channel to obtain the weight key bit string of the pathological slide recognition neural network model during the encryption process, thus obtaining the weight key of the pathological slide recognition neural network model.
8. The method according to claim 6, characterized in that, When writing a number into the lower triangular matrix in 8-bit increments, the data is added to the lower triangular matrix according to the index information and the two-layer hash table, following the cache eviction mechanism.
9. The method according to claim 5, characterized in that, When storing encrypted data, the encrypted data is stored in the encrypted data storage module. The encrypted data storage module uses a data block approach to store the encrypted data, which includes: obtaining the number of data block nodes in the encrypted data storage module; dividing the encrypted data into multiple sub-data according to the number of data block nodes using a local mapping method; matching the data block nodes for the sub-data; and encrypting the sub-data again and storing it in the data block nodes according to the matching results.
10. The method according to claim 9, characterized in that, A ciphertext management system is constructed based on the ciphertext data storage module. The ciphertext management system includes: a model application terminal, a ciphertext data storage module, a secure channel establishment module, and a security verification management module. The model application terminal requests ciphertext data by issuing a request based on identification information. The security verification management module verifies the identification information of the request in conjunction with data block nodes, obtains the verification result, and issues a read command to the ciphertext data storage module based on the verification result. It also modifies and combines the sub-data obtained from reading the ciphertext data storage module to obtain ciphertext data. The ciphertext data storage module verifies the read command in the data block nodes. When the read command verification is successful, it decrypts and reads the information stored in the data block nodes and provides the obtained sub-data to the security verification management module. The secure channel establishment module establishes a secure channel between the security verification management module and the model application terminal based on the verification result, and transmits the ciphertext data to the model application terminal through the secure channel after the security verification management module obtains the ciphertext data.
Citation Information
Patent Citations
Novel hyper-chaotic image encryption method
CN106570814A
Private artificial neural networks with trusted execution environments and quadratic homomorphic encryption
WO2022199861A1