Document content protection method and apparatus
By encrypting the document content during the copy operation and decrypting it for display during the paste operation, the problem in the prior art that copy permission restrictions affect the user's editing experience is solved, and both content security and editing convenience are achieved.
Patent Information
- Application Number
- PCT/CN2024/078866
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-02
- Filing Date
- 2024-02-27
- Publication Date
- 2024-09-06
Smart Images

Figure CN2024078866_06092024_PF_FP
Abstract
Description
Document content protection method and device
[0001] This application claims priority to the Chinese invention patent application entitled “A document content protection method and device” and application number 2023102172459, filed on March 2, 2023. The entire contents of that application are incorporated by reference into this application. Technical Field
[0002] The present disclosure relates to the field of document protection, and more particularly to a method and apparatus for document content protection. Background Art
[0003] As users increasingly prioritize content security, they are increasingly tightening control over document copying permissions to prevent collaborators from leaking or distributing the content. Existing document content protection solutions prohibit users from copying or cutting document content, making it impossible for collaborators to modify document content, even if they simply wish to do so. This negatively impacts the user's document editing experience.
[0004] Summary of the Invention
[0005] The embodiments of the present disclosure describe a method and apparatus for protecting document content.
[0006] According to a first aspect, a document content protection method is provided, comprising:
[0007] In response to a copy operation or a cut operation on target content of a first document, the target content is encrypted; in response to receiving a first paste operation on the target content at a first location of the first document, the target content is decrypted and displayed at the first location.
[0008] According to a second aspect, a document content protection device is provided, the device comprising:
[0009] The first response unit is configured to encrypt the target content of the first document in response to a copy operation or a cut operation on the target content; the second response unit is configured to decrypt the target content in response to receiving a first paste operation on the target content at a first location of the first document, and display the target content at the first location.
[0010] According to a third aspect, a computer program product is provided, comprising a computer program, which implements the method according to the first aspect when executed by a processor.
[0011] According to a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed in a computer, the computer is caused to execute the method described in the first aspect.
[0012] According to a fifth aspect, an electronic device is provided, comprising a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the method described in the first aspect is implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] FIG1 is a schematic diagram showing a method for protecting document content according to an embodiment of the present disclosure;
[0014] FIG2 shows a schematic flow chart of a document content protection method according to an embodiment of the present disclosure;
[0015] FIG3 shows a schematic diagram of a document content protection method according to another embodiment of the present disclosure;
[0016] FIG4 shows a schematic block diagram of a document content protection device according to an embodiment;
[0017] FIG5 shows a schematic structural diagram of an electronic device suitable for implementing an embodiment of the present disclosure;
[0018] FIG6 shows a schematic structural diagram of a storage medium suitable for implementing the embodiments of the present disclosure. DETAILED DESCRIPTION
[0019] The technical solutions provided in this specification are further described in detail below in conjunction with the accompanying drawings and embodiments. It will be understood that the specific embodiments described herein are merely for explaining the relevant inventions and are not intended to limit the inventions. It should also be noted that, for ease of description, only the portions relevant to the relevant inventions are shown in the accompanying drawings. It should be noted that, unless there is a conflict, the embodiments of the present disclosure and the features therein may be combined with each other.
[0020] In the description of the implementations of the present disclosure, the term "including" and similar terms should be understood as open inclusion, i.e., "including but not limited to." The term "based on" should be understood as "based at least in part on." The term "one / an implementation" or "the implementation" should be understood as "at least one / an implementation." The term "some implementations" should be understood as "at least some implementations." Other explicit and implicit definitions may be included below.
[0021] As mentioned above, with increasing user awareness of content security, many are implementing controls on document copy permissions to prevent collaborators from leaking or distributing content. Specifically, by disabling a user's copy permission, they are unable to copy, cut, or paste document content and then copy it outside the document. However, this content protection scheme presents a problem: users without copy permissions are unable to modify the document's content even if they wish to do so. In particular, for users with edit permissions but no copy permissions, the inability to modify document content through copy / cut operations significantly impacts their editing experience. For example, Company A updates a weekly report document. Because the report may contain content that the company wishes to keep confidential, copy permissions are disabled to prevent content leaks. However, editors of the weekly report cannot quickly copy or paste fixed-format or unchanged content to a new editing location within the document, forcing them to re-enter the exact same content, which is very inconvenient.
[0022] In order to solve the above technical problems, an embodiment of the present disclosure provides a document content protection method. Figure 3 shows a schematic diagram of a document content protection method of an embodiment of the present disclosure. As shown in Figure 3, for example, when a user does not have the permission to copy the content of a target document (for example, Document 1), after receiving a copy operation or a cut operation for the target content (for example, "XABCX") in the target document, the target content can be encrypted using the encryption key corresponding to the target document and saved to, for example, a cache. After receiving a paste operation for the target location in the target document, the target content is decrypted. For example, the encrypted target content is extracted from the cache, decrypted using the encryption key corresponding to the target document, and the decrypted target content is displayed at the target location. The advantage of this method is that it allows users who do not have the permission to copy documents to adjust the document content through copy, cut and paste operations when editing the document content, greatly improving the document editing experience of such users. At the same time, since the target content is encrypted after being copied, and the encryption uses the encryption key corresponding to the target document, it needs to be decrypted using the decryption key corresponding to the target document during the paste operation. If a user attempts to paste the target content into another document, the decryption key of the other document will not match the target content, so the decryption will fail. In other words, the user cannot copy the target content outside the document they are editing, ensuring that the content of the edited document is not leaked.
[0023] According to an embodiment of the present disclosure, a document content protection method and device are provided. In response to a copy operation or a cut operation on the target content of a first document, the target content can be encrypted. Furthermore, in response to receiving a first paste operation on the target content at a first location in the first document, the target content can be decrypted and displayed at the first location. Using any one of the above methods, devices, programs, storage media, and electronic devices, the security of user document content can be guaranteed while allowing users to copy / paste documents for which they do not have copy permission, thereby improving the user experience.
[0024] The following describes in detail a document content protection method provided by an embodiment of the present disclosure. FIG2 shows a flow chart of a document content protection method according to an embodiment of the present disclosure. As shown in FIG2 , the method includes at least the following steps:
[0025] Step S201, in response to a copy operation or a cut operation on target content of a first document, encrypting the target content;
[0026] Step S203 : In response to receiving a first paste operation for the target content at the first position of the first document, decrypt the target content and display the target content at the first position.
[0027] In step S201, in response to a copy operation or a cut operation on the target content of the first document, the target content may be encrypted.
[0028] In this step, after monitoring and receiving the copy operation or cut operation of the current user on the target document (for example, the first document) being edited, the target content of the copy operation or cut operation can be encrypted. In different embodiments, the first document can be a document of a different file type, or a document applied to different specific businesses, and this specification does not limit this. In order to improve the editing experience of users (collaborators) who have editing permissions but no copy permissions, for example. In one embodiment, the collaborators of the first document do not have copy permissions for the target content. In one embodiment, the collaborators of the first document can have editing permissions for the target content. The permissions here target collaborators that can be all or some of the collaborators of the document. For example, the collaborator is the current user who performs the copy, cut, or paste operation. Since the default response behavior of the copy / cut operation when having copy permissions can be different from the response behavior for the copy / cut operation in this step. To avoid conflicts between the two, in one embodiment, after receiving the above-mentioned copy operation or cut operation, the default response behavior of the copy / cut operation can be blocked, or simply blocked.
[0029] In different embodiments, the trigger source for receiving the copy operation or cut operation may be different, for example, it may include a text box, other HTML elements outside the selected text box, or code that executes the copy / cut function of the content. Therefore, in one embodiment, the target content can be obtained based on the trigger source of the copy operation or cut operation. In a specific embodiment, if the trigger source is a text box, the target content can be determined based on the selected content in the text box; if the trigger source is a selected HTML element outside the text box, the target content can be determined based on the selected HTML element; if the trigger source is a copy / cut code, the target content can be determined based on the return content of the copy / cut code.
[0030] After obtaining the target content, the target content can be encrypted. In order to prevent the target content from being decrypted during a paste operation on other documents in subsequent steps, the target content can be encrypted using an encryption key corresponding to the first document. In one embodiment, the encrypted information obtained after encryption can also be saved in a cache, such as a clipboard cache. In different embodiments, the encryption key corresponding to the first document and the decryption key corresponding to the first document used in subsequent steps can be different types of keys, for example, symmetric or asymmetric keys. In a specific example, for example, it can be an Advanced Encryption Standard (AES) key. This specification does not limit this. In a specific embodiment, in response to the initialization of the first document, the encryption key and decryption key corresponding to the first document can be obtained from a key server. In some scenarios, in order to further enhance the security of the document content, the current user's edits to the first document cannot be copied to documents opened by other users (even the first document) through copy and paste operations. In one embodiment, the encryption key can also correspond to the current user and the first document.
[0031] According to one embodiment, the encrypted information can also be encapsulated as an HTML tag using a predetermined HTML format, and the tag can be saved to the cache. Furthermore, in a subsequent step, it can be determined whether the information extracted from the cache is external information based on the predetermined HTML format. Therefore, in one embodiment, the target content can be encrypted using an encryption key corresponding to the first document to obtain first encrypted information. Moreover, after obtaining the first encrypted information, an HTML tag in a predetermined HTML format is generated, and the first encrypted information is embedded in the HTML tag, and the HTML tag is saved to the cache. In different embodiments, the predetermined HTML format can be a different specific format that complies with the HTML language specification, and this specification does not limit this. The specific method of embedding the first encrypted information into the HTML tag can also be different. For example, the first encrypted information can be stored in different predetermined sub-tags included in the HTML tag. This specification does not limit this either.
[0032] Serialization is the process of converting a data structure or data object into a byte sequence, that is, converting a data object into a form that can be stored or transmitted, so that the serialized data object can be easily transmitted or saved to a temporary or persistent storage area. Deserialization is the reverse process of serialization. Through deserialization, the data object can be reconstructed based on the content read from the storage area. In order to facilitate the preservation and recovery of the target content, in one embodiment, the target content can also be serialized according to a predetermined serialization method to obtain first serialized content, and the first serialized content can be encrypted using an encryption key corresponding to the first document to obtain first encrypted information. In different specific embodiments, the predetermined serialization method can be different specific serialization methods, for example, it can be one of JavaScript Object Notation (JSON) serialization, Extensible Markup Language (XML) serialization, and Protocol Buffer (ProtoBuf) serialization.
[0033] In various embodiments, in addition to serializing and encrypting the target content, additional processing methods may be added to further enhance the security of the target content, which is not limited in this specification. For example, in one embodiment, the target content may be serialized into JSON, encoded into binary data using, for example, UTF8 (Unicode Transformation Format 8), and then encrypted using the AES256 algorithm. The encrypted content may then be encoded into a string using, for example, Base64 (which represents binary data based on 64 printable characters). This string may then be embedded into an HTML tag in a predetermined HTML format.
[0034] In step S203 , in response to receiving a first paste operation for the target content at a first position of the first document, the target content may be decrypted and displayed at the first position.
[0035] In this step, after monitoring and receiving a paste operation (e.g., a first paste operation) for the target content at the first location of the first document, the target content encrypted in step S201 may be decrypted and the decrypted target content may be displayed at the first location. In one embodiment, if a cut operation is performed in response to step S201, the target content may also be deleted from its original location.
[0036] In the embodiment described above, in which the target information is serialized, encrypted, and encapsulated into HTML tags, and the HTML tags are stored in a cache, the cached information can be retrieved from the cache and verified to determine whether the cached information conforms to a predetermined HTML format. If the cached information conforms to the predetermined HTML format, the second encrypted information is extracted from the cached message according to the predetermined HTML format. The second encrypted information is decrypted using a decryption key corresponding to the first document to obtain decrypted information, where the decryption key corresponds to the target user and the first document. The decrypted information is then deserialized and parsed according to the predetermined serialization method. If the deserialization is successful, the target content is obtained.
[0037] If the cached information does not conform to the predetermined HTML format, it indicates that the cached information was not generated and stored in the cache based on the target content of the first document, but rather originated from external information outside the first document. In some scenarios, while editing the first document, the user may also wish to quickly copy external information to the first document. To facilitate document editing for these users, in one specific embodiment, if the cached information does not conform to the predetermined HTML format, a default copy or cut operation may be performed.
[0038] If the cached information conforms to the predetermined HTML format. However, after extracting the second encrypted information from the cached message, the first document's decryption key cannot be used, and decryption of the second encrypted information fails. Alternatively, deserialization of the decrypted information fails. Both of these indicate that the second encrypted information is difficult to identify and is not external information, and thus can be ignored. Therefore, in a specific embodiment, if decryption of the second encrypted information fails or the deserialization parsing fails, the default paste operation is prevented.
[0039] In the embodiment where UTF8 and Base64 encoding are also utilized in the processing of the target content, the second encrypted information can be encoded into a binary format using Base64, decrypted using the current document's AES256 key, and the decrypted information can be decoded into a string using UTF8, which is then deserialized into JSON. If any of the decryption failure, UTF8 decoding failure, or deserialization failure occurs, it indicates that unrecognizable information was extracted from the HTML tag and cannot be pasted into the document, thereby preventing the default paste operation.
[0040] In the example above, after the copy operation, the target content is encrypted and saved in the clipboard cache. If the amount of data saved is large, when the paste operation is triggered and the data is read from the clipboard cache, it can be read in multiple batches and parsed in batches. Since the clipboard cache has a time limit, the information in the clipboard cache may expire before all batches are successfully read, and thus all clipboard cache information cannot be read. To solve this problem, in one embodiment, the current clipboard cache information can be read all at once in response to the paste operation and saved in other caches. Thereafter, the information in the other caches can be read in batches and parsed in batches. In one embodiment, in order to prevent the clipboard cache information from being inconsistent with the other cache information, the information in the other caches can also be updated accordingly when the clipboard cache is updated.
[0041] In some scenarios, after the user performs a copy operation or a cut operation on the target content of the first document, the user accesses other documents (such as a second document) and performs a paste operation on the other document. This paste operation essentially copies the content in the document edited by the user to other documents, and there is a possibility that the content in the document edited by the user will be leaked. To avoid this problem, in one embodiment, the second paste operation can also be blocked in response to receiving a second paste operation for the target content at a second location in the second document. Figure 3 shows a schematic diagram of a document content protection method according to another embodiment of the present disclosure. As shown in Figure 3, for example, if the current user copies the target content in document 1 and performs a second paste operation in document 2, the second paste operation will fail. Furthermore, users cannot copy and paste document content between different documents, thereby ensuring the content security of different documents.
[0042] Another embodiment of the present disclosure further provides a document content protection device. FIG4 shows a schematic block diagram of a document content protection device according to one embodiment. As shown in FIG4 , the device 400 includes:
[0043] The first response unit 401 is configured to encrypt the target content of the first document in response to a copy operation or a cut operation on the target content of the first document;
[0044] The second responding unit 402 is configured to, in response to receiving a first paste operation for the target content at the first position of the first document, decrypt the target content and display the target content at the first position.
[0045] 5, which shows a schematic diagram of the structure of an electronic device 500 suitable for implementing the embodiments of the present application. The electronic device 500 shown in FIG5 is only an example and should not limit the functions and scope of use of the embodiments of the present application.
[0046] As shown in Figure 5, the electronic device 500 may include a processing device (such as a central processing unit, a graphics processing unit, etc.) 501. The above-mentioned processing device 501 can be a general-purpose processor, a digital signal processor (DSP), a microprocessor or a microcontroller, and may further include an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 502 or the program loaded from the storage device 508 into the random access memory (RAM) 503. In RAM503, various programs and data required for the operation of the electronic device 500 are also stored. The processing device 501, ROM502 and RAM503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0047] Typically, the following devices can be connected to the I / O interface 505: an input device 506 including, for example, a touch screen, a touchpad, a keyboard, a mouse, etc.; an output device 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 508 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 509. The communication device 509 can allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 5 shows an electronic device 500 with various devices, it should be understood that it is not required to implement or have all the devices shown. More or fewer devices may be implemented or have alternatively. Each box shown in Figure 5 may represent one device, or may represent multiple devices as needed.
[0048] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network via the communication device 509, or installed from the storage device 508, or installed from the ROM 502. When the computer program is executed by the processing device 501, the above-mentioned functions defined in the document content protection provided by the embodiment of the present application are executed.
[0049] The embodiments of the present disclosure also provide a computer-readable storage medium having a computer program stored thereon. When the computer program is executed in a computer, the computer is caused to execute the document content protection provided by the embodiments of the present application. Figure 6 is a schematic diagram of a storage medium for implementing an embodiment of the present application. For example, as shown in Figure 6, the storage medium 600 can be a non-transitory computer-readable storage medium for storing non-transitory computer-executable instructions 601. When the non-transitory computer-executable instructions 601 are executed by a processor, the document content protection provided by the embodiments of the present application can be implemented. For example, when the non-transitory computer-executable instructions 601 are executed by a processor, one or more steps in the document content protection provided by the embodiments of the present application can be executed. For example, the storage medium 600 can be applied to the above-mentioned electronic device. For example, the storage medium 600 may include a memory in the electronic device. For the description of the storage medium 600, reference can be made to the description of the memory in the embodiment of the electronic device, and the repeated parts will not be repeated here. The specific functions and technical effects of the storage medium 600 can be referred to the description of the document content protection provided by the embodiments of the present application, and will not be repeated here.
[0050] It should be noted that the computer-readable medium described in the embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a memory card of a smart phone, a storage component of a tablet computer, a portable computer disk, a hard disk of a personal computer, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the embodiments of the present disclosure, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device or device. In the embodiments of the present disclosure, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0051] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device. The computer-readable medium carries one or more programs, and when the one or more programs are executed by the server, the electronic device implements the document content protection provided by the embodiments of the present application.
[0052] Computer program code for performing the operations of the disclosed embodiments may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0053] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of the systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram may represent a module, program segment, or portion of code, which contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the boxes may occur in an order different from that marked in the accompanying drawings. For example, two boxes shown in succession may actually be executed substantially in parallel, or they may sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, as well as the combination of boxes in the block diagram and / or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or may be implemented using a combination of dedicated hardware and computer instructions. The units involved in the embodiments described in the present disclosure may be implemented using software or hardware. The name of the unit does not, in some cases, constitute a limitation on the unit itself. The functions described above in this document may be performed at least in part by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on a chip (SOCs), complex programmable logic devices (CPLDs), and the like.
[0054] The various embodiments in this specification are described in a progressive manner. Similar portions between the various embodiments can be referenced to each other, and each embodiment focuses on the differences between the other embodiments. In particular, the storage medium and computing device embodiments are described briefly because they are generally similar to the method embodiments. For relevant portions, refer to the description of the method embodiments.
[0055] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalent features without departing from the above-mentioned disclosed concepts. For example, the above-mentioned features are replaced with (but not limited to) technical features with similar functions disclosed in the present disclosure to form a technical solution. In addition, although the operations are described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, although several specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Certain features described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination.
[0056] The specific implementation methods described above further describe in detail the purpose, technical solutions and beneficial effects of the embodiments of the present invention. Although the subject matter has been described in a language specific to structural features and / or method logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims. It should be understood that the above is only a specific implementation method of the embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made on the basis of the technical solution of the present invention should be included in the scope of protection of the present invention.
Claims
1. A document content protection method, comprising: In response to a copy operation or a cut operation on target content of the first document, encrypting the target content; In response to receiving a first paste operation for the target content at a first position of the first document, the target content is decrypted and displayed at the first position.
2. The method according to claim 1, wherein: Encrypting the target content includes: encrypting the target content using an encryption key corresponding to the first document to obtain first encrypted information; The method further comprises: After obtaining the first encrypted information, an HTML tag in a predetermined HTML format is generated, and the first encrypted information is embedded in the HTML tag, and the HTML tag is saved in a cache.
3. The method according to claim 2, wherein: The target content is encrypted using an encryption key corresponding to the first document to obtain first encrypted information, including: The target content is serialized according to a predetermined serialization method to obtain first serialized content, and the first serialized content is encrypted using an encryption key corresponding to the first document to obtain first encrypted information.
4. The method according to claim 1, wherein: Decrypting the target content includes: Obtain cache information from the cache, and verify whether the cache information conforms to a predetermined HTML format; If the cached information conforms to the predetermined HTML format, extracting the second encrypted information from the cached message according to the predetermined HTML format; decrypting the second encrypted information according to the decryption key corresponding to the first document to obtain decrypted information; The decrypted information is subjected to a deserialization analysis corresponding to a predetermined serialization method; if the deserialization analysis is successful, the target content is obtained.
5. The method according to claim 4, further comprising: If the cached information does not conform to the predetermined HTML format, a default copy and paste operation is performed.
6. The method according to claim 4, further comprising: If the decryption of the second encrypted information fails, or the deserialization parsing fails, the default paste operation is prevented.
7. The method according to claim 1 further comprises, before encrypting the target content, obtaining the target content according to a trigger source of the copy operation or the cut operation, wherein: If the trigger source is a text box, the target content is determined according to the selected content in the text box; If the trigger source is a selected HTML element outside the text box, determining the target content according to the HTML element; If the trigger source is a copy / cut code, the target content is determined based on the return content of the copy / cut code.
8. The method according to claim 1, further comprising: In response to the initialization of the first document, an encryption key and a decryption key corresponding to the first document are acquired from a key server.
9. The method according to claim 1, further comprising: In response to a copy operation / cut operation on target content of the first document, a default copy / cut operation is blocked.
10. The method according to claim 1, wherein the collaborator of the first document does not have the copying authority for the target content. 11 . The method according to claim 1 , wherein the collaborator of the first document has editing authority over the target content. 12 . The method of claim 1 , further comprising, in response to receiving a second paste operation for the target content at a second location in a second document, blocking the second paste operation.
13. A document content protection device, the device comprising: A first response unit, configured to, in response to a copy operation or a cut operation on target content of the first document, encrypt the target content; The second response unit is configured to, in response to receiving a first paste operation for the target content at a first position of the first document, decrypt the target content and display the target content at the first position.
14. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method according to any one of claims 1 to 12 is implemented.
15. A computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to execute the method according to any one of claims 1 to 12.
16. An electronic device comprising a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the method according to any one of claims 1 to 12 is implemented.
Citation Information
Patent Citations
Method and apparatus for controlling operation of document
CN101441622A
Clipboard control method and clipboard control system
CN102609642A
Document content protection method and device
CN116361828A
Method and system for supporting secure documents
US20130262864A1
