Method for preventing UI screen capture, electronic equipment and storage medium

By creating a method to prevent UI screenshots in the iOS system, and using the system text controls to create a search screenshot/record content protection function, the problem of information leakage in the iOS system is solved, and key information protection is achieved without affecting the user experience.

CN120406803AInactive Publication Date: 2025-08-01FUZHOU CHANGXIN INFORMATION TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510904994.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-02
Publication Date
2025-08-01
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The iOS system lacks a direct anti-screen capture/recording mechanism, resulting in the leakage of key information and the existing preventive screen capture technology affecting the user experience.

Method used

Create a search screenshot/record content protection function through the system text control, remove it from the parent view of the system text control, as a container that requires a leak-proof view, monitor user operations and replace it with an invalid page when the preset conditions are met.

Benefits of technology

It realizes key information protection without affecting users' use of the App, improving user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120406803A_ABST
    Figure CN120406803A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of application software, and provides a method for preventing UI screen capture, electronic equipment and a storage medium, the method comprises the following steps: creating and searching a screen capture / recording content protection function through a system text control, and removing the screen capture / recording content protection function from a parent view of the system text control to serve as a container needing a leak-proof view; monitoring a screen capture and / or screen recording operation of a user, and judging whether a preset screen capture prevention and / or screen recording condition is triggered or not; and when a preset condition is reached, replacing the screenshot and / or recorded screen content with an invalid page through a password mode of the screenshot / recorded content protection function. According to the method, when a user carries out screen capture / screen recording operation, only blank content can be captured / recorded. According to the method and the device, key information / copyright protection is realized, effective contents are prevented from being shielded by the UI popup window, a user can still normally use an APP after screen capture / screen recording, and the user experience is well improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of application software, and particularly to a method, an electronic device, and a storage medium for preventing UI screenshots. Background Art

[0002] Emerging online content such as online novels and short dramas, due to their fast-paced and fragmented characteristics, has greatly enriched people's spare time. Their content going global has also well spread China's excellent culture and promoted the development of the industrial economy. For such content playback software, how to avoid software content being stolen and recorded and conduct copyright protection is of top priority.

[0003] Since the iOS system does not have a direct method to prevent screenshot / screen recording, the design concept of the iOS system is that what the user can see can be obtained, that is, when the user performs a screenshot / screen recording operation, all the content currently visible on the screen will be saved. This easily leads to the leakage or sharing of some key information on the page, affecting the company's revenue. For example, content such as online novel content and video content is screenshot / screen recorded and then shared on the Internet, resulting in information leakage.

[0004] Existing technical solutions for preventing screenshots of such software will, when the user performs a screenshot / screen recording operation, first give a UI prompt to remind of copyright and information protection. When the number of screenshots exceeds a certain number or the screen recording exceeds a certain time, the App usage will be directly restricted, or a UI pop-up window will be used to block the valid content. When adopting the screen recording interface blocking scheme, when screen recording or taking a screenshot, an overlay is added to the content page view to hide the content to be protected, and the content seen by the user is the same as the actual recorded content. This will cause the UI interface to be unable to view the novel or video content normally due to the blocking within a short time after the user takes a screenshot, affecting the user experience. Summary of the Invention

[0005] In order to help improve the problem of the existing anti-screenshot scheme blocking content and affecting the user experience, this application provides a method, an electronic device, and a storage medium for preventing UI screenshots.

[0006] In a first aspect, this application provides a method for preventing UI screenshots, adopting the following technical solution: Create a function for finding screenshot / screen recording content protection through the system text control, remove it from the parent view of the system text control, and use it as the container for the view that needs to prevent leakage; Monitor the user's screenshot and / or screen recording operation, and determine whether a preset anti-screenshot and / or screen recording condition is triggered; When the preset condition is reached, replace the screenshot and / or screen recording content with an invalid page through the password mode of the screenshot / screen recording content protection function.

[0007] By adopting the above technical solution, it not only does not affect the user's continued use of the App, but also achieves the protection effect of information and prevents it from being leaked.

[0008] In a second aspect, the present application provides an electronic device, adopting the following technical solution: An electronic device, the electronic device includes: At least one processor; A memory; At least one application program, wherein at least one application program is stored in the memory and is configured to be executed by at least one processor, and the at least one application program is configured to: execute a method for preventing UI screenshot.

[0009] In a third aspect, the present application provides a computer-readable storage medium, adopting the following technical solution: A computer-readable storage medium, on which a computer program is stored. When the computer program is executed on a computer, the computer is made to execute any one of the methods for preventing UI screenshot provided in the first aspect.

[0010] In summary, the present application includes at least one of the following beneficial technical effects: This method calls the built-in screenshot / recording content protection function of the system through the system text control, and realizes the content protection function of novel and video software. When the user performs a screenshot / recording operation, only blank content will be captured / recorded. While realizing the protection of key information / copyright, it also avoids the effective content being blocked by the UI pop-up window. After the user takes a screenshot / records the screen, the APP can still be used normally, which greatly improves the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] Figure 1 is a flowchart of a method for preventing UI screenshot provided by an embodiment of the present application; Figure 2 is a main structure diagram of the existing iOS UITextField; Figure 3 is a module schematic diagram of a method for preventing UI screenshot provided by an embodiment of the present application; Figure 4 is a module schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0012] In order to make the objectives, technical solutions and advantages of the present application clearer, the following further describes the present application in detail with reference to the Figures 1-4 drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0013] The embodiments of the present application provide a method for preventing UI screenshots, which is used in content reading / viewing software.

[0014] In this embodiment, the e - book reading APP system is taken as an application example to specifically illustrate the above - mentioned method. In actual implementation, the above - mentioned method can also be used in other software systems, such as short - video APPs, computer web pages, etc. This embodiment does not make any limitations in this regard.

[0015] Specifically refer to Figure 1 As shown, a method for preventing UI screenshots includes: S10: Create a screenshot / recording content protection function through the system text control, remove it from the parent view of the system text control, and use it as the container for the view that needs to prevent leakage. S20: Monitor the user's screenshot and / or screen recording operations, and determine whether the preset anti - screenshot and / or screen recording conditions are triggered. S30: When the preset conditions are reached, replace the screenshot and / or screen recording content with an invalid page through the password mode of the screenshot / recording content protection function.

[0016] This solution introduces an anti - screenshot component, breaks through the limitations of the screenshot content of the iOS system, modifies the existing logic, so that when the user triggers the screenshot limit condition, a white screen is directly captured, which not only does not affect the user's continued use of the App, but also achieves the effect of information protection and prevents its leakage.

[0017] Based on this embodiment, further, when this solution is applied to the content interface of reading software or video software in the iOS system, the copyright of the text content in the reading software can be protected through this solution.

[0018] In the solution of this embodiment, specifically, in step S10: Create a search for UITextLayoutCanvasView through the UITextField control, remove it from the UITextField parent view, and use it as the container for the view that needs to prevent leakage.

[0019] On this basis, further, specifically in step S30: When the preset conditions are reached, replace the screenshot and / or screen recording with a blank page through the password mode of UITextLayoutCanvasView.

[0020] In an embodiment of the embodiments of the present invention, when it is detected that the user is performing a screen recording operation, the screen recording result is replaced with a blank page.

[0021] In another embodiment of the embodiments of the present invention, when it is detected that the number of times the user takes screenshots exceeds the preset value, all the screenshot results are replaced with blank pages.

[0022] Of course, the screenshot result can also be replaced with other types of invalid pages, as long as they do not carry online article content or video screenshots, and are not limited to the description in this embodiment.

[0023] Among them, when it is detected that the user performs a screenshot operation for the first time, a copyright information protection prompt, such as "Do not screenshot", etc., is pushed at a position in the UI that does not block the content.

[0024] This method realizes the content protection function of novels and video software. When the user performs a screenshot / screen recording operation, only blank content will be captured / recorded. While realizing the protection of key information / copyright, it also avoids the effective content being blocked by the UI pop-up window, and the user can still use the APP normally after screenshotting / screen recording.

[0025] In another embodiment of the present invention, through the research of the inventor, it is found that the iOS system will protect the content in the password box. When taking a screenshot or screen recording encounters the password box, it will automatically display as blank. That is, when the UITextField control enables the password mode, the content inside cannot be captured. The main structure of UITextField is as shown in the appendix Figure 2 As shown, it mainly includes two sub-views, namely UITouchPassthroughView and UITextLayoutCanvasView. Among them, UITextLayoutCanvasView can play a role in protecting the screenshot content in the password mode.

[0026] Since Apple does not provide a method for creating UITextLayoutCanvasView, but provides the creation of UITextField. In actual use of this method, UITextLayoutCanvasView is found through the creation of the UITextField control, and it is removed from the parent view of UITextField and used as the container of the view that we need to prevent leakage, as shown in Figure 3 As shown, so as to achieve effective information protection without affecting Apple's review. After using the UITextLayoutCanvasView control, when the user performs a screenshot / screen recording operation again, only blank content will be captured / recorded. At the same time, in this embodiment, a friendly UI prompt can be added to inform the user that blank content is obtained due to key information / copyright protection. Through the above solutions, it is possible to neither affect the user's continued use of the App nor achieve the purpose of information protection and prevention of leakage.

[0027] The embodiment of this application also provides an electronic device, as shown in Figure 4 shown, Figure 4The electronic device 700 shown includes: a processor 701 and a memory 703. Among them, the processor 701 and the memory 703 are connected, such as through a bus 702. Optionally, the electronic device 700 may further include a transceiver 704. It should be noted that in practical applications, the transceiver 704 is not limited to one, and the structure of the electronic device 700 does not constitute a limitation to the embodiments of the present application.

[0028] The processor 701 can be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute various exemplary logical blocks, modules, and circuits described in combination with the disclosure of the present application. The processor 701 can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.

[0029] The bus 702 may include a path for transmitting information between the above components. The bus 702 can be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The bus 702 can be divided into an address bus, a data bus, etc. For the sake of representation, Figure 4 only a thick line is used to represent it in the figure, but it does not mean that there is only one bus or one type of bus.

[0030] The memory 703 can be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or it can also be an EEPROM (Electrically Erasable Programmable Read Only Memory), a magnetic disk storage medium, or other magnetic storage devices, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.

[0031] The memory 703 is used to store the application program code for implementing the solution of this application, and is controlled by the processor 701 to execute. The processor 701 is used to execute the application program code stored in the memory 703 to implement the content shown in the foregoing method embodiments.

[0032] Among them, the electronic device includes but is not limited to: mobile terminals such as mobile phones, laptop computers, PDAs (Personal Digital Assistants), PADs (Tablet Computers), etc. and fixed terminals such as digital TVs, desktop computers, etc. It can also be a server, etc. Figure 4 The electronic device shown is only an example and should not impose any limitations on the functions and usage scope of the embodiments of this application.

[0033] The embodiments of this application also provide a computer-readable storage medium, on which a computer program is stored. When the computer program is executed on a computer, the computer is made to execute the method for preventing UI screenshot provided in the foregoing embodiments.

[0034] It should be understood that although the steps in the flowchart of the accompanying drawings are shown in sequence according to the indication of the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps has no strict order limit and can be executed in other orders.

[0035] The above are only some implementation manners of this application. It should be noted that for those of ordinary skill in the art, without departing from the principle of this application, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of this application.

Claims

1. A method for preventing UI screenshots, characterized in that, The method includes: S10: Create a function for finding screenshot / screen recording content protection through a system text control, remove it from the parent view of the system text control, and use it as a container for the view that needs to prevent leakage. S20: Monitor the user's screenshot and / or screen recording operations, and determine whether a preset anti-screenshot and / or anti-screen recording condition is triggered. S30: When the preset condition is reached, replace the screenshot and / or screen recording content with an invalid page through the password mode of the screenshot / screen recording content protection function.

2. The method for preventing UI screenshots according to claim 1, characterized in that, It is applied to the content interface of a reading software or a video software on the iOS system.

3. The method for preventing UI screen capture according to claim 2, wherein, In step S10: Find the UITextLayoutCanvasView through the creation of a UITextField control, remove it from the UITextField parent view, and use it as a container for the view that needs to prevent leakage.

4. The method for preventing UI screenshot according to claim 3, characterized in that, In step S30: When the preset condition is reached, replace the screenshot and / or screen recording with a blank page through the password mode of the UITextLayoutCanvasView.

5. The method for preventing UI screen capture according to claim 1, wherein When a user's screen recording operation is detected, replace the screen recording result with a blank page.

6. The method for preventing UI screen capture according to claim 1, wherein, When the number of times of the user's screenshot operation exceeds a preset value, replace all the screenshot results with blank pages.

7. The method for preventing UI screenshots according to claim 1, wherein When the user's first screenshot operation is monitored, push a copyright information protection prompt at a position on the UI that does not block the content.

8. An electronic device, characterized in that, The electronic device includes: At least one processor; A memory; At least one application program, where at least one application program is stored in the memory and is configured to be executed by at least one processor, and the at least one application program is configured to: execute the method for preventing UI screenshot according to any one of claims 1 to 7.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed on a computer, cause the computer to execute the method for preventing UI screenshot according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Screenshot control method of terminal equipment, terminal equipment and storage medium

    CN111258697A

  • Screen capturing device and screen capturing method of touch screen equipment

    CN112230830A

  • Application protection method and device, equipment and medium

    CN115357889A

  • Image processing method and apparatus, electronic device, and storage medium

    WO2020244068A1