Privacy-preserving sequence NJ tree construction method and system based on multi-party secure computing

By adopting a privacy protection method with multi-party security computing in the construction of NJ tree, the problem of gene sequence leakage in traditional NJ tree construction is solved, and the privacy protection and security of gene sequences are improved.

CN115102693BActive Publication Date: 2025-03-11TSINGHUA UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210565096.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-23
Publication Date
2025-03-11
Estimated Expiration
2042-05-23

AI Technical Summary

Technical Problem

It is difficult to ensure the safety and privacy of gene sequences during the construction of traditional NJ trees, which can easily lead to the leakage of gene information.

Method used

The NJ tree construction method of privacy protection sequence based on multi-party security calculations is adopted, and the first participant and the second participant calculate part of the results of the distance matrix under plain text conditions, and the calculation results are shared with each other through a secret sharing agreement to ensure the privacy protection of the gene sequence.

Benefits of technology

It effectively avoids the leakage of gene sequences, improves the security of the NJ tree construction process, and ensures the privacy protection of gene sequences.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115102693B_ABST
    Figure CN115102693B_ABST
Patent Text Reader

Abstract

The present invention provides a privacy protection sequence NJ tree construction method and system based on multi-party secure computing, including: based on the aligned gene sequence, the first participant and the second participant calculate the corresponding part of the sequence held by each party in the distance matrix under the plain text condition; after the first participant and the second participant complete the calculation, the calculation result is shared with the other party through a secret sharing protocol; according to the result of the secret sharing of both parties, the first participant and the second participant jointly calculate the remaining part of the distance matrix under the original aligned sequence secret sharing condition, and output the distance matrix calculation share to each party through the secret sharing protocol; through the obtained distance matrix calculation result, the NJ tree is constructed under the condition that both parties only hold the share matrix of the distance matrix. The present invention solves the problem that the gene sequence is easily leaked in the existing NJ tree construction process, so as to realize the privacy protection of the gene sequence in the NJ tree construction process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of genetic engineering technology, and in particular to a method and system for constructing a privacy-preserving sequence NJ tree based on multi-party secure computing. Background Art

[0002] In genetic engineering, faced with numerous gene sequences, it is necessary to observe the correlation, similarity and other information between base sequences, and only after comparison can a more in-depth study be conducted. Currently, in order to compare the correlation of base sequences, the similarity analysis is generally completed by establishing an NJ tree.

[0003] The construction process of the NJ tree is: first assume an unrooted star-shaped tree, then compare two by two, cluster the closely related ones into aggregated taxa, and then treat the aggregated taxa as a whole and aggregate and classify them with others, and repeat this process until a complete NJ tree is constructed. However, in the traditional process of constructing the NJ tree, it is all done under plain text conditions, which makes it difficult to ensure the security and privacy of the gene sequence, and it is easy to cause genetic information leakage, leading to serious consequences. Summary of the invention

[0004] The present invention provides a privacy-preserving sequence NJ tree construction method and system based on multi-party secure computing, which is used to solve the problem of gene sequence leakage that is prone to occur in the existing NJ tree construction process, so as to achieve privacy protection of gene sequences in the NJ tree construction process.

[0005] The present invention provides a privacy-preserving sequence NJ tree construction method based on multi-party secure computing, comprising:

[0006] Based on the aligned gene sequences, the first participant and the second participant calculate the corresponding parts of the sequences held by each party in the distance matrix under plain text conditions;

[0007] After the first and second participants have completed the calculation, they share the calculation results with each other through a secret sharing protocol;

[0008] According to the result of the secret sharing between the two parties, the first participant and the second participant jointly calculate the remaining part of the distance matrix under the original alignment sequence secret sharing condition, and output the distance matrix calculation share to each party through the secret sharing protocol;

[0009] Based on the distance matrix calculation results, the NJ tree is constructed under the condition that both parties only hold the share matrix of the distance matrix.

[0010] According to the privacy protection sequence NJ tree construction method based on multi-party secure computing provided by the present invention, based on the aligned gene sequence, the first participant and the second participant calculate the corresponding part of the sequence held by each party in the distance matrix under plain text conditions, specifically including:

[0011] The first participant calculates the scores of the distance matrix corresponding to the m sequences it owns under plain text conditions;

[0012] The second participant calculates the scores of the distance matrix corresponding to the n sequences it owns under plain text conditions;

[0013] After the first and second parties complete their individual calculations, they send their calculation results to each other through a secret sharing protocol.

[0014] According to the privacy protection sequence NJ tree construction method based on multi-party secure computing provided by the present invention, after the first participant and the second participant complete the calculation, the calculation result is shared with the other party through a secret sharing protocol, specifically including:

[0015] In the integer secret sharing process, the first participant generates a first random number and sends the first random number to the second participant, and retains the remaining part of the sequence after deducting the first random number;

[0016] The second participant generates a second random number, sends the second random number to the first participant, and retains the remaining part of the sequence after deducting the second random number.

[0017] According to the privacy protection sequence NJ tree construction method based on multi-party secure computing provided by the present invention, according to the result of secret sharing between the two parties, the first participant and the second participant jointly calculate the remaining part of the distance matrix under the original alignment sequence secret sharing condition, and output the distance matrix calculation share to each party through the secret sharing protocol, specifically including:

[0018] After the first and second participants jointly calculate the remaining part of the distance matrix, they output the secret share of the overall distance matrix to each party. 15 Take the product and express it as a decimal.

[0019] According to the privacy-preserving sequence NJ tree construction method based on multi-party secure computing provided by the present invention, the NJ tree construction is performed based on the obtained distance matrix calculation result under the condition that both parties only hold the share matrix of the distance matrix, specifically including:

[0020] The two parties calculate the horizontal difference matrix under the condition of the share matrix, and the horizontal difference matrix can be obtained by standardizing the overall distance matrix. The calculation result of the horizontal difference matrix is ​​also output to each party in the form of secret shares;

[0021] Both parties calculate and select the two nodes with the smallest distance under the condition that they only hold the shares of the horizontal difference matrix;

[0022] Connect two nodes to generate a new node, and update the distance from the new node to other unconnected nodes;

[0023] Repeat the above steps. Both parties continuously connect and merge the original nodes with new nodes and update the distance under the condition of secret sharing. Only when all nodes are connected together, the NJ tree construction is completed.

[0024] According to the privacy-preserving sequence NJ tree construction method based on multi-party secure computing provided by the present invention, the two nodes are connected to a new node and the distance is updated. Specifically, it includes:

[0025] The selected nodes are f,g, f,g are connected to the new node u, then the distance calculation formula from f,g to the new node u is:

[0026]

[0027] δ(g,u)=d(f,g)-δ(f,u).

[0028] The present invention also provides a privacy-preserving sequence NJ tree construction system based on multi-party secure computing, the system comprising:

[0029] A distance matrix calculation module is used for the first participant and the second participant to calculate the corresponding parts of the sequences held by each party in the distance matrix under plain text conditions based on the aligned gene sequences;

[0030] A sharing module is used to share the calculation results with the other party through a secret sharing protocol after the first party and the second party complete the calculation;

[0031] A joint calculation module, in which the first participant and the second participant jointly calculate the remaining part of the distance matrix under the original alignment sequence secret sharing condition according to the result of the secret sharing between the two parties, and output the distance matrix calculation share to each party through the secret sharing protocol;

[0032] The NJ tree construction module constructs the NJ tree based on the distance matrix calculation results obtained, under the condition that both parties only hold the share matrix of the distance matrix.

[0033] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for constructing a privacy-preserving sequence NJ tree based on multi-party secure computing as described in any one of the above is implemented.

[0034] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method for constructing a privacy-preserving sequence NJ tree based on multi-party secure computing as described in any one of the above is implemented.

[0035] The present invention also provides a computer program product, including a computer program, which, when executed by a processor, implements any of the above-mentioned privacy-preserving sequence NJ tree construction methods based on multi-party secure computing.

[0036] The privacy-preserving sequence NJ tree construction method and system based on multi-party secure computing provided by the present invention calculates the self-sustaining part of the distance matrix of each party after the gene sequences of the first participant and the second participant are aligned, and shares the calculation result with the other party through secret sharing to avoid the leakage of the gene sequence, and then jointly calculates the remaining part of the distance matrix, performs cyclic calculation, and selects the shortest distance to construct the NJ tree. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0038] Figure 1 It is a flow chart of a privacy-preserving sequence NJ tree construction method based on multi-party secure computing provided by the present invention;

[0039] Figure 2 It is a module connection diagram of the privacy-preserving sequence NJ tree construction system based on multi-party secure computing provided by the present invention;

[0040] Figure 3 It is a structural schematic diagram of the electronic device provided by the present invention.

[0041] Reference numerals:

[0042] 110: distance matrix calculation module; 120: sharing module; 130: joint calculation module; 140: NJ tree construction module; 310: processor; 320: communication interface; 330: memory; 340: communication bus. DETAILED DESCRIPTION

[0043] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are 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 creative work are within the scope of protection of the present invention.

[0044] Combine the following Figure 1A privacy-preserving sequence NJ tree construction method based on multi-party secure computing of the present invention is described, comprising:

[0045] S100, based on the aligned gene sequences, the first participant and the second participant calculate the corresponding parts of the sequences held by each party in the distance matrix under plain text conditions;

[0046] S200, after the first participant and the second participant complete the calculation, they share the calculation results with each other through a secret sharing protocol;

[0047] S300, according to the result of secret sharing between the two parties, the first participant and the second participant jointly calculate the remaining part of the distance matrix under the original alignment sequence secret sharing condition, and output the distance matrix calculation share to each party through the secret sharing protocol;

[0048] S400. Based on the obtained distance matrix calculation result, an NJ tree is constructed under the condition that both parties only hold the share matrix of the distance matrix.

[0049] Since the first and second parties secretly share the calculation results with each other after calculating the distance matrix and then perform joint calculations, it is ensured that the gene sequence will not be leaked, thereby improving the security of the NJ tree construction process.

[0050] Based on the aligned gene sequences, the first participant and the second participant calculate the corresponding parts of the sequences held by each party in the distance matrix under plain text conditions, specifically including:

[0051] Assuming that the first participant has m sequences and the second participant has n sequences, the distance matrix D that needs to be jointly calculated is a (m+n)×(m+n)-dimensional matrix, and the distance matrix D is a symmetric matrix with all diagonal elements 0. Therefore, we only need to calculate the distance matrix element value;

[0052] The first participant calculates the score of the distance matrix D corresponding to the m sequences it has under plain text conditions. It needs to calculate the corresponding The value of the element;

[0053] The second participant calculates the score of the distance matrix D corresponding to the n sequences it owns under plain text conditions. It needs to calculate the corresponding The value of the element;

[0054] After the first and second parties complete their individual calculations, they send their calculation results to each other through a secret sharing protocol.

[0055] The first participant calculates the distance matrix of the m sequences he owns;

[0056] For i=0,…,seq_num_m-1:

[0057] For j=i+1,…,seq_num_m-1:

[0058] For k = 0, ..., seq_length - 1:

[0059] The calculation results are secretly shared with the second party;

[0060] The second participant calculates the distance matrix of the n sequences he owns;

[0061] For i = seq_num_m, ..., seq_num-1:

[0062] For j=i+1,…,seq_num-1:

[0063] For k = 0, ..., seq_length - 1:

[0064] The calculation result is secretly shared with the first party;

[0065] After the first and second participants have completed the calculation, they will share the calculation results with each other through a secret sharing protocol, including:

[0066] In the integer secret sharing process, the first participant generates a first random number and sends the first random number to the second participant, and retains the remaining part of the sequence after deducting the first random number;

[0067] The second participant generates a second random number, sends the second random number to the first participant, and retains the remaining part of the sequence after deducting the second random number.

[0068] The first participant and the second participant jointly calculate the remaining part of the distance matrix.

[0069] For i=0,…,seq_num_m-1:

[0070] For j = seq_num_m, ..., seq_num-1:

[0071] For k = 0, ..., seq_length - 1:

[0072]

[0073] This part of the result is already in the form of secret sharing.

[0074] Basic algorithms related to secret sharing, including:

[0075] The first party Algorithm for secret sharing:

[0076] enter:

[0077] Output:

[0078] The first party calculates a random number And send r to the second party;

[0079] The first participant sets a0 to ar, and the second participant sets a1 to r.

[0080] Secret recovery algorithm:

[0081] enter:

[0082] Output:

[0083] The first participant sends a0 to the second participant, and the second participant sends a1 to the first participant;

[0084] The first participant and the second participant respectively calculate a=a0+a1.

[0085] addition:

[0086] enter:

[0087]

[0088] Output: <c>Satisfies c=a+b

[0089] The first participant calculates c0=a0+b0;

[0090] The second participant calculates c1=a1+b1.

[0091] The algorithm is denoted as +

[0092] Addition with a common value:

[0093] enter:

[0094] Output: <c>Satisfies c=a+b

[0095] The first participant calculates c0=a0+b;

[0096] The second participant calculates c1=a1.

[0097] The algorithm is denoted as< / c> +b

[0098] Multiplication with a common value:

[0099] enter:

[0100] Output: <c>Satisfies c=a*b

[0101] The first participant calculates c0=a0*b;

[0102] The second participant calculates c1=a1*b.

[0103] The algorithm is denoted as< / c> *b, b can be a decimal. When b is a decimal, the output <c>The true value that satisfies c=a*b minus the decimal part.

[0104] According to the result of the secret sharing between the two parties, the first party and the second party jointly calculate the remaining part of the distance matrix D under the original alignment sequence secret sharing condition, and output the distance matrix calculation share to each party through the secret sharing protocol, specifically including:

[0105] After the first participant and the second participant jointly calculate the remaining m×n elements in the distance matrix D, they output the secret share of the overall distance matrix to both parties and output the overall distance matrix. 15 To do the product, we can use multiplication with a common value, which means that we use the last 15 bits of the 128 bits to represent the decimal part, perform decimal representation, and improve calculation accuracy.

[0106] In the distance matrix calculation process, the __int128_t data type in C++ is used to represent The length of the data type is 128 bits. The range is -2 127 ~2 127 -1.

[0107] The basic variables are as follows:

[0108]

[0109] The data (seq_data) is stored in an array of length seq_length*seq_num and type __int128_t. The k-th nucleotide of the i-th nucleic acid sequence is represented by the i*seq_length+k-th element in the array seq_data, i=0,1,…,seq_num; k=0,1,…,seq_length-1, recorded as seq_data[i*seq_length+k].

[0110] During the data loading phase, the original sequence is encoded and the symbols are encoded as The corresponding relationship between the original sequence symbols and the codewords is as follows:

[0111] symbol coding A 0 G 1 C 2 T 3 N 4 - 5

[0112] The nucleic acid sequences are numbered as follows: the sequences of the first participant are numbered 0, ..., seq_num_m-1, and the sequences of the second participant are numbered seq_num_m, ..., seq_num-1

[0113] Check for equality:

[0114] This algorithm can determine whether two nucleotides are equal. If they are equal, the output is e=0, otherwise e=1. Use a[i] to represent the i-th bit in binary, and a[0] is the lowest bit. You can use the >> operator and the & operator in C++ to extract the binary digits, for example, use ((x)>>(y)&1) to extract the y-th bit of x.

[0115] enter:

[0116] Output:

[0117] a) Calculate and output not(a[2]or b[2]or a=b).

[0118] Check for equality:

[0119] This algorithm can determine whether two nucleotides are equal. In this case, the two nucleotides belong to different users. If they are equal, output <e>, e=0, otherwise output <e>, e=1.

[0120] enter: The first participant inputs Second Party Input

[0121] Output: <e>

[0122] a) For i = 0,…,7

[0123] First-party computing

[0124] b) The first participant selects a random number Call 1-out-of-8 OT with input (s[0]+r,…,s[7]+r) and set e0 to -r;

[0125] c) The second participant calls 1-out-of-8 OT with input b and sets the result to e1.

[0126] Based on the distance matrix calculation results, NJ tree construction is performed under the condition that both parties only hold the share matrix of the distance matrix, including:

[0127] The two parties calculate the horizontal difference matrix under the condition of the share matrix, and the horizontal difference matrix can be obtained by standardizing the overall distance matrix. The calculation result of the horizontal difference matrix is ​​also output to each party in the form of secret shares;

[0128] Both parties calculate and select the two nodes with the smallest distance under the condition that they only hold the shares of the horizontal difference matrix;

[0129] Connect two nodes to generate a new node, and update the distance from the new node to other unconnected nodes;

[0130] Repeat the above steps. Both parties continuously connect and merge the original nodes with new nodes and update the distance under the condition of secret sharing. Only when all nodes are connected together, the NJ tree construction is completed.

[0131] When calculating the horizontal difference matrix, the horizontal difference matrix is ​​also called the Q matrix. The calculation formula of the Q matrix is:

[0132] For i = 0, ..., seq_num-1, j = i+1, ..., seq_num-1

[0133]

[0134] Where n is the number of sequences, seq_num. This part of the operation only involves addition and multiplication with a public value, so in the form of secret sharing, the input is<d(i,j)> , it can be calculated<Q(i,j)> .

[0135] Select two nodes and determine the minimum distance between the two nodes. The specific process is:

[0136] Calculate i0,j0 so that

[0137] Q(i0,j0)=min{Q(i,j),i=0,…,seq_num-1,j=i+1,…,seq_num-1}

[0138] Then select the nodes with serial numbers i0 and j0.

[0139] Let the number of elements involved in the comparison be n, then the algorithm for selecting the sequence number of the smallest element from the n secret shared elements is as follows:

[0140] enter:<a[0]> ,<a[1]> ,…,<a[n-1]>

[0141] Output: i satisfies a[i]=min{a[j],j=0,…,n-1}

[0142] a) Let z = 0

[0143] b) For i=1,…,n-1:

[0144] i. Calculation<DReLU(a[i]-a[z])> B And make it public, and get DReLU(a[i]-a[z])

[0145] If DReLU(a[i]-a[z])=0, update z=i

[0146] Connect two nodes to the new node and update the distance. The specific process is:

[0147] If the selected nodes are f,g, and f,g are connected to the new node u, the distance from f,g to the new node u can be calculated using the following formula:

[0148]

[0149] δ(g,u)=d(f,g)-δ(f,u)

[0150] This part of the operation only involves addition and multiplication with a common value, so the input<d(i,j)> , we can calculate >δ(f,u)> and <δ(g,u)>.

[0151] The distance from other nodes k to the new node u is calculated using the following formula:

[0152]

[0153] This part of the operation only involves addition and multiplication with a common value, so the input is<d(i,j)> , <δ(u,k)> can be calculated.

[0154] Repeat the above steps, replace the merged node pair f, g with the new node u, and build the NJ tree based on the calculated shortest distance.

[0155] The privacy-preserving sequence NJ tree construction method based on multi-party secure computing provided by the present invention calculates the self-sustaining part of the distance matrix of each party after the gene sequences of the first participant and the second participant are aligned, and shares the calculation result with the other party through secret sharing to avoid the leakage of the gene sequence, and then jointly calculates the remaining part of the distance matrix, performs cyclic calculation, and selects the shortest distance to construct the NJ tree.

[0156] refer to< / e> < / e> < / e> < / c> Figure 2 The present invention also discloses a privacy-preserving sequence NJ tree construction system based on multi-party secure computing, the system comprising:

[0157] The distance matrix calculation module 110 is used for the first participant and the second participant to calculate the corresponding parts of the sequences held by each party in the distance matrix under plain text conditions based on the aligned gene sequences;

[0158] Sharing module 120, used for sharing the calculation results with the other party through a secret sharing protocol after the first party and the second party complete the calculation;

[0159] The joint calculation module 130, according to the result of the secret sharing between the two parties, the first participant and the second participant jointly calculate the remaining part of the distance matrix under the original alignment sequence secret sharing condition, and output the distance matrix calculation share to each party through the secret sharing protocol;

[0160] The NJ tree construction module 140 constructs the NJ tree based on the obtained distance matrix calculation result under the condition that both parties only hold the share matrix of the distance matrix.

[0161] A distance matrix calculation module 110 calculates the scores of the distance matrices corresponding to the m sequences owned by the first participant under plain text conditions;

[0162] The second participant calculates the scores of the distance matrix corresponding to the n sequences it owns under plain text conditions;

[0163] After the first and second parties complete their individual calculations, they send their calculation results to each other through a secret sharing protocol.

[0164] Sharing module 120 During the secret sharing process, the first participant calculates the distance matrix of the m sequences that it owns;

[0165] For i=0,…,seq_num_m-1:

[0166] For j=i+1,…,seq_num_m-1:

[0167] For k = 0, ..., seq_length - 1:

[0168] The calculation results are secretly shared with the second party;

[0169] The second participant calculates the distance matrix of the n sequences he owns;

[0170] For i = seq_num_m, ..., seq_num-1:

[0171] For j=i+1,…,seq_num-1:

[0172] For k = 0, ..., seq_length - 1:

[0173] The calculation result is secretly shared with the first party;

[0174] After the first and second participants have completed the calculation, they will share the calculation results with each other through a secret sharing protocol, including:

[0175] In the integer secret sharing process, the first participant generates a first random number and sends the first random number to the second participant, and retains the remaining part of the sequence after deducting the first random number;

[0176] The second participant generates a second random number, sends the second random number to the first participant, and retains the remaining part of the sequence after deducting the second random number.

[0177] The first participant and the second participant jointly calculate the remaining part of the distance matrix.

[0178] For i=0,…,seq_num_m-1:

[0179] For j = seq_num_m, ..., seq_num-1:

[0180] For k = 0, ..., seq_length - 1:

[0181]

[0182] This part of the result is already in the form of secret sharing.

[0183] The privacy security of the gene sequences of the first and second parties in the process of constructing the NJ tree is achieved through secret sharing.

[0184] In the joint calculation module, the first participant generates a first random number, sends the first random number to the second participant, and retains the remaining part of the sequence after deducting the first random number;

[0185] The second participant generates a second random number, sends the second random number to the first participant, and retains the remaining part of the sequence after deducting the second random number.

[0186] Based on the distance matrix calculation results, NJ tree construction is performed under the condition that both parties only hold the share matrix of the distance matrix, including:

[0187] The two parties calculate the horizontal difference matrix under the condition of the share matrix, and the horizontal difference matrix can be obtained by standardizing the overall distance matrix. The calculation result of the horizontal difference matrix is ​​also output to each party in the form of secret shares;

[0188] Both parties calculate and select the two nodes with the smallest distance under the condition that they only hold the horizontal difference matrix share;

[0189] Connect two nodes to generate a new node, and update the distance from the new node to other unconnected nodes;

[0190] Repeat the above steps. Both parties continuously connect and merge the original nodes with new nodes and update the distance under the condition of secret sharing. Only when all nodes are connected together, the NJ tree construction is completed.

[0191] When calculating the horizontal difference matrix, the horizontal difference matrix is ​​also called the Q matrix. The calculation formula of the Q matrix is:

[0192] For i = 0, ..., seq_num-1, j = i+1, ..., seq_num-1

[0193]

[0194] Where n is the number of sequences, seq_num. This part of the operation only involves addition and multiplication with a public value, so in the form of secret sharing, the input is<d(i,j)> , it can be calculated<Q(i,j)> .

[0195] Select two nodes and determine the minimum distance between the two nodes. The specific process is:

[0196] Calculate i0,j0 so that

[0197] Q(i0,j0)=min{Q(i,j),i=0,…,seq_num-1,j=i+1,…,seq_num-1}

[0198] Then select the nodes with serial numbers i0 and j0.

[0199] Let the number of elements involved in the comparison be n, then the algorithm for selecting the sequence number of the smallest element from the n secret shared elements is as follows:

[0200] enter:<a[0]> ,<a[1]> ,…,<a[n-1]>

[0201] Output: i satisfies a[i]=min{a[j],j=0,…,n-1}

[0202] c) Let z = 0

[0203] d) For i=1,…,n-1:

[0204] ii. Calculation<DReLU(a[i]-a[z])> B And make it public, and get DReLU(a[i]-a[z])

[0205] If DReLU(a[i]-a[z])=0, update z=i

[0206] Connect two nodes to the new node and update the distance. The specific process is:

[0207] If the selected nodes are f,g, and f,g are connected to the new node u, the distance from f,g to the new node u can be calculated using the following formula:

[0208]

[0209] δ(g,u)=d(f,g)-δ(f,u)

[0210] This part of the operation only involves addition and multiplication with a common value, so the input<d(i,j)> , <δ(f,u)> and <δ(g,u)> can be calculated.

[0211] The distance from other nodes k to the new node u is calculated using the following formula:

[0212]

[0213] This part of the operation only involves addition and multiplication with a common value, so the input is<d(i,j)> , <δ(u,k)> can be calculated.

[0214] Repeat the above steps, replace the merged node pair f, g with the new node u, and build the NJ tree based on the calculated shortest distance.

[0215] After the NJ tree is constructed, the correlation analysis and comparison between the two gene sequences is realized to determine whether they are close, and to assist in completing subsequent processing work.

[0216] Figure 3 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 3 As shown, the electronic device may include: a processor 310, a communication interface 320, a memory 330 and a communication bus 340, wherein the processor 310, the communication interface 320 and the memory 330 communicate with each other through the communication bus 340. The processor 310 may call the logic instructions in the memory 330 to execute the privacy protection sequence NJ tree construction method based on multi-party secure computing, the method comprising: based on the aligned gene sequence, the first participant and the second participant calculate the corresponding part of the sequence held by each party in the distance matrix under the plain text condition;

[0217] After the first and second participants have completed the calculation, they share the calculation results with each other through a secret sharing protocol;

[0218] According to the result of the secret sharing between the two parties, the first participant and the second participant jointly calculate the remaining part of the distance matrix under the original alignment sequence secret sharing condition, and output the distance matrix calculation share to each party through the secret sharing protocol;

[0219] Based on the distance matrix calculation results, the NJ tree is constructed under the condition that both parties only hold the share matrix of the distance matrix.

[0220] In addition, the logic instructions in the above-mentioned memory 330 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0221] On the other hand, the present invention further provides a computer program product, the computer program product includes a computer program, the computer program can be stored on a non-transitory computer-readable storage medium, when the computer program is executed by a processor, the computer can execute the privacy protection sequence NJ tree construction method based on multi-party secure computing provided by the above methods, the method includes: based on the aligned gene sequence, the first participant and the second participant calculate the corresponding part of the sequence held by each party in the distance matrix under plain text conditions;

[0222] After the first and second participants have completed the calculation, they share the calculation results with each other through a secret sharing protocol;

[0223] According to the result of the secret sharing between the two parties, the first participant and the second participant jointly calculate the remaining part of the distance matrix under the original alignment sequence secret sharing condition, and output the distance matrix calculation share to each party through the secret sharing protocol;

[0224] Based on the distance matrix calculation results, the NJ tree is constructed under the condition that both parties only hold the share matrix of the distance matrix.

[0225] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to execute the privacy-preserving sequence NJ tree construction method based on multi-party secure computing provided by the above methods, the method comprising: based on the aligned gene sequence, the first participant and the second participant calculate the corresponding part of the sequence held by each party in the distance matrix under plain text conditions;

[0226] After the first and second participants have completed the calculation, they share the calculation results with each other through a secret sharing protocol;

[0227] According to the result of the secret sharing between the two parties, the first participant and the second participant jointly calculate the remaining part of the distance matrix under the original alignment sequence secret sharing condition, and output the distance matrix calculation share to each party through the secret sharing protocol;

[0228] Based on the distance matrix calculation results, the NJ tree is constructed under the condition that both parties only hold the share matrix of the distance matrix.

[0229] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0230] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0231] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention. < / c>

Claims

1. A privacy-preserving sequence NJ tree construction method based on multi-party secure computing, characterized in that: include: Based on the aligned gene sequences, the first participant and the second participant calculate the corresponding parts of the sequences held by each party in the distance matrix under plain text conditions; After the first and second participants have completed the calculation, they share the calculation results with each other through a secret sharing protocol; According to the result of the secret sharing between the two parties, the first participant and the second participant jointly calculate the remaining part of the distance matrix under the original alignment sequence secret sharing condition, and output the distance matrix calculation share to each party through the secret sharing protocol; Based on the distance matrix calculation results, the NJ tree is constructed under the condition that both parties only hold the share matrix of the distance matrix; The distance matrix calculation result obtained is used to construct an NJ tree under the condition that both parties only hold the share matrix of the distance matrix, specifically including: The two parties calculate the horizontal difference matrix under the condition of the share matrix, and the horizontal difference matrix can be obtained by standardizing the overall distance matrix. The calculation result of the horizontal difference matrix is ​​also output to each party in the form of secret shares; Both parties calculate and select the two nodes with the smallest distance under the condition that they only hold the horizontal difference matrix share; Connect two nodes to generate a new node, and update the distance from the new node to other unconnected nodes; Repeat the above steps. Both parties continue to connect and merge the original nodes with new nodes and update the distance under the condition of secret sharing until all nodes are connected together, thus completing the NJ tree construction. The step of connecting two nodes to generate a new node and updating the distance between the new node and other unconnected nodes specifically includes: The selected nodes are , Connecting to a new node On, then To the new node The distance calculation formula is: ; in, is the distance from one node to another node on the constructed NJ tree; represents the distance between sequences, express sequence.

2. The privacy-preserving sequence NJ tree construction method based on multi-party secure computing according to claim 1 is characterized in that: Based on the aligned gene sequences, the first participant and the second participant calculate the corresponding parts of the sequences held by each of them in the distance matrix under plain text conditions, specifically including: The first participant calculates the scores of the distance matrix corresponding to the m sequences it owns under plain text conditions; The second participant calculates the scores of the distance matrix corresponding to the n sequences it owns under plain text conditions; After the first and second parties complete their individual calculations, they send their shares of the calculation results to each other through a secret sharing protocol.

3. The privacy-preserving sequence NJ tree construction method based on multi-party secure computing according to claim 1 is characterized in that: After the first participant and the second participant complete the calculation, the calculation results are shared with each other through a secret sharing protocol, specifically including: In the integer secret sharing process, the first participant generates a first random number and sends the first random number to the second participant, and retains the remaining part of the sequence after deducting the first random number; The second participant generates a second random number, sends the second random number to the first participant, and retains the remaining part of the sequence after deducting the second random number.

4. The privacy-preserving sequence NJ tree construction method based on multi-party secure computing according to claim 1 is characterized in that: According to the result of the secret sharing between the two parties, the first participant and the second participant jointly calculate the remaining part of the distance matrix under the original alignment sequence secret sharing condition, and output the distance matrix calculation share to each party through the secret sharing protocol, specifically including: After the first and second parties jointly calculate the remaining part of the distance matrix, they output the secret share of the overall distance matrix to each party. Take the product and express it as a decimal.

5. A privacy-preserving sequence NJ tree construction system based on multi-party secure computing, characterized in that: The system comprises: A distance matrix calculation module is used for the first participant and the second participant to calculate the corresponding parts of the sequences held by each party in the distance matrix under plain text conditions based on the aligned gene sequences; A sharing module is used to share the calculation results with the other party through a secret sharing protocol after the first party and the second party complete the calculation; A joint calculation module, in which the first participant and the second participant jointly calculate the remaining part of the distance matrix under the original alignment sequence secret sharing condition according to the result of the secret sharing between the two parties, and output the distance matrix calculation share to each party through the secret sharing protocol; The NJ tree construction module uses the distance matrix calculation results to construct the NJ tree under the condition that both parties only hold the share matrix of the distance matrix; The distance matrix calculation result obtained is used to construct an NJ tree under the condition that both parties only hold the share matrix of the distance matrix, specifically including: The two parties calculate the horizontal difference matrix under the condition of the share matrix, and the horizontal difference matrix can be obtained by standardizing the overall distance matrix. The calculation result of the horizontal difference matrix is ​​also output to each party in the form of secret shares; Both parties calculate and select the two nodes with the smallest distance under the condition that they only hold the horizontal difference matrix share; Connect two nodes to generate a new node, and update the distance from the new node to other unconnected nodes; Repeat the above steps. Both parties continue to connect and merge the original nodes with new nodes and update the distance under the condition of secret sharing until all nodes are connected together, thus completing the NJ tree construction. The step of connecting two nodes to generate a new node and updating the distance between the new node and other unconnected nodes specifically includes: The selected nodes are , Connecting to a new node On, then To the new node The distance calculation formula is: ; in, is the distance from one node to another node on the constructed NJ tree; represents the distance between sequences, express sequence.

6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the privacy-preserving sequence NJ tree construction method based on multi-party secure computing as described in any one of claims 1 to 4 is implemented.

7. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for constructing a privacy-preserving sequence NJ tree based on multi-party secure computing as described in any one of claims 1 to 4 is implemented.

8. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method for constructing a privacy-preserving sequence NJ tree based on multi-party secure computing as described in any one of claims 1 to 4 is implemented.