Data privacy processing method and device, electronic device, and storage medium
By segmenting, extending and privacying the original image, combined with the splicing of target markers and sequential identifiers, the problem of leakage of sensitive information during image annotation is solved, and effective protection of private information is achieved.
Patent Information
- Application Number
- CN202210234193.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-09
- Publication Date
- 2025-03-04
- Estimated Expiration
- 2042-03-09
AI Technical Summary
During the image labeling process, sensitive information such as personal name and ID number are easily leaked, resulting in an increase in the risk of personal privacy.
By segmenting the original image, a segmented picture is obtained, and then extended according to the size of the segmented picture, marking the order identifier, and privacy processing of the original field is performed based on the preset target marker and target identifier, and finally obtaining the desensitized picture through splicing processing.
It realizes effective protection of private information when annotating images, prevents the leakage of sensitive information, and prevents the possibility of missing tag characters.
Smart Images

Figure CN114564751B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a data privacy processing method and device, an electronic device, and a storage medium. Background Art
[0002] Privacy protection is an important topic in the field of artificial intelligence. The leakage of personal privacy can put people in unpredictable risks. In recent years, the country has successively issued laws and regulations to protect data security and personal privacy. Artificial intelligence needs to use labeled pictures to train image recognition models. In the recognition of text images, images are fields selected by the pre-order detection algorithm. The contents of these fields may include personal names, ID numbers, home addresses, telephone numbers, bank account numbers and other sensitive information. These sensitive information is easy to leak during the image annotation process. Therefore, when annotating images, it is also necessary to perform privacy processing on the images.
[0003] In related technologies, un-massified images are distributed to annotators through computers, USB flash drives, mobile hard drives, emails, mobile client software, etc. The annotators can directly see all the information on the images, which brings risks of personal privacy leakage. Therefore, how to ensure that privacy information can be protected when annotating images has become a technical problem that needs to be solved urgently in this field. Summary of the invention
[0004] The main purpose of the embodiments of the present application is to propose a data privacy processing method and device, an electronic device, and a storage medium that can protect privacy information.
[0005] To achieve the above objectives, a first aspect of an embodiment of the present application proposes a data privacy processing method, the method comprising:
[0006] Acquire an original picture set to be processed; wherein the original picture set includes at least one original picture, and each of the original pictures includes an original field;
[0007] Segment each of the original images to obtain at least three segmented images;
[0008] Extending the segmented picture according to the size of the segmented picture to obtain an extended picture;
[0009] marking the extended pictures with sequential identifiers;
[0010] According to a preset target marker and a preset target identifier, privacy processing is performed on the original field in the extended image after the marking process to obtain a target image;
[0011] The target image is spliced according to the sequence identifier and the target marker to obtain a desensitized image.
[0012] In some embodiments, the step of performing privacy processing on the original field in the marked extended picture according to a preset target marker and a preset target identifier to obtain a target picture includes:
[0013] Performing identification processing on the original field in the extended picture with the target identifier to obtain an identification picture;
[0014] The identification image is marked according to the target marker to obtain the target image.
[0015] In some embodiments, the original field includes at least three original characters;
[0016] The step of marking the identification image according to the target marker to obtain the target image includes:
[0017] Obtain the position of the first original character of each of the extended images to obtain the starting position;
[0018] Obtain the position of the last original character of each of the extended images to obtain the end position;
[0019] According to the starting position and the ending position, the identification picture is added and processed with the target marker to obtain the target picture.
[0020] In some embodiments, the target marker includes a first marker and a second marker;
[0021] The step of adding processing to the identification image with the target marker according to the starting position, the ending position and the marking rule to obtain the target image includes:
[0022] If the starting position is at a preset position, then the first marker is added before the corresponding original character to obtain the target image; wherein the preset position is used to represent the segmentation position of the segmented image;
[0023] If the starting position is not at the preset position, adding the second marker before the corresponding original character to obtain the target image;
[0024] If the end position is at the preset position, then adding the first marker after the corresponding original character to obtain the target image;
[0025] If the end position is not at the preset position, the second marker is added after the corresponding original character to obtain the target image.
[0026] In some embodiments, the target marker includes a first marker and a second marker;
[0027] The step of performing splicing processing on the target image according to the sequence identifier and the target marker to obtain a desensitized image includes:
[0028] Get the current sequence identifier and obtain the first identifier;
[0029] Obtain a target marker on the right side of the target image corresponding to the first identifier to obtain a current marker;
[0030] Obtaining a sequential identifier of the next order of the first identifier to obtain a second identifier;
[0031] Obtain a target marker on the left side of the target image corresponding to the second identifier to obtain a sequence marker;
[0032] If the current marker is the second marker, and the sequence marker is the second marker, then the second marker is deleted, and the target image is spliced to obtain the desensitized image;
[0033] If the marker is the first marker, or the sequence marker is the first marker, the second original character on the right side of the target image corresponding to the first identifier is obtained, the second original character on the left side of the target image corresponding to the second identifier is obtained, and the target image is spliced according to the second original character on the right side and the second original character on the left side to obtain the desensitized image.
[0034] In some embodiments, the step of performing splicing processing on the target image according to the second original character on the right and the second original character on the left includes:
[0035] If the second original character on the right is consistent with the second original character on the left, the first marker is deleted, and the second original character or the second original character on the left is deleted, and the target image is spliced to obtain the desensitized image;
[0036] If the second original character on the right is inconsistent with the second original character on the left, the first marker is deleted, and the target image is spliced to obtain the desensitized image.
[0037] In some embodiments, before performing privacy processing on the original field in the extended picture after the marking process according to the preset target marker and the preset target identifier to obtain the target picture, the method further includes:
[0038] The extended image is shaded to obtain a shaded extended image.
[0039] To achieve the above-mentioned purpose, a second aspect of an embodiment of the present application proposes a data privacy processing device, the device comprising:
[0040] An acquisition module, configured to acquire an original picture set to be processed; wherein the original picture set includes at least one original picture, and each original picture includes an original field;
[0041] A segmentation module, used for segmenting each of the original images to obtain at least three segmented images;
[0042] An extension module, used for extending the segmented picture according to the size of the segmented picture to obtain an extended picture;
[0043] A sequence marking module, used for marking a sequence identifier on the extended picture;
[0044] A privacy module, configured to perform privacy processing on the original field in the extended image after the marking process according to a preset target marker and a preset target identifier, so as to obtain a target image;
[0045] The splicing module is used to splice the target image according to the sequence identifier and the target marker to obtain a desensitized image.
[0046] To achieve the above-mentioned purpose, the third aspect of an embodiment of the present application proposes an electronic device, which includes a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for realizing connection and communication between the processor and the memory, and the program, when executed by the processor, implements the method described in the first aspect above.
[0047] To achieve the above-mentioned purpose, the fourth aspect of an embodiment of the present application proposes a storage medium, which is a computer-readable storage medium used for computer-readable storage, and the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the method described in the first aspect above.
[0048] The data privacy processing method and device, electronic device, and storage medium proposed in the present application divide the original image into segments to obtain at least three segmented images, then extend the segmented images according to the size of each segmented image to obtain an extended image, mark each extended image with a sequence identifier, and then perform privacy processing on the original fields in the marked extended image according to a preset target marker and a preset target identifier to obtain a target image, and finally perform splicing processing on the target image according to the sequence identifier and the target marker to obtain a desensitized image. The data privacy processing method of the embodiment of the present application realizes the protection of personal privacy information and prevents the possibility of missing labeled characters. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 is a flow chart of a data privacy processing method provided in an embodiment of the present application;
[0050] Figure 2 It is a schematic diagram of original picture segmentation and segmented picture extension provided by an embodiment of the present application;
[0051] Figure 3 yes Figure 1 A flowchart of the specific method of step S500;
[0052] Figure 4 yes Figure 2 A flowchart of the specific method of step S520 in FIG.
[0053] Figure 5 yes Figure 3 A flowchart of the specific method of step S523 in FIG.
[0054] Figure 6 yes Figure 1 A flowchart of the specific method of step S600 in FIG.
[0055] Figure 7 yes Figure 5 A flowchart of the specific method of step S660 in FIG.
[0056] Figure 8 is a structural diagram of a data privacy processing device provided in an embodiment of the present application;
[0057] Fig. 9 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION
[0058] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0059] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0060] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0061] First, some nouns involved in this application are analyzed:
[0062] Artificial intelligence (AI) is a new technical science that studies and develops theories, methods, technologies and application systems for simulating, extending and expanding human intelligence. AI is a branch of computer science that attempts to understand the essence of intelligence and produce a new type of intelligent machine that can respond in a similar way to human intelligence. Research in this field includes robotics, speech recognition, image recognition, natural language processing and expert systems. AI can simulate the information process of human consciousness and thinking. AI is also a theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0063] Medical cloud: Medical cloud refers to the use of cloud computing to create a medical and health service cloud platform based on new technologies such as cloud computing, mobile technology, multimedia, 4G communication, big data, and the Internet of Things, combined with medical technology, to achieve the sharing of medical resources and the expansion of medical scope. Because of the application of cloud computing technology, medical cloud improves the efficiency of medical institutions and facilitates residents to seek medical treatment. For example, hospital appointment registration, electronic medical records, medical insurance, etc. are all products of the combination of cloud computing and the medical field. Medical cloud also has the advantages of data security, information sharing, dynamic expansion, and overall layout.
[0064] Privacy protection is an important topic in the field of artificial intelligence. The leakage of personal privacy can put people in unpredictable risks. Artificial intelligence needs to use labeled pictures to train image recognition models. In the recognition of text images, images are fields selected by the pre-order detection algorithm. The contents of these fields may include personal names, ID numbers, home addresses, phone numbers, bank account numbers and other sensitive information. These sensitive information is easy to leak during the image annotation process. Therefore, when annotating images, it is also necessary to perform privacy processing on the images.
[0065] In related technologies, un-massified images are distributed to annotators through computers, USB flash drives, mobile hard drives, emails, mobile client software, etc. The annotators can directly see all the information on the images, which brings risks of personal privacy leakage. Therefore, how to ensure that privacy information can be protected when annotating images has become a technical problem that needs to be solved urgently in this field.
[0066] Based on this, the embodiments of the present application propose a data privacy processing method and device, an electronic device, and a storage medium, which can protect privacy information while annotating pictures.
[0067] It should be noted that in each specific implementation method of the present application, when it comes to processing data related to user identity or characteristics such as user personal information and user attribute information, the user's permission or consent must be obtained first, and the collection, use and processing of such data will comply with relevant laws, regulations and standards.
[0068] The data privacy processing method and device, electronic device, and storage medium provided in the embodiments of the present application are specifically illustrated through the following embodiments. First, the data privacy processing method in the embodiments of the present application is described.
[0069] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0070] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0071] The data privacy processing method provided in the embodiment of the present application relates to the field of artificial intelligence technology. The data privacy processing method provided in the embodiment of the present application can be applied to the terminal, can also be applied to the server side, and can also be software running in the terminal or the server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the server side can be configured as an independent physical server, or it can be configured as a server cluster or distributed system composed of multiple physical servers, and can also be configured as a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements the data privacy processing method, etc., but is not limited to the above forms.
[0072] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0073] The technical solution of the embodiment of the present application is further described below in conjunction with the accompanying drawings.
[0074] Figure 1 is an optional flowchart of the data privacy processing method provided in the embodiment of the present application. Figure 1 The method may include step S100, step S200, step S300, step S400, step S500 and step S600. It should be understood that the data privacy processing method of the embodiment of the present application includes but is not limited to step S100 to step S600. Figure 1 These six steps are introduced in detail.
[0075] Step S100, obtaining an original picture set to be processed; wherein the original picture set includes at least one original picture, and each original picture includes an original field;
[0076] Step S200, segmenting each original image to obtain at least three segmented images;
[0077] Step S300, extending the segmented image according to the size of the segmented image to obtain an extended image;
[0078] Step S400, marking the extended picture with a sequence identifier;
[0079] Step S500, performing privacy processing on the original field in the extended image after the marking process according to the preset target marker and the preset target identifier, to obtain the target image;
[0080] Step S600, performing splicing processing on the target image according to the sequence identifier and the target marker to obtain a desensitized image.
[0081] The data privacy processing method proposed in the present application divides the original image into segments to obtain at least three segmented images, then extends the segmented images according to the size of each segmented image to obtain an extended image, and then marks each extended image with a sequence identifier, and then performs privacy processing on the original fields in the marked extended image according to a preset target marker and a preset target identifier to obtain a target image, and finally splices the target image according to the sequence identifier and the target marker to obtain a desensitized image. The data privacy processing method of the embodiment of the present application realizes the protection of personal privacy information and prevents the possibility of missing labeled characters.
[0082] In step S100 of some embodiments, the original image may be a medical diagnosis image, or other images in the medical field, or some sensitive images of a bank, or images for personal use, etc., and this application does not impose specific restrictions on this. If it is a medical diagnosis image or other images in the medical field, the original image set can be obtained through a medical cloud server. The original image is provided with an original field, which may include sensitive fields such as ID number, home address, mobile phone number, personal name, bank account number, etc.
[0083] Please refer to Figure 2 In step S200 of some embodiments, assuming that the width of the original image is w and the height is h, the original image can be segmented in the following manner:
[0084] In the width direction of the original image, the original image is divided into three equal parts to obtain three segmented images. The letter W represents the width and the letter h represents the height. The width of each segmented image is W, height is h. Of course, other forms of cutting can also be adopted, such as quartering, six-quartering, or just cutting into three parts, quartering, not dividing equally, but taking any cutting method, etc., and the cutting direction is not limited to the width direction, and the height direction can also be cut, and this application does not make specific restrictions on this.
[0085] By dividing the original image into three parts, the annotator can only see part of the original field of the original image. If the image is divided into three parts, the annotator can only see one third of the original field of the original image.
[0086] In step S300 of some embodiments, the segmented picture is extended according to the size of the segmented picture to obtain an extended picture.
[0087] For example, see Figure 2 , the width of a segmented image is W, the height is h, then the segmented image can be extended in the following ways:
[0088] At the segmentation point in step S200, add h, then the width of each of the three segmented images is W+ h. W+h, W+ h. The added part is Figure 2 Part A, Part B, Part C and Part D of the Figure 2 The a part in the image is the first segment when segmented. The width of the segmented image in part a is W+ h, the height is h, Figure 2 Part b is the second segment when segmented. The width of the segmented image in part b is W+h, the height is h, Figure 2 Part c is the third segment when segmented. The width of the segmented image in part c is W+ h, the height is h.
[0089] It should be noted that the extension processing method in the present application is not limited to this, and other forms of extension processing methods may also be adopted, which will not be described one by one here.
[0090] The specific method of obtaining the extended image by segmented image extension processing may be:
[0091] The size of the segmented image is obtained, and then the segmented image is enlarged at the segmentation point according to the size of the segmented image, and the increased part is filled to achieve the extension of the segmented image.
[0092] By extending the segmented images, it is possible to ensure that the segmentation process in step S200 does not separate the original characters, resulting in the original characters at the segmentation point of the two segmented images being unclear, thereby causing the original characters to be missed in subsequent labeling. This arrangement assists in the observation and labeling of the original characters at the segmentation point.
[0093] In step S400 of some embodiments, the segmented images after the extension process, i.e., the extended images, are marked with sequence identifiers to facilitate the subsequent splicing of the extended images. The sequence identifiers may be numbers arranged in sequence. For example, the first extended image is called "Image 1", the second extended image is called "Image 2", and so on. The sequence identifier may also be letters, etc., or a custom file name, etc.
[0094] It should be noted that a sequence identifier can only be used once. For example, if the first extended image obtained by segmenting the first original image is marked as "Image 1", the subsequent sequence identifier "Image 1" cannot be used to mark extended images obtained by segmenting other original images.
[0095] Please refer to Figure 3 In some embodiments of the present application, step S500 includes but is not limited to step S510 and step S520. Figure 3 These two steps are explained in detail.
[0096] Step S510, using the target identifier to identify the original field in the extended image to obtain an identified image;
[0097] Step S520, marking the identification image according to the target marker to obtain the target image.
[0098] Specifically, in this embodiment, the target identifier is a character string, and an identification image is obtained by marking the target identifier on the original field, thereby achieving coverage of the original field and achieving the purpose of extending the privacy of the image; then, the identification image obtained after the privacy processing is marked with the target marker to obtain the target image, so as to facilitate subsequent splicing processing, prevent the possibility of multiple markings of original characters during splicing, and facilitate judgment whether the two sides of the segmented character are the same original character.
[0099] Please refer to Figure 4 In some embodiments of the present application, the original field includes at least three original characters; step S520 includes but is not limited to step S521, step S522 and step S523, the following combination Figure 4 , these three steps are introduced in detail.
[0100] Step S521, obtaining the position of the first original character of each extended image to obtain the starting position;
[0101] Step S522, obtaining the position of the last original character of each extended image to obtain the end position;
[0102] Step S523, adding and processing the identification picture with the target marker according to the starting position and the ending position to obtain the target picture.
[0103] Specifically, in this embodiment, the position of the first original character in each extended image is first obtained to obtain the starting position, the position of the last original character in each extended image is obtained to obtain the ending position, and then according to the starting position and the ending position, the target marker is added to the identification image to obtain the target image, so as to facilitate the subsequent splicing processing of the target image according to the target marker and the sequence identifier.
[0104] Please refer to Figure 5 In some embodiments of the present application, the target marker includes a first marker and a second marker; step S523 includes step S5231, step S5232, step S5233 and step S5234. It should be understood that step S523 of the embodiment of the present application includes but is not limited to step S5231 to step S5234. Figure 5 These four steps are described in detail.
[0105] Step S5231, if the starting position is at a preset position, then a first marker is added before the corresponding original character to obtain a target image; wherein the preset position is used to represent the segmentation position of the segmented image;
[0106] Step S5232, if the starting position is not at the preset position, then add a second marker before the corresponding original character to obtain a target image;
[0107] Step S5233, if the end position is at the preset position, then add the first marker after the corresponding original character to obtain the target image;
[0108] Step S5234, if the end position is not at the preset position, a second marker is added after the corresponding original character to obtain a target image.
[0109] Specifically, in this embodiment, the preset position is used to represent the segmentation position of the segmented image. For the segmented image in the middle position, there are two preset positions, and for the segmented image at the edge, there is only one preset position. If the starting position is at the preset position, it means that there is a situation where the original character spans different segmented images, that is, when the segmentation is performed in step S200, there is a situation where the original character is segmented. In this case, the original character is at the starting position of the segmented image, so the first marker is added in front of the original character to obtain the target image.
[0110] If the starting position is not at the preset position, it means that there is no original character across different segmented images, that is, during the segmentation in step S200, the original character corresponding to the starting position of the segmented image is not segmented. In this case, a second marker is added in front of the original character to obtain a target image.
[0111] If the end position is at the preset position, it means that the original character spans across different segmented images, that is, the original character is segmented during segmentation in step S200. In this case, the original character is at the end position of the segmented image, so the first marker is added after the original character to obtain the target image.
[0112] If the end position is not at the preset position, it means that there is no original character across different segmented images, that is, when the segmentation is performed in step S200, the original character corresponding to the starting position of the segmented image is not segmented. In this case, a second marker is added after the original character to obtain the target image.
[0113] By adding a target marker before the start position or after the end position of the segmented image, the subsequent splicing of the target image is facilitated and no splicing errors can be ensured.
[0114] Please refer to Figure 6 In some embodiments of the present application, the target marker includes a first marker and a second marker, and step S600 includes step S610, step S620, step S630, step S640, step S650, and step S660. It should be understood that step S600 of the embodiment of the present application includes but is not limited to step S610 to step S660. Figure 6 These six steps are introduced in detail.
[0115] Step S610, obtaining a current sequence identifier to obtain a first identifier;
[0116] Step S620, obtaining a target marker on the right side of the target image corresponding to the first identifier to obtain a current marker;
[0117] Step S630, obtaining a sequential identifier of the next order of the first identifier to obtain a second identifier;
[0118] Step S640, obtaining the target marker on the left side of the target image corresponding to the second identifier to obtain a sequence marker;
[0119] Step S650: if the current marker is the second marker and the sequence marker is the second marker, the second marker is deleted and the target image is spliced to obtain a desensitized image;
[0120] Step S660, if the current marker is the first marker, or the sequence marker is the first marker, then obtain the second original character on the right side of the target image corresponding to the first identifier, obtain the second original character on the left side of the target image corresponding to the second identifier, and splice the target image according to the second original character on the right side and the second original character on the left side to obtain a desensitized image.
[0121] Specifically, in this embodiment, the sequential identifier of the current target image is obtained, and the sequential identifier is recorded as the first identifier. Then, the target marker on the right side of the target image corresponding to the first identifier is obtained, and the target marker is recorded as the current marker. The sequential identifier of the next order of the first identifier is obtained, and the sequential identifier is recorded as the second identifier. The target marker on the left side of the target image corresponding to the second identifier is obtained, and the target marker is recorded as the sequential marker.
[0122] For example, the sequential identifier of the current target image is "Picture 1", that is, the first identifier is "Picture 1", and the second identifier is "Picture 2", then the target marker on the right side of "Picture 1" is obtained and recorded as the current marker, and the target marker on the left side of "Picture 2" is obtained and recorded as the sequential marker.
[0123] If the current marker is the second marker and the sequential marker is the second marker, it means that the target image corresponding to the current marker and the target image corresponding to the sequential marker are connected in the original image. Therefore, in this case, you only need to delete the current marker and the sequential marker, and splice the two target images together to get the desensitized image.
[0124] If the current marker is the first marker, or the sequence marker is the first marker, in this case it can only be determined that the original characters were split during segmentation. At this time, it is necessary to obtain the second original character on the right side of the target image corresponding to the first identifier, and obtain the second original character on the left side of the target image corresponding to the second identifier. Then, according to the second original character on the right side and the second original character on the left side, the target image is spliced to obtain a desensitized image.
[0125] For example, the first marker is the letter "a", the second marker is the letter "b", the first identifier is "Picture 1", and the second identifier is "Picture 2". If the current marker and the sequence marker are both the letter "b", it means that "Picture 1" and "Picture 2" are connected in the original picture. Therefore, in this case, you only need to delete the current marker and the sequence marker, and splice the two target pictures together to get the desensitized picture.
[0126] If one of the current marker and the sequence marker is the letter "a", in this case it can only be judged that the original characters were split during segmentation. At this time, the second original character on the right side of "Picture 1" is obtained, and the second original character on the left side of "Picture 2" is obtained. Then, based on the second original character on the right side and the second original character on the left side, the target image is spliced to obtain a desensitized image.
[0127] Please refer to Figure 7 In some embodiments of the present application, step S660 includes but is not limited to step S661 and step S662. Figure 7 , these two steps are introduced in detail.
[0128] Step S661: if the second original character on the right is consistent with the second original character on the left, the first marker is deleted, and the second original character or the second original character on the left is deleted, and the target image is spliced to obtain a desensitized image;
[0129] Step S662: If the second original character on the right is inconsistent with the second original character on the left, the first marker is deleted, and the target image is spliced to obtain a desensitized image.
[0130] Specifically, in this implementation, if the second original character on the right and the second original character on the left are consistent, the current marker and the sequence marker are deleted, and then the second original character or the second original character on the left is deleted, and then the target image is spliced together to obtain a desensitized image; if the second original character on the right and the second original character on the left are inconsistent, just delete the current marker and the sequence marker, and then splice the target images together to obtain a desensitized image.
[0131] In some embodiments of the present application, before step S500, the data privacy processing method further includes the following steps:
[0132] The extended image is shaded to obtain a shaded extended image.
[0133] Specifically, in this embodiment, the added part in the extended picture is shaded, that is, Figure 2Part A, part B, part C and part D in the image are shaded to obtain a shaded extended image. Through the shaded processing, parts A, part B, part C and part D in the extended image present a shadow effect. The specific processing method of the shaded processing can be:
[0134] The pixel values of parts A, B, C, and D in the extended image are reduced to give them a shadow effect. For example, the pixel values of parts A, B, C, and D in the extended image are divided by 2 to achieve shadow processing of parts A, B, C, and D in the extended image, thereby obtaining a shadowed extended image.
[0135] By performing shading processing on parts A, B, C and D in the extended image, the extended image as a whole presents two parts, normal brightness and shadow, so as to facilitate subsequent marking processing of the extended image.
[0136] After the extended image is shaded, the obtained shaded extended image can be shuffled to obtain a shuffled extended image, so as to disrupt the order between the extended images and reduce the probability of the same annotator annotating the same original image, thereby enhancing the protection of privacy information.
[0137] It should be noted that, in the embodiment of the present application, the first marker and the second marker are merely marking symbols and have no other meanings, such as the first marker is "1" and the second marker is "0", or other forms.
[0138] Correspondingly, the privacy protection and splicing processing of the extended image, namely step S500 and step S600, are as follows:
[0139] The target identifier is a string. The target identifier includes a first identifier and a second identifier. The first identifier is the number "1" and the second identifier is the number "0". The target identifier is marked on the original field, and then the number "1" or the number "0" is marked on the extended image to obtain the target image. The specific marking method is:
[0140] If there is no original character spanning the normal brightness and shadow parts, the original characters in the normal brightness part are marked with the target identifier, and the number "0" is added to the corresponding position of the shadow part, that is, after or before the target identifier. For the original characters that fall completely in the shadow part, the target identifier is not used for marking.
[0141] If there are original characters spanning the normal brightness and shadow parts, the original characters in the normal brightness part and the original characters spanning the normal brightness and shadow parts will be marked with the target identifier, and a number "1" will be added at the corresponding position of the shadow part, that is, after or before the target identifier. For the original characters that fall completely in the shadow part, the target identifier will not be used to mark them.
[0142] Correspondingly, the specific splicing method is:
[0143] Taking the example of dividing the original image into three equal parts, the detailed description is given. Other cases are similar and will not be described in detail. The sequential identifiers are: "Image 1", "Image 2" and "Image 3".
[0144] First, obtain the sequence identifier of the current target image. If the current sequence identifier is "Image 1", find the target image with the sequence identifier "Image 2", and obtain the target marker on the right side of "Image 1", record it as the current marker, and obtain the target marker on the left side of "Image 2", record it as the sequence marker.
[0145] If both the current marker and the sequence marker are the number "0", remove the current marker and the sequence marker, and simply concatenate the two target images; if at least one of the current marker and the sequence marker is the number "1", obtain the second original character on the right side of "Image 1" and the second original character on the left side of "Image 2". If the second original character on the right side of "Image 1" and the second original character on the left side of "Image 2" are the same, keep one when concatenating. Otherwise, simply remove the current marker and the sequence marker, and concatenate the two target images to obtain the desensitized image.
[0146] Please refer to Figure 8 Some embodiments of the present application also propose a data privacy processing device, which includes an acquisition module 700, a segmentation module 800, an extension module 900, a sequence marking module 1000, a privacy module 1100 and a splicing module 1200.
[0147] The acquisition module 700 is used to acquire an original picture set to be processed; wherein the original picture set includes at least one original picture, and each original picture includes an original field.
[0148] The segmentation module 800 is used to segment each original image to obtain at least three segmented images.
[0149] The extension module 900 is used to extend the segmented picture according to the size of the segmented picture to obtain an extended picture.
[0150] The sequence marking module 1000 is used to mark the extended pictures with sequence identifiers.
[0151] The privacy module 1100 is used to perform privacy processing on the original fields in the extended picture after the marking processing according to the preset target marker and the preset target identifier to obtain the target picture.
[0152] The splicing module 1200 is used to splice the target image according to the sequence identifier and the target marker to obtain a desensitized image.
[0153] The data privacy processing device of the embodiment of the present application divides the original image into segments to obtain at least three segmented images, then extends the segmented images according to the size of each segmented image to obtain an extended image, and then marks each extended image with a sequence identifier, and then performs privacy processing on the original fields in the marked extended image according to a preset target marker and a preset target identifier to obtain a target image, and finally splices the target image according to the sequence identifier and the target marker to obtain a desensitized image. The data privacy processing method of the embodiment of the present application realizes the protection of personal privacy information and prevents the possibility of missing labeled characters.
[0154] It should be noted that the data privacy processing device of the embodiment of the present application corresponds to the aforementioned data privacy processing method. For the specific processing flow or processing method, please refer to the aforementioned data privacy processing method, which will not be repeated here.
[0155] The embodiment of the present application also provides an electronic device, the electronic device comprising: a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for realizing connection and communication between the processor and the memory, and the above-mentioned data privacy processing method is realized when the program is executed by the processor. The electronic device can be any intelligent terminal including a tablet computer, a car computer, etc.
[0156] The electronic device of the embodiment of the present application executes the above-mentioned data privacy processing method, obtains at least three segmented images by segmenting the original image, and then extends the segmented image according to the size of each segmented image to obtain an extended image, and then marks each extended image with a sequence identifier, and then performs privacy processing on the original fields in the marked extended image according to a preset target marker and a preset target identifier to obtain a target image, and finally splices the target image according to the sequence identifier and the target marker to obtain a desensitized image. The data privacy processing method of the embodiment of the present application realizes the protection of personal privacy information and prevents the possibility of missing labeled characters.
[0157] See also Fig. 9 , Fig. 9 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:
[0158] The processor 1300 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;
[0159] The memory 1400 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1400 can store an operating system and other applications. When the technical solution provided in the embodiments of this specification is implemented by software or firmware, the relevant program code is stored in the memory 1400, and the processor 1300 calls and executes the data privacy processing method of the embodiments of this application;
[0160] Input / output interface 1500, used to implement information input and output;
[0161] The communication interface 1600 is used to realize the communication interaction between the device and other devices. The communication can be realized through a wired manner (such as USB, network cable, etc.) or a wireless manner (such as mobile network, WIFI, Bluetooth, etc.);
[0162] A bus 1700 that transmits information between various components of the device (e.g., the processor 1300, the memory 1400, the input / output interface 1500, and the communication interface 1600);
[0163] The processor 1300 , the memory 1400 , the input / output interface 1500 , and the communication interface 1600 are connected to each other in communication within the device via a bus 1700 .
[0164] An embodiment of the present application also provides a storage medium, which is a computer-readable storage medium used for computer-readable storage. The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the above-mentioned data privacy processing method.
[0165] The storage medium of the embodiment of the present application executes the above-mentioned data privacy processing method, obtains at least three segmented images by segmenting the original image, and then extends the segmented image according to the size of each segmented image to obtain an extended image, and then marks each extended image with a sequence identifier, and then performs privacy processing on the original fields in the marked extended image according to a preset target marker and a preset target identifier to obtain a target image, and finally splices the target image according to the sequence identifier and the target marker to obtain a desensitized image. The data privacy processing method of the embodiment of the present application realizes the protection of personal privacy information and prevents the possibility of missing labeled characters.
[0166] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0167] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0168] It can be understood by those skilled in the art that Figure 1-7 The technical solutions shown in the figure do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than those shown in the figure, or a combination of certain steps, or different steps.
[0169] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0170] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0171] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0172] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0173] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0174] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0175] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0176] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.
[0177] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.
Claims
1. A data privacy processing method, characterized in that: The method comprises: Acquire an original picture set to be processed; wherein the original picture set includes at least one original picture, and each of the original pictures includes an original field; Segment each of the original images to obtain at least three segmented images; Extending the segmented picture according to the size of the segmented picture to obtain an extended picture; marking the extended pictures with sequential identifiers; According to a preset target marker and a preset target identifier, privacy processing is performed on the original field in the extended image after the marking process to obtain a target image; Performing splicing processing on the target image according to the sequence identifier and the target marker to obtain a desensitized image; The step of performing privacy processing on the original field in the extended image after the marking process according to the preset target marker and the preset target identifier to obtain the target image includes: Performing identification processing on the original field in the extended picture with the target identifier to obtain an identification picture; Marking the identification image according to the target marker to obtain the target image; The target marker includes a first marker and a second marker; the step of splicing the target image according to the sequence identifier and the target marker to obtain a desensitized image includes: Get the current sequence identifier and obtain the first identifier; Obtain a target marker on the right side of the target image corresponding to the first identifier to obtain a current marker; Obtaining a sequential identifier of the next order of the first identifier to obtain a second identifier; Obtain a target marker on the left side of the target image corresponding to the second identifier to obtain a sequence marker; If the current marker is the second marker, and the sequence marker is the second marker, then the second marker is deleted, and the target image is spliced to obtain the desensitized image; If the current marker is the first marker, or the sequence marker is the first marker, obtain the second original character on the right side of the target image corresponding to the first identifier, obtain the second original character on the left side of the target image corresponding to the second identifier, and splice the target image according to the second original character on the right side and the second original character on the left side to obtain the desensitized image.
2. The method according to claim 1, characterized in that: The original field includes at least three original characters; The step of marking the identification image according to the target marker to obtain the target image includes: Obtain the position of the first original character of each of the extended images to obtain the starting position; Obtain the position of the last original character of each of the extended images to obtain the end position; According to the starting position and the ending position, the identification picture is added and processed with the target marker to obtain the target picture.
3. The method according to claim 2, characterized in that The target marker includes a first marker and a second marker; The step of adding processing to the identification picture with the target marker according to the starting position and the ending position to obtain the target picture includes: If the starting position is at a preset position, then the first marker is added before the corresponding original character to obtain the target image; wherein the preset position is used to represent the segmentation position of the segmented image; If the starting position is not at the preset position, adding the second marker before the corresponding original character to obtain the target image; If the end position is at the preset position, then adding the first marker after the corresponding original character to obtain the target image; If the end position is not at the preset position, the second marker is added after the corresponding original character to obtain the target image.
4. The method according to any one of claims 1 to 3, characterized in that: The step of performing splicing processing on the target image according to the second original character on the right and the second original character on the left includes: If the second original character on the right is consistent with the second original character on the left, the first marker is deleted, and the second original character or the second original character on the left is deleted, and the target image is spliced to obtain the desensitized image; If the second original character on the right is inconsistent with the second original character on the left, the first marker is deleted, and the target image is spliced to obtain the desensitized image.
5. The method according to any one of claims 1 to 3, characterized in that: Before performing privacy processing on the original field in the extended picture after the marking process according to the preset target marker and the preset target identifier to obtain the target picture, the method further includes: The extended image is shaded to obtain a shaded extended image.
6. A data privacy processing device, characterized in that: The device comprises: An acquisition module, configured to acquire an original picture set to be processed; wherein the original picture set includes at least one original picture, and each original picture includes an original field; A segmentation module, used for segmenting each of the original images to obtain at least three segmented images; An extension module, used for extending the segmented picture according to the size of the segmented picture to obtain an extended picture; A sequence marking module, used for marking a sequence identifier on the extended picture; A privacy module, configured to perform privacy processing on the original field in the extended image after the marking process according to a preset target marker and a preset target identifier, so as to obtain a target image; A splicing module, used for splicing the target image according to the sequence identifier and the target marker to obtain a desensitized image; The privacy module is used to perform privacy processing on the original field in the extended picture after the marking process according to the preset target marker and the preset target identifier to obtain the target picture, including: Performing identification processing on the original field in the extended picture with the target identifier to obtain an identification picture; Marking the identification image according to the target marker to obtain the target image; The target marker includes a first marker and a second marker; the splicing module is used to splice the target image according to the sequence identifier and the target marker to obtain a desensitized image, including: Get the current sequence identifier and obtain the first identifier; Obtain a target marker on the right side of the target image corresponding to the first identifier to obtain a current marker; Obtaining a sequential identifier of the next order of the first identifier to obtain a second identifier; Obtain a target marker on the left side of the target image corresponding to the second identifier to obtain a sequence marker; If the current marker is the second marker, and the sequence marker is the second marker, then the second marker is deleted, and the target image is spliced to obtain the desensitized image; If the current marker is the first marker, or the sequence marker is the first marker, obtain the second original character on the right side of the target image corresponding to the first identifier, obtain the second original character on the left side of the target image corresponding to the second identifier, and splice the target image according to the second original character on the right side and the second original character on the left side to obtain the desensitized image.
7. An electronic device, characterized in that: The electronic device includes a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for realizing connection and communication between the processor and the memory. When the program is executed by the processor, the steps of the data privacy processing method as described in any one of claims 1 to 5 are realized.
8. A storage medium, the storage medium being a computer-readable storage medium, used for computer-readable storage, characterized in that: The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the data privacy processing method described in any one of claims 1 to 5.
Citation Information
Patent Citations
Data processing method, device and apparatus based on privacy protection
CN112200132A
Image processing method and device with privacy protection function, electronic equipment and medium
CN112685762A