Screen capture method, device, equipment and medium
By judging and modifying the data in the sensitive information input field during the screenshot process of the electronic device, or configuring screenshot privacy protection controls, the problem of user sensitive information being screenshotted is solved, and information security protection is achieved during screenshots.
Patent Information
- Application Number
- CN202111438252.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-30
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2041-11-30
AI Technical Summary
When the screenshot function of an electronic device is used, the user's sensitive information (such as ID number, bank card number, password, etc.) may be captured and saved, causing security risks.
By determining whether the display interface contains a sensitive information input field before taking a screenshot, and if so, modifying its sub-data information and generating a blurred or blank screenshot image, or configuring screenshot privacy protection controls in the input field, including creating a secure screenshot container and encrypted information protection controls, to ensure that sensitive information is not captured in screenshots.
It effectively protects users' sensitive information from being captured and saved, improving information security. It has high execution efficiency and a wide range of application scenarios, especially when applied on iOS devices.
Smart Images

Figure CN114065295B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of privacy protection technology, and in particular to a screenshot method, device, equipment and medium. Background Art
[0002] With the advancement of computer software and network technologies, the functionality of electronic devices such as mobile terminals has increased significantly, leading to the development of numerous applications (apps) and their use in electronic devices. Today, users can easily access functions such as mobile payments, email communication, web browsing, online games, and video chatting through various applications on their electronic devices.
[0003] With the rapid development of applications, the importance of information security is also gaining increasing attention. For example, on electronic devices running iOS, when a user enters sensitive information such as ID numbers, bank card numbers, and passwords into an app's sub-controls (input boxes), if the device's screenshot function is used, the user's sensitive information may be captured and saved, posing a security risk to the user's sensitive information.
[0004] Therefore, when the screenshot function of an electronic device is used, how to protect the security of the user's sensitive information is a technical problem that urgently needs to be solved. Summary of the Invention
[0005] The present application provides a screenshot method, apparatus, device, and medium for protecting the security of a user's sensitive information when the screenshot function of an electronic device is used.
[0006] In a first aspect, the present application provides a screenshot method, the method comprising:
[0007] Performing a screenshot of the current display interface according to the received screenshot instruction, and obtaining data information corresponding to the current display interface;
[0008] Determine whether the current display interface includes a sensitive information input field, and if so, modify the sub-data information corresponding to the information in the sensitive information input field in the data information;
[0009] Generate and display a screenshot based on the modified data information.
[0010] In a possible implementation, determining whether the current display interface includes a sensitive information input field includes:
[0011] Determining whether a preset screenshot privacy protection control is configured in any input field included in the current display interface, and if so, determining that the current display interface includes a sensitive information input field;
[0012] If not, it is determined that the current display interface does not include a sensitive information input field.
[0013] In one possible implementation, the process of configuring the screenshot privacy protection control in the input field includes:
[0014] If any display interface is detected to be called, the sub-controls corresponding to each input field contained in the display interface are added to the screenshot privacy protection control respectively, and the screenshot privacy protection control is configured at the position of each input field respectively.
[0015] In one possible implementation, the process of configuring the screenshot privacy protection control in the input field includes:
[0016] If the screenshot privacy protection control is added to the input box of the preset field, the sub-control corresponding to the input box of the preset field is added to the screenshot privacy protection control.
[0017] In one possible implementation, the process of pre-configuring the screenshot privacy protection control includes:
[0018] Create a secure screenshot container;
[0019] Adding a text input box tool to the secure screenshot container and setting the text input box tool to a ciphertext display state; wherein the text input box tool contains an encrypted information protection sub-container;
[0020] Add an encryption information protection control to the encryption information protection sub-container in the text input box tool.
[0021] In a possible implementation, adding sub-controls corresponding to each input field included in the display interface to the screenshot privacy protection control includes:
[0022] The sub-controls corresponding to each input field included in the display interface are respectively added to the encrypted information protection control in the screenshot privacy protection control.
[0023] In a second aspect, the present application provides a screenshot device, comprising:
[0024] An acquisition module is used to perform a screenshot process on the current display interface according to the received screenshot instruction, and obtain data information corresponding to the current display interface;
[0025] a screenshot protection module, configured to determine whether the current display interface includes a sensitive information input field, and if so, modify the sub-data information corresponding to the information in the sensitive information input field in the data information;
[0026] The generation module is used to generate and display a screenshot image based on the modified data information.
[0027] In one possible implementation, the screenshot protection module is specifically used to determine whether a preset screenshot privacy protection control is configured in any input field contained in the current display interface. If so, it is determined that the current display interface contains a sensitive information input field; if not, it is determined that the current display interface does not contain a sensitive information input field.
[0028] In one possible embodiment, the screenshot protection module is specifically used to add the sub-controls corresponding to each input field contained in the display interface to the screenshot privacy protection control if it monitors that any display interface is called, and configure the screenshot privacy protection control to the position of each input field.
[0029] In a possible implementation, the screenshot protection module is specifically configured to add a sub-control corresponding to the input box of the preset field to the screenshot privacy protection control if the screenshot privacy protection control is added to the input box of the preset field.
[0030] In a possible implementation, the screenshot protection module is specifically configured to create a secure screenshot container;
[0031] Adding a text input box tool to the secure screenshot container and setting the text input box tool to a ciphertext display state; wherein the text input box tool contains an encrypted information protection sub-container;
[0032] Add an encryption information protection control to the encryption information protection sub-container in the text input box tool.
[0033] In a possible implementation, the screenshot protection module is specifically configured to add sub-controls corresponding to each input field included in the display interface to the encrypted information protection control in the screenshot privacy protection control.
[0034] In a third aspect, the present application provides an electronic device, which includes at least a processor and a memory, and the processor is used to implement the steps of any of the above-mentioned screenshot methods when executing a computer program stored in the memory.
[0035] In a fourth aspect, the present application provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of any of the above-mentioned screenshot methods.
[0036] In a fifth aspect, the present application provides a computer program product, which includes: computer program code, which, when executed on a computer, enables the computer to execute the steps of any of the above-mentioned screenshot methods.
[0037] Since the present application can take a screenshot of the current display interface according to the received screenshot instruction, obtain the data information corresponding to the current display interface; determine whether the current display interface contains a sensitive information input field, and if so, modify the sub-data information corresponding to the information in the sensitive information input field in the data information; and generate and display a screenshot image based on the modified data information, so that the user's sensitive information will not be displayed in the screenshot obtained by the screenshot, that is, the user's sensitive information will not be saved as a screenshot, thereby protecting the security of the user's sensitive information when the screenshot function of the electronic device is used. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the implementation methods in the embodiments of the present application or related technologies, the following is a brief introduction to the drawings required for use in the embodiments or related technology descriptions. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0039] Figure 1 A schematic diagram of a first screenshot process provided by some embodiments is shown;
[0040] Figure 2 A schematic diagram of a second screenshot process provided by some embodiments is shown;
[0041] Figure 3 A schematic diagram of a screenshot privacy protection control provided by some embodiments is shown;
[0042] Figure 4 A schematic diagram of a process for configuring a screenshot privacy protection control provided by some embodiments is shown;
[0043] Figure 5 A schematic diagram of a third screenshot process provided by some embodiments is shown;
[0044] Figure 6 A schematic diagram of a process for separately adding a screenshot privacy protection control is shown in some embodiments;
[0045] Figure 7 A schematic diagram of a process for intelligently configuring a screenshot privacy protection control in an input field provided by some embodiments is shown;
[0046] Figure 8 A schematic diagram of a screenshot privacy protection control configured in an input box provided by some embodiments is shown;
[0047] Figure 9 A schematic diagram showing the principle of a dynamic switching method provided by some embodiments is shown;
[0048] Figure 10 A schematic diagram of a process of a dynamic switching method provided by some embodiments is shown;
[0049] Figure 11 A schematic diagram of a fourth screenshot process provided by some embodiments is shown;
[0050] Figure 12 A fifth screenshot process diagram provided by some embodiments is shown;
[0051] Figure 13 A sixth screenshot process diagram provided by some embodiments is shown;
[0052] Figure 14 A schematic diagram of a screenshot device provided by some embodiments is shown;
[0053] Figure 15 A schematic structural diagram of an electronic device provided by some embodiments is shown. DETAILED DESCRIPTION
[0054] In order to make the purpose and implementation of this application clearer, the exemplary implementation of this application will be clearly and completely described below in conjunction with the drawings in the exemplary embodiments of this application. Obviously, the described exemplary embodiments are only part of the embodiments of this application, not all of the embodiments.
[0055] In the specification and claims of this application and the accompanying drawings, the terms "first," "second," "third," etc. are used to distinguish similar or similar objects or entities, and are not necessarily intended to limit a particular order or sequence, unless otherwise noted. It should be understood that the terms used in this manner are interchangeable under appropriate circumstances.
[0056] The terms "comprise," "include," and "have," and any variations thereof, are intended to cover but not exclude inclusion; for example, a product or device comprising a list of components is not necessarily limited to all the components expressly listed but may include other components not expressly listed or inherent to such product or device.
[0057] The term "module" refers to any known or later developed hardware, software, firmware, artificial intelligence, fuzzy logic, or combination of hardware and / or software code that is capable of performing the functionality associated with that element.
[0058] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some or all of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.
[0059] In order to protect the security of a user's sensitive information when the screenshot function of an electronic device is used, the present application provides a screenshot method, apparatus, device and medium.
[0060] Example 1:
[0061] All implementation methods of the embodiments of this application comply with the relevant provisions of national laws and regulations regarding the acquisition, storage, use, and processing of data.
[0062] Figure 1 A schematic diagram of a first screenshot process provided by some embodiments is shown, such as Figure 1 As shown, the process includes the following steps:
[0063] S101: Performing a screenshot of the current display interface according to the received screenshot instruction, and obtaining data information corresponding to the current display interface.
[0064] The screenshot method provided in the embodiment of the present application is applied to an electronic device, which may be, for example, a PC, a mobile terminal, or a server. In one possible implementation, the screenshot method provided in the embodiment of the present application may be applied to an electronic device installed with an iOS system.
[0065] In one possible implementation, when a user needs to take a screenshot of the current display interface of an electronic device, a screenshot command can be triggered in the electronic device, and the electronic device can receive the screenshot command. After receiving the screenshot command, the electronic device can take a screenshot of the current display interface according to the received screenshot command and obtain data information corresponding to the current display interface. For example, the electronic device can obtain data information such as a binary data stream corresponding to the current display interface.
[0066] S102: Determine whether the current display interface includes a sensitive information input field. If so, modify the sub-data information corresponding to the information in the sensitive information input field in the data information.
[0067] In order to protect the security of the user's sensitive information when the screenshot function of the electronic device is used, the electronic device can determine whether the current display interface contains a sensitive information input field. In one possible implementation, when determining whether the current display interface contains a sensitive information input field, it can be determined whether any input field included in the current display interface is configured with a preset screenshot privacy protection control. If any input field included in the current display interface is configured with a preset screenshot privacy protection control, it can be determined that the current display interface contains a sensitive information input field. If any input field included in the current display interface is not configured with a preset screenshot privacy protection control, it can be determined that the current display interface does not contain a sensitive information input field.
[0068] In a possible implementation, if the current display interface includes a sensitive information input field, the electronic device may modify the sub-data information corresponding to the information in the sensitive information input field in the acquired data information corresponding to the current display interface.
[0069] It is understandable that if the current display interface does not contain a sensitive information input field, the electronic device may not modify the data information corresponding to the current display interface obtained, and may directly generate and display a screenshot image of the current display interface based on the binary data stream and other data information obtained from the current display interface.
[0070] S103: Generate and display a screenshot image based on the modified data information.
[0071] In one possible implementation, after the electronic device modifies the sub-data information corresponding to the information in the sensitive information input field, when the electronic device generates a screenshot image based on the modified data information, the sub-image of the area where the sensitive information input field is located in the screenshot image can be a blank, black, mosaic or other blurred image. This application does not specifically limit the method of modifying the sub-data information, and it can be flexibly set according to needs.
[0072] For example, assuming the current display interface contains a sensitive information input field for an ID number, regardless of whether the user's ID number is entered in the sensitive information input field, the sub-data information corresponding to the information in the sensitive information input field can be modified so that, in the screenshot generated based on the modified data information, the sub-image corresponding to the sensitive information input field for the ID number can be a blank or blurred image. Because the sub-image corresponding to the area where the sensitive information input field is located in the screenshot is a processed blurred image and does not display the user's specific sensitive information, the screenshot generated based on the modified data information can effectively protect the user's sensitive information.
[0073] For ease of understanding, the screenshot process provided by this application is illustrated below through a specific embodiment. Figure 2 A schematic diagram of a second screenshot process provided by some embodiments is shown, such as Figure 2 As shown, the process includes the following steps:
[0074] S201: Taking a screenshot of the current display interface according to the received screenshot instruction, and obtaining data information corresponding to the current display interface.
[0075] S202: Determine whether a preset screenshot privacy protection control is configured in any input field included in the current display interface. If so, proceed to S203; if not, proceed to S205.
[0076] S203: Determine whether the current display interface includes a sensitive information input field, and modify the sub-data information corresponding to the information in the sensitive information input field in the data information.
[0077] S204: Generate and display a screenshot image based on the modified data information.
[0078] S205: Determine that the current display interface does not include a sensitive information input field, and directly generate and display a screenshot image based on the data information obtained in S201.
[0079] Since the present application can take a screenshot of the current display interface according to the received screenshot instruction, obtain the data information corresponding to the current display interface; determine whether the current display interface contains a sensitive information input field, and if so, modify the sub-data information corresponding to the information in the sensitive information input field in the data information; and generate and display a screenshot image based on the modified data information, so that the user's sensitive information will not be displayed in the screenshot obtained by the screenshot, that is, the user's sensitive information will not be saved as a screenshot, thereby protecting the security of the user's sensitive information when the screenshot function of the electronic device is used.
[0080] Example 2:
[0081] All implementation methods of the embodiments of this application comply with the relevant provisions of national laws and regulations regarding the acquisition, storage, use, and processing of data.
[0082] In order to configure the screenshot privacy protection control, based on the above embodiment, in the embodiment of the present application, the process of pre-configuring the screenshot privacy protection control includes:
[0083] Create a secure screenshot container;
[0084] Adding a text input box tool to the secure screenshot container and setting the text input box tool to a ciphertext display state; wherein the text input box tool contains an encrypted information protection sub-container;
[0085] Add an encryption information protection control to the encryption information protection sub-container in the text input box tool.
[0086] In one possible implementation, a screenshot privacy protection control can be created based on a secure screenshot container developed based on the native system control of the iOS system. Exemplarily, the secure screenshot container may include SIPCView, and a screenshot privacy protection control can be created based on the secure screenshot container SIPCView developed based on the native system control of the iOS system. Since the present application can create a screenshot privacy protection control based on a secure screenshot container (SIPCView) developed based on the native system control of the iOS system, when the user's sensitive information is protected based on the screenshot privacy protection control, the electronic device can have a higher execution efficiency, and in addition, the application scenario of the screenshot method can be wider.
[0087] Figure 3 A schematic diagram of a screenshot privacy protection control provided by some embodiments is shown. Figure 3 As shown, in one possible implementation, when configuring the screenshot privacy protection control, a secure screenshot container (SIPCView) can be created first; then, a text input box tool can be added to the secure screenshot container (SIPCView). Exemplarily, the text input box tool can include a UITextField, and the text input box tool UITextField can be added to the secure screenshot container (SIPCView). In one possible implementation, in order to configure the sub-image of the area where the sensitive information input field in the screenshot image is located as a blurred image, so as to protect the security of the user's sensitive information when the screenshot function is used, the display state of the text input box tool (UITextField) can be set to a ciphertext display state.
[0088] In one possible implementation, the text input box tool may include an encrypted information protection subcontainer, and based on the encrypted information protection subcontainer, the sub-image of the area where the sensitive information input field is located in the screenshot image may be configured as a blurred image, thereby achieving the purpose of protecting the security of the user's sensitive information when the screenshot function is used. In one possible implementation, the sub-controls contained in the text input box tool (UITextField) may be traversed to determine the location of the encrypted information protection subcontainer in the text input box tool (UITextField) that can implement screenshot protection (ciphertext display). Then, the encrypted information protection control is added to the encrypted information protection subcontainer in the text input box tool (UITextField), thereby completing the configuration (assembly) of the screenshot privacy protection control. In one possible implementation, the encrypted information protection control may include SIPCContentView, and the encrypted information protection control SIPCContentView may be added to the encrypted information protection subcontainer in the text input box tool (UITextField).
[0089] For ease of understanding, the process of configuring the screenshot privacy protection control in this application is described below through a specific embodiment. Figure 4 A schematic diagram of a process for configuring a screenshot privacy protection control provided by some embodiments is shown. Figure 4 As shown, in one possible implementation, when configuring the screenshot privacy protection control, you can first traverse the sub-controls contained in the text input box tool (UITextField) to determine the location of the encrypted information protection sub-container in the text input box tool (UITextField) that can implement screenshot protection (ciphertext display). At the same time, create a secure screenshot container (SIPCView), add the text input box tool (UITextField) to the secure screenshot container (SIPCView), and set the display state of the text input box tool (UITextField) to the ciphertext display state. Then, add the encrypted information protection control (SIPCContentView) to the encrypted information protection sub-container in the text input box tool (UITextField), thereby realizing (completing) the configuration (assembly) of the screenshot privacy protection control.
[0090] For ease of understanding, the screenshot process provided by this application is explained below through a specific embodiment. Figure 5 A third screenshot process diagram provided by some embodiments is shown. Figure 5 As shown, the process includes the following steps:
[0091] S501: Create a secure screenshot container SIPCView.
[0092] S502: Add a text input box tool UITextField to SIPCView, and set the UITextField to the ciphertext display state.
[0093] S503: Add the encrypted information protection control SIPCContentView to the encrypted information protection subcontainer in the UITextField to complete the configuration (assembly) of the screenshot privacy protection control.
[0094] S504: Configuring a screenshot privacy protection control in an input field in the display interface of the App.
[0095] S505: Performing a screenshot of the current display interface according to the received screenshot instruction, and obtaining data information corresponding to the current display interface.
[0096] S506: Determine whether a preset screenshot privacy protection control is configured in any input field included in the current display interface. If so, proceed to S507; if not, proceed to S509.
[0097] S507: Determine whether the current display interface includes a sensitive information input field, and modify the sub-data information corresponding to the information in the sensitive information input field in the data information.
[0098] S508: Generate and display a screenshot image based on the modified data information.
[0099] S509: Determine that the current display interface does not include a sensitive information input field, and directly generate and display a screenshot image based on the acquired data information.
[0100] Example 3:
[0101] All implementation methods of the embodiments of this application comply with the relevant provisions of national laws and regulations regarding the acquisition, storage, use, and processing of data.
[0102] In order to configure the screenshot privacy protection control in the input field, based on the above embodiments, in the embodiment of the present application, the process of configuring the screenshot privacy protection control in the input field includes:
[0103] If the screenshot privacy protection control is added to the input box of the preset field, the sub-control corresponding to the input box of the preset field is added to the screenshot privacy protection control.
[0104] In one possible implementation, when configuring a screenshot privacy protection control in an input field, the control can be manually configured in the input field. Since manual configuration of the screenshot privacy protection control in an input field is typically performed only on one input field at a time, for ease of description, the manual configuration of the screenshot privacy protection control in an input field is referred to as "individual addition." Figure 6 A schematic diagram of a process for adding a separate screenshot privacy protection control is shown in some embodiments. Figure 6 As shown, the electronic device displays the display page in the App that requires screenshot privacy protection, and the user manually configures the screenshot privacy protection control to the location of the input bar of the fields that require screenshot privacy protection, such as ID number, password, etc. (for the convenience of description, called preset fields); at the same time, the sub-control corresponding to the input bar of the preset field can be added to the screenshot privacy protection control, thereby realizing (completing) the configuration of the screenshot privacy protection control in the input bar.
[0105] In a possible implementation, in order to quickly and intelligently configure the screenshot privacy protection control in the input field, the screenshot privacy protection control may be automatically and intelligently configured in the input field based on the electronic device. Figure 7 A schematic diagram of a process for intelligently configuring a screenshot privacy protection control in an input field is shown in some embodiments. Figure 7 As shown, for example, the user can pre-configure fields such as ID number and password as preset fields. The electronic device can recognize the preset fields contained in the display interface and add a screenshot privacy protection control in the input box of the preset field. At the same time, the electronic device can also add the sub-control corresponding to the input box of the preset field to the screenshot privacy protection control, thereby realizing (completing) the configuration of the screenshot privacy protection control in the input bar.
[0106] In one possible implementation, Figure 8 A schematic diagram of a screenshot privacy protection control configured in an input box provided by some embodiments is shown. Figure 8 As shown, taking the encrypted information protection control as SIPCContentView as an example, the SIPCContentView in the screenshot privacy protection control can be used to carry the sub-control corresponding to the input field. When adding the sub-control corresponding to the input field contained in the display interface to the screenshot privacy protection control, the sub-control corresponding to the input field can be added to the SIPCContentView in the screenshot privacy protection control.
[0107] Example 4:
[0108] All implementation methods of the embodiments of this application comply with the relevant provisions of national laws and regulations regarding the acquisition, storage, use, and processing of data.
[0109] In order to quickly and intelligently configure the screenshot privacy protection control in the input field, based on the above embodiments, in the embodiment of the present application, the process of configuring the screenshot privacy protection control in the input field includes:
[0110] If any display interface is detected to be called, the sub-controls corresponding to each input field contained in the display interface are added to the screenshot privacy protection control respectively, and the screenshot privacy protection control is configured at the position of each input field respectively.
[0111] In a possible implementation, in order to quickly and intelligently configure the screenshot privacy protection control in the input bar, the screenshot privacy protection control can be configured in each input bar contained in the display interface in an intelligent and batch manner based on the electronic device. For the convenience of description, the method of configuring the screenshot privacy protection control in each input bar contained in the display interface is referred to as global addition (batch addition). In addition, when the screenshot function of the electronic device in the related art is used, the user's sensitive information may be screenshoted and saved (for the convenience of description, it is referred to as not having a screenshot protection function) is referred to as method one, and when the screenshot function of the electronic device in this application is used, the user's sensitive information can be protected (for the convenience of description, it is referred to as having a screenshot protection function) is referred to as method two.
[0112] Since the method usually adopted by the electronic device by default is method one in the related art that does not have a screenshot protection function, if you want the electronic device to adopt method two in this application that has a screenshot protection function, you need to change (transform) the method implementation corresponding to method one (for the convenience of description, referred to as method implementation one) to the method implementation corresponding to method two (for the convenience of description, referred to as method implementation two). In one possible implementation, based on the idea of aspect-oriented programming (AOP), the runtime mechanism can be used to dynamically change the method implementation one of the lifecycle method (method one) that has been displayed by the controller in the electronic device to the method implementation two corresponding to method two (for the convenience of description, referred to as dynamic exchange method).
[0113] Figure 9 A schematic diagram of a dynamic switching method provided by some embodiments is shown. Figure 9 As shown, since electronic devices have a method cache queue for each class object to store the mapping relationship (correspondence) between the method name in the method name list and the method implementation in the method implementation list, what needs to be done to dynamically exchange methods is to use the Runtime mechanism to dynamically change the mapping relationship between the method name and the method implementation, see Figure 9That is, the Runtime mechanism can be used to change the method implementation one corresponding to method one (method name one) to method implementation two (method implementation with screenshot protection function), and change method implementation one (method implementation without screenshot protection function in related technology) to the method implementation corresponding to method two (method name two).
[0114] Since the method implementation corresponding to method one is usually the method implementation adopted by electronic devices, when the method implementation of method one corresponding to the App display interface is changed (transformed) into method implementation two (method implementation with screenshot protection function), the electronic device can use the screenshot method with screenshot protection function in this application to take a screenshot of the App display interface, so that when taking a screenshot of the App display interface, the user's sensitive information will not be displayed in the screenshot, that is, the user's sensitive information will not be captured and saved, thereby protecting the security of the user's sensitive information when the screenshot function of the electronic device is used.
[0115] It is understandable that if the display interface of the App does not perform the steps of the above-mentioned dynamic exchange method, when the electronic device takes a screenshot of the display interface in the App, the screenshot method without the screenshot protection function in method one can still be used.
[0116] In a possible implementation, when using the Runtime mechanism to perform the steps of the dynamic exchange method based on the idea of AOP, considering that each display interface usually has operations that are called and displayed, the electronic device can add the sub-controls corresponding to each input field contained in the display interface to the screenshot privacy protection control when it monitors that any display interface is called, and configure the screenshot privacy protection control to the position of each input field, so as to configure the screenshot privacy protection control in each input field, that is, to implement the steps of the above-mentioned dynamic exchange method.
[0117] Similar to the above embodiment, in a possible implementation, taking the encrypted information protection control as SIPCContentView as an example, the sub-controls corresponding to each input field contained in the display interface can be added to the SIPCContentView in the screenshot privacy protection control.
[0118] For ease of understanding, the dynamic switching method process provided by this application is explained below through a specific embodiment. Figure 10 A schematic diagram of a dynamic switching method provided by some embodiments is shown. Figure 10 As shown, the process includes the following steps:
[0119] First call the original life cycle method, that is, call method one first. At this time, the method implementation corresponding to method one is method implementation one (a method implementation that does not have a screenshot protection function in the related art), and the dynamic exchange method can be started at the same time.
[0120] In one possible implementation, the process of the dynamic swap method may include: when monitoring the display interface being called, all sub-controls contained in the display interface (sub-controls corresponding to all input boxes) can be traversed, and then the sub-controls corresponding to all input boxes are added to the screenshot privacy protection control respectively, and the screenshot privacy protection control is configured at the location of each input box respectively, thereby completing (implementing) the steps of the dynamic swap method.
[0121] Figure 11 A fourth screenshot process diagram provided by some embodiments is shown, such as Figure 11 As shown, the process includes the following steps:
[0122] S1101: Performing a screenshot of the current display interface according to the received screenshot instruction, and obtaining data information corresponding to the current display interface.
[0123] S1102: Determine whether the current display interface has completed (implemented) the steps of the dynamic exchange method. If so, proceed to S1103; if not, proceed to S1105.
[0124] S1103: The input field configured with the preset screenshot privacy protection control in the current display interface is used as the sensitive information input field, and the sub-data information corresponding to the information in the sensitive information input field in the acquired data information corresponding to the current display interface is modified.
[0125] S1104: Generate and display a screenshot image based on the modified data information, that is, take a screenshot using the method with the screenshot protection function in this application.
[0126] S1105: directly generating and displaying a screenshot image based on the acquired data information corresponding to the current display interface, that is, taking a screenshot in a manner without a screenshot protection function in related technologies.
[0127] For ease of understanding, the global addition process provided by this application is explained below through a specific embodiment. Figure 12 A fifth screenshot process diagram provided by some embodiments is shown. Figure 12 As shown, the process includes the following steps:
[0128] S1201: Create a screenshot privacy protection control.
[0129] Among them, you can first create a secure screenshot container SIPCView; then, add the text input box tool UITextField to SIPCView, and set UITextField to the ciphertext display state; then, add the encryption information protection control SIPCContentView to the encryption information protection subcontainer in UITextField to create a screenshot privacy protection control.
[0130] S1202: When it is detected that the display interface is called, traverse all sub-controls contained in the display interface (sub-controls corresponding to all input boxes), add the sub-controls corresponding to all input boxes to the SIPCContentView in the screenshot privacy protection control, and configure the screenshot privacy protection control to the position of each input box, thereby completing (implementing) the steps of the dynamic exchange method.
[0131] S1203: Taking a screenshot of the current display interface of the currently running App according to the received screenshot instruction, and obtaining data information corresponding to the current display interface.
[0132] S1204: Determine whether the current display interface has completed (implemented) the steps of the dynamic exchange method, use the input field in the current display interface that is configured with a preset screenshot privacy protection control as a sensitive information input field, and modify the sub-data information corresponding to the information in the sensitive information input field in the data information corresponding to the current display interface obtained.
[0133] S1205: Generate and display a screenshot image based on the modified data information, that is, take a screenshot using the method with the screenshot protection function in this application.
[0134] For ease of understanding, the global addition process provided by this application is explained below through a specific embodiment. Figure 13 A sixth screenshot process diagram provided by some embodiments is shown. Figure 13 As shown, the process includes the following steps:
[0135] S1301: Create a secure screenshot container SIPCView; add the text input box tool UITextField to SIPCView, and set UITextField to the ciphertext display state; add the encryption information protection control SIPCContentView to the encryption information protection subcontainer in UITextField, thereby completing the configuration (assembly) of the screenshot privacy protection control.
[0136] S1302: Configure the screenshot privacy protection control assembled in step S1301 in the input field of the App display interface.
[0137] The process of configuring the screenshot privacy protection control in the input field of the App display interface may include:
[0138] If a screenshot privacy protection control is added to the input box of a preset field on the App display interface, the sub-control corresponding to the input box of the preset field is added to the screenshot privacy protection control. Alternatively, the process of configuring the screenshot privacy protection control in the input field of the App display interface may also include:
[0139] If the display interface in the App is detected to be called, the sub-controls corresponding to each input field contained in the display interface are added to the screenshot privacy protection control respectively, and the screenshot privacy protection control is configured at the position of each input field contained in the display interface.
[0140] S1303: Perform a screenshot of the current display interface according to the received screenshot instruction, and obtain data information corresponding to the current display interface.
[0141] S1304: Determine whether a preset screenshot privacy protection control is configured in any input field included in the current display interface. If so, determine that the current display interface includes a sensitive information input field.
[0142] S1305: Modify the sub-data information corresponding to the information in the sensitive information input field in the data information.
[0143] S1306: Generate and display a screenshot image based on the modified data information.
[0144] The screenshot method with screenshot protection function in this application has no effect on human-computer interaction operations. After the user triggers the screenshot instruction, the electronic device can perform screenshot processing on the current display interface according to the received screenshot instruction, and the generated screenshot image (screenshot) is a screenshot after processing the sensitive information in the current display interface. Since the screenshot method in this application has no effect on human-computer interaction operations, and only configures the screenshot privacy protection control in the input box in the display interface (only adds a layer of View), there is basically no additional consumption on the performance of electronic devices such as mobile phones. The screenshot method in this application is simple and easy to use, and is basically non-invasive to electronic devices.
[0145] In addition, when a user needs other users to perform agency services, in the agency service mode, if other users need to use the screenshot function of the electronic device, the user's sensitive information will not be saved in the screenshot generated by the electronic device, thereby protecting the security of the user's sensitive information.
[0146] Example 5:
[0147] All implementation methods of the embodiments of this application comply with the relevant provisions of national laws and regulations regarding the acquisition, storage, use, and processing of data.
[0148] Based on the same technical concept, this application provides a screenshot device. Figure 14 A schematic diagram of a screen capture device provided by some embodiments is shown. Figure 14 As shown, the device includes:
[0149] The acquisition module 141 is configured to perform a screenshot process on the current display interface according to the received screenshot instruction, and obtain data information corresponding to the current display interface;
[0150] The screenshot protection module 142 is configured to determine whether the current display interface includes a sensitive information input field, and if so, modify the sub-data information corresponding to the information in the sensitive information input field in the data information;
[0151] The generating module 143 is used to generate and display a screenshot image according to the modified data information.
[0152] In one possible implementation, the screenshot protection module 142 is specifically used to determine whether a preset screenshot privacy protection control is configured in any input field included in the current display interface. If so, it is determined that the current display interface contains a sensitive information input field; if not, it is determined that the current display interface does not contain a sensitive information input field.
[0153] In one possible implementation, the screenshot protection module 142 is specifically configured to add the sub-controls corresponding to each input field contained in the display interface to the screenshot privacy protection control if it monitors that any display interface is called, and configure the screenshot privacy protection control to the position of each input field.
[0154] In a possible implementation, the screenshot protection module 142 is specifically configured to add a sub-control corresponding to the input box of the preset field to the screenshot privacy protection control if the screenshot privacy protection control is added to the input box of the preset field.
[0155] In a possible implementation, the screenshot protection module 142 is specifically configured to create a secure screenshot container;
[0156] Adding a text input box tool to the secure screenshot container and setting the text input box tool to a ciphertext display state; wherein the text input box tool contains an encrypted information protection sub-container;
[0157] Add an encryption information protection control to the encryption information protection sub-container in the text input box tool.
[0158] In a possible implementation, the screenshot protection module 142 is specifically configured to add sub-controls corresponding to each input field included in the display interface to the encrypted information protection control in the screenshot privacy protection control.
[0159] Since the principle of solving the problem by the above-mentioned screenshot device is similar to that of the screenshot method, the implementation of the above-mentioned screenshot device can refer to the implementation of the screenshot method, and the repeated parts will not be repeated.
[0160] Since the present application can take a screenshot of the current display interface according to the received screenshot instruction, obtain the data information corresponding to the current display interface; determine whether the current display interface contains a sensitive information input field, and if so, modify the sub-data information corresponding to the information in the sensitive information input field in the data information; and generate and display a screenshot image based on the modified data information, so that the user's sensitive information will not be displayed in the screenshot obtained by the screenshot, that is, the user's sensitive information will not be saved as a screenshot, thereby protecting the security of the user's sensitive information when the screenshot function of the electronic device is used.
[0161] Example 6:
[0162] All implementation methods of the embodiments of this application comply with the relevant provisions of national laws and regulations regarding the acquisition, storage, use, and processing of data.
[0163] Based on the same technical concept, the present application provides an electronic device, Figure 15 A schematic diagram of the structure of an electronic device provided by some embodiments is shown. Figure 15 As shown, the electronic device includes: a processor 151, a communication interface 152, a memory 153 and a communication bus 154, wherein the processor 151, the communication interface 152, and the memory 153 communicate with each other through the communication bus 154;
[0164] The memory 153 stores a computer program. When the program is executed by the processor 151, the processor 151 performs the following steps:
[0165] Performing a screenshot of the current display interface according to the received screenshot instruction, and obtaining data information corresponding to the current display interface;
[0166] Determine whether the current display interface includes a sensitive information input field, and if so, modify the sub-data information corresponding to the information in the sensitive information input field in the data information;
[0167] Generate and display a screenshot based on the modified data information.
[0168] In a possible implementation, the processor 151 is specifically configured to determine whether the current display interface includes a sensitive information input field, including:
[0169] Determining whether a preset screenshot privacy protection control is configured in any input field included in the current display interface, and if so, determining that the current display interface includes a sensitive information input field;
[0170] If not, it is determined that the current display interface does not include a sensitive information input field.
[0171] In a possible implementation, the processor 151 is specifically configured to configure the screenshot privacy protection control in the input field, including:
[0172] If any display interface is detected to be called, the sub-controls corresponding to each input field contained in the display interface are added to the screenshot privacy protection control respectively, and the screenshot privacy protection control is configured at the position of each input field respectively.
[0173] In a possible implementation, the processor 151 is specifically configured to configure the screenshot privacy protection control in the input field, including:
[0174] If the screenshot privacy protection control is added to the input box of the preset field, the sub-control corresponding to the input box of the preset field is added to the screenshot privacy protection control.
[0175] In a possible implementation, the processor 151 specifically configured to pre-configure the screenshot privacy protection control includes:
[0176] Create a secure screenshot container;
[0177] Adding a text input box tool to the secure screenshot container and setting the text input box tool to a ciphertext display state; wherein the text input box tool contains an encrypted information protection sub-container;
[0178] Add an encryption information protection control to the encryption information protection sub-container in the text input box tool.
[0179] In a possible implementation, the processor 151 is specifically configured to add the sub-controls corresponding to each input field included in the display interface to the screenshot privacy protection control, including:
[0180] The sub-controls corresponding to each input field included in the display interface are respectively added to the encrypted information protection control in the screenshot privacy protection control.
[0181] Since the principle of solving the problem by the above electronic device is similar to the screenshot method, the implementation of the above electronic device can refer to the implementation of the method, and the repeated parts will not be repeated.
[0182] The communication bus mentioned in the electronic device mentioned above may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is used in the figure, but this does not mean that there is only one bus or only one type of bus.
[0183] The communication interface 152 is used for communication between the electronic device and other devices.
[0184] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk memory. Alternatively, the memory may be at least one storage device located away from the processor.
[0185] The above-mentioned processor can be a general-purpose processor, including a central processing unit, a network processor (NP), etc.; it can also be a digital signal processing processor (DSP), an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, etc.
[0186] Since the present application can take a screenshot of the current display interface according to the received screenshot instruction, obtain the data information corresponding to the current display interface; determine whether the current display interface contains a sensitive information input field, and if so, modify the sub-data information corresponding to the information in the sensitive information input field in the data information; and generate and display a screenshot image based on the modified data information, so that the user's sensitive information will not be displayed in the screenshot obtained by the screenshot, that is, the user's sensitive information will not be saved as a screenshot, thereby protecting the security of the user's sensitive information when the screenshot function of the electronic device is used.
[0187] Example 7:
[0188] All implementation methods of the embodiments of this application comply with the relevant provisions of national laws and regulations regarding the acquisition, storage, use, and processing of data.
[0189] Based on the same technical concept, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program executable by an electronic device. When the program is executed on the electronic device, the electronic device implements the following steps:
[0190] Performing a screenshot of the current display interface according to the received screenshot instruction, and obtaining data information corresponding to the current display interface;
[0191] Determine whether the current display interface includes a sensitive information input field, and if so, modify the sub-data information corresponding to the information in the sensitive information input field in the data information;
[0192] Generate and display a screenshot based on the modified data information.
[0193] In a possible implementation, determining whether the current display interface includes a sensitive information input field includes:
[0194] Determining whether a preset screenshot privacy protection control is configured in any input field included in the current display interface, and if so, determining that the current display interface includes a sensitive information input field;
[0195] If not, it is determined that the current display interface does not include a sensitive information input field.
[0196] In one possible implementation, the process of configuring the screenshot privacy protection control in the input field includes:
[0197] If any display interface is detected to be called, the sub-controls corresponding to each input field contained in the display interface are added to the screenshot privacy protection control respectively, and the screenshot privacy protection control is configured at the position of each input field respectively.
[0198] In one possible implementation, the process of configuring the screenshot privacy protection control in the input field includes:
[0199] If the screenshot privacy protection control is added to the input box of the preset field, the sub-control corresponding to the input box of the preset field is added to the screenshot privacy protection control.
[0200] In one possible implementation, the process of pre-configuring the screenshot privacy protection control includes:
[0201] Create a secure screenshot container;
[0202] Adding a text input box tool to the secure screenshot container and setting the text input box tool to a ciphertext display state; wherein the text input box tool contains an encrypted information protection sub-container;
[0203] Add an encryption information protection control to the encryption information protection sub-container in the text input box tool.
[0204] In a possible implementation, adding sub-controls corresponding to each input field included in the display interface to the screenshot privacy protection control includes:
[0205] The sub-controls corresponding to each input field included in the display interface are respectively added to the encrypted information protection control in the screenshot privacy protection control.
[0206] The above-mentioned computer-readable storage medium can be any available medium or data storage device that can be accessed by the processor in the electronic device, including but not limited to magnetic storage such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc., optical storage such as CDs, DVDs, BDs, HVDs, etc., and semiconductor storage such as ROMs, EPROMs, EEPROMs, non-volatile memories (NANDFLASH), solid-state drives (SSDs), etc.
[0207] Since the present application can take a screenshot of the current display interface according to the received screenshot instruction, obtain the data information corresponding to the current display interface; determine whether the current display interface contains a sensitive information input field, and if so, modify the sub-data information corresponding to the information in the sensitive information input field in the data information; and generate and display a screenshot image based on the modified data information, so that the user's sensitive information will not be displayed in the screenshot obtained by the screenshot, that is, the user's sensitive information will not be saved as a screenshot, thereby protecting the security of the user's sensitive information when the screenshot function of the electronic device is used.
[0208] Based on the same technical concept, the present application provides a computer program product, which includes: computer program code, which, when executed on a computer, enables the computer to implement the following steps:
[0209] Performing a screenshot of the current display interface according to the received screenshot instruction, and obtaining data information corresponding to the current display interface;
[0210] Determine whether the current display interface includes a sensitive information input field, and if so, modify the sub-data information corresponding to the information in the sensitive information input field in the data information;
[0211] Generate and display a screenshot based on the modified data information.
[0212] In a possible implementation, determining whether the current display interface includes a sensitive information input field includes:
[0213] Determining whether a preset screenshot privacy protection control is configured in any input field included in the current display interface, and if so, determining that the current display interface includes a sensitive information input field;
[0214] If not, it is determined that the current display interface does not include a sensitive information input field.
[0215] In one possible implementation, the process of configuring the screenshot privacy protection control in the input field includes:
[0216] If any display interface is detected to be called, the sub-controls corresponding to each input field contained in the display interface are added to the screenshot privacy protection control respectively, and the screenshot privacy protection control is configured at the position of each input field respectively.
[0217] In one possible implementation, the process of configuring the screenshot privacy protection control in the input field includes:
[0218] If the screenshot privacy protection control is added to the input box of the preset field, the sub-control corresponding to the input box of the preset field is added to the screenshot privacy protection control.
[0219] In one possible implementation, the process of pre-configuring the screenshot privacy protection control includes:
[0220] Create a secure screenshot container;
[0221] Adding a text input box tool to the secure screenshot container and setting the text input box tool to a ciphertext display state; wherein the text input box tool contains an encrypted information protection sub-container;
[0222] Add an encryption information protection control to the encryption information protection sub-container in the text input box tool.
[0223] In a possible implementation, adding sub-controls corresponding to each input field included in the display interface to the screenshot privacy protection control includes:
[0224] The sub-controls corresponding to each input field included in the display interface are respectively added to the encrypted information protection control in the screenshot privacy protection control.
[0225] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0226] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0227] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0228] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0229] Obviously, those skilled in the art may make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalents, this application is intended to include these modifications and variations.
Claims
1. A screenshot method, characterized in that: The method is applied to an electronic device installed with an iOS system, and the method includes: Performing a screenshot of the current display interface according to the received screenshot instruction, and obtaining data information corresponding to the current display interface; Determining whether a preset screenshot privacy protection control is configured in an input field of any preset field included in the current display interface; if so, determining that the current display interface includes a sensitive information input field, and modifying sub-data information corresponding to the information in the sensitive information input field in the data information; wherein the sub-data information includes empty data information or non-empty data information; Generate and display a screenshot image based on the modified data information; The process of pre-configuring the screenshot privacy protection control in the input field includes: Creating a secure screenshot container, wherein the secure screenshot container is SIPCView developed based on the native system control of the iOS system; Adding a text input box tool of the input bar to the secure screenshot container, and setting the text input box tool to a ciphertext display state; wherein the text input box tool includes a UITextField, and the text input box tool includes an encrypted information protection subcontainer; Add an encrypted information protection control to the encrypted information protection sub-container in the text input box tool, wherein the encrypted information protection control includes SIPCContentView.
2. A screenshot device, characterized in that: The device is applied to an electronic device installed with an iOS system, and the device includes: An acquisition module is used to perform a screenshot process on the current display interface according to the received screenshot instruction, and obtain data information corresponding to the current display interface; a screenshot protection module, configured to determine whether a preset screenshot privacy protection control is configured in an input field of any preset field included in the current display interface; if so, determining that the current display interface includes a sensitive information input field, and modifying sub-data information corresponding to the information in the sensitive information input field in the data information; wherein the sub-data information includes empty data information or non-empty data information; A generation module is used to generate and display a screenshot image based on the modified data information; The screenshot protection module is specifically used to create a secure screenshot container, wherein the secure screenshot container is SIPCView developed based on the native system control of the iOS system; Adding a text input box tool of the input bar to the secure screenshot container, and setting the text input box tool to a ciphertext display state; wherein the text input box tool includes a UITextField, and the text input box tool includes an encrypted information protection subcontainer; Add an encrypted information protection control to the encrypted information protection sub-container in the text input box tool, wherein the encrypted information protection control includes SIPCContentView.
3. An electronic device, characterized in that: The electronic device includes at least a processor and a memory, and the processor is used to implement the steps of a screenshot method as claimed in claim 1 when executing a computer program stored in the memory.
4. A computer-readable storage medium, characterized in that It stores a computer program, which, when executed by a processor, implements the steps of a screenshot method as claimed in claim 1.
5. A computer program product, characterized in that The computer program product includes: computer program code, which, when executed on a computer, enables the computer to execute the steps of the screenshot method according to claim 1.
Citation Information
Patent Citations
Method and device for dynamically protecting user privacies in android systems
CN108491729A