Method and device for processing electronic document containing sensitive data, equipment and medium
By converting and desensitizing text documents at the user terminal, the problem that the prior art cannot intelligently process text files containing sensitive data is solved, and the security processing and privacy protection of sensitive data is realized.
Patent Information
- Application Number
- CN202510352121.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-25
- Publication Date
- 2025-04-22
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art cannot intelligently process text files containing sensitive data, resulting in security and privacy issues.
Convert and desensitize text documents at the user terminal. After removing sensitive data, the desensitized text content and format data will be sent to the cloud for intelligent processing, and the sensitive data and format will be restored in the final document.
It realizes intelligent processing of text files containing sensitive data to protect security and privacy, avoiding the risk of sensitive data leakage in the cloud.
Smart Images

Figure CN119862859A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of electronic document processing, and in particular to a method, apparatus, device and medium for processing electronic documents containing sensitive data. Background Art
[0002] Currently, after editing the text in a document, it is necessary to proofread, translate, modify, etc. the content of the text, which requires users to spend a lot of time and energy.
[0003] In the prior art, artificial intelligence technology can be used to automatically adjust the content and format of text, that is, the user uploads the local text file to the cloud, and the model in the cloud processes the text file to obtain the processed text file, and then the user downloads the processed text file to the local computer to quickly process the text file. However, when the text file contains sensitive data such as ID number, address, and name, since the user prohibits such sensitive data from leaving the intranet security environment, and needs to use the artificial intelligence model deployed in the cloud to intelligently process the text file, the prior art cannot intelligently process the text file containing sensitive data. Summary of the invention
[0004] In order to overcome the above-mentioned defects, the present application is proposed to provide a solution or at least partially solve the technical problem that when a text file contains sensitive data, the prior art is unable to intelligently process the text file containing sensitive data.
[0005] In a first aspect, the present application provides a method for processing an electronic document containing sensitive data, which is applied to a user terminal, and the method comprises: Get the text document; Converting the text document to obtain text content and format data; Desensitizing the text content to obtain desensitized text content and removed sensitive data; wherein the removed desensitized data includes sensitive information and identification data corresponding to the sensitive information; Sending the desensitized text content and format data to the cloud, so that the cloud can intelligently process the desensitized text content and the format data to obtain output text content, and sending the output text content to the user terminal; Adding the removed sensitive data to the output text content to obtain restored text data; According to a preset format restoration model and the format data, the format of the restored text data is reconstructed to obtain a final text document.
[0006] In a technical solution of the above-mentioned method for processing an electronic document containing sensitive data, the text document is converted to obtain text content and format data, including: Get text data from a text document; The text data is parsed to obtain the text content and the format data corresponding to the text content.
[0007] In a technical solution of the above-mentioned method for processing an electronic document containing sensitive data, desensitizing the text content to obtain the desensitized text content and the removed sensitive data includes: According to preset sensitive information, the sensitive data in the text data is marked to obtain the identification information corresponding to the sensitive data; The sensitive data is removed to obtain desensitized text content; The sensitive data and identification information corresponding to the sensitive data are bound to obtain the removed sensitive data.
[0008] In a technical solution of the above-mentioned method for processing an electronic document containing sensitive data, the step of adding the removed sensitive data to the output text content to obtain the restored text data includes: According to the identification data, obtaining an associated field corresponding to the identification data; According to the associated field, the sensitive data corresponding to the identification data is added to the output text data to obtain the restored text data.
[0009] In a technical solution of the above-mentioned method for processing an electronic document containing sensitive data, the format of the restored text data is reconstructed according to a preset format restoration model and the format data to obtain a final text document, including: Inputting the format data and the restored text data into a preset format restoration model to obtain a format restoration document; According to the format data, the format of the format-restored document is corrected to obtain a final text document.
[0010] In a technical solution of the above-mentioned method for processing an electronic document containing sensitive data, the format of the format-restored document is corrected according to the format data to obtain a final text document, including: Acquire text content of a format-restored document and a restored format corresponding to the text content; Determining whether the restored format is consistent with the correct format in the format data; If it is determined that the restored format is inconsistent with the correct format, the format corresponding to the text content is corrected according to the correct format.
[0011] In a second aspect, the present application provides another method for processing electronic documents containing sensitive data, which is applied to a cloud server, and the method comprises: In response to receiving the desensitized text content and format data sent by the user terminal; Intelligently processing the desensitized text content and the format data to obtain output text content; wherein the desensitized text content and the format data are generated by obtaining a text document from the user terminal, converting the text document to obtain text content and format data, and then desensitizing the text content; The output text content is sent to the user terminal so that the user terminal can add the removed sensitive data to the output text content to obtain restored text data, and the format of the restored text data is reconstructed according to a preset format restoration model and the format data to obtain a final text document.
[0012] In a technical solution of the above-mentioned method for processing an electronic document containing sensitive data, the intelligent processing of the desensitized text content to obtain output text content includes: Converting the desensitized text content to obtain a query vector, a key vector, and a value vector; Obtaining similarity according to the query vector and the key vector; Normalizing the similarity to obtain a weight; The weight and the value vector are weightedly summed to obtain the output text content.
[0013] In a third aspect, the present application provides a user terminal, including: The acquisition module is used to acquire text documents; A conversion module, used for converting the text document to obtain text content and format data; A desensitization module, used to perform desensitization processing on the text content to obtain desensitized text content and removed sensitive data; wherein the removed desensitized data includes sensitive information and identification data corresponding to the sensitive information; A sending module, used for sending the desensitized text content and format data to the cloud, so that the cloud can intelligently process the desensitized text content and the format data to obtain output text content, and send the output text content to the user terminal; A restoration module, used for adding the removed sensitive data to the output text content to obtain restored text data; The adjustment module is used to reconstruct the format of the restored text data according to a preset format restoration model and the format data to obtain a final text document.
[0014] In a fourth aspect, the present application provides a cloud server, comprising: A response module, used for responding to receiving the desensitized text content and format data sent by the user terminal; A processing module, used for intelligently processing the desensitized text content and the format data to obtain output text content; wherein the desensitized text content and the format data are generated by obtaining a text document from the user terminal, converting the text document to obtain text content and format data, and then desensitizing the text content; An analysis module is used to send the output text content to the user terminal so that the user terminal can add the removed sensitive data to the output text content to obtain restored text data, and reconstruct the format of the restored text data according to a preset format restoration model and the format data to obtain a final text document.
[0015] In a fifth aspect, the present application provides a user terminal, comprising a first memory and a first processor, wherein a computer program is stored in the first memory, and the first processor is configured to execute any one of the methods in the first aspect through the computer program.
[0016] In a sixth aspect, the present application provides a cloud server, comprising a second memory and a second processor, wherein a computer program is stored in the second memory, and the second processor is configured to execute any one of the methods in the second aspect through the computer program.
[0017] In a seventh aspect, the present application provides a computer-readable storage medium, in which a plurality of program codes are stored, wherein the program codes are suitable for being loaded and run by a processor to execute any one of the methods in the first aspect.
[0018] In an eighth aspect, the present application provides a computer-readable storage medium, in which a plurality of program codes are stored, wherein the program codes are suitable for being loaded and run by a processor to execute any one of the methods in the second aspect.
[0019] The present application provides a method, apparatus, device and medium for processing electronic documents containing sensitive data, the method specifically comprising: obtaining a text document; converting the text document to obtain text content and format data; desensitizing the text content to obtain desensitized text content and removed sensitive data; wherein the removed desensitized data includes sensitive information and identification data corresponding to the sensitive information; sending the desensitized text content and format data to the cloud, so that the cloud can intelligently process the desensitized text content and format data to obtain output text content, and sending the output text content to a user terminal; adding the removed sensitive data to the output text content to obtain restored text data; reconstructing the format of the restored text data according to a preset format restoration model and the format data to obtain a final text document, thereby ensuring that the content of the text file containing sensitive information is intelligently processed. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The disclosure of the present application will become more easily understood with reference to the accompanying drawings. It is easy for those skilled in the art to understand that these drawings are only for illustrative purposes and are not intended to limit the scope of protection of the present application. In addition, similar numbers in the drawings are used to represent similar components, among which: Figure 1 A flowchart of a method for processing an electronic document containing sensitive data provided in an embodiment of the present application; Figure 2 A flowchart of a second embodiment of a method for processing an electronic document containing sensitive data provided in an embodiment of the present application; Figure 3 A flowchart of a third embodiment of a method for processing an electronic document containing sensitive data provided in an embodiment of the present application; Figure 4 A flowchart of a fourth embodiment of a method for processing an electronic document containing sensitive data provided in an embodiment of the present application; Figure 5 A flowchart of a fifth embodiment of a method for processing an electronic document containing sensitive data provided in an embodiment of the present application; Figure 6 A flowchart of a sixth embodiment of a method for processing an electronic document containing sensitive data provided in an embodiment of the present application; Figure 7 A flowchart of Embodiment 7 of a method for processing an electronic document containing sensitive data provided in an embodiment of the present application; Figure 8 A flowchart of an eighth embodiment of a method for processing an electronic document containing sensitive data provided in an embodiment of the present application; Fig. 9 A schematic diagram of the structure of a user terminal embodiment 1 provided in an embodiment of the present application; Fig.10 A schematic diagram of the structure of a cloud server embodiment 1 provided in an embodiment of the present application; Fig.11 A schematic diagram of the structure of another user terminal embodiment 1 provided in an embodiment of the present application; Fig.12 A structural diagram of another cloud server embodiment 1 provided in an embodiment of the present application.
[0021] Reference numerals list : 21: acquisition module; 22: conversion module; 23: desensitization module; 24: sending module; 25: restoration module; 26: adjustment module; 31: response module; 32: processing module; 33: analysis module; 41: first processor; 42: first memory; 51: second processor; 52: second memory. DETAILED DESCRIPTION
[0022] Some embodiments of the present application are described below with reference to the accompanying drawings. Those skilled in the art should understand that these embodiments are only used to explain the technical principles of the present application and are not intended to limit the protection scope of the present application.
[0023] In the description of the present application, "module" and "processor" may include hardware, software or a combination of the two. A module may include hardware circuits, various suitable sensors, communication ports, memory, and may also include software parts, such as program code, or a combination of software and hardware. The processor may be a central processing unit, a microprocessor, an image processor, a digital signal processor or any other suitable processor. The processor has data and / or signal processing functions. The processor may be implemented in software, hardware or a combination of the two. Non-temporary computer-readable storage media include any suitable medium that can store program code, such as a disk, a hard disk, an optical disk, a flash memory, a read-only memory, a random access memory, etc. The term "A and / or B" means all possible combinations of A and B, such as only A, only B or A and B. The term "at least one A or B" or "at least one of A and B" has a similar meaning to "A and / or B" and may include only A, only B or A and B. The singular terms "one" and "the" may also include plural forms.
[0024] In the existing technology, the format and content of electronic documents can be adjusted through a large artificial intelligence model deployed in the cloud. However, when the electronic document contains confidential information or personal privacy data, the electronic document uploaded to the cloud may be stolen, which may lead to technical problems such as the content of the electronic document being leaked.
[0025] Based on this, in order to solve the above technical problems, the present application provides a new method for processing electronic documents containing sensitive data, so as to improve the security of automatic processing of electronic documents.
[0026] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0027] Figure 1 The flowchart of the first embodiment of the method for processing electronic documents containing sensitive data provided by the present application is as follows. Figure 1 As shown, specifically, the method includes: Step S101: Obtain a text document.
[0028] In this embodiment, the text document may be an electronic document in various formats.
[0029] In this embodiment, the format of the text document can be doc, pdf, ppt, or xlsx.
[0030] Step S102: converting the text document to obtain text content and format data.
[0031] In this embodiment, text of the text document is extracted line by line to obtain the text content of each line, and the format data corresponding to the text content of each line is obtained.
[0032] Step S103: desensitize the text content to obtain desensitized text content and removed sensitive data.
[0033] In this embodiment, the removed desensitized data includes sensitive information and identification data corresponding to the sensitive information.
[0034] In this embodiment, a sensitive word set may be preset, and the text content is matched with the sensitive words in the sensitive word set, and when it is determined that the match is successful, the data is removed.
[0035] Step S104: Send the desensitized text content and format data to the cloud, so that the cloud can intelligently process the desensitized text content and format data to obtain output text content, and send the output text content to the user terminal.
[0036] In this embodiment, an artificial intelligence model is deployed in the cloud, which can correct errors, translate, summarize, etc. the desensitized text content with formatted data.
[0037] Step S105: adding the removed sensitive data to the output text content to obtain restored text data.
[0038] In this embodiment, based on identification data corresponding to the sensitive information in the removed sensitive data, the sensitive information is added to the output text content to obtain restored text data.
[0039] Step S106: Reconstruct the format of the restored text data according to the preset format restoration model and format data to obtain a final text document.
[0040] In this embodiment, after the format data and the restored text data are input into a preset format restoration model, the preset format restoration model reconstructs the format of the restored text data according to the format data, and after the reconstruction is completed, a final text document is obtained.
[0041] In this embodiment, the document type of the final text document is consistent with that of the text document.
[0042] In this embodiment, for example, if the document type of the text document is doc, the text type of the final text document is also doc.
[0043] In this embodiment, the method is applied to a user terminal, which has a very high security protection function.
[0044] In this embodiment, a text document is obtained; the text document is converted to obtain text content and format data; the text content is desensitized to obtain desensitized text content and removed sensitive data; the desensitized text content and format data are sent to the cloud for the cloud to intelligently process the desensitized text content and format data to obtain output text content, and the output text content is sent to the user terminal; the removed sensitive data is added to the output text content to obtain restored text data; according to the preset format restoration model and format data, the format of the restored text data is reconstructed to obtain the final text document. Compared with the prior art, when a text file contains sensitive data, the text file uploaded to the cloud may be stolen, which may lead to the text file being stolen. With regard to the leakage of content, the present application converts a text document to obtain text content and format data, then desensitizes the text content to obtain desensitized text content and removed sensitive data, and then sends the desensitized text content and format data to the cloud for the cloud to intelligently process the desensitized text content and format data to obtain output text content, and sends the output text content to a user terminal to add the removed sensitive data to the output text content to obtain restored text data, and finally restores the model and format data in a preset format, reconstructs the format of the restored text data, and obtains the final text document, so as to improve the security of sensitive content in the text document on the basis of automatically processing the format and content of the text document.
[0045] Figure 2 The flowchart of Embodiment 2 of a method for processing electronic documents containing sensitive data provided in the present application is based on the above embodiment. Figure 2 As shown, specifically, a specific method of step S102 is: Step S201: Acquire text data in a text document.
[0046] In this embodiment, the text data in the text document is obtained by reading the text document.
[0047] In this embodiment, the text data is binary data.
[0048] Step S202: Parse the text data to obtain text content and format data corresponding to the text content.
[0049] In this embodiment, each character of the text data is parsed to obtain text data and format data corresponding to the text data.
[0050] In this embodiment, if the formats of a plurality of consecutive characters are the same, the plurality of characters correspond to one format data.
[0051] In this embodiment, text data in a text document is obtained; the text data is parsed to obtain text content and format data corresponding to the text content, and then the text and format of the text document can be separated and processed.
[0052] Figure 3 The flowchart of the third embodiment of the method for processing electronic documents containing sensitive data provided by the present application is based on the above embodiments. Figure 3 As shown, specifically, one implementation of step S103 includes: Step S301: According to preset sensitive information, sensitive data in text data is marked to obtain identification information corresponding to the sensitive data.
[0053] In this embodiment, the preset sensitive information is matched with the text data, and when it is determined that the match is successful, the position of the sensitive data in the document and the context information are used as identification information corresponding to the sensitive data.
[0054] Step S302: Remove sensitive data to obtain desensitized text content.
[0055] In this embodiment, sensitive data is deleted from the text document to obtain desensitized text content.
[0056] Optionally, sensitive data may be replaced with special characters to obtain desensitized text content.
[0057] In this embodiment, after the sensitive data is removed, the content of the sentence may be difficult to understand. Therefore, different text identifiers may be selected according to the category of the sensitive data, and the text identifier is closest to the semantic space of the sensitive data.
[0058] Step S303: Binding the sensitive data and the identification information corresponding to the sensitive data to obtain the removed sensitive data.
[0059] In this embodiment, the sensitive data and the identification information corresponding to the sensitive data are bound into one data to obtain the removed sensitive data.
[0060] In this embodiment, for example, the removed sensitive data is {sensitive data; identification information}.
[0061] In this embodiment, based on preset sensitive information, sensitive data in text data is marked to obtain identification information corresponding to the sensitive data; the sensitive data is removed to obtain desensitized text content; the sensitive data and the identification information corresponding to the sensitive data are bound to obtain the removed sensitive data, thereby achieving desensitization of the document.
[0062] Figure 4 The flowchart of Embodiment 4 of a method for processing an electronic document containing sensitive data provided in the present application is based on the above embodiments. Figure 4 As shown, specifically, one implementation of step S105 includes: Step S401: According to the identification data, obtain the associated field corresponding to the identification data.
[0063] In this embodiment, the position in the document and the context information in the identification data are matched with the output text data, and when the match is successful, the associated field corresponding to the identification data is obtained.
[0064] Step S402: according to the associated fields, the sensitive data corresponding to the identification data is added to the output text data to obtain the restored text data.
[0065] In this embodiment, sensitive data corresponding to the identification data is obtained, and according to the associated field, the sensitive data corresponding to the identification data is added to the output text data to obtain the restored text data.
[0066] In this embodiment, if the associated field corresponding to the identification data cannot be obtained based on the identification data, the associated field corresponding to the identification data is obtained through fuzzy matching.
[0067] In this embodiment, based on the identification data, an associated field corresponding to the identification data is obtained; based on the associated field, the sensitive data corresponding to the identification data is added to the output text data to obtain the restored text data, so as to realize the restoration processing of the sensitive data.
[0068] Figure 5 The flowchart of Embodiment 5 of a method for processing an electronic document containing sensitive data provided in the present application is based on the above embodiments. Figure 5 As shown, specifically, one implementation of step S106 includes: Step S501: inputting the restored text data into a preset format restoration model to obtain a format restoration document.
[0069] In this embodiment, the restored text data is input into a preset format restoration model, which analyzes the content of the restored text data to obtain a format modification plan, and modifies the format of the restored text data according to the format modification plan to obtain a format restored document.
[0070] Step S502: According to the format data, the format of the format-restored document is corrected to obtain a final text document.
[0071] In this embodiment, the format restoration data is the characters of the document and the formats corresponding to the characters. The characters in the format restoration data are matched with the characters in the format restoration document, and when it is determined that the match is successful, the format corresponding to the character in the format data is compared with the restored format corresponding to the character in the format restoration document, and when it is determined that the format is different from the restored format, the format of the character is modified to the format corresponding to the character in the format data.
[0072] In this embodiment, the restored text data is input into a preset format restoration model to obtain a format restored document; based on the format data, the format of the format restored document is corrected to obtain a final text document, and then the format of the text is adjusted to improve the aesthetics of the document format.
[0073] Figure 6 The flowchart of Embodiment 6 of a method for processing an electronic document containing sensitive data provided in the present application is based on the above embodiments. Figure 6 As shown, specifically, one implementation of step S502 includes: Step S601: Acquire the text content of the format-restored document and the restored format corresponding to the text content.
[0074] In this embodiment, after reading the format-restored document, the text content between two punctuation marks in the text content in the format-restored document and the restored format corresponding to the text content are obtained each time.
[0075] Step S602: Determine whether the restored format is consistent with the correct format in the format data.
[0076] In this embodiment, the text content is matched with the characters in the format data. If the match is successful, the restored format corresponding to the text content is compared with the correct format corresponding to the characters in the format data to determine whether the restored format is consistent with the correct format.
[0077] Step S603: If it is determined that the restored format is inconsistent with the correct format, the format corresponding to the text content is corrected according to the correct format.
[0078] In this embodiment, the text content of the format-restored document and the restored format corresponding to the text content are obtained; it is determined whether the restored format is consistent with the correct format in the format data; if it is determined that the restored format is inconsistent with the correct format, the format corresponding to the text content is corrected according to the correct format to restore the format of the text. Figure 7 A flowchart of Embodiment 7 of a method for processing an electronic document containing sensitive data provided in an embodiment of the present application is shown in FIG. Figure 7 As shown, the method includes: Step S701: Responding to receiving the desensitized text content and format data sent by the user terminal.
[0079] Step S702: Intelligently process the desensitized text content and format data to obtain output text content.
[0080] In this embodiment, the desensitized text content and format data are generated by obtaining a text document by a user terminal, converting the text document to obtain the text content and format data, and then desensitizing the text content.
[0081] Step S703: Send the output text content to the user terminal so that the user terminal can add the removed sensitive data to the output text content to obtain restored text data, and reconstruct the format of the restored text data according to the preset format restoration model and format data to obtain the final text document.
[0082] In this embodiment, the method is applied to a cloud server.
[0083] In this embodiment, in response to receiving the desensitized text content and format data sent by the user terminal; the desensitized text content and format data are intelligently processed to obtain output text content, wherein the desensitized text content and format data are obtained by the user terminal obtaining a text document, and the text document is converted to obtain text content and format data, and then the text content is desensitized to generate; the output text content is sent to the user terminal, so that the user terminal adds the removed sensitive data to the output text content to obtain restored text data, and according to the preset format restoration model and format data, the format of the restored text data is reconstructed to obtain the final text document, and the content and format of the document containing sensitive information can be automatically adjusted safely.
[0084] Figure 8 The flowchart of Embodiment 8 of a method for processing an electronic document containing sensitive data provided in the present application is based on the above embodiments. Figure 8 As shown, specifically, one implementation of step S702 includes: Step S801: convert the desensitized text content to obtain a query vector, a key vector and a value vector.
[0085] In this embodiment, the desensitized text content is input into the neural network layer to obtain a query vector, a key vector and a value vector.
[0086] Step S802: Obtain similarity based on the query vector and the key vector.
[0087] In this embodiment, the similarity is obtained by calculating the dot product of the query vector and the key vector, and the similarity can also be called an attention score.
[0088] In this embodiment, for the desensitized text content, the higher its importance, the greater the attention score.
[0089] Step S803: normalize the similarity to obtain a weight.
[0090] In this embodiment, the similarity is input into a normalization function to obtain a weight.
[0091] In this embodiment, for example, the normalization function may be a softmax function.
[0092] Step S804: performing weighted summation on the weight and value vector to obtain output text content.
[0093] In this embodiment, the value vectors are weighted and summed according to the weights obtained in step S803 to obtain the output text content.
[0094] In this embodiment, the desensitized text content is converted to obtain a query vector, a key vector and a value vector; similarity is obtained based on the query vector and the key vector; the similarity is normalized to obtain a weight; the weight and the value vector are weighted and summed to obtain the output text content, so as to achieve error correction, translation, review and summary of the desensitized text content. Further, the present application also provides a user terminal.
[0095] Fig. 9 This is a schematic diagram of the structure of a user terminal embodiment 1 provided in the present application. Fig. 9As shown, the user terminal in the embodiment of the present application mainly includes an acquisition module 21, a conversion module 22, a desensitization module 23, a sending module 24, a restoration module 25, and an adjustment module 26, wherein one or more of the above modules can be combined into one module. In some embodiments, the acquisition module 21 can be configured to acquire a text document. The conversion module 22 can be configured to convert the text document to obtain text content and format data. The desensitization module 23 can be configured to desensitize the text content to obtain desensitized text content and removed sensitive data; wherein the removed desensitized data includes sensitive information and identification data corresponding to the sensitive information. The sending module 24 can be configured to send the desensitized text content and format data to the cloud, so that the cloud can intelligently process the desensitized text content and format data to obtain output text content, and send the output text content to the user terminal. The restoration module 25 can be configured to add the removed sensitive data to the output text content to obtain restored text data. The adjustment module 26 can be configured to restore the model and format data according to the preset format, reconstruct the format of the restored text data, and obtain the final text document.
[0096] The above user terminal is used to execute Figures 1 to 6 The embodiment of the method for processing electronic documents containing sensitive data shown in the figure has similar technical principles, technical problems solved and technical effects produced. Those skilled in the art can clearly understand that for the convenience and conciseness of description, the specific working process and related instructions of the electronic document processing device containing sensitive data can refer to the contents described in the embodiment of the method for processing electronic documents containing sensitive data whose execution subject is the electronic document processing device containing sensitive data, and will not be repeated here.
[0097] Furthermore, the present application also provides a cloud server.
[0098] Fig.10 This is a schematic diagram of the structure of a cloud server embodiment 1 provided in the present application. Fig.10As shown, the cloud server in the embodiment of the present application mainly includes a response module 31, a processing module 32, and an analysis module 33, wherein one or more of the above modules can be combined into one module. In some embodiments, the response module 31 can be configured to respond to the desensitized text content and format data sent by the user terminal. The processing module 32 can be configured to intelligently process the desensitized text content and format data to obtain the output text content; wherein, the desensitized text content and format data are obtained by the user terminal to obtain a text document, and the text document is converted and processed to obtain the text content and format data, and then the text content is desensitized and generated. The analysis module 33 can be configured to send the output text content to the user terminal, so that the user terminal can add the removed sensitive data to the output text content, obtain the restored text data, and restore the model and format data according to the preset format, and reconstruct the format of the restored text data to obtain the final text document.
[0099] The above cloud server is used to execute Figure 7 and Figure 8 The embodiment of the method for processing electronic documents containing sensitive data shown in the figure has similar technical principles, technical problems solved and technical effects produced. Those skilled in the art can clearly understand that for the convenience and conciseness of description, the specific working process and related instructions of the electronic document processing device containing sensitive data can refer to the contents described in the embodiment of the method for processing electronic documents containing sensitive data whose execution subject is the electronic document processing device containing sensitive data, and will not be repeated here.
[0100] It is understood by those skilled in the art that all or part of the processes in the method for implementing the above-mentioned embodiment of the present application can also be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of each of the above-mentioned method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable storage medium may include: any entity or device, medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory, random access memory, electric carrier signal, telecommunication signal and software distribution medium that can carry the computer program code. It should be noted that the content contained in the computer-readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable storage media do not include electric carrier signals and telecommunication signals.
[0101] Furthermore, the present application also provides another user terminal.
[0102] Fig.11 This is a schematic diagram of the structure of another user terminal embodiment 1 provided in the present application. Fig.11 As shown, the user terminal includes at least one first processor 41 and a first memory 42. The first memory 42 can be configured to store and execute the above Figures 1 to 5 The program of the method for processing an electronic document containing sensitive data in the embodiment shown, the first processor 41 can be configured to execute the program in the first memory 42, the program including but not limited to executing a program of the method for processing an electronic document containing sensitive data in the above method embodiment. For ease of explanation, only the part related to the embodiment of the present application is shown, and for specific technical details not disclosed, please refer to the method part of the embodiment of the present application. The user terminal can be a control device device formed by various electronic devices.
[0103] Furthermore, the present application also provides another cloud server.
[0104] Fig.12 This is a schematic diagram of the structure of another user terminal embodiment 1 provided in the present application. Fig.12 As shown, the user terminal includes at least one second processor 51 and a second memory 52, and the second memory 52 can be configured to store and execute the above Figure 7 and Figure 8 The second processor 51 can be configured to execute the program in the second memory 52, which includes but is not limited to executing the program of the electronic document processing method containing sensitive data of the above method embodiment. For ease of explanation, only the part related to the embodiment of the present application is shown. For specific technical details not disclosed, please refer to the method part of the embodiment of the present application. The cloud server can be a control device device including various electronic devices.
[0105] Furthermore, the present application also provides a computer-readable storage medium. In a computer-readable storage medium embodiment according to the present application, the computer-readable storage medium may be configured to store the execution method Figures 1 to 6 The program of the method for processing electronic documents containing sensitive data in the illustrated embodiment can be loaded and run by a processor to implement the above-mentioned method for processing electronic documents containing sensitive data. For ease of explanation, only the parts related to the embodiments of the present application are shown. For specific technical details not disclosed, please refer to the method part of the embodiment of the present application. The computer-readable storage medium can be a storage device formed by various electronic devices. Optionally, the computer-readable storage medium in the embodiment of the present application is a non-temporary computer-readable storage medium.
[0106] Furthermore, the present application also provides a computer-readable storage medium. In a computer-readable storage medium embodiment according to the present application, the computer-readable storage medium may be configured to store the execution method Figures 7 and 8 The program of the method for processing electronic documents containing sensitive data in the illustrated embodiment can be loaded and run by a processor to implement the above-mentioned method for processing electronic documents containing sensitive data. For ease of explanation, only the parts related to the embodiments of the present application are shown. For specific technical details not disclosed, please refer to the method part of the embodiment of the present application. The computer-readable storage medium can be a storage device formed by various electronic devices. Optionally, the computer-readable storage medium in the embodiment of the present application is a non-temporary computer-readable storage medium.
[0107] Further, it should be understood that since the setting of each module is only for illustrating the functional units of the device of the present application, the physical devices corresponding to these modules may be the processor itself, or a part of the software in the processor, a part of the hardware, or a part of the combination of software and hardware. Therefore, the number of each module in the figure is only schematic.
[0108] It is understood by those skilled in the art that each module in the device can be adaptively split or merged. Such splitting or merging of specific modules will not cause the technical solution to deviate from the principle of the present application, and therefore, the technical solutions after splitting or merging will fall within the protection scope of the present application.
[0109] So far, the technical solutions of the present application have been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it is easy for those skilled in the art to understand that the protection scope of the present application is obviously not limited to these specific embodiments. Without departing from the principles of the present application, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will fall within the protection scope of the present application.
Claims
1. A method for processing electronic documents containing sensitive data, applied to a user terminal, characterized in that: The method comprises: Get the text document; Converting the text document to obtain text content and format data; Desensitizing the text content to obtain desensitized text content and removed sensitive data; wherein the removed desensitized data includes sensitive information and identification data corresponding to the sensitive information; Sending the desensitized text content and format data to the cloud, so that the cloud can intelligently process the desensitized text content and the format data to obtain output text content, and sending the output text content to the user terminal; Adding the removed sensitive data to the output text content to obtain restored text data; According to a preset format restoration model and the format data, the format of the restored text data is reconstructed to obtain a final text document.
2. The method according to claim 1, characterized in that The text document is converted to obtain text content and format data, including: Get text data from a text document; The text data is parsed to obtain the text content and the format data corresponding to the text content.
3. The method according to claim 1, characterized in that The desensitizing the text content to obtain the desensitized text content and the removed sensitive data includes: According to preset sensitive information, the sensitive data in the text data is marked to obtain the identification information corresponding to the sensitive data; The sensitive data is removed to obtain desensitized text content; The sensitive data and identification information corresponding to the sensitive data are bound to obtain the removed sensitive data.
4. The method according to claim 1, characterized in that: The step of adding the removed sensitive data to the output text content to obtain restored text data includes: According to the identification data, obtaining an associated field corresponding to the identification data; According to the associated field, the sensitive data corresponding to the identification data is added to the output text data to obtain the restored text data.
5. The method according to claim 1, characterized in that The method of reconstructing the format of the restored text data according to the preset format restoration model and the format data to obtain a final text document includes: Inputting the restored text data into a preset format restoration model to obtain a format restoration document; According to the format data, the format of the format-restored document is corrected to obtain a final text document.
6. The method according to claim 5, characterized in that The step of correcting the format of the format-restored document according to the format data to obtain a final text document includes: Acquire text content of a format-restored document and a restored format corresponding to the text content; Determining whether the restored format is consistent with the correct format in the format data; If it is determined that the restored format is inconsistent with the correct format, the format corresponding to the text content is corrected according to the correct format.
7. A method for processing electronic documents containing sensitive data, applied to a cloud server, characterized in that: The method comprises: In response to receiving the desensitized text content and format data sent by the user terminal; Intelligently processing the desensitized text content and the format data to obtain output text content; wherein the desensitized text content and the format data are generated by obtaining a text document from the user terminal, converting the text document to obtain text content and format data, and then desensitizing the text content; The output text content is sent to the user terminal so that the user terminal can add the removed sensitive data to the output text content to obtain restored text data, and the format of the restored text data is reconstructed according to a preset format restoration model and the format data to obtain a final text document.
8. The method according to claim 7, characterized in that The intelligent processing of the desensitized text content to obtain output text content includes: Converting the desensitized text content to obtain a query vector, a key vector, and a value vector; Obtaining similarity according to the query vector and the key vector; Normalizing the similarity to obtain a weight; The weight and the value vector are weightedly summed to obtain the output text content.
9. A user terminal, characterized in that: include: The acquisition module is used to acquire text documents; A conversion module, used for converting the text document to obtain text content and format data; A desensitization module, used to perform desensitization processing on the text content to obtain desensitized text content and removed sensitive data; wherein the removed desensitized data includes sensitive information and identification data corresponding to the sensitive information; A sending module, used for sending the desensitized text content and format data to the cloud, so that the cloud can intelligently process the desensitized text content and the format data to obtain output text content, and send the output text content to the user terminal; A restoration module, used for adding the removed sensitive data to the output text content to obtain restored text data; The adjustment module is used to reconstruct the format of the restored text data according to a preset format restoration model and the format data to obtain a final text document.
10. A cloud server, characterized in that: include: A response module, used for responding to receiving the desensitized text content and format data sent by the user terminal; A processing module, used for intelligently processing the desensitized text content and the format data to obtain output text content; wherein the desensitized text content and the format data are generated by obtaining a text document from the user terminal, converting the text document to obtain text content and format data, and then desensitizing the text content; An analysis module is used to send the output text content to the user terminal so that the user terminal can add the removed sensitive data to the output text content to obtain restored text data, and reconstruct the format of the restored text data according to a preset format restoration model and the format data to obtain a final text document.
11. A user terminal, comprising a first memory and a first processor, characterized in that: A computer program is stored in the first memory, and the first processor is configured to execute the method according to any one of claims 1 to 6 through the computer program.
12. A cloud server, comprising a second memory and a second processor, characterized in that: A computer program is stored in the second memory, and the second processor is configured to execute the method according to any one of claims 7 to 8 through the computer program.
13. A computer-readable storage medium storing a plurality of program codes, characterized in that: The program code is suitable for being loaded and executed by a processor to execute the method according to any one of claims 1 to 6.
14. A computer-readable storage medium storing a plurality of program codes, characterized in that: The program code is suitable for being loaded and executed by a processor to perform the method according to any one of claims 7 to 8.
Citation Information
Patent Citations
Verification method for receiving server-side data by front end
CN112685098A
Document translation method and device, storage medium and program product
CN115906875A
Method and terminal for high-fidelity conversion of docx template into pdf file
CN116010496A
Lightweight framework for annotation type memory desensitization under distribution
CN116738474A
Electronic document desensitization method, system and equipment and storage medium
CN117235776A
Cited By
Data cleaning and transcription method and device, electronic equipment and storage medium
CN120124107A
File processing method and device
CN122195936A