CN108021671B - Page transparent processing method and device - Google Patents

Page transparent processing method and device Download PDF

Info

Publication number
CN108021671B
CN108021671B CN201711275096.2A CN201711275096A CN108021671B CN 108021671 B CN108021671 B CN 108021671B CN 201711275096 A CN201711275096 A CN 201711275096A CN 108021671 B CN108021671 B CN 108021671B
Authority
CN
China
Prior art keywords
video
web page
playing
browser
target web
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201711275096.2A
Other languages
Chinese (zh)
Other versions
CN108021671A (en
Inventor
徐佳宏
毛建会
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Ipanel TV Inc
Original Assignee
Shenzhen Ipanel TV Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Ipanel TV Inc filed Critical Shenzhen Ipanel TV Inc
Priority to CN201711275096.2A priority Critical patent/CN108021671B/en
Publication of CN108021671A publication Critical patent/CN108021671A/en
Application granted granted Critical
Publication of CN108021671B publication Critical patent/CN108021671B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9577Optimising the visualization of content, e.g. distillation of HTML documents

Abstract

The invention discloses a transparent processing method and a transparent processing device for a page.A corresponding target web page is loaded and executed if a browser receives a display instruction of the web page in the process of playing a video, the browser displays the target web page and acquires a playing window parameter of the video being played; and according to the playing window parameter of the video being played, transparently processing the web page after the display processing. Therefore, through the improvement of the browser, after the target web page is loaded by the browser, the target web page is transparently processed according to the playing window parameter of the video being played, and the video picture can not be shielded no matter whether the web page is transparently processed before being loaded by the browser or not.

Description

Page transparent processing method and device
Technical Field
The invention relates to the field of page processing, in particular to a page transparent processing method and device.
Background
When a video is played, if a web page needs to be displayed, the web page usually covers the video page being played, and in this case, a user can only hear the sound of the video and cannot see the video picture.
In order to solve the above problems, currently, when a web page is developed, a transparent background projection is filled in an area where a video is to be played or a background pattern is set to be transparent according to needs when page codes are written. Thus, when the video and the web page are overlapped, the video picture can be seen through the transparent background of the web page.
However, this method depends on the development of the web page, and there is still a problem that the web page covers the video screen for the web page for which the transparent setting is not performed.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for transparently processing a page, which solve the problem in the prior art that a web page covers a video picture after a browser loads a web page that is not transparently set.
The embodiment of the invention discloses a video display method, which comprises the following steps:
in the video playing process, if a browser receives a display instruction of a web page, loading a target web page corresponding to the display instruction;
the browser displays the target web page;
the browser acquires a playing window parameter of the video;
and the browser transparently processes the web page after the display processing according to the playing window parameters of the video.
Optionally, the parameters of the playing window include: and playing the coordinates and the size of the window of the video.
Optionally, the displaying, by the browser, the target web page includes:
analyzing the target web page;
performing page layout on the target web page;
and performing layered rendering on the target web page after the page layout.
Optionally, the transparently processing the rendered web page according to the playing window parameter of the video includes:
determining a transparent processing area of the target web page after the display processing according to the playing position and the size of the video;
and performing transparent processing on each pixel point in the transparent processing area of the target web page after the display processing.
Optionally, the method further includes:
after the browser receives a video playing instruction, acquiring a video playing resource;
and the browser saves the video playing window parameters in the video playing resources.
The embodiment of the invention discloses a video display device, which comprises:
the loading unit is used for loading a target web page corresponding to a display instruction if the browser receives the display instruction of the web page in the video playing process;
the display processing unit is used for displaying the target web page by the browser;
a first obtaining unit, configured to obtain, by the browser, a play window parameter of the video;
and the transparent processing unit is used for the browser to perform transparent processing on the web page after the display processing according to the playing window parameter of the video.
Optionally, the parameters of the playing window include: and playing the coordinates and the size of the window of the video.
Optionally, the display processing unit includes:
the analysis subunit is used for analyzing the target web page;
the page layout subunit is used for performing page layout on the target web page;
and the layered rendering subunit is used for performing layered rendering on the target web page after the page layout.
Optionally, the transparent processing unit includes:
the determining subunit is used for determining a transparent processing area of the target web page after the display processing according to the playing position and the size of the video;
and the transparent processing subunit is used for performing transparent processing on each pixel point in the transparent processing area of the target web page after the display processing.
Optionally, the method further includes:
the second acquisition unit is used for acquiring the playing resource of the video after the browser receives a playing instruction of the video;
and the storage unit is used for storing the playing window parameters of the video in the playing resources of the video by the browser.
In the transparent processing method and device for the page, provided by the embodiment of the invention, in the process of video playing, if a browser receives a display instruction of a web page, a target web page corresponding to the display execution is loaded, the browser performs display processing on the target web page, and acquires a playing window parameter of a video being played; and according to the playing window parameter of the video being played, transparently processing the web page after the display processing. Therefore, through the improvement of the browser, after the target web page is loaded by the browser, the target web page is transparently processed according to the playing window parameter of the video being played, and the video picture can not be shielded no matter whether the web page is transparently processed before being loaded by the browser or not.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 illustrates a video occlusion diagram provided by an embodiment of the invention;
fig. 2 is a schematic flowchart illustrating a page transparency processing method according to an embodiment of the present invention;
FIG. 3 is a schematic diagram illustrating a page hierarchy provided by an embodiment of the present invention;
fig. 4 is a schematic flowchart illustrating a page transparency processing method according to an embodiment of the present invention;
FIG. 5 shows a schematic view of a scene after transparency processing;
fig. 6 is a schematic structural diagram illustrating a page transparency processing apparatus according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
To facilitate understanding of the present solution, some techniques encountered in the present embodiment are explained:
the middleware is the core software of the set-top box, and comprises: the system comprises a browser, a video player and a dvd code stream parser.
Wherein, the functions realized by the middleware can include: video playing and web page display;
for video playing, when video playing is required, the browser obtains a video playing address and other video playing information by analyzing a webpage, and sends the video playing address and other video playing information to the player, and the video player requests a video playing resource, processes a video to be played, and outputs the video to a related memory area corresponding to a video layer.
For web page display, when a page needs to be displayed, a browser loads the page, analyzes, arranges and renders the page, and outputs pixel points of the rendered image to an OSD layer. The OSD layer is a pixel point which is divided by the system and used for storing an image generated by rendering a page by a browser.
Referring to fig. 1, the OSD layer is located above the video layer, and in case that the OSD layer and the video layer have pixel data at the same time, an image of the OSD layer blocks an image of the video layer.
Referring to fig. 2, a flowchart of a transparent processing method for a page according to an embodiment of the present invention is shown, where in this embodiment, the method includes:
s101: in the video playing process, if a browser receives a display instruction of a web page, loading a target web page corresponding to the display instruction;
s102: the browser displays the target web page;
in this embodiment, after receiving a display instruction of a web page, a browser needs to load a target display page, but before displaying the page on a terminal device, operations such as page layout and rendering need to be performed on the target display page, specifically, S102 includes:
analyzing the target web page;
performing page layout on the target web page;
and performing layered rendering on the target web page after the page layout.
In this embodiment, when the target web page is rendered, the target web page is divided into a plurality of tag layers according to the attributes of the elements of the page and the dependency relationship of the attributes, and the target web page is rendered in layers, specifically, one layer is rendered from bottom to top. After rendering, the upper label layer may overlay the lower label layer after rendering.
For example, the following steps are carried out: referring to fig. 3, assume that the results after the target page is layered include: the bottom layer is a body label layer, the middle layer is a div label layer, and the top layer is a text label layer; when performing layered rendering, the rendering order may be: body tag layer-div tag layer-text tag layer.
When each label layer is rendered, each label layer is rendered according to different contents contained in each layer. Specifically, when a certain layer is rendered, a background picture or a background color of the layer may be rendered first, and then information such as a foreground picture, a foreground color, or characters of the label layer may be rendered.
S103: acquiring a playing window parameter of the video;
in this embodiment, the video mentioned in S103 is a video that is being played after being processed by the browser when the browser receives a display instruction of a web page.
In order to ensure that the browser can quickly retrieve the playing window parameter of the video being played when transparently processing the web page, and after the resource of the video is obtained, the playing window parameter of the video is saved, specifically, the method further includes:
when the browser receives a playing instruction of the video, obtaining a playing resource of the video;
and the browser saves the video playing window parameters in the video playing resources.
The video playing window parameters comprise: and playing the window coordinates and the window size of the video.
For example, the following steps are carried out: the playing window parameter of the video can be represented by (x, y, w, h), where x represents: the number of pixels to the left of the upper left corner of the screen, y denotes: the number of pixels below the screen; w represents: the width of the window; h denotes the height of the window. The position and size of the window for playing the video can be represented by the above parameters.
In this embodiment, the playing window parameters of the video are stored in the browser, and when the web page needs to be transparently processed according to the playing parameters, the playing window parameters of the video can be conveniently and quickly called.
It should be noted that the obtaining of the play window parameter may be obtained when the step of parsing the target web page in S102 is executed, and specifically, the execution process may be:
analyzing the target web page and acquiring the playing window parameter of the video;
performing page layout on the target web page;
and performing layered rendering on the target web page after the page layout.
S104: and performing transparent processing on the web page after the display processing according to the playing window parameter of the video.
In this embodiment, in order to ensure that a video picture being played is not blocked when a page is displayed, a position area corresponding to a playing window parameter of a video is found in a rendered web page, and all pixel points in the position area are transparently processed, specifically, referring to fig. 4, S104 includes:
s201: determining a transparent processing area of the target web page after the display processing according to the playing position and the size of the video;
s202: and performing transparent processing on each pixel point in the transparent processing area of the target web page after the display processing.
For example, the following steps are carried out: suppose the video has playback window position and size information of (100,100,200,200), i.e., 100 pixels to the left from the top left of the screen, 100 pixels to the bottom of the screen, a window width of 200 pixels, and a window height of 200 pixels. And finding (100,200,200,200) a corresponding position in the target web page after the display processing, wherein the position is a transparent processing area, and performing transparent processing on each pixel point in the transparent processing area.
The pixel value of each pixel point can be represented as (a, R, G, B), R, G, B represent the value of three primary colors, the value range is 0-255, a represents the transparent bit, the value range is 0-255,0 represents that the pixel point is transparent, 255 represents that the pixel point is opaque, and after the transparent processing area is determined, the transparent positions 0 of all the pixel points in the transparent processing area can be determined.
In this embodiment, referring to fig. 5, after the transparent region is transparently processed, the target web page on the OSD layer does not block the video frame on the video layer.
Therefore, through the improvement of the browser, after the target web page is loaded by the browser, the target web page is transparently processed according to the playing window parameter of the video being played, and the video picture can not be shielded no matter whether the web page is transparently processed before being loaded by the browser or not.
Referring to fig. 6, a schematic structural diagram of a page transparency processing apparatus according to an embodiment of the present invention is shown, in this embodiment, the apparatus includes:
the loading unit 301 is configured to, in a video playing process, load a target web page corresponding to a display instruction if a browser receives the display instruction of the web page;
a display processing unit 302, configured to perform display processing on the target web page by the browser;
a first obtaining unit 303, configured to obtain, by the browser, a playing window parameter of the video;
and a transparent processing unit 304, configured to transparently process, by the browser, the web page after the display processing according to the playing window parameter of the video.
Optionally, the parameters of the playing window include: and playing the coordinates and the size of the window of the video.
Optionally, the display processing unit includes:
the analysis subunit is used for analyzing the target web page;
the page layout subunit is used for performing page layout on the target web page;
and the layered rendering subunit is used for performing layered rendering on the target web page after the page layout.
Optionally, the transparent processing unit includes:
the determining subunit is used for determining a transparent processing area of the target web page after the display processing according to the playing position and the size of the video;
and the transparent processing subunit is used for performing transparent processing on each pixel point in the transparent processing area of the target web page after the display processing.
Optionally, the method further includes:
the second acquisition unit is used for acquiring the playing resource of the video after the browser receives a playing instruction of the video;
and the storage unit is used for storing the playing window parameters of the video in the playing resources of the video by the browser.
Through the device of the embodiment, after the target web page is loaded by the browser, the target web page is transparently processed according to the playing window parameter of the video being played by modifying the browser, so that no matter whether the web page is transparently processed before being loaded by the browser or not, the video picture can not be shielded.
It should be noted that, in the present specification, the embodiments are all described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (6)

1. A page transparent processing method is characterized by comprising the following steps:
in the video playing process, if a browser receives a display instruction of a web page, loading a target web page corresponding to the display instruction;
the browser displays the target web page;
the browser acquires a playing window parameter of the video, wherein the playing window parameter comprises: playing the window coordinates and the size of the video;
the browser transparently processes the web page after the display processing according to the playing window parameter of the video;
wherein, the transparently processing the rendered web page according to the playing window parameter of the video comprises:
determining a transparent processing area of the target web page after the display processing according to the playing position and the size of the video;
and performing transparent processing on each pixel point in the transparent processing area of the target web page after the display processing.
2. The method of claim 1, wherein the browser performs display processing on the target web page, and comprises:
analyzing the target web page;
performing page layout on the target web page;
and performing layered rendering on the target web page after the page layout.
3. The method of claim 1, further comprising:
after the browser receives a video playing instruction, acquiring a video playing resource;
and the browser saves the video playing window parameters in the video playing resources.
4. A page transparency processing apparatus, comprising:
the loading unit is used for loading a target web page corresponding to a display instruction if the browser receives the display instruction of the web page in the video playing process;
the display processing unit is used for displaying the target web page by the browser;
a first obtaining unit, configured to obtain, by the browser, a play window parameter of the video, where the play window parameter includes: playing the window coordinates and the size of the video;
the transparent processing unit is used for the browser to perform transparent processing on the web page after the display processing according to the playing window parameter of the video;
wherein the transparent processing unit includes:
the determining subunit is used for determining a transparent processing area of the target web page after the display processing according to the playing position and the size of the video;
and the transparent processing subunit is used for performing transparent processing on each pixel point in the transparent processing area of the target web page after the display processing.
5. The apparatus of claim 4, wherein the display processing unit comprises:
the analysis subunit is used for analyzing the target web page;
the page layout subunit is used for performing page layout on the target web page;
and the layered rendering subunit is used for performing layered rendering on the target web page after the page layout.
6. The apparatus of claim 4, further comprising:
the second acquisition unit is used for acquiring the playing resource of the video after the browser receives a playing instruction of the video;
and the storage unit is used for storing the playing window parameters of the video in the playing resources of the video by the browser.
CN201711275096.2A 2017-12-06 2017-12-06 Page transparent processing method and device Active CN108021671B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711275096.2A CN108021671B (en) 2017-12-06 2017-12-06 Page transparent processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711275096.2A CN108021671B (en) 2017-12-06 2017-12-06 Page transparent processing method and device

Publications (2)

Publication Number Publication Date
CN108021671A CN108021671A (en) 2018-05-11
CN108021671B true CN108021671B (en) 2022-04-15

Family

ID=62078623

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711275096.2A Active CN108021671B (en) 2017-12-06 2017-12-06 Page transparent processing method and device

Country Status (1)

Country Link
CN (1) CN108021671B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110719517B (en) * 2018-07-11 2021-08-13 视联动力信息技术股份有限公司 Video stream display method and device
CN111866597B (en) * 2019-04-30 2023-06-23 百度在线网络技术(北京)有限公司 Method, system and storage medium for controlling layout of page elements in video
CN110650352B (en) * 2019-09-06 2020-12-08 四川天邑康和通信股份有限公司 Video processing method of IPTV browser
CN113038225B (en) * 2019-12-25 2024-01-12 阿里巴巴集团控股有限公司 Video playing method, device, computing equipment and storage medium
CN111372137B (en) * 2020-03-13 2022-11-29 青岛海信宽带多媒体技术有限公司 Method and device for automatically correcting player state by browser and display equipment
CN112738562B (en) * 2020-12-24 2023-05-16 深圳市创维软件有限公司 Method, device and computer storage medium for transparent display of browser page
CN113676766A (en) * 2021-09-02 2021-11-19 中国电信股份有限公司 Browser video display method and device, storage medium and electronic equipment
CN114697726A (en) * 2022-03-15 2022-07-01 青岛海信宽带多媒体技术有限公司 Page display method with video window and intelligent set top box

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1501712A (en) * 2002-11-12 2004-06-02 北京中视联数字系统有限公司 A method for implementing graphics context hybrid display
CN101076077A (en) * 2007-06-18 2007-11-21 中兴通讯股份有限公司 Method, system and network for realizing scroll caption on IPTV set top box
CN101763846A (en) * 2008-12-25 2010-06-30 北京联想软件有限公司 Method and device for realizing rolling captions on electronic device
CN102158666A (en) * 2010-04-21 2011-08-17 青岛海信传媒网络技术有限公司 Method and device for displaying rolling subtitles
CN106201390A (en) * 2015-05-29 2016-12-07 三星电子株式会社 Method and the electronic installation of support the method for output screen
CN107404663A (en) * 2017-06-06 2017-11-28 晨星半导体股份有限公司 A kind of terminal device of television program playing method and correlation

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107295390A (en) * 2017-08-10 2017-10-24 青岛海信电器股份有限公司 Television pages switching method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1501712A (en) * 2002-11-12 2004-06-02 北京中视联数字系统有限公司 A method for implementing graphics context hybrid display
CN101076077A (en) * 2007-06-18 2007-11-21 中兴通讯股份有限公司 Method, system and network for realizing scroll caption on IPTV set top box
CN101763846A (en) * 2008-12-25 2010-06-30 北京联想软件有限公司 Method and device for realizing rolling captions on electronic device
CN102158666A (en) * 2010-04-21 2011-08-17 青岛海信传媒网络技术有限公司 Method and device for displaying rolling subtitles
CN106201390A (en) * 2015-05-29 2016-12-07 三星电子株式会社 Method and the electronic installation of support the method for output screen
CN107404663A (en) * 2017-06-06 2017-11-28 晨星半导体股份有限公司 A kind of terminal device of television program playing method and correlation

Also Published As

Publication number Publication date
CN108021671A (en) 2018-05-11

Similar Documents

Publication Publication Date Title
CN108021671B (en) Page transparent processing method and device
CN108052565B (en) Transparent processing method and device for page
CN109978972B (en) Method and device for editing characters in picture
US9558542B2 (en) Method and device for image processing
US20230164382A1 (en) Moving video tags
CN110377264B (en) Layer synthesis method, device, electronic equipment and storage medium
CN106484080B (en) Display interface display method, device and equipment
US20230367953A1 (en) Display rendering method and system
CN104995622A (en) Compositor support for graphics functions
CN110806847A (en) Distributed multi-screen display method, device, equipment and system
US10043298B2 (en) Enhanced document readability on devices
CN113891167A (en) Screen projection method and electronic equipment
CN107071574A (en) Intelligent television method for page jump
CN108255562B (en) Page jump method and device
CN105389308B (en) Webpage display processing method and device
CN109976865B (en) Task progress display method and device and terminal equipment
CN107193815B (en) Page code processing method, device and equipment
CN111477183A (en) Reader refresh method, computing device, and computer storage medium
CN105677674B (en) Dynamic display method and device for page filling content
CN112738562B (en) Method, device and computer storage medium for transparent display of browser page
CN111147909A (en) Data processing method and device and set top box
CN107273072B (en) Picture display method and device and electronic equipment
CN115391692A (en) Video processing method and device
CN114666621A (en) Page processing method, device and equipment
CN114367113A (en) Method, apparatus, medium, and computer program product for editing virtual scene

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant