Public security big model privacy protection method and system based on fully homomorphic encryption

Through fully homomorphic encryption technology, cross-level security sharing and privacy protection of the public security model is realized, which solves the problem of sensitive information leakage in the public security model, and provides high signal-to-noise ratio learning samples and accurate data support.

CN120433907APending Publication Date: 2025-08-05新疆维吾尔自治区公安厅
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510487773.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-18
Publication Date
2025-08-05

AI Technical Summary

Technical Problem

The prior art has not systematically proposed to use all homomorphic encryption technology to effectively protect the transmission operations of various business data of the public security model, resulting in a high risk of leakage of sensitive information.

Method used

The public security big model privacy protection method based on full homomorphic encryption is adopted, and cross-level security sharing is achieved through distributed key generation and joint public key encryption technology, and the noise parameters are controlled using reproducible keys, and a full-link security protection closed loop is formed in combination with the collective decryption process.

Benefits of technology

It realizes cross-level security sharing on the premise of ensuring data sovereignty, prevents sensitive information leakage, maintains data availability and strengthens privacy protection, and provides high signal-to-noise ratio learning samples and accurate data support for the public security model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120433907A_ABST
    Figure CN120433907A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of information security, and discloses a public security big model privacy protection method and system based on fully homomorphic encryption, and the method comprises the steps: achieving the cross-level security sharing through a distributed key generation and joint public key encryption technology on the premise of guaranteeing the data sovereignty of each business department, and effectively preventing the leakage of sensitive information. The method has the advantages that noise parameters are accurately regulated and controlled in model training through innovative reproducible key design, data availability is maintained, privacy protection is enhanced, and a learning sample with a high signal-to-noise ratio is provided for a public security big model. Finally, the authority control of result output is enhanced through a collective decryption process, a full-link safety protection closed loop from collection, transmission, calculation to application is formed, and efficient, accurate and compliant data support is provided for public security decision making.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of information security technology and relates to a privacy protection method and system for a large public security model based on fully homomorphic encryption. Background Art

[0002] In recent years, with the rapid development of deep neural networks and large-scale model technologies, cutting-edge technologies related to intelligent connected vehicles are being reshaped. Leveraging their superior generation and reasoning capabilities, large-scale models have demonstrated significant advantages in numerous high-value scenarios, driving improvements in both comprehensive social benefits and technological productivity, demonstrating broad development prospects. Internationally, large-scale models, such as OpenAI's ChatGPT and Meta's Llama, have been successfully applied in various fields. By 2024, the development of large-scale models in China will also flourish. Large-scale models such as KIMI (Dark Side of the Moon), Baidu's Wenxin Yiyan (Wenxin Yiyan), Huawei's Pangu (Pangu), Alibaba's Tongyi Qianwen (Tongyi Qianwen), and ByteDance's Doubao (Doubao) are driving local innovation and further accelerating the implementation of intelligent technologies. Therefore, the application of large-scale models in data processing, decision analysis, and other fields within the public security industry also holds enormous potential.

[0003] As a vital force in the nation's administrative law enforcement and criminal justice systems, public security agencies require a high degree of security in the use and transmission of public security data. However, in the process of building a public security big model (such as the public security government affairs big model), data from various departments must be integrated and calculated.

[0004] Homomorphic encryption, a type of encryption method with unique properties, allows any operation that can be performed on plaintext to be performed on encrypted data without decryption. This allows for in-depth and unlimited analysis of encrypted information without compromising confidentiality. While many researchers have applied homomorphic encryption technology to fields such as medical research and financial analysis, combining it with the Public Security Big Model to form a relatively comprehensive defense has yet to be systematically proposed. Therefore, there is an urgent need for a method that utilizes fully homomorphic encryption technology to effectively protect the transmission and operation of various business data in the Public Security Big Model. Summary of the Invention

[0005] The purpose of the present invention is to solve the problems in the prior art and provide a privacy protection method and system for public security large models based on fully homomorphic encryption.

[0006] In order to achieve the above object, the present invention adopts the following technical solutions:

[0007] The privacy protection method for large public security models based on fully homomorphic encryption includes:

[0008] Obtain data from various public security business departments, pre-process the acquired data, and encode the pre-processed data;

[0009] Initialize encryption parameters using the auxiliary server and distribute them to each business department;

[0010] Each business department forms its own private key sk i and public key pk i , based on the public key pk of each business department i Get the joint public key;

[0011] Based on the joint public key, the private key sk of each business department i Encrypt and send the encrypted private key to the auxiliary server to obtain the joint private key under the ciphertext;

[0012] Based on the joint public key and the joint private key, a reproducible key is calculated;

[0013] Each business department uses its own public key pk i Encrypting the respective encoded data;

[0014] The encrypted data is uploaded to the main server, where the public security model is trained and data analysis is performed. The noise growth in the public security model training is controlled by the reproducible key.

[0015] All business departments jointly decrypt the data results and decode the decrypted data.

[0016] A further improvement of the present invention is:

[0017] Furthermore, the acquired data is preprocessed, specifically:

[0018] The collected data is input into the preset sensitive word database to determine whether there are sensitive words; if so, the sensitive information in the acquired data is manually desensitized, and the sensitive words are replaced with other words that do not affect the semantic fluency of the sentence; then, duplicate data in the collected data is removed, data outliers are adjusted, and missing values are filled.

[0019] Furthermore, the preprocessed data is encoded through fully homomorphic encryption to obtain an encoded polynomial. Specifically, the preprocessed data is divided into an integer part and a decimal part. The integer part is first converted into a binary string and then converted into a 0.1 polynomial, while the decimal part is first encoded into a binary and then placed at the end of the integer polynomial.

[0020] Furthermore, the auxiliary server is used to initialize encryption parameters and distribute them to each business department, specifically:

[0021] The auxiliary server initializes the ciphertext polynomial degree n, the coefficient range q of the ciphertext polynomial, the private key distribution D1, and the noise distribution D2, and obtains the ciphertext domain through calculation, specifically:

[0022] R q =Z q [x] / (x n +1)

[0023] Where n is an integer power of 2, D2 is a discrete bounded Gaussian distribution with standard deviation σ, and Zq is an integer ring. The private key distribution D1 is used to generate the private key. During encryption, noise is sampled from the noise distribution D2 and added to the plaintext polynomial to generate the ciphertext.

[0024] Furthermore, each business department forms its own private key sk i and public key pk i , based on the public key pk of each business department i Get the joint public key, specifically:

[0025] Each business department samples the private key distribution and generates its own private key sk i ; Based on the auxiliary server to the ciphertext domain R q Uniform sampling generates a and sends it to each business department, so that each business department generates its own public key pk i ; The auxiliary server collects the public key pk of each business department i After that, the joint public key is obtained by calculation

[0026]

[0027] Among them, Z represents the total number of researchers and data providers; data providers are the departments that provide data, and researchers are the departments that need to perform data operations.

[0028] Furthermore, based on the joint public key, the private key sk of each business department i Encrypt and send the encrypted private key to the auxiliary server to obtain the ciphertext joint private key, specifically:

[0029] Each business department uses the joint public key pk to check its own private key sk i Encrypt and use the encrypted private key c j (sk i ) is sent to the auxiliary server and the joint private key under the ciphertext is obtained by calculation Then each business department calculates the joint private key sk and the individual private key sk i The interaction relationship between them is as follows:

[0030] c j (sk·sk i)=c j (sk)·sk ij +c ij (0)

[0031] Among them, c ij (0) is the ciphertext of 0; sk ij is the private key sk of the i-th business department i The jth component of .

[0032] Furthermore, based on the joint public key and the joint private key, a reproducible key is calculated, specifically:

[0033] The auxiliary server uses each ciphertext result to calculate the square of the joint private key c under the ciphertext j (sk 2 ), at the same time, each business department samples the noise distribution to obtain e i1 ~e ik , and use the joint public key pk to encrypt it to form a ciphertext, and calculate the total noise under the ciphertext through the auxiliary server:

[0034]

[0035] The auxiliary server then sends the ciphertext domain R q Uniform sampling generates a r1 ~a rk , get the joint relinear key under the ciphertext

[0036]

[0037] Then, each business department jointly decrypts it to form the reproducible key rlk.

[0038] Furthermore, each business department uses its own public key pk i Encrypt each data, specifically:

[0039] Each business department uses the auxiliary server to sample s and e in the noise distribution and sends them to each business department. Then each business department uses its own public key pk i Perform homomorphic encryption on each encoded data to obtain ciphertext data

[0040] c i =Enc(pk i ,m i )=pk i ·s+pe+m i ∈R q

[0041] Where p is the coefficient of the reduced plaintext polynomial; m i is the encoded plaintext data; s is a uniformly random ring element;

[0042] In the model, the c of each department i Perform ciphertext calculation and output the ciphertext calculation result c(m).

[0043] Furthermore, all business departments jointly decrypt the data results and decode the decrypted data, specifically:

[0044] The noise e is obtained by sampling the fuzzy noise distribution i , let c(m)=(c(m)[0],c(m)[1]), distribute c(m)[1] to each business department through the auxiliary server, so that it can obtain u by calculation i =c(m)[1]·sk i +e i , and then the u obtained by each business department i It is sent to the final application department through the auxiliary server, and the application department calculates After getting the decrypted plaintext, we need to decode the decryption polynomial. First, we adjust the parameter p, and then start from the smallest non-zero bit of the decimal part, that is, x N-8 , multiply the absolute value of its coefficient by 2, the remainder is its new coefficient, and the quotient is carried to x N-7 Repeat the above steps until x N-1 , forming the final result after decoding m=Decode(x).

[0045] The privacy protection system for public security large models based on fully homomorphic encryption includes:

[0046] An encoding module, which obtains data from various public security business departments, pre-processes the obtained data, and encodes the pre-processed data;

[0047] An initialization module, which uses the encryption parameters initialized by the auxiliary server and distributes them to each business department;

[0048] The first acquisition module, each business department of the first acquisition module respectively forms its own private key sk i and public key pk i , based on the public key pk of each business department i Get the joint public key;

[0049] The second acquisition module is based on the joint public key to obtain the private key sk of each business department. i Encrypt and send the encrypted private key to the auxiliary server to obtain the joint private key under the ciphertext;

[0050] a calculation module, wherein the calculation module calculates a reproducible key based on the joint public key and the joint private key;

[0051] Encryption module, each business department of the encryption module uses its own public key pk i Encrypting the respective encoded data;

[0052] A training module, which uploads the encrypted data to the main server, trains the public security model on the main server and performs data analysis, and controls noise growth during the public security model training using a reproducible key;

[0053] Decryption module: all business departments of the decryption module jointly decrypt the data results and decode the decrypted data.

[0054] Compared with the prior art, the present invention has the following beneficial effects:

[0055] This invention uses distributed key generation and joint public key encryption technology to achieve cross-level secure sharing while safeguarding the data sovereignty of each business department, effectively preventing the leakage of sensitive information. It also uses innovative reproducible key design to precisely control noise parameters during model training, maintaining data availability while strengthening privacy protection, and providing high-signal-to-noise ratio learning samples for large public security models. Finally, through a collective decryption process, it strengthens the authority control of result output, forming a full-link security protection closed loop from collection, transmission, calculation to application, providing efficient, accurate, and compliant data support for public security decision-making. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0057] Figure 1 This is a flow chart of the privacy protection method for a large public security model based on fully homomorphic encryption according to the present invention;

[0058] Figure 2 This is a schematic diagram of the structure of the privacy protection system for public security large models based on fully homomorphic encryption of the present invention;

[0059] Figure 3 This is a topological diagram of a privacy protection method for a large public security model based on fully homomorphic encryption according to an embodiment of the present invention;

[0060] Figure 4 This is a schematic diagram of the overall architecture of the privacy protection method for the public security large model based on fully homomorphic encryption according to an embodiment of the present invention. DETAILED DESCRIPTION

[0061] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions of the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings herein can be arranged and designed in various different configurations.

[0062] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention as claimed, but rather merely represents selected embodiments of the present invention. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present invention without creative effort shall fall within the scope of protection of the present invention.

[0063] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, it does not need to be further defined or explained in subsequent drawings.

[0064] In the description of the embodiments of the present invention, it should be noted that if the terms "upper," "lower," "horizontal," "inner," etc. appear, the orientation or positional relationship indicated is based on the orientation or positional relationship shown in the accompanying drawings, or the orientation or positional relationship in which the inventive product is typically placed when in use. These terms are merely for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or component referred to must have a specific orientation, be constructed, or operate in a specific orientation. Therefore, they should not be construed as limitations on the present invention. In addition, the terms "first," "second," etc. are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0065] In addition, if the term "horizontal" appears, it does not mean that the component must be absolutely horizontal, but can be slightly tilted. For example, "horizontal" only means that its direction is more horizontal than "vertical", and does not mean that the structure must be completely horizontal, but can be slightly tilted.

[0066] In the description of the embodiments of the present invention, it should be noted that, unless otherwise expressly specified or limited, the terms "disposed," "installed," "connected," and "connected" should be understood in a broad sense. For example, they can refer to fixed connections, detachable connections, or integral connections; they can refer to mechanical connections or electrical connections; they can refer to direct connections or indirect connections through an intermediate medium; and they can refer to internal connections between two components. Those skilled in the art will understand the specific meanings of the above terms in the present invention based on specific circumstances.

[0067] The present invention is described in further detail below with reference to the accompanying drawings:

[0068] See also Figure 1 The present invention discloses a privacy protection method for a large public security model based on fully homomorphic encryption, comprising:

[0069] S101, obtaining data from various public security business departments, preprocessing the obtained data, and encoding the preprocessed data;

[0070] The acquired data is preprocessed as follows:

[0071] The collected data is input into the preset sensitive word database to determine whether there are sensitive words; if so, the sensitive information in the acquired data is manually desensitized, and the sensitive words are replaced with other words that do not affect the semantic fluency of the sentence; then, duplicate data in the collected data is removed, data outliers are adjusted, and missing values are filled.

[0072] The preprocessed data is encoded using fully homomorphic encryption to obtain the encoded polynomial. Specifically, the preprocessed data is divided into an integer part and a decimal part. The integer part is first converted into a binary string and then converted into a 0.1 polynomial, while the decimal part is first encoded into a binary string and then placed at the end of the integer polynomial.

[0073] S102, using the encryption parameters initialized by the auxiliary server and distributing them to each business department;

[0074] The auxiliary server initializes the ciphertext polynomial degree n, the coefficient range q of the ciphertext polynomial, the private key distribution D1, and the noise distribution D2, and obtains the ciphertext domain through calculation, specifically:

[0075] R q =Z q [x] / (x n +1)

[0076] Where n is an integer power of 2, D2 is a discrete bounded Gaussian distribution with standard deviation σ; Zq is an integer ring.

[0077] S103, each business department forms its own private key sk i and public key pk i , based on the public key pk of each business department i Get the joint public key;

[0078] Each business department samples the private key distribution and generates its own private key sk i ; Based on the auxiliary server to the ciphertext domain R q Uniform sampling generates a and sends it to each business department, so that each business department generates its own public key pk i ; The auxiliary server collects the public key pk of each business department iAfter that, the joint public key is obtained by calculation

[0079]

[0080] Among them, Z represents the total number of researchers and data providers; data providers are the departments that provide data, and researchers are the departments that need to perform data operations.

[0081] S104, based on the joint public key, the private key sk of each business department i Encrypt and send the encrypted private key to the auxiliary server to obtain the joint private key under the ciphertext;

[0082] Each business department uses the joint public key pk to check its own private key sk i Encrypt and use the encrypted private key c j (sk i ) is sent to the auxiliary server and the joint private key under the ciphertext is obtained by calculation Then each business department calculates the joint private key sk and the individual private key sk i The interaction relationship between them is as follows:

[0083] c j (sk·sk i )=c j (sk)·sk ij +c ij (0)

[0084] Among them, c ij (0) is the ciphertext of 0; sk ij is the private key sk of the i-th business department i The jth component of .

[0085] S105, calculating a reproducible key based on the joint public key and the joint private key;

[0086] The auxiliary server uses each ciphertext result to calculate the square of the joint private key c under the ciphertext j (sk 2 ), at the same time, each business department samples the noise distribution to obtain e i1 ~e ik , and use the joint public key pk to encrypt it to form a ciphertext, and calculate the total noise under the ciphertext through the auxiliary server:

[0087]

[0088] The auxiliary server then sends the ciphertext domain R q Uniform sampling generates a r1 ~a rk , get the joint relinear key under the ciphertext

[0089]

[0090] Then, each business department jointly decrypts it to form the reproducible key rlk.

[0091] S106, each business department uses its own public key pk i Encrypting the respective encoded data;

[0092] Each business department uses the auxiliary server to sample s and e in the noise distribution and sends them to each business department. Then each business department uses its own public key pk i Perform homomorphic encryption on each encoded data to obtain ciphertext data

[0093] c i =Enc(pk i ,m i )=pk i ·s+pe+m i ∈R q

[0094] Where p is the coefficient of the reduced plaintext polynomial; m i is the encoded plaintext data; s is a uniformly random ring element;

[0095] In the model, the c of each department i Perform ciphertext calculation and output the ciphertext calculation result c(m).

[0096] S107, uploading the encrypted data to the main server, training the public security model on the main server and performing data analysis, and controlling the noise growth in the public security model training by using the reproducible key;

[0097] S108, all business departments jointly decrypt the data results and decode the decrypted data.

[0098] The noise e is obtained by sampling the fuzzy noise distribution i , let c(m)=(c(m)[0],c(m)[1]), distribute c(m)[1] to each business department through the auxiliary server, so that it can obtain u by calculation i =c(m)[1]·sk i +e i , and then the u obtained by each business department i It is sent to the final application department through the auxiliary server, and the application department calculates After getting the decrypted plaintext, we need to decode the decryption polynomial. First, we adjust the parameter p, and then start from the smallest non-zero bit of the decimal part, that is, x N-8 , multiply the absolute value of its coefficient by 2, the remainder is its new coefficient, and the quotient is carried to xN-7 Repeat the above steps until x N-1 , forming the final result after decoding m=Decode(x).

[0099] See also Figure 2 The present invention discloses a privacy protection system for a large public security model based on fully homomorphic encryption, comprising:

[0100] An encoding module, which obtains data from various public security business departments, pre-processes the obtained data, and encodes the pre-processed data;

[0101] An initialization module, which uses the encryption parameters initialized by the auxiliary server and distributes them to each business department;

[0102] The first acquisition module, each business department of the first acquisition module respectively forms its own private key sk i and public key pk i , based on the public key pk of each business department i Get the joint public key;

[0103] The second acquisition module is based on the joint public key to obtain the private key sk of each business department. i Encrypt and send the encrypted private key to the auxiliary server to obtain the joint private key under the ciphertext;

[0104] a calculation module, wherein the calculation module calculates a reproducible key based on the joint public key and the joint private key;

[0105] Encryption module, each business department of the encryption module uses its own public key pk i Encrypting the respective encoded data;

[0106] A training module, which uploads the encrypted data to the main server, trains the public security model on the main server and performs data analysis, and controls noise growth during the public security model training using a reproducible key;

[0107] Decryption module: all business departments of the decryption module jointly decrypt the data results and decode the decrypted data.

[0108] Example:

[0109] The present invention discloses a privacy protection method for a large public security model based on fully homomorphic encryption, comprising:

[0110] A: Obtain data from various public security departments, pre-process and encode it

[0111] Specifically, the data from various public security departments not only comes from a wide range of sources but is also highly interconnected, complex, and sensitive. To prevent the leakage of sensitive information and improve the quality of subsequent model training, it requires preprocessing. First, data administrators from each department manually desensitize obvious sensitive information, replacing sensitive terms that do not affect the downstream tasks of the public security large-scale model with other terms that do not affect the semantic coherence of the sentence. Then, data administrators from each department use machine learning algorithms to complete their respective data cleaning, namely removing duplicate data, adjusting outliers, and filling in missing values, further improving the input quality of each department's data.

[0112] Since the neural network in the homomorphic encryption scheme does not match the elements involved in the calculation, the neural network is the real number involved in the calculation, and homomorphic encryption is a polynomial calculation. Therefore, an encoding scheme that retains addition and multiplication is needed. In the present invention, the real number is first divided into an integer part and a decimal part. The integer part is first converted into a binary string and then converted into a 0.1 polynomial. The decimal part is first encoded into a binary and then placed at the end of the integer polynomial. For example, the encoding polynomial of 15.75 is:

[0113] Encode(x)=-1x N-1 -1x N-2 +x 3 +x 2 +x+1

[0114] B: Use the auxiliary server to initialize encryption parameters and distribute them to each business department

[0115] Specifically, by Figure 3 As we know, in the system model, the auxiliary server acts as a bridge between various business departments, large models and users. It can not only assist the main server in training the public security large model, but also complete the management, distribution and calculation of keys, obtain and store model results, and distribute the ciphertext results to the corresponding users. Therefore, it must be trustworthy. In the early operation, the auxiliary server first needs to initialize the ciphertext polynomial degree (n), the coefficient range of the ciphertext polynomial (q), the private key distribution and the noise distribution (D1) and (D2), and obtain the ciphertext domain R by calculation. q =Z q [x] / (x n +1), where n must be an integer power of 2, and D2 is a discrete bounded Gaussian distribution with standard deviation σ. Finally, the auxiliary server distributes the initialized encryption parameters to various public security departments. It is important to note that these ciphertext parameters can be selected after multiple rounds of comparison, as the result will affect the multiplication depth and space resource consumption.

[0116] C: Each business department forms its own private key sk i and public key pk i , and generate the joint public key and reproducible key by calculation

[0117] Specifically, during the training of the public security model, the input data of each business department, the model data of the auxiliary server and the main server during training, etc. all contain sensitive information. In the construction of the method, it is necessary to ensure that this information is not leaked. Therefore, it is necessary to strictly control the key generation and holding process. The key generation steps of the present invention are as follows:

[0118] C1: Each business department samples the private key distribution and generates its own private key sk i ,Since the private key directly affects the decryption authority of the entity, the present ,invention needs to ensure that the private key is only held by each data ,business department;

[0119] C2: Auxiliary server to ciphertext domain R q Uniform sampling is performed to generate parameter a and send it to each business department, so that each business department can generate its own public key pk i ;

[0120] C3: Each business department will use its own public key pk i All are sent to the auxiliary server. After collecting the public keys of each business department, the auxiliary server calculates the joint public key.

[0121] C4: Since the generation of reproducible keys requires the private keys of each business department, in order to prevent the private keys from being leaked, the private keys of each business department need to be encrypted. Therefore, the auxiliary server needs to send the joint public key to each business department, and each business department uses the joint public key pk to encrypt its own private key sk i Encrypt and use the encrypted private key c j (sk i ) is sent to the secondary server again;

[0122] C5: The auxiliary server obtains the joint private key under the ciphertext through calculation and send it to each business department;

[0123] C6: Each business department uses the joint private key under the ciphertext to calculate c j (sk·sk i )=c j (sk)·sk ij +c ij (0), and send the calculation results to the auxiliary server;

[0124] C7: The auxiliary server uses each ciphertext result to calculate the square of the joint private key under the ciphertext c j (sk 2 );

[0125] C8: Each business department needs to sample the noise distribution to obtain e i1 ~e ik , and encrypt it using the joint public key pk to form a noise ciphertext, and send it to the auxiliary server;

[0126] C9: Auxiliary server uniformly calculates the total noise under the ciphertext

[0127] C10: Auxiliary server to ciphertext domain R q Uniform sampling generates a r1 ~a rk , get the joint relinear key under the ciphertext

[0128] C11: All business departments jointly decrypt to form the reproducible key rlk.

[0129] D: Each business department uses its own public key to encrypt its own data

[0130] Specifically, if Figure 4 As shown in the figure, the complexity and number of parameters of the public security model make it vulnerable to various attacks. If the business data is leaked or tampered or ethical issues are caused by the attacker's counter-attack during the training process, it will seriously endanger social order. Therefore, in order to ensure the security of public security business data, in the design of the present invention, the data of each business department must be encrypted separately before being aggregated into the large model for training. First, the auxiliary server is used to sample s and e in the noise distribution and send them to each business department. Then each business department uses its own public key pk i Perform homomorphic encryption on each encoded data to obtain the ciphertext data c i =Enc(pk i ,m i )=pk i ·s+pe+m i ∈R q , where p is the coefficient of the reduced plaintext polynomial.

[0131] E: Upload the encrypted data to the main server, train the public security model on the main server and perform data analysis

[0132] Specifically, the main server is mainly used to collect encrypted data from various business departments, build and train the public security large model, and transmit the analysis results to the auxiliary server. It should be noted that in the construction process of the large model, in order to improve the performance of the FFN (feed-forward network) layer in the Transformer mechanism, SwiGLU is usually used to replace the Relu and Sigmoid activation functions in ordinary neural networks. However, it is not in polynomial form and will affect the homomorphic calculation results to a certain extent. Therefore, in the present invention, the large model activation function needs to be approximated by a polynomial.

[0133] F: All business departments jointly decrypt the data results and decode the decrypted data

[0134] Specifically, after the primary and secondary servers complete the model calculation and analysis, the secondary server will transmit the results to the user who needs the results. This user can be the data provider or other users. Therefore, to prevent the leakage of the result information, all business departments that provide data need to jointly decrypt it during decryption. In this invention, the decryption steps are as follows:

[0135] F1: The auxiliary server first sets c(m) = (c(m)[0], c(m)[1]), and then distributes c(m)[1] to each business department;

[0136] F2: Each business department uses its own private key sk i Calculate u i =c(m)[1]·sk i +e i , where e i Obtained by sampling the fuzzy noise distribution;

[0137] F3: The u obtained by each business department i It is sent to the final application department through the auxiliary server, and the application department calculates Get the decrypted plaintext polynomial.

[0138] Finally, the decryption polynomial needs to be decoded. First, adjust the parameter p, and then start from the smallest non-zero bit of the decimal part, that is, x N-8 , multiply the absolute value of its coefficient by 2, the remainder is its new coefficient, and the quotient is carried to x N-7 Repeat the above steps until x N-1 , forming the final result after decoding m=Decode(x).

[0139] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention shall be included within the scope of protection of the present invention.

Claims

1. A privacy protection method for a large public security model based on fully homomorphic encryption, characterized by: include: Obtain data from various public security business departments, pre-process the acquired data, and encode the pre-processed data; Initialize encryption parameters using the auxiliary server and distribute them to each business department; Each business department forms its own private key sk i and public key pk i , based on the public key pk of each business department i Get the joint public key; Based on the joint public key, the private key sk of each business department i Encrypt and send the encrypted private key to the auxiliary server to obtain the joint private key under the ciphertext; Based on the joint public key and the joint private key, a reproducible key is calculated; Each business department uses its own public key pk i Encrypting the respective encoded data; The encrypted data is uploaded to the main server, where the public security model is trained and data analysis is performed. The noise growth in the public security model training is controlled by the reproducible key. All business departments jointly decrypt the data results and decode the decrypted data.

2. The privacy protection method for a large public security model based on fully homomorphic encryption according to claim 1 is characterized in that: The preprocessing of the acquired data is specifically as follows: The collected data is input into the preset sensitive word database to determine whether there are sensitive words; if so, the sensitive information in the acquired data is manually desensitized, and the sensitive words are replaced with other words that do not affect the semantic fluency of the sentence; then, duplicate data in the collected data is removed, data outliers are adjusted, and missing values are filled.

3. The privacy protection method for a large public security model based on fully homomorphic encryption according to claim 2 is characterized in that: The preprocessed data is encoded by fully homomorphic encryption to obtain an encoded polynomial. Specifically, the preprocessed data is divided into an integer part and a decimal part. The integer part is first converted into a binary string and then converted into a 0.1 polynomial, while the decimal part is first encoded into a binary and then placed at the end of the integer polynomial.

4. The privacy protection method for a large public security model based on fully homomorphic encryption according to claim 3 is characterized in that: The auxiliary server is used to initialize encryption parameters and distribute them to each business department, specifically: The auxiliary server initializes the ciphertext polynomial degree n, the coefficient range q of the ciphertext polynomial, the private key distribution D1, and the noise distribution D2, and obtains the ciphertext domain through calculation, specifically: R q =Z q [x] / (x n +1) Where n is an integer power of 2, D2 is a discrete bounded Gaussian distribution with standard deviation σ, Zq is an integer ring, and the private key distribution D1 is used to generate the private key. During the encryption process, noise is sampled from the noise distribution D2 and added to the plaintext polynomial to generate the ciphertext.

5. The privacy protection method for a large public security model based on fully homomorphic encryption according to claim 4 is characterized in that: Each business department forms its own private key sk i and public key pk i , based on the public key pk of each business department i Get the joint public key, specifically: Each business department samples the private key distribution and generates its own private key sk i ; Based on the auxiliary server to the ciphertext domain R q Uniform sampling generates a and sends it to each business department, so that each business department generates its own public key pk i ; The auxiliary server collects the public key pk of each business department i After that, the joint public key is obtained by calculation Among them, Z represents the total number of researchers and data providers; data providers are the departments that provide data, and researchers are the departments that need to perform data operations.

6. The privacy protection method for a large public security model based on fully homomorphic encryption according to claim 5 is characterized in that: The private key sk of each business department based on the joint public key i Encrypt and send the encrypted private key to the auxiliary server to obtain the ciphertext joint private key, specifically: Each business department uses the joint public key pk to check its own private key sk i Encrypt and use the encrypted private key c j (sk i ) is sent to the auxiliary server and the joint private key under the ciphertext is obtained by calculation Then each business department calculates the joint private key sk and the individual private key sk i The interaction relationship between them is as follows: c j (sk·sk i )=c j (sk)·sk ij +c ij (0) Among them, c ij (0) is the ciphertext of 0; sk ij is the private key sk of the i-th business department i The jth component of .

7. The privacy protection method for a large public security model based on fully homomorphic encryption according to claim 6 is characterized in that: The reproducible key is calculated based on the joint public key and the joint private key, specifically: The auxiliary server uses each ciphertext result to calculate the square of the joint private key c under the ciphertext j (sk 2 ), at the same time, each business department samples the noise distribution to obtain e i1 ~e ik , and use the joint public key pk to encrypt it to form a ciphertext, and calculate the total noise under the ciphertext through the auxiliary server: The auxiliary server then sends the ciphertext domain R q Uniform sampling generates a r1 ~a rk , get the joint relinear key under the ciphertext Then, each business department jointly decrypts it to form the reproducible key rlk.

8. The privacy protection method for a large public security model based on fully homomorphic encryption according to claim 7 is characterized in that: Each business department uses its own public key pk i Encrypt each data, specifically: Each business department uses the auxiliary server to sample s and e in the noise distribution and sends them to each business department. Then each business department uses its own public key pk i Perform homomorphic encryption on each encoded data to obtain ciphertext data c i =Enc(pk i ,m i )=pk i ·s+pe+m i ∈R q Where p is the coefficient of the reduced plaintext polynomial; m i is the encoded plaintext data; s is a uniformly random ring element; In the model, the c of each department i Perform ciphertext calculation and output the ciphertext calculation result c(m).

9. The privacy protection method for a large public security model based on fully homomorphic encryption according to claim 8 is characterized in that: All business departments jointly decrypt the data results and decode the decrypted data, specifically: The noise e is obtained by sampling the fuzzy noise distribution i , let c(m)=(c(m)[0],c(m)[1]), distribute c(m)[1] to each business department through the auxiliary server, so that it can obtain u by calculation i =c(m)[1]·sk i +e i , and then the u obtained by each business department i It is sent to the final application department through the auxiliary server, and the application department calculates After getting the decrypted plaintext, we need to decode the decryption polynomial. First, we adjust the parameter p, and then start from the smallest non-zero bit of the decimal part, that is, x N-8 , multiply the absolute value of its coefficient by 2, the remainder is its new coefficient, and the quotient is carried to x N-7 Repeat the above steps until x N-1 , forming the final result after decoding m=Decode(x).

10. The privacy protection system for public security large models based on fully homomorphic encryption is characterized by: include: An encoding module, which obtains data from various public security business departments, pre-processes the obtained data, and encodes the pre-processed data; An initialization module, which uses the encryption parameters initialized by the auxiliary server and distributes them to each business department; The first acquisition module, each business department of the first acquisition module respectively forms its own private key sk i and public key pk i , based on the public key pk of each business department i Get the joint public key; The second acquisition module is based on the joint public key to obtain the private key sk of each business department. i Encrypt and send the encrypted private key to the auxiliary server to obtain the joint private key under the ciphertext; a calculation module, wherein the calculation module calculates a reproducible key based on the joint public key and the joint private key; Encryption module, each business department of the encryption module uses its own public key pk i Encrypting the respective encoded data; A training module, which uploads the encrypted data to the main server, trains the public security model on the main server and performs data analysis, and controls noise growth during the public security model training using a reproducible key; Decryption module: all business departments of the decryption module jointly decrypt the data results and decode the decrypted data.

Citation Information

Patent Citations

  • Enterprise large model answer text generation method, device and system based on fully homomorphic encryption technology

    CN118312602A

  • Police service processing method and system based on large model technology cooperation

    CN119693202A

  • Fully homomorphic encryption method and device and computer readable storage medium

    US20210243005A1