Data pollution detection method, detection device, cloud server and terminal device
By generating contamination detection tokens using the RSA encryption algorithm and combining the collaborative work of cloud servers and terminal devices, the problems of search bias and low efficiency in data contamination detection are solved, achieving efficient contamination detection of encrypted data. This method is applicable to searching multidimensional data and other forms of data.
Patent Information
- Application Number
- CN202011268241.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-13
- Publication Date
- 2026-01-16
- Estimated Expiration
- 2040-11-13
AI Technical Summary
Existing technologies fail to effectively detect data contamination, especially when the file itself or the search keywords are contaminated, leading to biased or invalid search results. At the same time, traditional searchable encryption methods are inefficient and cannot meet the search needs of multidimensional data and other forms of data.
The system uses the RSA encryption algorithm to generate contamination detection tokens. Through the collaborative work of cloud servers and terminal devices, it utilizes encrypted contamination detection indexes and detection parameters to perform data contamination detection, ensuring data privacy is not compromised while improving detection efficiency.
It enables contamination detection of encrypted data, ensuring that critical data information is not leaked, and improves detection efficiency with low overhead, making it suitable for searching multidimensional data and other forms of data.
Smart Images

Figure CN114564323B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of communication technology, in particular to a data pollution detection method, a detection device, a cloud server and a terminal device. BACKGROUND
[0002] With the advent of the data era, data has become an important asset for enterprises and individuals, and data pollution problems are becoming more and more valued. Once the data is polluted, it will cause the distortion of the data, and make many scenes out of control. At the same time, with the advent of cloud storage, many data are stored on the cloud, and people often choose to encrypt the data to ensure that the data will not be leaked. Under the premise of ensuring data privacy, how to quickly detect the polluted data in the ciphertext needs to be realized by technical means.
[0003] The existing disclosed technology mainly includes: selecting the text to be uploaded and specifying the keyword, constructing an inverted index to generate an encrypted index and a search authenticator, and sending to the cloud server for storage; the user generates a corresponding search token for a certain keyword, and the cloud server performs a search operation to return a search result; the user generates challenge information for the search result, and the cloud server generates a proof, and the user verifies the proof value to complete the search result verification; the user selects the file to be added / deleted, generates an update token, and the cloud server updates the encrypted index, the search authenticator, and returns the update information. The technology does not leak user data information to the cloud server and attackers, the user can search the ciphertext stored in the cloud server using the keyword, and can authenticate the correctness of the search result, supports dynamic update of user files, ensures the confidentiality of user data and the correctness of the search result.
[0004] However, the above-mentioned disclosed technology has the following technical problems:
[0005] 1. It does not consider the pollution problem of the file itself or the search keyword. If the file to be searched or the keyword in the index is polluted, the result obtained after searching will also be biased or invalid.
[0006] 2. In the process of constructing the encrypted index, the traditional searchable encryption method is used to construct the index, and the form of the index is a dictionary, which only supports the search of a single keyword, and the efficiency may be low, which cannot meet the daily needs of users.
[0007] 3. Only supports the search of the keyword (file) form, cannot search other forms of data (such as multi-dimensional data, images, audio), and does not consider the universality of data. SUMMARY
[0008] The embodiment of the present application aims to provide a data pollution detection method, a detection device, a cloud server and a terminal device, so as to solve the problem that the existing data pollution detection scheme does not consider the pollution of the file itself or the search keyword.
[0009] In order to solve the above problems, the embodiment of the present application provides a data pollution detection method, which is executed by a detection device and includes the following steps:
[0010] Obtaining the data to be detected and a pollution detection token of the data to be detected;
[0011] Sending a data detection request to a cloud server, wherein the data detection request carries the pollution detection token;
[0012] Receiving a detection parameter obtained by processing an encrypted pollution detection index of the data to be detected according to the pollution detection token by the cloud server;
[0013] According to the detection parameter and the pollution detection token, performing pollution detection on the data to be detected.
[0014] Among them, obtaining the pollution detection token of the data to be detected includes:
[0015] According to the data label of the data to be detected, the identity of the detection device and the timestamp, a signature is generated;
[0016] Sending a pollution detection request to a terminal device, wherein the pollution detection request carries the signature;
[0017] In the case that the signature is verified successfully by the terminal device, receiving a pollution detection token sent by the terminal device, wherein the pollution detection token is generated by the terminal device according to the data label.
[0018] Among them, according to the data label of the data to be detected, the identity of the detection device and the timestamp, a signature is generated, including:
[0019] Using the private key of RSA encryption algorithm and hash function to process the data label of the data to be detected, the identity of the detection device and the timestamp, to generate the signature.
[0020] Among them, according to the detection parameter and the pollution detection token, the pollution detection on the data to be detected includes:
[0021] Decrypting the detection parameter to obtain a pollution detection index corresponding to the data label of the data to be detected;
[0022] According to the pollution detection index corresponding to the data label, processing the data to be detected to obtain a pollution reference value;
[0023] The pollution reference value is compared with a data pollution threshold in the pollution detection token to obtain a pollution detection result.
[0024] The pollution detection index is a set of expectation and variance of the to-be-detected data.
[0025] The pollution reference value is obtained by processing the to-be-detected data according to the pollution detection index corresponding to the data label.
[0026] According to a first formula, the pollution reference value R is determined S (x).
[0027]
[0028] The set of expectation and variance of the to-be-detected data is Δ. x′ j represents the jth to-be-detected data; μ j represents the variance of the jth to-be-detected data; σ j represents the expectation of the jth to-be-detected data.
[0029] The pollution detection token includes a three-element tuple (T[1], T[2], T[3]); wherein,
[0030] The first element T[1] is related to each coefficient of the set polynomial corresponding to the data label of the to-be-detected data.
[0031] The second element T[2] is the first coefficient of the set polynomial corresponding to the data label of the to-be-detected data.
[0032] The third element T[3] is the data pollution threshold corresponding to the data label of the to-be-detected data.
[0033] The embodiment of the application also provides a data pollution detection processing method, which is executed by a cloud server and includes the following steps.
[0034] Receiving encrypted data uploaded by a terminal device.
[0035] Receiving a data detection request sent by a detection device, wherein the data detection request carries a pollution detection token of to-be-detected data.
[0036] Processing an encrypted pollution detection index of the to-be-detected data according to the pollution detection token to obtain a detection parameter.
[0037] Sending the detection parameter to the detection device.
[0038] Before processing the encrypted contamination detection index of the data to be detected based on the contamination detection token to obtain the detection parameters, the method further includes:
[0039] The terminal device receives an encrypted contamination detection index, which is obtained by the terminal device using a private key of the RSA encryption algorithm.
[0040] The pollution detection token includes a triplet of elements (T[1], T[2], T[3]);
[0041] The first element T[1] is related to each coefficient of the set polynomial corresponding to the data label of the data to be detected;
[0042] The second element T[2] is the first coefficient of the set polynomial corresponding to the data label of the data to be detected;
[0043] The third element T[3] is the data contamination threshold corresponding to the data label of the data to be detected.
[0044] Specifically, the encrypted contamination detection index of the data to be detected is processed according to the contamination detection token to obtain detection parameters, including:
[0045] The first vector is obtained based on the first element and the encryption matrix corresponding to the encrypted data;
[0046] The second vector is obtained by processing each parameter in the first vector according to the second element and the public key of the RSA encryption algorithm.
[0047] The detection parameters are determined based on the second vector and the encryption contamination detection index.
[0048] The detection parameters are determined based on the second vector and the encryption contamination detection index, including:
[0049] The detection parameter R(x) is determined according to the second formula; the second formula is:
[0050]
[0051] Where R(x) is the detection parameter; Y′ is the second vector; This is an index for encrypted contamination detection.
[0052] This invention also provides a data contamination detection processing method, executed by a terminal device, comprising:
[0053] The dataset is encrypted, and the encrypted data is uploaded to the cloud server.
[0054] verifying the signature of the detection device, and generating a pollution detection token according to a data label of the to-be-detected data contained in the signature in a case where the signature verification succeeds;
[0055] sending the pollution detection token to the detection device, the pollution detection token being used to assist the detection device in performing pollution detection on the to-be-detected data.
[0056] The method further includes, after the data set is encrypted and the encrypted data is uploaded to the cloud server:
[0057] classifying the data set and determining a data label of each class of data;
[0058] constructing a pollution detection index corresponding to the data label of each class of data according to an expectation and a variance of each class of data;
[0059] encrypting the pollution detection index and uploading the obtained encrypted pollution detection index to the cloud server.
[0060] The encryption of the pollution detection index includes:
[0061] encrypting the pollution detection index by using a private key in the RSA encryption algorithm to obtain the encrypted pollution detection index.
[0062] The method further includes, after the data set is classified and the data label of each class of data is determined:
[0063] processing data samples of each class of data so that each class of data obeys a Gaussian distribution.
[0064] The method further includes:
[0065] processing data samples of each class of data to obtain a data pollution threshold corresponding to the data label of each class of data.
[0066] The verification of the signature of the detection device includes:
[0067] receiving a pollution detection request sent by a terminal device, the pollution detection request carrying the signature; the signature being generated by a data label of to-be-detected data, an identity of the detection device, and a timestamp;
[0068] verifying the signature by using a public key of the RSA encryption algorithm;
[0069] generating a pollution detection token according to the data label of the to-be-detected data contained in the signature in a case where the signature verification succeeds.
[0070] The pollution detection token comprises a triple element (T[1], T[2], T[3]); wherein,
[0071] The first element T[1] is related to each coefficient of a set polynomial corresponding to a data tag of the to-be-detected data;
[0072] The second element T[2] is a first coefficient of a set polynomial corresponding to a data tag of the to-be-detected data;
[0073] The third element T[3] is a data pollution threshold corresponding to a data tag of the to-be-detected data.
[0074] The embodiment of the present application also provides a data pollution detection device, which is applied to a detection equipment and comprises:
[0075] A first acquisition module is configured to acquire to-be-detected data and a pollution detection token of the to-be-detected data;
[0076] A first request sending module is configured to send a data detection request to a cloud server, wherein the data detection request carries the pollution detection token;
[0077] A parameter receiving module is configured to receive a detection parameter obtained by processing, by the cloud server, an encrypted pollution detection index of the to-be-detected data according to the pollution detection token;
[0078] A detection module is configured to perform pollution detection on the to-be-detected data according to the detection parameter and the pollution detection token.
[0079] The embodiment of the present application also provides a detection equipment, which comprises a processor and a transceiver, wherein the transceiver receives and sends data under the control of the processor, and the processor is configured to perform the following operations:
[0080] Acquire to-be-detected data and a pollution detection token of the to-be-detected data;
[0081] Send a data detection request to a cloud server, wherein the data detection request carries the pollution detection token;
[0082] Receive a detection parameter obtained by processing, by the cloud server, an encrypted pollution detection index of the to-be-detected data according to the pollution detection token;
[0083] Perform pollution detection on the to-be-detected data according to the detection parameter and the pollution detection token.
[0084] The embodiment of the present application also provides a processing device for data pollution detection, which is applied to a cloud server and comprises:
[0085] A data receiving module is configured to receive encrypted data uploaded by a terminal device;
[0086] The request receiving module is configured to receive a data detection request sent by the detection device, wherein the data detection request carries a pollution detection token of the to-be-detected data.
[0087] The processing module is configured to process an encrypted pollution detection index of the to-be-detected data according to the pollution detection token, to obtain a detection parameter.
[0088] The parameter sending module is configured to send the detection parameter to the detection device.
[0089] The embodiment of the application further provides a cloud server, comprising a processor and a transceiver, wherein the transceiver receives and sends data under the control of the processor, and the processor is configured to perform the following operations:
[0090] Receive encrypted data uploaded by a terminal device;
[0091] Receive a data detection request sent by a detection device, wherein the data detection request carries a pollution detection token of to-be-detected data;
[0092] Process an encrypted pollution detection index of the to-be-detected data according to the pollution detection token, to obtain a detection parameter;
[0093] Send the detection parameter to the detection device.
[0094] The embodiment of the application further provides a data pollution detection processing device, which is applied to a terminal device and comprises:
[0095] The encrypted uploading module is configured to encrypt a data set and upload encrypted data to a cloud server;
[0096] The verification generating module is configured to verify a signature of a detection device, and generate a pollution detection token according to a data tag of to-be-detected data contained in the signature in the case that the signature verification is successful;
[0097] The token sending module is configured to send the pollution detection token to the detection device, wherein the pollution detection token is used to assist the detection device in performing pollution detection on the to-be-detected data.
[0098] The embodiment of the application further provides a terminal device, comprising a processor and a transceiver, wherein the transceiver receives and sends data under the control of the processor, and the processor is configured to perform the following operations:
[0099] Encrypt a data set and upload encrypted data to a cloud server;
[0100] Verify a signature of a detection device, and generate a pollution detection token according to a data tag of to-be-detected data contained in the signature in the case that the signature verification is successful;
[0101] sending a pollution detection token to the detection device, the pollution detection token being used to assist the detection device in pollution detection on the to-be-detected data.
[0102] The embodiment of the present application further provides a communication device, comprising a memory, a processor and a program stored in the memory and executable on the processor, and the processor implements the data pollution detection method as described above when executing the program; or the processor implements the processing method of data pollution detection as described above when executing the program.
[0103] The embodiment of the present application further provides a computer readable storage medium, which stores a computer program, and the program implements the steps in the data pollution detection method as described above when executed by a processor; or the program implements the steps in the processing method of data pollution detection as described above when executed by a processor.
[0104] The above technical solution of the present application has at least the following beneficial effects:
[0105] In the data pollution detection method, the detection device and the terminal device of the embodiment of the present application, the terminal device stores the encrypted data to the cloud server and generates an encrypted pollution detection index and uploads it to the cloud server, the detection device sends a pollution detection request to the terminal device and verifies the identity, and obtains a pollution detection token after successful verification; the detection device performs pollution detection on the cloud server side by holding the pollution detection token, and obtains a pollution detection result, thereby realizing pollution detection on the ciphertext data. BRIEF DESCRIPTION OF DRAWINGS
[0106] Figure 1 A step flow chart of the data pollution detection method provided by the embodiment of the present application is shown;
[0107] Figure 2 An entity interaction schematic diagram related to the data pollution detection method provided by the embodiment of the present application is shown;
[0108] Figure 3 One of the step flow charts of the processing method of data pollution detection provided by the embodiment of the present application is shown;
[0109] Figure 4 The second step flow chart of the processing method of data pollution detection provided by the embodiment of the present application is shown;
[0110] Figure 5 A structure schematic diagram of the data pollution detection device provided by the embodiment of the present application is shown;
[0111] Figure 6 A structure schematic diagram of the detection device provided by the embodiment of the present application is shown;
[0112] Figure 7 Fig. 1 shows a structural schematic diagram of a processing device for data pollution detection according to an embodiment of the present application;
[0113] Figure 8 Fig. 2 shows a structural schematic diagram of a cloud server according to an embodiment of the present application;
[0114] Figure 9 Fig. 3 shows another structural schematic diagram of a processing device for data pollution detection according to an embodiment of the present application;
[0115] Figure 10 Fig. 4 shows a structural schematic diagram of a terminal device according to an embodiment of the present application. DETAILED DESCRIPTION
[0116] To make the technical problems, technical solutions and advantages of the present application clearer, specific embodiments will be described in detail below with reference to the accompanying drawings.
[0117] As shown in Fig. 1, a data pollution detection method according to an embodiment of the present application is provided, which is executed by a detection device and includes: Figure 1
[0118] Step 101: obtaining to-be-detected data and a pollution detection token of the to-be-detected data;
[0119] Step 102: sending a data detection request to a cloud server, wherein the data detection request carries the pollution detection token;
[0120] Step 103: receiving a detection parameter obtained by the cloud server processing an encrypted pollution detection index of the to-be-detected data according to the pollution detection token;
[0121] Step 104: performing pollution detection on the to-be-detected data according to the detection parameter and the pollution detection token.
[0122] The data pollution detection method according to an embodiment of the present application mainly involves three entities, i.e., a detection device, a cloud server and a terminal device (which is a data owner). As shown in Fig. 1, the terminal device first encrypts local data and uploads the data to the cloud server, the detection device submits a pollution detection request and identity authentication information to the terminal device, and then submits a data detection request to the cloud server by using a pollution detection token returned by the terminal device after verification succeeds, the cloud server receives the pollution detection token and returns relevant detection parameters, the detection device decrypts the relevant parameters and performs pollution detection on to-be-detected data to obtain a detection result, i.e., whether the to-be-detected data is polluted. Figure 2
[0123] As an optional embodiment, the pollution detection token of the to-be-detected data obtained in step 101 includes:
[0124] A signature is generated based on the data label of the data to be tested, the identification of the testing device, and the timestamp;
[0125] Send a contamination detection request to the terminal device, the contamination detection request carrying the signature;
[0126] If the terminal device successfully verifies the signature, it receives a contamination detection token sent by the terminal device; wherein the contamination detection token is generated by the terminal device based on the data tag.
[0127] As an optional embodiment, the pollution detection token includes a triplet (T[1], T[2], T[3]); wherein,
[0128] The first element T[1] is related to each coefficient of the set polynomial corresponding to the data label of the data to be detected;
[0129] The second element T[2] is the first coefficient of the set polynomial corresponding to the data label of the data to be detected;
[0130] The third element T[3] is the data contamination threshold corresponding to the data label of the data to be detected.
[0131] In at least one embodiment of the present invention, a signature is generated based on the data tag of the data to be detected, the identification identifier of the detection device, and the timestamp, including:
[0132] The signature is generated by processing the data tag of the data to be detected, the identity identifier of the detection device, and the timestamp of the RSA encryption algorithm using the private key and hash function.
[0133] For example, the detection device uses a personal private key sk DT And the hash function H and the data label l of the data to be detected q Personal identification information (ID) and timestamp (TS) are used to generate a signature Sig = Enc skDT (H(TS||ID||l q )).
[0134] As an optional embodiment of the present invention, step 104 includes:
[0135] The detection parameters are decrypted to obtain the contamination detection index corresponding to the data tag of the data to be detected; for example, the detection device needs to use the private key of the RSA encryption algorithm to decrypt the detection parameters with the assistance of the terminal device.
[0136] Based on the pollution detection index corresponding to the data label, the data to be detected is processed to obtain a pollution reference value;
[0137] The pollution reference value is compared with a data pollution threshold in the pollution detection token (i.e., a third element T[3]), and a pollution detection result is obtained.
[0138] For example, the detection parameter is R(x); R'(x) is obtained by decrypting the detection parameter R(x); the root of R'(x) is a pollution detection index corresponding to the data tag; in one specific implementation in the embodiment of the application, the pollution detection index is a set of expectation and variance of the to-be-detected data; that is, the detection device obtains the set of expectation and variance of the to-be-detected data by decrypting the detection parameter
[0139] Correspondingly, the pollution reference value is obtained by processing the to-be-detected data according to the pollution detection index corresponding to the data tag, and the processing method comprises the following steps of:
[0140] According to the first formula, the pollution reference value R S (x) is determined.
[0141]
[0142] Wherein, the set of expectation and variance of the to-be-detected data is Δ; The jth to-be-detected data is represented by j; μ j The variance of the jth to-be-detected data is represented by σ j The expectation of the jth to-be-detected data is represented by μ.
[0143] Further, the third element T[3] of the pollution detection token is compared with R S (x), and when R S (x) < T[3], it is indicated that the to-be-detected data is polluted, that is, RS=true; otherwise, it is indicated that the to-be-detected data is not polluted, that is, RS=false.
[0144] In summary, in the embodiment of the application, the terminal device stores the encrypted data to the cloud server, generates an encrypted pollution detection index and uploads it to the cloud service, the detection device sends a pollution detection request to the terminal device and verifies the identity, and obtains the pollution detection token after successful verification; the detection device holds the pollution detection token to perform pollution detection on the cloud server side and obtains the pollution detection result, thereby realizing the pollution detection of the ciphertext data; and the application adopts the RSA multiplication homomorphic encryption to construct the encrypted detection index and the detection token, so that the key information of the data is not leaked, the data can be detected with low overhead, and the detection efficiency can be improved in the pollution detection process.
[0145] As Figure 3 shown, the embodiment of the application also provides a data pollution detection processing method, which is executed by a cloud server and comprises the following steps of:
[0146] Step 301, receiving encrypted data uploaded by a terminal device;
[0147] Step 302, receiving a data detection request sent by a detection device, wherein the data detection request carries a pollution detection token of data to be detected;
[0148] Step 303, processing an encrypted pollution detection index of the data to be detected according to the pollution detection token to obtain a detection parameter;
[0149] Step 304, sending the detection parameter to the detection device.
[0150] As an optional embodiment, before step 303, the method further comprises:
[0151] receiving an encrypted pollution detection index sent by a terminal device, wherein the encrypted pollution detection index is encrypted by a private key of an RSA encryption algorithm by the terminal device.
[0152] The pollution detection token comprises a three-element tuple (T[1], T[2], T[3]); wherein,
[0153] The first element T[1] is related to each coefficient of a set polynomial corresponding to a data tag of the data to be detected;
[0154] The second element T[2] is a first coefficient of a set polynomial corresponding to a data tag of the data to be detected;
[0155] The third element T[3] is a data pollution threshold corresponding to a data tag of the data to be detected.
[0156] As an optional embodiment, step 303 comprises:
[0157] obtaining a first vector according to the first element and an encryption matrix M corresponding to the encrypted data D ;
[0158] processing each parameter in the first vector according to the second element and a public key of the RSA encryption algorithm to obtain a second vector;
[0159] determining the detection parameter according to the second vector and the encrypted pollution detection index.
[0160] For example, the cloud server first takes out T[1], calculates a first vector Y=T[1]·M D =(γ1,γ2,...γ θ ); the cloud server takes out T[2] and calculates γ′ i =Enc i (γ, PK) for each parameter γ in the first vector using the public key of the RSA encryption algorithm.RSA (γ i )·Enc RSA (T[2]), after all calculations are completed, the second vector Y′=(γ′1,γ′2,...γ′) is obtained. θ Finally, the cloud server calculates the detection parameters. That is, the detection parameters are determined based on the second vector and the encryption contamination detection index, including:
[0161] The detection parameter R(x) is determined according to the second formula; the second formula is:
[0162]
[0163] Where R(x) is the detection parameter; Y′ is the second vector; This is an index for encrypted contamination detection.
[0164] In summary, in this embodiment of the invention, the terminal device encrypts the data and stores it on the cloud server, and generates an encrypted contamination detection index which is also uploaded to the cloud service. The detection device sends a contamination detection request to the terminal device and verifies its identity. Upon successful verification, it obtains a contamination detection token. The detection device holds the contamination detection token and performs contamination detection on the cloud server, obtaining the contamination detection result, thus realizing the contamination detection of encrypted data. Furthermore, this invention uses RSA multiplication homomorphic encryption to construct the encrypted detection index and detection token, ensuring that the key information of the data is not leaked while enabling data detection with low overhead, thereby improving detection efficiency during the contamination detection process.
[0165] like Figure 4 As shown, this embodiment of the invention also provides a data contamination detection processing method, executed by a terminal device, including:
[0166] Step 401: Encrypt the dataset and upload the encrypted data to the cloud server; for example, use the commonly used symmetric encryption algorithm AES to encrypt the dataset.
[0167] Step 402: Verify the signature of the detection device. If the signature verification is successful, generate a contamination detection token based on the data tag of the data to be detected contained in the signature.
[0168] Step 403: Send a contamination detection token to the detection device. The contamination detection token is used to assist the detection device in performing contamination detection on the data to be tested.
[0169] For example, the detection device uses a personal private key sk DT And the hash function H and the data label l of the data to be detected q Generate a signature using personal identification information (ID) and timestamp (TS). After the terminal device receives the signature, the validity of the ID and the TS is verified first, and after the verification, the signature is verified by using the public key.
[0170] In the embodiment of the application, in addition to the encryption processing of the data set, the terminal device also needs to classify the data, and obtain the expectation and variance of each type of data by calculation (so that it conforms to the Gaussian distribution), and generate a data pollution detection index for it, and generate a series of data pollution thresholds through a machine learning algorithm.
[0171] In the embodiment of the application, the data is processed into a form conforming to the Gaussian model through logarithmic processing or the like, and the data is detected for pollution under the Gaussian model through the knowledge of related machine learning, which is efficient and convenient, can capture more pollution values, and makes the detection data more accurate.
[0172] Correspondingly, after step 401, the method further includes:
[0173] classifying the data set to determine the data label of each type of data;
[0174] constructing a pollution detection index corresponding to the data label of the data according to the expectation and variance of each type of data;
[0175] encrypting the pollution detection index, and uploading the obtained encrypted pollution detection index to the cloud server.
[0176] For example, the terminal device divides the data set into a training set, a cross-validation set and a test set; trains each type of data set, and constructs a pollution detection index I using the data label and the expectation and variance thereof.
[0177] The encryption of the pollution detection index includes:
[0178] encrypting the pollution detection index using the private key in the RSA encryption algorithm to obtain an encrypted pollution detection index. For example, the pollution detection index I is encrypted using a pseudo-random function f and the private key in the RSA encryption to generate an encrypted pollution detection index and uploaded to the cloud server.
[0179] As an optional embodiment, after classifying the data set to determine the data label of each type of data, the method further includes:
[0180] processing the data samples of each type of data so that each type of data conforms to the Gaussian distribution. Assuming that the data is divided into θ types, and the data label is denoted as l i . For each type of data set l i = (x (1) , x (2) x (3) ..., x (n) ) T , i.e. it is n-dimensional vector data, the data samples are processed (e.g. taking logarithm) so that they are all Gaussian distributed, i.e. x (i) ~ N (μ, σ 2 ).
[0181] As a further optional embodiment, the method further comprises:
[0182] processing the data samples of each type of data to obtain a data pollution threshold corresponding to the data label of each type of data.
[0183] For example, the terminal device uses the data samples in the cross-validation set to obtain the data pollution threshold ε i by calculating the F (the ratio of accuracy and recall) value of the samples. The data label l i of the data and the pollution threshold ε l are used to construct a verification dictionary D T = [l i : ε i ].
[0184] As another optional embodiment, step 402 comprises:
[0185] receiving a pollution detection request sent by the terminal device, the pollution detection request carrying the signature; the signature is generated by the data label of the data to be detected, the identity of the detection device and the timestamp;
[0186] verifying the signature using the public key of the RSA encryption algorithm;
[0187] in the case of successful signature verification, generating a pollution detection token according to the data label of the data to be detected contained in the signature.
[0188] wherein the pollution detection token includes a three-element tuple (T[1], T[2], T[3]); wherein,
[0189] the first element T[1] is related to each coefficient of the set polynomial corresponding to the data label of the data to be detected;
[0190] the second element T[2] is the first coefficient of the set polynomial corresponding to the data label of the data to be detected;
[0191] the third element T[3] is the data pollution threshold corresponding to the data label of the data to be detected.
[0192] For example, assuming that the data label set of the data to be detected is Q, a polynomial p Q(x) ; in order to hide the length of the token, fix the token to a fixed length θ, and fill the polynomial remainder with random numbers. To p Q Each coefficient (β0, β1,..., β θ ) in (x) is multiplied by M θ -1 , T[2] = β0. The terminal device calculates T[1] = (β1,..., β q )·M T , T[2] = β0 according to the data label l q of the data to be detected. q Find the corresponding pollution threshold ε i in D i , and record T[3] = ε (1) . Let T = (T[1], T[2], T[3]), generate a three-tuple pollution detection token T.
[0193] In summary, in the terminal device of the embodiment of the application, the data is encrypted and stored in the cloud server, and an encrypted pollution detection index is generated and uploaded to the cloud service. The detection device sends a pollution detection request to the terminal device and verifies the identity. After successful verification, the pollution detection token is obtained. The detection device holds the pollution detection token to perform pollution detection on the cloud server side and obtains the pollution detection result, thereby realizing pollution detection of the ciphertext data. The application adopts RSA multiplication homomorphism encryption to construct an encrypted detection index and a detection token, which ensures that the key information of the data is not leaked, and at the same time, the data can be detected with low overhead, and the detection efficiency can be improved in the pollution detection process.
[0194] In order to more clearly describe the data pollution detection method provided by the embodiment of the application, the following will be combined with the data pollution detection system (including a detection device, a cloud server and a terminal device) shown in the accompanying drawings to describe the flow: Figure 2
[0195] The terminal device first encrypts the data set D, and the algorithm can be a commonly used symmetric encryption algorithm such as AES, to obtain encrypted data D', and uploads it to the cloud server. Next, the terminal device classifies the data set, assuming that the data is divided into θ classes, and the data label is denoted as l i . For each data set l i = (x (1) ,x (2) ,x (3) ,...,x (n) ) T , that is, it is an n-dimensional vector data, and the data sample is processed (such as taking logarithm), so that it is subject to Gaussian distribution, that is, x (i) ~ N(μ, σ 2 ).
[0196] The terminal device divides the dataset into a training set, a cross-validation set, and a test set. For each data category, the terminal device trains and constructs a contamination detection index I using the data labels, their expected values, and variances. Finally, using data samples from the cross-validation set, the data contamination threshold ε is obtained by calculating the F-values of the samples. i Using its data label l i With pollution threshold ε l Construct the verification dictionary D T =[l i :ε i ].
[0197] The terminal device uses a pseudo-random function f and the private key in RSA encryption to encrypt the contamination detection index I, generating an encrypted contamination detection index. And Uploaded to the cloud server.
[0198] The detection device sends a pollution detection request C to the terminal device, first using the personal private key sk. DT And the hash function H and the data label l to be queried q Personal identification information (ID) and timestamp (TS) are used to generate a signature. And Sig||TS||ID||l q The message is sent to the terminal device. Upon receiving the message, the terminal device first verifies the validity of the ID and TS. After verification, it uses the public key to verify the signature.
[0199] After successful signature verification, the terminal device uses the data tag l q Generate a pollution detection token T for DT and send T to the detection device. The pollution detection token is a triplet element T = (T[1], T[2], T[3]).
[0200] The detection device uses the detection token T to encrypt the detection index. Perform data contamination detection. The process is as follows:
[0201] The cloud server first retrieves T[1] and calculates Y = T[1]·M D =(γ1,γ2,…γ) θ );
[0202] The cloud server retrieves T[2] for each parameter γ in Y. i γ is calculated using the public key encrypted with RSA. i ′=Enc RSA (γ i )·Enc RSA (T[2]), after all calculations are completed, the new vector Y′=(γ′1,γ′2,...γ′) is obtained. θ ).
[0203] Cloud server computing And send it to the detection device. The detection device decrypts R(x) with the assistance of the terminal device to obtain R'(x). The root of R'(x) is the data label l q The corresponding pollution detection index, that is, the detection device obtains the expected value and variance set corresponding to the data to be detected
[0204] The detection device uses the parameters in delta and the data to be detected Calculate Take out T[3] and R S (x) comparison, when R S (x) < T[3], it means that the detection data is polluted, and RS=tur is recorded; otherwise, it means that the data is qualified, and RS=false is recorded, and the pollution detection result is obtained.
[0205] In the embodiment of the application, the terminal device stores the encrypted data to the cloud server, generates an encrypted pollution detection index and uploads it to the cloud service, the detection device sends a pollution detection request to the terminal device and verifies the identity, and obtains a pollution detection token after successful verification; the detection device holds the pollution detection token to perform pollution detection on the cloud server side and obtains the pollution detection result, realizing the pollution detection of the ciphertext data; and the application adopts RSA multiplication homomorphic encryption to construct the encrypted detection index and the detection token, ensuring that the key information of the data is not leaked, and at the same time, the data can be detected with low overhead, and the detection efficiency can be improved in the pollution detection process.
[0206] As shown in Figure 5 The embodiment of the application also provides a data pollution detection device applied to a detection device, comprising:
[0207] The first acquisition module 501 is configured to acquire the data to be detected and the pollution detection token of the data to be detected.
[0208] The first request sending module 502 is configured to send a data detection request to the cloud server, wherein the data detection request carries the pollution detection token.
[0209] The parameter receiving module 503 is configured to receive detection parameters obtained by processing the encrypted pollution detection index of the data to be detected by the cloud server according to the pollution detection token.
[0210] The detection module 504 is configured to perform pollution detection on the data to be detected according to the detection parameters and the pollution detection token.
[0211] As an optional embodiment, the first acquisition module comprises:
[0212] The generating sub-module is configured to generate a signature according to a data tag of the to-be-detected data, an identity of the detection device, and a timestamp;
[0213] The request sending sub-module is configured to send a pollution detection request to a terminal device, where the pollution detection request carries the signature.
[0214] The token receiving sub-module is configured to receive a pollution detection token sent by the terminal device in a case where the terminal device successfully verifies the signature.
[0215] As an optional embodiment, the generating sub-module includes:
[0216] The generating unit is configured to process the data tag of the to-be-detected data, the identity of the detection device, and the timestamp by using a private key of an RSA encryption algorithm and a hash function, to generate the signature.
[0217] As an optional embodiment, the detection module includes:
[0218] The decryption sub-module is configured to decrypt the detection parameter to obtain a pollution detection index corresponding to the data tag of the to-be-detected data.
[0219] The processing sub-module is configured to process the to-be-detected data according to the pollution detection index corresponding to the data tag to obtain a pollution reference value.
[0220] The detection sub-module is configured to compare the pollution reference value with a data pollution threshold in the pollution detection token to obtain a pollution detection result.
[0221] As an optional embodiment, the pollution detection index is a set of expectation and variance of to-be-detected data.
[0222] The processing sub-module includes:
[0223] The processing unit is configured to determine the pollution reference value R S (x) according to a first formula.
[0224]
[0225] wherein the set of expectation and variance of to-be-detected data is Δ. x′ j represents the jth to-be-detected data; μ j represents the variance of the jth to-be-detected data; σ j represents the expectation of the jth to-be-detected data.
[0226] As an optional embodiment, the pollution detection token comprises a triple element (T[1], T[2], T[3]);
[0227] The first element T[1] is related to each coefficient of the set polynomial corresponding to the data tag of the to-be-detected data;
[0228] The second element T[2] is the first coefficient of the set polynomial corresponding to the data tag of the to-be-detected data;
[0229] The third element T[3] is the data pollution threshold corresponding to the data tag of the to-be-detected data.
[0230] In the embodiment of the application, the terminal device stores the encrypted data to the cloud server, generates an encrypted pollution detection index and uploads it to the cloud service, the detection device sends a pollution detection request to the terminal device and verifies the identity, and obtains a pollution detection token after successful verification; the detection device holds the pollution detection token to perform pollution detection on the cloud server side and obtains a pollution detection result, thereby realizing pollution detection on the ciphertext data; and the application adopts RSA multiplication homomorphic encryption to construct an encrypted detection index and a detection token, which ensures that the key information of the data is not leaked, and at the same time, the data can be detected with low overhead, and the detection efficiency can be improved in the pollution detection process.
[0231] It should be noted that the data pollution detection device provided by the embodiment of the application is a device capable of executing the above-mentioned data pollution detection method, and all embodiments of the above-mentioned data pollution detection method are applicable to the device, and can achieve the same or similar beneficial effects.
[0232] As shown in Figure 6 The embodiment of the application also provides a detection device, which comprises a processor 600 and a transceiver 610, the transceiver 610 receives and sends data under the control of the processor 600, and the processor 600 is used to perform the following operations:
[0233] Obtain to-be-detected data and a pollution detection token of the to-be-detected data;
[0234] Send a data detection request to a cloud server, wherein the data detection request carries the pollution detection token;
[0235] Receive a detection parameter obtained by processing, by the cloud server, an encrypted pollution detection index of the to-be-detected data according to the pollution detection token;
[0236] According to the detection parameter and the pollution detection token, perform pollution detection on the to-be-detected data.
[0237] As an optional embodiment, the processor is further used to perform the following operations:
[0238] generate a signature according to a data tag of the to-be-detected data, an identity of the detection device, and a timestamp;
[0239] send a pollution detection request to a terminal device, the pollution detection request carrying the signature;
[0240] in a case where the terminal device successfully verifies the signature, receive a pollution detection token sent by the terminal device; wherein the pollution detection token is generated by the terminal device according to the data tag.
[0241] As an optional embodiment, the processor is further configured to perform the following operation:
[0242] process the data tag of the to-be-detected data, the identity of the detection device, and the timestamp by using a private key of an RSA encryption algorithm and a hash function, to generate the signature.
[0243] As an optional embodiment, the processor is further configured to perform the following operation:
[0244] decrypt the detection parameter to obtain a pollution detection index corresponding to the data tag of the to-be-detected data;
[0245] process the to-be-detected data according to the pollution detection index corresponding to the data tag to obtain a pollution reference value;
[0246] compare the pollution reference value with a data pollution threshold in the pollution detection token to obtain a pollution detection result.
[0247] As an optional embodiment, the pollution detection index is a set of expectation and variance of to-be-detected data.
[0248] The processor is further configured to perform the following operation:
[0249] determine the pollution reference value R S (x) according to a first formula.
[0250]
[0251] wherein the set of expectation and variance of to-be-detected data is Δ. x′ j represents the jth to-be-detected data; μ j represents the variance of the jth to-be-detected data; σ j represents the expectation of the jth to-be-detected data.
[0252] As an optional embodiment, the pollution detection token includes a triple element (T[1], T[2], T[3]); wherein,
[0253] The first element T[1] is related to each coefficient of the set polynomial corresponding to the data label of the data to be detected;
[0254] The second element T[2] is the first coefficient of the set polynomial corresponding to the data label of the data to be detected.
[0255] The third element T[3] is the data pollution threshold corresponding to the data label of the data to be detected.
[0256] In the embodiment of the application, the terminal device stores the encrypted data to the cloud server, generates an encrypted pollution detection index and uploads it to the cloud service, the detection device sends a pollution detection request to the terminal device and verifies the identity, and obtains a pollution detection token after successful verification; the detection device holds the pollution detection token to perform pollution detection at the cloud server end and obtains a pollution detection result, thereby realizing pollution detection of the ciphertext data; and the application adopts RSA multiplication homomorphic encryption to construct the encrypted detection index and the detection token, ensures that the key information of the data is not leaked, and can detect the data at low cost, and can improve the detection efficiency in the pollution detection process.
[0257] It should be noted that the detection device provided by the embodiment of the application is a detection device capable of executing the above-mentioned data pollution detection method, and all embodiments of the above-mentioned data pollution detection method are applicable to the detection device, and can achieve the same or similar beneficial effects.
[0258] As shown in Figure 7 The embodiment of the application also provides a data pollution detection processing device, which is applied to a cloud server and includes:
[0259] The data receiving module 701 is configured to receive the encrypted data uploaded by the terminal device.
[0260] The request receiving module 702 is configured to receive the data detection request sent by the detection device, and the data detection request carries the pollution detection token of the data to be detected.
[0261] The processing module 703 is configured to process the encrypted pollution detection index of the data to be detected according to the pollution detection token, and obtain a detection parameter.
[0262] The parameter sending module 704 is configured to send the detection parameter to the detection device.
[0263] As an optional embodiment, the device includes:
[0264] The index receiving module is configured to receive the encrypted pollution detection index sent by the terminal device, and the encrypted pollution detection index is encrypted by the private key of the RSA encryption algorithm by the terminal device.
[0265] As an optional embodiment, the pollution detection token comprises a triple element (T[1], T[2], T[3]); wherein,
[0266] The first element T[1] is related to each coefficient of the set polynomial corresponding to the data tag of the to-be-detected data;
[0267] The second element T[2] is the first coefficient of the set polynomial corresponding to the data tag of the to-be-detected data;
[0268] The third element T[3] is the data pollution threshold corresponding to the data tag of the to-be-detected data.
[0269] As an optional embodiment, the processing module comprises:
[0270] A first submodule is configured to obtain a first vector according to the first element and an encryption matrix corresponding to the encrypted data;
[0271] A second submodule is configured to process each parameter in the first vector respectively according to the second element and a public key of an RSA encryption algorithm to obtain a second vector;
[0272] A third submodule is configured to determine the detection parameter according to the second vector and the encrypted pollution detection index.
[0273] As an optional embodiment, the third submodule comprises:
[0274] A parameter determination unit is configured to determine the detection parameter R(x) according to a second formula; the second formula is:
[0275]
[0276] Wherein, R(x) is the detection parameter; Y' is the second vector; is the encrypted pollution detection index.
[0277] In the embodiment of the application, the terminal device stores the encrypted data to the cloud server, generates the encrypted pollution detection index and uploads it to the cloud service, the detection device sends the pollution detection request to the terminal device and verifies the identity, and obtains the pollution detection token after successful verification; the detection device holds the pollution detection token to perform the pollution detection on the cloud server side and obtains the pollution detection result, so that the pollution detection of the ciphertext data is realized; and the RSA multiplication homomorphism encryption is adopted to construct the encrypted detection index and the detection token, so that the key information of the data is ensured not to be leaked, the data can be detected with low overhead, and the detection efficiency can be improved in the pollution detection process.
[0278] It should be noted that the data pollution detection processing device provided by the embodiment of the present application is a device capable of executing the data pollution detection processing method, and all embodiments of the data pollution detection processing method are applicable to the device, and the same or similar beneficial effects can be achieved.
[0279] As shown in Figure 8 The embodiment of the present application also provides a cloud server, which comprises a processor 900 and a transceiver 910, the transceiver 910 receives and sends data under the control of the processor 900, and the processor 900 is used for executing the following operations:
[0280] Receiving encrypted data uploaded by a terminal device;
[0281] Receiving a data detection request sent by a detection device, wherein the data detection request carries a pollution detection token of to-be-detected data;
[0282] Processing an encrypted pollution detection index of the to-be-detected data according to the pollution detection token to obtain a detection parameter;
[0283] Sending the detection parameter to the detection device.
[0284] As an optional embodiment, the processor is further used for executing the following operations:
[0285] Receiving an encrypted pollution detection index sent by a terminal device, wherein the encrypted pollution detection index is encrypted by a private key of the RSA encryption algorithm.
[0286] As an optional embodiment, the pollution detection token comprises a three-element tuple (T[1], T[2], T[3]); wherein,
[0287] The first element T[1] is related to each coefficient of a set polynomial corresponding to a data tag of to-be-detected data;
[0288] The second element T[2] is a first coefficient of a set polynomial corresponding to a data tag of to-be-detected data;
[0289] The third element T[3] is a data pollution threshold corresponding to a data tag of to-be-detected data.
[0290] As an optional embodiment, the processor is further used for executing the following operations:
[0291] Obtaining a first vector according to the first element and an encrypted matrix corresponding to the encrypted data;
[0292] Processing each parameter in the first vector according to the second element and a public key of the RSA encryption algorithm to obtain a second vector;
[0293] determine the detection parameter according to the second vector and the encrypted pollution detection index.
[0294] As an optional embodiment, the processor is further configured to perform the following operation:
[0295] determine the detection parameter R(x) according to a second formula; the second formula is:
[0296]
[0297] wherein R(x) is the detection parameter; Y' is the second vector; is the encrypted pollution detection index.
[0298] In the embodiment of the application, the terminal device stores the encrypted data to the cloud server, generates the encrypted pollution detection index and uploads it to the cloud server, the detection device sends a pollution detection request to the terminal device and verifies the identity, and obtains a pollution detection token after successful verification; the detection device holds the pollution detection token to perform pollution detection on the cloud server side and obtains a pollution detection result, so that the pollution detection of the ciphertext data is realized; and the RSA multiplication homomorphic encryption is used to construct the encrypted detection index and the detection token, so that the key information of the data is not leaked, the data can be detected with low overhead, and the detection efficiency can be improved in the pollution detection process.
[0299] It should be noted that the cloud server provided by the embodiment of the application is a cloud server capable of performing the above-mentioned data pollution detection processing method, and all embodiments of the above-mentioned data pollution detection processing method are applicable to the cloud server, and can achieve the same or similar beneficial effects.
[0300] As shown in Figure 9 The embodiment of the application further provides a data pollution detection processing device, which is applied to a terminal device and includes:
[0301] The encrypted uploading module 901 is configured to encrypt the data set and upload the encrypted data to the cloud server.
[0302] The verification generating module 902 is configured to verify the signature of the detection device, and generate a pollution detection token according to the data label of the to-be-detected data contained in the signature in the case that the signature verification is successful.
[0303] The token sending module 903 is configured to send the pollution detection token to the detection device, and the pollution detection token is used to assist the detection device to perform pollution detection on the to-be-detected data.
[0304] As an optional embodiment, the device further includes:
[0305] A label determination module is configured to classify the data set and determine a data label of each class of data.
[0306] An index determination module is configured to construct a pollution detection index corresponding to the data label of each class of data according to the expectation and variance of each class of data.
[0307] An index encryption upload module is configured to encrypt the pollution detection index and upload the obtained encrypted pollution detection index to the cloud server.
[0308] As an optional embodiment, the index encryption upload module comprises:
[0309] An encryption submodule is configured to encrypt the pollution detection index by using a private key in the RSA encryption algorithm to obtain an encrypted pollution detection index.
[0310] As an optional embodiment, the device further comprises:
[0311] A Gaussian processing module is configured to process the data samples of each class of data so that each class of data is subject to Gaussian distribution.
[0312] As an optional embodiment, the device further comprises:
[0313] A threshold determination module is configured to process the data samples of each class of data to obtain a data pollution threshold corresponding to the data label of each class of data.
[0314] As an optional embodiment, the verification generation module comprises:
[0315] A fourth submodule is configured to receive a pollution detection request sent by a terminal device, wherein the pollution detection request carries the signature; the signature is generated by a data label of to-be-detected data, an identity of a detection device, and a timestamp.
[0316] A fifth submodule is configured to verify the signature by using a public key of the RSA encryption algorithm.
[0317] A sixth submodule is configured to generate a pollution detection token according to the data label of to-be-detected data contained in the signature in a case where the signature verification is successful.
[0318] As an optional embodiment, the pollution detection token comprises a three-element tuple (T[1], T[2], T[3]); wherein,
[0319] The first element T[1] is related to each coefficient of a set polynomial corresponding to the data label of to-be-detected data.
[0320] The second element T[2] is a first coefficient of a set polynomial corresponding to the data label of to-be-detected data.
[0321] The third element T[3] is a data pollution threshold corresponding to a data label of the data to be detected.
[0322] In the embodiment of the application, the terminal device stores the encrypted data to the cloud server, generates an encrypted pollution detection index and uploads it to the cloud server, the detection device sends a pollution detection request to the terminal device and verifies the identity, and obtains a pollution detection token after successful verification; the detection device holds the pollution detection token to perform pollution detection on the cloud server side and obtains a pollution detection result, thereby realizing pollution detection on the ciphertext data; and the application adopts RSA multiplication homomorphic encryption to construct an encrypted detection index and a detection token, which ensures that the key information of the data is not leaked, and at the same time, the data can be detected with low overhead, and the detection efficiency can be improved in the pollution detection process.
[0323] It should be noted that the data pollution detection processing device provided by the embodiment of the application is a device capable of executing the data pollution detection processing method described above, and all embodiments of the data pollution detection processing method are applicable to the device, and can achieve the same or similar beneficial effects.
[0324] As shown in Figure 10 The embodiment of the application also provides a terminal device, which comprises a processor 100 and a transceiver 110, the transceiver 110 receives and sends data under the control of the processor 100, and the processor 100 is used to perform the following operations:
[0325] Encrypting the data set and uploading the encrypted data to the cloud server;
[0326] Verifying the signature of the detection device, and generating a pollution detection token according to the data label of the data to be detected contained in the signature in the case of successful signature verification;
[0327] Sending the pollution detection token to the detection device, the pollution detection token being used to assist the detection device in performing pollution detection on the data to be detected.
[0328] As an optional embodiment, the processor is further used to perform the following operations:
[0329] Classifying the data set and determining the data label of each class of data;
[0330] According to the expectation and variance of each class of data, constructing a pollution detection index corresponding to the data label of the data of the class;
[0331] Encrypting the pollution detection index and uploading the obtained encrypted pollution detection index to the cloud server.
[0332] As an optional embodiment, the processor is further configured to perform the following operation:
[0333] The pollution detection index is encrypted by using a private key in the RSA encryption algorithm to obtain an encrypted pollution detection index.
[0334] As an optional embodiment, the processor is further configured to perform the following operation:
[0335] The data samples of each type of data are processed so that each type of data conforms to a Gaussian distribution.
[0336] As an optional embodiment, the processor is further configured to perform the following operation:
[0337] The data samples of each type of data are processed to obtain a data pollution threshold corresponding to the data label of each type of data.
[0338] As an optional embodiment, the processor is further configured to perform the following operation:
[0339] The pollution detection request sent by the terminal device is received, and the pollution detection request carries the signature; the signature is generated by a data label of to-be-detected data, an identity of a detection device, and a timestamp;
[0340] The signature is verified by using a public key of the RSA encryption algorithm.
[0341] In a case where the signature verification is successful, a pollution detection token is generated according to the data label of the to-be-detected data contained in the signature.
[0342] As an optional embodiment, the pollution detection token includes a three-element tuple (T[1], T[2], T[3]); wherein,
[0343] The first element T[1] is related to each coefficient of a set polynomial corresponding to the data label of the to-be-detected data.
[0344] The second element T[2] is a first coefficient of a set polynomial corresponding to the data label of the to-be-detected data.
[0345] The third element T[3] is a data pollution threshold corresponding to the data label of the to-be-detected data.
[0346] The terminal device in the embodiment of the application stores the encrypted data to the cloud server, generates an encrypted pollution detection index and uploads it to the cloud service, the detection device sends a pollution detection request to the terminal device and verifies the identity, and obtains a pollution detection token after successful verification; the detection device performs pollution detection at the cloud server side by holding the pollution detection token, and obtains a pollution detection result, thereby realizing pollution detection on the ciphertext data; and the RSA multiplication homomorphic encryption is used to construct the encrypted detection index and the detection token, so that the key information of the data is ensured not to be leaked, the data can be detected at low cost, and the detection efficiency can be improved in the pollution detection process.
[0347] It should be noted that the terminal device provided by the embodiment of the application is a terminal device capable of executing the data pollution detection processing method, and all embodiments of the data pollution detection processing method are applicable to the terminal device and can achieve the same or similar beneficial effects.
[0348] The embodiment of the application also provides a communication device, which is a detection device or a cloud server or a terminal device, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to realize each process in the data pollution detection method embodiment or the data pollution detection processing method embodiment and achieve the same technical effect. To avoid repetition, details are not repeated here.
[0349] The embodiment of the application also provides a computer readable storage medium having a computer program stored thereon, wherein the program is executed by a processor to realize each process in the data pollution detection method embodiment or the data pollution detection processing method embodiment and achieve the same technical effect. To avoid repetition, details are not repeated here. The computer readable storage medium includes a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0350] Those skilled in the art should understand that the embodiments of the application can be provided as a method, a system or a computer program product. Therefore, the application can be in the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware aspects. Moreover, the application can be in the form of a computer program product implemented on one or more computer readable storage media (including but not limited to disk storage and optical storage, etc.) containing computer usable program code.
[0351] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart or flowsheet block or blocks. Figure 1 An apparatus for performing the functions specified in the flowchart or flowsheet block or blocks.
[0352] These computer program instructions can also be stored in a computer readable storage medium that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer readable storage medium produce an article of manufacture including instructions which implement the function specified in the flowchart or flowsheet block or blocks. Figure 1 The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart or flowsheet block or blocks. Figure 1 An apparatus for performing the functions specified in the flowchart or flowsheet block or blocks.
[0353] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart or flowsheet block or blocks. Figure 1 The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart or flowsheet block or blocks. Figure 1 An apparatus for performing the functions specified in the flowchart or flowsheet block or blocks.
[0354] The above description is the preferred embodiment of the application. It is apparent that, for ordinary skilled in the art, several improvements and refinements can be made to the application without departing from the principles of the application. These improvements and refinements should also be considered as within the scope of the application.
Claims
1. A data pollution detection method, performed by a detection device, characterized in that, The method comprises the following steps: obtaining to-be-detected data and a pollution detection token of the to-be-detected data; sending a data detection request to a cloud server, wherein the data detection request carries the pollution detection token; receiving a detection parameter obtained by the cloud server by processing an encrypted pollution detection index of the to-be-detected data according to the pollution detection token; performing pollution detection on the to-be-detected data according to the detection parameter and the pollution detection token; wherein obtaining the pollution detection token of the to-be-detected data comprises the following steps: generating a signature according to a data label of the to-be-detected data, an identity of a detection device and a timestamp; sending a pollution detection request to a terminal device, wherein the pollution detection request carries the signature; in a case where the terminal device successfully verifies the signature, receiving a pollution detection token sent by the terminal device, wherein the pollution detection token is generated by the terminal device according to the data label; wherein generating the signature according to the data label of the to-be-detected data, the identity of the detection device and the timestamp comprises the following steps: processing the data label of the to-be-detected data, the identity of the detection device and the timestamp by using a private key of an RSA encryption algorithm and a hash function to generate the signature; wherein the pollution detection token comprises a three-element tuple (T[1], T[2], T[3]); wherein, a first element T[1] is related to each coefficient of a set polynomial corresponding to the data label of the to-be-detected data; a second element T[2] is a first coefficient of the set polynomial corresponding to the data label of the to-be-detected data; a third element T[3] is a data pollution threshold corresponding to the data label of the to-be-detected data.
2. The method of claim 1, wherein, performing pollution detection on the to-be-detected data according to the detection parameter and the pollution detection token comprises the following steps: decrypting the detection parameter to obtain a pollution detection index corresponding to the data label of the to-be-detected data; processing the to-be-detected data according to the pollution detection index corresponding to the data label to obtain a pollution reference value; comparing the pollution reference value with the data pollution threshold in the pollution detection token to obtain a pollution detection result.
3. The method of claim 2, wherein, The pollution detection index is a set of expectation and variance of the to-be-detected data. processing the to-be-detected data according to the pollution detection index corresponding to the data label to obtain a pollution reference value comprises the following steps: According to a first formula, the pollution reference value R is determined S (x); Wherein, the expectation and variance set of the data to be detected is Δ; x’ j represents the jth data to be detected; μ j represents the variance of the jth data to be detected, σ j represents the expectation of the jth data to be detected. 4.A processing method of data pollution detection, executed by a cloud server, characterized in that, The method comprises the following steps: receiving encrypted data uploaded by a terminal device; receiving a data detection request sent by a detection device, wherein the data detection request carries a pollution detection token of to-be-detected data; processing an encrypted pollution detection index of the to-be-detected data according to the pollution detection token to obtain a detection parameter; sending the detection parameter to the detection device; wherein the pollution detection token comprises a three-element tuple (T[1], T[2], T[3]); wherein, a first element T[1] is related to each coefficient of a set polynomial corresponding to the data label of the to-be-detected data; a second element T[2] is a first coefficient of the set polynomial corresponding to the data label of the to-be-detected data; a third element T[3] is a data pollution threshold corresponding to the data label of the to-be-detected data.
5. The method of claim 4, wherein, Before the method further comprises: Receiving the encrypted pollution detection index sent by the terminal device, the encrypted pollution detection index being encrypted by the terminal device using a private key of the RSA encryption algorithm.
6. The method of claim 4, wherein, According to the encrypted pollution detection index of the to-be-detected data, the detection parameter is obtained, including: According to the first element and the encryption matrix corresponding to the encrypted data, a first vector is obtained; According to the second element and the public key of the RSA encryption algorithm, each parameter in the first vector is processed respectively to obtain a second vector; According to the second vector and the encrypted pollution detection index, the detection parameter is determined.
7. The method of claim 6, wherein, According to the second vector and the encrypted pollution detection index, the detection parameter is determined, including: According to the second formula, the detection parameter R(x) is determined; the second formula is: wherein R(x) is a detection parameter; Y' is a second vector; is an encrypted pollution detection index.
8. A data contamination detection processing method, executed by a terminal device, characterized in that, Including: Encrypting the data set and uploading the encrypted data to the cloud server; Verifying the signature of the detection device, and generating a pollution detection token according to the data tag of the to-be-detected data contained in the signature in the case of successful signature verification; Sending the pollution detection token to the detection device, the pollution detection token being used to assist the detection device in performing pollution detection on the to-be-detected data; Wherein, the signature of the detection device is verified, and the pollution detection token is generated according to the data tag of the to-be-detected data contained in the signature in the case of successful signature verification, including: Receiving the pollution detection request sent by the terminal device, the pollution detection request carrying the signature; the signature is generated by the data tag of the to-be-detected data, the identity of the detection device and the timestamp; Verifying the signature using the public key of the RSA encryption algorithm; In the case of successful signature verification, a pollution detection token is generated according to the data tag of the to-be-detected data contained in the signature; Wherein, the pollution detection token includes a three-element tuple (T[1], T[2], T[3]); wherein, The first element T[1] is related to each coefficient of the set polynomial corresponding to the data tag of the to-be-detected data; The second element T[2] is the first coefficient of the set polynomial corresponding to the data tag of the to-be-detected data; The third element T[3] is the data pollution threshold corresponding to the data tag of the to-be-detected data.
9. The method of claim 8, wherein, After the method further comprises: Classifying the data set to determine the data tag of each class of data; According to the expectation and variance of each class of data, the pollution detection index corresponding to the data tag of the data is constructed; Encrypting the pollution detection index and uploading the obtained encrypted pollution detection index to the cloud server.
10. The method of claim 9, wherein, Encrypting the pollution detection index, including: Encrypting the pollution detection index using the private key of the RSA encryption algorithm to obtain the encrypted pollution detection index.
11. The method of claim 9, wherein, After the method further comprises: Processing the data samples of each class of data so that each class of data is subject to Gaussian distribution.
12. The method of claim 9, wherein, The method further comprises: processing the data samples of each type of data to obtain a data pollution threshold corresponding to the data label of each type of data.
13. A data contamination detection apparatus applied to a detection device, characterized by comprising: Comprise: The first acquisition module is used for acquiring the to-be-detected data and the pollution detection token of the to-be-detected data; The first request sending module is used for sending a data detection request to a cloud server, wherein the data detection request carries the pollution detection token; The parameter receiving module is used for receiving a detection parameter obtained by processing, by the cloud server, an encrypted pollution detection index of the to-be-detected data according to the pollution detection token; The detection module is used for performing pollution detection on the to-be-detected data according to the detection parameter and the pollution detection token; The first acquisition module comprises: The generation submodule is used for generating a signature according to the data label of the to-be-detected data, the identity of the detection device, and the timestamp; The request sending submodule is used for sending a pollution detection request to a terminal device, wherein the pollution detection request carries the signature; The token receiving submodule is used for receiving a pollution detection token sent by the terminal device in a case where the terminal device successfully verifies the signature; wherein the pollution detection token is generated by the terminal device according to the data label; The generation submodule comprises: The generation unit is used for processing the data label of the to-be-detected data, the identity of the detection device, and the timestamp by using a private key of an RSA encryption algorithm and a hash function to generate the signature; The pollution detection token comprises a three-element tuple (T[1], T[2], T[3]); wherein, The first element T[1] is related to each coefficient of a set polynomial corresponding to the data label of the to-be-detected data; The second element T[2] is the first coefficient of the set polynomial corresponding to the data label of the to-be-detected data; The third element T[3] is a data pollution threshold corresponding to the data label of the to-be-detected data.
14. A detection device comprising a processor and a transceiver that receives and transmits data under the control of the processor, characterized in that, The processor is configured to perform the following operations: acquire the to-be-detected data and the pollution detection token of the to-be-detected data; send a data detection request to a cloud server, wherein the data detection request carries the pollution detection token; receive a detection parameter obtained by processing, by the cloud server, an encrypted pollution detection index of the to-be-detected data according to the pollution detection token; perform pollution detection on the to-be-detected data according to the detection parameter and the pollution detection token; The processor is further configured to perform the following operations: generate a signature according to the data label of the to-be-detected data, the identity of the detection device, and the timestamp; send a pollution detection request to a terminal device, wherein the pollution detection request carries the signature; receive a pollution detection token sent by the terminal device in a case where the terminal device successfully verifies the signature; wherein the pollution detection token is generated by the terminal device according to the data label; The processor is further configured to perform the following operations: process the data label of the to-be-detected data, the identity of the detection device, and the timestamp by using a private key of an RSA encryption algorithm and a hash function to generate the signature; The pollution detection token includes a triple element (T[1], T[2], T[3]); wherein, The first element T[1] is related to each coefficient of the set polynomial corresponding to the data label of the to-be-detected data; The second element T[2] is the first coefficient of the set polynomial corresponding to the data label of the to-be-detected data; The third element T[3] is the data pollution threshold corresponding to the data label of the to-be-detected data.
15. A processing device of data pollution detection, applied to a cloud server, comprising: Comprise: The data receiving module is used for receiving encrypted data uploaded by a terminal device; The request receiving module is used for receiving a data detection request sent by a detection device, wherein the data detection request carries a pollution detection token of to-be-detected data; The processing module is used for processing an encrypted pollution detection index of the to-be-detected data according to the pollution detection token, to obtain a detection parameter; The parameter sending module is used for sending the detection parameter to the detection device; The pollution detection token includes a triple element (T[1], T[2], T[3]); wherein, The first element T[1] is related to each coefficient of the set polynomial corresponding to the data label of the to-be-detected data; The second element T[2] is the first coefficient of the set polynomial corresponding to the data label of the to-be-detected data; The third element T[3] is the data pollution threshold corresponding to the data label of the to-be-detected data. 16.A cloud server, comprising a processor and a transceiver, the transceiver receiving and sending data under the control of the processor, characterized in that, The processor is used for performing the following operations: Receiving encrypted data uploaded by a terminal device; Receiving a data detection request sent by a detection device, wherein the data detection request carries a pollution detection token of to-be-detected data; Processing an encrypted pollution detection index of the to-be-detected data according to the pollution detection token, to obtain a detection parameter; Sending the detection parameter to the detection device; The pollution detection token includes a triple element (T[1], T[2], T[3]); wherein, The first element T[1] is related to each coefficient of the set polynomial corresponding to the data label of the to-be-detected data; The second element T[2] is the first coefficient of the set polynomial corresponding to the data label of the to-be-detected data; The third element T[3] is the data pollution threshold corresponding to the data label of the to-be-detected data.
17. A processing apparatus of data pollution detection, applied to a terminal device, characterized in that, Comprise: The encrypted uploading module is used for encrypting a data set and uploading encrypted data to a cloud server; The verification generation module is used for verifying a signature of a detection device, and generating a pollution detection token according to a data label of to-be-detected data included in the signature in a case where the signature verification is successful; Sending the pollution detection token to the detection device, wherein the pollution detection token is used for assisting the detection device in performing pollution detection on the to-be-detected data; The verification generation module comprises: The fourth submodule is used for receiving a pollution detection request sent by a terminal device, wherein the pollution detection request carries the signature; the signature is generated according to a data label of to-be-detected data, an identity of a detection device, and a timestamp; The fifth submodule is used for verifying the signature by using a public key of an RSA encryption algorithm; The sixth submodule is used for generating a pollution detection token according to a data label of to-be-detected data included in the signature in a case where the signature verification is successful; The pollution detection token includes a three-element tuple (T[1], T[2], T[3]); wherein, The first element T[1] is related to each coefficient of a set polynomial corresponding to the data tag of the to-be-detected data; The second element T[2] is the first coefficient of the set polynomial corresponding to the data tag of the to-be-detected data; The third element T[3] is a data pollution threshold corresponding to the data tag of the to-be-detected data.
18. A terminal device comprising a processor and a transceiver that receives and transmits data under control of the processor, characterized by The processor is configured to perform the following operations: encrypting the data set and uploading the encrypted data to a cloud server; verifying the signature of the detection device, and generating a pollution detection token according to the data tag of the to-be-detected data included in the signature in a case where the signature verification is successful; a token sending module configured to send the pollution detection token to the detection device, the pollution detection token being used to assist the detection device in performing pollution detection on the to-be-detected data; The processor is further configured to perform the following operations: receiving a pollution detection request sent by a terminal device, the pollution detection request carrying the signature; the signature being generated by a data tag of to-be-detected data, an identity of the detection device, and a timestamp; verifying the signature by using a public key of an RSA encryption algorithm; generating a pollution detection token according to the data tag of the to-be-detected data included in the signature in a case where the signature verification is successful; The pollution detection token includes a three-element tuple (T[1], T[2], T[3]); wherein, The first element T[1] is related to each coefficient of a set polynomial corresponding to the data tag of the to-be-detected data; The second element T[2] is the first coefficient of the set polynomial corresponding to the data tag of the to-be-detected data; The third element T[3] is a data pollution threshold corresponding to the data tag of the to-be-detected data.
19. A communication device comprising a memory, a processor, and a program stored on the memory and executable on the processor; characterized in that, The processor executes the program to implement the data pollution detection method according to any one of claims 1-3; or the processor executes the program to implement the processing method for data pollution detection according to any one of claims 4-7; or the processor executes the program to implement the processing method for data pollution detection according to any one of claims 8-12.
20. A computer readable storage medium having stored thereon a computer program, characterized in that, The program is executed by the processor to implement the steps in the data pollution detection method according to any one of claims 1-3; or the program is executed by the processor to implement the steps in the processing method for data pollution detection according to any one of claims 4-7; or the program is executed by the processor to implement the steps in the processing method for data pollution detection according to any one of claims 8-12.