CN112433871A - Shear plate data protection method and device - Google Patents

Shear plate data protection method and device Download PDF

Info

Publication number
CN112433871A
CN112433871A CN202011426944.7A CN202011426944A CN112433871A CN 112433871 A CN112433871 A CN 112433871A CN 202011426944 A CN202011426944 A CN 202011426944A CN 112433871 A CN112433871 A CN 112433871A
Authority
CN
China
Prior art keywords
data
clipboard
application program
cached
shear plate
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011426944.7A
Other languages
Chinese (zh)
Inventor
汪德嘉
钱潇龄
孟啸龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jiangsu Pay Egis Technology Co ltd
Jiangsu Tongfudun Information Security Technology Co ltd
Original Assignee
Jiangsu Pay Egis Technology Co ltd
Jiangsu Tongfudun Information Security Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jiangsu Pay Egis Technology Co ltd, Jiangsu Tongfudun Information Security Technology Co ltd filed Critical Jiangsu Pay Egis Technology Co ltd
Priority to CN202011426944.7A priority Critical patent/CN112433871A/en
Publication of CN112433871A publication Critical patent/CN112433871A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/543User-generated data transfer, e.g. clipboards, dynamic data exchange [DDE], object linking and embedding [OLE]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Storage Device Security (AREA)

Abstract

The application discloses a clipboard data protection method and device, when data are cached in a clipboard, encryption and decryption processing is carried out on the data according to the operation type of the clipboard. When the application program enters background operation, storing the data cached by the shear plate into the local cache of the application program, and clearing the data cached by the shear plate; and when the application program enters foreground operation, encrypting the data cached in the clipboard, and reassigning the obtained encrypted data to the clipboard. Therefore, the method and the device provided by the invention execute corresponding protection strategies aiming at different application scenes, increase the encryption processing of the cache data of the shear plate, prevent the data from being read and increase the difficulty of hijack and cracking. The data cached by the shear plate is cleared when the application program enters the background, and the assignment operation is carried out again when the application program is activated again, so that the safety of the shear plate data is ensured, the consistency of the user operation data can be ensured, and the operation experience is good.

Description

Shear plate data protection method and device
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method and an apparatus for protecting clipboard data.
Background
During the operation of the application program, a user can quickly copy and store data, such as a mobile phone number, a complex user name and a complex password, and the like, through the clipboard. Some applications can also automatically read the verification code in the short message for automatic filling for better user experience. However, the function of the clipboard caching data is convenient for users and at the same time invades the private data of the users to a certain extent, and if the clipboard caching data is hijacked by attackers for use, leakage of the private data of the users and economic loss can be caused. Therefore, protection of the clipboard cached data is needed.
At present, apple authorities add clipboard use in the equipment above iOS14 and remind the function, when the user will paste the information of duplicating to another application, can carry out the top pop window and remind to guarantee the security of user's data. Or, the cleaning of the clipboard data is set to be performed every 30 or 45 seconds in the application program so as to protect the data security in the application.
However, the clipboard data in the devices below the iOS14 or within the cleaning time interval are still exposed, which is not secure, and the risk of hijacking still exists.
Disclosure of Invention
The application provides a clipboard data protection method and device, which aim to solve the problem that the clipboard data is low in safety.
In a first aspect, the present application provides a clipboard data protection method, including the following steps:
monitoring the operation type of the shear plate when data are cached in the shear plate;
if the operation type of the clipboard is a cutting operation or a copying operation, encrypting data corresponding to the cutting operation or the copying operation performed by the clipboard to obtain encrypted data;
and if the operation type of the clipboard is the pasting operation, decrypting the encrypted data of the clipboard to obtain decrypted data, wherein the decrypted data is used for executing the pasting operation by the clipboard.
In some embodiments of the present application, when data is cached in the clipboard, monitoring an operation type of the clipboard includes:
when data are cached in a clipboard, acquiring a state value when the modification dynamics of the clipboard change, wherein the modification state refers to the dynamics generated when the data in the clipboard are operated;
based on the state value, monitoring an operation type dynamically corresponding to modification of the shear plate.
In some embodiments of the present application, the method further comprises:
and storing the encrypted data into a local cache, wherein the local cache refers to the cache of an application program calling the clipboard.
In some embodiments of the present application, if the operation type of the clipboard is a paste operation, decrypting the encrypted data of the clipboard to obtain decrypted data includes:
if the operation type of the clipboard is a pasting operation, acquiring encrypted data of the clipboard from the local cache;
and decrypting the encrypted data of the clipboard to obtain decrypted data.
In a second aspect, the present application further provides a clipboard data protection method, including the following steps:
monitoring the life cycle of the application program calling the clipboard when the application program calls the clipboard;
if the monitored operation corresponding to the life cycle function is that the application program enters background operation, acquiring the data cached by the shear plate;
storing the data cached by the clipboard into an application program local cache, and clearing the data cached by the clipboard;
and if the operation corresponding to the monitored life cycle function is the operation that the application program enters the foreground, encrypting the data when the data is cached in the clipboard, and inputting the obtained encrypted data into the clipboard.
In some embodiments of the present application, the method further comprises:
if the operation corresponding to the monitored life cycle function is that the application program enters the foreground operation, judging whether the shear plate stores data or not;
if the clipboard does not store data, judging whether the local cache of the application program stores data or not;
if the data is stored in the local cache of the application program, the data stored in the local cache of the application program is obtained;
inputting the data into the clipboard.
In some embodiments of the present application, said entering said data into said clipboard comprises:
decrypting the data to obtain decrypted data;
inputting the decrypted data into the clipboard.
In some embodiments of the present application, the method further comprises: clearing data entered into the clipboard from the application local cache.
In a third aspect, the present application further provides a clipboard data protection device, including:
the operation type monitoring module is used for monitoring the operation type of the clipboard when data are cached in the clipboard;
the first data protection module is used for encrypting the data corresponding to the shearing operation or the copying operation executed by the shearing plate to obtain encrypted data if the operation type of the shearing plate is the shearing operation or the copying operation;
and the second data protection module is used for decrypting the encrypted data of the clipboard to obtain decrypted data if the operation type of the clipboard is a paste operation, and the decrypted data is used for executing the paste operation by the clipboard.
In a fourth aspect, the present application further provides a clipboard data protection device, including:
the life cycle monitoring module is used for monitoring the life cycle of the application program calling the clipboard when the application program calls the clipboard;
the background operation protection module is used for acquiring the data cached by the shear plate if the monitored operation corresponding to the life cycle function is that the application program enters background operation;
the data processing module is used for storing the data cached by the clipboard into an application program local cache and clearing the data cached by the clipboard;
and the foreground operation protection module is used for encrypting the data when the data is cached in the shear plate if the operation corresponding to the monitored life cycle function is that the application program enters the foreground operation, and inputting the obtained encrypted data into the shear plate.
In a fifth aspect, the present application further provides a storage medium, where the storage medium may store a program, and the program may implement, when executed, some or all of the steps in the embodiments of the clipboard data protection method provided in the present application.
According to the technical scheme, when data is cached in the clipboard, the clipboard data protection method and the clipboard data protection device provided by the embodiment of the invention encrypt and decrypt the data according to the operation type of the clipboard. When the application program enters background operation, the data cached by the shear plate can be stored in the local cache of the application program, and the data cached by the shear plate can be cleared; and when the application program enters foreground operation, encrypting the data cached in the clipboard, and reassigning the obtained encrypted data to the clipboard. Therefore, the method and the device provided by the embodiment of the invention execute corresponding protection strategies aiming at different application scenes, increase the encryption processing of the data cached by the clipboard, effectively prevent the data from being read, prevent an attacker from hijacking the clipboard and easily read the real data, and increase the difficulty of hijacking and cracking. And when the application program enters the background, the data cached by the clipboard is cleared, and the assignment operation is carried out again when the application program is activated again, so that the user experience can be better improved, and the clipboard can be normally used in the application. The method can ensure the safety of the clipboard data, can ensure the consistency of the user operation data, and has good operation experience.
Drawings
In order to more clearly explain the technical solution of the present application, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious to those skilled in the art that other drawings can be obtained according to the drawings without any creative effort.
Fig. 1 is a flowchart of a clipboard data protection method according to an embodiment of the present invention;
fig. 2 is a data flow diagram of a protection method when a clipboard performs an operation according to an embodiment of the present invention;
FIG. 3 is a flow chart of a method for monitoring the type of operation of a shear plate according to an embodiment of the present invention;
FIG. 4 is a flowchart of a method for decrypting encrypted data according to an embodiment of the present invention;
FIG. 5 is another flow chart of a clipboard data protection method according to an embodiment of the present invention;
fig. 6 is a data flow diagram of a protection method when an application enters a background operation according to an embodiment of the present invention;
fig. 7 is a data flow diagram of a protection method when an application enters foreground operation according to an embodiment of the present invention;
fig. 8 is a flowchart of a protection method when an application enters foreground operation according to an embodiment of the present invention;
fig. 9 is a block diagram of a clipboard data protection device according to an embodiment of the present invention;
fig. 10 is another block diagram of a clipboard data protection device according to an embodiment of the present invention.
Detailed Description
During the operation of the application program, a user can quickly copy and store data, such as a mobile phone number, a complex user name and a complex password, and the like, through the clipboard. However, when the clipboard caches the data, the data are in an exposed state and are easy to hijack and utilize by others, so that in order to protect the private data of the user from being invaded, the clipboard protection function can be added when the application program is used, and the security of the clipboard cached data is enhanced.
Although the iOS14 device can ensure the security of user data to some extent by means of top pop-up reminding, in devices below iOS14, the clipboard data is still exposed, which is not secure, and the pop-up reminding affects the user experience. In addition, a mode of cleaning the clipboard data in a time interval is adopted, however, the data in the time interval is still in an exposed state, the risk of hijacking still exists, and the use operation of a user is influenced due to the loss of the data caused by the intermittent data cleaning.
Therefore, in order to improve the security of the clipboard data and enable the data to be protected all the time, the embodiment of the invention provides a clipboard data protection method, aiming at different application scenes, the data cached by the clipboard can be encrypted and decrypted by rewriting the copy and paste of the clipboard; and the data cached by the shear plate can be cleared when the application program enters the background, and the assignment operation is carried out again when the application program returns to the foreground.
Therefore, encryption processing on the data cached by the clipboard is increased, the data is effectively prevented from being read, real data cannot be easily read even an attacker hijacks the clipboard, and the difficulty of hijack and cracking is increased. And when the application program enters the background, the data cached by the clipboard is cleared, and the assignment operation is carried out again when the application program is activated again, so that the user experience can be better improved, and the clipboard can be normally used in the application.
The method provided by the embodiment of the invention expands the protection function of the existing IOS14 clipboard and fills the blank of protecting the clipboard of the equipment version below the iOS 14. The method does not singly depend on a certain technology to realize the protection of the shear plate, can execute corresponding protection strategies aiming at different application scenes, ensures the safety of the shear plate data, increases the difficulty of the crack of an attacker, can ensure the consistency of the operation data of the user, and has good operation experience.
Fig. 1 is a flowchart of a clipboard data protection method according to an embodiment of the present invention; fig. 2 is a data flow diagram of a protection method when a clipboard executes an operation according to an embodiment of the present invention. The method for protecting the data of the shear plate, provided by the embodiment of the invention, is applied to a terminal provided with an application program, and the application program can call the shear plate to execute corresponding operations. In the first application scenario, i.e. when clipboard copy, cut, paste operations are performed, encryption and decryption processing is performed on the data cached by the clipboard. At this time, in performing clipboard data protection, referring to fig. 1 and 2, the method includes the steps of:
and S11, monitoring the operation type of the shear plate when the data is cached in the shear plate.
In the first application scenario, when an application program is started, a clipboard cache modified monitoring notification is added for the application program overall, so as to monitor the operation types of the clipboard in real time, wherein the operation types include copy, cut and paste operations. The operation type of the clipboard can be determined according to the state value returned by the system of the terminal according to the operation of the user.
Fig. 3 is a flowchart of a method for monitoring the operation type of a shear plate according to an embodiment of the present invention. Specifically, referring to fig. 3, the monitoring mechanism configured in the application program monitors the operation type of the clipboard when the execution is executed and data is cached in the clipboard, and includes the following steps:
s111, when data are cached in the clipboard, acquiring a state value when the modification dynamic state of the clipboard changes, wherein the modification state refers to the dynamic state generated when the data in the clipboard are operated.
And S112, monitoring the operation type dynamically corresponding to the modification of the shear plate based on the state value.
When a user needs to cut, copy and paste certain contents during operation of the application program, the application program calls the clipboard to cache the contents operated by the user, and the cached contents are used as data. The user operates each pair of the data once, and the modification dynamics of the clipboard correspondingly changes.
For example, if a user wants to copy data, the modification of the clipboard is dynamically "copy"; if the user wants to cut data, the modification of the clipboard is dynamically 'cut'; if the user wants to paste data, the modification of the clipboard is dynamically "paste".
Each modification dynamic state of the clipboard corresponds to a state value, and a user performs a certain operation, and a system of a terminal in which an application is installed returns a corresponding state value when responding to the operation. And determining the operation type corresponding to the modification dynamic state of the shear plate according to the state value.
For example, if the state value is 1, the corresponding operation type is cut; if the state value is 2, the corresponding operation type is copy; if the state value is 3, the corresponding operation type is paste.
And S12, if the operation type of the clipboard is the cutting operation or the copying operation, encrypting the data corresponding to the cutting operation or the copying operation performed by the clipboard to obtain encrypted data.
If the operation type of the clipboard is determined to be the cutting operation or the copying operation according to the state value, it indicates that the data cached in the clipboard is in the exposed state, and at this time, in order to perform protection, the embodiment encrypts the data corresponding to the cutting operation or the copying operation to obtain encrypted data.
The encryption process may adopt a symmetric encryption method (DES) or an asymmetric encryption method (RSA), which may be specifically selected according to the actual application, and is not specifically limited herein.
After data encryption is completed, the encrypted data can be stored in a local cache, so that the encrypted data can be conveniently called when a pasting operation is subsequently executed, the encrypted data can be further protected when the encrypted data is stored in the local cache, interception by an attacker is avoided, and the local cache refers to the cache of an application program calling the clipboard.
And S13, if the operation type of the clipboard is the pasting operation, decrypting the encrypted data of the clipboard to obtain decrypted data, wherein the decrypted data is used for executing the pasting operation by the clipboard.
And if the operation type of the clipboard is determined to be the paste operation according to the state value, inputting the data in the clipboard to the corresponding position of the application program. At this time, the data in the clipboard is encrypted data, so the encrypted data needs to be decrypted first, and the obtained decrypted data is subjected to corresponding pasting operation.
Fig. 4 is a flowchart of a method for decrypting encrypted data according to an embodiment of the present invention. Since the encrypted data is stored in the local cache, referring to fig. 4, if the operation type of the clipboard is the paste operation, the snooping mechanism configured in the application performs decryption processing on the encrypted data of the clipboard to obtain decrypted data, including:
s131, if the operation type of the clipboard is the paste operation, the encrypted data of the clipboard is obtained from the local cache.
S132, carrying out decryption processing on the encrypted data of the shear plate to obtain decrypted data.
And when the operation type of the clipboard is monitored to be the paste operation, acquiring the encrypted data of the clipboard from the local cache by a monitoring mechanism of the application program. And after the encrypted data is decrypted, corresponding pasting operation is carried out on the obtained decrypted data.
The decryption method may be determined based on the encryption method, that is, the decryption method may be decrypted by using an RDS key or by using an RSA public key, and may be determined specifically according to the encryption method, and details thereof are not repeated herein.
Therefore, the clipboard data protection method provided by the embodiment of the invention monitors the operation of the clipboard by adding a monitoring mechanism in the application program, so as to obtain the operation type of the clipboard in real time. When data are cached in the clipboard, firstly judging whether the operation type is a clipping operation (a copying operation) or not, and if so, executing encrypted data processing; if not, executing judgment to judge whether the operation type is a pasting operation, if so, acquiring the encrypted data for decryption, and executing the pasting operation according to the decrypted data; if not, no action is taken.
The method can encrypt and decrypt the data cached by the clipboard by rewriting the copy and paste of the clipboard. By adding encryption processing on the cache data of the shear plate, the data is effectively prevented from being read, real data cannot be easily read even an attacker hijacks the shear plate, the difficulty of hijack and cracking is increased, the consistency of user operation data can be ensured, and the data protection safety is improved.
FIG. 5 is another flow chart of a clipboard data protection method according to an embodiment of the present invention; fig. 6 is a data flow diagram of a protection method when an application enters a background operation according to an embodiment of the present invention; fig. 7 is a data flow diagram of a protection method when an application enters foreground operation according to an embodiment of the present invention. The method for protecting the data of the shear plate, provided by the embodiment of the invention, is applied to a terminal provided with an application program, and the application program can call the shear plate to execute corresponding operations. In the second application scenario, namely when the application program enters foreground and background, the data is cleared. At this time, in performing clipboard data protection, referring to fig. 5, 6, and 7, the method includes the following steps
And S21, monitoring the life cycle of the application program calling the clipboard when the application program calls the clipboard.
In the second application scenario, when the application program is started, a notification for monitoring the lifecycle is added to the application program to monitor whether the application program enters a background operation or returns to a foreground operation.
When monitoring the life cycle of the application program, the monitoring function adopted for judging the application program to enter the foreground is as follows: - (void) application DidBegome active (UIapplication). The monitoring function adopted for the application program to enter the background is judged as follows: - (void) application division background (UIapplication).
And S22, if the monitored operation corresponding to the life cycle function is that the application program enters background operation, acquiring the data cached by the clipboard.
And S23, storing the data cached by the clipboard into the local cache of the application program, and clearing the data cached by the clipboard.
If the terminal system monitors that the life cycle function of the application program changes through a monitoring mechanism, namely the application program enters background operation, at the moment, in order to avoid exposing the data cached in the clipboard called by the application program, the data cached in the clipboard is stored in the local cache of the application program, and meanwhile, the data cached in the clipboard is cleared.
That is, in this case, the data in the clipboard is moved to the local cache of the application program for storage, and at this time, the clipboard no longer stores the data, so that the data is prevented from being exposed and hijacked by an attacker when the application program enters a background operation.
And S24, if the operation corresponding to the monitored life cycle function is that the application program enters the foreground operation, encrypting the data when the data is cached in the clipboard, and inputting the obtained encrypted data into the clipboard.
If the terminal system monitors that the life cycle function of the application program changes through a monitoring mechanism, namely the application program enters foreground operation, two conditions exist at the moment, namely the condition that data are cached in the clipboard and the condition that the data are not cached.
In some embodiments, if the clipboard stores data in a cache manner, the data is in an exposed state, and any person may hijack the data, so that the data cached in the clipboard can be encrypted to protect the data from being hijacked, the encrypted data is reassigned to the clipboard, and the encrypted data to be obtained is input into the clipboard.
In some embodiments, if the clipboard does not have data cached therein, the application program will have cleaned up the clipboard data when entering the background, and therefore the clipboard needs to be reassigned when re-entering the foreground.
Fig. 8 is a flowchart of a protection method when an application enters foreground operation according to an embodiment of the present invention. Referring to fig. 8, specifically, data is not cached in the clipboard, and the clipboard data protection method provided in the embodiment of the present invention further includes the following steps based on the method provided in the above embodiment:
and S251, if the operation corresponding to the monitored life cycle function is that the application program enters a foreground operation, judging whether the clipboard stores data or not.
And S252, if the clipboard does not store the data, judging whether the application local cache stores the data or not.
And S253, if the data are stored in the local cache of the application program, acquiring the data stored in the local cache of the application program.
And S254, inputting the data into the shear plate.
If the operation corresponding to the life cycle function is that the application program enters the foreground operation, judging whether the clipboard stores data or not, and when determining that the clipboard does not store the data, re-assigning the clipboard, and at the moment, judging whether the application program local cache stores the data or not.
The clipboard does not store data, which indicates that the process of the application program entering the background operation may be executed before, that is, the data in the clipboard is moved to the local cache of the application program for storage, so that the stored data needs to be acquired from the local cache of the application program at this time, and the data is the data that is moved to the local cache of the application program for storage when the application program enters the background operation.
And after the data is acquired again, assigning the data to the clipboard again, namely re-inputting the data into the clipboard, so that the clipboard can execute subsequent operations based on the currently cached data. Since the data in the application local cache has already been called, the data entered into the clipboard may be purged from the application local cache.
Because the data cached in the clipboard has timeliness and can be updated in real time according to the operation of the user, the data cached in the clipboard and the data stored in the local cache of the application program are only the latest data generated by the current user operation, namely only one group of data can be stored, and the latest data can cover the historical data. Therefore, after the data is cached in the clipboard or the data is stored in the local cache of the application program, the data can be directly called to carry out subsequent corresponding operation, and the safety and the timeliness of the data are ensured.
When the corresponding data is called, the terminal system can call the clipboard management class to remove the clipboard or call the corresponding data from the local cache of the application program.
Since the data stored in the local cache of the application program may be encrypted data subjected to encryption processing, the method includes the following steps in inputting the data into the clipboard:
and 2541, decrypting the data to obtain decrypted data.
Step 2542, enter decrypted data into clipboard.
If the data acquired from the local cache of the application program is encrypted data, at the moment, the data needs to be decrypted, the acquired encrypted data is assigned to the clipboard again, namely, the decrypted data is input into the clipboard again, and the clipboard can conveniently execute subsequent operations based on the currently cached data.
Therefore, the method for protecting the clipboard data provided by the embodiment of the invention monitors whether the application program enters background operation or foreground operation in real time by adding a life cycle monitoring mechanism of the application program. And when the application program is monitored to enter background operation, storing the data cached in the clipboard into the local cache of the application program, and cleaning the data cached in the clipboard. When the application program is monitored to enter foreground operation, whether data are cached in the clipboard is judged firstly, if the data are cached, the data cached in the clipboard are encrypted, and the encrypted data are assigned to the clipboard again. If the data is not cached, judging whether the data is stored in the local cache of the application program, if so, re-assigning the data stored in the local cache of the application program to the clipboard, and cleaning the data stored in the local cache of the application program; if no data is stored, no action is taken.
The method can also clear the data cached by the clipboard when the application program enters the background, and carry out assignment operation again when the application program returns to the foreground (is activated again), so that the safety of the clipboard data is ensured, the user experience can be better improved, the consistency of the user operation data is ensured, and the clipboard can be normally used in the application.
Fig. 9 is a block diagram of a clipboard data protection device according to an embodiment of the present invention. Referring to fig. 9, an embodiment of the present invention provides a clipboard data protection device for performing the relevant steps of the clipboard data protection method shown in fig. 1, where the device includes:
an operation type monitoring module 110, configured to monitor an operation type of a clipboard when data is cached in the clipboard;
the first data protection module 120 is configured to, if the operation type of the clipboard is a cut operation or a copy operation, encrypt data corresponding to the cut operation or the copy operation performed by the clipboard to obtain encrypted data;
and a second data protection module 130, configured to decrypt the encrypted data of the clipboard to obtain decrypted data if the operation type of the clipboard is a paste operation, where the decrypted data is used for the clipboard to perform the paste operation.
Fig. 10 is another block diagram of a clipboard data protection device according to an embodiment of the present invention. Referring to fig. 10, an embodiment of the present invention provides a clipboard data protection device for performing the relevant steps of the clipboard data protection method shown in fig. 5, where the device includes:
the life cycle monitoring module 210 is configured to monitor a life cycle of an application program calling a clipboard when the application program calls the clipboard;
the background operation protection module 220 is configured to obtain data cached by the clipboard if the monitored operation corresponding to the lifecycle function is that the application program enters background operation;
the data processing module 230 is configured to store the data cached by the clipboard in an application local cache, and clear the data cached by the clipboard;
and a foreground operation protection module 240, configured to encrypt the data when the data is cached in the clipboard if the operation corresponding to the monitored lifecycle function is an application entering foreground operation, and input the obtained encrypted data into the clipboard.
According to the technical scheme, when data is cached in the clipboard, the clipboard data protection method and the clipboard data protection device provided by the embodiment of the invention encrypt and decrypt the data according to the operation type of the clipboard. When the application program enters background operation, the data cached by the shear plate can be stored in the local cache of the application program, and the data cached by the shear plate can be cleared; and when the application program enters foreground operation, encrypting the data cached in the clipboard, and reassigning the obtained encrypted data to the clipboard. Therefore, the method and the device provided by the embodiment of the invention execute corresponding protection strategies aiming at different application scenes, increase the encryption processing of the data cached by the clipboard, effectively prevent the data from being read, prevent an attacker from hijacking the clipboard and easily read the real data, and increase the difficulty of hijacking and cracking. And when the application program enters the background, the data cached by the clipboard is cleared, and the assignment operation is carried out again when the application program is activated again, so that the user experience can be better improved, and the clipboard can be normally used in the application. The method can ensure the safety of the clipboard data, can ensure the consistency of the user operation data, and has good operation experience.
In a specific implementation, the present invention further provides a computer storage medium, where the computer storage medium may store a program, and the program may include some or all of the steps in the embodiments of the clipboard data protection method provided by the present invention when executed. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM) or a Random Access Memory (RAM).
Those skilled in the art will readily appreciate that the techniques of the embodiments of the present invention may be implemented as software plus a required general purpose hardware platform. Based on such understanding, the technical solutions in the embodiments of the present invention may be essentially or partially implemented in the form of a software product, which may be stored in a storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the embodiments or some parts of the embodiments.
The same and similar parts in the various embodiments in this specification may be referred to each other. In particular, for the shear plate data protection method and device embodiments, since they are substantially similar to the method embodiments, the description is simple, and for the relevant points, reference may be made to the description in the method embodiments.
The above-described embodiments of the present invention should not be construed as limiting the scope of the present invention.

Claims (10)

1. A clipboard data protection method, comprising the steps of:
monitoring the operation type of the shear plate when data are cached in the shear plate;
if the operation type of the clipboard is a cutting operation or a copying operation, encrypting data corresponding to the cutting operation or the copying operation performed by the clipboard to obtain encrypted data;
and if the operation type of the clipboard is the pasting operation, decrypting the encrypted data of the clipboard to obtain decrypted data, wherein the decrypted data is used for executing the pasting operation by the clipboard.
2. The method of claim 1, wherein monitoring the type of operation of the clipboard while data is cached in the clipboard comprises:
when data are cached in a clipboard, acquiring a state value when the modification dynamics of the clipboard change, wherein the modification state refers to the dynamics generated when the data in the clipboard are operated;
based on the state value, monitoring an operation type dynamically corresponding to modification of the shear plate.
3. The method of claim 1, further comprising:
and storing the encrypted data into a local cache, wherein the local cache refers to the cache of an application program calling the clipboard.
4. The method according to claim 3, wherein if the operation type of the clipboard is a paste operation, decrypting the encrypted data of the clipboard to obtain decrypted data comprises:
if the operation type of the clipboard is a pasting operation, acquiring encrypted data of the clipboard from the local cache;
and decrypting the encrypted data of the clipboard to obtain decrypted data.
5. A clipboard data protection method, comprising the steps of:
monitoring the life cycle of the application program calling the clipboard when the application program calls the clipboard;
if the monitored operation corresponding to the life cycle function is that the application program enters background operation, acquiring the data cached by the shear plate;
storing the data cached by the clipboard into an application program local cache, and clearing the data cached by the clipboard;
and if the operation corresponding to the monitored life cycle function is the operation that the application program enters the foreground, encrypting the data when the data is cached in the clipboard, and inputting the obtained encrypted data into the clipboard.
6. The method of claim 5, further comprising:
if the operation corresponding to the monitored life cycle function is that the application program enters the foreground operation, judging whether the shear plate stores data or not;
if the clipboard does not store data, judging whether the local cache of the application program stores data or not;
if the data is stored in the local cache of the application program, the data stored in the local cache of the application program is obtained;
inputting the data into the clipboard.
7. The method of claim 6, wherein said entering said data into said clipboard comprises:
decrypting the data to obtain decrypted data;
inputting the decrypted data into the clipboard.
8. The method of claim 6, further comprising:
clearing data entered into the clipboard from the application local cache.
9. A clipboard data protection device, comprising:
the operation type monitoring module is used for monitoring the operation type of the clipboard when data are cached in the clipboard;
the first data protection module is used for encrypting the data corresponding to the shearing operation or the copying operation executed by the shearing plate to obtain encrypted data if the operation type of the shearing plate is the shearing operation or the copying operation;
and the second data protection module is used for decrypting the encrypted data of the clipboard to obtain decrypted data if the operation type of the clipboard is a paste operation, and the decrypted data is used for executing the paste operation by the clipboard.
10. A clipboard data protection device, comprising:
the life cycle monitoring module is used for monitoring the life cycle of the application program calling the clipboard when the application program calls the clipboard;
the background operation protection module is used for acquiring the data cached by the shear plate if the monitored operation corresponding to the life cycle function is that the application program enters background operation;
the data processing module is used for storing the data cached by the clipboard into an application program local cache and clearing the data cached by the clipboard;
and the foreground operation protection module is used for encrypting the data when the data is cached in the shear plate if the operation corresponding to the monitored life cycle function is that the application program enters the foreground operation, and inputting the obtained encrypted data into the shear plate.
CN202011426944.7A 2020-12-09 2020-12-09 Shear plate data protection method and device Pending CN112433871A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011426944.7A CN112433871A (en) 2020-12-09 2020-12-09 Shear plate data protection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011426944.7A CN112433871A (en) 2020-12-09 2020-12-09 Shear plate data protection method and device

Publications (1)

Publication Number Publication Date
CN112433871A true CN112433871A (en) 2021-03-02

Family

ID=74691431

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011426944.7A Pending CN112433871A (en) 2020-12-09 2020-12-09 Shear plate data protection method and device

Country Status (1)

Country Link
CN (1) CN112433871A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113407959A (en) * 2021-06-11 2021-09-17 维沃移动通信(杭州)有限公司 Operation execution method and device and electronic equipment
CN114356614A (en) * 2022-03-17 2022-04-15 北京蔚领时代科技有限公司 Shear plate data isolation method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6269389B1 (en) * 1995-05-05 2001-07-31 Apple Computer, Inc. Method and system for controlling the copying and insertion of contents of documents
CN102609642A (en) * 2012-01-09 2012-07-25 中标软件有限公司 Clipboard control method and clipboard control system
CN107220555A (en) * 2016-03-22 2017-09-29 中兴通讯股份有限公司 A kind of shear plate access control method and system
CN110262908A (en) * 2019-06-21 2019-09-20 珠海格力电器股份有限公司 A kind of processing method and processing device of shear plate data

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6269389B1 (en) * 1995-05-05 2001-07-31 Apple Computer, Inc. Method and system for controlling the copying and insertion of contents of documents
CN102609642A (en) * 2012-01-09 2012-07-25 中标软件有限公司 Clipboard control method and clipboard control system
CN107220555A (en) * 2016-03-22 2017-09-29 中兴通讯股份有限公司 A kind of shear plate access control method and system
CN110262908A (en) * 2019-06-21 2019-09-20 珠海格力电器股份有限公司 A kind of processing method and processing device of shear plate data

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113407959A (en) * 2021-06-11 2021-09-17 维沃移动通信(杭州)有限公司 Operation execution method and device and electronic equipment
CN114356614A (en) * 2022-03-17 2022-04-15 北京蔚领时代科技有限公司 Shear plate data isolation method and device

Similar Documents

Publication Publication Date Title
JP7393517B2 (en) Systems and methods for ransomware detection and mitigation
CN111538996B (en) Trusted starting method and device of block chain all-in-one machine
CN105260663B (en) A kind of safe storage service system and method based on TrustZone technologies
US10375116B2 (en) System and method to provide server control for access to mobile client data
CN102227734B (en) Client computer for protecting confidential file, server computer therefor, method therefor
US11025415B2 (en) Cryptographic operation method, method for creating working key, cryptographic service platform, and cryptographic service device
US10887085B2 (en) System and method for controlling usage of cryptographic keys
CN104871484A (en) System and method for an endpoint hardware assisted network firewall in a security environment
CN114553540B (en) Zero trust-based Internet of things system, data access method, device and medium
CN112433871A (en) Shear plate data protection method and device
CN113642014A (en) Data access system based on hybrid cloud and public cloud server
CN114760056B (en) Secure communication method and device for dynamically updating key
CN111666558B (en) Key rotation method, device, computer equipment and storage medium
CN112671733A (en) Data communication method, key management system, device, and storage medium
US10826944B1 (en) Systems and methods for network security
CN112559991A (en) System secure login method, device, equipment and storage medium
CN112311769A (en) Method, system, electronic device and medium for security authentication
CN101923610A (en) Data protection method and system
CN108898026B (en) Data encryption method and device
CN111859379B (en) Processing method and device for protecting data model
Sriram et al. A hybrid protocol to secure the cloud from insider threats
CN101106451B (en) A data transmission method and device
CN111417122A (en) Attack prevention method and device
CN111831978A (en) Method and device for protecting configuration file
CN113672925A (en) Method, device, storage medium and electronic equipment for preventing lasso software attack

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination