Security encryption deployment method and system of model
By deploying encoder locally on the user and decoder on the remote server, combining encryption algorithms and secure communication protocols, the security limitations of the deep learning model deployment solution are solved, and the balance between data security and cost-effectiveness is achieved.
Patent Information
- Application Number
- CN202510582043.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-07
- Publication Date
- 2025-08-15
AI Technical Summary
Existing deep learning model deployment solutions have limitations in security and cannot fully meet security needs in commercial and sensitive areas, especially with problems with user data breaches and encryption costs.
The encoder part of the deep learning model is deployed on the user's local device for encryption, and transmitted to the decoder part of the remote server through a secure communication module. The data is secured using conventional encryption algorithms and HTTPS protocols, and the decoder decrypts and results processing are performed on the server side.
It effectively avoids the risk of user data leakage, reduces encryption and development costs, and ensures the confidentiality and integrity of data transmission, and meets the security needs in actual applications.
Smart Images

Figure CN120498735A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of deep learning models, and specifically to a method and system for securely encrypting and deploying a model. Background Art
[0002] In today's technological age, deep learning technology is developing at an astonishing pace and playing a vital role in numerous fields. From image recognition and natural language processing to intelligent recommendation systems, deep learning models, with their powerful learning capabilities and high-precision predictive capabilities, have revolutionized various industries.
[0003] As deep learning models become increasingly widely used in commercial and sensitive fields, model security has become crucial. On the one hand, models may contain core intellectual property and trade secrets of a company, and malicious theft or tampering could result in significant losses. On the other hand, in applications involving user privacy, such as healthcare and finance, model security is directly linked to the security of users' personal information. Therefore, encrypting deep learning models when deploying them has become a necessity.
[0004] Currently, there are two common deep learning model deployment solutions. One is a web service approach, where users upload their data to a server while connected to the internet. The model is then deployed on the server, with security provided by operations and maintenance. While this approach ensures model security to a certain extent, it carries the risk of user data leakage, as the data is uploaded elsewhere. The other approach is local deployment, where the model is deployed directly on the project site and delivered to users. This approach requires encrypting the model file. While user data stored locally poses no risk of leakage, it can be decrypted through attacks such as memory analysis. Furthermore, the cost of encrypting the file and the development costs are relatively high. In summary, existing deep learning model deployment solutions have limitations and cannot fully meet the security requirements of real-world applications. Summary of the Invention
[0005] In response to the shortcomings of the existing technology, the present invention provides a secure encryption deployment method and system for a model, which solves the problem that deep learning model deployment solutions have certain limitations and cannot fully meet the security requirements in practical applications.
[0006] To achieve the above objectives, the present invention is implemented through the following technical solutions: a secure encryption deployment method of a model, characterized by comprising the following steps:
[0007] S1. Model Weight Splitting: Perform a careful weight split on the deep learning model, clearly separating the encoder and decoder parts;
[0008] S2. Local Encryption and Deployment of the Encoder: The encoder is deployed on the user's local device and encrypted using conventional encryption methods.
[0009] S3. Secure transmission of feature data: The feature data extracted by the encoder is encrypted and transmitted to the remote server via a secure communication module. A secure communication protocol is used during the transmission process.
[0010] S4. Decoder Server Deployment and Security Processing: The decoder is deployed on a remote server and protected using server-side encryption technology. Upon receiving the encrypted signature data from the user, the decoder module on the remote server first decrypts it and then uses this data to perform derivative calculations.
[0011] S5. Result return: After the decoder infers the result, it encrypts the result and returns it to the front-end user through the secure communication module. After the user receives the result at the front-end, he decrypts it through the user interaction module to obtain the final output.
[0012] Preferably, in step S2, the specific encryption method includes a symmetric encryption algorithm AES or an asymmetric encryption algorithm RSA, and is combined with other security measures, including access control and data backup, to improve the security of the encoder.
[0013] Preferably, in step S3, the specific encryption protocol includes HTTPS, which is a security protocol for encrypted communication on a computer network. It adds an SSL / TLS encryption layer on top of HTTP to ensure the confidentiality, integrity and authenticity of data during transmission.
[0014] Preferably, the specific steps of extracting feature data by the encoder are as follows: the encoder in deep learning usually refers to a neural network model, which converts input data, including image feature extraction and text vectorization, into a set of feature vectors.
[0015] Preferably, the image feature extraction is specifically as follows: preprocessing, first preprocessing the input image, including resizing and normalization to adapt to the input requirements of the model, convolution layer, using a convolutional neural network to extract features of the image, the convolution layer slides on the image through a filter to extract local features, convolution layer, fconv(x,Wk,bk)=Conv(x,Wk)+bk, x is the input image, Wk is the weight of the kth convolution kernel, bk is the bias of the kth convolution kernel, Conv represents the convolution operation, activation function, after the convolution layer, an activation function is usually connected to introduce nonlinearity and enhance the expressive power of the model, fact(z)=ReLU(z)z is the output of the convolution layer, ReLU is the rectified linear unit activation function, pooling layer, using the pooling layer, including maximum pooling or average pooling to reduce the spatial dimension of the feature map, while increasing the invariance to image displacement, fpool(z)=MaxPool ing(z), z is the output of the activation function, MaxPooling is the maximum pooling operation, fully connected layer, after the convolution and pooling layers, there is usually a fully connected layer, which converts the feature map into a one-dimensional feature vector, Output = softmax(W×Feature+b), W and b are the weights and bias of the fully connected layer, Feature is the input of the fully connected layer, feature extraction, after the combination of the above layers, the feature vector of the image is finally obtained, these vectors capture important information of the image, including edges, textures, and shapes.
[0016] Preferably, the text vectorization is specifically as follows: word segmentation, first dividing the input text into separate words or phrases, word embedding, using word embedding to convert each word into a fixed-length vector, these vectors capture the semantic information of the word, sequence processing, for long texts, using recurrent neural networks or its variants to process sequence data, extracting time series features, attention mechanism, using attention mechanism to help the model focus on the key parts of the text to better understand the context, pooling or compression, through pooling or compression technology, converting sequence features into a fixed-length vector, this vector represents the semantic information of the entire text, encoder output, finally, the encoder outputs a vector, this vector is the semantic representation of the input text, which is used for subsequent classification and similarity comparison tasks.
[0017] Preferably, in step S4, specific encryption technologies include access control, data encryption storage, and network security protection measures to ensure the safe operation of the decoder on the remote server.
[0018] Preferably, in step S4, the specific working principle of the decoder is: the decoder usually refers to the second half of a neural network model, which receives the output of the encoder and converts it into the required output format to complete specific tasks, including classification, regression, and generation. The design of the decoder depends on the nature of the task, and the common form is: Output = softmax (W × Feature + b), where W and b are the weights and biases of the fully connected layer, and Feature is the output feature vector of the encoder.
[0019] A secure encryption deployment system for a model includes a user interaction module, which provides a platform for users to interact with the system, allowing users to conveniently submit data, including pictures or text content, and transmit the data provided by the user to a local encoder module. The user interaction module is connected to a local encoder module, which receives information transmitted from the user interaction module, and efficiently extracts features from the pictures or text submitted by the user, outputs feature vectors, and then transmits the extracted data to a secure communication module. The local encoder module is connected to a secure communication module, which is responsible for establishing a secure and reliable communication channel between the local encoder module and a remote decoding module, and then encrypts the feature data after receiving it, and transmits the encrypted data to a remote decoding module. The secure communication module is connected to a remote decoding module, which receives the encrypted feature vector from the secure communication module, decrypts it, and transmits it from the user interaction module.
[0020] Preferably, the secure communication module is connected to a user interaction module, and the user interaction module provides feedback after the system processes the information, displaying the model output result after decryption processing, so that the user can clearly understand the processing result of the model.
[0021] The present invention provides a method and system for secure encryption deployment of a model. It has the following beneficial effects:
[0022] 1. This invention effectively addresses the security limitations of existing deep learning model deployment solutions by deploying the encoder and decoder separately. The encoder is deployed on the user's local device, utilizing conventional encryption methods combined with access control and data backup to ensure the security of user data during local feature extraction, thus avoiding the risk of data leakage caused by uploading data elsewhere. Simultaneously, the decoder is deployed on a remote server and protected using server-side encryption technology, reducing encryption and development costs and meeting security requirements in practical applications.
[0023] 2. The present invention establishes a secure and reliable communication channel between the local encoder and the remote server decoder through a secure communication module, and adopts secure communication protocols such as HTTPS to encrypt and transmit feature data, thereby ensuring the confidentiality, integrity and authenticity of the data during transmission, and further making up for the shortcomings of existing deployment solutions in data transmission security. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 is a flow chart of the method of the present invention;
[0025] Figure 2 is a system flow chart of the present invention;
[0026] Figure 3 It is a schematic diagram of the overall process of the present invention. DETAILED DESCRIPTION
[0027] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the present specification. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0028] Example:
[0029] Please see the attached Figure 1 -Attached Figure 3 , an embodiment of the present invention provides a secure encryption deployment method for a model, comprising the following steps:
[0030] S1. Model Weight Splitting: Carefully split the weights of the deep learning model, clearly separating the encoder and decoder parts. This process requires in-depth analysis of the model's structure and parameters to ensure that the two parts operate independently and functionally cooperate with each other. At the same time, the parameter information and connection methods of the split points are recorded to prepare for subsequent deployment and communication.
[0031] S2. Local Encoder Encryption and Deployment: The encoder is deployed on the user's local device. Conventional encryption methods are used locally to encrypt the encoder, ensuring that user data is fully protected during feature extraction. The encryption method uses either the symmetric AES or the asymmetric RSA algorithm, depending on actual needs. Other security measures, including access control and data backup, are also combined to enhance encoder security.
[0032] S3. Secure transmission of feature data: The feature data extracted by the encoder is encrypted and transmitted to a remote server via a secure communication module. During transmission, secure communication protocols, including HTTPS, are used to ensure data security and integrity. Feature data is also compressed and encrypted to reduce data volume and increase the difficulty of cracking.
[0033] The specific steps of feature data extracted by the encoder are:
[0034] An encoder in deep learning typically refers to a neural network model that converts input data, such as images or text, into a set of feature vectors. This process involves multiple steps, which are described below for encoding images and text:
[0035] First, image feature extraction
[0036] Preprocessing: First, preprocess the input image, including resizing and normalization, to adapt to the input requirements of the model;
[0037] Convolutional layer: Uses convolutional neural network (CNN) to extract features from the image. The convolutional layer slides the filter (or convolution kernel) on the image to extract local features.
[0038] Convolutional layer: fconv(x,Wk,bk)=Conv(x,Wk)+bk
[0039] x is the input image;
[0040] Wk is the weight of the kth convolution kernel;
[0041] bk is the bias of the kth convolution kernel;
[0042] Conv represents the convolution operation.
[0043] Activation function: After the convolution layer, an activation function (including ReLU) is usually used to introduce nonlinearity and enhance the expressiveness of the model;
[0044] fact(z)=ReLU(z) where z is the output of the convolutional layer;
[0045] ReLU is the rectified linear unit activation function;
[0046] Pooling layer: Use pooling layers, including maximum pooling or average pooling, to reduce the spatial dimension of the feature map while increasing invariance to image displacement;
[0047] fpool(z)=MaxPooling(z)
[0048] z is the output of the activation function;
[0049] MaxPooling is the maximum pooling operation.
[0050] Fully connected layer: After the convolution and pooling layers, there is usually a fully connected layer, which converts the feature map into a one-dimensional feature vector;
[0051] Output=softmax(W×Feature+b)
[0052] W and b are the weights and biases of the fully connected layer, and Feature is the input of the fully connected layer;
[0053] Feature extraction: After combining the above layers, we finally get the feature vectors of the image. These vectors capture important information about the image, including edges, textures, and shapes.
[0054] Second, text vectorization
[0055] Word segmentation: First, the input text is divided into individual words or phrases;
[0056] Word embedding: Use word embeddings (including Word2Vec, GloVe, or BERT) to convert each word into a fixed-length vector that captures the semantic information of the word;
[0057] Sequence processing: For long texts, use recurrent neural networks (RNN) or their variants (including LSTM and GRU) to process sequence data and extract time series features;
[0058] Attention mechanism: Use the attention mechanism to help the model focus on the key parts of the text to better understand the context;
[0059] Pooling or compression: Through pooling or compression technology, the sequence features are converted into a fixed-length vector, which represents the semantic information of the entire text;
[0060] Encoder output: Ultimately, the encoder outputs a vector, which is the semantic representation of the input text and is used for subsequent classification and similarity comparison tasks.
[0061] S4. Decoder Server Deployment and Security Processing: The decoder is deployed on a remote server. Server-side encryption technology is used to protect the decoder from unauthorized access. When the remote server decoder module receives the encrypted feature data from the user, it first decrypts it and then uses this data to derive the result.
[0062] The encryption technology includes access control, data encryption storage, and network security protection measures to ensure the safe operation of the decoder on the remote server;
[0063] The working principle of the decoder is as follows: The decoder is usually the second half of a neural network model. It receives the output of the encoder (feature vector) and converts it into the required output format to complete a specific task, including classification, regression, and generation. The design of the decoder depends on the nature of the task. The common form is: Output = softmax (W × Feature + b)
[0064] Where W and b are the weights and biases of the fully connected layer, and Feature is the output feature vector of the encoder;
[0065] S5. Result return: After the decoder infers the result, it encrypts the result and returns it to the front-end user through the secure communication module. After the user receives the result at the front-end, he decrypts it through the user interaction module to obtain the final output.
[0066] A secure encryption deployment system for a model includes a user interaction module, which provides a platform for users to interact with the system, enabling users to conveniently submit data, including pictures or text content, and transmit the user-provided data to a local encoder module. The user interaction module is connected to a local encoder module, which receives information transmitted from the user interaction module and efficiently extracts features from the pictures or text submitted by the user, outputs a feature vector, and then transmits the extracted data to a secure communication module. The local encoder module is connected to a secure communication module, which is responsible for establishing a secure and reliable communication channel between the local encoder module and a remote decoding module. After receiving the feature data, the secure communication module encrypts the data and transmits the encrypted data to a remote decoding module. The secure communication module is connected to a remote decoding module, which receives the encrypted feature vector from the secure communication module, decrypts it, and transmits it from the user interaction module. The secure communication module is connected to the user interaction module. After the system processes the information, the user interaction module provides feedback and displays the model output result after decryption, so that the user can clearly understand the processing result of the model.
[0067] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.
Claims
1. A secure encryption deployment method for a model, characterized in that: The following steps are involved: S1. Model Weight Splitting: Perform a careful weight split on the deep learning model, clearly separating the encoder and decoder parts; S2. Local Encryption and Deployment of the Encoder: The encoder is deployed on the user's local device and encrypted using conventional encryption methods. S3. Secure transmission of feature data: The feature data extracted by the encoder is encrypted and transmitted to the remote server via a secure communication module. A secure communication protocol is used during the transmission process. S4. Decoder Server Deployment and Security Processing: The decoder is deployed on a remote server and protected using server-side encryption technology. Upon receiving the encrypted signature data from the user, the decoder module on the remote server first decrypts it and then uses this data to perform derivative calculations. S5. Result return: After the decoder infers the result, it encrypts the result and returns it to the front-end user through the secure communication module. After the user receives the result at the front-end, he decrypts it through the user interaction module to obtain the final output.
2. The secure encryption deployment method of a model according to claim 1, characterized in that: In step S2, the specific encryption method includes the symmetric encryption algorithm AES or the asymmetric encryption algorithm RSA, combined with other security measures, including access control and data backup.
3. The secure encryption deployment method of a model according to claim 1, characterized in that: In step S3, the specific encryption protocol includes HTTPS, which is a security protocol for encrypted communication on a computer network. It adds an SSL / TLS encryption layer on top of HTTP.
4. The secure encryption deployment method of a model according to claim 1, characterized in that: The specific steps of feature data extraction by the encoder are as follows: The encoder in deep learning usually refers to a neural network model, which converts the input data, including image feature extraction and text vectorization, into a set of feature vectors.
5. The secure encryption deployment method of a model according to claim 4, characterized in that: The image feature extraction is specifically as follows: preprocessing, first preprocessing the input image, including resizing and normalizing to adapt to the input requirements of the model, convolution layer, using convolutional neural network to extract features of the image, the convolution layer slides on the image through the filter to extract local features, convolution layer, fconv(x,Wk,bk)=Conv(x,Wk)+bk, x is the input image, Wk is the weight of the kth convolution kernel, bk is the bias of the kth convolution kernel, Conv represents the convolution operation, activation function, after the convolution layer, an activation function is usually connected to introduce nonlinearity and enhance the expressive power of the model, fact(z)=ReLU(z)z is the output of the convolution layer, ReLU is the rectified linear unit activation function, pooling layer, using pooling layer, including maximum pooling or average pooling to reduce the spatial dimension of the feature map, while increasing the invariance to image displacement, fpool(z)=MaxPooling(z), z is the output of the activation function, MaxPool ing is the maximum pooling operation, the fully connected layer. After the convolution and pooling layers, there is usually a fully connected layer, which converts the feature map into a one-dimensional feature vector. Output = softmax(W×Feature+b), W and b are the weights and biases of the fully connected layer, Feature is the input of the fully connected layer, feature extraction, after the combination of the above layers, the feature vector of the image is finally obtained. These vectors capture important information of the image, including edges, textures, and shapes.
6. The secure encryption deployment method of a model according to claim 4, characterized in that: The text vectorization is specifically as follows: word segmentation, first dividing the input text into separate words or phrases, word embedding, using word embedding to convert each word into a fixed-length vector, these vectors capture the semantic information of the word, sequence processing, for long texts, using recurrent neural networks or its variants to process sequence data, extracting time series features, attention mechanism, using attention mechanism to help the model focus on the key parts of the text to better understand the context, pooling or compression, through pooling or compression technology, converting sequence features into a fixed-length vector, this vector represents the semantic information of the entire text, encoder output, finally, the encoder outputs a vector, this vector is the semantic representation of the input text, which is used for subsequent classification and similarity comparison tasks.
7. The secure encryption deployment method of a model according to claim 1, characterized in that: In step S4, specific encryption technologies include access control, data encryption storage, and network security protection measures to ensure the safe operation of the decoder on the remote server.
8. The secure encryption deployment method and system of a model according to claim 1, characterized in that: In step S4, the specific working principle of the decoder is as follows: the decoder usually refers to the second half of a neural network model, which receives the output of the encoder and converts it into the required output format to complete specific tasks, including classification, regression, and generation. The design of the decoder depends on the nature of the task and is commonly used in the form of: Output = softmax(W×Feature+b), where W and b are the weights and biases of the fully connected layer, and Feature is the output feature vector of the encoder.
9. A secure encryption deployment system for a model according to any one of claims 1 to 8, characterized in that: It includes a user interaction module, which provides a platform for users to interact with the system and enables users to conveniently submit data. The user interaction module is connected to a local encoder module, which receives information transmitted from the user interaction module and efficiently extracts features from pictures or texts submitted by users, and outputs feature vectors. The local encoder module is connected to a secure communication module, which is responsible for establishing a secure and reliable communication channel between the local encoder module and the remote decoding module. The secure communication module is connected to a remote decoding module, which receives encrypted feature vectors from the secure communication module.
10. The secure encryption deployment system of a model according to claim 9, characterized in that: The secure communication module is connected to the user interaction module. After the system processes the information, the user interaction module provides feedback and displays the model output results after decryption.