Privacy information shielding method and device based on version identification and key field positioning

By quickly identifying and hiding the privacy information in electronic files based on version identification and key field positioning, the problems of low efficiency and low accuracy in the existing technology are solved, and fast and efficient privacy information processing is achieved and reduced. cost.

CN119227138AActive Publication Date: 2024-12-31BEIJING YINGYAN CHUANGXIN TECH DEV CO LTD

Patent Information

Application Number
CN202411469248.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-21
Publication Date
2024-12-31
Estimated Expiration
2044-10-21

AI Technical Summary

Technical Problem

The existing personal privacy information blocking processing methods are inefficient, low accuracy and high cost, mainly because information extraction and semantic understanding require a large amount of data model training, resulting in a long transformation cycle and limited effect due to the type of training material.

Method used

Using the method of version identification and key field positioning, by obtaining electronic files, splitting them into single-page image data, using OCR technology to identify and structure encapsulate, field name matching search and row vertical data grouping, determine the privacy area, and finally Intercept or overwrite hidden privacy content in electronic files.

Benefits of technology

It realizes fast and efficient personal privacy information processing, reduces costs, improves the accuracy and efficiency of privacy information blocking, and is easy to deploy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119227138A_ABST
    Figure CN119227138A_ABST
Patent Text Reader

Abstract

The invention discloses a privacy information shielding method and device based on version identification and key field positioning, and the method comprises the steps: obtaining an electronic file containing personal privacy information, and splitting the electronic file into single-page image data; identifying the single-page image data, acquiring identification coordinates and text information, and performing structural packaging on the identification coordinates and the text information according to regions to obtain an identification result; performing field name matching search on the identification result according to a preset privacy field name and a privacy key field to obtain a privacy key word identification result, and performing row longitudinal data grouping to obtain a row longitudinal grouping result; judging the privacy area according to the row longitudinal grouping result and the matching search to obtain a privacy area judgment result; and carrying out blank area interception or coverage on the electronic file according to the privacy area judgment result so as to hide the privacy content. According to the invention, personal privacy information processing can be realized quickly and efficiently, and the cost is low.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a method and device for shielding privacy information based on version identification and key field positioning. Background Art

[0002] Personal privacy is an indispensable basic right in modern society. It not only concerns the protection of personal information, but also directly affects everyone's freedom and security. In the digital age, personal data is often collected, stored and analyzed by companies and institutions. What is worrying is that this information may be leaked or abused without authorization. Therefore, it is particularly important to maintain personal privacy. Protecting privacy is not only a defense of one's own rights, but also the basis of social trust.

[0003] In order to protect personal privacy, many companies and organizations have adopted information shielding technology to desensitize, encrypt or anonymize sensitive data to ensure that personal identity information is not leaked when using and sharing data. This technology can not only effectively prevent data leakage and abuse, but also protect user privacy in the fields of big data analysis, artificial intelligence applications, etc.

[0004] At present, the shielding of personal privacy information is mainly done by extracting information and understanding semantics to judge personal information, and then smearing the data to remove privacy. Among them, information extraction is mainly through OCR recognition, and the purpose of semantic understanding is to identify personal key information, extract personal information in the text content, such as name, ID number, address and phone number, and then smear the extracted content. However, this method requires a large amount of data for model training to achieve the purpose of semantic understanding, resulting in a long conversion cycle, low efficiency and high cost; and its processing effect may be limited by the type of training materials, resulting in low accuracy. Summary of the invention

[0005] To this end, the present application provides a privacy information shielding method and device based on version identification and key field positioning to solve the problems of low efficiency and accuracy and high cost in the existing technology for shielding and processing personal privacy information.

[0006] In order to achieve the above objectives, this application provides the following technical solutions:

[0007] In a first aspect, a privacy information shielding method based on version identification and key field positioning includes:

[0008] Step 1: Obtain an electronic file containing personal privacy information, and split the electronic file into single-page image data;

[0009] Step 2: Identify the single page image data, obtain identification coordinates and text information, and structurally encapsulate the identification coordinates and text information by region to obtain identification results;

[0010] Step 3: Perform field name matching search on the recognition result according to the pre-set privacy field name and privacy key field to obtain the privacy keyword recognition result;

[0011] Step 4: grouping the data in rows and verticals according to the privacy keyword recognition result to obtain row and vertical grouping results;

[0012] Step 5: Perform privacy area determination based on the row vertical grouping result and matching search to obtain a privacy area determination result;

[0013] Step 6: According to the privacy area determination result, a blank area is intercepted or covered on the electronic file to hide the privacy content.

[0014] Furthermore, in step 1, the electronic file is in pdf format or jpg format.

[0015] Furthermore, in the step 2, OCR technology is used to identify the single page image data.

[0016] Furthermore, the step 4 is specifically as follows: using the four corner coordinates of the recognition result and the four corner coordinates of the privacy keyword recognition result to merge the rectangular area, and then calculating the ratio of the area of ​​the recognition result area and the shadow overlapping part of the rectangular merged area to determine whether they belong to the same row; and then sorting the X-coordinate sequence of the recognition result area to complete the acquisition of the row and vertical information and obtain the row and vertical grouping result.

[0017] Furthermore, the method further includes: outputting the electronic file with the hidden privacy content according to the required file format.

[0018] In a second aspect, a privacy information shielding device based on version identification and key field positioning includes:

[0019] A data acquisition module, used to acquire electronic files containing personal privacy information and split the electronic files into single-page image data;

[0020] A data recognition module is used to recognize the single-page image data, obtain recognition coordinates and text information, and structurally encapsulate the recognition coordinates and text information by region to obtain a recognition result;

[0021] A matching and searching module is used to perform a field name matching and searching on the identification result according to the pre-set privacy field name and privacy key field to obtain the privacy keyword identification result;

[0022] A row and vertical grouping module, used for performing row and vertical data grouping according to the privacy keyword recognition result to obtain a row and vertical grouping result;

[0023] A privacy region determination module, used to determine the privacy region according to the row vertical grouping result and the matching search, and obtain a privacy region determination result;

[0024] The privacy content hiding module is used to intercept or cover a blank area on the electronic file according to the privacy area determination result, so as to hide the privacy content.

[0025] Furthermore, the row and vertical grouping module is specifically used to: use the four corner coordinates of the recognition result and the four corner coordinates of the privacy keyword recognition result to merge the rectangular area, and then calculate the ratio of the area of ​​the recognition result area and the shadow overlapping part of the rectangular merged area to determine whether they belong to the same row; then sort the X-coordinate sequence of the recognition result area to complete the acquisition of row and vertical information and obtain the row and vertical grouping result.

[0026] In a third aspect, a computer device includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of a privacy information shielding method based on version identification and key field positioning when executing the computer program.

[0027] In a fourth aspect, a computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of a privacy information shielding method based on version identification and key field positioning.

[0028] In a fifth aspect, a computer program product includes a computer program or instructions, which, when executed by a processor, implement the steps of a privacy information shielding method based on version identification and key field positioning.

[0029] Compared with the prior art, this application has at least the following beneficial effects:

[0030] The present application provides a privacy information shielding method and device based on version identification and key field positioning, which obtains an electronic file containing personal privacy information and splits the electronic file into single-page image data; identifies the single-page image data and obtains identification coordinates and text information, and structurally encapsulates the identification coordinates and text information by region to obtain an identification result; performs field name matching search on the identification result according to the pre-set privacy field name and privacy key field to obtain a privacy keyword identification result; performs row and vertical data grouping according to the privacy keyword identification result to obtain a row and vertical grouping result; performs privacy area determination according to the row and vertical grouping result and matching search to obtain a privacy area determination result; and performs blank area interception or overwriting on the electronic file according to the privacy area determination result, thereby hiding the privacy content. The privacy information shielding method and device based on version identification and key field positioning provided by the present application are easy to deploy, can quickly and efficiently realize personal privacy information processing, and are low-cost. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more intuitively illustrate the prior art and the present application, exemplary drawings are given below. It should be understood that the specific shapes and structures shown in the drawings should not generally be regarded as limiting conditions for implementing the present application; for example, those skilled in the art are capable of easily making conventional adjustments or further optimizations to the addition / reduction / attribution division, specific shapes, positional relationships, connection methods, dimensional ratios, etc. of certain units (components) based on the technical concepts and exemplary drawings disclosed in the present application.

[0032] Figure 1 A flow chart of a privacy information shielding method based on version identification and key field positioning provided in Example 1 of the present application. DETAILED DESCRIPTION

[0033] The present application is further described below in detail through specific embodiments in conjunction with the accompanying drawings.

[0034] In the description of this application: unless otherwise specified, the meaning of "plurality" is two or more. The terms "first", "second", "third", etc. in this application are intended to distinguish the objects referred to, and do not have special meanings in terms of technical connotations (for example, they should not be understood as emphasizing the importance or order, etc.). Expressions such as "including", "comprising", "having", etc. also mean "not limited to" (certain units, components, materials, steps, etc.).

[0035] The terms such as "upper", "lower", "left", "right", "middle", etc. cited in this application are usually used to indicate the general relative position relationship for the purpose of intuitive understanding by referring to the drawings, and are not absolute limitations on the position relationship in the actual product.

[0036] Embodiment 1

[0037] See also Figure 1 This embodiment provides a privacy information shielding method based on version identification and key field positioning, including:

[0038] S1: Obtain electronic files containing personal privacy information and split the electronic files into single-page image data;

[0039] Specifically, in this step, the electronic file containing personal privacy information can be obtained by scanning, uploading or extracting from a database, etc. The electronic file format can be pdf or jpg.

[0040] When splitting electronic files, you can use image processing or document processing tools to split the entire electronic file into single-page image data. For PDF files, you can use a special PDF splitting tool; for image files, you can split them according to the preset resolution or page number, so as to ensure that each page of data can be processed separately and maintain the original format and quality.

[0041] S2: Identify the single-page image data, obtain the identification coordinates and text information, and encapsulate the identification coordinates and text information by region to obtain the identification result;

[0042] Specifically, this step uses optical character recognition (OCR) technology to perform text recognition on each page of image data, converting the text information in the image into an editable digital format; during the recognition process, the coordinate position of each recognized text (such as the coordinates of the upper left corner and the lower right corner) is recorded for subsequent processing; finally, the recognized text information and its corresponding coordinates are structured and packaged, for example, using JSON or XML format to save, for subsequent parsing and processing. Structured data should include text content, coordinate information, and possible other metadata (such as font, size, color, etc.).

[0043] S3: Perform field name matching search on the recognition result according to the pre-set privacy field name and privacy key field to obtain the privacy keyword recognition result;

[0044] Specifically, this step performs a field name matching search on the recognition results according to the privacy field configuration to find out whether there is an area with the same name as the privacy field. The matching search mode can be searched according to the containment, equality, and name-starting patterns.

[0045] This embodiment supports pre-setting of privacy field names and privacy key fields, for example: adding a privacy type as a document number privacy field, and setting the document number field name to "ID number"; if the name of the privacy field is not set, the privacy field of this type will be skipped during processing. The privacy field name can be set to multiple names for the same type of privacy field depending on the material currently being processed, separated by English commas, for example: the document number privacy information name can be set to: "ID number, document number, ID card".

[0046] S4: grouping the row and vertical data according to the privacy keyword recognition result to obtain the row and vertical grouping result;

[0047] During OCR recognition, the text layout coordinates are extracted at the same time, and the row and vertical information of the recognized content is calculated through the threshold of the shadow area of ​​the coordinate rectangular area. When calculating the row and vertical information, it is necessary to consider the inclination angle and other related issues during the image material acquisition process. When summarizing the layout, the row and vertical coordinate points of the recognition results are used to calculate the shadow area ratio of the area, and then the row and vertical classification is performed according to the threshold.

[0048] Therefore, this step specifically includes: polling the recognition result area, using the four corner coordinates of the recognition result and the four corner coordinates of the privacy keyword recognition result to merge the rectangular area, and then determining whether they belong to the same row by calculating the ratio of the area of ​​the recognition result area and the shadow overlap of the rectangular merged area; after the row information is calculated, the X coordinate order of the area is sorted to complete the acquisition of the row vertical information.

[0049] S5: Determine the privacy area according to the row vertical grouping result and the matching search to obtain the privacy area determination result;

[0050] Specifically, the privacy area is determined based on the row vertical grouping results and the matching search mode. When matching the search, verify whether the content contains, is equal, or starts and ends. For example, if the search mode is equal, the next area of ​​the row information is the content of the privacy field; if the search mode is starting with a field, the current field area is the content of the privacy field.

[0051] S6: According to the privacy area determination result, a blank area is intercepted or covered on the electronic document, so as to hide the privacy content.

[0052] Specifically, the blank area on the image file is intercepted or covered based on the area determination result, so as to hide the private content. Before the data is output, the private area can be modified and deleted.

[0053] The privacy information shielding method based on version identification and key field positioning provided in this embodiment also includes: exporting data according to the file format required for output, processing the target image when generating the file according to the information shielding mode, and outputting the image format of pdf or jpg, and setting a watermark at the same time.

[0054] The privacy information shielding method based on version identification and key field positioning provided in this embodiment uses OCR technology and original layout information to compare personal information and locate private content according to key field data, and then smears data according to layout identification coordinates, thereby achieving the purpose of personal data shielding. The entire method is easy to deploy and can quickly and efficiently implement personal privacy information shielding processing; at the same time, it supports the customization of privacy key content and can customize the privacy range according to actual application scenarios and needs, thereby reducing costs, and has the advantages of lightweight technology and low cost investment.

[0055] Embodiment 2

[0056] This embodiment provides a privacy information shielding device based on version identification and key field positioning, including:

[0057] A data acquisition module, used to acquire electronic files containing personal privacy information and split the electronic files into single-page image data;

[0058] A data recognition module is used to recognize the single-page image data, obtain recognition coordinates and text information, and structurally encapsulate the recognition coordinates and text information by region to obtain a recognition result;

[0059] A matching and searching module is used to perform a field name matching and searching on the identification result according to the pre-set privacy field name and privacy key field to obtain the privacy keyword identification result;

[0060] A row and vertical grouping module, used for performing row and vertical data grouping according to the privacy keyword recognition result to obtain a row and vertical grouping result;

[0061] A privacy region determination module, used to determine the privacy region according to the row vertical grouping result and the matching search, and obtain a privacy region determination result;

[0062] The privacy content hiding module is used to intercept or cover a blank area on the electronic file according to the privacy area determination result, so as to hide the privacy content.

[0063] Furthermore, the row and vertical grouping module is specifically used to: use the four corner coordinates of the recognition result and the four corner coordinates of the privacy keyword recognition result to merge the rectangular area, and then calculate the ratio of the area of ​​the recognition result area and the shadow overlapping part of the rectangular merged area to determine whether they belong to the same row; then sort the X-coordinate sequence of the recognition result area to complete the acquisition of row and vertical information and obtain the row and vertical grouping result.

[0064] For the specific implementation content of each module in the privacy information shielding device based on version identification and key field positioning, please refer to the definition of the privacy information shielding method based on version identification and key field positioning in the above text, which will not be repeated here.

[0065] Embodiment 3

[0066] This embodiment provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of a privacy information shielding method based on version identification and key field positioning are implemented.

[0067] Embodiment 4

[0068] This embodiment provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of a privacy information shielding method based on version identification and key field positioning are implemented.

[0069] Embodiment 5

[0070] This embodiment provides a computer program product, including a computer program or instructions, which, when executed by a processor, implements the steps of a privacy information shielding method based on version identification and key field positioning.

[0071] The technical features of the above embodiments may be arbitrarily combined (as long as there is no contradiction in the combination of these technical features). To make the description concise, not all possible combinations of the technical features in the above embodiments are described; these embodiments that are not explicitly written should also be considered to be within the scope of this specification.

Claims

1. A privacy information shielding method based on version identification and key field positioning, characterized in that: include: Step 1: Obtain an electronic file containing personal privacy information, and split the electronic file into single-page image data; Step 2: Identify the single page image data, obtain identification coordinates and text information, and structurally encapsulate the identification coordinates and text information by region to obtain identification results; Step 3: Perform field name matching search on the recognition result according to the pre-set privacy field name and privacy key field to obtain the privacy keyword recognition result; Step 4: grouping the data in rows and verticals according to the privacy keyword recognition result to obtain row and vertical grouping results; Step 5: Perform privacy area determination based on the row vertical grouping result and matching search to obtain a privacy area determination result; Step 6: According to the privacy area determination result, a blank area is intercepted or covered on the electronic file to hide the privacy content.

2. The privacy information shielding method based on version identification and key field positioning according to claim 1 is characterized in that: In step 1, the electronic file is in pdf format or jpg format.

3. The privacy information shielding method based on version identification and key field positioning according to claim 1 is characterized in that: In the step 2, OCR technology is used to identify the single page image data.

4. The privacy information shielding method based on version identification and key field positioning according to claim 1 is characterized in that: The step 4 specifically comprises: merging the rectangular regions using the four corner coordinates of the recognition result and the four corner coordinates of the privacy keyword recognition result, and then calculating the ratio of the area of ​​the recognition result region and the shadow overlapped part of the rectangular merged region to determine whether they belong to the same row; Then, the X-coordinates of the recognition result areas are sorted in order, thereby completing the acquisition of row and vertical information and obtaining the row and vertical grouping results.

5. The privacy information shielding method based on version identification and key field positioning according to claim 1 is characterized in that: Also includes: Output the electronic file with hidden privacy content according to the required file format.

6. A privacy information shielding device based on version identification and key field positioning, characterized in that: include: A data acquisition module, used to acquire electronic files containing personal privacy information and split the electronic files into single-page image data; A data recognition module is used to recognize the single-page image data, obtain recognition coordinates and text information, and structurally encapsulate the recognition coordinates and text information by region to obtain a recognition result; A matching and searching module is used to perform a field name matching and searching on the identification result according to the pre-set privacy field name and privacy key field to obtain the privacy keyword identification result; A row and vertical grouping module, used for performing row and vertical data grouping according to the privacy keyword recognition result to obtain a row and vertical grouping result; A privacy region determination module, used to determine the privacy region according to the row vertical grouping result and the matching search, and obtain a privacy region determination result; The privacy content hiding module is used to intercept or cover a blank area on the electronic file according to the privacy area determination result, so as to hide the privacy content.

7. The privacy information shielding device based on version identification and key field positioning according to claim 6 is characterized in that: The row and vertical grouping module is specifically used to: merge the rectangular areas using the four corner coordinates of the recognition result and the four corner coordinates of the privacy keyword recognition result, and then calculate the ratio of the area of ​​the recognition result area and the shadow overlap part of the rectangular merged area to determine whether they belong to the same row; Then, the X-coordinates of the recognition result areas are sorted in order, thereby completing the acquisition of row and vertical information and obtaining the row and vertical grouping results.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.

10. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Method and device for desensitizing document image, electronic equipment and medium

    CN112380566A

  • Sensitive data automatic identification method and system based on partition scanning algorithm and medium

    CN117574418A

  • Underwriting text data generation method, intelligent underwriting method and related device

    CN117592439A

  • Randomizing character corrections in a machine learning classification system

    US20230140546A1

Cited By

  • Method and system for determining character coordinates in document, medium and computer equipment

    CN120316276A

  • Method, system, medium and computer device for determining coordinates of characters in a document

    CN120316276B

  • Preventing prompt injection attacks through trusted file overlays

    US12613993B1