Page display method and device and electronic equipment

By determining the effective display area of ​​block-level elements in the video processing page and rendering the target thumbnail, the problem of low rendering efficiency and lag in the video processing page is solved, and the user experience is significantly improved.

CN118606587APending Publication Date: 2024-09-06BEIJING BAIDU NETCOM SCI & TECH CO LTD

Patent Information

Application Number
CN202410788352.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-18
Publication Date
2024-09-06

AI Technical Summary

Technical Problem

In video processing pages, especially in online video editing tools, the rendering of a large number of thumbnails in the video track results in low page rendering efficiency, prone to freezing, and affects the user experience.

Method used

By determining the effective display area of ​​block-level elements in the video processing page, and selecting the corresponding target thumbnail from the video thumbnail for rendering, the number of http requests is reduced, request blocking is avoided, and page rendering efficiency is improved.

Benefits of technology

It effectively improves page rendering efficiency, avoids lags during page display, and improves user experience, especially when there are a large number of video thumbnails.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118606587A
    Figure CN118606587A
Patent Text Reader

Abstract

The invention provides a page display method and device and electronic equipment, and relates to the technical field of computers, in particular to the technical field of page display, video processing and the like. According to the specific implementation scheme, an effective display area of block-level elements in a video processing page is determined; wherein the block-level element is a container of a video track in a video processing page and is used for placing a video thumbnail of a video to be processed; determining a target thumbnail corresponding to the effective display area from the video thumbnails; wherein the target thumbnail is used for rendering at a position corresponding to the effective display area in the video processing page, and a rendered page is obtained and displayed. Under the condition that the number of the video thumbnails of the to-be-processed video is large, only the target thumbnails corresponding to the effective display areas of the block-level elements in the video thumbnails of the to-be-processed video can be rendered, so that the number of the to-be-rendered video thumbnails is reduced, the page rendering efficiency is improved, the lagging phenomenon during page display is avoided, and the user experience is improved. And the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, specifically to technical fields such as page display and video processing, and in particular to a page display method, device and electronic device. Background Art

[0002] Usually, in a video processing page, such as a page of an online video editing tool, a thumbnail of the video to be edited can be displayed in the video track, so that the user can easily locate a frame of the video to be edited. In the case of a large number of video thumbnails, it takes a long time to render the page. Therefore, for such pages, how to improve the rendering efficiency of the page and avoid the jamming phenomenon when the page is displayed is a problem that needs to be solved. Summary of the invention

[0003] The present disclosure provides a page display method, device and electronic device.

[0004] According to one aspect of the present disclosure, a page display method is provided, the method comprising: determining an effective display area of ​​a block-level element in a video processing page; wherein the block-level element is a container of a video track in the video processing page, and is used to place a video thumbnail of a video to be processed; determining a target thumbnail corresponding to the effective display area from the video thumbnail; wherein the target thumbnail is used to render at a position corresponding to the effective display area in the video processing page, and obtain and display the rendered page.

[0005] According to another aspect of the present disclosure, a page display device is provided, the device comprising: a first determination module, used to determine the effective display area of ​​a block-level element in a video processing page; wherein the block-level element is a container of a video track in the video processing page, and is used to place a video thumbnail of a video to be processed; a second determination module, used to determine a target thumbnail corresponding to the effective display area from the video thumbnail; wherein the target thumbnail is used to render at a position corresponding to the effective display area in the video processing page, to obtain a rendered page and display it.

[0006] According to another aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the page display method proposed above in the present disclosure.

[0007] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable a computer to execute the page display method proposed above in the present disclosure.

[0008] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps of the page display method proposed above in the present disclosure are implemented.

[0009] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.

[0011] Figure 1 is a schematic diagram according to a first embodiment of the present disclosure;

[0012] Figure 2 This is an example diagram of the area where the block-level elements are located and the effective display area;

[0013] Figure 3 is a schematic diagram according to a second embodiment of the present disclosure;

[0014] Figure 4 is a schematic diagram according to a third embodiment of the present disclosure;

[0015] Figure 5 is a schematic diagram according to a fourth embodiment of the present disclosure;

[0016] Figure 6 It is a block diagram of an electronic device for page display used to implement the embodiment of the present disclosure. DETAILED DESCRIPTION

[0017] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0018] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information are all carried out with the user's consent, comply with the relevant laws and regulations, and do not violate public order and good morals.

[0019] Usually, in a video processing page, such as an online video editing tool page, a thumbnail of the video to be edited can be displayed in the video track, so that the user can easily locate a frame of the video to be edited. The video track is used to place video materials, and each video track can be controlled independently, allowing multiple video layers to be superimposed, such as background video and foreground animation or graphics.

[0020] The related technology usually extracts frames from all the images of the video to be processed, generates thumbnails of the video according to a certain time interval, such as a few seconds, and the browser renders the thumbnails in the page by loading the img tag (a tag used to define and embed images in the hypertext markup language HTML) to realize the preview of the thumbnails.

[0021] However, for videos with a long duration, a large number of thumbnails will be generated according to the above frame extraction method, and a large number of thumbnails will have a large number of img tags, thereby generating a large number of img nodes (image element nodes) in the DOM (Document Object Model) document, which consumes a lot of performance of the page rendering device such as the browser, and easily leads to low page rendering efficiency. In addition, for an img tag, the page rendering device such as the browser will initiate an http request to the server, and a large number of img tags will initiate a large number of http requests, which will greatly cause request blocking and increase page loading time.

[0022] Therefore, a large number of thumbnails consumes a lot of rendering performance of page rendering devices such as browsers, which will lead to low page rendering efficiency, causing page freezes, and bringing poor user experience. For the above video processing page, how to improve the rendering efficiency of the page and avoid freezes when the page is displayed is a problem that needs to be solved.

[0023] In view of the above problems, the present disclosure provides a page display method, device and electronic device.

[0024] Figure 1 is a schematic diagram according to the first embodiment of the present disclosure. It should be noted that the page display method of the embodiment of the present disclosure can be applied to a page display device, which can be an electronic device or can be configured in an electronic device, and the present disclosure does not limit this. The page display device can be, for example, an online video editing tool.

[0025] Among them, the electronic device can be any device with computing capabilities, such as a personal computer (PC), a mobile terminal, a server, etc. The mobile terminal can be, for example, a vehicle-mounted device, a mobile phone, a tablet computer, a personal digital assistant, a wearable device, a smart speaker, and other hardware devices with various operating systems, touch screens and / or display screens.

[0026] like Figure 1 As shown, the page display method may include the following steps:

[0027] Step 101, determining the effective display area of ​​the block-level element in the video processing page, wherein the block-level element is a container of the video track in the video processing page, and is used to place the video thumbnail of the video to be processed.

[0028] The video processing page is a page to be rendered for performing video processing, such as an online video editing page to be rendered.

[0029] The block-level element is a container element of HTML, which can be a div, and is used to provide structural and style encapsulation for the content in the HTML document. It can occupy a single line in the page and can contain other HTML elements, such as text, images, lists, other div elements, etc. Among them, the full name of div is divider (division) or division (partition). In the embodiment of the present disclosure, the block-level element can be used as a container for the video track in the video processing page to place the video thumbnail of the video to be processed.

[0030] The video thumbnail of the video to be processed may be a video thumbnail that has been generated, which may be generated by extracting frames from the video to be processed or by other methods, which is not limited in the present disclosure. The number of video thumbnails of the video to be processed may be one or more, which is not limited in the present disclosure.

[0031] In the embodiments of the present disclosure, the effective display area of ​​a block-level element may include the display area of ​​the block-level element on the display interface. The display interface is an interface for displaying a page. For example, when the page display device is an online video editing tool, the display interface may be the display interface of the browser where the online video editing tool is located. The display area of ​​a block-level element on the display interface is the visible area of ​​the block-level element. In the case where the block-level element overflows the display interface, the effective display area of ​​the block-level element may include a portion of the area where the block-level element is located; in the case where the block-level element does not overflow the display interface, the effective display area of ​​the block-level element may include the entire area where the block-level element is located.

[0032] Among them, when there are a large number of video thumbnails placed in a block-level element, the size of the block-level element is usually large, and the block-level element is prone to overflowing the display interface.

[0033] Alternatively, in an embodiment of the present disclosure, the effective display area of ​​a block-level element may include the display area of ​​the block-level element on the display interface and an extended area of ​​a preset size around the display area. The preset size may be set as needed, for example, it may be a preset multiple of the size of the display interface. In the case where a block-level element overflows the display interface, by setting an appropriate preset size, the effective display area of ​​the block-level element may include a portion of the area where the block-level element is located; in the case where the block-level element does not overflow the display interface, the effective display area of ​​the block-level element may include the entire area where the block-level element is located.

[0034] The extended area is an area obtained by expanding the display area, and the extension method can be set as needed, which is not limited in the present disclosure.

[0035] For example, reference Figure 2 , assuming that the area where the block-level element is located is Figure 2 The blank area + dotted area + horizontal line area in the display interface, the display area of ​​the block-level element on the display interface is Figure 2 The effective display area of ​​the block-level element can be Figure 2 Alternatively, the display area can be expanded to obtain Figure 2 The extended area shown in the horizontal line area uses the dotted area + horizontal line area as the effective display area of ​​the block-level element.

[0036] In an embodiment of the present disclosure, the display area of ​​the block-level element on the display interface can be determined first, and then the effective display area can be determined based on the display area, such as determining the display area as the effective display area, or determining the display area and an extended area of ​​a preset size around the display area as the effective display area.

[0037] Step 102, determining a target thumbnail corresponding to the effective display area from the video thumbnails; wherein the target thumbnail is used to render at a position corresponding to the effective display area in the video processing page, and a rendered page is obtained and displayed.

[0038] The target thumbnail may include the video thumbnails that are wholly or partially within the effective display area among all the video thumbnails placed in the block-level element. In the case where the effective display area includes a part of the area where the block-level element is located, the target thumbnail is a part of the video thumbnails among all the video thumbnails of the video to be processed.

[0039] In an embodiment of the present disclosure, the page display device can determine the target thumbnail as the video thumbnail to be rendered, so that the browser or other page rendering device can load the target thumbnail and render the target thumbnail at a position corresponding to the effective display area in the video processing page to obtain the rendered page, and display the rendered page on the display interface.

[0040] It can be understood that when there are a large number of video thumbnails for the videos to be processed, by only determining the target thumbnail corresponding to the effective display area of ​​the block-level element in the video thumbnails for the videos to be processed as the video thumbnail to be rendered, the number of http requests can be reduced, and request blocking can be avoided, thereby reducing page loading time, improving page rendering efficiency, and avoiding freezes when the page is displayed.

[0041] The page display method of the disclosed embodiment determines the effective display area of ​​the block-level element in the video processing page; wherein the block-level element is a container of the video track in the video processing page, and is used to place the video thumbnail of the video to be processed; the target thumbnail corresponding to the effective display area is determined from the video thumbnail; wherein the target thumbnail is used to render at a position corresponding to the effective display area in the video processing page, and the rendered page is obtained and displayed. Therefore, in the case where there are a large number of video thumbnails of the video to be processed, only the target thumbnail corresponding to the effective display area of ​​the block-level element in the video thumbnail of the video to be processed can be rendered, thereby reducing the number of video thumbnails to be rendered, improving the page rendering efficiency, avoiding the jamming phenomenon when the page is displayed, and improving the user experience.

[0042] In addition, it is understandable that when the rendered page is displayed on the display interface, for block-level elements, except for the display area, other areas will overflow the display interface, and the expansion area of ​​preset size around the display area is the page area that will enter the display interface for display when the display area is displayed on the display interface. By setting the effective display area to include the display area of ​​the block-level element on the display interface and the expansion area of ​​preset size around the display area when determining the video thumbnail to be rendered, and then determining the target thumbnail corresponding to the effective display area as the video thumbnail to be rendered, and rendering to obtain the rendered page, it is possible to render the video thumbnail to be displayed in advance when displaying the video thumbnail in the display area, so that when the user drags the page, the video thumbnail can be displayed instantly, avoiding the phenomenon of page freeze when the user drags the page, and improving the user experience.

[0043] In order to clearly explain the process of determining a target thumbnail corresponding to a valid display area from video thumbnails of a video to be processed, an embodiment of the present disclosure further provides a page display method.

[0044] like Figure 3 As shown, Figure 3 is a schematic diagram according to a second embodiment of the present disclosure, Figure 3 The illustrated embodiment may include the following steps:

[0045] Step 301, determining the effective display area of ​​the block-level element in the video processing page; wherein the block-level element is a container of the video track in the video processing page, and is used to place multiple video thumbnails of the video to be processed.

[0046] Step 302: Obtain the layout of the multiple video thumbnails in the block-level element and the size information of the multiple video thumbnails.

[0047] The multiple video thumbnails here are multiple video thumbnails of the video to be processed.

[0048] Among them, the layout of multiple video thumbnails in the block-level element can be set as needed.

[0049] For example, the area where the block-level element is located is usually a rectangular area, and the layout of multiple video thumbnails in the block-level element may include the following: multiple video thumbnails are arranged in order horizontally or vertically in the block-level element. Figure 2 In the blank area + dotted area + horizontal line area, multiple video thumbnails can be Figure 2 The block-level elements shown are arranged in order in the horizontal direction.

[0050] The size information of the multiple video thumbnails may be the same or different, and the disclosure does not limit this. The size information of the multiple video thumbnails may be the original size information of the multiple video thumbnails, or the size information after scaling the multiple video thumbnails, and the disclosure does not limit this.

[0051] Step 303: Obtain the relative position information of the effective display area in the area where the block-level element is located.

[0052] Among them, the relative position information can be determined and stored when determining the effective display area of ​​the block-level element in the video processing page in step 301, so that the page display device can obtain the pre-stored relative position information, or the relative position information can also be determined at other times, and the present disclosure does not limit this.

[0053] In the embodiment of the present disclosure, when a block-level element overflows the display interface and the block-level element moves relative to the effective display area, the relative position information can be determined based on the moving direction and moving distance of the block-level element relative to the effective display area and the initial position. The initial position is the position of the effective display area in the area where the block-level element is located when the block-level element has not moved relative to the effective display area.

[0054] It is understandable that, when a block-level element overflows the display interface, the block-level element can be moved relative to the display interface, while the position of the effective display area relative to the display interface is fixed, so the block-level element can be moved relative to the effective display area. In the disclosed embodiment, when the block-level element does not move relative to the effective display interface, the position of the effective display area in the area where the block-level element is located is referred to as the initial position.

[0055] The initial position can be set as needed. Figure 2 For example, when the block-level element does not move relative to the effective display interface, the effective display area can be set to the leftmost position of the area where the block-level element is located, that is, the left border of the effective display area coincides with the left border of the area where the block-level element is located, and the distance between the right border of the effective display area and the left border of the border where the block-level element is located is equal to the width of the effective display area.

[0056] Furthermore, when the block-level element moves relative to the effective display area, the relative position information of the effective display area in the area where the block-level element is located can be determined based on the moving direction, moving distance and initial position of the block-level element relative to the effective display area.

[0057] Wherein, when the layout of the multiple video thumbnails in the block-level element is as follows: the multiple video thumbnails are arranged in sequence in the horizontal direction or the vertical direction in the block-level element, the moving direction can be parallel to the arrangement direction of the multiple video thumbnails in the block-level element. By making the moving direction of the block-level element parallel to the arrangement direction of the multiple video thumbnails in the block-level element, the multiple video thumbnails can be displayed in the arrangement order of the multiple video thumbnails in the block-level element.

[0058] In the embodiment of the present disclosure, the movement event (also called scrolling event) of the block-level element may be monitored, and the movement distance and movement direction of the block-level element may be determined based on the event information.

[0059] For example, Figure 2For example, assuming that the block-level element has not moved relative to the effective display interface, the effective display area is at the leftmost position of the area where the block-level element is located, that is, the left border of the effective display area coincides with the left border of the area where the block-level element is located, and the distance between the right border of the effective display area and the left border of the border where the block-level element is located is equal to the width of the effective display area. The block-level element can move to the left in the horizontal direction relative to the effective display area. Among them, the width of the effective display area is 180px (pixels). Then, when the block-level element moves relative to the effective display area, and the moving direction is to move to the left in the horizontal direction, and the moving distance is 200px, the relative position information of the effective display area in the area where the block-level element is located can be determined based on the moving direction and moving distance of the block-level element relative to the effective display area and the initial position. Among them, the relative position information can be expressed in the following way, for example: the distance between the left border of the effective display area and the left border of the area where the block-level element is located is 200px, and the distance between the right border of the effective display area and the left border of the border where the block-level element is located is 380px.

[0060] Therefore, when a block-level element overflows the display interface, the relative position information of the effective display area in the area where the block-level element is located can be accurately determined according to the movement of the block-level element relative to the effective display area.

[0061] Step 304, based on the layout mode, size information and relative position information, determine the target thumbnail from the video thumbnails; wherein the target thumbnail is used to render at a position corresponding to the effective display area in the video processing page, obtain the rendered page and display it.

[0062] In the embodiment of the present disclosure, taking the layout of multiple video thumbnails in a block-level element as follows: multiple video thumbnails are arranged in sequence in the horizontal direction or vertical direction in the block-level element, the movement direction of the block-level element relative to the effective display area is parallel to the arrangement direction of the multiple video thumbnails in the block-level element, and the effective display area is a rectangular area as an example, the relative position information may include distance information between the first side and the second side of the effective display area and the reference side of the area where the block-level element is located, wherein the first side, the second side and the reference side are perpendicular to the arrangement direction of the multiple video thumbnails in the block-level element. Among them, the reference side may be any side of the area where the block-level element is located that is perpendicular to the arrangement direction of the multiple video thumbnails in the block-level element. Among them, the first side or the second side may be any side of the effective display area that is perpendicular to the arrangement direction of the multiple video thumbnails in the block-level element.

[0063] Among them, Figure 2For example, multiple video thumbnails can be arranged in order along the horizontal direction in the block-level element, the moving direction of the block-level element relative to the effective display area can be horizontal, the first side and the second side of the effective display area can be the left border and the right border of the effective display area, respectively, and the reference side of the area where the block-level element is located can be the left border of the area where the block-level element is located. The relative position information can include the distance information between the left border and the right border of the effective display area and the left border of the area where the block-level element is located.

[0064] Accordingly, step 304 can be implemented in the following manner:

[0065] Based on the layout, size information and distance information, a first video thumbnail corresponding to the first side and a second video thumbnail corresponding to the second side are determined from multiple video thumbnails, and a target thumbnail is determined based on the first video thumbnail, the second video thumbnail and the layout.

[0066] The distance information here includes the distance information between the first side and the second side of the effective display area and the reference side of the area where the block-level element is located.

[0067] The first video thumbnail is a video thumbnail located at the first side among the multiple video thumbnails, and the second video thumbnail is a video thumbnail located at the second side among the multiple video thumbnails.

[0068] In an embodiment of the present disclosure, taking the layout of multiple video thumbnails in a block-level element as follows: multiple video thumbnails are arranged sequentially in a horizontal direction or a vertical direction in a block-level element as an example, the first video thumbnail, the second video thumbnail, and the video thumbnail between the first video thumbnail and the second video thumbnail can be determined as target thumbnails.

[0069] Combine the following Figure 2 , a method for determining a first video thumbnail corresponding to a first side and a second video thumbnail corresponding to a second side from a plurality of video thumbnails based on the layout mode, size information, and distance information under the above layout mode is described. It is assumed that the plurality of video thumbnails are arranged from left to right in the block-level element, and the index of the leftmost video thumbnail is 1.

[0070] Assuming that the distance between the first side of the effective display area (i.e., the left border of the effective display area) and the reference side of the area where the block-level element is located (i.e., the left border of the area where the block-level element is located) is 200px, the distance between the second side of the effective display area (i.e., the right border of the effective display area) and the reference side of the area where the block-level element is located is 380px, and the width of each video thumbnail is 25px, the index of the first video thumbnail corresponding to the first side can be obtained by rounding down the ratio of the distance between the first side and the reference side of the area where the block-level element is located to the width of the video thumbnail, which is 8, and the index of the second video thumbnail corresponding to the second side can be obtained by rounding up the ratio of the distance between the second side and the reference side of the area where the block-level element is located to the width of the video thumbnail, which is 16. Therefore, the video thumbnails with indices 8 to 16 can be determined as target thumbnails.

[0071] Therefore, it is possible to accurately determine the target thumbnail from the video thumbnails when the effective display area is a rectangular area, the layout is that multiple video thumbnails are arranged in sequence horizontally or vertically in the block-level element, the moving direction is parallel to the arrangement direction of the multiple video thumbnails in the block-level element, and the relative position information includes the distance information between the first side and the second side of the effective display area and the reference side of the area where the block-level element is located.

[0072] It should be noted that similar steps in the embodiment of the present disclosure and other embodiments may be used in other embodiments and will not be described in detail here.

[0073] The page display method of the embodiment of the present disclosure determines the effective display area of ​​the block-level element in the video processing page; wherein the block-level element is a container of the video track in the video processing page, and is used to place multiple video thumbnails of the video to be processed; obtains the layout mode of the multiple video thumbnails in the block-level element and the size information of the multiple video thumbnails; obtains the relative position information of the effective display area in the area where the block-level element is located; based on the layout mode, size information and relative position information, determines the target thumbnail from the video thumbnails; wherein the target thumbnail is used to render at a position corresponding to the effective display area in the video processing page, and obtains the rendered page and displays it. Therefore, when there are a large number of video thumbnails for the video to be processed, the target thumbnail corresponding to the effective display area can be accurately determined from the multiple video thumbnails of the video to be processed based on the layout of the multiple video thumbnails in the block-level elements, the size information of the multiple video thumbnails and the relative position information of the effective display area in the area where the block-level elements are located. Then, only the target thumbnail corresponding to the effective display area of ​​the block-level element in the video thumbnails of the video to be processed can be accurately rendered, thereby reducing the number of video thumbnails to be rendered, improving page rendering efficiency, avoiding freezes when the page is displayed, and improving user experience.

[0074] Through the above analysis, it can be seen that in the embodiments of the present disclosure, the page rendering efficiency can be improved by reducing the number of video thumbnails to be rendered, thereby avoiding the jamming phenomenon when the page is displayed. Furthermore, the page rendering efficiency can be further improved by using the target thumbnail corresponding to the effective display area of ​​the block-level element as the background image of the block-level element. Figure 4 , further illustrating the page display method provided in the embodiment of the present disclosure.

[0075] Figure 4 is a schematic diagram according to a third embodiment of the present disclosure, Figure 4 As shown, the page display method may include the following steps:

[0076] Step 401, determining the effective display area of ​​the block-level element in the video processing page; wherein the block-level element is a container of the video track in the video processing page, and is used to place multiple video thumbnails of the video to be processed.

[0077] Step 402, obtaining the size of the effective display area and the size of the block-level element.

[0078] In the embodiment of the present disclosure, the effective display area of ​​the block-level element may include the display area of ​​the block-level element on the display interface. Accordingly, the size of the effective display area may be determined according to the size of the display interface.

[0079] Alternatively, in an embodiment of the present disclosure, the effective display area of ​​a block-level element may include the display area of ​​the block-level element on the display interface and an extended area of ​​a preset size around the display area. Accordingly, the size of the effective display area may be determined based on the size of the display interface and the size of the extended area.

[0080] In the embodiment of the present disclosure, the size of the block-level element may be a preset size, or may be determined according to the number of video thumbnails placed therein, the layout method in the block-level element, and the size information of the video thumbnails.

[0081] Step 403: When the size of the effective display area is not less than the size of the block-level element, multiple video thumbnails are determined as target thumbnails.

[0082] It is understandable that, when the number of video thumbnails of the video to be processed is small, the size of the effective display area may not be less than the size of the block-level element. In this case, all video thumbnails placed in the block-level element can be determined as target thumbnails. Thus, when the number of video thumbnails of the video to be processed is small, the target thumbnail corresponding to the effective display area can be quickly determined.

[0083] Step 404: when the size of the effective display area is smaller than the size of the block-level element, obtain the layout of the multiple video thumbnails in the block-level element and the size information of the multiple video thumbnails.

[0084] Step 405: Obtain the relative position information of the effective display area in the area where the block-level element is located.

[0085] Step 406, determining a target thumbnail from the video thumbnails based on the layout mode, size information, and relative position information.

[0086] Therefore, when the size of the effective display area is smaller than the size of the block-level element, the target thumbnail corresponding to the effective display area can be accurately determined from multiple video thumbnails of the video to be processed based on the layout mode, size information and relative position information. When the size of the effective display area is smaller than or not smaller than the size of the block-level element, different methods can be flexibly used to determine the target thumbnail corresponding to the effective display area.

[0087] Step 407, configure the target thumbnail as the background image of the block-level element, and configure the display position of the target thumbnail to be the corresponding position of the effective display area, so as to render the target thumbnail at the corresponding position of the effective display area in the form of a background image, obtain the rendered page and display it.

[0088] In an embodiment of the present disclosure, a page display device can determine a target thumbnail as a video thumbnail to be rendered, and configure the target thumbnail as a background image of a block-level element, and configure the display position of the target thumbnail to be a corresponding position of an effective display area, so that a browser or other page rendering device can load the target thumbnail as a background image, and render the target thumbnail as a background image at a corresponding position of the effective display area in a video processing page, to obtain a rendered page, and display the rendered page on a display interface.

[0089] In the disclosed embodiment, an HTML document may be pre-generated, in which a background image is set for a block-level element through CSS (Cascading Style Sheets), and the parameters of the background image are pre-set to preset values. The parameters of the background image may include background-image (background image parameter, used to specify an image to be used as the background image), background-size (background image size parameter, used to adjust the size of the background image), background-repeat (background image repetition parameter, used to specify whether the background image is repeated and how to repeat, to prevent the background image from being tiled when it is too small), background-position (background image position parameter, used to specify the position of the background image), etc.

[0090] After the page display device determines the target thumbnail as the video thumbnail to be rendered, the preset values ​​of the parameters of the background image in the HTML document can be updated, such as updating the preset values ​​of the background image parameters based on the storage location information of the target thumbnail, updating the preset values ​​of the background image position parameters based on the location information of the corresponding position of the effective display area, and updating the preset values ​​of the background image size parameters based on the actual size required to be displayed on the display interface of the target thumbnail, thereby generating a new HTML document. Among them, by updating the preset values ​​of the background image parameters based on the storage location information of the target thumbnail, the target thumbnail can be configured as the background image of the block-level element, and by updating the preset values ​​of the background image position parameters based on the location information of the corresponding position of the effective display area, the display position of the target thumbnail can be configured to be the corresponding position of the effective display area.

[0091] Furthermore, a browser or other page rendering device can parse the HTML document. When parsing the parameter information of block-level elements and background images of block-level elements, the parameter information of block-level elements and their background images can be added to the DOM document, and based on the storage location information of the target thumbnail in the parameter information of the background image, an HTTP request corresponding to each target thumbnail is sent to the server, and then the image data of each target thumbnail is received from the server, and then based on the image data and the parameter information of the background image in the DOM document, such as the information of the background image position parameters, the information of the background image size parameters, the information of the background image repetition parameters, etc., the target thumbnail is rendered at the corresponding position of the effective display area in the video processing page to obtain the rendered page, and the rendered page is displayed on the display interface.

[0092] By using the target thumbnail as the background image of the block-level element, the block-level element is only one DOM node in the DOM document, thereby reducing the number of DOM nodes in the DOM document and improving the rendering performance of the browser or other page rendering devices. By reducing the number of video thumbnails to be rendered, the number of HTTP requests is reduced, request blocking is avoided, the page loading time is reduced, and the jamming phenomenon when the page is displayed is avoided, thereby improving the user experience.

[0093] It should be noted that similar steps in the embodiment of the present disclosure and other embodiments may be used in other embodiments and will not be described in detail here.

[0094] In order to implement the above embodiment, the present disclosure also provides a page display device. Figure 5 As shown, Figure 5 The page display device 500 may include: a first determination module 501 and a second determination module 502 .

[0095] The first determination module 501 is used to determine the effective display area of ​​the block-level element in the video processing page; wherein the block-level element is a container of the video track in the video processing page, and is used to place the video thumbnail of the video to be processed;

[0096] The second determination module 502 is used to determine the target thumbnail corresponding to the effective display area from the video thumbnail; wherein the target thumbnail is used to render at a position corresponding to the effective display area in the video processing page, and the rendered page is obtained and displayed.

[0097] As a possible implementation of the embodiment of the present disclosure, the number of video thumbnails is multiple; the second determination module 502 includes:

[0098] A first acquisition unit is used to acquire a layout mode of multiple video thumbnails in a block-level element and size information of the multiple video thumbnails;

[0099] A second acquisition unit is used to acquire relative position information of the effective display area in the area where the block-level element is located;

[0100] The first determining unit is used to determine a target thumbnail from the video thumbnails based on a layout mode, size information, and relative position information.

[0101] As a possible implementation method of an embodiment of the present disclosure, when a block-level element moves relative to an effective display area, the relative position information is determined based on the moving direction and distance of the block-level element relative to the effective display area and the initial position, wherein the initial position is the position of the effective display area in the area where the block-level element is located when the block-level element has not moved relative to the effective display area.

[0102] As a possible implementation method of the embodiment of the present disclosure, the layout method includes: multiple video thumbnails are arranged in sequence horizontally or vertically in a block-level element, and the moving direction is parallel to the arrangement direction of the multiple video thumbnails in the block-level element.

[0103] As a possible implementation of the embodiment of the present disclosure, the effective display area is a rectangular area, and the relative position information includes distance information between the first side and the second side of the effective display area and the reference side of the area where the block-level element is located, and the first side, the second side and the reference side are perpendicular to the arrangement direction of the multiple video thumbnails in the block-level element;

[0104] The first determining unit includes:

[0105] A determination subunit is used to determine a first video thumbnail corresponding to a first side and a second video thumbnail corresponding to a second side from a plurality of video thumbnails based on a layout mode, size information, and distance information, and to determine a target thumbnail based on the first video thumbnail, the second video thumbnail, and the layout mode.

[0106] As a possible implementation of the embodiment of the present disclosure, the second determining module 502 further includes:

[0107] A third acquisition unit is used to acquire the size of the effective display area and the size of the block-level element;

[0108] The second determining unit is used to determine that the size of the effective display area is smaller than the size of the block-level element.

[0109] As a possible implementation of the embodiment of the present disclosure, the second determining module 502 further includes:

[0110] The third determining unit is used to determine the multiple video thumbnails as target thumbnails when it is determined that the size of the effective display area is not less than the size of the block-level element.

[0111] As a possible implementation of the embodiment of the present disclosure, the page display device 500 further includes:

[0112] The configuration module is used to configure the target thumbnail as the background image of the block-level element, and configure the display position of the target thumbnail to the corresponding position of the effective display area, so as to render the target thumbnail at the corresponding position of the effective display area by means of the background image.

[0113] As a possible implementation manner of the embodiment of the present disclosure, the effective display area includes a display area of ​​the block-level element on the display interface and an expansion area of ​​a preset size around the display area.

[0114] The page display device of the disclosed embodiment determines the effective display area of ​​the block-level element in the video processing page; wherein the block-level element is a container of the video track in the video processing page, and is used to place the video thumbnail of the video to be processed; the target thumbnail corresponding to the effective display area is determined from the video thumbnail; wherein the target thumbnail is used to render at a position corresponding to the effective display area in the video processing page, and the rendered page is obtained and displayed. Therefore, in the case where there are a large number of video thumbnails of the video to be processed, only the target thumbnail corresponding to the effective display area of ​​the block-level element in the video thumbnail of the video to be processed can be rendered, thereby reducing the number of video thumbnails to be rendered, improving the page rendering efficiency, avoiding the jamming phenomenon when the page is displayed, and improving the user experience.

[0115] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.

[0116] Figure 6 A schematic block diagram of an example electronic device 600 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0117] like Figure 6 As shown, the device 600 includes a computing unit 601, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 602 or a computer program loaded from a storage unit 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the device 600 can also be stored. The computing unit 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0118] A number of components in the device 600 are connected to the I / O interface 605, including: an input unit 606, such as a keyboard, a mouse, etc.; an output unit 607, such as various types of displays, speakers, etc.; a storage unit 608, such as a disk, an optical disk, etc.; and a communication unit 609, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 609 allows the device 600 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0119] The computing unit 601 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 601 performs the various methods and processes described above, such as a page display method. For example, in some embodiments, the page display method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 608. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 600 via ROM 602 and / or communication unit 609. When the computer program is loaded into RAM 603 and executed by the computing unit 601, one or more steps of the page display method described above may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured to perform the page display method in any other appropriate manner (e.g., by means of firmware).

[0120] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0121] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0122] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0123] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0124] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0125] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.

[0126] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0127] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A page display method, wherein: The method comprises: Determine the effective display area of ​​the block-level element in the video processing page; wherein the block-level element is a container of the video track in the video processing page, and is used to place the video thumbnail of the video to be processed; A target thumbnail corresponding to the effective display area is determined from the video thumbnail; wherein the target thumbnail is used to render at a position corresponding to the effective display area in the video processing page, and a rendered page is obtained and displayed.

2. The method according to claim 1, wherein: The number of the video thumbnails is multiple; and determining the target thumbnail corresponding to the effective display area from the video thumbnails includes: Obtaining a layout mode of the plurality of video thumbnails in the block-level element and size information of the plurality of video thumbnails; Obtaining relative position information of the effective display area in the area where the block-level element is located; The target thumbnail is determined from the video thumbnails based on the layout mode, the size information and the relative position information.

3. The method according to claim 2, wherein: When the block-level element moves relative to the effective display area, the relative position information is determined based on the moving direction and distance of the block-level element relative to the effective display area and the initial position, wherein the initial position is the position of the effective display area in the area where the block-level element is located when the block-level element has not moved relative to the effective display area.

4. The method according to claim 3, wherein: The layout method includes: the plurality of video thumbnails are sequentially arranged in the block-level element along a horizontal direction or a vertical direction, and the moving direction is parallel to the arrangement direction of the plurality of video thumbnails in the block-level element.

5. The method according to claim 4, wherein: The effective display area is a rectangular area, and the relative position information includes distance information between a first side and a second side of the effective display area and a reference side of the area where the block-level element is located, respectively, and the first side, the second side and the reference side are perpendicular to an arrangement direction of the plurality of video thumbnails in the block-level element; The determining the target thumbnail from the video thumbnails based on the layout mode, the size information, and the relative position information includes: Based on the layout, the size information and the distance information, the first video thumbnail corresponding to the first side and the second video thumbnail corresponding to the second side are determined from the multiple video thumbnails, and based on the first video thumbnail, the second video thumbnail and the layout, the target thumbnail is determined.

6. The method according to any one of claims 2 to 5, wherein: Before determining the target thumbnail from the video thumbnails based on the layout mode, the size information and the relative position information, the method further includes: Get the size of the effective display area and the size of the block-level element; It is determined that the size of the effective display area is smaller than the size of the block-level element.

7. The method according to claim 6, wherein: The method further comprises: When it is determined that the size of the effective display area is not less than the size of the block-level element, the plurality of video thumbnails are determined as the target thumbnails.

8. The method according to any one of claims 2 to 5, wherein: The method further comprises: The target thumbnail is configured as the background image of the block-level element, and the display position of the target thumbnail is configured as the corresponding position of the effective display area, so as to render the target thumbnail at the corresponding position of the effective display area in a background image manner.

9. The method according to any one of claims 1 to 5, wherein: The effective display area includes a display area of ​​the block-level element on the display interface and an expansion area of ​​a preset size around the display area.

10. A page display device, comprising: A first determination module is used to determine the effective display area of ​​the block-level element in the video processing page; wherein the block-level element is a container of the video track in the video processing page, and is used to place the video thumbnail of the video to be processed; The second determination module is used to determine the target thumbnail corresponding to the effective display area from the video thumbnail; wherein the target thumbnail is used to render at a position corresponding to the effective display area in the video processing page, obtain a rendered page and display it.

11. The device according to claim 10, wherein: The number of the video thumbnails is multiple; the second determination module includes: A first acquisition unit is used to acquire a layout mode of the plurality of video thumbnails in the block-level element and size information of the plurality of video thumbnails; A second acquisition unit, used for acquiring relative position information of the effective display area in the area where the block-level element is located; The first determining unit is used to determine the target thumbnail from the video thumbnails based on the layout mode, the size information and the relative position information.

12. The device according to claim 11, wherein When the block-level element moves relative to the effective display area, the relative position information is determined based on the moving direction and distance of the block-level element relative to the effective display area and the initial position, wherein the initial position is the position of the effective display area in the area where the block-level element is located when the block-level element has not moved relative to the effective display area.

13. The device according to claim 12, wherein: The layout method includes: the plurality of video thumbnails are sequentially arranged in the block-level element along a horizontal direction or a vertical direction, and the moving direction is parallel to the arrangement direction of the plurality of video thumbnails in the block-level element.

14. The device according to claim 13, wherein: The effective display area is a rectangular area, and the relative position information includes distance information between a first side and a second side of the effective display area and a reference side of the area where the block-level element is located, respectively, and the first side, the second side and the reference side are perpendicular to an arrangement direction of the plurality of video thumbnails in the block-level element; The first determining unit includes: A determination subunit is used to determine, based on the layout mode, the size information and the distance information, a first video thumbnail corresponding to the first side and a second video thumbnail corresponding to the second side from the multiple video thumbnails, and to determine the target thumbnail based on the first video thumbnail, the second video thumbnail and the layout mode.

15. The device according to any one of claims 11 to 14, wherein: The second determining module further includes: A third acquisition unit, used to acquire the size of the effective display area and the size of the block-level element; The second determining unit is configured to determine that the size of the effective display area is smaller than the size of the block-level element.

16. The device according to claim 15, wherein: The second determining module further includes: The third determining unit is used to determine the plurality of video thumbnails as the target thumbnails when it is determined that the size of the effective display area is not less than the size of the block-level element.

17. The device according to any one of claims 11 to 14, wherein: The device also includes: A configuration module is used to configure the target thumbnail as the background image of the block-level element, and configure the display position of the target thumbnail to be the corresponding position of the effective display area, so as to render the target thumbnail at the corresponding position of the effective display area in the form of a background image.

18. The device according to any one of claims 10 to 14, wherein: The effective display area includes a display area of ​​the block-level element on the display interface and an expansion area of ​​a preset size around the display area.

19. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 9.

20. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 9.

21. A computer program product comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Video processing method and device, storage medium and program product

    CN113747240A

  • multimedia communication device with touch screen responding to gestures for control, manipulation and editing of media files

    DE202007014957U1

  • Controls and Interfaces for User Interactions in Virtual Spaces

    US20180095636A1

Cited By

  • Webpage video playing optimization method and device, equipment and storage medium

    CN121284298A