Media resource processing method and apparatus, and device and storage medium
By using multiple canvases and sliding operations to switch display states on the media resource display page, the problem of insufficient interactive functions in the existing technology is solved, and a highly interactive experience of media resources is achieved.
Patent Information
- Application Number
- PCT/CN2024/082824
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-20
- Filing Date
- 2024-03-20
- Publication Date
- 2024-09-26
AI Technical Summary
Existing media resource processing technology is difficult to enrich the interactive functions of media resources and improve user interactivity.
By using at least two canvases on the media resource display page, the first canvas is used to render the media resource content, and the second canvas is used to render the preset covering layer. The display state is switched in response to the sliding operation and the covering layer is re-rendered to realize the covering layer. Remove and redraw to enrich interactive functions.
Realizes media resource status switching based on the sliding track area, improving the interactivity of media resources and user interaction experience.
Smart Images

Figure CN2024082824_26092024_PF_FP
Abstract
Description
A media resource processing method, device, equipment and storage medium
[0001] This application claims priority to the Chinese invention patent application entitled “A media resource processing method, device, equipment and storage medium” and application number 202310281179.1 filed on March 20, 2023. The entire contents of that application are incorporated by reference into this application. Technical Field
[0002] The present disclosure relates to the field of data processing, and in particular to a method, apparatus, device, and storage medium for processing media resources. Background Art
[0003] With the continuous development of media resource processing technology, people's demands for interaction with media resources are becoming more and more diversified. Therefore, how to enrich the interactive functions related to media resources and thus enhance the interactivity of users' media content is a technical problem that needs to be solved urgently.
[0004] Summary of the Invention
[0005] In order to solve the above technical problems, the embodiments of the present disclosure provide a method for processing media resources.
[0006] In a first aspect, the present disclosure provides a method for processing media resources, the method comprising:
[0007] Displaying a first media resource in a first display state on a media resource display page;
[0008] In response to a preset sliding operation performed on the first media resource in the first display state, a media resource area in the first media resource in the first display state corresponding to the sliding track area of the preset sliding operation is switched from the first display state to the second display state.
[0009] In an optional implementation, displaying the first media resource in the first display state on the media resource display page includes:
[0010] On a media resource display page, a first media resource is displayed based on at least two canvases; wherein, the at least two canvases include a first canvas and a second canvas, the first canvas is located below the second canvas, the first canvas is used to render the content of the first media resource, and the second canvas is used to render a preset cover layer, and the preset cover layer is used to cover the content of the first media resource.
[0011] In an optional embodiment, in response to a preset sliding operation on the first media resource in the first display state, switching a media resource area corresponding to a sliding track area of the preset sliding operation in the first media resource in the first display state from the first display state to the second display state includes:
[0012] In response to a preset sliding operation on the first media resource in the first display state, determining a target rendering area on the second canvas; wherein the target rendering area includes an area on the second canvas excluding a sliding track area;
[0013] Based on the target rendering area, the preset cover layer is re-rendered on the second canvas.
[0014] In an optional implementation, determining a target rendering area on the second canvas in response to a preset sliding operation on the first media resource in the first display state includes:
[0015] In response to a preset sliding operation on the first media resource in the first display state, obtaining a current sliding track area corresponding to the preset sliding operation and a historical sliding track area on the second canvas, and determining the current sliding track area and the historical sliding track area as a sliding track area;
[0016] A target rendering area on the second canvas is determined based on the sliding track area.
[0017] In an optional implementation manner, after determining the current sliding track area and the historical sliding track area as the sliding track area, the method further includes:
[0018] The historical sliding track area is updated using the sliding track area.
[0019] In an optional implementation, an interactive control is displayed on the media resource display page, and the interactive control is used to trigger the display of a shooting page. The method further includes:
[0020] In response to a press event in a preset sliding operation on the first media resource in the first display state, hiding and displaying the interactive control on the media resource display page;
[0021] In response to a lift event corresponding to the press event in the preset sliding operation, the interactive control is redisplayed on the media resource display page.
[0022] In an optional implementation, the interactive control includes a shooting control, and the method further includes:
[0023] In response to a triggering operation on the shooting control, displaying a shooting page, and acquiring a second media resource based on the shooting page;
[0024] In response to a publishing success message for the second media resource, the first media resource in the second display state is displayed on the media resource display page.
[0025] In an optional implementation, before displaying the first media resource in the first display state on the media resource display page, the method further includes:
[0026] In response to an acquisition operation for a media resource, a first media resource is acquired from a server; wherein the first media resource carries a preset type identifier, and the preset type identifier is used to identify that the first media resource belongs to a preset type.
[0027] In an optional implementation, the method further includes:
[0028] In response to the preset end condition being currently met, the media resource area corresponding to the sliding track area is switched from the second display state to the first display state; wherein, the preset end condition includes that the triggering time point of the preset sliding operation corresponding to the sliding track area is not less than the preset time length from the current time or the number of sliding track areas is not less than the preset number.
[0029] In a second aspect, the present disclosure provides a media resource processing device, the device comprising:
[0030] A first display module, configured to display a first media resource in a first display state on a media resource display page;
[0031] The first switching module is used to respond to a preset sliding operation acting on the first media resource in the first display state, and switch the media resource area corresponding to the sliding track area of the preset sliding operation in the first media resource in the first display state from the first display state to the second display state.
[0032] In a third aspect, the present disclosure provides a computer-readable storage medium, wherein instructions are stored in the computer-readable storage medium. When the instructions are executed on a terminal device, the terminal device implements the above method.
[0033] In a fourth aspect, the present disclosure provides a media resource processing device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned method when executing the computer program.
[0034] In a fifth aspect, the present disclosure provides a computer program product, which includes a computer program / instructions, and the computer program / instructions implement the above method when executed by a processor.
[0035] The technical solution provided by the embodiments of the present disclosure has at least the following advantages compared with the prior art:
[0036] An embodiment of the present disclosure provides a media resource processing method. Specifically, a first media resource in a first display state is displayed on a media resource display page. When a preset sliding operation acting on the first media resource in the first display state is received, a media resource area corresponding to the sliding track area of the preset sliding operation in the first media resource in the first display state is switched from the first display state to the second display state. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0038] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0039] FIG1 is a flow chart of a method for processing media resources provided by an embodiment of the present disclosure;
[0040] FIG2 is a schematic diagram of a display page of a first media resource provided by an embodiment of the present disclosure;
[0041] FIG3 is a schematic diagram of another display page of a first media resource provided by an embodiment of the present disclosure;
[0042] FIG4 is a data interaction diagram of a media resource processing method provided by an embodiment of the present disclosure;
[0043] FIG5 is a schematic structural diagram of a media resource processing device provided by an embodiment of the present disclosure;
[0044] FIG6 is a schematic structural diagram of a media resource processing device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0045] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features therein can be combined with each other in the absence of conflict.
[0046] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0047] In order to enrich the interactive functions related to media resources, the embodiments of the present disclosure provide a method for processing media resources. Specifically, a first media resource in a first display state is displayed on a media resource display page. When a preset sliding operation is received on the first media resource in the first display state, the media resource area corresponding to the sliding track area of the preset sliding operation in the first media resource in the first display state is switched from the first display state to the second display state. It can be seen that in the embodiments of the present disclosure, by triggering the preset sliding operation on the first media resource in the first display state, the effect of switching the display state of the corresponding media resource area based on the sliding track area can be achieved, thereby enriching the interactive functions related to the media resources and improving the interactivity of the work.
[0048] To this end, an embodiment of the present disclosure provides a method for processing media resources. Referring to FIG1 , which is a flow chart of a method for processing media resources provided by an embodiment of the present disclosure, the method includes:
[0049] S101: Displaying a first media resource in a first display state on a media resource display page.
[0050] The media resource processing method provided by the embodiments of the present disclosure is applied to a client. Specifically, the client can be deployed on a terminal device, which can include a smart phone, a laptop computer, a personal computer (PC), etc.
[0051] The first media resource in the embodiment of the present disclosure may be any type of media resource, such as any type of media resource such as video, graphics, pictures, and text.
[0052] In an optional embodiment, on a media resource display page, a first media resource can be displayed based on at least two canvases to display the first media resource in a first display state. The first display state may include a state in which the content in the first media resource is covered, such as a state in which a preset covering layer is displayed on the first media resource. The preset covering layer may be a Gaussian blur mask, a mosaic mask, or other covering styles. It is understandable that the user who publishes the media resource can set the visible range of the first media resource, that is, only users who fall within the visible range can view the first media resource and interact with the first media resource.
[0053] The at least two canvases include a first canvas and a second canvas, the first canvas is located below the second canvas, the first canvas is used to render the content of the first media resource, and the second canvas is used to render a preset cover layer, and the preset cover layer is used to cover the content of the first media resource.
[0054] In one optional embodiment, in response to a media resource acquisition operation, a first media resource is acquired from a server; the first media resource carries a preset type identifier, which indicates that the first media resource belongs to a preset type. Specifically, a media resource of a preset type is a type of media resource that is obscured by a preset overlay when the media resource is displayed on a client. The preset overlay may be a mosaic or other obscuring layer.
[0055] In an embodiment of the present disclosure, after obtaining the first media resource from the server, the first canvas can be used to render the content of the first media resource, and the second canvas can be used to render a preset cover layer. At the same time, the first canvas is located in the lower layer of the second canvas. When the first media resource is displayed based on the first canvas and the second canvas, the effect of the content of the first media resource being covered during the display process is presented. As shown in Figure 2, a schematic diagram of a media resource display page provided in an embodiment of the present disclosure is shown, wherein a preset cover layer is rendered on the media resource display page to cover the display content of the first media resource. Assuming that the first media resource is a video, during the playback of the video, a display effect of the video playback content being covered by a cover layer such as a mosaic is presented.
[0056] In an optional embodiment, the method of rendering the preset mask layer on the second canvas may include first drawing the mask layer on the second canvas, and then adding a preset mask style to the mask layer. The preset mask style may include a mosaic or other mask style.
[0057] S102: In response to a preset sliding operation on the first media resource in the first display state, a media resource area corresponding to the sliding track area of the preset sliding operation in the first media resource in the first display state is switched from the first display state to the second display state.
[0058] The second display state may include a clear display state of the content in the first media resource, such as a display state in which no obstruction layer is set.
[0059] In an optional embodiment, in order to present the effect of removing the covering layer following the sliding operation and partially displaying the first media resource, the preset covering layer can be redrawn in the area other than the sliding track area on the second canvas, while the preset covering layer is not redrawn in the sliding track area on the second canvas.
[0060] In an embodiment of the present disclosure, during the display of a first media resource based on at least two canvases, if a preset sliding operation is received on the media resource display page, a target rendering area on the second canvas is first determined. Then, based on the target rendering area, a preset cover layer is re-rendered on the second canvas, i.e., the operation of re-rendering the preset cover layer is not performed for the sliding track area. The target rendering area includes the area on the second canvas excluding the sliding track area.
[0061] In an optional embodiment, multiple preset sliding operations can be triggered successively on the media resource display page, and the sliding track area on the second canvas can include a current sliding track area and a historical sliding track area, wherein the current sliding track area refers to the sliding track area corresponding to the preset sliding operation currently received on the first media resource in the first display state, such as the current sliding track area 301 shown in Figure 3; and the historical sliding track area can be the sliding track area corresponding to the sliding operation triggered before the preset sliding operation, such as the historical sliding track areas 302 and 303 shown in Figure 3. For example, when the third preset sliding operation is received on the first media resource in the first display state, the sliding track area corresponding to the third preset sliding operation can be determined as the current sliding track area, and the sliding track areas corresponding to the first two preset sliding operations can be determined as the historical sliding track areas.
[0062] In actual applications, in response to a preset sliding operation on a first media resource in a first display state, the current sliding track area corresponding to the preset sliding operation and the historical sliding track area on the second canvas are obtained, and the current sliding track area and the historical sliding track area are determined as the sliding track area. Then, based on the determined sliding track area, a target rendering area on the second canvas is determined. Specifically, the area on the second canvas other than the determined sliding track area is determined as the target rendering area on the second canvas.
[0063] In an optional implementation, after the current sliding track area and the historical sliding track area are determined as sliding track areas, the determined sliding track area can also be used to update the historical sliding track area of the second canvas, that is, the sliding track area determined this time is determined as the latest historical sliding track area, which is used to respond to the preset sliding operation triggered subsequently.
[0064] In an embodiment of the present disclosure, after determining the target rendering area on the second canvas, a preset cover layer is re-rendered on the second canvas based on the target rendering area. Specifically, within the target rendering area on the second canvas, the preset cover layer is re-rendered to achieve the display effect of removing the cover layer following a preset sliding operation to reproduce a portion of the content of the first media resource. As shown in Figure 3, a schematic diagram of another media resource display page provided in an embodiment of the present disclosure is provided, wherein the display page of the first media resource partially displays the content of the first media resource.
[0065] In an optional implementation, when a lift operation of a preset sliding operation on the display page of the first media resource is detected, the preset cover layer may be re-rendered on the second canvas based on the target rendering area on the second canvas.
[0066] In another optional implementation, in order to improve the response efficiency of the preset sliding operation triggered by the user, the preset sliding operation on the display page of the first media resource can also be responded to according to a preset period. Specifically, in the process of the user triggering the preset sliding operation, the target rendering area on the second canvas is determined according to the preset period, and then the preset cover layer is re-rendered on the second canvas based on the target rendering area, giving the user a display effect of erasing the cover layer in real time following the sliding operation, thereby improving interactivity.
[0067] In the disclosed embodiments, while the preset overlay is being re-rendered on the second canvas, the first canvas is used to render the content of the first media resource. This allows the user to trigger a preset sliding action on the display page to erase the overlay during the presentation of the first media resource. For example, assuming the first media resource is a video, during video playback, the user can use a preset sliding action to erase the overlay on the video, thereby triggering an interactive effect in which a portion of the video content is displayed.
[0068] In an optional embodiment, when it is detected that a preset end condition is currently satisfied, the media resource area corresponding to the sliding track area on the first media resource in the first display state can be switched from the second display state to the first display state. The preset end condition may include that the preset sliding operation triggering time point corresponding to the sliding track area is not less than a preset duration from the current state. For example, when the preset sliding operation triggering duration reaches 1 second, the media resource screen area corresponding to the sliding track area of the preset sliding operation is switched from the clear display state back to the covered display state. The preset end condition may also include that the number of sliding track areas is not less than a preset number. For example, on the display page of the first media resource in the first display state, when more than 3 sliding track areas are displayed, the media resource area corresponding to the sliding track area is switched from the clear display state back to the covered display state.
[0069] In the media resource processing method provided by the embodiment of the present disclosure, a first media resource in a first display state is displayed on a media resource display page. When a preset sliding operation is received on the first media resource in the first display state, a media resource area corresponding to the sliding track area of the preset sliding operation in the first media resource in the first display state is switched from the first display state to the second display state. It can be seen that in the embodiment of the present disclosure, by triggering the preset sliding operation on the first media resource in the first display state, the effect of switching the display state of the corresponding media resource area based on the sliding track area can be achieved, thereby enriching the interactive functions related to the media resources and improving the interactivity of the work.
[0070] To facilitate further understanding of the media resource processing method, the present embodiment provides a data interaction diagram of the media resource processing method, as shown in Figure 4. Taking the first media resource as an image, the preset cover layer can be a mosaic cover or a Gaussian blur cover layer, etc. This embodiment uses a mosaic cover as an example.
[0071] Specifically, when the client receives a user-triggered acquisition operation for a media resource, it sends a media resource acquisition request to the server. After receiving the media resource acquisition request, the server returns the uniform resource locator URL of the first media resource to the client, and the client loads the first media resource based on the URL and renders the first media resource using the first canvas. In addition, after obtaining the URL of the first media resource, the client determines that the first media resource carries a preset type identifier, that is, the first multi-body resource belongs to the preset type, then draws a mask on the second canvas, adds a mosaic cover on the mask, and displays the first media resource with the mosaic cover through the first canvas and the second canvas.
[0072] In actual applications, when the client receives a preset sliding operation on the display page of the first media resource, it obtains the sliding track area corresponding to the preset sliding operation and the historical sliding track area on the second canvas, and re-renders the mosaic mask in the area other than the above sliding track area on the second canvas, presenting the effect of erasing the mosaic mask following the sliding operation and redisplaying part of the content of the first media resource.
[0073] In the embodiment of the present disclosure, by triggering a sliding operation on a display page of a first media resource rendered with a mosaic cover, the mosaic cover of the first media resource can be removed based on the sliding trajectory, thereby enriching the interactive functions related to the media resource.
[0074] Building on the above embodiment, to further enrich the interactive functionality of media resources, interactive controls can also be displayed on the display page of the first media resource. These interactive controls may include a capture control. As shown in Figure 2, capture control 201 is used to trigger the display of a capture page, allowing the user to capture the media resource based on the capture page. After the user captures the media resource or performs other preset interactive operations, all screen areas of the first media resource switch to a third display state, such as a clear display state.
[0075] In one optional embodiment, in response to a press event during a preset sliding operation on a first media resource in a first display state, the interactive control is hidden on the media resource display page. Furthermore, in response to a lift event corresponding to the press event during the preset sliding operation, the interactive control is redisplayed on the media resource display page.
[0076] To facilitate user interaction, the display of the capture control on the media resource display page can be controlled by pre-set slide action press and release events. Upon receiving a pre-set slide action press event, the capture control can be hidden, i.e., not displayed on the media resource display page, to reduce interference with the response to the pre-set slide action. Upon receiving a pre-set slide action release event, indicating that the pre-set slide action is complete, the capture control can be redisplayed on the media resource display page.
[0077] In some embodiments, the shooting control can also remain displayed in the media resource display page, for example, in response to a press event in a preset sliding operation on the first media resource in the first display state, the shooting control is set outside the media resource screen area or displayed in a draggable manner, or the original other buttons in the media resource display page are replaced with the shooting control, so as to facilitate the shooting of works.
[0078] In an optional embodiment, the media resource display page may also display the identifier of the user who published the first media resource, such as the user's image identifier 202 shown in FIG2 , and interactive prompt information 203, such as "Try scratching and sneak a peek at your friends' works." Similarly, to reduce interference with the response to the preset sliding operation, the disclosed embodiment may also control the display of the identifier of the user who published the first media resource and the interactive prompt information on the media resource display page through the press and release events of the preset sliding operation. The specific control method can be referred to above and will not be repeated here.
[0079] In addition, for the shooting control displayed on the media resource display page, if a trigger operation is received for the shooting control, the shooting page can be displayed, and the second media resource can be obtained based on the shooting page. For the obtained second media resource, the user can edit it and then publish it, or publish it directly. If a successful publishing message is received for the second media resource, it is possible to jump back to the display page of the first media resource and display the first media resource based on the first canvas, that is, the preset cover layer is no longer rendered on the second canvas, and the user can directly view the content of the first media resource on the display page of the first media resource, thereby achieving the effect of unlocking the content display of the first media resource by shooting and publishing the media resource, further enriching the interactive function of the media resource.
[0080] Based on the above method embodiment, the present disclosure further provides a media resource processing device. Referring to FIG5 , which is a schematic structural diagram of a media resource processing device provided in an embodiment of the present disclosure, the device includes:
[0081] A first display module 501 is configured to display a first media resource in a first display state on a media resource display page;
[0082] The first switching module 502 is used to respond to a preset sliding operation acting on the first media resource in the first display state, and switch the media resource area corresponding to the sliding track area of the preset sliding operation in the first media resource in the first display state from the first display state to the second display state.
[0083] In an optional implementation manner, the first display module is specifically configured to:
[0084] On a media resource display page, a first media resource is displayed based on at least two canvases; wherein, the at least two canvases include a first canvas and a second canvas, the first canvas is located below the second canvas, the first canvas is used to render the content of the first media resource, and the second canvas is used to render a preset cover layer, and the preset cover layer is used to cover the content of the first media resource.
[0085] In an optional implementation, the first switching module includes:
[0086] a first determining submodule, configured to determine a target rendering area on the second canvas in response to a preset sliding operation on the first media resource in the first display state; wherein the target rendering area includes an area on the second canvas excluding a sliding track area;
[0087] A rendering submodule is configured to re-render the preset cover layer on the second canvas based on the target rendering area.
[0088] In an optional implementation, the first determining submodule includes:
[0089] an acquisition submodule, configured to, in response to a preset sliding operation on the first media resource in the first display state, acquire a current sliding track area corresponding to the preset sliding operation and a historical sliding track area on the second canvas, and determine the current sliding track area and the historical sliding track area as a sliding track area;
[0090] The second determining submodule is configured to determine a target rendering area on the second canvas based on the sliding track area.
[0091] In an optional embodiment, the device further includes:
[0092] An updating module is used to update the historical sliding track area using the sliding track area.
[0093] In an optional embodiment, an interactive control is displayed on the media resource display page, and the interactive control is used to trigger the display of the shooting page. The device further includes:
[0094] a hiding and displaying module, configured to hide and display the interactive control on the media resource display page in response to a press event in a preset sliding operation on the first media resource in the first display state;
[0095] A redisplay module is configured to redisplay the interactive control on the media resource display page in response to a lift event corresponding to the press event in the preset sliding operation.
[0096] In an optional implementation, the interactive control includes a shooting control, and the device further includes:
[0097] a shooting module, configured to display a shooting page in response to a triggering operation on the shooting control, and obtain a second media resource based on the shooting page;
[0098] The second display module is configured to display the first media resource in the second display state on the media resource display page in response to a publishing success message for the second media resource.
[0099] In an optional embodiment, the device further includes:
[0100] The acquisition module is configured to acquire a first media resource from a server in response to an acquisition operation for a media resource; wherein the first media resource carries a preset type identifier, and the preset type identifier is used to identify that the first media resource belongs to a preset type.
[0101] In an optional embodiment, the device further includes:
[0102] The second switching module is configured to switch the media resource area corresponding to the sliding track area from the second display state to the first display state in response to a preset end condition being currently satisfied.
[0103] In the media resource processing device provided by the embodiment of the present disclosure, a first media resource in a first display state is displayed on a media resource display page. When a preset sliding operation is received on the first media resource in the first display state, a media resource area corresponding to the sliding track area of the preset sliding operation in the first media resource in the first display state is switched from the first display state to the second display state. It can be seen that in the embodiment of the present disclosure, by triggering the preset sliding operation on the first media resource in the first display state, the effect of switching the display state of the corresponding media resource area based on the sliding track area can be achieved, thereby enriching the interactive functions related to the media resources and improving the interactivity of the work.
[0104] In addition to the above-mentioned method and apparatus, the embodiments of the present disclosure further provide a computer-readable storage medium, which stores instructions. When the instructions are executed on a terminal device, the terminal device implements the media resource processing method described in the embodiments of the present disclosure.
[0105] The embodiments of the present disclosure further provide a computer program product, which includes a computer program / instructions. When the computer program / instructions are executed by a processor, the media resource processing method described in the embodiments of the present disclosure is implemented.
[0106] In addition, the embodiment of the present disclosure further provides a media resource processing device, as shown in FIG6 , which may include:
[0107] Processor 601, memory 602, input device 603, and output device 604. The number of processors 601 in the media resource processing device can be one or more, and Figure 6 uses one processor as an example. In some embodiments of the present disclosure, the processor 601, memory 602, input device 603, and output device 604 can be connected via a bus or other means, wherein Figure 6 uses the bus connection as an example.
[0108] The memory 602 can be used to store software programs and modules. The processor 601 executes various functional applications and data processing of the media resource processing device by running the software programs and modules stored in the memory 602. The memory 602 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc. In addition, the memory 602 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage device. The input device 603 can be used to receive input digital or character information, and to generate signal input related to user settings and function control of the media resource processing device.
[0109] Specifically in this embodiment, the processor 601 will load the executable files corresponding to the processes of one or more applications into the memory 602 according to the following instructions, and the processor 601 will run the applications stored in the memory 602, thereby realizing the various functions of the above-mentioned media resource processing device.
[0110] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.
[0111] The foregoing description is intended only to provide specific embodiments of the present disclosure, intended to enable those skilled in the art to understand and implement the present disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure is not intended to be limited to the embodiments described herein, but rather to be construed in the broadest manner consistent with the principles and novel features disclosed herein.
Claims
1. A method for displaying media resources, comprising: Displaying a first media resource in a first display state on a media resource display page; In response to a preset sliding operation on the first media resource in the first display state, a media resource area corresponding to a sliding track area of the preset sliding operation in the first media resource in the first display state is switched from the first display state to a second display state.
2. The method according to claim 1, wherein: The step of displaying the first media resource in the first display state on the media resource display page includes: On a media resource display page, a first media resource is displayed based on at least two canvases; wherein the at least two canvases include a first canvas and a second canvas, the first canvas is located at a lower layer of the second canvas, the first canvas is used to render the content of the first media resource, and the second canvas is used to render a preset cover layer, and the preset cover layer is used to cover the content of the first media resource.
3. The method according to claim 2, wherein: In response to a preset sliding operation on the first media resource in the first display state, switching a media resource area corresponding to a sliding track area of the preset sliding operation in the first media resource in the first display state from the first display state to a second display state includes: In response to a preset sliding operation on the first media resource in the first display state, determining a target rendering area on the second canvas; wherein the target rendering area includes an area on the second canvas excluding a sliding track area; Based on the target rendering area, the preset cover layer is re-rendered on the second canvas.
4. The method according to claim 3, wherein: The determining, in response to a preset sliding operation on the first media resource in the first display state, a target rendering area on the second canvas includes: In response to a preset sliding operation on the first media resource in the first display state The present invention relates to a sliding operation of the present invention, wherein the present sliding track area corresponds to the preset sliding operation, and the historical sliding track area on the second canvas, and the present sliding track area and the historical sliding track area are determined as the sliding track area; A target rendering area on the second canvas is determined based on the sliding track area.
5. The method according to claim 4, wherein: After determining the current sliding track area and the historical sliding track area as the sliding track area, the method further includes: The historical sliding track area is updated using the sliding track area.
6. The method according to claim 1, wherein: The media resource display page displays an interactive control, and the interactive control is used to trigger the display of a shooting page. The method further includes: In response to a pressing event in a preset sliding operation on the first media resource in the first display state, hiding and displaying the interactive control on the media resource display page; In response to a lift event corresponding to the press event in the preset sliding operation, the interactive control is redisplayed on the media resource display page.
7. The method according to claim 6, wherein: The interactive control includes a shooting control, and the method further includes: In response to a trigger operation on the shooting control, displaying a shooting page, and acquiring a second media resource based on the shooting page; In response to a publishing success message for the second media resource, the first media resource in the second display state is displayed on the media resource display page.
8. The method according to claim 1, wherein: Before displaying the first media resource in the first display state on the media resource display page, the method further includes: In response to an acquisition operation for a media resource, a first media resource is acquired from a server; wherein the first media resource carries a preset type identifier, and the preset type identifier is used to identify that the first media resource belongs to a preset type.
9. The method according to claim 1, wherein: The method further comprises: In response to the preset end condition being met, the media resource area corresponding to the sliding track area is switched from the second display state to the first display state; wherein, The preset end condition includes that the triggering time point of the preset sliding operation corresponding to the sliding track area is not less than a preset time length from the current time or the number of sliding track areas is not less than a preset number.
10. A media resource processing device, comprising: A first display module, configured to display a first media resource in a first display state on a media resource display page; The first switching module is used to respond to a preset sliding operation acting on the first media resource in the first display state, and switch the media resource area corresponding to the sliding track area of the preset sliding operation in the first media resource in the first display state from the first display state to the second display state.
11. A computer-readable storage medium, wherein instructions are stored in the computer-readable storage medium. When the instructions are executed on a terminal device, the terminal device implements the method according to any one of claims 1 to 9.
12. A media resource processing device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the actions implemented include: Displaying a first media resource in a first display state on a media resource display page; In response to a preset sliding operation on the first media resource in the first display state, a media resource area corresponding to a sliding track area of the preset sliding operation in the first media resource in the first display state is switched from the first display state to a second display state.
13. The device according to claim 12, wherein: The step of displaying the first media resource in the first display state on the media resource display page includes: On a media resource display page, a first media resource is displayed based on at least two canvases; wherein the at least two canvases include a first canvas and a second canvas, the first canvas is located at a lower layer of the second canvas, the first canvas is used to render the content of the first media resource, and the second canvas is used to render a preset cover layer, and the preset cover layer is used to cover the content of the first media resource.
14. The apparatus according to claim 12, wherein: In response to a preset sliding operation on the first media resource in the first display state, switching a media resource area corresponding to a sliding track area of the preset sliding operation in the first media resource in the first display state from the first display state to a second display state includes: In response to a preset sliding operation on the first media resource in the first display state, determining a target rendering area on the second canvas; wherein the target rendering area includes an area on the second canvas excluding a sliding track area; Based on the target rendering area, the preset cover layer is re-rendered on the second canvas.
15. The device according to claim 14, wherein: The determining, in response to a preset sliding operation on the first media resource in the first display state, a target rendering area on the second canvas includes: In response to a preset sliding operation on the first media resource in the first display state, obtaining a current sliding track area corresponding to the preset sliding operation and a historical sliding track area on the second canvas, and determining the current sliding track area and the historical sliding track area as a sliding track area; A target rendering area on the second canvas is determined based on the sliding track area.
16. The device according to claim 15, wherein: After determining the current sliding track area and the historical sliding track area as sliding track areas, the action further includes: The historical sliding track area is updated using the sliding track area.
17. The apparatus according to claim 12, wherein: The media resource display page displays an interactive control, and the interactive control is used to trigger the display of a shooting page. The method further includes: In response to a pressing event in a preset sliding operation on the first media resource in the first display state, hiding and displaying the interactive control on the media resource display page; In response to a lift event corresponding to the press event in the preset sliding operation, the interactive control is redisplayed on the media resource display page.
18. The apparatus according to claim 17, wherein: The interactive control includes a shooting control, and the method further includes: In response to a trigger operation on the shooting control, displaying a shooting page, and acquiring a second media resource based on the shooting page; In response to a publishing success message for the second media resource, the first media resource in the second display state is displayed on the media resource display page.
19. The apparatus according to claim 12, wherein: Before displaying the first media resource in the first display state on the media resource display page, the action further includes: In response to an acquisition operation for a media resource, a first media resource is acquired from a server; wherein the first media resource carries a preset type identifier, and the preset type identifier is used to identify that the first media resource belongs to a preset type.
20. The apparatus of claim 12, wherein: The actions also include: In response to currently satisfying the preset end condition, the media resource area corresponding to the sliding track area is switched from the second display state to the first display state; wherein the preset end condition includes that the triggering time point of the preset sliding operation corresponding to the sliding track area is not less than a preset duration from the current time or the number of sliding track areas is not less than a preset number.
Citation Information
Patent Citations
Media resource processing method and device, equipment and storage medium
CN118672697A
Method and device for gradually presenting image display content, equipment and storage medium
CN111221461A
Information presentation corresponding to content purposing masks
US20140304650A1
