Data cleaning method, device and related products based on homomorphic encryption
Redundant detection tags are generated through homomorphic encryption technology, which solves the problem of redundant data in big data storage and achieves efficient utilization of storage resources.
Patent Information
- Application Number
- CN202310250222.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-14
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2043-03-14
AI Technical Summary
When storing big data, there is redundant data and waste of storage resources.
Redundant detection tags are generated through homomorphic encryption technology, and redundancy detection is performed on the plaintext data to be processed in real time. The redundant data is encrypted and ciphertext data is generated to avoid repeated storage.
It effectively avoids redundant storage in big data storage and saves storage resources.
Smart Images

Figure CN116225341B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of privacy computing technology, and in particular to a data cleaning method, device and related products based on homomorphic encryption. Background Art
[0002] The rapid development of big data has gradually reflected the value of data, but the amount of data is getting larger and larger. Therefore, when storing data privately, data duplication often occurs, thus wasting a lot of storage resources. Summary of the Invention
[0003] Based on the above problems, the embodiments of the present application provide a data cleaning method, device and related products based on homomorphic encryption.
[0004] The embodiments of this application disclose the following technical solutions:
[0005] A data cleaning method based on homomorphic encryption, comprising:
[0006] Get the plaintext data to be processed;
[0007] Generating redundant detection tags in real time for the plaintext data to be processed;
[0008] Performing homomorphic encryption on the redundant detection tags generated in real time to obtain homomorphic encrypted data, so as to match the redundant detection tag list with the existing redundant detection tag list, so as to perform redundancy detection on the plaintext data to be processed;
[0009] If there is no existing redundant detection tag matching the homomorphically encrypted data in the existing redundant detection tag list, indicating that there is no ciphertext data corresponding to the plaintext data to be processed, a detection result that the plaintext data to be processed is non-redundant is generated, and the plaintext data to be processed is encrypted to obtain the ciphertext data.
[0010] Optionally, if there is an existing redundant detection tag in the existing redundant detection tag list that matches the homomorphically encrypted data, indicating that there is ciphertext data corresponding to the plaintext data to be processed, a detection result of the redundancy of the plaintext data to be processed is generated, and the decryption private key of the ciphertext data is returned.
[0011] Optionally, generating a redundant detection tag for the plaintext data to be processed includes: signing the plaintext data to be processed according to a random key to generate a redundant detection tag.
[0012] Optionally, the method further includes: generating the random key according to a one-way function.
[0013] Optionally, generating a redundant detection tag for the plaintext data to be processed includes: performing a hash operation on the plaintext data to be processed to generate a redundant detection tag.
[0014] Optionally, the redundant detection tags generated in real time are homomorphically encrypted to obtain homomorphically encrypted data to match with an existing redundant detection tag list, including: performing homomorphic encryption verification one by one between the homomorphically encrypted data and the redundant detection tags already in the existing redundant detection tag list; if the homomorphic encryption rules are not met, it is determined that there is no existing redundant detection tag in the existing redundant detection tag list that matches the homomorphically encrypted data.
[0015] Optionally, the homomorphic encryption data is verified one by one with the redundant detection tags in the existing redundant detection tag list. If the verification result is randomly distributed, it is determined that the data does not comply with the homomorphic encryption rules.
[0016] A data cleaning device based on homomorphic encryption, comprising:
[0017] An acquisition unit, used for acquiring plaintext data to be processed;
[0018] A label generation unit, configured to generate a redundant detection label in real time for the plaintext data to be processed;
[0019] A matching unit, configured to perform homomorphic encryption on the redundant detection tags generated in real time to obtain homomorphic encrypted data, so as to match the data with the existing redundant detection tag list, so as to perform redundancy detection on the plaintext data to be processed;
[0020] The detection result unit generates a non-redundant detection result of the plaintext data to be processed if there is no existing redundant detection tag matching the homomorphically encrypted data in the existing redundant detection tag list, indicating that there is no ciphertext data corresponding to the plaintext data to be processed, and encrypts the plaintext data to be processed to obtain the ciphertext data.
[0021] Optionally, if there is an existing redundant detection tag in the existing redundant detection tag list that matches the homomorphically encrypted data, indicating that there is ciphertext data corresponding to the plaintext data to be processed, a detection result of the redundancy of the plaintext data to be processed is generated, and the decryption private key of the ciphertext data is returned.
[0022] Optionally, the label generation unit is specifically configured to: sign the plaintext data to be processed according to a random key to generate a redundant detection label.
[0023] Optionally, the device further includes a key generation unit, configured to generate the random key based on a one-way function.
[0024] Optionally, the label generation unit is specifically configured to perform a hash operation on the plaintext data to be processed to generate a redundant detection label.
[0025] Optionally, the matching unit is specifically used to: perform homomorphic encryption verification between the homomorphically encrypted data and the redundant detection tags already in the existing redundant detection tag list one by one; if the homomorphic encryption rules are not met, it is determined that there is no existing redundant detection tag in the existing redundant detection tag list that matches the homomorphically encrypted data.
[0026] Optionally, the homomorphic encryption data is verified one by one with the redundant detection tags in the existing redundant detection tag list. If the verification result is randomly distributed, it is determined that the data does not comply with the homomorphic encryption rules.
[0027] An electronic device includes a memory and a processor, wherein the memory stores an executable program, and the processor performs the following steps when running the executable program:
[0028] Get the plaintext data to be processed;
[0029] Generating redundant detection tags in real time for the plaintext data to be processed;
[0030] Performing homomorphic encryption on the redundant detection tags generated in real time to obtain homomorphic encrypted data, so as to match the redundant detection tag list with the existing redundant detection tag list, so as to perform redundancy detection on the plaintext data to be processed;
[0031] If there is no existing redundant detection tag matching the homomorphically encrypted data in the existing redundant detection tag list, indicating that there is no ciphertext data corresponding to the plaintext data to be processed, a detection result that the plaintext data to be processed is non-redundant is generated, and the plaintext data to be processed is encrypted to obtain the ciphertext data.
[0032] A computer storage medium stores a computer executable program, wherein when the computer executable program is executed, the following steps are performed:
[0033] Get the plaintext data to be processed;
[0034] Generating redundant detection tags in real time for the plaintext data to be processed;
[0035] Performing homomorphic encryption on the redundant detection tags generated in real time to obtain homomorphic encrypted data, so as to match the redundant detection tag list with the existing redundant detection tag list, so as to perform redundancy detection on the plaintext data to be processed;
[0036] If there is no existing redundant detection tag matching the homomorphically encrypted data in the existing redundant detection tag list, indicating that there is no ciphertext data corresponding to the plaintext data to be processed, a detection result that the plaintext data to be processed is non-redundant is generated, and the plaintext data to be processed is encrypted to obtain the ciphertext data.
[0037] A computer program product, wherein the computer storage medium stores computer-executable instructions, and when the computer-executable instructions are executed, the following steps are performed:
[0038] Get the plaintext data to be processed;
[0039] Generating redundant detection tags in real time for the plaintext data to be processed;
[0040] Performing homomorphic encryption on the redundant detection tags generated in real time to obtain homomorphic encrypted data, so as to match the redundant detection tag list with the existing redundant detection tag list, so as to perform redundancy detection on the plaintext data to be processed;
[0041] If there is no existing redundant detection tag matching the homomorphically encrypted data in the existing redundant detection tag list, indicating that there is no ciphertext data corresponding to the plaintext data to be processed, a detection result that the plaintext data to be processed is non-redundant is generated, and the plaintext data to be processed is encrypted to obtain the ciphertext data.
[0042] In the solution provided by the embodiment of the present application, plaintext data to be processed is obtained; redundant detection tags are generated in real time for the plaintext data to be processed; the redundant detection tags generated in real time are homomorphically encrypted to obtain homomorphically encrypted data, so as to match them with an existing redundant detection tag list, so as to perform redundant detection on the plaintext data to be processed; if there is no existing redundant detection tag matching the homomorphically encrypted data in the existing redundant detection tag list, indicating that there is no ciphertext data corresponding to the plaintext data to be processed, a non-redundant detection result of the plaintext data to be processed is generated, and the ciphertext data obtained by encrypting the plaintext data to be processed is obtained, thereby avoiding repeated storage of data during big data privacy storage and saving storage resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0044] Figure 1 This is a flow chart of a data cleaning method based on homomorphic encryption according to an embodiment of the present application.
[0045] Figure 2 This is a structural diagram of a data cleaning device based on homomorphic encryption according to an embodiment of the present application.
[0046] Figure 3 This is a structural diagram of an electronic device according to an embodiment of the present application.
[0047] Figure 4 Schematic diagram of the hardware structure of the electronic device in the embodiment of the present application. DETAILED DESCRIPTION
[0048] The implementation of any technical solution in the embodiments of the present application does not necessarily require achieving all of the above advantages at the same time.
[0049] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0050] Figure 1 This is a flow chart of a data cleaning method based on homomorphic encryption in an embodiment of the present application. Figure 1 As shown, it includes:
[0051] Get the plaintext data to be processed;
[0052] Generating redundant detection tags in real time for the plaintext data to be processed;
[0053] Performing homomorphic encryption on the redundant detection tags generated in real time to obtain homomorphic encrypted data, so as to match the redundant detection tag list with the existing redundant detection tag list, so as to perform redundancy detection on the plaintext data to be processed;
[0054] If there is no existing redundant detection tag matching the homomorphically encrypted data in the existing redundant detection tag list, indicating that there is no ciphertext data corresponding to the plaintext data to be processed, a detection result that the plaintext data to be processed is non-redundant is generated, and the plaintext data to be processed is encrypted to obtain the ciphertext data.
[0055] Optionally, if there is an existing redundant detection tag in the existing redundant detection tag list that matches the homomorphically encrypted data, indicating that there is ciphertext data corresponding to the plaintext data to be processed, a detection result of the redundancy of the plaintext data to be processed is generated, and the decryption private key of the ciphertext data is returned.
[0056] Optionally, generating a redundant detection tag for the plaintext data to be processed includes: signing the plaintext data to be processed according to a random key to generate a redundant detection tag.
[0057] Optionally, the method further includes: generating the random key according to a one-way function.
[0058] Optionally, generating a redundant detection tag for the plaintext data to be processed includes: performing a hash operation on the plaintext data to be processed to generate a redundant detection tag.
[0059] Optionally, the redundant detection tags generated in real time are homomorphically encrypted to obtain homomorphically encrypted data to match with an existing redundant detection tag list, including: performing homomorphic encryption verification one by one between the homomorphically encrypted data and the redundant detection tags already in the existing redundant detection tag list; if the homomorphic encryption rules are not met, it is determined that there is no existing redundant detection tag in the existing redundant detection tag list that matches the homomorphically encrypted data.
[0060] Optionally, the homomorphic encryption data is verified one by one with the redundant detection tags in the existing redundant detection tag list. If the verification result is randomly distributed, it is determined that the data does not comply with the homomorphic encryption rules.
[0061] Figure 2 This is a structural diagram of a data cleaning device based on homomorphic encryption in an embodiment of the present application. Figure 2 As shown, it includes:
[0062] An acquisition unit, used for acquiring plaintext data to be processed;
[0063] A label generation unit, configured to generate a redundant detection label in real time for the plaintext data to be processed;
[0064] A matching unit, configured to perform homomorphic encryption on the redundant detection tags generated in real time to obtain homomorphic encrypted data, so as to match the data with the existing redundant detection tag list, so as to perform redundancy detection on the plaintext data to be processed;
[0065] The detection result unit generates a non-redundant detection result of the plaintext data to be processed if there is no existing redundant detection tag matching the homomorphically encrypted data in the existing redundant detection tag list, indicating that there is no ciphertext data corresponding to the plaintext data to be processed, and encrypts the plaintext data to be processed to obtain the ciphertext data.
[0066] Optionally, if there is an existing redundant detection tag in the existing redundant detection tag list that matches the homomorphically encrypted data, indicating that there is ciphertext data corresponding to the plaintext data to be processed, a detection result of the redundancy of the plaintext data to be processed is generated, and the decryption private key of the ciphertext data is returned.
[0067] Optionally, the label generation unit is specifically configured to: sign the plaintext data to be processed according to a random key to generate a redundant detection label.
[0068] Optionally, the device further includes a key generation unit, configured to generate the random key based on a one-way function.
[0069] Optionally, the label generation unit is specifically configured to perform a hash operation on the plaintext data to be processed to generate a redundant detection label.
[0070] Optionally, the matching unit is specifically used to: perform homomorphic encryption verification between the homomorphically encrypted data and the redundant detection tags already in the existing redundant detection tag list one by one; if the homomorphic encryption rules are not met, it is determined that there is no existing redundant detection tag in the existing redundant detection tag list that matches the homomorphically encrypted data.
[0071] Optionally, the homomorphic encryption data is verified one by one with the redundant detection tags in the existing redundant detection tag list. If the verification result is randomly distributed, it is determined that the data does not comply with the homomorphic encryption rules.
[0072] Figure 3 This is a schematic diagram of the structure of an electronic device in an embodiment of the present application. Figure 3 As shown, it includes a memory and a processor, the memory stores an executable program, and the processor performs the following steps when running the executable program:
[0073] Get the plaintext data to be processed;
[0074] Generating redundant detection tags in real time for the plaintext data to be processed;
[0075] Performing homomorphic encryption on the redundant detection tags generated in real time to obtain homomorphic encrypted data, so as to match the redundant detection tag list with the existing redundant detection tag list, so as to perform redundancy detection on the plaintext data to be processed;
[0076] If there is no existing redundant detection tag matching the homomorphically encrypted data in the existing redundant detection tag list, indicating that there is no ciphertext data corresponding to the plaintext data to be processed, a detection result that the plaintext data to be processed is non-redundant is generated, and the plaintext data to be processed is encrypted to obtain the ciphertext data.
[0077] Figure 4Schematic diagram of the hardware structure of the electronic device in the embodiment of the present application; Figure 4 As shown, the hardware structure of the electronic device may include: the electronic device 400 includes a computing unit 401, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 402 or a computer program loaded from a storage unit 406 into a random access memory (RAM) 403. Various programs and data required for the operation of the device 400 can also be stored in the RAM 403. The computing unit 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.
[0078] Multiple components within electronic device 400 are connected to I / O interface 405, including an input unit 406, an output unit 407, a storage unit 408, and a communication unit 409. Input unit 406 can be any type of device capable of inputting information into electronic device 400. Input unit 406 can receive input numeric or character information and generate key input signals related to user settings and / or function control of the electronic device. Output unit 407 can be any type of device capable of presenting information and may include, but is not limited to, a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. Storage unit 404 may include, but is not limited to, a magnetic disk or an optical disk. Communication unit 409 allows electronic device 400 to exchange information / data with other devices via computer networks such as the Internet and / or various telecommunication networks and may include, but is not limited to, a modem, a network card, an infrared communication device, a wireless communication transceiver and / or a chipset, such as a Bluetooth™ device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.
[0079] The computing unit 401 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 401 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units that run machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 401 performs the various devices and processes described above. For example, in some embodiments, the above steps may be implemented as a computer software program that is tangibly included in a machine-readable medium, such as a storage unit 40*. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 400 via the ROM 402 and / or the communication unit 409. In some embodiments, the computing unit 401 may be configured to perform the above steps in any other appropriate manner (e.g., by means of firmware).
[0080] The electronic devices of the embodiments of the present application exist in various forms, including but not limited to:
[0081] (1) Mobile communication devices: These devices are characterized by their mobile communication capabilities and are primarily designed to provide voice and data communications. These terminals include smartphones (e.g., iPhones), multimedia phones, feature phones, and low-end phones.
[0082] (2) Ultra-mobile personal computer devices: These devices fall under the category of personal computers, have computing and processing capabilities, and generally also have mobile Internet access. These terminals include PDAs, MIDs, and UMPCs, such as the iPad.
[0083] (3) Portable entertainment devices: These devices can display and play multimedia content. These devices include audio and video players (such as iPods), handheld game consoles, e-books, smart toys, and portable car navigation devices.
[0084] (4) Server: A device that provides computing services. The server consists of a processor 410, a hard disk, memory, a system bus, etc. The server is similar to a general computer architecture, but because it needs to provide highly reliable services, it has higher requirements in terms of processing power, stability, reliability, security, scalability, and manageability.
[0085] (5) Other electronic devices with data interaction functions.
[0086] The present application also provides a computer storage medium, wherein the computer storage medium stores a computer executable program. When the computer executable program is executed, the following steps are performed:
[0087] Get the plaintext data to be processed;
[0088] Generating redundant detection tags in real time for the plaintext data to be processed;
[0089] Performing homomorphic encryption on the redundant detection tags generated in real time to obtain homomorphic encrypted data, so as to match the redundant detection tag list with the existing redundant detection tag list, so as to perform redundancy detection on the plaintext data to be processed;
[0090] If there is no existing redundant detection tag matching the homomorphically encrypted data in the existing redundant detection tag list, indicating that there is no ciphertext data corresponding to the plaintext data to be processed, a detection result that the plaintext data to be processed is non-redundant is generated, and the plaintext data to be processed is encrypted to obtain the ciphertext data.
[0091] The present application also provides a computer program product, wherein the computer storage medium stores computer-executable instructions. When the computer-executable instructions are executed, the following steps are performed:
[0092] Get the plaintext data to be processed;
[0093] Generating redundant detection tags in real time for the plaintext data to be processed;
[0094] Performing homomorphic encryption on the redundant detection tags generated in real time to obtain homomorphic encrypted data, so as to match the redundant detection tag list with the existing redundant detection tag list, so as to perform redundancy detection on the plaintext data to be processed;
[0095] If there is no existing redundant detection tag matching the homomorphically encrypted data in the existing redundant detection tag list, indicating that there is no ciphertext data corresponding to the plaintext data to be processed, a detection result that the plaintext data to be processed is non-redundant is generated, and the plaintext data to be processed is encrypted to obtain the ciphertext data.
[0096] It should be noted that the various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and system embodiments, since they are basically similar to the apparatus embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the apparatus embodiments. The device and system embodiments described above are merely illustrative, wherein the modules described as separate components may or may not be physically separated, and the components indicated as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of this embodiment. A person of ordinary skill in the art can understand and implement them without expending creative work.
[0097] The above is merely one specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.
Claims
1. A data cleaning method based on homomorphic encryption, characterized in that: include: Get the plaintext data to be processed; Generating redundant detection tags in real time for the plaintext data to be processed; Performing homomorphic encryption on the redundant detection tags generated in real time to obtain homomorphic encrypted data, so as to match the redundant detection tag list with the existing redundant detection tag list, so as to perform redundancy detection on the plaintext data to be processed; If there is no existing redundant detection tag matching the homomorphically encrypted data in the existing redundant detection tag list, indicating that there is no ciphertext data corresponding to the plaintext data to be processed, a detection result that the plaintext data to be processed is non-redundant is generated, and the plaintext data to be processed is encrypted to obtain ciphertext data; Among them, if there is an existing redundant detection tag in the existing redundant detection tag list that matches the homomorphically encrypted data, it means that there is ciphertext data corresponding to the plaintext data to be processed, then a detection result of the redundancy of the plaintext data to be processed is generated, and the decryption private key of the ciphertext data is returned.
2. The method according to claim 1, characterized in that The generating of a redundant detection tag for the plaintext data to be processed includes: signing the plaintext data to be processed according to a random key to generate a redundant detection tag.
3. The method according to claim 2, characterized in that The method further includes: generating the random key according to a one-way function.
4. The method according to claim 1, wherein The generating of a redundant detection tag for the plaintext data to be processed includes: performing a hash operation on the plaintext data to be processed to generate a redundant detection tag.
5. The method according to claim 1, wherein The redundant detection tags generated in real time are homomorphically encrypted to obtain homomorphically encrypted data to match with the existing redundant detection tag list, including: homomorphically encrypting the homomorphically encrypted data and the redundant detection tags already in the existing redundant detection tag list one by one. If the homomorphic encryption rules are not met, it is determined that there is no existing redundant detection tag in the existing redundant detection tag list that matches the homomorphically encrypted data.
6. The method according to claim 5, characterized in that The homomorphic encryption data is verified one by one with the redundant detection tags in the existing redundant detection tag list. If the verification result is randomly distributed, it is determined that the homomorphic encryption rule is not met.
7. A data cleaning device based on homomorphic encryption, characterized in that: include: An acquisition unit, used for acquiring plaintext data to be processed; A label generation unit, configured to generate a redundant detection label in real time for the plaintext data to be processed; A matching unit, configured to perform homomorphic encryption on the redundant detection tags generated in real time to obtain homomorphic encrypted data, so as to match the data with the existing redundant detection tag list, so as to perform redundancy detection on the plaintext data to be processed; The detection result unit generates a non-redundant detection result of the plaintext data to be processed if there is no existing redundant detection tag matching the homomorphically encrypted data in the existing redundant detection tag list, indicating that there is no ciphertext data corresponding to the plaintext data to be processed, and encrypts the plaintext data to be processed to obtain the ciphertext data.
8. The device according to claim 7, characterized in that If there is an existing redundant detection tag in the existing redundant detection tag list that matches the homomorphically encrypted data, it means that there is ciphertext data corresponding to the plaintext data to be processed, then a detection result of the redundancy of the plaintext data to be processed is generated, and the decryption private key of the ciphertext data is returned.
9. An electronic device, characterized in that: The system comprises a memory and a processor, wherein an executable program is stored in the memory, and the processor executes the following steps when running the executable program: Get the plaintext data to be processed; Generating redundant detection tags in real time for the plaintext data to be processed; Performing homomorphic encryption on the redundant detection tags generated in real time to obtain homomorphic encrypted data, so as to match the redundant detection tag list with the existing redundant detection tag list, so as to perform redundancy detection on the plaintext data to be processed; If there is no existing redundant detection tag matching the homomorphically encrypted data in the existing redundant detection tag list, indicating that there is no ciphertext data corresponding to the plaintext data to be processed, a detection result that the plaintext data to be processed is non-redundant is generated, and the plaintext data to be processed is encrypted to obtain the ciphertext data.
Citation Information
Patent Citations
Encrypted data deduplication in cloud storage
US20170177899A1
Data processing method and apparatus
US20210152343A1