FSS-based security negative index protocol and security mode calculation method

Through the FSS-based security negative index protocol and security mode calculation method, the existing privacy protection clustering method has solved the problems of high computational complexity and high privacy protection cost, and efficient and secure clustering analysis is achieved, supporting multiple data owners and resisting attacks.

CN120017265APending Publication Date: 2025-05-16JOINT WARFARE COLLEGE NAT DEFENSE UNIV OF THE CHINESE PEOPLES LIBERATION ARMY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510205373.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-24
Publication Date
2025-05-16

AI Technical Summary

Technical Problem

Existing privacy protection clustering methods, especially mean drift algorithms, have high computational complexity and depend on high-cost fully homomorphic encryption, and only support a single data owner.

Method used

The security negative index protocol and security mode calculation method are adopted based on FSS. By dividing the domain of the security negative index protocol into intervals, approximate the negative index function using a quadratic polynomial, and determining the interval to which the input data belongs through a distributed comparison function, secretly shared Gaussian kernel weights are generated, and the mean drift vector calculation is performed, and the pattern list is finally generated.

Benefits of technology

Reduces computational complexity and communication overhead, meets strict privacy compliance requirements, supports multiple data owners, and defends against output-based inference attacks through virtual mode insertion technology.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120017265A_ABST
    Figure CN120017265A_ABST
Patent Text Reader

Abstract

The invention relates to an FSS-based security negative index protocol and a security mode calculation method. The method comprises the following steps: dividing a definition domain of a security negative exponential protocol into a preset number of intervals, for each interval, adopting a quadratic polynomial approximation negative exponential function through a least square method, determining the interval to which input data belong by utilizing a distributed comparison function, and returning a secret sharing result of a corresponding polynomial, generating a secretly shared Gaussian kernel weight by adopting the security negative index protocol, performing mean shift vector calculation according to the Gaussian kernel weight to obtain a mean shift result, taking the mean shift result as the input of security mode calculation, iteratively updating a seed point until convergence according to the mean shift result, generating a mode list, and storing the mode list in the security mode. And calculating the distance between the candidate mode and the mode in the mode list, comparing the distance with a threshold value through a distributed comparison function, inserting the virtual mode or the candidate mode, and outputting a final mode list. By adopting the method, safe and low-overhead data transmission can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of data processing and privacy protection, and in particular to a security negative exponential protocol and a security mode calculation method based on FSS. Background Art

[0002] In data analysis and machine learning, clustering is a commonly used unsupervised learning method that can reveal hidden patterns and structures in data. However, cluster analysis often involves sensitive data, such as medical records, financial data, etc., and directly exposing this data may lead to privacy leakage. Most existing privacy-preserving clustering methods rely on homomorphic encryption or secret sharing techniques, but these methods often face challenges such as high computational overhead or reliance on auxiliary information.

[0003] The mean shift algorithm is a density-based clustering method that can adaptively determine the number of clusters and detect clusters of arbitrary shapes. However, the computational complexity of the mean shift algorithm is high, especially when running on large data sets, the computational overhead increases significantly. Existing privacy-preserving mean shift schemes rely on fully homomorphic encryption (FHE), which can protect data privacy but has a high computational cost and only supports a single data owner. Summary of the invention

[0004] Based on this, it is necessary to provide a FSS-based security negative exponent protocol and security mode calculation method to address the above technical issues.

[0005] A safety negative exponent protocol and a safety mode calculation method based on FSS, the method comprising:

[0006] Divide the domain of the secure negative exponential protocol into a preset number of intervals, and for each of the intervals, use a quadratic polynomial to approximate the negative exponential function through the least squares method, use a distributed comparison function to determine the interval to which the input data belongs, and return a secret sharing result of the corresponding polynomial;

[0007] The secure negative exponential protocol is used to generate Gaussian kernel weights of secret sharing, a mean shift vector is calculated according to the Gaussian kernel weights to obtain a mean shift result, and the mean shift result is used as an input for security mode calculation;

[0008] According to the mean shift result, the seed point is iteratively updated until convergence, a pattern list is generated, the distance between the candidate pattern and the pattern in the pattern list is calculated, the distance is compared with the threshold size through a distributed comparison function, a virtual pattern or a candidate pattern is inserted, and a final pattern list is output.

[0009] In one embodiment, the method further includes: dividing the input data x into a preset number of intervals; wherein dense interval division is adopted in the area where the gradient changes greatly, and sparse interval division is adopted in the area where the gradient changes gently;

[0010] For each of the intervals, a quadratic polynomial is used to approximate the negative exponential function e -x ; where the quadratic polynomial is expressed as:

[0011] nExp(x)=α i,2 x 2 +α i,1 x+α i,0

[0012] α i,2 , α i,1 and α i,0 It is obtained by querying the polynomial coefficient table calculated in advance by the least square method;

[0013] Use the distributed comparison function to determine the interval to which the input data x belongs, and return the secret sharing result of the corresponding polynomial;

[0014] When the input data x is hidden by a random mask, mask-hidden polynomial coefficients are generated.

[0015] In one embodiment, it also includes:

[0016] Determine the selection function as:

[0017]

[0018] Among them, a represents the virtual mode, d represents the candidate mode;

[0019] Using r in1 To hide x, use r in2 Hide the virtual mode a and the candidate mode d, and construct the offset function as:

[0020]

[0021] Compare thresholds using a distributed comparison function and threshold According to the comparison results, a virtual mode or a candidate mode is selected for insertion, and a final mode list is output.

[0022] In one embodiment, it also includes:

[0023] Offline stage:

[0024] A trusted third party generates a random vector r for each seed point f,j , and the random vector r f,j Secret sharing is rf,j,0 and r f,j,1 to edge servers s1 and s2, and generate the key k for the secure negative exponential protocol f,j,0 and k f,j,1 , and the random vector r f,j,0 and r f,j,1 , key k f,j,0 and k f,j,1 Send to edge server s1 and edge server s2;

[0025] Online stage:

[0026] Edge servers s1 and s2 randomly select m seed points from the shared data through a secure sampling protocol; for each selected seed point, edge servers s1 and s2 calculate the square distance between it and other points respectively;

[0027] According to the square distance, a Gaussian kernel is calculated using a safe negative exponential function to obtain a Gaussian kernel value, and a mean shift vector is calculated according to the Gaussian kernel value.

[0028] In one of the embodiments, the method further includes: updating the seed point position according to the mean shift result, determining that the seed point converges when the change of the seed point is lower than a specified threshold, and inserting the converged seed point into the pattern list.

[0029] In one of the embodiments, it further includes: an offline phase:

[0030] A trusted third party generates a random vector r for masking in1 and a random vector r in2 , and generate a key for the secure selection protocol, the random vector r in1 , random vector r in2 And the key is sent to edge server s1 and edge server s2;

[0031] Online stage:

[0032] Edge servers s1 and s2 create empty pattern lists;

[0033] For each candidate pattern, if the pattern list is empty, add the candidate pattern to the pattern list;

[0034] If the pattern list is not empty, the squared Euclidean distance between the current candidate pattern and the candidate patterns in the pattern list is calculated to obtain a distance matrix, the distance matrix is ​​summed to determine the minimum distance; the minimum distance and the current candidate pattern are masked, and the safe selection protocol is used to compare the masked minimum distance with the threshold. If the masked minimum distance exceeds the threshold, the current candidate pattern is inserted into the pattern list, otherwise, a virtual pattern is inserted. After all candidate patterns are processed, the pattern list is output;

[0035] Edge servers s1 and s2 create empty clustering label lists;

[0036] For each data point, calculate the squared Euclidean distance between it and each pattern in the pruned pattern list, and calculate the distance matrix. Sum the distance matrix and find the index corresponding to the minimum distance. Assign the label of the nearest pattern corresponding to the index to the current data point and output the clustering result in the form of secret sharing.

[0037] A safety negative exponent protocol and a safety mode calculation device based on FSS, the device comprising:

[0038] A secure negative exponential protocol module, used to divide the domain of the secure negative exponential protocol into a preset number of intervals, for each of the intervals, using a quadratic polynomial to approximate the negative exponential function through the least squares method, using a distributed comparison function to determine the interval to which the input data belongs, and returning a secret sharing result of the corresponding polynomial;

[0039] A mean shift module, used to generate Gaussian kernel weights of secret sharing using the secure negative exponential protocol, perform mean shift vector calculation according to the Gaussian kernel weights, obtain mean shift results, and use the mean shift results as input for security mode calculation;

[0040] The mode selection module is used to iteratively update the seed point according to the mean shift result until convergence, generate a mode list, calculate the distance between the candidate mode and the mode in the mode list, compare the distance with the threshold size through a distributed comparison function, insert a virtual mode or a candidate mode, and output a final mode list.

[0041] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0042] Divide the input data into a preset number of intervals, and for each of the intervals, use a quadratic polynomial to approximate a negative exponential function using a least squares method, use a distributed comparison function to determine the interval to which the input data belongs, and return a secret sharing result of the corresponding polynomial;

[0043] The secure negative exponential protocol is used to generate Gaussian kernel weights of secret sharing, a mean shift vector is calculated according to the Gaussian kernel weights to obtain a mean shift result, and the mean shift result is used as an input for security mode calculation;

[0044] According to the mean shift result, the seed point is iteratively updated until convergence, a pattern list is generated, the distance between the candidate pattern and the pattern in the pattern list is calculated, the distance is compared with the threshold size through a distributed comparison function, a virtual pattern or a candidate pattern is inserted, and a final pattern list is output.

[0045] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:

[0046] Divide the input data into a preset number of intervals, and for each of the intervals, use a quadratic polynomial to approximate a negative exponential function using a least squares method, use a distributed comparison function to determine the interval to which the input data belongs, and return a secret sharing result of the corresponding polynomial;

[0047] The secure negative exponential protocol is used to generate Gaussian kernel weights of secret sharing, a mean shift vector is calculated according to the Gaussian kernel weights to obtain a mean shift result, and the mean shift result is used as an input for security mode calculation;

[0048] According to the mean shift result, the seed point is iteratively updated until convergence, a pattern list is generated, the distance between the candidate pattern and the pattern in the pattern list is calculated, the distance is compared with the threshold size through a distributed comparison function, a virtual pattern or a candidate pattern is inserted, and a final pattern list is output.

[0049] The above-mentioned secure negative exponential protocol and secure mode calculation method based on FSS, firstly, utilizes function secret sharing (FSS) and distributed comparison function (DCF) to process sensitive data in encrypted form throughout the process, ensuring that the original data, intermediate calculation results, and logical judgment conditions are invisible to the participants, meeting strict privacy compliance requirements. Secondly, by replacing traditional iterative calculations with piecewise polynomial approximation, high-complexity operations such as negative exponential functions are converted into table lookups and local calculations, combined with offline pre-generated keys and random numbers, the communication overhead in the online stage is greatly reduced while maintaining calculation accuracy. In addition, the scheme introduces virtual pattern insertion technology to randomly generate noise patterns that are unrelated to real data during the clustering process, effectively confusing the number of clusters and distribution characteristics, and resisting inference attacks based on output results. In terms of efficiency, the non-interactive design eliminates the need for real-time communication between servers throughout the calculation process. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 A schematic diagram of a process flow of a security negative exponent protocol and a security mode calculation method based on FSS in one embodiment;

[0051] Figure 2 A flowchart of a safety negative exponential protocol and a safety mode calculation device based on FSS in one embodiment;

[0052] Figure 3 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0053] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0054] The present invention is applied to the following application environment: The privacy-preserving mean shift clustering framework includes four types of entities as follows:

[0055] Data Owners:

[0056] We have sensitive data x, but cannot directly share the original data due to privacy constraints.

[0057] The data is divided into two secret sharing shares x0 and x1, and uploaded to two non-colluding edge servers s1 and s2 respectively.

[0058] Edge Servers (s1 and s2):

[0059] Receive the shared shares x0 and x1 from the data owner and collaborate to execute security protocols (such as security negative index calculation, mean shift iteration, etc.).

[0060] The original data or intermediate results cannot be inferred during the processing, ensuring privacy.

[0061] Trusted Dealer (T):

[0062] In the offline phase, random values ​​and Functional Secret Sharing (FSS) keys are generated and distributed to edge servers to support secure computations (such as comparison, multiplication, and other operations) in the online phase.

[0063] Data User (V):

[0064] The authorized party (which may be the data owner or other third party) reconstructs the complete clustering result by merging the result shares y0 and y1 returned by the edge server for subsequent analysis tasks.

[0065] 1. Data segmentation and uploading:

[0066] The data owner splits the original data x into x0 and x1, satisfying x0+x1=x.

[0067] x0 and x1 are uploaded to edge servers s1 and s2 respectively.

[0068] 2. Offline stage preparation:

[0069] The trusted third party generates a random mask and FSS key and distributes them to edge servers s1 and s2.

[0070] The security protocol in the online phase does not require additional key negotiation, thus reducing real-time communication overhead.

[0071] 3. Online secure computing:

[0072] Edge server s1 and edge server s2 collaborate to perform privacy-preserving computations (such as secure negative exponentiation, secure selection protocol, etc.) using pre-generated keys and masks.

[0073] 4. Result reconstruction and use:

[0074] The data user obtains the secret sharing shares y0 and y1 of the clustering results from the edge servers s1 and s2, and merges them to obtain the plaintext result y=y0+y1.

[0075] Users can only access the final cluster labels and cannot trace back to the original data or intermediate calculation processes.

[0076] 5. Privacy and security mechanisms

[0077] Data segmentation and secret sharing:

[0078] Single copies of shared data x0 and x1 do not contain complete information and require collaboration between both parties to restore, preventing single point leakage.

[0079] FSS and masking technology:

[0080] The calculation process is encrypted by FSS key and random mask to ensure that the intermediate results (such as kernel weights and mode positions) are always confidential.

[0081] Non-collusion assumption:

[0082] Edge servers s1 and s2 do not collude with each other, and neither server can independently infer valid information.

[0083] In one embodiment, if Figure 1 As shown, a security negative exponential protocol and a security mode calculation method based on FSS are provided, including the following steps:

[0084] Step 102, divide the domain of the secure negative exponential protocol into a preset number of intervals, for each interval, use a quadratic polynomial to approximate the negative exponential function through the least squares method, use a distributed comparison function to determine the interval to which the input data belongs, and return the secret sharing result of the corresponding polynomial.

[0085] Step 104, using the secure negative exponential protocol to generate Gaussian kernel weights for secret sharing, performing mean shift vector calculation based on the Gaussian kernel weights to obtain mean shift results, and using the mean shift results as input for security mode calculation.

[0086] Step 106, based on the mean shift result, iteratively update the seed point until convergence, generate a pattern list, calculate the distance between the candidate pattern and the pattern in the pattern list, compare the distance with the threshold size through a distributed comparison function, insert a virtual pattern or a candidate pattern, and output the final pattern list.

[0087] The above-mentioned FSS-based secure negative exponential protocol and secure mode calculation method, first, utilizes function secret sharing (FSS) and distributed comparison function (DCF) to process sensitive data in encrypted form throughout the process, ensuring that the original data, intermediate calculation results, and logical judgment conditions are invisible to the participants, meeting strict privacy compliance requirements. Secondly, by replacing traditional iterative calculations with piecewise polynomial approximation, high-complexity operations such as negative exponential functions are converted into table lookups and local calculations, combined with offline pre-generated keys and random numbers, the communication overhead in the online stage is greatly reduced while maintaining calculation accuracy. In addition, the scheme introduces virtual pattern insertion technology to randomly generate noise patterns that are unrelated to real data during the clustering process, effectively confusing the number of clusters and distribution characteristics, and resisting inference attacks based on output results. In terms of efficiency, the non-interactive design eliminates the need for real-time communication between servers throughout the calculation process.

[0088] In one embodiment, the secure negative exponential protocol based on piecewise polynomials and least squares method is:

[0089] The input data x is divided into a preset number of intervals; wherein, dense interval division is used in the area with large gradient changes, and sparse interval division is used in the area with gentle gradient changes. For each of the intervals, a quadratic polynomial is used to approximate the negative exponential function e -x ; where the quadratic polynomial is expressed as:

[0090] nExp(x)=α i,2 x 2 +α i,1 x+α i,0

[0091] α i,2 , α i,1 and α i,0 It is obtained by querying the polynomial coefficient table calculated in advance by the least squares method; using the distributed comparison function to determine the interval to which the input data x belongs, and returning the secret sharing result of the corresponding polynomial; when the input data x is hidden by a random mask, the mask-hidden polynomial coefficients are generated.

[0092] In this embodiment, a balance between efficiency and security is achieved in negative exponential calculations through dynamic piecewise polynomial approximation and FSS privacy protection mechanism: first, the input interval is adaptively divided according to the gradient change, and the quadratic polynomial coefficients are pre-calculated in combination with the least squares method, which not only ensures accuracy but also avoids iterative calculation overhead; secondly, the distributed comparison function (DCF) is used to securely determine the interval to which the input belongs, and mask coefficients are generated to prevent the leakage of original data and polynomial information, thereby realizing non-interactive privacy computing.

[0093] In one embodiment, the distance is compared with a threshold value through a distributed comparison function, a virtual pattern or a candidate pattern is inserted, and the output of the final pattern list includes:

[0094] Determine the selection function as:

[0095]

[0096] Among them, a represents the virtual mode, d represents the candidate mode; r in1 To hide x, use r in2 Hide the virtual mode a and the candidate mode d, and construct the offset function as:

[0097]

[0098] Comparison using distributed comparison functions and According to the comparison results, a virtual mode or a candidate mode is selected for insertion, and a final mode list is output.

[0099] In one embodiment, the pattern list generation is also implemented through a safe sampling protocol, and the safe sampling protocol includes:

[0100] Offline stage:

[0101] A trusted third party generates a random permutation π i and a random vector a i , and calculate b0+b1=π0(π1(a0)+a1), and a random vector r of length m; where i∈{0,1}; the trusted third party will randomly arrange π i , random vector a i and the random vector r are sent to edge server s1 and edge server s2 respectively;

[0102] Online stage:

[0103] The edge server s1 adds the self-sustaining data [x]0 to the random vector a0 to obtain the mask data [x′]0, and sends the first mask data [x′]0 to the edge server s2; wherein, [x′]0=[x]0+a0.

[0104] The edge server s2 shuffles the self-sustaining data [x]1 according to the random arrangement π1 and the mask data [x′]0 to obtain the first obfuscated data x′, adds the first obfuscated data x′ to the random vector a1 to obtain the second obfuscated data x″, sets [z]1=-b1, and sends the second obfuscated data x″ to the edge server s1; wherein x′=π1([x′]0+[x]1), x”=x'+a1.

[0105] The edge server s1 shuffles the second obfuscated data x″ using the random sequence π0 to obtain [z]0=π0(x″)-b0.

[0106] Edge servers s1 and s2 select corresponding sample points from the processed data [z]1 and [z]0 according to the random vector r and output [y] i =[z r ] i .

[0107] In one embodiment, the steps of using the secure negative exponential protocol to generate Gaussian kernel weights for secret sharing, performing mean shift vector calculation according to the Gaussian kernel weights, and obtaining mean shift results include:

[0108] Offline stage:

[0109] A trusted third party generates a random vector r for each seed point f,j , and the random vector r f,j Secret sharing is r f,j,0 and r f,j,1 to edge servers s1 and s2, and generate the key k for the secure negative exponential protocol f,j,0 and k f,j,1 , and the random vector r f,j,0 and r f,j,1 , key k f,j,0 and k f,j,1 Send to edge server s1 and edge server s2;

[0110] Online stage:

[0111] Edge server s1 and edge server s2 randomly select m seed points from shared data through a secure sampling protocol; for each selected seed point, edge server s1 and edge server s2 respectively calculate the square distance between it and other points; according to the square distance, a Gaussian kernel is calculated using a secure negative exponential function to obtain a Gaussian kernel value, and a mean shift vector is calculated according to the Gaussian kernel value.

[0112] In one of the embodiments, the seed point position is updated according to the mean shift result, the seed point converges when the change of the seed point is lower than a specified threshold, and the converged seed point is inserted into the pattern list.

[0113] In one embodiment, the steps of calculating the distance between the candidate pattern and the pattern in the pattern list, comparing the distance with a threshold value by using a distributed comparison function, inserting a virtual pattern or a candidate pattern, and outputting a final pattern list include:

[0114] Offline stage:

[0115] A trusted third party generates a random vector r for masking in1 and a random vector r in2 , and generate a key for the secure selection protocol, the random vector r in1 , random vector r in2 And the key is sent to edge server s1 and edge server s2;

[0116] Online stage:

[0117] Edge servers s1 and s2 create empty pattern lists;

[0118] For each candidate pattern, if the pattern list is empty, add the candidate pattern to the pattern list;

[0119] If the pattern list is not empty, the square Euclidean distance between the current candidate pattern and the candidate patterns in the pattern list is calculated to obtain a distance matrix, the distance matrix is ​​summed to determine the minimum distance; the minimum distance and the current candidate pattern are masked, and the safe selection protocol is used to compare the masked minimum distance with the threshold. If the masked minimum distance exceeds the threshold, the current candidate pattern is inserted into the pattern list, otherwise, a virtual pattern is inserted. After completing the processing of all candidate patterns, the pruned pattern list is output.

[0120] It should be understood that although Figure 1 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0121] In one embodiment, if Figure 2 As shown, a safety negative exponential protocol and a safety mode calculation device based on FSS are proposed, and the device includes:

[0122] The secure negative exponential protocol module 202 is used to divide the domain of the secure negative exponential protocol into a preset number of intervals, and for each of the intervals, use a quadratic polynomial to approximate the negative exponential function through the least squares method, use a distributed comparison function to determine the interval to which the input data belongs, and return the secret sharing result of the corresponding polynomial;

[0123] A mean shift module 204 is used to generate a Gaussian kernel weight of a secret share using the secure negative exponential protocol, perform mean shift vector calculation according to the Gaussian kernel weight, obtain a mean shift result, and use the mean shift result as an input for security mode calculation;

[0124] The mode selection module 206 is used to iteratively update the seed point according to the mean shift result until convergence, generate a mode list, calculate the distance between the candidate mode and the mode in the mode list, compare the distance with the threshold value through a distributed comparison function, insert a virtual mode or a candidate mode, and output a final mode list.

[0125] In one embodiment, the safe negative exponential protocol module 202 is further used to divide the input data x into a preset number of intervals; wherein dense interval division is used in the area with large gradient changes, and sparse interval division is used in the area with gentle gradient changes;

[0126] For each of the intervals, a quadratic polynomial is used to approximate the negative exponential function e -x ; where the quadratic polynomial is expressed as:

[0127] nExp(x)=α i,2 x 2 +α i,1 x+α i,0

[0128] α i,2 , α i,1 and α i,0 It is obtained by querying the polynomial coefficient table calculated in advance by the least square method;

[0129] Use the distributed comparison function to determine the interval to which the input data x belongs, and return the secret sharing result of the corresponding polynomial;

[0130] When the input data x is hidden by a random mask, mask-hidden polynomial coefficients are generated.

[0131] In one embodiment, the mode selection module 206 is further configured to determine the selection function as:

[0132]

[0133] Among them, a represents the virtual mode, d represents the candidate mode;

[0134] Using r in1 To hide x, use r in2 Hide the virtual mode a and the candidate mode d, and construct the offset function as:

[0135]

[0136] Comparison using distributed comparison functions and According to the comparison results, a virtual mode or a candidate mode is selected for insertion, and a final mode list is output.

[0137] In one embodiment, the mode selection module 206 is further configured to update the seed point position according to the mean shift result, determine that the seed point converges when the change of the seed point is lower than a specified threshold, and insert the converged seed point into the mode list.

[0138] In one embodiment, the mode selection module 206 is also used in the offline phase:

[0139] A trusted third party generates a random vector r for masking in1 and a random vector r in2 , and generate a key for the secure selection protocol, the random vector r in1 , random vector r in2 And the key is sent to edge server s1 and edge server s2;

[0140] Online stage:

[0141] Edge servers s1 and s2 create empty pattern lists;

[0142] For each candidate pattern, if the pattern list is empty, add the candidate pattern to the pattern list;

[0143] If the pattern list is not empty, the square Euclidean distance between the current candidate pattern and the candidate patterns in the pattern list is calculated to obtain a distance matrix, the distance matrix is ​​summed to determine the minimum distance; the minimum distance and the current candidate pattern are masked, and the safe selection protocol is used to compare the masked minimum distance with the threshold. If the masked minimum distance exceeds the threshold, the current candidate pattern is inserted into the pattern list, otherwise, a virtual pattern is inserted. After completing the processing of all candidate patterns, the pruned pattern list is output.

[0144] For the specific limitations of the FSS-based safety negative exponent protocol and the safety mode calculation device, please refer to the limitations of the FSS-based safety negative exponent protocol and the safety mode calculation method above, which will not be repeated here. Each module in the above-mentioned FSS-based safety negative exponent protocol and the safety mode calculation device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0145] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 3 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a multi-modal personalized health management program generation method based on a large model is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a button, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.

[0146] Those skilled in the art will understand that Figure 3 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0147] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method in the above embodiment when executing the computer program.

[0148] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method in the above embodiment are implemented.

[0149] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0150] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0151] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A security negative exponential protocol and security mode calculation method based on FSS, characterized in that: The method comprises: Divide the domain of the secure negative exponential protocol into a preset number of intervals, and for each of the intervals, use a quadratic polynomial to approximate the negative exponential function through the least squares method, use a distributed comparison function to determine the interval to which the input data belongs, and return a secret sharing result of the corresponding polynomial; The secure negative exponential protocol is used to generate Gaussian kernel weights of secret sharing, a mean shift vector is calculated according to the Gaussian kernel weights to obtain a mean shift result, and the mean shift result is used as an input for security mode calculation; According to the mean shift result, the seed point is iteratively updated until convergence, a pattern list is generated, the distance between the candidate pattern and the pattern in the pattern list is calculated, the distance is compared with the threshold size through a distributed comparison function, a virtual pattern or a candidate pattern is inserted, and a final pattern list is output.

2. The method according to claim 1, characterized in that The input data is divided into a preset number of intervals, and for each of the intervals, a quadratic polynomial is used to approximate a negative exponential function through a least squares method, and a distributed comparison function is used to determine the interval to which the input data belongs, and a secret sharing result corresponding to the polynomial is returned, including: Divide the input data x into a preset number of intervals; where dense interval division is used in areas with large gradient changes, and sparse interval division is used in areas with gentle gradient changes; For each of the intervals, a quadratic polynomial is used to approximate the negative exponential function e -x ; where the quadratic polynomial is expressed as: nExp(x)=α i,2 x 2 +a i,1 x+a i,0 α i,2 , α i,1 and α i,0 It is obtained by querying the polynomial coefficient table calculated in advance by the least square method; Use the distributed comparison function to determine the interval to which the input data x belongs, and return the secret sharing result of the corresponding polynomial; When the input data x is hidden by a random mask, mask-hidden polynomial coefficients are generated.

3. The method according to claim 2, characterized in that The distance is compared with the threshold value through the distributed comparison function, and the virtual mode or candidate mode is inserted. The final mode list output includes: Determine the selection function as: Among them, a represents the virtual mode, d represents the candidate mode; Using r in1 To hide x, use r in2 Hide the virtual mode a and the candidate mode d, and construct the offset function as: Compare thresholds using a distributed comparison function and threshold According to the comparison results, a virtual mode or a candidate mode is selected for insertion, and a final mode list is output.

4. The method according to any one of claims 1 to 3, characterized in that: The secure negative exponential protocol is used to generate Gaussian kernel weights for secret sharing, and a mean shift vector is calculated according to the Gaussian kernel weights to obtain a mean shift result, including: Offline stage: A trusted third party generates a random vector r for each seed point f,j , and the random vector r f,j Secret sharing is r f,j,0 and r f,j,1 to edge servers s1 and s2, and generate the key k for the secure negative exponential protocol f,j,0 and k f,j,1 , and the random vector r f,j,0 and r f,j,1 , key k f,j,0 and k f,j,1 Send to edge server s1 and edge server s2; Online stage: Edge servers s1 and s2 randomly select m seed points from the shared data through a secure sampling protocol; for each selected seed point, edge servers s1 and s2 calculate the square distance between it and other points respectively; According to the square distance, a Gaussian kernel is calculated using a safe negative exponential function to obtain a Gaussian kernel value, and a mean shift vector is calculated according to the Gaussian kernel value.

5. The method according to claim 4, characterized in that According to the mean shift result, the seed point is iteratively updated until convergence, and a pattern list is generated, including: The seed point position is updated according to the mean shift result. When the change of the seed point is lower than the specified threshold, the seed point converges and the converged seed point is inserted into the pattern list.

6. The method according to any one of claims 1 to 4, characterized in that: Calculate the distance between the candidate pattern and the pattern in the pattern list, compare the distance with the threshold through the distributed comparison function, insert the virtual pattern or candidate pattern, and output the final pattern list, including: Offline stage: A trusted third party generates a random vector r for masking in1 and a random vector r in2 , and generate a key for the secure selection protocol, the random vector r in1 , random vector r in2 And the key is sent to edge server s1 and edge server s2; Online stage: Edge servers s1 and s2 create empty pattern lists; For each candidate pattern, if the pattern list is empty, add the candidate pattern to the pattern list; If the pattern list is not empty, the square Euclidean distance between the current candidate pattern and the candidate patterns in the pattern list is calculated to obtain a distance matrix, the distance matrix is ​​summed to determine the minimum distance; the minimum distance and the current candidate pattern are masked, and the masked minimum distance is compared with the threshold. If the masked minimum distance exceeds the threshold, the current candidate pattern is inserted into the pattern list, otherwise, a virtual pattern is inserted. After completing the processing of all candidate patterns, the pattern list is output.

7. A security negative exponent protocol and security mode calculation device based on FSS, characterized in that: The device comprises: A secure negative exponential protocol module, used to divide the domain of the secure negative exponential protocol into a preset number of intervals, for each of the intervals, using a quadratic polynomial to approximate the negative exponential function through the least squares method, using a distributed comparison function to determine the interval to which the input data belongs, and returning a secret sharing result of the corresponding polynomial; A mean shift module, used to generate Gaussian kernel weights of secret sharing using the secure negative exponential protocol, perform mean shift vector calculation according to the Gaussian kernel weights, obtain mean shift results, and use the mean shift results as input for security mode calculation; The mode selection module is used to iteratively update the seed point according to the mean shift result until convergence, generate a mode list, calculate the distance between the candidate mode and the mode in the mode list, compare the distance with the threshold size through a distributed comparison function, insert a virtual mode or a candidate mode, and output a final mode list.

8. The device according to claim 7, characterized in that: The safe negative exponential protocol module is also used to divide the input data x into a preset number of intervals; wherein dense interval division is used in areas with large gradient changes, and sparse interval division is used in areas with gentle gradient changes; For each of the intervals, a quadratic polynomial is used to approximate the negative exponential function e -x ; where the quadratic polynomial is expressed as: nExp(x)=α i,2 x 2 +a i,1 x+a i,0 α i,2 , α i,1 and α i,0 It is obtained by querying the polynomial coefficient table calculated in advance by the least square method; Use the distributed comparison function to determine the interval to which the input data x belongs, and return the secret sharing result of the corresponding polynomial; When the input data x is hidden by a random mask, mask-hidden polynomial coefficients are generated.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.