Data processing method and device, equipment, storage medium and program product

By normalizing and covariance matrix transformation on the original data set, and adding noise and inversion based on the differential privacy algorithm, the problem of instability of the covariance matrix inverse matrix is ​​solved, and more accurate and stable data analysis results are achieved.

CN119903291APending Publication Date: 2025-04-29CHINA SOUTHERN POWER GRID ARTIFICIAL INTELLIGENCE TECHNOLOGY CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411927437.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-25
Publication Date
2025-04-29

AI Technical Summary

Technical Problem

The inverse matrix of the covariance matrix in the prior art is unstable, resulting in ineffective application in data science methods and may even lead to incorrect interpretation of the original data.

Method used

By normalizing the original data set to a preset numerical interval, a covariance matrix is ​​constructed, and a transform symmetry matrix is ​​constructed based on the matrix to generate a transform covariance matrix. Then, a differential privacy algorithm is used to add noise to the transformed covariance matrix, and an inverse operation is performed on the added noise matrix to obtain the target inverse covariance matrix.

Benefits of technology

The accuracy and stability of the inverse matrix of the covariance matrix is ​​improved, making it more reliable in data analysis scenarios, and erroneous interpretations caused by instability of the inverse matrix are avoided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119903291A_ABST
    Figure CN119903291A_ABST
Patent Text Reader

Abstract

The invention discloses a data processing method and device, equipment, a storage medium and a program product, and belongs to the technical field of data science. The method comprises the following steps: normalizing an original data set to a preset numerical value interval to obtain a candidate data set; performing covariance matrix construction on the candidate data set to obtain a covariance matrix; constructing a transformation symmetric matrix based on the covariance matrix, and generating a transformation covariance matrix based on the covariance matrix and the transformation symmetric matrix; adding noise to the transformation covariance matrix by adopting a differential privacy algorithm to obtain a noise-added matrix, and carrying out inverse operation on the noise-added matrix to obtain a noise-added inverse matrix; and obtaining a target inverse covariance matrix according to the noise-added inverse matrix and the transformation symmetric matrix. According to the embodiment of the invention, the accuracy and stability of the inverse matrix of the covariance matrix can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data science and technology, and in particular to a data processing method and apparatus, equipment, storage medium and program product. Background Art

[0002] In the field of statistics and data science, the covariance matrix is ​​an important carrier of statistical information. Since the covariance matrix usually contains various personal data information of individuals, in order to prevent the leakage of individual privacy when using the covariance matrix in practice, differential privacy technology is often used to process it to ensure that the processed covariance matrix can protect individual privacy. Among them, differential privacy technology is a mathematical technique that adds controlled random noise to the data set to prevent anyone from obtaining information about individuals in the data set. Differential privacy can allow aggregate analysis of data while protecting individual privacy.

[0003] Existing technologies usually directly add noise to the covariance matrix to achieve differential privacy, and then calculate its inverse matrix for data analysis. However, the inverse matrix of the covariance matrix calculated by existing technologies is often unstable. This problem makes the covariance matrix unable to be applied to many data science methods (such as linear regression, variance analysis, etc.), and even leads to misinterpretation of the original data, which in turn causes other hazards.

[0004] Therefore, how to improve the accuracy and stability of the inverse matrix of the covariance matrix has become a technical problem that needs to be solved urgently. Summary of the invention

[0005] The purpose of the embodiments of the present application is to provide a data processing method and apparatus, equipment, storage medium and program product, which can effectively improve the accuracy and stability of the inverse matrix of the covariance matrix.

[0006] To achieve the above object, a first aspect of an embodiment of the present application provides a data processing method, including:

[0007] Normalize the original data set to a preset value range to obtain a candidate data set;

[0008] Constructing a covariance matrix for the candidate data set to obtain a covariance matrix;

[0009] constructing a transformation symmetric matrix based on the covariance matrix, and generating a transformation covariance matrix based on the covariance matrix and the transformation symmetric matrix;

[0010] Using a differential privacy algorithm, adding noise to the transformation covariance matrix to obtain a noisy matrix, and performing an inverse operation on the noisy matrix to obtain a noisy inverse matrix;

[0011] A target inverse covariance matrix is ​​obtained according to the noise addition inverse matrix and the transformation symmetric matrix.

[0012] Compared with the prior art, a data processing method provided by an embodiment of the present application has the beneficial effect that: by normalizing the original data set to a preset numerical interval to obtain a candidate data set, the operation interference caused by differences in data magnitude and the like can be avoided. Further, by constructing a covariance matrix based on the candidate data set, the statistical information of the original data set can be effectively retained. Further, by constructing a transformation symmetric matrix based on the covariance matrix and generating a transformation covariance matrix, the data structure can be optimized by transforming the symmetric matrix, so that the target inverse covariance matrix generated subsequently is more stable. Further, a differential privacy algorithm is used to add noise to the transformation covariance matrix, and the privacy and availability of the data are guaranteed by adding reasonable noise. Further, the noise-added matrix is ​​inverted to obtain a noise-added inverse matrix, and the target inverse covariance matrix is ​​obtained based on it and the transformation symmetric matrix. The present application adopts the principle of matrix transformation, which effectively overcomes the problem of unstable inverse operation and low utility of covariance matrix caused by directly using differential privacy and noise-added mechanism in the prior art, and enhances the accuracy and stability of the corresponding inverse matrix of the covariance matrix, so that it can be better applied to various data analysis scenarios involving the inverse matrix of the covariance matrix.

[0013] In some embodiments, constructing a transformation symmetric matrix based on the covariance matrix, and generating a transformation covariance matrix based on the covariance matrix and the transformation symmetric matrix, comprises:

[0014] Constructing the transformation symmetric matrix based on the covariance matrix, optimization variables and constraints;

[0015] The covariance matrix is ​​transformed according to the transformation symmetric matrix to obtain the transformation covariance matrix.

[0016] In some embodiments, the adopting of a differential privacy algorithm to add noise to the transformation covariance matrix to obtain a noise-added matrix includes:

[0017] Determine a sensitivity Δ for adding noise according to the transformation covariance matrix;

[0018] By using the Laplace mechanism, noise is added to the transformation covariance matrix according to the sensitivity Δ to obtain a noisy matrix, and the noisy matrix satisfies ε-differential privacy.

[0019] In some embodiments, adding noise to the transformation covariance matrix according to the sensitivity Δ through the Laplace mechanism to obtain a noise-added matrix includes:

[0020] Use a random number generator to generate a set of Laplace random numbers subject to a parameter Δ / ε;

[0021] The random number elements in the Laplace random number set are allocated to each element of the transformation covariance matrix to obtain the noise matrix.

[0022] In some embodiments, normalizing the original data set to a preset numerical range to obtain a candidate data set includes:

[0023] Let the original data set X = {x_1, ..., x_n}, determine the maximum value and the minimum value in the original data set, the maximum value is x_max, and the minimum value is x_min;

[0024] Each data x_i in the original data set X is converted by the formula y_i=(x_i-x_min) / (x_max-x_min) to generate the candidate data set Y, where the candidate data set Y={y_1,…,y_n}.

[0025] In some embodiments, determining the maximum and minimum values ​​in the original data set includes:

[0026] Sorting the elements of each original subset in the original data set in ascending order;

[0027] The first element of the sorted original subset is taken as the minimum value of the original subset, and the last element is taken as the maximum value of the original subset.

[0028] To achieve the above-mentioned purpose, a second aspect of an embodiment of the present application provides a data processing device, the device comprising:

[0029] A normalization module is used to normalize the original data set to a preset value range to obtain a candidate data set;

[0030] A construction module, used to construct a covariance matrix for the candidate data set to obtain a covariance matrix;

[0031] A generating module, configured to construct a transformation symmetric matrix based on the covariance matrix, and to generate a transformation covariance matrix based on the covariance matrix and the transformation symmetric matrix;

[0032] A noisy module, configured to use a differential privacy algorithm to add noise to the transformation covariance matrix to obtain a noisy matrix, and perform an inverse operation on the noisy matrix to obtain a noisy inverse matrix;

[0033] The inverse module is used to obtain a target inverse covariance matrix according to the noise inverse matrix and the transformation symmetric matrix.

[0034] To achieve the above-mentioned purpose, the third aspect of an embodiment of the present application proposes an electronic device, which includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, and when the processor executes the computer program, the method described in the first aspect is implemented.

[0035] To achieve the above-mentioned purpose, the fourth aspect of an embodiment of the present application proposes a computer-readable storage medium, wherein the computer-readable storage medium includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the method described in the first aspect above.

[0036] To achieve the above objectives, the fifth aspect of an embodiment of the present application proposes a computer program product, which includes a computer program or computer instructions. When the computer program or the computer instructions are executed by a processor, the method described in the first aspect is implemented. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 is a flow chart of a data processing method provided in an embodiment of the present application;

[0038] Figure 2 yes Figure 1 A flowchart of step S101 in FIG.

[0039] Figure 3 yes Figure 2 A flowchart of step S201 in FIG.

[0040] Figure 4 yes Figure 1 A flowchart of step S103 in FIG.

[0041] Figure 5 yes Figure 1 A flowchart of step S104 in FIG.

[0042] Figure 6 yes Figure 5 A flowchart of step S502 in FIG.

[0043] Figure 7 is a structural schematic diagram of a data processing device provided in an embodiment of the present application;

[0044] Figure 8 It is a hardware structure diagram of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION

[0045] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0046] In the description of the present application, it should be understood that the terms "center", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present application.

[0047] The terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, unless otherwise specified, "plurality" means two or more.

[0048] In the description of this application, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.

[0049] In the field of statistics and data science, the covariance matrix is ​​an important carrier of statistical information. Since the covariance matrix usually contains various personal data information of individuals, in order to prevent the leakage of individual privacy when using the covariance matrix in practice, differential privacy technology is often used to process it to ensure that the processed covariance matrix can protect individual privacy. Among them, differential privacy technology is a mathematical technique that adds controlled random noise to the data set to prevent anyone from obtaining information about individuals in the data set. Differential privacy can allow aggregate analysis of data while protecting individual privacy.

[0050] Related technologies usually directly add noise to the covariance matrix to achieve differential privacy, and then find its inverse matrix for data analysis. Specifically, the steps for inverting the traditional differential privacy covariance matrix are: use data to obtain the covariance matrix; add noise based on differential privacy to the covariance matrix; and invert the covariance matrix after adding noise. However, the inverse matrix of the covariance matrix obtained by traditional methods is often unstable. This problem makes the covariance matrix unable to be applied to many data science methods (such as linear regression, variance analysis, etc.), and even leads to misinterpretation of the original data, which in turn causes other hazards.

[0051] Therefore, how to improve the accuracy and stability of the inverse matrix of the covariance matrix has become a technical problem that needs to be solved urgently.

[0052] Based on this, the purpose of the embodiments of the present application is to provide a data processing method and apparatus, equipment, storage medium and program product, which can effectively improve the accuracy and stability of the inverse matrix of the covariance matrix.

[0053] First, let’s define differential privacy (DP): If a random algorithm f satisfies ε-differential privacy, abbreviated as ε-DP, it means that for any two data sets D and D' that differ by only one piece of data, its output satisfies the following formula (1):

[0054] P(f(D)=S) <P(f(D’)=S)*exp(ε) (1);

[0055] Among them, the increase of ε will weaken the strength of privacy protection, but at the same time increase the utility of data. That is, the difference in the probability of the results output by the data processing mechanism appearing in different data sets is allowed to expand, and it is relatively easier for external attackers to distinguish the relevant information of the different records in the original data set through the processed results, so the strength of privacy protection is weakened. But at the same time, in the process of adding noise to achieve differential privacy, it is allowed to add relatively less noise or the degree of disturbance to the data can be smaller, so that the processed data will be closer to the real data situation, so that the data can be used in statistical analysis, machine learning modeling and other application scenarios in the future. , It can more accurately reflect the original characteristics and laws of the data, and the utility of the data will be increased accordingly.

[0056] On the contrary, when ε decreases, privacy protection is strengthened, and the data processing mechanism needs to more strictly control the differences in data output results on adjacent data sets, often adding more noise or adopting stronger perturbation methods. Although this better protects privacy and makes it difficult for attackers to infer individual data from the results, it also makes the processed data deviate more from the real data, resulting in a decrease in utility indicators such as accuracy when performing data analysis and mining operations, and the utility of the data is also reduced.

[0057] Definition of sensitivity: For any two data sets D and D' that differ by only one piece of data, the sensitivity of algorithm f is expressed by the following formula (2):

[0058]

[0059] Laplace mechanism: Given a function f with a sensitivity of Δ, a data set D and a constant α>0, the high Laplace mechanism can be expressed as follows:

[0060] G(f(D))=f(D)+Λ (3);

[0061] Where Λ is a Laplace random number with parameter Δ / ε. Then the random algorithm G(f(D)) satisfies ε-differential privacy.

[0062] Differential privacy can effectively guarantee its security and privacy, thanks to two important properties. The first is the combined protection property. For the same data set, if there are multiple outputs that meet the differential privacy requirements, putting them together as a whole still meets the differential privacy requirements. In principle, after different processing mechanisms that meet the differential privacy are applied to the data set, the results will be combined to maintain the privacy protection state according to the corresponding rules, and there will be no privacy leakage risk due to multiple outputs. The second is the post-processing protection property. After the data is processed by the differential privacy mechanism, no matter what subsequent operations are performed, there will be no additional privacy leakage risk, that is, all subsequent operations can always meet the differential privacy requirements. This lays a solid foundation for privacy security for the subsequent diversified use of data, allowing people to safely explore the value of data without worrying about privacy issues.

[0063] See also Figure 1 , Figure 1 is an optional flowchart of the data processing method provided in the embodiment of the present application. Figure 1 The method may include but is not limited to steps S101 to S105.

[0064] Step S101, normalizing the original data set to a preset value range to obtain a candidate data set;

[0065] Step S102, constructing a covariance matrix for the candidate data set to obtain a covariance matrix;

[0066] Step S103, constructing a transformation symmetric matrix based on the covariance matrix, and generating a transformation covariance matrix based on the covariance matrix and the transformation symmetric matrix;

[0067] Step S104, using a differential privacy algorithm to add noise to the transformation covariance matrix to obtain a noisy matrix, and performing an inverse operation on the noisy matrix to obtain a noisy inverse matrix;

[0068] Step S105, obtaining a target inverse covariance matrix according to the noise inverse matrix and the transformed symmetric matrix.

[0069] In the steps S101 to S105 shown in the embodiment of the present application, the candidate data set is obtained by normalizing the original data set to a preset numerical interval, which can avoid the operation interference caused by differences in data magnitude, etc. Further, the covariance matrix is ​​constructed based on the candidate data set, which can effectively retain the statistical information of the original data set. Further, based on the covariance matrix, a transformation symmetric matrix is ​​constructed and a transformation covariance matrix is ​​generated, and the data structure can be optimized by transforming the symmetric matrix, so that the target inverse covariance matrix generated subsequently is more stable. Further, a differential privacy algorithm is used to add noise to the transformation covariance matrix, and the privacy and availability of the data are guaranteed by adding reasonable noise. Further, the noise-added matrix is ​​inverted to obtain a noise-added inverse matrix, and the target inverse covariance matrix is ​​obtained based on it and the transformation symmetric matrix. The present application adopts the principle of matrix transformation, which effectively overcomes the problem of unstable and low utility of the inverse operation of the covariance matrix caused by directly using the differential privacy noise-added mechanism in the prior art, and enhances the accuracy and stability of the corresponding inverse matrix of the covariance matrix, so that it can be better applied to various data analysis scenarios involving the inverse matrix of the covariance matrix.

[0070] It is understandable that because differential privacy technology has a clear mathematical definition and can perform a clear mathematical measurement of privacy, it can overcome the privacy leakage problems existing in traditional privacy protection technologies such as anonymization and desensitization, and is a powerful and explainable privacy protection method. The inverse covariance matrix of traditional differential privacy plus noise has utility loss and huge instability, while this application adopts the principle of matrix transformation, which can ensure the stability and effectiveness of the corresponding inverse matrix of the differential privacy covariance matrix, and the obtained target inverse covariance matrix can be separated from the data holder, and can be used by other parties without increasing the risk of privacy leakage. It can also maintain the original covariance information, which overcomes the defects of differential privacy protection technology in terms of utility and privacy balance.

[0071] In step S101 of some embodiments, the original data set may be a data set that is initially collected and has not been subjected to any normalization processing. The preset numerical interval may be a preset numerical range, the purpose of which is to normalize the data of different magnitudes and ranges in the original data set into this interval, so that the data is comparable and convenient for subsequent data processing. For example, the preset numerical interval may be [0, 1], or may be [-1 / 2, 1 / 2]. The candidate data set may be a data set obtained after the original data set has been normalized. The original data set X is normalized to the preset numerical interval to obtain the candidate data set Y; the original data set X = {x_1, ..., x_n}, the value range of each variable in the original data set X needs to be normalized to the [0, 1] interval, and the obtained candidate data set may be recorded as Y = {y_1, ..., y_n}. In the embodiment of the present application, normalizing the data to the [0, 1] interval is a standard operation in the data analysis process, which can enhance the numerical stability in the data analysis process.

[0072] See also Figure 2 In some embodiments, step S101 may include but is not limited to steps S201 to S202:

[0073] Step S201, record the original data set X = {x_1, ..., x_n}, determine the maximum value and the minimum value in the original data set, the maximum value is x_max, and the minimum value is x_min;

[0074] Step S202 : transform each data x_i in the original data set X by using the formula y_i=(x_i–x_min) / (x_max–x_min) to generate a candidate data set Y, where the candidate data set Y={y_1,…,y_n}.

[0075] In step S201 of some embodiments, the original data set may include multiple data, and each data in the original data set X is represented by x_i. In addition, the original data set may also include multiple subsets (each subset is represented by x_i in this case), and each subset includes one or more elements. At this time, it is necessary to determine the maximum and minimum values ​​of one or more elements in each subset respectively, and then obtain the conversion value y_i of each element according to the conversion formula, and then construct the candidate data set Y={y_1,…,y_n}.

[0076] See also Figure 3 In some embodiments, step S201 may include but is not limited to steps S301 to S302:

[0077] Step S301, sorting the elements of each original subset in the original data set in ascending order;

[0078] Step S302: The first element of the sorted original subset is taken as the minimum value of the original subset, and the last element is taken as the maximum value of the original subset.

[0079] In step S301 of some embodiments, the original subset can be a smaller data set unit in the original data set, and the data in the same original subset often have some commonality or association. The number of original subsets is the dimension of the original data set. The present application can use a suitable sorting algorithm to sort these elements, such as bubble sort, insertion sort, quick sort, etc. Taking the quick sorting algorithm as an example, first select an element in the original subset as the "reference" element, usually the first element can be selected or an element can be randomly selected. Then compare the other elements in the original subset with the reference element, put the elements smaller than the reference element to the left of the reference element, and put the elements larger than the reference element to the right of the reference element. After this round of comparison and exchange operations, the original subset is divided into two parts, the elements in the left part are all smaller than the reference element, and the elements in the right part are all larger than the reference element. Then repeat the above-mentioned operations of selecting the reference element, comparing and exchanging the elements in the left and right parts of the divided subsets respectively, until there is only one element in each subset or it is an empty set, at which time the elements of the entire original subset are arranged in order from small to large.

[0080] In step S302 of some embodiments, for any sorted original subset, directly take its first element, which is the element with the smallest value in the subset, and define it as the minimum value of the original subset. Similarly, take the last element of the sorted original subset, that is, the element with the largest value in the subset, and define it as the maximum value of the original subset.

[0081] In step S202 of some embodiments, illustratively, an original data set X of a 2-dimensional feature is X={x1, x2}, where x1={1, 2, 3}, then the x of the subset x1 is min =1,x max =3. Further, normalize it to the interval [0, 1], and get y1 = {0, 0.5, 1}. Subset x2 = {-1, 1, 1}, then x min =-1,x max =1. Further, it is normalized to the interval [0, 1], and y1 = {0, 1, 1} is obtained. That is, the candidate data set is obtained

[0082] In step S102 of some embodiments, the covariance matrix ∑ may be the covariance matrix corresponding to the candidate data set Y. The covariance matrix reflects the correlation between different features in the data set and their respective discreteness. By calculating it, it is possible to understand whether two features are positively correlated, negatively correlated, or uncorrelated, and the degree of correlation, as well as the fluctuation of each feature's own data, etc., providing key statistical basis for subsequent further data processing and analysis. The covariance matrix of the candidate data set Y is constructed to obtain the covariance matrix ∑. The specific step calculation formula is as follows ∑=Y T Y.

[0083] For example, calculating the The covariance matrix of

[0084]

[0085] It should be noted that the mean is not calculated in the covariance matrix calculation step of the embodiment of the present application. This is because the present application has normalized the original data set and the obtained candidate data set has been standardized.

[0086] In step S103 of some embodiments, a transformation symmetric matrix A is constructed based on the covariance matrix Σ, and a transformation covariance matrix AΣA is generated based on the covariance matrix Σ and the transformation symmetric matrix A. The transformation symmetric matrix A may be a matrix constructed according to the characteristics of the covariance matrix, and the transformation covariance matrix AΣA may be a transformed covariance matrix calculated based on the covariance matrix Σ and the transformation symmetric matrix A.

[0087] See also Figure 4 In some embodiments, step S103 may include but is not limited to steps S401 to S402:

[0088] Step S401, constructing a transformation symmetric matrix based on the covariance matrix, optimization variables and constraints;

[0089] Step S402, transforming the covariance matrix according to the transformation symmetric matrix to obtain a transformation covariance matrix.

[0090] In step S401 of some embodiments, a transformation symmetric matrix A is constructed based on the covariance matrix Σ, the optimization variables and the constraints. The transformation symmetric matrix A can be a matrix constructed by the covariance matrix Σ, the optimization variables and the constraints. According to the characteristics of the covariance matrix Σ, a suitable transformation symmetric matrix A is selected so that the condition number of the transformation covariance matrix AΣA is close to 1.

[0091] It should be noted that the condition number close to 1 means that the correlation between the various features of the data is in a relatively "harmonious" and balanced state. In data privacy protection technology application scenarios such as differential privacy (for example, the covariance matrix is ​​first transformed and then noise is added to protect privacy in this application), the condition number of the transformed covariance matrix is ​​close to 1, which is a relatively ideal state. On the one hand, it ensures that the data after the privacy protection mechanism adds noise and other operations still has good usability, because the good numerical stability makes the matrix after adding noise not cause the subsequent operation results to lose meaning or be difficult to use due to pathological conditions; on the other hand, it also shows that when performing privacy protection related transformations (such as the process of obtaining the transformed covariance matrix by acting on the covariance matrix through a suitable transformation symmetric matrix), the adjustment of the data structure is well balanced, which not only achieves a certain privacy protection optimization purpose (such as changing some numerical characteristics of the original covariance matrix to make it more difficult to reversely infer the original data privacy information), but also does not excessively destroy the usefulness and stability of the data itself, so that the subsequent differential privacy noise addition, inversion and other operations based on the transformed covariance matrix can maintain the value of data for further analysis and application while protecting privacy.

[0092] The steps of constructing the transformation symmetric matrix A include:

[0093] First, the optimization goal is set: the transformation covariance matrix AΣA is obtained according to the transformation symmetric matrix A and the covariance matrix Σ. The optimization goal is to minimize the condition number κ(AΣA) of the transformation covariance matrix AΣA, that is, taking the half-transformation symmetric matrix A as a variable, the condition number κ(AΣA) is minimized (that is, the condition number of the transformation covariance matrix AΣA is close to 1).

[0094] Next, set the following constraints for the optimization objectives in the above steps:

[0095] Constrained minimization objective: κ(AΣA)<1+γ, where γ is the set optimization accuracy;

[0096] Constrain the transformation symmetric matrix A: The trace norm of the transformation symmetric matrix A does not exceed the set value L, and the transformation symmetric matrix A is a positive definite matrix.

[0097] Finally, according to the constraint target and constraint conditions, the optimization algorithm is executed to obtain a suitable transformation symmetric matrix A. The optimization algorithm can be a quasi-Newton method (such as a BFGS algorithm), etc., which is not specifically limited here.

[0098] In step S402 of some embodiments, the covariance matrix Σ is transformed according to the transformation symmetric matrix A to obtain the transformation covariance matrix AΣA. The method for obtaining the transformation covariance matrix AΣA is to perform matrix multiplication operations on the transformation symmetric matrix A, the covariance matrix Σ and the transformation symmetric matrix A in sequence.

[0099] In step S104 of some embodiments, a differential privacy algorithm is used to add noise to the transformation covariance matrix AΣA to obtain a noise matrix B, and an inverse operation is performed on the noise matrix B to obtain a noise inverse matrix B -1 ; Among them, the essence of the differential privacy algorithm is to add appropriate noise to the data or the operation results based on the data (here is the transformation covariance matrix) so that when processing the data set, publishing statistical information and other operations, the definition of differential privacy is met (that is, for any two adjacent data sets, the processed output results probabilistically meet specific constraints, so as to protect the privacy information of individuals in the data set), thereby preventing the outside from reversely inferring the specific data situation of the individual by analyzing the processed data. It is a commonly used and effective algorithm mechanism in the current field of data privacy protection. The differential privacy algorithm used can be the Laplace mechanism. The noise matrix B can be a matrix obtained by adding noise that meets the requirements of differential privacy to the transformation covariance matrix. The noise matrix B carries information related to the original transformation covariance matrix AΣA while ensuring privacy. Noise inverse matrix B -1 It can be a matrix obtained by inverting the noise matrix B. The noise inverse matrix B -1 It is the key intermediate result for subsequently combining the transformed symmetric matrix A to restore the target inverse covariance matrix that satisfies differential privacy and has stability and effectiveness.

[0100] See also Figure 5 In some embodiments, step S104 may include but is not limited to steps S501 to S502:

[0101] Step S501, determining a sensitivity Δ for adding noise according to a transformation covariance matrix;

[0102] Step S502: adding noise to the transformation covariance matrix according to the sensitivity Δ through the Laplace mechanism to obtain a noisy matrix, where the noisy matrix satisfies ε-differential privacy.

[0103] In step S501 of some embodiments, the sensitivity Δ for adding noise is determined according to the transformation covariance matrix AΣA; the sensitivity Δ may be a sensitivity value calculated according to the transformation covariance matrix AΣA. In the context of differential privacy, the calculation method of sensitivity may vary depending on the specific data application scenario and the processed data structure, and the embodiments of the present application do not limit this. For example, when the data exists in the form of a matrix, such as the aforementioned covariance matrix or other similar matrices that reflect the statistical characteristics of the data, and the focus is on the maximum impact of the overall change of the elements in the matrix on the result, the calculation method of using the sum of the absolute values ​​of the matrix elements as the sensitivity can be used. This summation calculation method is simple and intuitive, and is suitable for scenarios that measure the degree of influence of the overall magnitude change of the data on subsequent processing results (such as query results, output after specific operations, etc.).

[0104] In step S502 of some embodiments, noise is added to the transformation covariance matrix AΣA according to the sensitivity Δ through the Laplace mechanism to obtain a noise matrix B, and the noise matrix B satisfies ε-differential privacy. The noise matrix B can be a matrix obtained by adding noise to the transformation covariance matrix AΣA according to the sensitivity Δ (i.e., adding Laplace noise to protect its privacy).

[0105] See also Figure 6 In some embodiments, step S502 may include but is not limited to steps S601 to S602:

[0106] Step S601, using a random number generator to generate a set of Laplace random numbers subject to a parameter Δ / ε;

[0107] Step S602: assign random number elements in the Laplace random number set to each element of the transformation covariance matrix to obtain a noise matrix.

[0108] In step S601 of some embodiments, the random number generator is a tool or algorithm module that can generate a random number sequence according to a specific probability distribution. ε is a differential privacy parameter, which is essentially a key adjustable parameter in the differential privacy mechanism, used to control the balance between the degree of privacy protection and data availability. The Laplace random number set can be a series of random numbers generated according to the random number generator and the parameter Δ / ε. The purpose of generating a random number sequence is to prepare for the subsequent addition of noise to the transformation covariance matrix, because the differential privacy mechanism often implements privacy protection by adding noise that conforms to a specific distribution (Laplace distribution) to the data-related matrix (i.e., the transformation covariance matrix), so that the processed data meets the requirements of differential privacy, that is, it is difficult for the outside to reversely infer the privacy information in the original data through the processed results.

[0109] In step S602 of some embodiments, the noise matrix B may be a matrix obtained by sequentially assigning random number elements in the Laplace random number set to each element of the transformation covariance matrix AΣA. Specifically, by adding a Laplace random number that obeys Δ / ε to each element of the upper triangular part and the symmetric lower triangular part of the transformation covariance matrix AΣA, the processed noise matrix B satisfies ε-differential privacy.

[0110] In step S105 of some embodiments, according to the noise inverse matrix B -1 And transform the symmetric matrix A, get the target inverse covariance matrix Λ = AB -1 A. The target inverse covariance matrix Λ may be the inverse matrix obtained by adding noise to the covariance matrix of the candidate data set based on the differential privacy algorithm and then inverting it, that is, the target inverse covariance matrix Λ may be the approximate inverse covariance matrix of the candidate data set Y.

[0111] It should be noted that the inverse matrix of the transformation covariance matrix AΣA is (AΣA) -1 =A -1 Σ -1 A -1 , first multiply the transformed symmetric matrix A on the left, then multiply the transformed symmetric matrix A on the right, and we can get the inverse matrix Σ of the covariance matrix Σ -1 , which is the inverse matrix Σ of the covariance matrix Σ -1 =A(AΣA) -1 A=AA -1 Σ -1 A -1 A. Similarly, the noise inverse matrix B -1 After first multiplying the transformed symmetric matrix A on the left and then multiplying the transformed symmetric matrix A on the right, we can get the target inverse covariance matrix Λ=AB -1 A. According to the post-processing guarantee property of differential privacy, the privacy security of the data can be guaranteed, and the utility of the inverse matrix can be guaranteed.

[0112] The biggest difference between the embodiment of the present application and the related art is the introduction of the "transformation symmetric matrix A". From a mathematical point of view, the target inverse covariance matrix AB obtained by the embodiment of the present application through such a construction method is -1 A can not only inherit some characteristics of the original inverse covariance matrix to a certain extent, but also take into account the privacy security brought by differential privacy protection and the requirements of numerical stability and effectiveness after operations such as adding noise, so it can effectively improve the accuracy and stability of the inverse matrix of the covariance matrix.

[0113] See also Figure 7 The present application also provides a data processing device that can implement the above data processing method. The device includes:

[0114] A normalization module 701 is used to normalize the original data set to a preset value range to obtain a candidate data set;

[0115] A construction module 702 is used to construct a covariance matrix for the candidate data set to obtain a covariance matrix;

[0116] A generating module 703, configured to construct a transformation symmetric matrix based on the covariance matrix, and to generate a transformation covariance matrix based on the covariance matrix and the transformation symmetric matrix;

[0117] A noise adding module 704 is used to add noise to the transformation covariance matrix using a differential privacy algorithm to obtain a noise adding matrix, and perform an inverse operation on the noise adding matrix to obtain a noise adding inverse matrix;

[0118] The inverse module 705 is used to obtain a target inverse covariance matrix according to the noise inverse matrix and the transformed symmetric matrix.

[0119] The specific implementation of the data processing device is basically the same as the specific implementation of the above-mentioned data processing method, and will not be repeated here.

[0120] In a third aspect, the present application provides an electronic device, see Figure 8 As shown, it is a structural schematic diagram of an electronic device provided by the present application.

[0121] like Figure 8 As shown, the device includes:

[0122] A memory 31, used for storing computer programs;

[0123] A processor 32, configured to execute a computer program;

[0124] The processor 32 implements the data processing method of any of the above embodiments when executing the computer program.

[0125] Exemplarily, the computer program may be divided into one or more modules / units, one or more modules / units are stored in the memory 31, and executed by the processor 32 to complete the present application. One or more modules / units may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program in the electronic device.

[0126] The processor 32 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0127] The memory 31 can be used to store computer programs and / or modules. The processor 32 realizes various functions of the electronic device by running or executing the computer programs and / or modules stored in the memory 31 and calling the data stored in the memory 31. The memory 31 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory 31 can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0128] It should be noted that the above electronic device includes a processor and a memory, but is not limited to a processor and a memory. Those skilled in the art can understand that Figure 8 The structural diagram is merely an example of the electronic device described above and does not constitute a limitation on the electronic device, and may include more components than shown in the figure, or a combination of certain components, or different components.

[0129] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed, it implements the data processing method of any of the above embodiments.

[0130] It should be understood that the present application implements all or part of the processes in the above-mentioned data processing method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned data processing method can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying computer program code, recording medium, USB flash drive, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of patent practice in the relevant jurisdiction. For example, in some relevant jurisdictions, according to patent practice, the computer-readable medium does not include electric carrier signals and telecommunication signals.

[0131] In a fifth aspect, an embodiment of the present application further provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the data processing method of any of the above embodiments.

[0132] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0133] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM).

[0134] The above are preferred implementations of the present application. It should be pointed out that, for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications are also considered to be within the scope of protection of the present application.

Claims

1. A data processing method, characterized in that: include: Normalize the original data set to a preset value range to obtain a candidate data set; Constructing a covariance matrix for the candidate data set to obtain a covariance matrix; constructing a transformation symmetric matrix based on the covariance matrix, and generating a transformation covariance matrix based on the covariance matrix and the transformation symmetric matrix; Using a differential privacy algorithm, adding noise to the transformation covariance matrix to obtain a noisy matrix, and performing an inverse operation on the noisy matrix to obtain a noisy inverse matrix; A target inverse covariance matrix is ​​obtained according to the noise addition inverse matrix and the transformation symmetric matrix.

2. The data processing method according to claim 1, characterized in that: The step of constructing a transformation symmetric matrix based on the covariance matrix, and generating a transformation covariance matrix based on the covariance matrix and the transformation symmetric matrix, comprises: Constructing the transformation symmetric matrix based on the covariance matrix, optimization variables and constraints; The covariance matrix is ​​transformed according to the transformation symmetric matrix to obtain the transformation covariance matrix.

3. The data processing method according to claim 1, characterized in that: The differential privacy algorithm is used to add noise to the transformation covariance matrix to obtain a noise matrix, including: Determine a sensitivity Δ for adding noise according to the transformation covariance matrix; By using the Laplace mechanism, noise is added to the transformation covariance matrix according to the sensitivity Δ to obtain a noisy matrix, and the noisy matrix satisfies ε-differential privacy.

4. The data processing method according to claim 3, characterized in that: The method of adding noise to the transformation covariance matrix according to the sensitivity Δ through the Laplace mechanism to obtain a noise-added matrix includes: Use a random number generator to generate a set of Laplace random numbers subject to a parameter Δ / ε; The random number elements in the Laplace random number set are allocated to each element of the transformation covariance matrix to obtain the noise matrix.

5. The data processing method according to claim 1, characterized in that: The step of normalizing the original data set to a preset value range to obtain a candidate data set includes: Let the original data set X = {x_1, ..., x_n}, determine the maximum value and the minimum value in the original data set, the maximum value is x_max, and the minimum value is x_min; Each data x_i in the original data set X is converted by the formula y_i=(x_i-x_min) / (x_max-x_min) to generate the candidate data set Y, where the candidate data set Y={y_1,…,y_n}.

6. The data processing method according to claim 5, characterized in that: Determining the maximum value and the minimum value in the original data set includes: Sorting the elements of each original subset in the original data set in ascending order; The first element of the sorted original subset is taken as the minimum value of the original subset, and the last element is taken as the maximum value of the original subset.

7. A data processing device, characterized in that: include: A normalization module is used to normalize the original data set to a preset value range to obtain a candidate data set; A construction module, used to construct a covariance matrix for the candidate data set to obtain a covariance matrix; A generating module, configured to construct a transformation symmetric matrix based on the covariance matrix, and to generate a transformation covariance matrix based on the covariance matrix and the transformation symmetric matrix; A noisy module, used to add noise to the transformation covariance matrix using a differential privacy algorithm to obtain a noisy matrix, and perform an inverse operation on the noisy matrix to obtain a noisy inverse matrix; The inverse module is used to obtain a target inverse covariance matrix according to the noise inverse matrix and the transformation symmetric matrix.

8. An electronic device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements the data processing method according to any one of claims 1 to 6 when executing the computer program.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the data processing method according to any one of claims 1 to 6.

10. A computer program product, characterized in that The computer program product comprises a computer program or computer instructions, and when the computer program or the computer instructions are executed by a processor, the data processing method according to any one of claims 1 to 6 is implemented.

Citation Information

Cited By

  • Rail transit data anti-leakage processing method and device based on matrix transformation

    CN120509054A