Screen capture prevention method and system, electronic equipment and storage medium

By dynamically generating replacement images to cover the displayed content on the user's terminal, the problem of illegal dissemination of copyrighted content caused by screenshots or screen recordings that cannot be actively blocked in existing technologies is solved. This achieves zero-latency, seamless anti-screenshot protection, taking into account both user experience and copyright protection.

CN121502837APending Publication Date: 2026-02-10GUANGZHOU HUYA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511474655.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-15
Publication Date
2026-02-10

AI Technical Summary

Technical Problem

Existing technologies cannot effectively prevent the illegal dissemination of copyrighted content before users trigger screenshots or screen recordings, and traditional screen recording detection mechanisms and watermarking solutions have problems such as lag or interference with user experience.

Method used

By acquiring user tags and currently displayed content, a customized replacement image is dynamically generated and overlaid on the user's terminal screen in real time to replace the original content, achieving zero-latency anti-screenshot protection.

Benefits of technology

It achieves proactive protection of copyrighted content without the user's awareness, blocks illegal dissemination paths, and at the same time takes into account the needs of content promotion, improving the concealment and timeliness of security protection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121502837A_ABST
    Figure CN121502837A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of application software, in particular to a method and system for preventing screen capture, electronic equipment and a storage medium, and is applied to a user terminal. The method comprises the steps of obtaining a user tag of a user on a platform and current display content of the user on the platform; according to the user tag and the current display content, judging whether an anti-screenshot function is started or not, if yes, obtaining template information and self-defined information according to the current display content, and generating a replacement picture according to the template information and the self-defined information; when it is determined that the user triggers a screen capture function, covering the current display content with the replacement picture as screen capture content, and displaying the screen capture content to the user; the method is used for preventing illegal content leakage caused by user screenshot or screen recording and protecting the copyright of the content.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of application software, more particularly, to a method and system for preventing screen capture, an electronic device and a storage medium. BACKGROUND

[0002] In the prior art, the screen capture operation in the platform includes screenshot and screen recording operation. The screenshot refers to the operation of capturing the application picture in the screen through the function of the user device, and the screen recording refers to the process of recording the dynamic display content of the application on the screen. Users usually perform screenshot and / or screen recording operation for the purpose of recording important information, sharing wonderful clips or retaining evidence, etc. However, if it involves specific user exclusive content set by the platform, the screenshot or screen recording behavior may lead to illegal dissemination of copyright content, and therefore protective measures need to be taken. Currently, there is a screen overlay technology in the industry that can automatically replace the copyright content or sensitive content with a black screen or a white screen when the user triggers the screenshot / screen recording. However, there are still obvious limitations, such as using traditional screen recording detection mechanism to only achieve post-alarm through device-level notification, which cannot actively block before the content is leaked. The scheme of adding visible watermark in the normal viewing picture can trace the source, but it is easy to be invalid due to cropping or blurring processing, and the watermark superposition also interferes with the normal user's normal viewing experience of the live picture. SUMMARY

[0003] The present application provides a method and system for preventing screen capture, an electronic device and a storage medium, which are used to prevent illegal leakage of content caused by user screenshot or screen recording and protect the copyright of the content.

[0004] According to a first aspect of the present application, a method for preventing screen capture is provided, which is applied to a user terminal, and the method comprises: obtaining the user label of a user in a platform and the current display content of the user on the platform; determining whether to start the anti-screen capture function according to the user label and the current display content, if yes, obtaining template information and custom information according to the current display content, and generating a replacement picture according to the template information and the custom information; when it is determined that the user triggers the screen capture function, covering the current display content with the replacement picture as the screen capture content, and displaying the replacement picture to the user.

[0005] Understandably, by dynamically identifying user tags and currently displayed content, the system determines the content that needs protection and instantly generates a customized replacement image adapted to the terminal. When the user triggers a screenshot, the system seamlessly overwrites the original content with a pre-set replacement image containing template and custom information with zero latency. This proactively protects sensitive information such as displayed content and copyrighted materials without the user's awareness, effectively blocking illegal dissemination paths while also accommodating content promotion needs through the template and custom information in the replacement image, thus achieving a balance between security and user experience.

[0006] Optionally, the user tags include non-member user tags and member user tags, and the displayed content includes non-member display content and member display content; The step of determining whether to enable the anti-screenshot function based on the user tag and the currently displayed content includes: The system determines whether the user tag is a non-member user tag or a member user tag. If the user tag is a non-member user tag, the anti-screenshot function is not enabled. If the user tag is a member user tag, the system determines whether the currently displayed content is non-member content or member content. If the currently displayed content is non-member content, the anti-screenshot function is not enabled. If the currently displayed content is member content, the anti-screenshot function is enabled.

[0007] Understandably, by constructing a dual-dimensional judgment mechanism based on user tags and currently displayed content, the anti-screenshot function is automatically activated only for scenarios where member users access member-displayed content. By accurately identifying user identity attributes and content levels, while ensuring normal use for non-member users, targeted protection is implemented for specific member-displayed content, effectively avoiding the risk of unauthorized dissemination and achieving refined content permission management. This maintains the commercial value of member-displayed content while avoiding excessive intervention in non-member-displayed content, forming an intelligent protection system that balances user experience and copyright protection.

[0008] Optionally, the currently displayed content includes several content types; Based on the currently displayed content, template information is obtained, including: Pre-store template information for each of the content types; Obtain the content type corresponding to the currently displayed content; Based on the content type corresponding to the currently displayed content, retrieve the template information corresponding to the currently displayed content from the stored template information.

[0009] Understandably, by pre-storing standardized template information for each content type and combining it with a real-time content type recognition mechanism, it is possible to accurately match and quickly retrieve template information that matches the currently displayed content, thereby achieving flexible adaptation to diverse content types. This not only ensures the differentiated processing needs of different content types but also improves system response efficiency through structured data storage, providing reliable basic data support for the subsequent generation of personalized replacement images.

[0010] Optionally, the content type includes one or more of text content types, image content types, and video content types.

[0011] Understandably, through a broad adaptation mechanism covering various content types such as text, images, and videos, it achieves accurate identification and differentiated processing of display content of different types. Whether it is a plain text page, a static image, or a dynamic video stream, it can automatically match the template information and custom information of the corresponding replacement image based on the content characteristics, which significantly enhances the compatibility and universality of the anti-screenshot function in complex scenarios and provides unified and efficient technical support for the copyright protection of multiple types of display content.

[0012] Optionally, the template information includes one or more of background template information, slogan template information, and prompt template information.

[0013] Understandably, by integrating diverse elements such as background template information, slogan template information, and prompt template information, a replacement image generation system with rich visual layers and functional orientation is constructed. It can flexibly combine template information modules according to different needs. While achieving the protection of displayed content, through professional background rendering, eye-catching slogan insertion, and clear operation prompts, the replacement image has both brand recognition and interactive guidance, effectively improving the practicality and communication value of the anti-screenshot function.

[0014] Optionally, the customized information includes one or more of the following: introduction information, source information, and interaction information; Custom information is obtained based on the currently displayed content, including: For each content type, a corresponding rule for generating the description information is set for the description information, a corresponding rule for generating the source information is set for the source information, and a corresponding rule for generating the interaction information is set for the interaction information. The description information is generated based on the currently displayed content and the corresponding description information generation rules; the source information is generated based on the currently displayed content and the corresponding source information generation rules; the interaction information is generated based on the currently displayed content and the corresponding interaction information generation rules.

[0015] Understandably, by deeply analyzing the characteristics of the currently displayed content and the rules for generating introduction information, source information, and interactive information, the system intelligently extracts and dynamically generates multi-dimensional custom information, including introduction information, source information, and interactive information. This enables the replacement image to not only have basic protection functions but also carry content data and associated guidance value. While blocking the risk of screenshot dissemination, it effectively strengthens copyright protection through accurate content summary presentation and resource traceability labeling, and provides scalable data interfaces for subsequent user interaction, achieving the dual effectiveness of security protection and operational value-added services.

[0016] Optionally, generating a replacement image based on the template information and the custom information includes: Several versions of base images are generated. The base images are set with template information display area and custom information display area. Each version of the base image corresponds to the user terminal model and user terminal screen ratio used to display the currently displayed content. Obtain the user's terminal model and screen ratio; Based on the user's terminal model and screen ratio, obtain the base image for the corresponding version; The corresponding version of the base image is populated with information, wherein the template information is filled into the template information display area, and the custom information is filled into the custom information display area, to obtain the replacement image.

[0017] Understandably, by pre-constructing multiple versions of basic images that strictly correspond to various user terminal models and screen ratios, and by pre-setting the display areas of template information and custom information in each version of basic images, and by combining real-time obtained user terminal parameters for precise matching, dynamic adaptive generation of replacement images is achieved. This ensures that the replacement screen presented when screenshots are taken from different user terminals can perfectly adapt to the device characteristics. While ensuring the effectiveness of content protection, it maintains the standardized layout and visual consistency of interface elements, significantly improving the compatibility of cross-platform protection and user experience.

[0018] According to a second aspect of this application, a system for preventing screenshots is provided, applied to a user terminal, the system comprising: The acquisition module is used to acquire the user's user tags on the platform and the user's current displayed content on the platform; The replacement image generation module is used to determine whether the anti-screenshot function is enabled based on the user tag and the currently displayed content. If so, it obtains template information and custom information based on the currently displayed content, and generates a replacement image based on the template information and the custom information. The screenshot prevention module is used to overlay the currently displayed content with the replacement image as the screenshot content and display it to the user when it is determined that the user has triggered the screenshot function.

[0019] According to a third aspect of this application, an electronic device is provided, comprising: Memory, used to store one or more computer programs; A processor, when the one or more computer programs are executed by the processor, implements the method for preventing screenshots described in the first aspect above.

[0020] According to a fourth aspect of this application, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the method for preventing screenshots described in the first aspect above.

[0021] Based on any of the above aspects, embodiments of this application provide a method, system, electronic device, and storage medium for preventing screenshots. The method involves obtaining a user's user tag on a platform and the user's currently displayed content on the platform; determining whether to enable the anti-screenshot function based on the user tag and the currently displayed content; if so, obtaining template information and custom information based on the currently displayed content, and generating a replacement image based on the template information and the custom information; when it is determined that the user has triggered the screenshot function, using the replacement image as the screenshot content to overlay the currently displayed content and displaying it to the user. This application achieves the following benefits: • Seamless Screenshot Content Replacement: By enabling the anti-screenshot function, real-time intervention in screenshot actions is achieved. When a user triggers a screenshot, a customized replacement image seamlessly overwrites the currently displayed content, requiring no user intervention or waiting. Since the replacement process is completed synchronously with the screenshot action, zero-latency protection is achieved, and the user is completely unaware of the difference. This avoids the lag of traditional post-event detection and the audit risks associated with relying on private interfaces for replacement. It enables precise control over screenshot output without affecting normal viewing or other interactions with the currently displayed content, significantly improving the concealment and timeliness of the security protection for the currently displayed content.

[0022] • Protecting Member-Exclusive Content: For members' exclusive content, the solution employs a dual-judgment process, checking user tags and content type to accurately identify the currently displayed content requiring protection. The anti-screenshot function is activated only for members' exclusive content. When a screenshot is detected, the current displayed content is automatically replaced with a preset replacement image, effectively blocking the illegal spread of the currently displayed content. This design balances content rights protection with user experience, ensuring the confidentiality of members' exclusive content while avoiding unnecessary interference with non-members' content or non-members, thus meeting the platform's tiered management requirements.

[0023] The replacement image contains relevant information about the displayed content and serves a recommendation function: Instead of simply obscuring it, the replacement image is dynamically generated based on the characteristics of the currently displayed content, containing composite materials including template information and custom information. It also adapts to different user terminal models and screen ratios using multiple versions of the base image, ensuring a high degree of integration between the visual effect of the replacement image and the currently displayed content. This design not only hides the currently displayed content but also transforms the replacement image into a carrier for recommending the currently displayed content, such as displaying related works, creator information, or interactive entry points. This protects copyright while guiding traffic, giving the anti-screenshot function additional operational value. Attached Figure Description

[0024] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0025] Figure 1 This is a flowchart of a method for preventing screenshots provided in this embodiment.

[0026] Figure 2 This is a flowchart for obtaining template information provided in this embodiment.

[0027] Figure 3 This is a flowchart for generating a replacement image provided in this embodiment.

[0028] Figure 4 This is a schematic diagram of the functional modules of a system for preventing screenshots provided in this embodiment.

[0029] Figure 5 This is a schematic diagram of the structure of the electronic device provided in this embodiment. Detailed Implementation

[0030] The accompanying drawings are for illustrative purposes only and should not be construed as limiting the scope of this application. To better illustrate the following embodiments, some components in the drawings may be omitted, enlarged, or reduced, and do not represent the actual dimensions of the product; it is understandable to those skilled in the art that some well-known structures and their descriptions may be omitted in the drawings.

[0031] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0032] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0033] Existing technologies for preventing user screenshots and screen recordings have significant shortcomings. Traditional screen recording detection mechanisms based on system-built-in events can only issue pop-up alerts after a screenshot occurs, lacking real-time blocking capabilities, which allows copyrighted or sensitive content to be captured and disseminated. While digital watermarking can trace the source of information, the watermark is easily damaged by cropping or blurring, and the superimposed visual elements can severely interfere with normal content display, especially in video scenarios, significantly reducing image clarity and viewing smoothness. Neither of these mainstream solutions can balance content security and user experience, making it difficult to effectively curb the illegal dissemination of specific content or copyrighted materials.

[0034] This embodiment provides a technical solution that can solve the above problems. The specific implementation of this application will be described in detail below with reference to the accompanying drawings.

[0035] like Figure 1 As shown, this embodiment provides a method for preventing screenshots, applied to a user terminal. The method can be further divided into the following steps: S100: Obtain the user's user tag on the platform and the user's current displayed content on the platform; Understandably, the user terminal refers to an electronic device that allows users to directly operate and interact with the platform. It is capable of displaying content on the platform, receiving user input commands, and executing corresponding program logic. Such user terminals typically possess basic modules such as screen display, touch / keyboard input, and network communication, serving as the interaction medium between the user and the digital service platform. For example, a user terminal can be a smartphone, tablet, personal computer (including desktops and laptops), smart TV, or in-vehicle infotainment system. These devices enable users to access the platform and display content by accessing specific web pages and / or installing and running specific software, thus becoming the physical carrier for the anti-screenshot function.

[0036] In this embodiment, the platform can disseminate specific display content, including but not limited to diverse digital content carriers of entertainment and culture types. The user is a platform user who has completed the platform registration process and has a user binding relationship. The user tag is a differentiated identifier assigned by the platform based on the user's account attributes; according to each user's user account attributes and / or behavioral characteristics and / or business rules on the platform, the user tag corresponding to the user can be determined, and the platform can assign a user tag to each user. The currently displayed content is the specific display content of the platform rendered in real time on the screen corresponding to the user's user terminal. This display content is directly related to the user's current browsing status, operation status, and device display parameters on the platform.

[0037] Specifically, the user tags include non-member user tags and member user tags, and the displayed content includes non-member display content and member display content; In this embodiment, user tags can be determined based on a user's account attributes on the platform. The non-member user tags and member user tags are preset user levels. Different user levels can be set according to the user's permissions on the platform, thereby classifying users into non-member users and member users, and thus assigning corresponding user tags to each user. For example, if a user pays to upgrade their account attributes on the platform, increasing their access to displayed content, then the user will be labeled a member user; otherwise, if the user accesses the platform as a guest or registers but does not pay to upgrade their account attributes, and only has access to limited displayed content, then the user will be labeled a non-member user.

[0038] In this embodiment, the displayed content includes non-member displayed content and member displayed content. Users with the member user tag have access to both non-member displayed content and member displayed content, while users with the non-member user tag only have access to non-member displayed content.

[0039] The step of determining whether to enable the anti-screenshot function based on the user tag and the currently displayed content includes: The system determines whether the user tag is a non-member user tag or a member user tag. If the user tag is a non-member user tag, the anti-screenshot function is not enabled. If the user tag is a member user tag, the system determines whether the currently displayed content is non-member content or member content. If the currently displayed content is non-member content, the anti-screenshot function is not enabled. If the currently displayed content is member content, the anti-screenshot function is enabled.

[0040] Understandably, non-member-displayed content is generally non-sensitive and publicly disseminated digital content. Users accessing the platform, regardless of whether they are ordinary or advanced users, can access and view this content. Member-displayed content, on the other hand, is generally high-value, core resources with significant copyright interests. Due to its higher commercial value, member-displayed content requires greater protection to prevent illegal dissemination. In this embodiment, by enabling anti-screenshot functionality for member-displayed content, the copyright of this content can be protected to a certain extent, reducing the avenues for its illegal dissemination.

[0041] In this embodiment, when the user's user tag is a non-member user tag, the user can only access non-member displayed content and cannot access member displayed content. In this case, it is not necessary to enable the anti-screenshot function to protect the non-member displayed content. When the user's user tag is a member user tag, if the user is currently accessing non-member displayed content, it is also not necessary to enable the anti-screenshot function to protect the non-member displayed content. Screenshot protection for member displayed content is only required when the user accesses and views the member displayed content on the platform. Therefore, the anti-screenshot function is only enabled when the user tag is a member user tag and the currently displayed content is member displayed content.

[0042] S200: Determine whether to enable the anti-screenshot function based on the user tag and the currently displayed content. If so, obtain template information and custom information based on the currently displayed content, and generate a replacement image based on the template information and the custom information. Understandably, when the anti-screenshot function is enabled, it is necessary to protect the currently displayed content, i.e., the member's displayed content, when the user triggers the screenshot function, to prevent the user from leaking the member's displayed content through screenshots. In this embodiment, the protection effect is achieved by generating a replacement image to overwrite the currently displayed content.

[0043] In this embodiment, the template information and custom information of the currently displayed content are obtained as information materials for generating the replacement image, thereby enriching the content of the replacement image and improving the user's viewing experience while protecting the currently displayed content.

[0044] Specifically, the currently displayed content includes several content types; The content types include one or more of the following: text content types, image content types, and video content types.

[0045] In this embodiment, a unified and efficient anti-screenshot effect can be achieved for the currently displayed content of different content types. The content types include one or more of text content, image content, and video content. The currently displayed content belonging to the text content type can include academic papers, operation guide articles, etc.; the currently displayed content belonging to the image content type can include static images, dynamic images, etc.; and the currently displayed content belonging to the video content type can include live video content, recorded video content, etc.

[0046] Specifically, such as Figure 2 As shown, obtaining template information based on the currently displayed content may include the following steps: S211. Pre-store template information for each of the content types; Understandably, because the presentation of the currently displayed content varies for each content type, the template information required to replace the image will also differ. In this embodiment, template information for each content type is pre-stored. Preferably, the template information for each content type is uniformly stored in a template information database. When it is necessary to obtain the template information corresponding to the currently displayed content, it can be directly obtained from the template information database, thereby improving the efficiency of template information retrieval and standardizing the template information.

[0047] Specifically, the template information includes one or more of the following: background template information, slogan template information, and prompt template information.

[0048] In this embodiment, the template information may include one or more of background template information, slogan template information, and prompt template information, used to reflect the basic prompt information for replacing the image. For example, if the currently displayed content is a video, specifically a live video, the corresponding obtained background template information can be a preset background color, such as light purple; the corresponding obtained slogan template information can be "Invite your friends to watch the game and support your favorite team in the live stream!"; and the corresponding obtained prompt template information can be "This video is for members only and screen recording / screenshots are not currently supported." If the currently displayed content is text, specifically academic paper content, the corresponding obtained background template information can be a preset background color, such as light blue; the corresponding obtained slogan template information can be "Invite your friends to read the software and explore the mysteries of the paper!"; and the corresponding obtained prompt template information can be "This text is for members only and screen recording / screenshots are not currently supported." It is understood that the above template information can be adjusted appropriately according to the actual situation, and will not be elaborated further here.

[0049] S212. Obtain the content type corresponding to the currently displayed content; In this embodiment, after enabling the anti-screenshot function, a replacement image needs to be generated in advance to protect the displayed content when a user with a member user tag takes a screenshot of the member's content. Since the replacement image will vary depending on the content type, it is necessary to first obtain the content type corresponding to the currently displayed content to provide basic data support for generating the corresponding replacement image.

[0050] S213. Based on the content type corresponding to the currently displayed content, obtain the template information corresponding to the currently displayed content from the stored template information.

[0051] In this embodiment, the template information corresponding to the currently displayed content is different for different content types. Therefore, it is necessary to obtain the template information corresponding to the currently displayed content from the template information stored in the template information database according to the content type corresponding to the currently displayed content, so that the obtained template information matches the currently displayed content.

[0052] Specifically, the custom information includes one or more of the following: introduction information, source information, and interaction information; Custom information is obtained based on the currently displayed content, including: For each content type, a corresponding rule for generating the description information is set for the description information, a corresponding rule for generating the source information is set for the source information, and a corresponding rule for generating the interaction information is set for the interaction information. The description information is generated based on the currently displayed content and the corresponding description information generation rules; the source information is generated based on the currently displayed content and the corresponding source information generation rules; the interaction information is generated based on the currently displayed content and the corresponding interaction information generation rules.

[0053] In this embodiment, the custom information includes one or more of the following: brief description, source information, and interactive information. These are used to provide customized information for the currently displayed content, enhancing the user experience and viewing experience. The brief description provides a simple overview of the basic characteristics of the currently displayed content, allowing other users to gain some understanding of the content after seeing the brief description of the replacement image. The source information provides the specific origin and / or viewing platform and / or author information of the currently displayed content, providing users who see the replacement image with more relevant information about the content, enabling them to trace its origin and increasing the traceability of the replacement image. The interactive information provides the conditions and channels for viewing the currently displayed content, specifically interactive links guiding users to view the content, including but not limited to methods for upgrading user conditions to view the content.

[0054] For example, if the currently displayed content is a video type, specifically a live video, then the description information in the customization can be the video cover of the live room, the source information can be the live room title, live room number, live popularity value, streamer nickname, etc.; the interaction information can be a link QR code image for users who have upgraded to the VIP user tag, etc.

[0055] It is understandable that the methods for obtaining custom information for each content type are different, and therefore the rules for generating custom information also differ. In this embodiment, it is necessary to pre-set custom information generation rules: setting corresponding rules for introduction information, source information, and interaction information; thereby enabling efficient acquisition of the corresponding custom information. For example, if the currently displayed content is a video type, specifically a live video, then the introduction information in the customization can be generated by the live information service according to the corresponding introduction information generation rules, for example, extracting a frame from the live video as the video cover; the source information in the customization can be generated by the live information service according to the corresponding source information generation rules, for example, obtaining the live video title, live room number, and streamer nickname, and calculating the live video popularity value as the corresponding source information; the interaction information in the customization can be generated by the live information service according to the corresponding interaction information generation rules, for example, obtaining the live video playback link and the advanced channel for upgrading to an advanced tag user, and generating a corresponding interactive QR code image as the corresponding interaction information.

[0056] Specifically, such as Figure 3 As shown, generating a replacement image based on the template information and the custom information may include the following steps: S221. Generate several versions of basic images, wherein a template information display area and a custom information display area are set on the basic images, wherein each version of the basic image corresponds to the user terminal model and the user terminal screen ratio used to display the currently displayed content; Understandably, the base image serves as a prototype for the replacement image. It has a pre-defined template information display area and a custom information display area, allowing the template information and custom information obtained in the above steps to be directly filled into the corresponding positions of the base image. This enables the rapid generation of the corresponding replacement image, improves the efficiency of generating replacement images, and standardizes the specifications of the replacement images.

[0057] In this embodiment, the corresponding versions of the base image are different for different user terminal models and screen ratios, so that the base image can be adapted to the user terminal model and screen ratio, resulting in a better display effect of the final replacement image.

[0058] S222. Obtain the user's terminal model and user terminal screen ratio; Understandably, users browsing the platform's content use different user terminal models, resulting in varying image formats for optimal display. For example, a single brand might produce many different terminal models, and these terminals themselves may be manufactured by various brands, adhering to different screen specifications and standards. Furthermore, users' screen ratios differ; they may choose landscape, portrait, or projection screens. The aspect ratios for these screens vary, thus requiring different image formats for optimal display. Therefore, obtaining the user's terminal model and screen ratio is necessary to provide a data foundation for generating the best-performing replacement image.

[0059] S223. Obtain the basic image of the corresponding version based on the user's user terminal model and user terminal screen ratio; Understandably, to adapt to different user terminal models and screen ratios, and to ensure the best display effect of the replacement image on the corresponding user terminal model and screen ratio, the layout of the base image is adjusted according to different user terminal models and screen ratios. That is, the template information display area and the custom information display area in the base image need to be planned according to different user terminal models and screen ratios to ensure compatibility with the user's terminal. In this embodiment, for different user terminal models and screen ratios, there are pre-set base image versions corresponding to them. This allows the application to directly obtain the corresponding version of the base image based on the obtained user terminal model and screen ratio, improving processing efficiency.

[0060] In this embodiment, a base image corresponding to the user terminal model and the user terminal screen ratio is obtained according to the user terminal model and the user terminal screen ratio. A replacement image is generated based on the base image so that the replacement image displays best when displayed on a user terminal of the user terminal model at that screen ratio.

[0061] S224. Fill the information of the base image of the corresponding version, wherein the template information is filled into the template information display area and the custom information is filled into the custom information display area to obtain the replacement image.

[0062] S300. When it is determined that the user has triggered the screenshot function, the replacement image is used as the screenshot content to cover the currently displayed content and displayed to the user.

[0063] In this embodiment, when the user triggers the screenshot function, the currently displayed content needs to be protected. The generated replacement image can cover the currently displayed content, so that when the user takes a screenshot, only the replacement image is captured as the screenshot content. That is, only the replacement image is displayed on the user's terminal screen, thereby achieving anti-screenshot protection for the currently displayed content, while simultaneously allowing the replacement image to be used to continue promoting the currently displayed content. For example, this application can be applied to a user terminal. Specifically, after enabling the anti-screenshot function, the currently displayed content can be placed in a preset protection view for display, while a replacement image is generated according to the above steps. It is understood that the replacement image is placed on top of the protection view; that is, during rendering, the replacement image always takes precedence over the protection view in image output, so that the final visual effect presented on the user's terminal screen is that the replacement image completely covers the protection view. At this time, if the user performs a screenshot operation, the underlying screenshot interface can only collect the image data of the layer where the replacement image is located, while the currently displayed content in the protection view, because it is obscured by the upper-layer replacement image, will not appear in the screenshot result. This layered rendering mechanism dynamically masks the currently displayed content by controlling the order in which views are stacked, while maintaining the normal interactive experience of the user interface.

[0064] After the screenshot action ends, the replacement image will be hidden, and the user's terminal screen can display the current content of the protected view normally without affecting the user's normal viewing. This achieves the effect of protecting the current display content and realizing a seamless user experience.

[0065] like Figure 4 As shown in the illustration, this application also provides a system for preventing screenshots. Optionally, the system includes: The acquisition module 411, the image generation module 412, and the screenshot prevention module 413 are included, wherein: The acquisition module 411 is used to acquire the user's user tag on the platform and the user's current display content on the platform; In this embodiment, the acquisition module 411 can be used to perform... Figure 1 For a detailed description of the acquisition module 411, please refer to the description of step S100 shown.

[0066] The replacement image generation module 412 is used to determine whether the anti-screenshot function is enabled based on the user tag and the currently displayed content. If so, it obtains template information and custom information based on the currently displayed content, and generates a replacement image based on the template information and the custom information. In this embodiment, the replacement image generation module 412 can be used to perform... Figure 1For a detailed description of step S200, the replacement image generation module 412 can be found in the description of step S200.

[0067] The screenshot prevention module 413 is used to overlay the currently displayed content with the replacement image as the screenshot content and display it to the user when it is determined that the user has triggered the screenshot function.

[0068] In this embodiment, the anti-screenshot module 413 can be used to perform... Figure 1 For a detailed description of the anti-screenshot module 413, please refer to the description of step S300 shown.

[0069] This application also provides an electronic device, the structure of which is as follows: Figure 5 As shown, the electronic device includes a memory 511, a processor 512, a communication module 513, and an input / output interface 514, etc. Optionally, the memory 511, the processor 512, the communication module 513, and the input / output interface 514 can be connected and communicate with each other through a bus 515.

[0070] The memory 511 is used to store one or more computer programs and to transfer the code of the computer programs to the processor 512; when the one or more computer programs are executed by the processor 512, a method for preventing screenshots in this embodiment of the application is implemented.

[0071] Optionally, the electronic device can be connected to a network via communication module 513 to exchange data with other devices, such as terminals or servers, through communication over the network. The electronic device can be various forms of digital computers, exemplarily such as desktop computers, servers, workbenches, mainframes, or other types of computers. The electronic device can also be various forms of mobile terminals, exemplarily such as smartphones, tablets, wearable devices (such as helmets, glasses, watches, etc.), and other similar mobile terminals.

[0072] Optionally, the electronic device can connect to desired input / output devices, such as a keyboard or display device, via the input / output interface 514. The electronic device itself may have a display device, and other display devices can also be connected externally via the input / output interface 514. Optionally, a storage device, such as a hard disk, can also be connected via the input / output interface 514 to store data from the electronic device, read data from the storage device, or store data from the storage device in the memory 511. It is understood that the input / output interface 514 can be a wired interface or a wireless interface. Depending on the actual application scenario, the device connected to the input / output interface 514 can be a component of the electronic device or an external device connected to the electronic device when needed.

[0073] Optionally, the memory 511 may be a volatile memory and / or a non-volatile memory. The volatile memory may be a random access memory, etc., and the non-volatile memory may be a read-only memory, a programmable read-only memory, an erasable programmable read-only memory, an electrically erasable programmable read-only memory, or a flash memory, etc.

[0074] Optionally, the computer program stored in the memory 511 can be divided into one or more modules, which are stored in the memory 511 and executed by the processor 512 to perform the method provided in this embodiment. The one or more modules can be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of the computer program in the electronic device.

[0075] Optionally, the processor 512 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the processor 512 include, but are not limited to, a central processing unit, a graphics processing unit, a digital signal processor, various special-purpose artificial intelligence computing chips, various processors running machine learning model algorithms, and can also be any suitable controller, microcontroller, processor, etc. The processor 512 executes the various methods and processes of this embodiment, exemplarily, such as a method for preventing screenshots according to an embodiment of this application.

[0076] Optionally, the bus 515 may include a path for transmitting information. Depending on its function, the bus 515 may be classified as an address bus, a data bus, a control bus, etc.

[0077] In an optional implementation, this application embodiment also provides a computer storage medium storing a computer program thereon, which, when executed by a computer, enables the computer to perform the methods described in the above method embodiments. Part or all of the computer program can be loaded and / or installed on the memory 511 of an electronic device. When the computer program is executed by the processor 512, one or more steps of a method for preventing screenshots according to an embodiment of this application can be performed.

[0078] Optionally, the computer-readable storage medium may be a random access memory, a read-only memory, a programmable read-only memory, an erasable programmable read-only memory, an electrically erasable programmable read-only memory, etc.

[0079] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the technical solution of the present invention, and are not intended to limit the specific implementation of the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the claims of the present invention should be included within the protection scope of the claims of the present invention.

Claims

1. A method for preventing screenshots, characterized in that, Applied to a user terminal, the method includes: Obtain the user's user tags on the platform and the user's current displayed content on the platform; Determine whether to enable the anti-screenshot function based on the user tag and the currently displayed content. If so, obtain template information and custom information based on the currently displayed content, and generate a replacement image based on the template information and the custom information. When it is determined that the user has triggered the screenshot function, the replacement image is used as the screenshot content to overlay the currently displayed content and displayed to the user.

2. The method according to claim 1, characterized in that, The user tags include non-member user tags and member user tags, and the displayed content includes non-member displayed content and member displayed content; The step of determining whether to enable the anti-screenshot function based on the user tag and the currently displayed content includes: The system determines whether the user tag is a non-member user tag or a member user tag. If the user tag is a non-member user tag, the anti-screenshot function is not enabled. If the user tag is a member user tag, the system determines whether the currently displayed content is non-member content or member content. If the currently displayed content is non-member content, the anti-screenshot function is not enabled. If the currently displayed content is member content, the anti-screenshot function is enabled.

3. The method according to claim 1, characterized in that, The currently displayed content includes several content types; Based on the currently displayed content, template information is obtained, including: Pre-store template information for each of the content types; Obtain the content type corresponding to the currently displayed content; Based on the content type corresponding to the currently displayed content, retrieve the template information corresponding to the currently displayed content from the stored template information.

4. The method according to claim 3, characterized in that, The content types include one or more of the following: text content types, image content types, and video content types.

5. The method according to claim 1, characterized in that, The template information includes one or more of the following: background template information, slogan template information, and prompt template information.

6. The method according to claim 3, characterized in that, The custom information includes one or more of the following: introduction information, source information, and interaction information; Custom information is obtained based on the currently displayed content, including: For each content type, a corresponding rule for generating the description information is set for the description information, a corresponding rule for generating the source information is set for the source information, and a corresponding rule for generating the interaction information is set for the interaction information. The description information is generated based on the currently displayed content and the corresponding description information generation rules; the source information is generated based on the currently displayed content and the corresponding source information generation rules; the interaction information is generated based on the currently displayed content and the corresponding interaction information generation rules.

7. The method according to any one of claims 1 to 6, characterized in that, The step of generating a replacement image based on the template information and the custom information includes: Several versions of base images are generated. The base images are set with template information display area and custom information display area. Each version of the base image corresponds to the user terminal model and user terminal screen ratio used to display the currently displayed content. Obtain the user's terminal model and screen ratio; Based on the user's terminal model and screen ratio, obtain the base image for the corresponding version; The corresponding version of the base image is populated with information, wherein the template information is filled into the template information display area, and the custom information is filled into the custom information display area, to obtain the replacement image.

8. A system for preventing screenshots, characterized in that, The system, applied to user terminals, includes: The acquisition module is used to acquire the user's user tags on the platform and the user's current displayed content on the platform; The replacement image generation module is used to determine whether the anti-screenshot function is enabled based on the user tag and the currently displayed content. If so, it obtains template information and custom information based on the currently displayed content, and generates a replacement image based on the template information and the custom information. The screenshot prevention module is used to overlay the currently displayed content with the replacement image as the screenshot content and display it to the user when it is determined that the user has triggered the screenshot function.

9. An electronic device, characterized in that, include: Memory, used to store one or more computer programs; A processor, when the one or more computer programs are executed by the processor, implements a method for preventing screenshots as described in any one of claims 1-7.

10. A computer-readable storage medium storing computer instructions that, when executed by a processor, implement a method for preventing screenshots as described in any one of claims 1-7.