A software data encryption method based on homomorphic encryption
By analyzing the data activity and interaction complexity of the target software functional module, determining whether to use the homomorphic encryption algorithm, the problem of large calculation overhead of homomorphic encryption algorithm is solved, and the encryption efficiency and computing power are improved are achieved. The effect of overhead.
Patent Information
- Application Number
- CN202410894590.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-04
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2044-07-04
AI Technical Summary
The calculation overhead of homomorphic encryption algorithms is high, resulting in reduced efficiency in software data processing, and cannot effectively solve the problem of data security window period.
By obtaining the amount of data generated by all functional modules in the target software in real time, storing it according to the time series, calculating the data variance and interaction complexity of each functional module, judging the encryption tag, and deciding whether to use homomorphic encryption algorithm to encrypt the interactive data.
Reduce computing power overhead and improve encryption efficiency. By distinguishing between active and inactive data modules, a more refined encryption strategy is achieved.
Smart Images

Figure CN118839319B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information security technology, and in particular to a software data encryption method based on homomorphic encryption. Background Art
[0002] When software is used, sensitive information is usually involved, such as user credentials, access tokens, business logic, etc. The leakage of these data may lead to security issues and user privacy leakage. Therefore, the need for encryption of software data is more urgent. However, in software development and operation and maintenance, the operation and processing of data are usually frequent, such as reading, writing, updating, etc. Conventional encryption technology can only encrypt data after data operation and processing, and there is a data security window period, and the security level is not enough. Therefore, a special encryption algorithm called homomorphic encryption was born. Compared with other encryption methods, it allows some computing operations to be performed in an encrypted state without decrypting the data first. However, due to the large computational overhead of the homomorphic encryption algorithm, if the homomorphic encryption algorithm is used to encrypt the entire software data, it will inevitably increase the data processing time, thereby reducing the efficiency of software operation. Summary of the invention
[0003] In order to solve the above technical problems, the purpose of the present invention is to provide a software data encryption method based on homomorphic encryption to improve the above problems. In order to achieve the above purpose, the technical solution adopted by the present invention is as follows:
[0004] The present application provides a software data encryption method based on homomorphic encryption, the method comprising:
[0005] Acquire the data volume generated by all functional modules in the target software in real time, and store it in time series to obtain the data set corresponding to each functional module;
[0006] The data set of each functional module is equally divided to obtain the data sequence corresponding to each functional module;
[0007] Calculating according to the difference between the elements in each of the data sequences, and determining based on the calculation result to obtain the encryption label of each of the functional modules;
[0008] According to the different encryption labels of each of the functional modules, it is selected whether to use a homomorphic encryption algorithm to encrypt and transmit the interactive data generated in real time by the functional module.
[0009] In combination with the above technical solution, in a possible implementation, calculation is performed according to the difference between the elements in each of the data sequences, and the encryption label of each of the functional modules is obtained based on the calculation result, including:
[0010] Perform variance calculation according to the data sequence corresponding to each functional module to obtain the data variance corresponding to each functional module and record it as a partition parameter;
[0011] The encryption tag of each functional module is obtained according to the partition parameter corresponding to each functional module.
[0012] In combination with the above technical solution, in a possible implementation, calculation is performed according to the difference between the elements in each of the data sequences, and the encryption label of each of the functional modules is obtained based on the calculation result, including:
[0013] Calculate the data sequence corresponding to each of the functional modules one by one to obtain the frequency of data changes corresponding to each of the functional modules;
[0014] The data change frequency sequence is constructed based on all data change frequency combinations;
[0015] Calculate the data sequence corresponding to each of the functional modules one by one to obtain the interaction complexity corresponding to each of the functional modules;
[0016] The interaction complexity sequence is constructed based on all interaction complexity combinations;
[0017] The activity of each functional module is calculated based on the interaction complexity sequence and the data change frequency sequence and recorded as the partition parameter;
[0018] The encryption tag of each functional module is obtained according to the partition parameter corresponding to each functional module.
[0019] In combination with the above technical solution, in a possible implementation, the interaction complexity corresponding to each functional module is obtained by calculating the data sequence corresponding to each functional module one by one, including:
[0020] The self-interaction frequency is obtained by counting the data sequences corresponding to each of the functional modules one by one, where the self-interaction frequency is the total number of any elements in the data sequence that are not equal to adjacent elements;
[0021] Counting the total number of interactions between each of the functional modules and other functional modules within a first time period, where the first time period is the same as the acquisition time of the data set;
[0022] The interaction frequency is calculated according to the total number of interactions of each functional module and the total number of elements in the data sequence;
[0023] Counting the total number of functional modules that each functional module has interacted with during the first time period;
[0024] The interaction complexity corresponding to each functional module is obtained by calculating the self-interaction frequency, the interaction frequency corresponding to each functional module and the total number of other functional modules with which the functional module has interacted.
[0025] In combination with the above technical solution, in a possible implementation, the activity of each functional module is calculated according to the interaction complexity sequence and the data change frequency sequence, and then it also includes:
[0026] Calculating the data sequence and activity corresponding to each of the functional modules one by one to obtain the homomorphic encryption adaptability corresponding to each of the functional modules;
[0027] The homomorphic encryption adaptability and activity corresponding to each of the functional modules are calculated, and the calculation results are used as partition parameters.
[0028] In combination with the above technical solution, in a possible implementation method, the homomorphic encryption adaptability corresponding to each functional module is obtained according to the data sequence and activity calculation corresponding to each functional module one by one, including:
[0029] Calculating the average processing data volume of each functional module one by one according to the data sequence corresponding to each functional module;
[0030] Calculate the variance corresponding to each data sequence one by one;
[0031] According to the average processed data volume and variance corresponding to each of the functional modules, exponential operations are performed one by one to obtain the homomorphic encryption adaptability corresponding to each of the functional modules.
[0032] In combination with the above technical solution, in a possible implementation manner, the step of determining the encryption tag of each functional module according to the partition parameter corresponding to each functional module includes:
[0033] Performing clustering processing on the partition parameters corresponding to each of the functional modules to obtain two clusters;
[0034] Calculate the mean of all partition parameters within each cluster separately;
[0035] According to the corresponding mean value in each cluster, the encrypted labels of all functional modules in the first cluster are recorded as the homomorphic encryption area, and the encrypted labels of all functional modules in the second cluster are recorded as the cache area. The mean value of the first cluster is greater than that of the second cluster.
[0036] In combination with the above technical solution, in a possible implementation manner, the clustering process is a k-means clustering process.
[0037] In combination with the above technical solution, in a possible implementation, the encryption tag includes a cache area and a homomorphic encryption area. According to the different encryption tags of each functional module, whether to use a homomorphic encryption algorithm to encrypt and transmit the interactive data generated in real time by the functional module is selected, including:
[0038] If the encryption tag of the functional module is a homomorphic encryption zone, the interactive data generated in real time by the functional module is encrypted using a homomorphic encryption algorithm;
[0039] The encryption tag of the functional module is a buffer area, and the interactive data generated by the functional module in real time is encrypted using a preset encryption algorithm.
[0040] In combination with the above technical solution, in a possible implementation manner, the preset encryption algorithm includes a symmetric encryption algorithm and an asymmetric encryption algorithm.
[0041] The present invention has the following beneficial effects:
[0042] In this application, the active characteristics of the target software data are analyzed to distinguish active data from inactive data, and different encryption methods are used for the data generated by different functional modules based on the distinction results, so as to reduce computing power overhead while improving encryption efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only 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.
[0044] Figure 1 A flowchart of a software data encryption method based on homomorphic encryption provided in Embodiment 1 of the present invention;
[0045] Figure 2 A schematic flow chart of step S3 provided in Example 1 of the present invention;
[0046] Figure 3 A schematic flow chart of step S4 provided in Example 1 of the present invention;
[0047] Figure 4 A schematic diagram of a process of encrypting software data using a homomorphic encryption algorithm in the prior art described in Embodiment 1 of the present invention;
[0048] Figure 5 This is a flowchart of step S3 provided in Embodiment 2 of the present invention. DETAILED DESCRIPTION
[0049] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the software data encryption method based on homomorphic encryption proposed by the present invention, its specific implementation method, structure, features and effects, in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0050] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0051] It is necessary to first explain the homomorphic encryption mentioned in this application. Homomorphic encryption means that after the data of different functional modules in the software are encrypted to obtain ciphertext data, different functional modules cooperate with each other to realize data processing. There is no need to convert the ciphertext data back into plaintext data for calculation. Data processing of different modules in the software can be realized based on the ciphertext data.
[0052] Embodiment 1:
[0053] The following is a specific solution of a software data encryption method based on homomorphic encryption provided by the present invention, which is described in detail with reference to the accompanying drawings.
[0054] See also Figure 1 , which shows a flow chart of a software data encryption method based on homomorphic encryption provided by an embodiment of the present invention. In this embodiment, it is considered that a target software is composed of multiple different functional modules during normal use, and different functional modules implement different functions, and multiple functional modules cooperate to realize the overall function of the target software. It is precisely because the functions implemented by different functional modules are different, so the corresponding data are also different. Therefore, in this embodiment, the data generated by different functional modules are considered to have different adaptability to homomorphic encryption. Specifically, in the target software data, the more active the functional module that generates data, the more data needs to be mobilized frequently, so there is a large amount of data supervision window period, and homomorphic encryption is more needed. And the functional module that generates less data changes, the less data volume is mobilized, and dynamic encryption is not required, thereby reducing the computing power overhead used for encryption. Specifically, in this embodiment, the method includes steps S1, S2, S3 and S4.
[0055] S1. Acquire data information generated by all functional modules in the target software in real time, and store them in time series to obtain a data set corresponding to each functional module.
[0056] This step is to monitor the data of a target software database. Specifically, the data volume mobilization of each functional module in the database is monitored. Similarly, the data collection stores the data call volume in the monitoring time period T in units of one second according to the time series relationship, where T is the total duration of 1 minute. At the same time, for the technology in this field, the total duration of T and the unit time can be changed according to the needs, and no specific restrictions are made in this embodiment.
[0057] S2. Equally divide the data set of each functional module to obtain the data sequence corresponding to each functional module. It should be noted that the equal division mentioned in this step is equal time interval division. Then the data sequence A corresponding to each functional module is obtained: [U1, U2, ..., U i ,…,U I ], where U1 represents the amount of data processed by the nth functional module in the first time period, U2 represents the amount of data processed by the nth functional module in the second time period, and U i represents the amount of data processed by the nth functional module in the i-th time period, U I It represents the amount of data processed by the nth functional module in the Ith time period, where I is the total number after the monitoring time period T is divided by unit time, which is 60 in this embodiment.
[0058] S3. Calculate according to the difference between the elements in each of the data sequences, and determine and obtain the encryption label of each of the functional modules based on the calculation result.
[0059] In this embodiment, if the data of a functional module of the target software does not change frequently, then the difference between each element in the data sequence A should be small or even no difference. When the data changes frequently, there are obvious differences between different elements in the time series A. Therefore, in this embodiment, the difference change of the data sequence A is calculated to quantify whether the corresponding functional module is active within the monitoring time period T. Then, it is determined whether to perform homomorphic encryption processing on the functional module and transmit the encryption result in step S4. Therefore, please refer to Figure 2 , this step S3 also includes step Q31 and step Q32.
[0060] Q31. Perform variance calculation based on the data sequence corresponding to each functional module to obtain the data variance corresponding to each functional module and record it as a partition parameter DI.
[0061] In this step, the variance is used to measure the element gap in the data sequence A, which can better reflect the call status of the data volume of each functional module.
[0062] Q32. Determine and obtain the encryption label of each functional module according to the partition parameter DI corresponding to each functional module.
[0063] At the same time, this step Q32 includes the following steps to implement encrypted label marking of each functional module.
[0064] Q321. Cluster the partition parameter DI corresponding to each functional module to obtain two clusters. The clustering process mentioned in this step is to perform k-means clustering with cluster 2. The k-means clustering process is a prior art, and its specific execution process will not be described in detail in this embodiment.
[0065] Q322. Calculate the mean of all partition parameters within each cluster.
[0066] Q323. According to the corresponding mean value in each cluster, the encryption labels of all functional modules in the first cluster are recorded as the homomorphic encryption area, and the encryption labels of all functional modules in the second cluster are recorded as the cache area. The mean value of the first cluster is greater than that of the second cluster.
[0067] S4. According to the different encryption labels of each functional module, select whether to use a homomorphic encryption algorithm to encrypt and transmit the data information generated by the functional module in real time. Specifically, in this embodiment, the encryption label includes a cache area and a homomorphic encryption area. The encryption method selected in this step is selected based on the encryption label. For details, please refer to Figure 3 , step S4 includes step S41 and step S42.
[0068] S41. If the encryption tag of the functional module is a homomorphic encryption zone, the data information generated by the functional module in real time is encrypted using a homomorphic encryption algorithm.
[0069] It should be noted that the homomorphic encryption algorithm mentioned in this step is an existing technology, and its specific operation process will not be repeated in this application.
[0070] S42: If the encryption tag of the functional module is a cache area, the data information generated in real time by the functional module is encrypted using a preset encryption algorithm.
[0071] See also Figure 4 , a schematic diagram of the process of encrypting software data using a homomorphic encryption algorithm in the prior art. In the prior art, all functional modules use a homomorphic encryption algorithm, which has a large overall computational overhead. When using a homomorphic encryption algorithm to encrypt software data, the data processing time will inevitably be prolonged due to the large overhead of homomorphic encryption itself, thereby reducing the efficiency of software operation. Figure 1This embodiment proposes a software data encryption method based on homomorphic encryption, which calculates each partition parameter through the data information change characteristics of each functional module. The partition parameter is used as the basis for distinguishing the active state of each functional module. It is decided whether to use the homomorphic encryption algorithm for functional modules with different active states to achieve the technical effect of reducing computing overhead. At the same time, in this embodiment, the inactive functional modules can also be temporarily unencrypted to further reduce the computing power overhead.
[0072] Embodiment 2:
[0073] The difference between this embodiment and embodiment 1 lies in the difference in step S3. In the embodiment, it is considered that directly using variance as a basis is rather one-sided. Therefore, in this application, the frequency of data driving and the interaction status of each functional module with other functional modules are also combined. Please refer to Figure 5 In this embodiment, step S3 includes step S31, step S32, step S33, step S34, step S35, step S36, step S37 and step S38.
[0074] S31 , calculating the data sequence corresponding to each of the functional modules one by one to obtain the data change frequency AY corresponding to each of the functional modules.
[0075] Specifically, the value in this step can be calculated by the following formula:
[0076]
[0077] Where AY represents the frequency of data changes; I is the total number of monitoring time period T divided by unit time; U is i Indicates the amount of data processed by the functional module in the i-th unit time period; U i-1 Indicates the amount of data processed by the functional module in the i-1th unit time period.
[0078] S32. Construct a data change frequency sequence based on all data change frequency combinations. Therefore, the data change frequency sequence B in this embodiment can be [AY1, AY2, ..., AY n ,…,AY N ].
[0079] S33, calculating the data sequence corresponding to each of the functional modules one by one to obtain the interaction complexity corresponding to each of the functional modules.
[0080] In this embodiment, it is taken into consideration that frequent data changes in different functional modules in the target software does not mean that this functional module of the target software is very active. For example, there are certain self-checking functional modules in the target software, and these modules may also have a large number of data changes within a certain period of time. Therefore, it is necessary to determine whether a certain functional module is an active functional module, and it is also necessary to determine whether the current functional module has a certain degree of interactivity with other functional modules.
[0081] Therefore, the steps also include step S331, step S332, step S333, step S334 and step S335.
[0082] S331. Count the data sequences corresponding to each of the functional modules one by one to obtain a self-interaction frequency, where the self-interaction frequency is the total number of any elements in the data sequence that are not equal to adjacent elements.
[0083] Among them, the self-interaction frequency PL of the nth functional module n The calculation formula is as follows:
[0084]
[0085] In the above formula, PL n It represents the self-interaction frequency of the nth functional module; I represents the total number of monitoring time period T divided by unit time, which can also be called the total number of elements in time series A; I′ represents the total number of any element in time series A that is not equal to the adjacent element.
[0086] S332: Count the total number of interactions between each functional module and other functional modules within a first time period, where the first time period is the same as the acquisition time of the data set.
[0087] S333: Calculate the interaction frequency according to the total number of interactions of each functional module and the total number of elements in the data sequence.
[0088] Among them, the interaction frequency EL of the nth functional module n The calculation formula is as follows:
[0089]
[0090] In the above formula, EL n represents the interaction frequency of the nth functional module; I represents the total number of monitoring time period T divided by unit time, which can also be called the total number of elements in the time series A; P n It represents the total number of interactions between each functional module and other functional modules in the first time period.
[0091] S334: Count the total number of functional modules that each functional module interacts with during the first time period. And the total number of other functional modules that the nth functional module interacts with during the time period T is NM. n .
[0092] S335 , calculating the interaction complexity corresponding to each functional module according to the self-interaction frequency corresponding to each functional module, the total number of interactions with other functional modules, and the total number of other functional modules with which the functional modules have interacted.
[0093] Specifically, the interaction complexity calculation formula is as follows:
[0094] ID n =PL n ×(EL n ×NM n )
[0095] Where, ID n Indicates the interaction complexity of the nth functional module; EL n Indicates the interaction frequency of the nth functional module; PL n NM represents the self-interaction frequency of the nth functional module; n is the total number of other functional modules that the nth functional module interacted with within a period of time T.
[0096] In the above formula, PL n The higher the self-interaction frequency, the higher the interaction frequency, and the greater the number of interactions, the greater the interaction complexity of the functional module.
[0097] S34, construct an interaction complexity sequence based on all interaction complexities. That is, in this embodiment, the interaction complexity sequence C of all functional modules in the target software can be obtained through the calculation in step S3: [ID1, ID2, ..., ID n ,…,ID N ], ID1 represents the interaction complexity of the first functional module, ID2 represents the interaction complexity of the second functional module, ID n Indicates the interaction complexity of the nth functional module, ID N Represents the interaction complexity of the Nth functional module.
[0098] At the same time, in this embodiment, the more active a function module is in the target software, the more likely it is that the function module not only frequently changes its own data, but also frequently exchanges data with different function modules. Therefore, in this embodiment, the activity of each function module is also considered to be measured, so please refer to step S35.
[0099] S35. The activity of each functional module is calculated according to the interaction complexity sequence and the data change frequency sequence and recorded as a partition parameter.
[0100] HY n =AY n ×ID n
[0101] In the formula, HY n is the activity of the nth functional module; AY n Indicates the frequency of data changes of the nth functional module, ID n Represents the interaction complexity of the nth functional module.
[0102] Furthermore, in this application, it is considered that not all functional modules can perform homomorphic encryption calculations. For example, there is a functional module that processes a large amount of data, but the data is always highly similar. In this case, when this module uses homomorphic processing, it often incurs a large computational overhead, but the actual benefits are relatively low. Therefore, the application also includes a measure of whether each functional module can perform homomorphic encryption. Please refer to step S36.
[0103] S36. Calculate the data sequence and activity corresponding to each of the functional modules one by one to obtain the homomorphic encryption adaptability corresponding to each of the functional modules.
[0104] Specifically, step S36 includes step S361, step S362 and step S363 to implement the calculation process of homomorphic encryption adaptability.
[0105] S361. Calculate the average amount of data processed by each functional module one by one according to the data sequence corresponding to each functional module.
[0106] Among them, the average processing data volume MA of the nth functional module n The calculation formula is as follows:
[0107]
[0108] In the formula, MA n is the average amount of data processed by the nth functional module; U i Indicates the amount of data processed by the nth functional module in the i-th time period, ID n represents the interaction complexity of the nth functional module; I represents the total number of elements in the time series A.
[0109] S362: Calculate the variance corresponding to each data sequence one by one, and record the variance FD of the data sequence corresponding to the nth function module n .
[0110] S363. Perform exponential operations one by one according to the average processed data volume and variance corresponding to each of the functional modules to obtain the homomorphic encryption adaptability corresponding to each of the functional modules.
[0111] Among them, the homomorphic encryption adaptability SF of the nth functional module n The calculation formula is as follows:
[0112]
[0113] Where SF n is the homomorphic encryption adaptability of the nth functional module; MA n is the average amount of data processed by the nth functional module; FD n It represents the variance of the data sequence corresponding to the nth functional module; e represents a natural constant, also known as Euler's number.
[0114] In the above formula, the larger the average amount of data processed by the nth module within a certain time T, the smaller the difference of the data, and the worse the adaptability of the nth functional module to homomorphic encryption.
[0115] S37. Calculate the homomorphic encryption adaptability and activity corresponding to each of the functional modules, and use the calculation results as partition parameters.
[0116] Specifically, the partition parameter DI of the nth functional module n The calculation formula is as follows:
[0117] DI n =HY n ×SF n
[0118] Where, DI n Indicates the partition parameter of the nth functional module; HY n Indicates the activity of the nth functional module; SF n Indicates the homomorphic encryption adaptability of the nth functional module.
[0119] According to the above calculation, if the activity of the nth module is stronger and the adaptability of homomorphic encryption is greater, it means that the data corresponding to the nth module is easier to flow and the cost of homomorphic encryption is smaller, which can effectively reduce the computing overhead.
[0120] S38. Determine and obtain an encryption tag of each functional module according to the partition parameters corresponding to each functional module.
[0121] Through the above calculation process, when data partitioning is performed on different functional modules of the target software in this embodiment, it is not only based on whether the data corresponding to this functional module is active, but also more suitable for functional modules using homomorphic encryption algorithms.
[0122] That is, the more active a functional module of a target software is, the more suitable it is for homomorphic encryption, and the more homomorphic encryption processing is required for it, and vice versa. Therefore, it is necessary to define comprehensive parameters for different functional modules of the target software to describe the comprehensive activity and homomorphic encryption adaptability of a functional module.
[0123] It should be noted that the sequence of the above embodiments of the present invention is only for description and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0124] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
Claims
1. A software data encryption method based on homomorphic encryption, characterized in that: The method comprises: Acquire the data volume generated by all functional modules in the target software in real time, and store it in time series to obtain the data set corresponding to each functional module; The data set of each functional module is equally divided to obtain the data sequence corresponding to each functional module; Calculating according to the difference between the elements in each of the data sequences, and determining based on the calculation result to obtain the encryption label of each of the functional modules; According to the different encryption labels of each functional module, select whether to use a homomorphic encryption algorithm to encrypt and transmit the interactive data generated in real time by the functional module; Calculating according to the difference between the elements in each of the data sequences, and determining based on the calculation result to obtain the encryption label of each of the functional modules, including: Analyze the data sequence corresponding to each of the functional modules one by one and calculate the frequency of data changes corresponding to each of the functional modules; The data change frequency sequence is constructed based on all data change frequency combinations; Analyze the data sequences corresponding to each of the functional modules one by one and calculate the interaction complexity corresponding to each of the functional modules; The interaction complexity sequence is constructed based on all interaction complexity combinations; The activity of each functional module is calculated based on the interaction complexity sequence and the data change frequency sequence and recorded as the partition parameter; The encryption tag of each functional module is obtained according to the partition parameter corresponding to each functional module.
2. The software data encryption method based on homomorphic encryption according to claim 1 is characterized in that: Calculating according to the difference between the elements in each of the data sequences, and determining based on the calculation result to obtain the encryption label of each of the functional modules, including: Perform variance calculation according to the data sequence corresponding to each functional module to obtain the data variance corresponding to each functional module and record it as a partition parameter; The encryption tag of each functional module is obtained according to the partition parameter corresponding to each functional module.
3. The software data encryption method based on homomorphic encryption according to claim 1 is characterized in that: Analyze the data sequences corresponding to each of the functional modules one by one to calculate the interaction complexity corresponding to each of the functional modules, including: Analyze the data sequence corresponding to each of the functional modules one by one to obtain the self-interaction frequency, where the self-interaction frequency is the total number of any elements in the data sequence that are not equal to adjacent elements; Counting the total number of interactions between each of the functional modules and other functional modules within a first time period, where the first time period is the same as the acquisition time of the data set; The interaction frequency is calculated according to the total number of interactions of each functional module and the total number of elements in the data sequence; Counting the total number of functional modules that each functional module has interacted with during the first time period; The interaction complexity corresponding to each functional module is obtained by calculating the self-interaction frequency, the interaction frequency corresponding to each functional module and the total number of other functional modules with which the functional module has interacted.
4. The software data encryption method based on homomorphic encryption according to claim 1 is characterized in that: The activity of each functional module is calculated based on the interaction complexity sequence and the data change frequency sequence, followed by: Calculating the data sequence and activity corresponding to each of the functional modules one by one to obtain the homomorphic encryption adaptability corresponding to each of the functional modules; The homomorphic encryption adaptability and activity corresponding to each of the functional modules are calculated, and the calculation results are used as partition parameters.
5. The software data encryption method based on homomorphic encryption according to claim 4 is characterized in that: The homomorphic encryption adaptability corresponding to each functional module is obtained by calculating the data sequence and activity corresponding to each functional module one by one, including: Calculating the average processing data volume of each functional module one by one according to the data sequence corresponding to each functional module; Calculate the variance corresponding to each data sequence one by one; According to the average processed data volume and variance corresponding to each of the functional modules, exponential operations are performed one by one to obtain the homomorphic encryption adaptability corresponding to each of the functional modules.
6. The software data encryption method based on homomorphic encryption according to claim 1 or 2, characterized in that: The step of determining the encryption label of each functional module according to the partition parameter corresponding to each functional module includes: Performing clustering processing on the partition parameters corresponding to each of the functional modules to obtain two clusters; Calculate the mean of all partition parameters within each cluster separately; According to the corresponding mean value in each cluster, the encrypted labels of all functional modules in the first cluster are recorded as the homomorphic encryption area, and the encrypted labels of all functional modules in the second cluster are recorded as the cache area. The mean value of the first cluster is greater than that of the second cluster.
7. The method for encrypting software data based on homomorphic encryption according to claim 6, characterized in that: The clustering process is a k-means clustering process.
8. The method for encrypting software data based on homomorphic encryption according to claim 1, characterized in that: The encryption tag includes a cache area and a homomorphic encryption area. According to the different encryption tags of each functional module, whether to use a homomorphic encryption algorithm to encrypt and transmit the interactive data generated in real time by the functional module includes: If the encryption tag of the functional module is a homomorphic encryption zone, the interactive data generated in real time by the functional module is encrypted using a homomorphic encryption algorithm; The encryption tag of the functional module is a buffer area, and the interactive data generated by the functional module in real time is encrypted using a preset encryption algorithm.
9. The method for encrypting software data based on homomorphic encryption according to claim 8, characterized in that: The preset encryption algorithm includes a symmetric encryption algorithm and an asymmetric encryption algorithm.
Citation Information
Patent Citations
Cloud environment data integrity verification method based on fully homomorphic encryption
CN108965258A
Efficient verifiable outsourcing calculation method based on fully homomorphic encryption
CN117061084A