Homomorphic encryption-based construction method for accurate touch enterprise scoring model

Through the method based on homomorphic encryption, the enterprise scoring model is achieved accurately, the problem of data leakage risk in traditional data processing methods is solved, and efficient and secure joint data calculation is achieved.

CN119720239APending Publication Date: 2025-03-28交通银行股份有限公司辽宁省分行
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411759071.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-03
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

Traditional data processing methods require the transmission of data in plain text, which increases the risk of data leakage. How to realize joint data calculations while both parties cannot be clearly out of the domain has become a research hotspot in the current data application field.

Method used

The method based on homomorphic encryption is adopted to achieve accurate reach of the enterprise scoring model and ensure the privacy and security of the data during the calculation process through model interval standardization, packaging encoding of model and ciphertext, comparative calculation of ciphertext and calculation of model score value.

Benefits of technology

It supports ciphertext calculations of more than 100,000 data without leaking data content, and the response time is at a hundred seconds level, ensuring the decoupling between the data source and the computing party, and improving the efficiency of model inference requests.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119720239A_ABST
    Figure CN119720239A_ABST
Patent Text Reader

Abstract

The invention discloses a construction method for an accurate touch enterprise scoring model based on homomorphic encryption, relates to the technical field of homomorphic encryption, and aims to solve the problem that a prediction result and actual output have large deviation due to a traditional prediction method. The method comprises the following steps: S1, model interval standardization: for each feature f: (fmax, fmin), performing model interval standardization; specifically, a maximum value xmax, a minimum value xmin, an offset and a scaling scale are set according to actual conditions, original data are set as x, firstly, an original interval is converted into a left-closed and right-open interval, x'values on the left-closed and right-open interval are obtained, a standardized interval [y0, y1] is obtained through standardized operation, and a formula is shown in the specification, and a function flood (x) is rounded down. The method has the advantages that the enterprise scoring model is calculated on the ciphertext, complete enterprise portraits and credit scores are formed, and meanwhile sensitive information is not leaked.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of homomorphic encryption technology, and more specifically, to a method for constructing a scoring model for accurately reaching an enterprise based on homomorphic encryption. Background Art

[0002] In the field of data application, as enterprises' awareness of data privacy protection increases, how to achieve effective use of data under the premise of ensuring data security has become an urgent problem to be solved. In particular, when both parties (requester and service party) need to jointly perform model calculations, how to ensure that the requester's enterprise data does not leave the domain and the service party's model information does not leave the domain has become a technical difficulty. Traditional data processing methods often require data to be transmitted in plain text, which undoubtedly increases the risk of data leakage. Therefore, how to achieve joint data calculation under the premise that the data of both parties cannot leave the domain in plain text has become a research hotspot in the current data application field.

[0003] In view of this, we propose a method based on homomorphic encryption to build a scoring model for accurate access to enterprises. Summary of the invention

[0004] The purpose of the present invention is to provide a method for constructing a scoring model for accurately reaching enterprises based on homomorphic encryption, aiming to solve the problem that traditional prediction methods lead to a large deviation between the prediction results and the actual output.

[0005] In order to solve the above technical problems, the present invention provides the following technical solutions: a method for constructing a scoring model for accurately reaching enterprises based on homomorphic encryption, the method comprising the following steps:

[0006] S1: Model interval standardization: For each feature f:(f max ,f min ], set a maximum value x according to the actual situation max , minimum value x min , offset offset and scaling scale, the original data is set to x, first convert the original interval into a left closed and right open interval, obtain the x' value on the left closed and right open interval, and then perform normalization operation to obtain the normalized interval [y0,y1), the formula is, where the function floor(x) is rounded down;

[0007] x′=min(max(x,x min ),x max )

[0008] y=floor((x′-offset) / scale)

[0009] S2: Package encoding of model and ciphertext: Note that the evaluation model has s fields, and for each field f i ,i=0,1,...,s, the record field has m rows, divided into j=0,1,...,m, then the model and ciphertext are packaged and encoded;

[0010] S3: Ciphertext comparison calculation: The packaging form of step S2 above is adopted, which is mainly used to perform ciphertext comparison operations on the field values ​​of the original data and the field values ​​of the interval endpoints. For two n-bit values ​​a and b, each bit is first extracted and BFV encryption is performed separately:

[0011] a i =(a>>i)&1,i∈[n]

[0012] b′ i =1-(b>>i)&1,i∈[n]

[0013] S4: Model score calculation: Based on the ciphertext comparison algorithm, the score calculation of each field value is implemented.

[0014] Preferably, the step of packaging and encoding in the above step S2 includes:

[0015] S2.1: For a requested ciphertext packet, a field value a is first extracted to represent the bits of a. i =(a>>i)&1,i∈[n]; each bit a i If packed into N slots of a ciphertext, field a will be packed into n ciphertexts in total. When the total data volume is X, the total number of ciphertexts is n*ceil(X / N), where the ceil() function rounds up.

[0016] S2.2: For each interval of the model parameter field Take the value of the right endpoint make Then for b i Encoding: First extract the bit representation of b b′ i =1-(b>>i)&1,i∈[n]; Similarly, n plaintexts complete the packing of a row interval of field b. Each field requires a total of n*m plaintexts for packing, and the score value of each interval of the field is packed with one plaintext respectively. The total number of plaintexts encoded by the final model is s*m*(n+1).

[0017] Preferably, the ciphertext comparison scheme defined in the above step S3 is:

[0018] c=CMP({Enc(a 0 ),Enc(a 1),...,Enc(a n-1 )},{b′ 0 ,b′ 1 ,...,b′ n-1},n)

[0019] For i∈{1,2,...,n}, calculate

[0020]

[0021] for Calculate in sequence

[0022]

[0023] The calculation result

[0024]

[0025] Among them: CMP is the ciphertext comparison operator, Enc is homomorphic encryption, is the ciphertext addition, is the ciphertext subtraction, ⊙ is the ciphertext multiplication.

[0026] Preferably, the scoring calculation scheme for a single field in the above step S4 is:

[0027] For a single field f i , the ciphertext of the request data is {a 0 ,a 1 ,...,a n-1}, the model parameter plaintext of each interval is {b' 0 ,b' 1 ,...,b' n-1}, first perform a ciphertext comparison operation to obtain the intermediate result c of the comparison j :

[0028] c j =CMP({Enc(a 0 ),Enc(a 1 ),...,Enc(a n-1 )},{b′ 0 ,b′ 1 ,...,b′ n-1},n),j∈[m]

[0029] The intermediate result ciphertext is accumulated and summed, the score value of the field is calculated, and the result y on the field is obtained. i :

[0030]

[0031] Sum up the ciphertext score values ​​calculated by all features to get the final ciphertext calculation result:

[0032]

[0033] Preferably, a homomorphic encryption scheme based on the RLWE problem is adopted, and its encryption function Enc(x) is defined as:

[0034] Enc(x) = g·a+e+x·q

[0035] Among them: g is the private key, a is a randomly selected polynomial, e is the noise polynomial, and q is the modulus to ensure the privacy and security of data during the entire calculation process.

[0036] Preferably, it also includes judging whether the ciphertext comparison result is logically consistent through preset verification rules. If not, timely backtracking and adjusting the corresponding ciphertext data to avoid erroneous results from flowing into the subsequent scoring calculation process, thereby improving the accuracy and reliability of the entire calculation process.

[0037] Preferably, when there are multiple data sources, each data source is divided into intervals and packaged and encoded according to its own data characteristics, and then the packaged model parameter fields corresponding to each data source are fused and aligned to ensure that data from different sources can still follow the unified ciphertext model calculation rules after fusion, thereby achieving accurate model calculation of the fused data that meets privacy requirements.

[0038] Preferably, based on the characteristics of RLWE homomorphic encryption to ensure data privacy and security, a distributed homomorphic encryption computing architecture is constructed when processing large-scale data.

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

[0040] 1. The technical solution of the present invention is based on the BFV algorithm, which has provable security and anti-quantum attack security. The data source cannot obtain any information about the model scoring rules, and the calculation party cannot obtain any information about the original data. According to the selected homomorphic parameters, 128-bit computing security can be provided.

[0041] 2. The solution of the present invention realizes the calculation of enterprise scoring model on ciphertext based on homomorphic encryption for the first time, supports more than 100,000 data requests, and responds in hundreds of seconds.

[0042] 3. The data source and calculation execution processes of the present invention are decoupled, no real-time interaction is required during the calculation process, and data can be calculated in batches.

[0043] 4. High efficiency of model inference requests. The ciphertext is small in size, has high transmission efficiency, and requires fewer calculation steps. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 A schematic flow chart of the method steps for implementing ciphertext model calculation in the present invention;

[0045] Figure 2 This is a schematic diagram of the packaging form of characteristic values ​​in the present invention. DETAILED DESCRIPTION

[0046] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.

[0047] Embodiment 1

[0048] like Figure 1 to Figure 2 This embodiment adopts a homomorphic encryption scheme that supports finite multiplications and infinite additions, namely, somewhat homomorphic encryption. Somewhat homomorphic encryption supports multiplication operations of a specified level of depth. The BFV algorithm can support multiplication and addition of integer data more efficiently, and supports ciphertext packing to achieve efficient parallel computing of multiple data. In the enterprise scoring model scenario, all operations can be converted into integer data operations.

[0049] For each feature f:(f max ,f min ], set a maximum value x according to the actual situation max , minimum value x min , offset offset and scaling scale, the original data is set to x, first convert the original interval into a left closed and right open interval, obtain the x' value on the left closed and right open interval, and then perform a normalization operation to obtain a normalized interval [y0,y1), as shown in the formula, where the function floor(x) is rounded down;

[0050] x′=min(max(x,x min ),x max )

[0051] y=floor((x′-offset) / scale)

[0052] The original interval and the standardized interval are shown in the following table. In this example, x min =0,x max =1000000,

[0053] Original interval Points Left closed and right open interval (x) Normalized interval (y) No data 0 [0,1] [0,1] [0,50000] 10 [1,50001] [1,6] [50000,150000] 20 [50001,150001] [6,16] [150000,500000 30 [150001,500001] [16,51] [500000,+∞] 40 [500001,1000001] [51,101]

[0054] Note that the evaluation model has s fields. For each field f i,i=0,1,...,s, the record field has m rows, divided into j=0,1,...,m, the specific packaging encoding method is as follows:

[0055] For the packetization of the requested ciphertext, a field value a is first extracted, and the bits of a are represented by a i =(a>>i)&1,i∈[n]; each bit a i If packed into N slots of a ciphertext, field a will be packed into n ciphertexts in total. When the total data volume is X, the total number of ciphertexts is n*ceil(X / N), where the ceil() function rounds up.

[0056] For each interval of the model parameter field Take the value of the right endpoint make Then for b i Encoding: First extract the bit representation of b' i =1-(b>>i)&1,i∈[n]; Similarly, n plaintexts complete the packing of a row interval of field b. Each field requires n*m plaintexts for packing. In addition, the score value of each interval of the field is packed with one plaintext respectively. Using this packing method, the total number of plaintexts encoded by the final model is s*m*(n+1). Using the SIMD characteristics of the BFV algorithm, this method can calculate the features of N data at the same time.

[0057] The above packaging form is mainly used in this scheme to perform ciphertext comparison operations on the field values ​​of the original data and the interval endpoint field values. For two n-bit values ​​a and b, each bit is first extracted and BFV encrypted separately:

[0058] a i =(a>>i)&1,i∈[n]

[0059] b′ i =1-(b>>i)&1,i∈[n]

[0060] Define the ciphertext comparison scheme:

[0061] c=CMP({Enc(a 0 ),Enc(a 1 ),...,Enc(a n-1 )},{b′ 0 ,b′ 1 ,...,b′ n-1},n)

[0062] For i∈{1,2,...,n}, calculate

[0063]

[0064] for Calculate in sequence

[0065]

[0066] The calculation result

[0067]

[0068] Among them: CMP is the ciphertext comparison operator, Enc is homomorphic encryption, is the ciphertext addition, is the ciphertext subtraction, ⊙ is the ciphertext multiplication;

[0069] Based on the ciphertext comparison algorithm, the score calculation for each field value can be realized. The score calculation scheme for a single field is as follows:

[0070] For a single field f i , the ciphertext of the request data is {a 0 ,a 1 ,...,a n-1}, the model parameter plaintext of each interval is {b' 0 ,b' 1 ,...,b' n-1}. First, perform a ciphertext comparison operation to obtain the intermediate result c of the comparison. j :

[0071] c j =CMP({Enc(a 0 ),Enc(a 1 ),...,Enc(a n-1 )},{b′ 0 ,b′ 1 ,...,b′ n-1},n),j∈[m]

[0072] The intermediate result ciphertext is accumulated and summed, the score value of the field is calculated, and the result y on the field is obtained. i :

[0073]

[0074] Sum up the ciphertext score values ​​calculated by all features to get the final ciphertext calculation result;

[0075]

[0076] Solution performance indicators

[0077] Test server environment: Intel(R)Xeon(R)Gold 6226R CPU@2.90GHz

[0078]

[0079] The embodiments of the present invention disclose preferred embodiments, but are not limited thereto. A person skilled in the art can easily understand the spirit of the present invention based on the above embodiments and make different extensions and changes. However, as long as they do not deviate from the spirit of the present invention, they are all within the protection scope of the present invention.

Claims

1. A method for constructing a scoring model for accurately reaching enterprises based on homomorphic encryption, characterized in that: The method comprises the following steps: S1: Model interval standardization: For each feature f:(f max ,f min ], set a maximum value x according to the actual situation max , minimum value x min , offset offset and scaling scale, the original data is set to x, first convert the original interval into a left closed and right open interval, obtain the x' value on the left closed and right open interval, and then perform normalization operation to obtain the normalized interval [y0,y1), the formula is, where the function floor(x) is rounded down; x′=min(max(x,x min ),x max ) y=floor((x′-offset) / scale) S2: Package encoding of model and ciphertext: Note that the evaluation model has s fields, and for each field f i ,i=0,1,...,s, the record field has m rows, divided into Then the model and ciphertext are packaged and encoded; S3: Ciphertext comparison calculation: The packaging form of step S2 above is adopted, which is mainly used to perform ciphertext comparison operations on the field values ​​of the original data and the field values ​​of the interval endpoints. For two n-bit values ​​a and b, each bit is first extracted and BFV encryption is performed separately: a i =(a>>i)&1,i∈[n] b′ i =1-(b>>i)&1,i∈[n] S4: Model score calculation: Based on the ciphertext comparison algorithm, the score calculation of each field value is implemented.

2. According to claim 1, a method for constructing a scoring model for accurately reaching enterprises based on homomorphic encryption is characterized in that: The step of packaging and encoding in the above step S2 includes: S2.1: For a requested ciphertext packet, a field value a is first extracted to represent a bit i =(a>>i)&1,i∈[n]; each bit a i If packed into N slots of a ciphertext, field a will be packed into n ciphertexts in total. When the total data volume is X, the total number of ciphertexts is n*ceil(X / N), where the ceil() function rounds up. S2.2: For each interval of the model parameter field Take the value of the right endpoint make Then for b i Encoding: First extract the bit representation of b' i =1-(b>>i)&1,i∈[n]; Similarly, n plaintexts complete the packing of a row interval of field b. Each field requires a total of n*m plaintexts for packing, and the score value of each interval of the field is packed with one plaintext respectively. The total number of plaintexts encoded by the final model is s*m*(n+1).

3. According to claim 1, a method for constructing a scoring model for accurately reaching enterprises based on homomorphic encryption is characterized in that: The ciphertext comparison scheme defined in the above step S3 is: c=CMP({Enc(a0),Enc(a1),...,Enc(a n-1 )},{b0,b1,...,b n-1 },n) For i∈{1,2,...,n}, calculate for Calculate in sequence The calculation result Among them: CMP is the ciphertext comparison operator, Enc is homomorphic encryption, is the ciphertext addition, is the ciphertext subtraction, ⊙ is the ciphertext multiplication.

4. According to claim 1, a method for constructing a scoring model for accurately reaching enterprises based on homomorphic encryption is characterized in that: The scoring calculation scheme for a single field in step S4 above is: For a single field f i , the ciphertext of the request data is {a0,a1,...,a n-1 }, the model parameters in each interval are {b'0,b'1,...,b' n-1 }, first perform a ciphertext comparison operation to obtain the intermediate result c of the comparison j : c j =CMP({Enc(a0),Enc(a1),...,Enc(a n-1 )},{b'0,b'1,...,b' n-1 },n),j∈[m] The intermediate result ciphertext is accumulated and summed, the score value of the field is calculated, and the result y on the field is obtained. i : Sum up the ciphertext score values ​​calculated by all features to get the final ciphertext calculation result:

5. According to claim 1, a method for constructing a scoring model for accurately reaching enterprises based on homomorphic encryption is characterized in that: It also includes a homomorphic encryption scheme based on the RLWE problem, and its encryption function Enc(x) is defined as: Enc(x) = g·a+e+x·q Among them: g is the private key, a is a randomly selected polynomial, e is the noise polynomial, and q is the modulus to ensure the privacy and security of data during the entire calculation process.

6. According to claim 3, a method for constructing a scoring model for accurately reaching enterprises based on homomorphic encryption is characterized in that: It also includes using preset verification rules to determine whether the ciphertext comparison results are logical. If not, timely backtracking and adjusting the corresponding ciphertext data will be carried out to prevent erroneous results from flowing into the subsequent scoring calculation process, thereby improving the accuracy and reliability of the entire calculation process.

7. According to claim 2, a method for constructing a scoring model for accurately reaching enterprises based on homomorphic encryption is characterized in that: It also includes that when there are multiple data sources, each data source is divided into intervals and packaged and encoded according to its own data characteristics, and then the packaged model parameter fields corresponding to each data source are fused and aligned to ensure that data from different sources can still follow the unified ciphertext model calculation rules after fusion, thereby achieving accurate model calculation of the fused data that meets privacy requirements.

8. According to claim 5, a method for constructing a scoring model for accurately reaching enterprises based on homomorphic encryption is characterized in that: Based on the characteristics of RLWE homomorphic encryption to ensure data privacy and security, a distributed homomorphic encryption computing architecture is built when processing large-scale data.