CN117692707A - Control display processing method and device, storage medium and electronic equipment - Google Patents
Control display processing method and device, storage medium and electronic equipment Download PDFInfo
- Publication number
- CN117692707A CN117692707A CN202311716237.5A CN202311716237A CN117692707A CN 117692707 A CN117692707 A CN 117692707A CN 202311716237 A CN202311716237 A CN 202311716237A CN 117692707 A CN117692707 A CN 117692707A
- Authority
- CN
- China
- Prior art keywords
- video
- target
- page
- control
- link
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/44—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
- H04N21/4408—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving video stream encryption, e.g. re-encrypting a decrypted video stream for redistribution in a home network
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/451—Execution arrangements for user interfaces
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/433—Content storage operation, e.g. storage operation in response to a pause request, caching operations
- H04N21/4334—Recording operations
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/80—Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
- H04N21/83—Generation or processing of protective or descriptive data associated with content; Content structuring
- H04N21/835—Generation of protective data, e.g. certificates
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/80—Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
- H04N21/85—Assembly of content; Generation of multimedia applications
- H04N21/858—Linking data to content, e.g. by linking an URL to a video object, by creating a hotspot
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Television Signal Processing For Recording (AREA)
Abstract
本发明公开了一种控件显示处理方法、装置、存储介质及电子设备。涉及信息技术领域,尤其涉及页面显示处理领域,该方法包括:生成目标控件对应的快照图片和事件标识ID;基于快照图片生成目标视频,并将目标视频保存至目标本地路径;响应于目标页面的显示操作,基于事件ID生成目标视频对应的视频链接,其中,视频链接中携带有加密信息;在目标页面上的预定位置重复播放基于视频链接所链接的视频,以使得目标页面上能够显示目标控件预定时长。本发明解决了相关技术中页面显示支持各种操作(如屏幕录制、截屏等),导致控件显示安全性低的技术问题。
The invention discloses a control display processing method, device, storage medium and electronic equipment. Relating to the field of information technology, especially to the field of page display processing, the method includes: generating a snapshot picture and event identification ID corresponding to a target control; generating a target video based on the snapshot picture, and saving the target video to the target local path; responding to the target page Display operation: generate a video link corresponding to the target video based on the event ID, where the video link carries encrypted information; repeatedly play the video linked based on the video link at a predetermined position on the target page, so that the target control can be displayed on the target page Book duration. The present invention solves the technical problem in related technologies that page display supports various operations (such as screen recording, screenshots, etc.), resulting in low security of control display.
Description
技术领域Technical field
本发明涉及信息技术领域,尤其涉及页面显示处理领域,具体而言,涉及一种控件显示处理方法、装置、存储介质及电子设备。The present invention relates to the field of information technology, and in particular to the field of page display processing. Specifically, it relates to a control display processing method, device, storage medium and electronic equipment.
背景技术Background technique
移动应用等设备可以截屏和录屏,但若当时正处于含有敏感信息的业务场景,比如支付、转账、个人信息等相关控件展示等等,就会被捕捉下来,在不经意中很有可能因为含有这些敏感信息的图片、视频泄露造成了财产经济损失。但是相关技术中由于系统的局限针对截屏和录屏的手段并不多且不完善,比如常规的截屏防护,是在截屏之后提示用户,并不能阻止截屏,导致控件显示安全性低。Devices such as mobile applications can take screenshots and record screens, but if they are in a business scenario containing sensitive information, such as payment, transfer, display of related controls such as personal information, etc., they will be captured, and it is very likely that they will be inadvertently used due to the presence of sensitive information. The leakage of pictures and videos of these sensitive information caused property and economic losses. However, due to the limitations of the system, there are not many and imperfect methods for taking screenshots and recordings in related technologies. For example, conventional screenshot protection prompts the user after taking a screenshot but cannot prevent the screenshot, resulting in low control display security.
针对上述的问题,目前尚未提出有效的解决方案。In response to the above problems, no effective solution has yet been proposed.
发明内容Contents of the invention
本发明实施例提供了一种控件显示处理方法、装置、存储介质及电子设备,以至少解决相关技术中页面显示支持各种操作(如屏幕录制、截屏等),导致控件显示安全性低的技术问题。Embodiments of the present invention provide a control display processing method, device, storage medium and electronic equipment to at least solve the problem in related technologies that page display supports various operations (such as screen recording, screenshots, etc.), resulting in low control display security. question.
根据本发明实施例的一个方面,提供了一种控件显示处理方法,包括:生成目标控件对应的快照图片和事件标识ID;基于所述快照图片生成目标视频,并将所述目标视频保存至目标本地路径;响应于目标页面的显示操作,基于所述事件ID生成所述目标视频对应的视频链接,其中,所述视频链接中携带有加密信息;在所述目标页面上的预定位置重复播放基于所述视频链接所链接的视频,以使得所述目标页面上能够显示所述目标控件预定时长。According to an aspect of an embodiment of the present invention, a control display processing method is provided, including: generating a snapshot picture and event identification ID corresponding to the target control; generating a target video based on the snapshot picture, and saving the target video to the target Local path; in response to the display operation of the target page, generate a video link corresponding to the target video based on the event ID, wherein the video link carries encrypted information; repeatedly play the video link based on the predetermined position on the target page. The linked video is linked to the video, so that the target control can be displayed on the target page for a predetermined period of time.
可选的,所述将所述目标视频保存至目标本地路径,包括:基于所述事件ID,确定所述目标本地路径;将所述目标视频保存至所述目标本地路径。Optionally, saving the target video to the target local path includes: determining the target local path based on the event ID; and saving the target video to the target local path.
可选的,所述在所述目标页面上的预定位置重复播放基于所述视频链接所链接的视频,包括:确定所述目标页面上原始显示所述目标控件的位置为所述预定位置;创建遮罩图层和播放图层;将所述遮罩图层和所述播放图层依次添加到所述预定位置上,并在所述播放图层显示播放器基于所述视频链接所链接的视频。Optionally, repeatedly playing the video linked based on the video link at a predetermined position on the target page includes: determining the original position on the target page where the target control is displayed as the predetermined position; creating Mask layer and play layer; add the mask layer and the play layer to the predetermined position in sequence, and display the video linked by the player based on the video link on the play layer .
可选的,所述在所述播放图层显示播放器基于所述视频链接所链接的视频,包括:创建本地服务器;在所述本地服务器上运行所述播放器,并在所述播放图层显示所述播放器基于所述视频链接所链接的视频。Optionally, displaying the video linked by the player based on the video link on the playback layer includes: creating a local server; running the player on the local server, and displaying the video on the playback layer. Display the video linked by the player based on the video link.
可选的,所述在所述本地服务器上运行所述播放器,并在所述播放图层显示所述播放器基于所述视频链接所链接的视频,包括:基于超文本传输HTTP流媒体直播协议,在所述本地服务器上运行所述播放器,并在所述播放图层以离线方式显示所述播放器基于所述视频链接所链接的视频。Optionally, running the player on the local server and displaying the video linked by the player based on the video link on the playback layer includes: HTTP live streaming based on hypertext transmission protocol, run the player on the local server, and display the video linked by the player based on the video link in an offline manner on the playback layer.
可选的,所述响应于目标页面的显示操作,基于所述事件ID生成所述目标视频对应的视频链接,包括:响应于所述目标页面的所述显示操作,在所述目标控件开启防护模式的情况下,基于所述事件ID生成所述目标视频对应的所述视频链接,其中,所述防护模式用于指示不支持屏幕录制或屏幕截图的模式。Optionally, in response to the display operation of the target page, generating a video link corresponding to the target video based on the event ID includes: in response to the display operation of the target page, turning on protection in the target control In the case of mode, the video link corresponding to the target video is generated based on the event ID, wherein the protection mode is used to indicate a mode that does not support screen recording or screenshots.
可选的,所述方法还包括:在所述目标页面上的预定位置重复播放基于所述视频链接所链接的视频的过程中,接收针对所述目标页面的第一操作,所述第一操作为屏幕录制操作或截屏操作;将所述目标页面更新为预定页面,其中,所述预定页面用于指示执行所述第一操作失败。Optionally, the method further includes: receiving a first operation for the target page during the process of repeatedly playing the video linked based on the video link at a predetermined position on the target page, the first operation It is a screen recording operation or a screenshot operation; the target page is updated to a predetermined page, where the predetermined page is used to indicate failure to perform the first operation.
根据本发明实施例的另一方面,还提供了一种控件显示处理装置,包括:图片生成模块,用于生成目标控件对应的快照图片和事件标识ID;视频生成模块,用于基于所述快照图片生成目标视频,并将所述目标视频保存至目标本地路径;链接生成模块,用于响应于目标页面的显示操作,基于所述事件ID生成所述目标视频对应的视频链接,其中,所述视频链接中携带有加密信息;视频播放模块,用于在所述目标页面上的预定位置重复播放基于所述视频链接所链接的视频,以使得所述目标页面上能够显示所述目标控件预定时长。According to another aspect of the embodiment of the present invention, a control display processing device is also provided, including: a picture generation module for generating snapshot pictures and event identification IDs corresponding to the target control; and a video generation module for generating images based on the snapshots. Generate a target video from the picture, and save the target video to the target local path; a link generation module is configured to generate a video link corresponding to the target video based on the event ID in response to the display operation of the target page, wherein, the The video link carries encrypted information; a video playback module is used to repeatedly play the video linked based on the video link at a predetermined position on the target page, so that the target control can be displayed on the target page for a predetermined time .
根据本发明实施例的另一方面,还提供了一种非易失性存储介质,所述非易失性存储介质存储有多条指令,所述指令适于由处理器加载并执行任意一项所述的控件显示处理方法。According to another aspect of the embodiment of the present invention, a non-volatile storage medium is also provided. The non-volatile storage medium stores a plurality of instructions, and the instructions are suitable for being loaded and executed by a processor. The control display processing method is described.
根据本发明实施例的另一方面,还提供了一种电子设备,包括一个或多个处理器和存储器,所述存储器用于存储一个或多个程序,其中,当所述一个或多个程序被所述一个或多个处理器执行时,使得所述一个或多个处理器实现任意一项所述的控件显示处理方法。According to another aspect of the embodiment of the present invention, an electronic device is also provided, including one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs When executed by the one or more processors, the one or more processors are caused to implement any one of the control display processing methods.
在本发明实施例中,通过生成目标控件对应的快照图片和事件标识ID;基于所述快照图片生成目标视频,并将所述目标视频保存至目标本地路径;响应于目标页面的显示操作,基于所述事件ID生成所述目标视频对应的视频链接,其中,所述视频链接中携带有加密信息;在所述目标页面上的预定位置重复播放基于所述视频链接所链接的视频,以使得所述目标页面上能够显示所述目标控件预定时长,达到了将目标控件进行图片生成、视频生成后,在页面上以视频循环播放的形式安全显示加密处理后的控件视频的目的,从而实现了提升页面控件显示安全性的技术效果,进而解决了相关技术中页面显示支持各种操作(如屏幕录制、截屏等),导致控件显示安全性低的技术问题。In the embodiment of the present invention, a snapshot picture and event identification ID corresponding to the target control are generated; a target video is generated based on the snapshot picture, and the target video is saved to the target local path; in response to the display operation of the target page, based on The event ID generates a video link corresponding to the target video, wherein the video link carries encrypted information; the video linked based on the video link is repeatedly played at a predetermined position on the target page, so that the The target control can be displayed for a predetermined time on the target page, achieving the purpose of generating pictures and videos of the target control, and then safely displaying the encrypted control video in the form of video loop playback on the page, thus achieving the goal of improving The technical effect of page control display security is solved, which solves the technical problem in related technologies that page display supports various operations (such as screen recording, screenshots, etc.), resulting in low control display security.
附图说明Description of the drawings
此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:The drawings described here are used to provide a further understanding of the present invention and constitute a part of this application. The illustrative embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the attached picture:
图1是根据本发明实施例的一种控件显示处理方法的示意图;Figure 1 is a schematic diagram of a control display processing method according to an embodiment of the present invention;
图2是根据本发明实施例的一种可选的控件显示处理方法的示意图;Figure 2 is a schematic diagram of an optional control display processing method according to an embodiment of the present invention;
图3是根据本发明实施例的一种控件显示处理装置的示意图。Figure 3 is a schematic diagram of a control display processing device according to an embodiment of the present invention.
具体实施方式Detailed ways
为了使本技术领域的人员更好地理解本发明方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分的实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本发明保护的范围。In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only These are some embodiments of the present invention, rather than all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts should fall within the scope of protection of the present invention.
需要说明的是,本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本发明的实施例能够以除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It is to be understood that the data so used are interchangeable under appropriate circumstances so that the embodiments of the invention described herein are capable of being practiced in sequences other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, e.g., a process, method, system, product, or apparatus that encompasses a series of steps or units and need not be limited to those explicitly listed. Those steps or elements may instead include other steps or elements not expressly listed or inherent to the process, method, product or apparatus.
首先,为方便理解本发明实施例,下面将对本发明中所涉及的部分术语或名词进行解释说明:First, in order to facilitate understanding of the embodiments of the present invention, some terms or nouns involved in the present invention will be explained below:
DRM(Digital Rights Management,数字版权管理),指数字内容,如音视频节目内容、文档、电子书籍等在生产、传播、销售、使用过程中进行的权利保护、使用控制与管理的技术。DRM (Digital Rights Management) refers to the technology for rights protection, use control and management of digital content, such as audio and video program content, documents, e-books, etc., during the production, dissemination, sales, and use process.
iOS:苹果公司开发的移动操作系统。iOS: A mobile operating system developed by Apple.
Core Graphics框架(核心图形框架),苹果提供的一个高级绘图框架,该框架提供了一系列的绘图方法和应用程序接口(Application Programming Interface,API),用于绘制2D图形,包括绘制路径、文本、图像、颜色等。Core Graphics framework, an advanced drawing framework provided by Apple, provides a series of drawing methods and Application Programming Interface (API) for drawing 2D graphics, including drawing paths, text, images, colors, etc.
drawViewHierarchyInRect(在矩形中绘制视图层次结构),是视图类UIView的一个方法,用于将指定区域内的视图内容绘制到图形上下文中。它可以用于生成视图的快照图片,也可以用于将视图内容绘制到自定义的图形上下文中。drawViewHierarchyInRect (drawing the view hierarchy in a rectangle) is a method of the view class UIView, which is used to draw the view content in the specified area into the graphics context. It can be used to generate a snapshot image of a view, or it can be used to draw the view content into a custom graphics context.
AVFoundation(音视频基础框架),是苹果公司提供的一个用于处理音频和视频的框架,它包含了一系列类和方法,用于在iOS设备上进行媒体处理和播放。AVFoundation框架提供了丰富的功能和接口,可以实现音频和视频的录制、播放、编辑等操作。AVFoundation (Audio and Video Basic Framework) is a framework provided by Apple for processing audio and video. It contains a series of classes and methods for media processing and playback on iOS devices. The AVFoundation framework provides a wealth of functions and interfaces to enable audio and video recording, playback, editing and other operations.
AVAssetWriter(音视频资源写入器),是AVFoundation框架中的一个类,用于将媒体数据写入到文件中。它可以将音频和视频数据以特定格式写入到指定的本地路径中,支持多种媒体格式和编解码器。通过AVAssetWriter,开发者可以实现对音视频数据的实时录制和保存,同时可以对录制过程进行灵活的控制和配置。AVAssetWriter (audio and video resource writer) is a class in the AVFoundation framework, used to write media data to files. It can write audio and video data to a specified local path in a specific format, supporting multiple media formats and codecs. Through AVAssetWriter, developers can record and save audio and video data in real time, and at the same time flexibly control and configure the recording process.
HLS(HTTP Live Streaming,HTTP流媒体直播协议),是一种用于在网络上进行实时流媒体传输的协议,它将视频流分割成小的TS(Transport Stream,传输流)片段并通过HTTP协议传输。这种流媒体协议在iOS设备上得到广泛支持,适合用于视频直播和点播。HLS (HTTP Live Streaming, HTTP Live Streaming Protocol) is a protocol used for real-time streaming media transmission on the network. It divides the video stream into small TS (Transport Stream, Transport Stream) segments and transmits them through the HTTP protocol. transmission. This streaming protocol is widely supported on iOS devices and is suitable for live and on-demand video.
m3u8,是HLS流媒体协议中的一种播放列表文件格式,它包含了视频流的索引信息和分段的统一资源定位符(Uniform Resource Locator,URL)链接。m3u8 is a playlist file format in the HLS streaming protocol. It contains index information of the video stream and segmented Uniform Resource Locator (URL) links.
AVPlayer,是iOS平台上用于播放音频和视频的核心类,它负责解码和播放视频文件。AVPlayer is the core class for playing audio and video on the iOS platform. It is responsible for decoding and playing video files.
根据本发明实施例,提供了一种控件显示处理的方法实施例,需要说明的是,在附图的流程图示出的步骤可以在诸如一组计算机可执行指令的计算机系统中执行,并且,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。According to an embodiment of the present invention, a method embodiment of control display processing is provided. It should be noted that the steps shown in the flow chart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and, Although a logical sequence is shown in the flowcharts, in some cases the steps shown or described may be performed in a sequence different from that herein.
图1是根据本发明实施例的控件显示处理方法的流程图,如图1所示,该方法包括如下步骤:Figure 1 is a flow chart of a control display processing method according to an embodiment of the present invention. As shown in Figure 1, the method includes the following steps:
步骤S102,生成目标控件对应的快照图片和事件标识ID。Step S102: Generate a snapshot picture and event identification ID corresponding to the target control.
可选的,该目标控件为包括敏感信息,需要进行防护的控件,例如,可以为支付二维码控件。例如,可以使用核心图形框架(iOS CoreGraphics框架)为待防护控件(即目标控件)生成快照图片,其中快照图片可以使用在矩形中绘制视图层次结构drawViewHierarchyInRect进行绘制,并保证快照图片宽高是16的倍数,否则会导致后续转视频图片拉伸。该事件ID可以关联后续的视频保存路径。Optionally, the target control is a control that contains sensitive information and needs to be protected. For example, it can be a payment QR code control. For example, you can use the core graphics framework (iOS CoreGraphics framework) to generate a snapshot image for the control to be protected (that is, the target control). The snapshot image can be drawn using the view hierarchy drawViewHierarchyInRect in a rectangle, and ensure that the width and height of the snapshot image are 16 multiple, otherwise it will cause the subsequent video conversion pictures to be stretched. This event ID can be associated with the subsequent video saving path.
步骤S104,基于快照图片生成目标视频,并将目标视频保存至目标本地路径。Step S104: Generate a target video based on the snapshot image, and save the target video to the target local path.
可选的,快照图片生成之,可以使用iOS音视频基础框架(iOS AVFoundation框架)中的音视频资源写入器AVAssetWriter生成目标视频保存到指定本地路径,以用于后续在进行目标控件的显示时,直接从本地获取该视频进行播放显示。Optionally, to generate snapshot images, you can use the audio and video resource writer AVAssetWriter in the iOS Audio and Video Foundation Framework (iOS AVFoundation Framework) to generate the target video and save it to the specified local path for subsequent display of the target control. , directly obtain the video from the local area for playback and display.
在一种可选的实施例中,将目标视频保存至目标本地路径,包括:基于事件ID,确定目标本地路径;将目标视频保存至目标本地路径。In an optional embodiment, saving the target video to the target local path includes: determining the target local path based on the event ID; and saving the target video to the target local path.
可选的,可以基于预先生成的事件ID将获取到的目标视频保存至目标本地路径。需要说明的是,该事件ID为目标控件对应的唯一标识ID,基于该事件ID将目标视频保存至目标本地路径,在后续视频获取播放时,可以基于该事件ID准确找到该目标视频进行播放,以避免视频文件误调用,导致视频播放与显示混乱等情况的发生。Optionally, the obtained target video can be saved to the target local path based on the pre-generated event ID. It should be noted that the event ID is the unique identification ID corresponding to the target control. Based on the event ID, the target video is saved to the target local path. When the subsequent video is played, the target video can be accurately found and played based on the event ID. This is to avoid incorrect calling of video files, resulting in confusion in video playback and display.
步骤S106,响应于目标页面的显示操作,基于事件ID生成目标视频对应的视频链接,其中,视频链接中携带有加密信息。Step S106: In response to the display operation of the target page, a video link corresponding to the target video is generated based on the event ID, where the video link carries encrypted information.
可选的,在视频链接生成的过程中,基于数字版权管理(Digital RightsManagement,DRM)技术对视频链接进行相应的加密处理,为该目标视频添加相应的访问版权限制(如截屏限制、屏幕录制限制等等),以提升目标控件显示安全性。Optionally, during the video link generation process, the video link is encrypted based on Digital Rights Management (DRM) technology, and corresponding access copyright restrictions (such as screenshot restrictions and screen recording restrictions) are added to the target video. etc.) to improve the display security of the target control.
可选的,该事件ID还可以用于关联目标控件和目标本地路径,例如,在显示的目标页面中显示有该目标控件的情况下,可以链接至该视频链接进行视频播放。Optionally, the event ID can also be used to associate the target control with the target local path. For example, when the target control is displayed on the displayed target page, the video link can be linked to the video for playback.
可选的,该视频链接可以但不限于为m3u8视频链接,m3u8视频链接是超文本传输HTTP流媒体直播协议(即HLS流媒体协议)中的一种播放列表文件格式,它包含了视频流的索引信息和分段的URL链接。基于该事件ID可以生成该目标视频对应的m3u8视频链接以及相关的m3u8信息。Optionally, the video link can be, but is not limited to, an m3u8 video link. The m3u8 video link is a playlist file format in the Hypertext Transfer HTTP Live Streaming Protocol (ie, HLS Streaming Media Protocol), which contains the video stream. Index information and segmented URL links. Based on the event ID, the m3u8 video link corresponding to the target video and related m3u8 information can be generated.
步骤S108,在目标页面上的预定位置重复播放基于视频链接所链接的视频,以使得目标页面上能够显示目标控件预定时长。Step S108: Repeat the video linked based on the video link at a predetermined position on the target page, so that the target control can be displayed on the target page for a predetermined duration.
可选的,该目标页面可以为支付页面,对应的目标控件可以为支付二维码。该目标页面可以显示在移动终端设备上,该移动终端设备可以但不限于包括智能手机、平板电脑、笔记本电脑、可穿戴设备(如智能手表、智能眼镜、智能手环等)、智能音箱和智能音响以及其他便携式电子设备(如便携式音乐播放器、电子阅读器等),该移动终端设备可以但不限于为支持iOS操作系统的移动终端。Optionally, the target page can be a payment page, and the corresponding target control can be a payment QR code. The target page can be displayed on a mobile terminal device, which can, but is not limited to, include smartphones, tablets, laptops, wearable devices (such as smart watches, smart glasses, smart bracelets, etc.), smart speakers and smart phones. Speakers and other portable electronic devices (such as portable music players, e-readers, etc.), the mobile terminal device can be but is not limited to a mobile terminal supporting the iOS operating system.
可选的,该预定位置为目标页面原始显示该目标页面的位置。当显示界面中显示有该目标控件时,为防止信息泄露,在目标页面上的预定位置重复播放基于视频链接所链接的视频,该视频链接所链接的视频中携带有加密信息,该视频链接所链接的视频在原始显示目标控件的位置进行循环播放,覆盖掉目标页面中原始显示的未进行加密的目标控件,可以阻止截屏、屏幕录制等访问请求,提升目标控件显示安全性。Optionally, the predetermined position is the position where the target page originally displays the target page. When the target control is displayed on the display interface, in order to prevent information leakage, the video linked based on the video link is repeatedly played at a predetermined position on the target page. The video linked to the video link carries encrypted information. The linked video plays in a loop at the location where the target control was originally displayed, covering the original unencrypted target control displayed on the target page. This can prevent access requests such as screenshots and screen recordings, and improve the display security of the target control.
在一种可选的实施例中,在目标页面上的预定位置重复播放基于视频链接所链接的视频,包括:确定目标页面上原始显示目标控件的位置为预定位置;创建遮罩图层和播放图层;将遮罩图层和播放图层依次添加到预定位置上,并在播放图层显示播放器基于视频链接所链接的视频。In an optional embodiment, repeatedly playing the video linked based on the video link at a predetermined position on the target page includes: determining the original position where the target control is displayed on the target page as the predetermined position; creating a mask layer and playing Layer; add the mask layer and the playback layer to the predetermined position in sequence, and display the video linked by the player based on the video link on the playback layer.
可选的,该播放器可以但不限于为基于音视频播放器AVPlayer生成的,即,基于AVPlayer类来创建一个视频播放器,进行视频链接的播放,以实现目标控件在目标页面上的持续展示。通过设置遮罩图层可以用来添加遮罩效果,在视频播放中,可以将遮罩图层添加到目标页面中的预定位置,以遮盖住目标页面上原始显示的目标控件。Optionally, the player can be, but is not limited to, generated based on the audio and video player AVPlayer, that is, create a video player based on the AVPlayer class to play the video link to achieve continuous display of the target control on the target page. . You can add a mask effect by setting a mask layer. During video playback, you can add a mask layer to a predetermined position in the target page to cover the target control originally displayed on the target page.
在一种可选的实施例中,在播放图层显示播放器基于视频链接所链接的视频,包括:创建本地服务器;在本地服务器上运行播放器,并在播放图层显示播放器基于视频链接所链接的视频。In an optional embodiment, displaying the video linked by the player based on the video link on the playback layer includes: creating a local server; running the player on the local server, and displaying the video linked by the player based on the video link on the playback layer. Linked video.
可选的,可以在显示目标页面的移动终端设备本地创建服务器,基于该本地服务器运行播放器,以实现视频链接所链接的视频的离线播放。在离线模式下,目标视频可以被缓存到本地,减少了对网络的依赖,从而提高了视频播放的可靠性,进而提升用户体验感。Optionally, a server can be created locally on the mobile terminal device that displays the target page, and the player can be run based on the local server to implement offline playback of the video linked to the video link. In offline mode, the target video can be cached locally, reducing dependence on the network, thereby improving the reliability of video playback and improving user experience.
在一种可选的实施例中,在本地服务器上运行播放器,并在播放图层显示播放器基于视频链接所链接的视频,包括:基于超文本传输HTTP流媒体直播协议,在本地服务器上运行播放器,并在播放图层以离线方式显示播放器基于视频链接所链接的视频。In an optional embodiment, running the player on the local server, and displaying the video linked by the player based on the video link on the play layer includes: based on the hypertext transmission HTTP live streaming protocol, on the local server Run the player and display the video linked by the player based on the video link offline in the playback layer.
可选的,基于HLS协议,在离线模式下播放视频链接所链接的视频(如m3u8视频链接),在对应的目标视频预先下载到本地设备,然后在没有网络连接的情况下通过播放图层播放这些视频链接所链接的视频内容。这种模式可以提供更好的用户体验和更灵活的观看方式。Optional, based on the HLS protocol, play the video linked to the video link (such as m3u8 video link) in offline mode, pre-download the corresponding target video to the local device, and then play it through the playback layer without a network connection The video content to which these video links link. This mode provides a better user experience and more flexible viewing methods.
具体来说,HLS协议具有较高的稳定性和可靠性。在离线模式下,目标视频可以被缓存到本地,减少了对网络的依赖,从而提高了视频播放的可靠性。HLS离线模式可以通过预加载视频内容,提高视频的加载速度和播放效率。一旦视频内容被下载到本地,用户就可以在没有网络连接的情况下观看视频,有效地提升了用户体验。HLS离线模式允许用户在没有网络连接的情况下观看预先缓存的视频内容,这意味着用户可以在飞机、地铁或其他无网络的环境下观看视频,为用户提供了更灵活的观看体验。通过HLS离线模式缓存视频内容,用户可以避免重复下载同一视频,从而节省了网络流量和用户的数据费用。Specifically, the HLS protocol has high stability and reliability. In offline mode, the target video can be cached locally, reducing dependence on the network and thus improving the reliability of video playback. HLS offline mode can improve video loading speed and playback efficiency by preloading video content. Once the video content is downloaded locally, users can watch the video without a network connection, effectively improving the user experience. HLS offline mode allows users to watch pre-cached video content without a network connection, which means users can watch videos on airplanes, subways, or other environments without network, providing users with a more flexible viewing experience. By caching video content in HLS offline mode, users can avoid downloading the same video repeatedly, thus saving network traffic and user data charges.
在一种可选的实施例中,响应于目标页面的显示操作,基于事件ID生成目标视频对应的视频链接,包括:响应于目标页面的显示操作,在目标控件开启防护模式的情况下,基于事件ID生成目标视频对应的视频链接,其中,防护模式用于指示不支持屏幕录制或屏幕截图的模式。In an optional embodiment, in response to the display operation of the target page, generating a video link corresponding to the target video based on the event ID includes: in response to the display operation of the target page, when the target control turns on the protection mode, based on The event ID generates a video link corresponding to the target video, where the protection mode is used to indicate a mode that does not support screen recording or screenshots.
可选的,在一些应用场景下,可能不需要禁止屏幕录制或屏幕截图等方式,因此,可以直接显示目标页面原始显示的目标控件即可,无需通过视频链接循环播放的形式进行目标控件的显示。因此,可以将以上目标页面上循环播放基于视频链接生成的视频,以使得目标页面上能够持续显示目标控件的方式设定为可选方式,该可选方式可以通过防护模式的开启和关闭控制,当防护模式开启的情况下,允许启动基于事件ID生成目标视频对应的视频链接的过程,该模式下可以阻止对目标页面执行的一些特殊操作(如截屏操作、屏幕录制操作等等),以提升控件显示安全性。当防护模式不开启的情况下,则直接显示目标页面中原始显示的目标控件,可以支持针对目标页面执行的截屏操作、屏幕录制操作等特殊操作。以上方式通过防护模式的开启和关闭可以灵活控制目标控件的显示,可以达到提升用户体验感的效果。Optionally, in some application scenarios, there may be no need to disable screen recording or screenshots. Therefore, the target control originally displayed on the target page can be directly displayed, without the need to display the target control in the form of a video link loop. . Therefore, the video generated based on the video link can be played on the above target page in a loop so that the target control can be continuously displayed on the target page as an optional method. This optional method can be controlled by turning on and off the protection mode. When the protection mode is turned on, it is allowed to start the process of generating a video link corresponding to the target video based on the event ID. In this mode, some special operations (such as screenshot operations, screen recording operations, etc.) performed on the target page can be prevented to improve Control shows security. When the protection mode is not turned on, the target controls originally displayed on the target page are directly displayed, and special operations such as screenshot operations and screen recording operations on the target page can be supported. The above method can flexibly control the display of target controls by turning on and off the protection mode, which can achieve the effect of improving the user experience.
在一种可选的实施例中,该方法还包括:在目标页面上的预定位置重复播放基于视频链接所链接的视频的过程中,接收针对目标页面的第一操作,第一操作为屏幕录制操作或截屏操作;将目标页面更新为预定页面,其中,预定页面用于指示执行第一操作失败。In an optional embodiment, the method further includes: during the process of repeatedly playing the video linked based on the video link at a predetermined position on the target page, receiving a first operation for the target page, where the first operation is screen recording operation or screenshot operation; update the target page to a predetermined page, where the predetermined page is used to indicate failure to perform the first operation.
可选的,在目标页面上的预定位置重复播放基于视频链接所链接的视频时,即针对该目标控件的显示开启防护功能时,当接收到针对该目标页面的屏幕录制、截屏等操作时,直接在显示界面上显示预定页面,阻止相关操作行为,以达提升目标控件的显示安全性。该预定页面可以为空白页面,该预订页面上也可以显示有屏幕操作失败或屏幕录制失败等信息,以提示用户当前页面不支持屏幕录制、截屏等操作。Optionally, when the video linked based on the video link is repeatedly played at a predetermined position on the target page, that is, when the protection function is turned on for the display of the target control, when operations such as screen recording and screenshots for the target page are received, Display the scheduled page directly on the display interface and prevent related operations to improve the display security of the target control. The reservation page can be a blank page, and information such as screen operation failure or screen recording failure can also be displayed on the reservation page to remind the user that the current page does not support operations such as screen recording and screenshots.
通过上述步骤S102至步骤S108,可以达到将目标控件进行图片生成、视频生成后,在页面上以视频循环播放的形式安全显示加密处理后的控件视频的目的,从而实现提升页面控件显示安全性的技术效果,进而解决相关技术中页面显示支持各种操作(如屏幕录制、截屏等),导致控件显示安全性低的技术问题。Through the above steps S102 to S108, it is possible to achieve the purpose of generating pictures and videos of the target control, and then safely display the encrypted control video in the form of video loop playback on the page, thereby improving the display security of the page control. Technical effect, thereby solving the technical problem in related technologies that page display supports various operations (such as screen recording, screenshots, etc.), resulting in low security of control display.
基于上述实施例和可选实施例,本发明提出一种可选实施方式,图2是根据本发明实施例的一种可选的控件显示处理方法的流程图,如图2所示,该方法包括:Based on the above embodiments and optional embodiments, the present invention proposes an optional implementation. Figure 2 is a flow chart of an optional control display processing method according to an embodiment of the present invention. As shown in Figure 2, the method include:
步骤S1,确定包含敏感信息的视图控件(如包含二维码控件的页面);在视图构建完成后,针对该视图控件开启防护,并将该视图控件作为待防护控件;为该待防护控件生成事件ID,基于该事件ID可以关联后续视频路径,该视图控件可以为一个或多个,每一个视图控件对应分配一个事件ID。Step S1: Determine the view control containing sensitive information (such as a page containing a QR code control); after the view is built, enable protection for the view control and use the view control as a control to be protected; generate a Event ID. Based on this event ID, subsequent video paths can be associated. There can be one or more view controls. Each view control is assigned an event ID.
步骤S2,使用核心图形框架(iOS CoreGraphics框架)为待防护控件(即目标控件)生成快照图片,其中快照图片要使用在矩形中绘制视图层次结构drawViewHierarchyInRect进行绘制,并保证快照图片宽高是16的倍数,否则会导致后续转视频图片拉伸。快照图片生成之后再使用iOS音视频基础框架(iOS AVFoundation框架)中的音视频资源写入器AVAssetWriter生成目标视频保存到指定本地路径;Step S2, use the core graphics framework (iOS CoreGraphics framework) to generate a snapshot image for the control to be protected (that is, the target control). The snapshot image must be drawn using the view hierarchy drawViewHierarchyInRect in a rectangle, and ensure that the width and height of the snapshot image are 16 multiple, otherwise it will cause the subsequent video conversion pictures to be stretched. After the snapshot image is generated, the audio and video resource writer AVAssetWriter in the iOS audio and video basic framework (iOS AVFoundation framework) is used to generate the target video and save it to the specified local path;
步骤S3,在视频播放阶段,创建本地服务器Server目录,由事件ID生成指定保存路径,视频保存到本地指定路径;在本地Server目录上启动本地Server,由事件ID生成对应的m3u8视频链接和m3u8信息,创建遮罩图层和播放图层,把遮罩图层和播放图层加到防护控件上,AVPlayer生成播放器,以超文本传输HTTP流媒体直播协议HLS离线模式在播放图层播放m3u8视频链接。Step S3, during the video playback stage, create a local server Server directory, generate a designated save path based on the event ID, and save the video to the local designated path; start the local Server on the local Server directory, and generate the corresponding m3u8 video link and m3u8 information based on the event ID. , create a mask layer and a playback layer, add the mask layer and playback layer to the protection control, AVPlayer generates a player, and plays the m3u8 video in the playback layer in the offline mode of the hypertext transmission HTTP live streaming protocol HLS Link.
步骤S4,防护解除:根据业务需要可解除防护,移除播放图层,复原控件。Step S4, protection lifting: according to business needs, the protection can be lifted, the playback layer removed, and the control restored.
在本发明实施例中,为每个需要防护的控件生成1个事件ID,此事件ID关联对应控件后续的视频地址和m3u8信息;使用iOS CoreGraphics框架为防护控件生成快照图片,其中控件要使用drawViewHierarchyInRect进行绘制,并保证图片宽高是16的倍数。快照图片生成之后再使用iOS AVFoundation框架中的AVAssetWriter生成视频保存到指定本地路径,提升快照图片生成精度。在移动应用终端本地自建服务器,根据事件ID生成每个控件不同的m3u8信息,拦截资源生成,指向本地资源地址。In this embodiment of the present invention, an event ID is generated for each control that needs protection. This event ID is associated with the subsequent video address and m3u8 information of the corresponding control; the iOS CoreGraphics framework is used to generate snapshot images for the protection control, where the control uses drawViewHierarchyInRect. Draw and ensure that the width and height of the image are multiples of 16. After the snapshot image is generated, use AVAssetWriter in the iOS AVFoundation framework to generate a video and save it to the specified local path to improve the accuracy of snapshot image generation. Build your own server locally on the mobile application terminal, generate different m3u8 information for each control based on the event ID, intercept resource generation, and point to the local resource address.
通过上述步骤S1至步骤S4,可以达到将目标控件进行图片生成、视频生成后,在页面上以视频循环播放的形式安全显示加密处理后的控件视频的目的,从而实现提升页面控件显示安全性的技术效果,进而解决相关技术中页面显示支持各种操作(如屏幕录制、截屏等),导致控件显示安全性低的技术问题。Through the above steps S1 to S4, it is possible to achieve the purpose of generating pictures and videos of the target control, and then safely display the encrypted control video in the form of video loop playback on the page, thereby improving the display security of the page control. Technical effect, thereby solving the technical problem in related technologies that page display supports various operations (such as screen recording, screenshots, etc.), resulting in low security of control display.
在本实施例中还提供了一种控件显示处理装置,该装置用于实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”“装置”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。This embodiment also provides a control display processing device, which is used to implement the above embodiments and preferred implementations. What has been described will not be described again. As used below, the terms "module" and "device" may be a combination of software and/or hardware that implements a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
根据本发明实施例,还提供了一种用于实施上述控件显示处理方法的装置实施例,图3是根据本发明实施例的一种控件显示处理装置的结构示意图,如图3所示,上述控件显示处理装置,包括:图片生成模块300、视频生成模块302、链接生成模块304、视频播放模块306,其中:According to an embodiment of the present invention, an embodiment of a device for implementing the above control display processing method is also provided. Figure 3 is a schematic structural diagram of a control display processing device according to an embodiment of the present invention. As shown in Figure 3, the above The control display processing device includes: a picture generation module 300, a video generation module 302, a link generation module 304, and a video playback module 306, wherein:
图片生成模块300,用于生成目标控件对应的快照图片和事件标识ID;The picture generation module 300 is used to generate snapshot pictures and event identification IDs corresponding to the target control;
视频生成模块302,连接于图片生成模块300,用于基于快照图片生成目标视频,并将目标视频保存至目标本地路径;The video generation module 302 is connected to the picture generation module 300 and is used to generate a target video based on the snapshot picture and save the target video to the target local path;
链接生成模块304,连接于视频生成模块302,用于响应于目标页面的显示操作,基于事件ID生成目标视频对应的视频链接,其中,视频链接中携带有加密信息;The link generation module 304 is connected to the video generation module 302 and is used to generate a video link corresponding to the target video based on the event ID in response to the display operation of the target page, where the video link carries encrypted information;
视频播放模块306,连接于链接生成模块304,用于在目标页面上的预定位置重复播放基于视频链接所链接的视频,以使得目标页面上能够显示目标控件预定时长。The video playback module 306 is connected to the link generation module 304, and is used to repeatedly play the video linked based on the video link at a predetermined position on the target page, so that the target control can be displayed on the target page for a predetermined time.
在本发明实施例中,通过设置图片生成模块300,用于生成目标控件对应的快照图片和事件标识ID;视频生成模块302,连接于图片生成模块300,用于基于快照图片生成目标视频,并将目标视频保存至目标本地路径;链接生成模块304,连接于视频生成模块302,用于响应于目标页面的显示操作,基于事件ID生成目标视频对应的视频链接,其中,视频链接中携带有加密信息;视频播放模块306,连接于链接生成模块304,用于在目标页面上的预定位置重复播放基于视频链接所链接的视频,以使得目标页面上能够显示目标控件预定时长,达到了将目标控件进行图片生成、视频生成后,在页面上以视频循环播放的形式安全显示加密处理后的控件视频的目的,从而实现了提升页面控件显示安全性的技术效果,进而解决了相关技术中页面显示支持各种操作(如屏幕录制、截屏等),导致控件显示安全性低的技术问题。In the embodiment of the present invention, the picture generation module 300 is set up to generate snapshot pictures and event identification IDs corresponding to the target control; the video generation module 302 is connected to the picture generation module 300 and is used to generate target videos based on the snapshot pictures, and Save the target video to the target local path; the link generation module 304 is connected to the video generation module 302 and is used to generate a video link corresponding to the target video based on the event ID in response to the display operation of the target page, where the video link carries encryption Information; the video playback module 306 is connected to the link generation module 304, and is used to repeatedly play the video linked based on the video link at a predetermined position on the target page, so that the target control can be displayed on the target page for a predetermined time, thereby achieving the target control After generating pictures and videos, the purpose of safely displaying the encrypted control video in the form of video loop playback on the page has been achieved, thereby achieving the technical effect of improving the security of page control display, and thus solving the problem of page display support in related technologies. Various operations (such as screen recording, screenshots, etc.) lead to technical problems with low control display security.
在一种可选的实施例中,视频生成模块,包括:第一确定子模块,用于基于事件ID,确定目标本地路径;第一保存子模块,用于将目标视频保存至目标本地路径。In an optional embodiment, the video generation module includes: a first determination sub-module, used to determine the target local path based on the event ID; a first saving sub-module, used to save the target video to the target local path.
在一种可选的实施例中,视频播放子模块,包括:第二确定子模块,用于确定目标页面上原始显示目标控件的位置为预定位置;第一创建子模块,用于创建遮罩图层和播放图层;第一播放子模块,用于将遮罩图层和播放图层依次添加到预定位置上,并在播放图层显示播放器基于视频链接所链接的视频。In an optional embodiment, the video playback sub-module includes: a second determination sub-module, used to determine the original display position of the target control on the target page as a predetermined position; a first creation sub-module, used to create a mask layer and play layer; the first play sub-module is used to add the mask layer and the play layer to a predetermined position in sequence, and display the video linked by the player based on the video link on the play layer.
在一种可选的实施例中,第一播放子模块,包括:第二创建子模块,用于创建本地服务器;第二播放子模块,用于在本地服务器上运行播放器,并在播放图层显示播放器基于视频链接所链接的视频。In an optional embodiment, the first playing sub-module includes: a second creating sub-module, used to create a local server; a second playing sub-module, used to run the player on the local server, and play the image The layer displays the video that the player is linked to based on the video link.
在一种可选的实施例中,第二播放子模块,包括:第三播放子模块,用于基于超文本传输HTTP流媒体直播协议,在本地服务器上运行播放器,并在播放图层以离线方式显示播放器基于视频链接所链接的视频。In an optional embodiment, the second play sub-module includes: a third play sub-module, used to run the player on the local server based on the hypertext transmission HTTP live streaming protocol, and in the play layer to Offline display of videos linked by the player based on the video link.
在一种可选的实施例中,链接生成模块,包括:第一链接生成子模块,用于响应于目标页面的显示操作,在目标控件开启防护模式的情况下,基于事件ID生成目标视频对应的视频链接,其中,防护模式用于指示不支持屏幕录制或屏幕截图的模式。In an optional embodiment, the link generation module includes: a first link generation sub-module, configured to respond to the display operation of the target page and generate a corresponding target video based on the event ID when the target control turns on the protection mode. Video link where Protect Mode is used to indicate a mode that does not support screen recording or screenshots.
在一种可选的实施例中,上述装置还包括:第一接收子模块,用于在目标页面上的预定位置重复播放基于视频链接所链接的视频的过程中,接收针对目标页面的第一操作,第一操作为屏幕录制操作或截屏操作;第一更新子模块,用于将目标页面更新为预定页面,其中,预定页面用于指示执行第一操作失败。In an optional embodiment, the above device further includes: a first receiving sub-module, configured to receive the first video link for the target page during the process of repeatedly playing the video linked based on the video link at a predetermined position on the target page. Operation, the first operation is a screen recording operation or a screenshot operation; the first update submodule is used to update the target page to a predetermined page, where the predetermined page is used to indicate failure to perform the first operation.
需要说明的是,上述各个模块是可以通过软件或硬件来实现的,例如,对于后者,可以通过以下方式实现:上述各个模块可以位于同一处理器中;或者,上述各个模块以任意组合的方式位于不同的处理器中。It should be noted that each of the above modules can be implemented through software or hardware. For example, the latter can be implemented in the following ways: the above modules can be located in the same processor; or the above modules can be implemented in any combination. Located in different processors.
此处需要说明的是,上述图片生成模块300、视频生成模块302、链接生成模块304、视频播放模块306对应于实施例中的步骤S102至步骤S108,上述模块与对应的步骤所实现的实例和应用场景相同,但不限于上述实施例所公开的内容。需要说明的是,上述模块作为装置的一部分可以运行在计算机终端中。It should be noted here that the above-mentioned picture generation module 300, video generation module 302, link generation module 304, and video playback module 306 correspond to steps S102 to S108 in the embodiment. The examples and implementations of the above modules and the corresponding steps are as follows: The application scenarios are the same, but are not limited to the content disclosed in the above embodiments. It should be noted that the above module can run in a computer terminal as part of the device.
需要说明的是,本实施例的可选或优选实施方式可以参见实施例中的相关描述,此处不再赘述。It should be noted that for optional or preferred implementation modes of this embodiment, reference can be made to the relevant descriptions in the embodiments, and details will not be described again here.
上述的控件显示处理装置还可以包括处理器和存储器,上述图片生成模块300、视频生成模块302、链接生成模块304、视频播放模块306等均作为程序模块存储在存储器中,由处理器执行存储在存储器中的上述程序模块来实现相应的功能。The above-mentioned control display processing device may also include a processor and a memory. The above-mentioned picture generation module 300, video generation module 302, link generation module 304, video playback module 306, etc. are all stored in the memory as program modules, and are executed by the processor and stored in the memory. The above program modules in the memory are used to implement corresponding functions.
处理器中包含内核,由内核去存储器中调取相应的程序模块,上述内核可以设置一个或以上。存储器可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM),存储器包括至少一个存储芯片。The processor contains a core, which retrieves the corresponding program module from the memory. One or more of the above cores can be set. Memory may include non-permanent memory in computer-readable media, random access memory (RAM) and/or non-volatile memory, such as read-only memory (ROM) or flash memory (flash RAM). The memory includes at least one memory chip.
根据本申请实施例,还提供了一种非易失性存储介质的实施例。可选的,在本实施例中,上述非易失性存储介质包括存储的程序,其中,在上述程序运行时控制上述非易失性存储介质所在设备执行上述任意一种控件显示处理方法。According to the embodiment of the present application, an embodiment of a non-volatile storage medium is also provided. Optionally, in this embodiment, the above-mentioned non-volatile storage medium includes a stored program, wherein when the above-mentioned program is run, the device where the above-mentioned non-volatile storage medium is located is controlled to execute any of the above-mentioned control display processing methods.
可选的,在本实施例中,上述非易失性存储介质可以位于计算机网络中计算机终端群中的任意一个计算机终端中,或者位于移动终端群中的任意一个移动终端中,上述非易失性存储介质包括存储的程序。Optionally, in this embodiment, the above-mentioned non-volatile storage medium can be located in any computer terminal in the computer terminal group in the computer network, or in any mobile terminal in the mobile terminal group. Sexual storage media includes stored programs.
可选的,在程序运行时控制非易失性存储介质所在设备执行以下功能:生成目标控件对应的快照图片和事件标识ID;基于快照图片生成目标视频,并将目标视频保存至目标本地路径;响应于目标页面的显示操作,基于事件ID生成目标视频对应的视频链接,其中,视频链接中携带有加密信息;在目标页面上的预定位置重复播放基于视频链接所链接的视频,以使得目标页面上能够显示目标控件预定时长。Optionally, when the program is running, control the device where the non-volatile storage medium is located to perform the following functions: generate a snapshot image and event identification ID corresponding to the target control; generate a target video based on the snapshot image, and save the target video to the target local path; In response to the display operation of the target page, a video link corresponding to the target video is generated based on the event ID, where the video link carries encrypted information; the video linked based on the video link is repeatedly played at a predetermined position on the target page, so that the target page The target control can be displayed for a predetermined duration.
根据本申请实施例,还提供了一种处理器的实施例。可选的,在本实施例中,上述处理器用于运行程序,其中,上述程序运行时执行上述任意一种控件显示处理方法。According to an embodiment of the present application, an embodiment of a processor is also provided. Optionally, in this embodiment, the above-mentioned processor is used to run a program, wherein when the above-mentioned program is run, any one of the above-mentioned control display processing methods is executed.
可选的,上述处理器,当在数据处理设备上执行时,适于执行初始化有如下方法步骤的程序:生成目标控件对应的快照图片和事件标识ID;基于快照图片生成目标视频,并将目标视频保存至目标本地路径;响应于目标页面的显示操作,基于事件ID生成目标视频对应的视频链接,其中,视频链接中携带有加密信息;在目标页面上的预定位置重复播放基于视频链接所链接的视频,以使得目标页面上能够显示目标控件预定时长。Optionally, the above processor, when executed on a data processing device, is suitable for executing a program with the following method steps for initialization: generating a snapshot picture and event identification ID corresponding to the target control; generating a target video based on the snapshot picture, and converting the target The video is saved to the target local path; in response to the display operation of the target page, a video link corresponding to the target video is generated based on the event ID, where the video link carries encrypted information; the link based on the video link is repeatedly played at a predetermined position on the target page video so that the target control can be displayed on the target page for a predetermined time.
根据本申请实施例,还提供了一种计算机程序产品的实施例,当在数据处理设备上执行时,适于执行初始化有上述任意一种的控件显示处理方法步骤的程序。According to an embodiment of the present application, an embodiment of a computer program product is also provided, which, when executed on a data processing device, is suitable for executing a program that initializes any one of the above control display processing method steps.
可选的,上述计算机程序产品,当在数据处理设备上执行时,适于执行初始化有如下方法步骤的程序:生成目标控件对应的快照图片和事件标识ID;基于快照图片生成目标视频,并将目标视频保存至目标本地路径;响应于目标页面的显示操作,基于事件ID生成目标视频对应的视频链接,其中,视频链接中携带有加密信息;在目标页面上的预定位置重复播放基于视频链接所链接的视频,以使得目标页面上能够显示目标控件预定时长。Optionally, the above computer program product, when executed on a data processing device, is suitable for executing a program with the following method steps for initialization: generating a snapshot picture and event identification ID corresponding to the target control; generating a target video based on the snapshot picture, and The target video is saved to the target local path; in response to the display operation of the target page, a video link corresponding to the target video is generated based on the event ID, where the video link carries encrypted information; the video link based on the video link is repeatedly played at a predetermined position on the target page. Link the video so that the target control is displayed on the target page for a predetermined amount of time.
可选的,上述计算机程序产品,当在数据处理设备上执行时,适于执行初始化有如下方法步骤的程序:基于事件ID,确定目标本地路径;将目标视频保存至目标本地路径。Optionally, the above computer program product, when executed on a data processing device, is suitable for executing a program initialized with the following method steps: determining the target local path based on the event ID; and saving the target video to the target local path.
可选的,上述计算机程序产品,当在数据处理设备上执行时,适于执行初始化有如下方法步骤的程序:确定目标页面上原始显示目标控件的位置为预定位置;创建遮罩图层和播放图层;将遮罩图层和播放图层依次添加到预定位置上,并在播放图层显示播放器基于视频链接所链接的视频。Optionally, the above computer program product, when executed on a data processing device, is suitable for executing a program with the following method steps for initialization: determining the original position of the target control on the target page to be a predetermined position; creating a mask layer and playing Layer; add the mask layer and the playback layer to the predetermined position in sequence, and display the video linked by the player based on the video link on the playback layer.
可选的,上述计算机程序产品,当在数据处理设备上执行时,适于执行初始化有如下方法步骤的程序:创建本地服务器;在本地服务器上运行播放器,并在播放图层显示播放器基于视频链接所链接的视频。Optionally, the above computer program product, when executed on a data processing device, is suitable for executing a program with the following method steps for initialization: creating a local server; running the player on the local server, and displaying the player based on the play layer The video linked to by the video link.
可选的,上述计算机程序产品,当在数据处理设备上执行时,适于执行初始化有如下方法步骤的程序:基于超文本传输HTTP流媒体直播协议,在本地服务器上运行播放器,并在播放图层以离线方式显示播放器基于视频链接所链接的视频。Optionally, the above computer program product, when executed on a data processing device, is suitable for executing a program with the following method steps for initialization: based on the Hypertext Transfer HTTP live streaming protocol, running the player on the local server, and playing The layer displays offline the video that the player is linked to based on the video link.
可选的,上述计算机程序产品,当在数据处理设备上执行时,适于执行初始化有如下方法步骤的程序:响应于目标页面的显示操作,在目标控件开启防护模式的情况下,基于事件ID生成目标视频对应的视频链接,其中,防护模式用于指示不支持屏幕录制或屏幕截图的模式。Optionally, the above computer program product, when executed on a data processing device, is suitable for executing a program with the following method steps for initialization: in response to the display operation of the target page, when the target control turns on the protection mode, based on the event ID Generate a video link corresponding to the target video, where the protection mode is used to indicate a mode that does not support screen recording or screenshots.
可选的,上述计算机程序产品,当在数据处理设备上执行时,适于执行初始化有如下方法步骤的程序:在目标页面上的预定位置重复播放基于视频链接所链接的视频的过程中,接收针对目标页面的第一操作,第一操作为屏幕录制操作或截屏操作;将目标页面更新为预定页面,其中,预定页面用于指示执行第一操作失败。Optionally, the above computer program product, when executed on a data processing device, is adapted to execute a program initialized with the following method steps: during the process of repeatedly playing the video linked based on the video link at a predetermined position on the target page, receive For the first operation on the target page, the first operation is a screen recording operation or a screenshot operation; the target page is updated to a predetermined page, where the predetermined page is used to indicate failure to perform the first operation.
本发明实施例提供了一种电子设备,该电子设备包括处理器、存储器及存储在存储器上并可在处理器上运行的程序,处理器执行程序时实现以下步骤:生成目标控件对应的快照图片和事件标识ID;基于快照图片生成目标视频,并将目标视频保存至目标本地路径;响应于目标页面的显示操作,基于事件ID生成目标视频对应的视频链接,其中,视频链接中携带有加密信息;在目标页面上的预定位置重复播放基于视频链接所链接的视频,以使得目标页面上能够显示目标控件预定时长。An embodiment of the present invention provides an electronic device. The electronic device includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, it implements the following steps: generating a snapshot picture corresponding to the target control. and event identification ID; generate the target video based on the snapshot image, and save the target video to the target local path; in response to the display operation of the target page, generate a video link corresponding to the target video based on the event ID, where the video link carries encrypted information ; Repeat the video linked based on the video link at a predetermined position on the target page, so that the target control can be displayed on the target page for a predetermined time.
上述本发明实施例顺序仅仅为了描述,不代表实施例的优劣。The above sequence of the embodiments of the present invention is only for description and does not represent the advantages and disadvantages of the embodiments.
在本发明的上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。In the above-mentioned embodiments of the present invention, each embodiment is described with its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
在本申请所提供的几个实施例中,应该理解到,所揭露的技术内容,可通过其它的方式实现。其中,以上所描述的装置实施例仅仅是示意性的,例如上述模块的划分,可以为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个模块或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,模块或模块的间接耦合或通信连接,可以是电性或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only illustrative. For example, the division of the above modules can be a logical function division. In actual implementation, there can be other division methods. For example, multiple modules or components can be combined or integrated. to another system, or some features can be ignored, or not implemented. Another point is that the coupling or direct coupling or communication connection between each other shown or discussed may be through some interfaces, and the indirect coupling or communication connection of the modules or modules may be in electrical or other forms.
上述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理模块,即可以位于一个地方,或者也可以分布到多个模块上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。The modules described above as separate components may or may not be physically separated. The components shown as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed to multiple modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本发明各个实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。In addition, each functional module in various embodiments of the present invention can be integrated into one processing module, or each module can exist physically alone, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or software function modules.
上述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取非易失性存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个非易失性存储介质中,包括若干指令用以使得一台计算机设备(可为个人计算机、服务器或者网络设备等)执行本发明各个实施例方法的全部或部分步骤。而前述的非易失性存储介质包括:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。If the above integrated modules are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable non-volatile storage medium. Based on this understanding, the technical solution of the present invention is essentially or contributes to the existing technology, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a non-volatile computer software. The storage medium contains several instructions to cause a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present invention. The aforementioned non-volatile storage media include: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk, etc., which can store The medium for program code.
以上仅是本发明的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。The above are only the preferred embodiments of the present invention. It should be pointed out that for those of ordinary skill in the art, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as It is the protection scope of the present invention.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202311716237.5A CN117692707A (en) | 2023-12-13 | 2023-12-13 | Control display processing method and device, storage medium and electronic equipment |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202311716237.5A CN117692707A (en) | 2023-12-13 | 2023-12-13 | Control display processing method and device, storage medium and electronic equipment |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN117692707A true CN117692707A (en) | 2024-03-12 |
Family
ID=90133259
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202311716237.5A Pending CN117692707A (en) | 2023-12-13 | 2023-12-13 | Control display processing method and device, storage medium and electronic equipment |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN117692707A (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2025251977A1 (en) * | 2024-06-06 | 2025-12-11 | 腾讯音乐娱乐科技(深圳)有限公司 | Data protection method for digital rights, apparatus, device, and storage medium |
-
2023
- 2023-12-13 CN CN202311716237.5A patent/CN117692707A/en active Pending
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2025251977A1 (en) * | 2024-06-06 | 2025-12-11 | 腾讯音乐娱乐科技(深圳)有限公司 | Data protection method for digital rights, apparatus, device, and storage medium |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US11943486B2 (en) | Live video broadcast method, live broadcast device and storage medium | |
| US10929460B2 (en) | Method and apparatus for storing resource and electronic device | |
| US8533754B2 (en) | Embedded video player with modular ad processing | |
| US12407881B2 (en) | Event streaming with added content and context | |
| CN110062284B (en) | Video playing method and device and electronic equipment | |
| JP6469313B2 (en) | Information processing method, terminal, and computer storage medium | |
| US20150135071A1 (en) | Method and apparatus for distribution and presentation of audio visual data enhancements | |
| US10972809B1 (en) | Video transformation service | |
| CN112995759A (en) | Interactive service processing method, system, device, equipment and storage medium | |
| JP7607051B2 (en) | Method, apparatus, device and medium for multimedia data distribution | |
| CN107659831A (en) | Media data processing method, client and storage medium | |
| CN104168512A (en) | Method and device for displaying video information | |
| WO2020220773A1 (en) | Method and apparatus for displaying picture preview information, electronic device and computer-readable storage medium | |
| CN103220582B (en) | A kind of video file management method | |
| JP7684446B2 (en) | VIDEO GENERATION METHOD, APPARATUS, STORAGE MEDIUM AND PROGRAM PRODUCT | |
| CN117692707A (en) | Control display processing method and device, storage medium and electronic equipment | |
| WO2012141856A1 (en) | Augmented reality system for re-casting a seminar with private calculations | |
| KR20180041879A (en) | Method for editing and apparatus thereof | |
| CN102654834A (en) | Advertisement putting method and system for mobile phone application | |
| KR101823767B1 (en) | Multi-media file structure and system including meta information for providing user request and environment customize contents | |
| EP4423635A1 (en) | Method for tracking distribution of a shared digital media file | |
| CN113691865A (en) | A kind of multimedia playback method and system | |
| KR20150032059A (en) | Responsive contents rpoviding system and method of controlling the same | |
| Rome et al. | Multimedia on symbian OS: Inside the convergence device | |
| KR102432376B1 (en) | Method and system for reproducing contents |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| CB02 | Change of applicant information | ||
| CB02 | Change of applicant information |
Country or region after: China Address after: 100037 No. 31, Fuchengmenwai Street, Xicheng District, Beijing 4th Floor, Room 429D Applicant after: Tianyi Payment Technology Co.,Ltd. Address before: 429D, 4th Floor, No. 31 Fuchengmenwai Street, Xicheng District, Beijing Applicant before: TIANYI ELECTRONIC COMMERCE Co.,Ltd. Country or region before: China |