A static document privacy-preserving system and method
Patent Information
- Application Number
- HK42026125397
- Authority / Receiving Office
- HK · HK
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2026-06-26
- Publication Date
- 2026-09-11
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
(19) State Intellectual Property Office (12) Invention Patent Application (10) Application Publication Number (43) Application Publication Date (21) Application Number 202610400199.X (22) Application Date 2026.03.29 (71) Applicant Xilian Technology Co., Ltd. Address 311258 Chang'an Village, Wenyan Street, Xiaoshan District, Hangzhou City, Zhejiang Province Applicant Hu Jinqian Xixin Technology Co., Ltd. Hangzhou Gaoxinmei Investment Consulting Co., Ltd. Hangzhou Yuhuaqian Technology Co., Ltd. (72) Inventor Hu Jinqian Guo Ai (74) Patent Agency Shanghai Deyue Intellectual Property Agency (General Partnership) 31344 Patent Attorney Dong Danghong (51) Int.Cl. G06F 40 / 166 (2020.01) G06F 40 / 205 (2020.01) G06F 40 / 279 (2020.01) G06F 40 / 30 (2020.01) G06F 16 / 3329(2025.01) G06F 16 / 334(2025.01) (54) Invention Title: A Static Document Privacy Protection System and Method (57) Abstract: This invention discloses a static document privacy protection system based on source file restoration and user-defined information library, comprising: a static document processing module, which receives and parses the source file of the static document, and is used to directly extract the editable text stream in the source file; a user-defined organizational information library, which stores user-defined organizational information entries used to identify sensitive information; an organizational information editor, which is connected to the user-defined organizational information library, and locates and displays all matching sensitive information in the editable text stream according to the organizational information entries in the user-defined organizational information library, and provides a user interaction interface for the user to hide the matched sensitive information with one click or confirm it item by item; a privacy protection execution module, which replaces the confirmed hidden sensitive information and generates a privacy-cleaning document with unchanged content and layout structure but with the sensitive information hidden, according to the user's operation in the organizational information editor. Claims (2 pages), Description (11 pages), Drawings (2 pages), CN 122174811 A, 2026.06.09, CN 1 22 17 48 11 A. 1. A static document privacy protection system based on source file restoration and a user-defined information database, comprising: a static document processing module configured to receive and parse the source file of a static document, for directly extracting an editable text stream from the source file; a user-defined organizational information database configured to store user-defined organizational information entries used to identify sensitive information; and an organizational information editor connected to the user-defined organizational information database, configured to locate and display all matching sensitive information entries in the editable text stream according to the organizational information entries in the user-defined organizational information database.The system includes a privacy protection module configured to replace the confirmed hidden sensitive information and generate a privacy-cleaning document with unchanged content and layout structure but with the sensitive information hidden, based on the user's operation in the organization information editor. 2. The static document privacy protection system according to claim 1 further includes a static encrypted document decryption module configured to, when the static document is an encrypted document, call at least one decryption capability already possessed by the user terminal to decrypt the encrypted document, thereby restoring the editable source file; the decryption capability includes calling the image viewer built into the operating system for decoding, using a document opening password known to the user, and using the user's biological characteristics to authorize access to the stored password in the system key chain. 3. The static document privacy protection system according to claim 1 further includes a region customization selector configured to allow the user to freely define a non-standardized privacy region on the document preview interface through mouse selection, clicking, and other interactive methods, and add the text content corresponding to the privacy region as a new organization information entry to the user-defined organization information library. 4. The static document privacy protection system according to claim 1, characterized in that: it further includes an information database management module, configured to allow users to add, delete, modify, query, and classify entries in the user-defined organizational information database, and to support exporting a set of organizational information entries into a privacy protection scenario package for one-click import when processing documents with similar content characteristics. 5. The static document privacy protection system according to any one of claims 1 to 4, characterized in that: it further includes an encryption and output module, configured to output the privacy-purified document in the same static format as the original document or a user-specified format, and before outputting, if the original document is an encrypted document, to re-encrypt the privacy-purified document using an encryption method according to user instructions. 6. A static document privacy protection method based on source file restoration and a user-defined information database, comprising the following steps: S1. Receiving a static document uploaded by a user, parsing its source file, and directly extracting the editable text stream from the source file, completely avoiding information errors that may be introduced by optical character recognition technology; S2. Loading a user-defined organizational information database pre-defined by the user, wherein the organizational information database contains user-defined organizational information entries used to identify sensitive information; S3. In the editable text stream, locating all matching sensitive information according to the entries in the organizational information database, and displaying it in the document preview interface; S4. Receiving user operation instructions to hide the displayed sensitive information with one click or confirm it item by item through an organizational information editor;S5. Based on the user's operation instructions, generate a privacy claim document (page 1 / 2, CN 122174811 A, page 2) with the content and layout unchanged but sensitive information hidden. 7. The static document privacy protection method according to claim 6, wherein step S1 further includes: when the static document is an encrypted document, decrypting the encrypted document to restore the editable source file; the decryption includes calling the image viewer built into the operating system to decode, using the user's known document opening password, and using the user's biological characteristics to authorize access to the storage password in the system key chain. 8. The static document privacy protection method according to claim 6, wherein step S2 further includes: allowing the user to select or click any text area in the document preview interface with the mouse, and dynamically add the text content corresponding to that area as a new organizational information entry to the user-defined organizational information library. 9. The static document privacy protection method according to claim 6, wherein the one-click hiding in step S4 includes: in response to the user's one-click hiding instruction, replacing all the sensitive information displayed in the document preview interface with corresponding, distinguishable placeholders in batches according to the categories of entries in the organizational information library. 10. The static document privacy protection method according to any one of claims 6 to 9, characterized in that it further includes the following steps: S6, outputting the generated privacy-purifying document in the same static format as the original document or specified by the user, and if the original document is an encrypted document, then according to the user instruction, re-encrypting the privacy-purifying document using an encryption method before output. Claims 2 / 2 Page 3 CN 122174811 A Static Document Privacy Protection System and Method Technical Field
[0001] This invention belongs to the field of information security technology, and particularly relates to a static document privacy protection system and method. Background Art
[0002] With the deepening of digital transformation, various organizations and individuals have generated a large number of static documents in their daily work, including PDF documents, office documents, image format documents, encrypted documents, etc. These documents often contain a large amount of sensitive information, such as personal ID numbers, bank accounts, home addresses, unified social credit codes, trade secrets, medical records, etc. When these documents need to be used for artificial intelligence model training, cross-departmental sharing, outsourcing collaboration, or public disclosure, how to efficiently, accurately, and reliably de-identify sensitive information in the documents has become a pressing technical problem in the field of information security.
[0003] In the existing technology, the mainstream solutions for privacy protection of static documents are mainly divided into three categories: The first category is the automatic de-identification solution based on Optical Character Recognition (OCR). This type of solution...The first type uses OCR technology to recognize the text in images or scanned documents, and then uses preset rules or machine learning models to identify and hide sensitive information in the recognized text; the second type is a desensitization scheme based on manual marking, which provides a visual interface for users to manually select the areas to be hidden; the third type is an automatic recognition scheme based on preset rules, which allows users to define regular expressions or keyword rules, and the system automatically matches and hides them.
[0004] However, the above-mentioned prior art has the following fundamental defects: First, when faced with low-resolution images, handwritten fonts, seal obscuration, complex layouts, artistic fonts, etc., the OCR recognition accuracy of automatic desensitization schemes cannot reach 100%, and there are problems such as missed recognition and false recognition. This results in sensitive information that should be hidden not being hidden or normal information that should be retained being wrongly hidden, causing irreversible information leakage or loss. Users cannot trust the results of automated processing and often still need to manually check each item. Second, desensitization schemes based on manual marking require users to flip through pages and select each item for long documents, which is time-consuming, laborious, and prone to omissions. Users are forced to make a dilemma between efficiency and security. Third, schemes based on preset rules often cannot cover user-defined sensitive information (such as specific project codes, internal terms, etc.), and the writing of rules requires professional knowledge, which is difficult for ordinary users to master. In addition, when processing encrypted documents, existing technical solutions often require users to manually decrypt them before processing, which is cumbersome and has security risks. Therefore, there is an urgent need for a static document privacy protection scheme that can fundamentally circumvent OCR defects, grant users complete control, efficiently process encrypted documents, and ultimately achieve 100% privacy protection certainty.
[0005] It should be noted that the above introduction to the technical background is only for the purpose of clearly and completely explaining the technical solution of the present invention and facilitating the understanding of those skilled in the art. It should not be assumed that the above technical solutions are known to those skilled in the art simply because these solutions have been described in the background section of the present invention. Summary of the Invention
[0006] The purpose of the present invention is to overcome the shortcomings of the prior art and provide a static document privacy protection system and method based on source file restoration and user-defined information database.
[0007] To achieve the above objectives, the present invention adopts the following technical solution:
[0008] The present invention provides a static document privacy protection system based on source file restoration and a user-defined information database, comprising: a static document processing module configured to receive and parse the source file of the static document, used to directly extract the editable text stream from the aforementioned source specification page 1 / 11, file 4 CN 122174811 A; a user-defined organizational information database configured to store user-defined organizational information entries used to identify sensitive information; and an organizational information editor connected to the aforementioned user-defined organizational information database and configured to...To locate and display all matching sensitive information in the editable text stream based on the organizational information entries in the user-defined organizational information database, and to provide a user interface for users to hide or confirm the matched sensitive information with one click; a privacy protection execution module is configured to replace the confirmed hidden sensitive information and generate a privacy-cleaning document with unchanged content and layout structure but with the sensitive information hidden, based on the user's operation in the organizational information editor.
[0009] Further, the static document privacy protection system also includes a static encrypted document decryption module, configured to call at least one decryption capability already available on the user terminal to decrypt the encrypted document when the static document is an encrypted document, so as to restore the editable source file; the decryption capability includes calling the image viewer built into the operating system to decode, using the document opening password known to the user, and using the user's biological characteristics (fingerprint, face, etc.) to authorize access to the stored password in the system key chain.
[0010] Further, the above-mentioned organization information editor also includes a region customization selector, configured to allow users to freely define a non-standardized privacy region on the document preview interface through interactive methods such as mouse selection and clicking, and add the text content corresponding to the privacy region as a new organization information entry to the above-mentioned user-defined organization information library.
[0011] Further, the above-mentioned static document privacy protection system also includes an information library management module, configured to allow users to add, delete, modify, query and classify the entries in the above-mentioned user-defined organization information library, and support exporting a set of organization information entries into a "privacy protection scenario package" for one-click import when processing documents with similar content characteristics.
[0012] Further, the above-mentioned static document privacy protection system also includes an encryption and output module, configured to output the above-mentioned privacy-purified document in the same static format as the original document or the static format specified by the user, and if the original document is an encrypted document, then according to the user's instructions, the above-mentioned privacy-purified document is re-encrypted using encryption methods before output.
[0013] The present invention also provides a static document privacy protection method based on source file restoration and user-defined information database, comprising the following steps: S1, receiving a static document uploaded by a user, parsing its source file, and directly extracting the editable text stream from the source file, completely avoiding information errors that may be introduced by optical character recognition technology; S2, loading a user-defined organizational information database, which includes user-defined organizational information entries for identifying sensitive information; S3, locating all matching sensitive information in the editable text stream according to the entries in the organizational information database, and displaying it in the document preview interface; S4, receiving user feedback on the displayed sensitive information through an organizational information editor.S5. Based on the user's operation instructions, generate a privacy-cleaning document with unchanged content and layout structure but with sensitive information hidden.
[0014] Further, step S1 also includes: when the static document is an encrypted document, decrypt the encrypted document to restore the editable source file; the decryption capability includes calling the image viewer built into the operating system to decode, using the document opening password known to the user, and using the user's biological characteristics to authorize access to the storage password in the system key chain, etc.
[0015] Further, step S2 also includes: allowing the user to select or click any text area in the document preview interface with the mouse, and dynamically add the text content corresponding to the area as a new organizational information entry to the user-defined organizational information library.
[0016] Further, the "one-click hiding" in step S4 above includes: in response to the user's one-click hiding command, all sensitive information displayed in the document preview interface of page 2 / 11 of the above specification, CN 122174811 A, is replaced in batches with corresponding, distinguishable placeholders according to the item classification in the above organization information database.
[0017] Further, the above static document privacy protection method also includes the following steps: S6, outputting the generated privacy-purifying document in the same static format as the original document or specified by the user, and if the original document is an encrypted document, then according to the user's instruction, the privacy-purifying document is re-encrypted using an encryption method before output, so as to realize a closed loop of privacy protection from decryption, processing to re-encryption.
[0018] The beneficial effects of the present invention are as follows: The present invention extracts editable text streams by directly parsing static document source files, fundamentally avoiding the inherent defect that the recognition rate of OCR technology cannot reach 100%, and ensuring the absolute accuracy of information extraction; by using user-defined information databases and region-defined selectors, users are given complete control over the free definition of all sensitive information in various ways such as natural language, keywords, regular expressions, or direct selection, realizing the privacy definition of "what you see is what you get"; by calling the decryption capabilities already available on the user end (such as system application programming interface (API), known passwords, biological feature authorization, etc.) through the static encrypted document decryption module, a secure closed loop of the entire process of "decryption-processing-re-encryption" of encrypted documents is realized, without the need to export the plaintext of the document to an insecure environment; by using one-click hiding controls and scene package management, after the user completes the definition of the information database, batch sensitive information can be quickly hidden and reused in a scenario, greatly improving processing efficiency while ensuring the absolute accuracy of hiding.
[0019] In summary, the present invention solves the problems of unreliable OCR recognition, insufficient user control, and encrypted documents in the prior art.The invention overcomes the technical challenges of inconvenience, efficiency, and security, achieving a 100% privacy protection goal.
[0020] The core advantage of this invention lies in the following: For static documents containing editable text layers, the editable text stream is extracted directly from the source file, fundamentally and completely eliminating OCR technology, thus completely avoiding OCR recognition errors in this type of document; for pure image documents without text layers, this invention does not rely on OCR for automatic recognition, but instead allows users to manually select privacy areas using the aforementioned custom area selector, similarly avoiding the risk of leakage caused by OCR misjudgment. Through the above-mentioned layered processing strategy, this invention achieves deterministic control of privacy protection results in all scenarios.
[0021] The static document privacy protection system and method based on source file restoration and user-defined information database provided by this invention can be widely applied to document privacy protection scenarios for government agencies, enterprises, medical institutions, financial institutions, legal service agencies, and individual users. This invention can efficiently, accurately, and securely process various static documents, especially encrypted documents, and has significant industrial practical value and social benefits.
[0022] Figure 1 is a schematic diagram of a static document privacy protection system based on source file restoration and user-defined information database according to an embodiment of the present invention.
[0023] Figure 2 is a flowchart of a static document privacy protection method based on source file restoration and user-defined information database according to an embodiment of the present invention.
[0024] Reference numerals in the above figures:
[0025] 10, Static document privacy protection system; 100, Static document processing module; 110, Document format parsing unit; 120, Page layout analysis unit; 200, Static encrypted document decryption module; 210, System capability call unit; 220, Password management unit; 230, Biological feature authorization unit; 300, User-defined organizational information database; 310, Item storage unit; 320, Classification management unit; 400, Organizational information editor; 410, Sensitive information location unit; 420, Highlight display unit; 430, Region custom selector; 440, One-click hide control; 450, Item-by-item confirmation control; 500, Privacy protection execution module; 510, Placeholder replacement unit; 520, Page layout preservation unit; 530, Index mapping unit; 600, Encryption and output module; 610, Format output module; (Note: The last part appears to be a reference to a document or instruction manual and is not translated.) Output unit; 620, re-encryption unit; 630, encryption method selection unit; 700, information database management module; 710, item editing unit; 720, scene package management unit; S1 to S6 are steps. Detailed Implementation
[0026] To better understand the present invention, the following embodiments are given in conjunction with the accompanying drawings. It should be understood that the present invention...The embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the invention. The scope of protection of the invention is limited only by the claims of the invention. The embodiments provided by the invention are merely preferred embodiments and are not intended to limit the invention in any way. Those skilled in the art can make changes, equivalent substitutions, or modifications to the invention, resulting in different implementations. However, any changes and modifications, or equivalent substitutions made to the method of the invention without departing from the concept of the invention are within the scope of protection of the invention.
[0027] To make the objectives, technical solutions, and advantages of the invention clearer, the invention will be further described in detail below with reference to the embodiments. It should be understood that the specific embodiments described herein are merely for illustrative purposes and are not intended to limit the invention.
[0028] It should be noted that the following detailed descriptions are exemplary and intended to provide further explanation of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0029] It should be noted that the terminology used herein is for describing specific implementations only and is not intended to limit the exemplary implementations of the invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, and / or combinations thereof.
[0030] First, please refer to FIG1, which is a schematic diagram of a static document privacy protection system 10 based on source file restoration and a user-defined information database according to an embodiment of the present invention. As shown in FIG1, the static document privacy protection system 10 based on source file restoration and a user-defined information database according to the present invention includes a static document processing module 100, a static encrypted document decryption module 200, a user-defined organizational information database 300, an organizational information editor 400, a privacy protection execution module 500, an encryption and output module 600, and an information database management module 700.
[0031] The static document processing module 100 is configured to receive and parse the source file of the static document, directly extracting the editable text stream and layout structure information from the source file to completely avoid information errors that may be introduced by optical character recognition (OCR) technology.
[0032] Specifically, the static document processing module 100 includes a document format parsing unit 110 and a layout structure analysis unit 120. The document format parsing unit 110 supports parsing multiple formats such as PDF, DOCX, XLSX, PPTX, JPEG, PNG, and TIFF. For PDF documents, the document format parsing unit 110 directly extracts their text layer content; for office documents...For document format parsing, the document format parsing unit 110 extracts text content using the corresponding format parsing library. For image format, if the image has an embedded text layer (such as a PDF or image with a text layer generated by some scanning software), the document format parsing unit 110 will extract the text layer first; otherwise, it will be directly treated as an image. However, during processing, it will still perform region matching based on the user-defined information library, rather than OCR recognition. The layout structure analysis unit 120 extracts information such as the document's page size, text block coordinates, paragraph structure, and table area to ensure that subsequent hiding operations can maintain the original document's layout.
[0033] For example, for image format, the processing strategy of the document format parsing unit 110 is as follows: if the image has an embedded text layer (such as a PDF or image with a text layer generated by some scanning software), the text layer will be extracted first, and then automatic matching will be performed in the text stream based on the user-defined information library. If the image does not contain any text layer (such as a regular photo, a scanned image of a manual 4 / 11 pages 7 CN 122174811 A), the system cannot perform automatic region matching. At this time, the aforementioned sensitive information positioning unit 410 will call the aforementioned area customization selector 430 to guide the user to visually observe and manually select the privacy area in the preview interface. It is worth noting that in this scenario, the static document privacy protection system 10 does not rely on OCR technology for automatic recognition; the definition of the privacy area is entirely done manually by the user, ensuring 100% certainty.
[0034] The aforementioned user-defined organizational information database 300 is configured to store user-defined organizational information entries used to identify sensitive information. The aforementioned organizational information entries can be freely defined by the user in any one or more forms of natural language, keywords, regular expressions, or format patterns.
[0035] Specifically, the user-defined organizational information database 300 includes an entry storage unit 310 and a classification management unit 320. The aforementioned entry storage unit 310 is used to store organizational information entries, each entry including an identifier, entry content, matching type (natural language / keywords / regular expressions / format patterns), creation time, and other attributes. The aforementioned classification management unit 320 is used to classify and manage entries, such as personal identity information, financial information, medical and health information, and trade secrets.
[0036] It is worth noting that, in one embodiment of the present invention, users can centrally store all sensitive information items such as personal ID numbers, corporate bank accounts, and government document numbers in the same information database, and manage them flexibly through classification tags (such as "personal identity information," "financial information," "government information," etc.).
[0037] For example, corporate legal counsel Mr. Li is handling a government bidding contract. This contract includes both the company's own unified social credit code and bank account (originally belonging to the enterprise data package), and the government department's document number and the name of the person in charge (originally belonging to the government data package).The data package also includes the contact information of legal personnel (originally part of the individual data package). In the user-defined organizational information database of the present invention, Li only needs to define the unified social credit code and bank account through regular expressions, define the document number and the name of the person in charge through keywords, and define the contact information through natural language in a unified interface. All entries are centrally stored, uniformly matched, and hidden with one click, realizing a leapfrog integration from "five isolated data packages" to "one unified information database". Therefore, the above-mentioned user-defined organizational information database 300 of the present invention is a fundamental technical replacement for the five data packages of individual data packages, family data packages, enterprise data packages, village data packages, and government data packages, and completely solves the technical problem that multiple data packages cannot be interoperated and the cross-scenario processing efficiency is low.
[0038] The above-mentioned organizational information editor 400 is connected to the above-mentioned user-defined organizational information database 300 and is configured to automatically locate and highlight all matching sensitive information in the above-mentioned editable text stream according to the entries in the above-mentioned user-defined organizational information database 300, and provide a user interaction interface for users to hide the matched sensitive information with one click or confirm it item by item.
[0039] Specifically, the aforementioned organization information editor 400 includes a sensitive information location unit 410, a highlighting unit 420, a one-click hide control 440, and an item-by-item confirmation control 450. The sensitive information location unit 410 traverses the editable text stream, locates all matching sensitive information based on entries in the organization information database using string matching, regular expression matching, or semantic similarity calculation, and records their positions (page number, coordinates, text range). The highlighting unit 420 highlights all matched sensitive information in the document preview interface in a visually prominent manner (e.g., yellow background, red border). The one-click hide control 440 is configured to respond to the user's one-click hide command, replacing all highlighted sensitive information in the document preview interface with corresponding, distinguishable placeholders in a batch, according to the categories in the organization information database. The item-by-item confirmation control 450 is configured to allow the user to confirm the highlighted sensitive information item by item, and the user can choose to hide, retain, or modify the matching range.
[0040] The privacy protection execution module 500 is configured to, based on the user's operation in the organization information editor 400, replace the confirmed hidden sensitive information with placeholders, and generate a privacy-cleaning document with unchanged content and layout structure but with the sensitive information hidden.
[0041] Specifically, the privacy protection execution module 500 includes a placeholder replacement unit 510, a layout maintenance unit 520, and an index mapping unit 530. The placeholder replacement unit 510 replaces the confirmed hidden sensitive information with placeholders.Placeholders are formatted as “{{type: number}}” (e.g., “{{ID number: 001}}”), or set to other formats according to user preferences (e.g., “****”). The layout preservation unit 520 maintains the original document's layout structure during the replacement process. For text documents, the text flow is maintained through inline replacement; for image documents, visual hiding is achieved by overlaying color blocks at corresponding coordinate positions. The index mapping unit 530 establishes an encrypted mapping table between placeholders and original sensitive information and stores it locally. This mapping table is encrypted using the user's master key to ensure that even if the privacy-protected document is leaked, the original information cannot be reversed and restored.
[0042] It is worth noting that, in one embodiment of the present invention, the static document privacy protection system 10 further includes the static encrypted document decryption module 200. The static encrypted document decryption module 200 is connected to the static document processing module 100 and is configured to call at least one decryption capability already available on the user terminal to decrypt the encrypted document when the static document is an encrypted document, so as to restore the editable source file. The aforementioned decryption capabilities include, but are not limited to: calling the operating system's built-in image viewer for decoding, using a user-known document opening password, and using the user's biological characteristics (fingerprint, facial features, etc.) to authorize access to the stored password in the system keychain.
[0043] Specifically, the aforementioned static encrypted document decryption module 200 includes: a system capability calling unit 210 and a biological characteristic authorization unit 230. The aforementioned system capability calling unit 210 is configured to call the operating system's built-in decryption capabilities.
[0044] For example, in iOS or macOS systems, it calls the system's built-in image decoder or PDF reader's decryption function; in Windows systems, it calls the Data Protection API (DPAPI) for decryption. The aforementioned password management unit 220 is configured to use a user-known document opening password for decryption. The aforementioned password management unit 220 supports integration with the system keychain or password manager, and the user can automatically obtain the stored password after authorization through biological characteristics (fingerprint, facial features, etc.). The aforementioned biological feature authorization unit 230 is configured to authenticate the user's identity using biological features (fingerprint, facial features, etc.) when decryption is required, and authorize access to the stored password or key.
[0045] It is worth noting that, in one embodiment of the present invention, the aforementioned organization information editor 400 further includes a region customization selector 430, which is configured to allow the user to freely define a non-standardized privacy region on the document preview interface through interactive methods such as mouse selection and clicking, and add the text content corresponding to the privacy region as a new organization information entry to the aforementioned user-defined organization information library 300.
[0046] It is worth noting that, in one embodiment of the present invention, the static document privacy protection system 10 further includes an information database management module 700. The information database management module 700 is connected to the user-defined organizational information database 300 and is configured to allow users to add, delete, modify, query, and classify entries in the user-defined organizational information database 300. It also supports exporting a set of organizational information entries into a "privacy protection scenario package" for one-click import when processing documents with similar content characteristics.
[0047] Specifically, the information database management module 700 includes an entry editing unit 710 and a scenario package management unit 720. The entry editing unit 710 provides a user interface and supports adding, deleting, modifying, and querying organizational information entries. The scenario package management unit 720 is configured to export a set of organizational information entries into a "privacy protection scenario package" file and supports importing entries from the scenario package file into the user-defined organizational information database 300.
[0048] It is worth noting that, in a preferred embodiment of the present invention, the static document privacy protection system 10 further includes the encryption and output module 600. The encryption and output module 600 is connected to the privacy protection execution module 500 and is configured to output the privacy-purified document in the same static format (PDF, image, etc.) as the original document or specified by the user. Furthermore, if the original document is an encrypted document, the privacy-purified document is re-encrypted before output using the same or stronger encryption method as the decryption process, according to the user's instruction.
[0049] Specifically, the encryption and output module 600 includes: a format output unit 610, a re-encryption unit 620, and an encryption method selection unit 630. The format output unit 610 supports outputting the privacy-purified document in multiple formats such as PDF, JPEG, PNG, and DOCX. If the original document is an encrypted document, the re-encryption unit 620, according to the user's instruction, uses the same or stronger encryption method as the decryption process (such as Advanced Encryption Standard 256 (AES-256)) to re-encrypt the output privacy-cleaning document. The user can choose to use the same password or set a new password. The encryption method selection unit 630 allows the user to select the encryption algorithm and key strength to meet the needs of different security levels.
[0050] Please refer to Figure 2. Figure 2 is a flowchart of a static document privacy protection method based on source file restoration and user-defined information database in one embodiment of the present invention. As shown in Figure 2, a static document privacy protection method based on source file restoration and user-defined information database of the present invention includes the following steps: S1, receiving the static document uploaded by the user and parsing itsThe source file is directly extracted into an editable text stream, completely avoiding information errors that may be introduced by optical character recognition technology; S2, a user-defined organizational information database is loaded, which includes user-defined organizational information entries used to identify sensitive information; S3, in the editable text stream, all matching sensitive information is located according to the entries in the organizational information database and displayed in the document preview interface; S4, through the organizational information editor, the user receives operation instructions to hide the displayed sensitive information with one click or confirm it item by item; S5, according to the user's operation instructions, a privacy-cleaning document is generated with the content and layout unchanged but the sensitive information hidden; S6, the generated privacy-cleaning document is output in the same static format as the original document or specified by the user. If the original document is an encrypted document, according to the user's instructions, the privacy-cleaning document is re-encrypted before output using the same or stronger encryption method as the decryption process, so as to realize a closed loop of privacy protection from decryption, processing to re-encryption.
[0051] It is worth noting that, in one embodiment of the present invention, step S1 (receiving a static document and restoring the source file) receives a static document uploaded by the user, parses its source file, and directly extracts the editable text stream and layout structure information in the source file, completely avoiding the information errors that may be introduced by optical character recognition (OCR) technology.
[0052] As a preferred embodiment, when the static document is an encrypted document, at least one decryption capability already available on the user terminal is called to decrypt the encrypted document in order to restore the editable source file. The decryption capability includes, but is not limited to: calling the image viewer built into the operating system to decode, using the document opening password known to the user, and using the user's biological characteristics to authorize access to the storage password in the system key chain.
[0053] Step S2 (loading a user-defined organizational information library) loads a user-defined organizational information library, which includes user-defined organizational information entries used to identify sensitive information.
[0054] As a preferred embodiment, the user is allowed to select or click any text area in the document preview interface with the mouse, and dynamically add the text content corresponding to that area as a new organizational information entry to the user-defined organizational information library.
[0055] Step S3 (Locating Sensitive Information): In the editable text stream, based on the entries in the organizational information database, all matching sensitive information is automatically located and highlighted in the document preview interface.
[0056] Step S4 (Receiving User Operation Instructions): Through the organizational information editor, the user's operation instructions to hide the highlighted sensitive information with one click or confirm each item are received.
[0057] As a preferred embodiment, in response to the user's one-click hiding instruction, all sensitive information in the document preview interface that is...The highlighted sensitive information is replaced with corresponding, distinguishable placeholders in batches according to the categories of entries in the above-mentioned organization information database.
[0058] Step S5 (Perform Privacy Protection): According to the user's operation instructions, the confirmed hidden sensitive information is replaced with placeholders, generating a privacy-cleaning document with unchanged content and layout structure but with the sensitive information hidden.
[0059] Step S6 (Output and Re-encryption): The generated privacy-cleaning document is output in the same static format as the original document or specified by the user. Furthermore, if the original document is encrypted, it is re-encrypted before output using the same or stronger encryption method as the decryption process, according to the user's instructions, to achieve a closed-loop privacy protection process from decryption, processing to re-encryption.
[0060] To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. The following embodiments are only for illustrating the present invention and cannot be used to limit the scope of protection of the present invention.
[0061] Example 1: Corporate Legal Affairs Processing Encrypted Contract Documents
[0062] Li, a legal counsel at a company, needs to process 50 encrypted purchase contract PDF documents, each with a password. These contracts contain sensitive information such as the unified social credit code, bank account, and internal project code name "Polaris Project". Li needs to anonymize these contracts and upload them to the AI contract review system for automated analysis.
[0063] Step S1: Document Upload and Decryption. Li starts the static document privacy protection system 10 of this invention and drags the 50 encrypted contracts into the static document privacy protection system 10. The static document processing module 100 detects that the documents are encrypted PDFs and automatically triggers the static encrypted document decryption module 200. The static document privacy protection system 10 pops up a decryption interface, displaying "Encrypted document detected, please enter the password". Li enters the unified contract password. The static document privacy protection system 10 records the password through the password management unit 220 and automatically applies it in subsequent processing. Meanwhile, the static document privacy protection system 10 calls the system capability call unit 210 to decrypt the file using the built-in PDF decryption API of the operating system, restoring the editable source file. The document format parsing unit 110 directly extracts the text layer content of the PDF, and the page layout analysis unit 120 extracts the text block coordinate information of each page.
[0064] Step S2: Load the user-defined organization information database. Li had previously processed similar contracts, and the static document privacy protection system 10 automatically recommended loading the "Purchase Contract Privacy Protection Scenario Package". This scenario package includes the following organization information.Entries: Entry A: Unified Social Credit Code (regular expression: [0-9A-HJ-NPQRTUWXY]{2}\d{6}[0-9A-HJ-NPQRTUWXY]{10}); Entry B: Bank Account (regular expression:\d{16,19}); Entry C: Project Code "Polaris Project" (keyword matching). Mr. Li confirmed the loading, and the entry storage unit 310 of the above user-defined organization information database 300 loaded these entries.
[0065] Step S3: Locate sensitive information. The above sensitive information locating unit 410 traverses the text stream of 50 contracts and matches them according to the entries in the organization information database. A total of: Unified Social Credit Code: 50 times (1 time per contract); Bank Account: 150 times (approximately 3 times per contract); "Polaris Project": 80 times (including the main text, header, and footer). The above-mentioned highlighting unit 420 highlights all matching items with a red background in the document preview interface. Li can quickly browse the matching situation through the interface.
[0066] Step S4: Receive user operation instructions. Li checks the highlighted area and confirms that all matching items are sensitive information that needs to be hidden. He clicks the above-mentioned one-click hide control 440. The above-mentioned static document privacy protection system 10 responds to the one-click hide instruction and replaces all the highlighted sensitive information in the document preview interface with corresponding, distinguishable placeholders in one batch according to the category of entries in the organization information database.
[0067] Step S5: Execute privacy protection. The above-mentioned placeholder replacement unit 510 of the above-mentioned privacy protection execution module 500 replaces all confirmed hidden sensitive information with placeholders: the unified social credit code is replaced with "{{unified social credit code}}"; the bank account is replaced with "{{bank account}}"; "Polaris Project" is replaced with "{{project code}}". The above-mentioned specification, page 8 / 11, CN 122174811 A, page layout preservation unit 520 ensures that the page layout structure of the text stream remains unchanged after replacement. The above-mentioned index mapping unit 530 establishes an encryption mapping table, stores it in the local SQLite database, and uses Li's fingerprint-derived key for AES-256 encryption.
[0068] Step S6, output and re-encryption. The above-mentioned format output unit 610 outputs the processed document as a PDF format. Since the original document is an encrypted document, the above-mentioned re-encryption unit 620 prompts Li to choose whether to re-encrypt. Li selects "encrypt with the same password", and the above-mentioned static document privacy protection system 10 uses the same password as the decryption process to encrypt the output privacy-purifying document. The above-mentioned encryption method selection unit 630 records this operation for subsequent use.
[0069] In this way, Li processed 50 encrypted contracts, and the total time from upload to output was about 8 minutes. The above-mentioned static documentThe document privacy protection system 10 accurately identified all sensitive information without omission or misjudgment. Because it is based entirely on the source file text layer processing, it avoids the recognition errors that OCR may bring. The decryption and re-encryption process of encrypted documents is completed seamlessly, and Li does not need to export the documents to an insecure environment.
[0070] Example 2: Personal users process private documents and customize sensitive information
[0071] Personal user Zhang has three private documents: ID card photo (JPEG format, no text layer), physical examination report PDF (scanned copy, no text layer), and property certificate scan (JPEG format). Zhang wants to organize these documents into a privacy note, but is worried about the leakage of ID card number, address, and medical information. At the same time, Zhang's ID card photo includes a unique "issuing authority" information (such as "XX City Public Security Bureau XX Branch"), which cannot be covered by the system's preset rules and needs to be customized by the user.
[0072] Step S1: Zhang drags the three documents into the system. For ID card photos and property certificate scans, the document format parsing unit 110 of the static document processing module 100 detects that these images do not have an embedded text layer. However, the system does not perform OCR recognition but directly extracts the pixel data of the image and records its size information. The layout structure analysis unit 120 treats the entire image as a region and does not extract text. For the physical examination report PDF, it also detects that there is no text layer and processes it as an image.
[0073] Step S2: Zhang starts the organization information editor 400 and selects the "Issuing Authority" text area on the ID card photo using the region customization selector 430. The static document privacy protection system 10 pops up a dialog box, and Zhang enters the entry content "XX Municipal Public Security Bureau XX Branch" and selects "Keyword" as the matching type. The entry is added to the user-defined organization information database 300. Zhang continued to add other organizational information entries through the aforementioned information database management module 700: ID card number, using the regular expression \d{17}[\dXx] (format pattern); address, using the natural language "address" (keyword matching); disease keywords, hypertension, diabetes, liver function (keyword matching).
[0074] Step S3: Since the documents are all in image format, the aforementioned sensitive information positioning unit 410 adopts an image region-based approach. For ID card photos, the aforementioned static document privacy protection system 10 directly locates the region based on the coordinates of the "issuing authority" region selected by the user. For other keywords, Zhang manually selected the ID card number region, address region, and "hypertension" region in the physical examination report using the aforementioned region custom selector 430 by visual observation in the preview interface. The aforementioned highlighting unit 420 highlights all selected regions with a red border.
[0075] Step S4: After checking all highlighted regions and confirming that they are correct, Zhang clicks the aforementioned one-click hide control 440. For the bodyThe ID number, the static document privacy protection system 10 prompted "Do you want to bind the digital identifier?", Zhang chose "No", only visually hiding it.
[0076] Step S5, the placeholder replacement unit 510 of the privacy protection execution module 500 covered the corresponding area on the image with a black block (the user can choose mosaic, blur, etc.). The layout preservation unit 520 ensured that the position of the covered area was accurate and did not affect other areas. The index mapping unit 530 established a mapping table to record the position and original content of each hidden area.
[0077] Step S6: The format output unit 610 output the processed image in JPEG format. Since the original document was not encrypted, Zhang chose not to encrypt it and saved it directly as a privacy note.
[0078] In this way, Zhang successfully processed three private documents, and all sensitive information was hidden. In particular, the protection of the non-standard sensitive information "issuing authority" was achieved through the area custom selector 430. In this embodiment, OCR technology was not used throughout the process, thus avoiding the risk of privacy leakage due to OCR recognition errors.
[0079] Embodiment 3: Batch Processing of Encrypted Medical Image Reports in a Hospital
[0080] A tertiary hospital needs to desensitize 1,000 encrypted medical image reports (Digital Imaging and Communications in Medicine (DICOM) format converted to PDF with a text layer) for use in AI-assisted diagnostic research. These reports include sensitive information such as patient names, ID numbers, diagnostic conclusions, and medication records.
[0081] Wang, a staff member of the hospital's information department, is responsible for processing the reports, requiring high efficiency and absolutely accurate privacy protection.
[0082] Step S1: Wang drags 1,000 encrypted PDFs into the system. The static encrypted document decryption module 200 detects that all documents are encrypted using a unified internal hospital password. Wang entered a password once, and the static document privacy protection system 10 cached the password through the password management unit 220, and used the system capability call unit 210 to call the operating system PDF decryption API to decrypt all documents in batches and restore the editable source files.
[0083] Step S2: Wang had previously created a "medical report privacy protection scenario package" for the medical report, which included the following organizational information items: patient name, keywords ("name:" followed by Chinese name); ID number, regular expression \d{17}[\dXx], where \d{17} matches the first 17 digits (including 6 address codes + 8 birth dates + 3 sequence codes), and [\dXx] matches the 18th check code (number or letter X / x); diagnosis conclusion, based on the International Classification of Diseases (ICD).The format pattern of the 10th revision of the Classification of Diseases (ICD-10) (e.g., [A-Z]\d {2}\ .\d); medication records, and a generic drug keyword database (including more than 500 common drug names). Mr. Wang imported the scenario package with one click through the scenario package management unit 720, and the above-mentioned entry storage unit 310 of the user-defined organizational information database 300 loaded all entries.
[0084] Step S3: The above-mentioned sensitive information positioning unit 410 batch traverses the text stream of 1000 reports and matches them according to the entries in the organizational information database. For "patient name", the system identifies the text after "name:"; for "ID number", regular expression matching is used; for "diagnosis conclusion", the ICD-10 encoding pattern is matched; for "medication records", the drug keyword database is matched. A total of 1,000 patient names, 1,000 ID card numbers, approximately 3,500 diagnoses (3-4 diagnoses per report on average), and approximately 8,000 medication records (8 medications per report on average) were matched. The above-mentioned highlighting unit 420 highlights all matching items in the preview interface, which Mr. Wang can sample for inspection.
[0085] Step S4: Mr. Wang confirms that all matching items are sensitive information that needs to be hidden. Mr. Wang clicks the above-mentioned one-click hide control 440, and the above-mentioned static document privacy protection system 10 responds to the one-click hide command by replacing all the highlighted sensitive information in the document preview interface with corresponding, distinguishable placeholders in one batch according to the categories of entries in the organization information database.
[0086] Step S5: The privacy protection execution module 500 replaces the hidden sensitive information with placeholders: the patient's name is replaced with "{{patient name}}"; the ID card number is replaced with "{{ID card number}}"; the diagnosis conclusion is replaced with "{{diagnosis}}"; and the medication record is replaced with "{{medication}}". The index mapping unit 530 establishes an independent encryption mapping table for each report and uses the hospital's master key for encrypted storage.
[0087] Step S6: The format output unit 610 outputs the processed 1000 reports in PDF format. The re-encryption unit 620 detects that the original document is an encrypted document and prompts Wang to select an encryption method. Wang selects "Use stronger encryption (AES-256)" and sets a new research-specific password. The encryption method selection unit 630 performs encryption and outputs a privacy-cleaned research dataset. Instruction manual, pages 10 / 11, 13 CN 122174811 A
[0088] In this way, Wang completed the batch desensitization processing of 1000 encrypted medical reports within 30 minutes. The above-mentioned static document privacy protection system 10 accurately matched all preset sensitive information types without omission. Due to its PDF text-based nature...The text layer is extracted with 100% accuracy, even if the quality of the scanned image in the report is poor, rather than using OCR. The decryption and re-encryption process of encrypted documents is completed automatically, ensuring the security of data during transmission and processing.
[0089] The above-described embodiments of the present invention can be implemented in various hardware, software codes, or combinations thereof. For example, embodiments of the present invention can also be program code that executes the above methods in a digital signal processor (DSP). The present invention can also relate to various functions executed by computer processors, digital signal processors, microprocessors, or field programmable gate arrays (FPGAs). The processor can be configured to perform specific tasks according to the present invention, which is accomplished by executing machine-readable software code or firmware code that defines the specific methods disclosed in the present invention. The software code or firmware code can be developed into different programming languages and different formats or forms. The software code can also be compiled for different target platforms. However, the different code styles, types, and languages of the software code that performs tasks according to the present invention and other types of configuration code do not depart from the spirit and scope of the present invention.
[0090] Thus, those skilled in the art will recognize that although embodiments of the present invention have been shown and described in detail herein, many other variations or modifications conforming to the principles of the present invention can be directly determined or derived from the disclosure of the present invention without departing from the spirit and scope of the invention. Therefore, the scope of the present invention should be understood and recognized as covering all such other variations or modifications. Specification 11 / 11 pages 14 CN 122174811 A Figure 1 Specification Drawings 1 / 2 pages 15 CN 122174811 A Figure 2 Specification Drawings 2 / 2 pages 16 CN 122174811 A Abstract The present invention discloses a static document privacy protection system based on source file restoration and a user-defined information library, comprising: a static document processing module that receives and parses the source file of a static document, for directly extracting editable text streams from the sourcefile; a user-defined organizational information library that stores user- defined organizational information entries used to identify sensitive information; an organizational information editor connected to the user-defined organizational information library, which locates and displays all matching sensitive information in the editable text stream based on the organizational information entries in the user-defined organizational information library, and provides a user interface for users to perform one-click hiding or item-by-item confirmation of the matched sensitive information; and a privacy protection execution module that, based on the user's operations in the organizational information editor, replaces the confirmed hidden sensitive information and generates a privacy-cleansed document with unchanged content and layout structure but with hidden sensitive information.
Claims
1. A static document privacy protection system based on source file restoration and a user-defined information database, comprising: A static document processing module is configured to receive and parse the source file of a static document, and to directly extract the editable text stream from the source file; A user-defined organizational information base is configured to store user-defined organizational information entries used to identify sensitive information; An organization information editor, connected to the user-defined organization information database, is configured to locate and display all matching sensitive information in the editable text stream based on the organization information entries in the user-defined organization information database, and provide a user interface for users to hide the matched sensitive information with one click or confirm it item by item. A privacy protection execution module is configured to replace the confirmed hidden sensitive information and generate a privacy-cleaning document with the same content and layout structure but with the sensitive information hidden, based on the user's operation in the organization information editor.
2. The static document privacy protection system according to claim 1, characterized in that: It also includes a static encrypted document decryption module, which is configured to call at least one decryption capability already available on the user terminal to decrypt the encrypted document when the static document is an encrypted document, so as to restore the editable source file; The decryption capabilities include calling the operating system's built-in image viewer to decode, using the user's known document opening password, and using the user's biological characteristics to authorize access to the stored password in the system's key chain.
3. The static document privacy protection system according to claim 1, characterized in that: The organization information editor also includes a region customization selector, which is configured to allow users to freely define a non-standardized private region on the document preview interface by using interactive methods such as mouse selection and clicking, and add the text content corresponding to the private region as a new organization information entry to the user-defined organization information library.
4. The static document privacy protection system according to claim 1, characterized in that: It also includes an information database management module, which is configured to allow users to add, delete, modify, query and classify entries in the user-defined organizational information database, and supports exporting a set of organizational information entries into a privacy protection scenario package for one-click import when processing documents with similar content characteristics.
5. The static document privacy protection system according to any one of claims 1 to 4, characterized in that: It also includes an encryption and output module, configured to output the privacy-purifying document in the same format as the original document or in a static format specified by the user, and before outputting, if the original document is an encrypted document, to re-encrypt the privacy-purifying document using an encryption method according to the user's instructions.
6. A method for protecting the privacy of static documents based on source file restoration and a user-defined information database, comprising the following steps: S1. Receive static documents uploaded by users, parse their source files, and directly extract the editable text stream from the source files, completely avoiding information errors that may be introduced by optical character recognition technology; S2. Load the user-defined organization information database, which contains user-defined organization information entries used to identify sensitive information. S3. In the editable text stream, locate all matching sensitive information according to the entries in the organization information database, and display them in the document preview interface; S4. Through the information editor, receive user commands to hide sensitive information with one click or confirm it item by item. S5. Based on the user's operation instructions, generate a privacy-cleaning document with the same content and layout structure but with sensitive information hidden.
7. The static document privacy protection method according to claim 6, characterized in that, Step S1 also includes: When the static document is an encrypted document, the encrypted document is decrypted to restore the editable source file; The decryption process includes calling the operating system's built-in image viewer to decode, using the user's known document opening password, and using the user's biological characteristics to authorize access to the stored password in the system's key chain.
8. The static document privacy protection method according to claim 6, characterized in that, Step S2 also includes: Users can select or click any text area in the document preview interface with their mouse to dynamically add the corresponding text content as a new organizational information entry to the user-defined organizational information library.
9. The static document privacy protection method according to claim 6, characterized in that, The one-click hiding in step S4 includes: In response to the user's one-click hide command, all sensitive information displayed in the document preview interface is replaced in batches with corresponding, distinguishable placeholders according to the categories in the organization information database.
10. The static document privacy protection method according to any one of claims 6 to 9, characterized in that, It also includes the following steps: S6. Output the generated privacy-cleaning document in the same format as the original document or in a static format specified by the user. If the original document is an encrypted document, the privacy-cleaning document is re-encrypted using an encryption method before output, according to the user's instructions.
