Disclosure of Invention
The embodiment of the invention provides a method, a device, a system, equipment and a medium for isolated playback of a webpage video, and provides a new technology for synchronously playing an isolated video at a client of a user browser, so as to meet the requirement of safe internet surfing.
In a first aspect, an embodiment of the present invention provides a method for isolated playback of a web page video, where the method is performed by a remote web page isolation subsystem, and the method includes:
when a webpage access request sent by a browser client is intercepted, a target webpage is acquired instead of the browser client according to the webpage access request, and at least one audio/video stream matched with the target webpage is acquired and stored;
generating a simulated webpage matched with the target webpage, and feeding back the simulated webpage to the browser client, wherein the simulated webpage comprises video playing controls respectively corresponding to each audio and video stream;
responding to the selection of a browser client aiming at a target video playing control in the simulated webpage, acquiring a target audio and video stream matched with the target video playing control, and allocating a video playing address for the target audio and video stream;
and sending the target audio and video stream and the video playing address to the video service system, and sending the video playing address to the browser client so as to instruct the browser client to acquire the target audio and video stream subjected to audio and video processing by the video service system through the video playing address and play the target audio and video stream at the client.
In a second aspect, an embodiment of the present invention further provides an isolated playback apparatus for web page video, executed by a remote web page isolation subsystem, the apparatus including:
the audio and video stream storage module is used for replacing the browser client to acquire a target webpage according to a webpage access request when the webpage access request sent by the browser client is intercepted, and acquiring and storing at least one audio and video stream matched with the target webpage;
the simulated webpage feedback module is used for generating a simulated webpage matched with the target webpage and feeding the simulated webpage back to the browser client, wherein the simulated webpage comprises video playing controls respectively corresponding to each audio and video stream;
the video playing address allocation module is used for responding to the selection of the browser client aiming at a target video playing control in the simulated webpage, acquiring a target audio and video stream matched with the target video playing control and allocating a video playing address for the target audio and video stream;
and the video playing address sending module is used for sending the target audio and video stream and the video playing address to the video service system and sending the video playing address to the browser client so as to instruct the browser client to obtain the target audio and video stream subjected to audio and video processing by the video service system through the video playing address and play the target audio and video stream at the client.
In a third aspect, an embodiment of the present invention further provides an isolated playback system for a web page video, where the system includes: the system comprises a remote webpage isolation subsystem, a video service system and a browser client;
the remote webpage isolation subsystem is used for realizing the isolated playback method of the webpage video according to any embodiment of the invention;
the video service system is used for receiving a target audio and video stream and a video playing address sent by the remote webpage isolation system, carrying out audio and video processing on the target audio and video stream, and acquiring and storing the processed target audio and video stream;
the browser client is used for receiving the imitated web page fed back by the remote isolation subsystem and selecting a target video playing control in the imitated web page; and
the system is used for receiving a video playing address sent by the remote webpage isolation system, and acquiring a target audio and video stream subjected to audio and video processing by the video service system through the video playing address to play at the client.
In a fourth aspect, an embodiment of the present invention further provides an electronic device, where the electronic device includes:
one or more processors;
storage means for storing one or more programs;
when the one or more programs are executed by the one or more processors, the one or more processors implement the isolated playback method for web page video according to any embodiment of the present invention.
In a fifth aspect, the embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the isolated playback method for web page video according to any embodiment of the present invention.
According to the method, when a webpage access request sent by a browser client is intercepted by a remote webpage isolation subsystem, the target webpage is acquired by replacing the browser client according to the webpage access request, and at least one audio/video stream matched with the target webpage is acquired and stored; generating a simulated webpage matched with the target webpage, and feeding back the simulated webpage comprising the video playing controls respectively corresponding to each audio and video stream to the browser client; responding to the selection of a browser client aiming at a target video playing control in the simulated webpage, acquiring a target audio and video stream matched with the target video playing control, and allocating a video playing address for the target audio and video stream; the method comprises the steps of sending a target audio and video stream and a video playing address to a video service system, and sending the video playing address to a browser client so as to instruct the browser client to obtain the target audio and video stream subjected to audio and video processing by the video service system through the video playing address to play on the client, so that the problem that the isolated video cannot be synchronously played on a user browser client in the prior art is solved, a new technology capable of synchronously playing the isolated video on the user browser client is provided, and the requirement of safe internet surfing is met.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a flowchart of a method for isolated playback of a web video according to an embodiment of the present invention, where this embodiment is applicable to a case where a user browser client plays back a video after the video in a web page is isolated by an isolation system, and the method may be executed by a remote web isolation subsystem, and the method may be executed by an isolated playback apparatus for a web video, where the apparatus may be implemented by software and/or hardware, and may be generally integrated in an isolated playback system for a web video, and specifically includes the following steps:
s110, when a webpage access request sent by a browser client is intercepted, the browser client is replaced to obtain a target webpage according to the webpage access request, and at least one audio and video stream matched with the target webpage is obtained and stored.
The web page access request may be an access request initiated by a browser client for a certain web page. The target webpage may refer to a webpage that the browser client needs to access, and the target webpage corresponds to the webpage access request. The audio and video stream may refer to transmission information of audio and video data corresponding to a video element included in the page information of the target web page.
Optionally, the remote web page isolation subsystem may intercept a web page access request sent by the browser client, access and acquire a target web page instead of the browser client according to the web page access request, and acquire at least one piece of audio/video stream information from the page information of the target web page to store the information.
In an optional implementation manner of this embodiment, when a web page access request sent by a browser client is intercepted, according to the web page access request, acquiring a target web page instead of the browser client, and acquiring at least one audio/video stream matched with the target web page for storage, may include: according to the webpage access request, a browser engine replaces the browser client to obtain a target webpage, and page information of the target webpage is detected; and when the page information is detected to contain at least one video element, acquiring audio and video stream information respectively corresponding to each video element from a server corresponding to a target webpage for storage according to a captured video code added in advance in a browser engine.
Specifically, when a webpage access request sent by a browser client is intercepted, a browser engine in a remote webpage isolation subsystem can be used for accessing a target webpage instead of the browser client according to the webpage access request, so that the target webpage is obtained; further, page information of the target webpage can be detected; when it is detected that the current page information includes at least one video element, the video element included in the current page information can be captured according to a capture video code (for example, a JS code) added in advance in the browser engine, and the audio/video stream information corresponding to each video element is obtained and stored. The audio/video stream information corresponding to each video element can be obtained, for example, by an HTML5 technique and an API (Application Programming Interface) for extracting stream information.
And S120, generating a simulated webpage matched with the target webpage, and feeding back the simulated webpage to the browser client, wherein the simulated webpage comprises video playing controls respectively corresponding to each audio and video stream.
The imitated web page may refer to a similar page imitated by the remote web page isolation subsystem according to the page information of the target web page. The simulated web page may be a specially formatted page, such as in an HTML format. The video play control may refer to a control for video play, such as a play button.
Specifically, the remote web page isolation subsystem may generate a simulated web page corresponding to the target web page according to the page information of the accessed target web page, and feed the simulated web page back to the browser client, so that the browser client may see the target web page in a special manner after sending a web page access request. The simulated webpage can comprise video playing controls corresponding to the audio and video streams respectively, and the number of the audio and video streams is matched with that of the video playing controls. Correspondingly, if the target webpage contains video elements and corresponding audio and video streams can be captured from the video elements, a video playing control can be added into the generated simulated webpage; if the target webpage does not contain the video element, the generated simulated webpage may not contain the video playing control.
S130, responding to the selection of the browser client aiming at the target video playing control in the simulated webpage, acquiring a target audio and video stream matched with the target video playing control, and distributing a video playing address for the target audio and video stream.
The target video playing control can be a control selected from all video playing controls of the simulated webpage. The target audio/video stream may be a selected audio/video stream of the entire audio/video streams of the target web page. The video playing address can refer to an address of the target audio/video stream when the target audio/video stream is played towards the browser client.
Optionally, when the browser client selects a certain video playing control from the acquired simulated web pages to play the video, the remote web page isolation subsystem may acquire a target audio/video stream matched with the target video playing control in response to the selection of the browser client, and allocate a corresponding video playing address to each target audio/video stream.
In an optional implementation manner of this embodiment, the video playing control may include a playing video code added in advance; based on this, in response to selection of the browser client for a target video playing control in the simulated webpage, obtaining a target audio/video stream matched with the target video playing control, and allocating a video playing address for the target audio/video stream, may include: and responding to the selection of the browser client for a target video playing control in the simulated webpage, receiving a playing request of the browser client for running a playing video code, acquiring a target audio and video stream matched with the target video playing control, and allocating a video playing address for the target audio and video stream.
The video playing code can be a code which can be connected with a remote webpage isolation subsystem to achieve the purpose of playing through operation.
Specifically, when the browser client selects a certain video playing control to plan to play a video, the browser client may run a playing video code added in advance to establish a communication connection with the remote web page isolation subsystem, and the remote web page isolation subsystem may receive a playing request of the browser client in response to selection of the browser client for a target video playing control in a simulated web page, acquire a target audio/video stream matched with the target video playing control currently selected by the browser client, and allocate a video playing address to the target audio/video stream. It can be understood that, for each video playing control in the simulated webpage, the video playing addresses of the corresponding audio and video streams may be different.
And S140, sending the target audio and video stream and the video playing address to the video service system, and sending the video playing address to the browser client so as to instruct the browser client to obtain the target audio and video stream subjected to audio and video processing by the video service system through the video playing address and play the target audio and video stream at the client.
Optionally, after obtaining the target audio/video stream and allocating a video playing address to the target audio/video stream, the remote web page isolation subsystem may send the target audio/video stream and the video playing address to the video service system, where the video service system may perform audio/video processing (for example, operations such as special effects, exception filtering, and format conversion) on the target audio/video stream to obtain a processed target audio/video stream, and simultaneously send the video playing address to the browser client, and instruct the browser client to obtain the processed target audio/video stream through the video playing address for client playing.
In an optional implementation manner of this embodiment, the sending the target audio/video stream and the video playing address to the video service system may include: and sending the target audio and video stream and the video playing address to a video service system according to a sending code added in advance in the remote isolation subsystem.
Specifically, the remote web page isolation subsystem may send the acquired target audio/video stream and the video playing address allocated to the target audio/video stream to the video service system according to a sending code added in advance.
According to the technical scheme of the embodiment, when a webpage access request sent by a browser client is intercepted by a remote webpage isolation subsystem, the target webpage is acquired by the browser client instead of the browser client according to the webpage access request, and at least one audio/video stream matched with the target webpage is acquired and stored; generating a simulated webpage matched with the target webpage, and feeding back the simulated webpage comprising the video playing controls respectively corresponding to each audio and video stream to the browser client; responding to the selection of a browser client aiming at a target video playing control in the simulated webpage, acquiring a target audio and video stream matched with the target video playing control, and allocating a video playing address for the target audio and video stream; the method comprises the steps of sending a target audio and video stream and a video playing address to a video service system, and sending the video playing address to a browser client so as to instruct the browser client to obtain the target audio and video stream subjected to audio and video processing by the video service system through the video playing address to play on the client, so that the problem that the isolated video cannot be synchronously played on a user browser client in the prior art is solved, a new technology capable of synchronously playing the isolated video on the user browser client is provided, and the requirement of safe internet surfing is met.
Example two
Fig. 2 is a schematic structural diagram of an isolated playback apparatus for web page video according to a second embodiment of the present invention, where the apparatus may be executed by a remote web page isolation subsystem, and the apparatus may include: the system comprises an audio and video stream storage module 210, a simulated webpage feedback module 220, a video playing address allocation module 230 and a video playing address sending module 240. Wherein:
the audio/video stream storage module 210 is configured to, when a web page access request sent by a browser client is intercepted, obtain a target web page instead of the browser client according to the web page access request, and obtain and store at least one audio/video stream matched with the target web page;
the simulated webpage feedback module 220 is configured to generate a simulated webpage matched with the target webpage and feed the simulated webpage back to the browser client, where the simulated webpage includes video playing controls corresponding to each audio/video stream;
the video playing address allocation module 230 is configured to, in response to selection of a target video playing control in the simulated webpage by the browser client, acquire a target audio/video stream matched with the target video playing control, and allocate a video playing address to the target audio/video stream;
the video playing address sending module 240 is configured to send the video playing address to the browser client while sending the target audio and video stream and the video playing address to the video service system, so as to instruct the browser client to obtain the target audio and video stream subjected to audio and video processing by the video service system through the video playing address and play the target audio and video stream at the client.
According to the technical scheme of the embodiment, when a webpage access request sent by a browser client is intercepted by a remote webpage isolation subsystem, the target webpage is acquired by the browser client instead of the browser client according to the webpage access request, and at least one audio/video stream matched with the target webpage is acquired and stored; generating a simulated webpage matched with the target webpage, and feeding back the simulated webpage comprising the video playing controls respectively corresponding to each audio and video stream to the browser client; responding to the selection of a browser client aiming at a target video playing control in the simulated webpage, acquiring a target audio and video stream matched with the target video playing control, and allocating a video playing address for the target audio and video stream; the method comprises the steps of sending a target audio and video stream and a video playing address to a video service system, and sending the video playing address to a browser client so as to instruct the browser client to obtain the target audio and video stream subjected to audio and video processing by the video service system through the video playing address to play on the client, so that the problem that the isolated video cannot be synchronously played on a user browser client in the prior art is solved, a new technology capable of synchronously playing the isolated video on the user browser client is provided, and the requirement of safe internet surfing is met.
In the above apparatus, optionally, the audio/video stream storage module 210 may be specifically configured to:
according to the webpage access request, a browser engine replaces the browser client to obtain a target webpage, and page information of the target webpage is detected;
and when the page information is detected to contain at least one video element, acquiring audio and video stream information respectively corresponding to each video element from a server corresponding to a target webpage for storage according to a captured video code added in advance in a browser engine.
In the above apparatus, optionally, the video playing control includes a playing video code added in advance;
the video playing address assignment module 230 may be specifically configured to:
and responding to the selection of the browser client for a target video playing control in the simulated webpage, receiving a playing request of the browser client for running a playing video code, acquiring a target audio and video stream matched with the target video playing control, and allocating a video playing address for the target audio and video stream.
In the above apparatus, optionally, the video playing address sending module 240 may be specifically configured to:
and sending the target audio and video stream and the video playing address to a video service system according to a sending code added in advance in the remote isolation subsystem.
The isolated playback device for the webpage video provided by the embodiment of the invention can execute the isolated playback method for the webpage video provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
EXAMPLE III
Fig. 3 is a schematic structural diagram of an isolated playback system for web page video according to a third embodiment of the present invention, where the system may include: a remote web page isolation subsystem 310, a video service system 320, and a browser client 330. Wherein:
the remote web page isolation subsystem 310 is configured to implement the isolated playback method of the web page video according to any embodiment of the present invention;
the video service system 320 is configured to receive a target audio/video stream and a video playing address sent by the remote web page isolation system 310, perform audio/video processing on the target audio/video stream, and acquire and store the processed target audio/video stream;
the browser client 330 is configured to receive the simulated webpage fed back by the remote isolation subsystem 310, and select a target video playing control for the simulated webpage; and
the remote web page isolation system 310 is used for receiving a video playing address sent by the remote web page isolation system 310, and obtaining a target audio and video stream subjected to audio and video processing by the video service system 320 through the video playing address to be played by the client.
According to the technical scheme of the embodiment, the remote webpage isolation subsystem, the video service system and the browser client are arranged in the webpage video isolation playback system, and the remote webpage isolation subsystem is used for realizing the webpage video isolation playback method and feeding back the imitated webpage comprising the video playing control to the browser client; the browser client selects a target video playing control from the imitated web pages to initiate a playing request, and establishes connection with the remote web page isolation subsystem; the remote webpage isolation subsystem responds to the playing request to acquire a target audio and video stream and distributes a video playing address for the target audio and video stream, the target audio and video stream and the video playing address are sent to the video service system, and the video playing address is sent to the browser client; the video service system processes the received target audio and video stream, and acquires and stores the processed target audio and video stream; and the browser client acquires the processed target audio and video stream through the video playing address to play the target audio and video stream. The problem that the isolated video cannot be synchronously played on the client of the user browser in the prior art is solved, a new technology capable of synchronously playing the isolated video on the client of the user browser is provided, and the requirement of safe internet surfing is met.
Optionally, the video service system 320 includes a WebRTC server for web page real-time communication and a real-time messaging protocol RTMP streaming server;
the WebRTC server can be used for receiving a target audio and video stream and a video playing address sent by a remote webpage isolation system, and decoding and format conversion processing are carried out on the target audio and video stream to form a processing result; and
recoding the processing result to form a processed target audio/video stream which accords with an RTMP streaming media protocol, and sending the processed target audio/video stream and the video playing address to an RTMP streaming media server;
the RTMP streaming media server can be used for receiving and storing the processed audio and video stream, and generating the processed audio and video stream into a video which can be played by the browser client according to the video playing address.
The advantage of this arrangement is that the video on the remote webpage isolation subsystem can be changed into a provider of streaming media service, so that the browser client can acquire and play the video synchronously from the RTMP streaming media server.
Example four
Fig. 4 is a schematic structural diagram of an electronic apparatus according to a fourth embodiment of the present invention, as shown in fig. 4, the electronic apparatus includes a processor 410, a storage device 420, an input device 430, and an output device 440; the number of the processors 410 in the device may be one or more, and one processor 410 is taken as an example in fig. 4; the processor 410, the storage 420, the input 430 and the output 440 of the apparatus may be connected by a bus or other means, as exemplified by the bus connection in fig. 4.
The storage device 420 is a computer-readable storage medium, and can be used to store software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the isolated playback method of web page video in the embodiment of the present invention (for example, the audio/video stream storage module 210, the imitated web page feedback module 220, the video playing address assignment module 230, and the video playing address sending module 240 in the isolated playback device of web page video). The processor 410 executes various functional applications and data processing of the device by executing software programs, instructions and modules stored in the storage device 420, that is, implements the above-mentioned isolated playback method of web video, which is performed by a remote web isolation subsystem, and may include:
when a webpage access request sent by a browser client is intercepted, a target webpage is acquired instead of the browser client according to the webpage access request, and at least one audio/video stream matched with the target webpage is acquired and stored;
generating a simulated webpage matched with the target webpage, and feeding back the simulated webpage to the browser client, wherein the simulated webpage comprises video playing controls respectively corresponding to each audio and video stream;
responding to the selection of a browser client aiming at a target video playing control in the simulated webpage, acquiring a target audio and video stream matched with the target video playing control, and allocating a video playing address for the target audio and video stream;
and sending the target audio and video stream and the video playing address to the video service system, and sending the video playing address to the browser client so as to instruct the browser client to acquire the target audio and video stream subjected to audio and video processing by the video service system through the video playing address and play the target audio and video stream at the client.
The storage device 420 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the storage 420 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, the storage 420 may further include memory located remotely from the processor 410, which may be connected to the device over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input means 430 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the apparatus. The output device 440 may include a display device such as a display screen.
EXAMPLE five
An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to perform a method for isolated playback of a web video, where the method is performed by a remote web isolation subsystem, and the method may include:
when a webpage access request sent by a browser client is intercepted, a target webpage is acquired instead of the browser client according to the webpage access request, and at least one audio/video stream matched with the target webpage is acquired and stored;
generating a simulated webpage matched with the target webpage, and feeding back the simulated webpage to the browser client, wherein the simulated webpage comprises video playing controls respectively corresponding to each audio and video stream;
responding to the selection of a browser client aiming at a target video playing control in the simulated webpage, acquiring a target audio and video stream matched with the target video playing control, and allocating a video playing address for the target audio and video stream;
and sending the target audio and video stream and the video playing address to the video service system, and sending the video playing address to the browser client so as to instruct the browser client to acquire the target audio and video stream subjected to audio and video processing by the video service system through the video playing address and play the target audio and video stream at the client.
Of course, the computer-readable storage medium provided by the embodiment of the present invention stores thereon a computer program, where the computer program is not limited to the method operations described above, and may also perform related operations in the isolated playback method of the web page video provided by any embodiment of the present invention.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
It should be noted that, in the embodiment of the isolated playback apparatus for web video, the units and modules included in the apparatus are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.