CN116866661A - Video prerendering method, device, equipment and storage medium - Google Patents

Video prerendering method, device, equipment and storage medium Download PDF

Info

Publication number
CN116866661A
CN116866661A CN202310862875.1A CN202310862875A CN116866661A CN 116866661 A CN116866661 A CN 116866661A CN 202310862875 A CN202310862875 A CN 202310862875A CN 116866661 A CN116866661 A CN 116866661A
Authority
CN
China
Prior art keywords
player
page
core
video
candidate
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310862875.1A
Other languages
Chinese (zh)
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.)
Baidu com Times Technology Beijing Co Ltd
Original Assignee
Baidu com Times Technology Beijing Co Ltd
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 Baidu com Times Technology Beijing Co Ltd filed Critical Baidu com Times Technology Beijing Co Ltd
Priority to CN202310862875.1A priority Critical patent/CN116866661A/en
Publication of CN116866661A publication Critical patent/CN116866661A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/44012Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving rendering scenes according to scene graphs, e.g. MPEG-4 scene graphs
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/44004Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving video buffer management, e.g. video decoder buffer or video display buffer
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/45Management operations performed by the client for facilitating the reception of or the interaction with the content or administrating data related to the end-user or to the client device itself, e.g. learning user preferences for recommending movies, resolving scheduling conflicts
    • H04N21/458Scheduling content for creating a personalised stream, e.g. by combining a locally stored advertisement with an incoming stream; Updating operations, e.g. for OS modules ; time-related management operations

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The disclosure provides a video prerendering method, a video prerendering device, video prerendering equipment and a storage medium, and relates to the technical field of computers, in particular to the technical field of computer vision. The video prerendering method comprises the following steps: responding to a page switching request of a first page, determining a second player core for a second page to be switched, and pre-rendering second video data in the first page by adopting the second player core to obtain a second video picture and an instance of the second player core; wherein an instance of the second player core includes the second video picture; creating a second page, and creating a second player in the second page; and acquiring an instance of the second player core in the second page, and controlling the second player to play a second video picture according to the instance of the second player core. Through the technical scheme, the switching efficiency of the video page can be improved.

Description

Video prerendering method, device, equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technology, and in particular, to the field of computer vision technology. And in particular to a video prerendering method, device, equipment and storage medium.
Background
With the rapid development of computer technology, video expression has been widely used in various fields of work and life. A user may browse short video, live video, etc. video content using application software.
Often, switching from one video playback page to another is required during video browsing. The switching efficiency of video pages directly affects the user viewing experience. Therefore, how to switch video pages is important.
Disclosure of Invention
The disclosure provides a video prerendering method, a device, equipment and a storage medium.
According to an aspect of the present disclosure, there is provided a video prerendering method including:
responding to a page switching request of a first page, determining a second player core for a second page to be switched, and pre-rendering second video data in the first page by adopting the second player core to obtain a second video picture and an instance of the second player core; wherein an instance of the second player core includes the second video picture;
creating a second page, and creating a second player in the second page;
and acquiring an instance of the second player core in the second page, and controlling the second player to play a second video picture according to the instance of the second player core.
According to an aspect of the present disclosure, there is provided a video prerendering apparatus including:
the picture prerendering module is used for responding to a page switching request of a first page, determining a second player core for a second page to be switched, and prerendering second video data in the first page by adopting the second player core to obtain a second video picture and an instance of the second player core; wherein an instance of the second player core includes the second video picture;
the page creation module is used for creating a second page, and creating a second player in the second page;
and the picture playing module is used for acquiring the instance of the second player core from the second page and controlling the second player to play a second video picture according to the instance of the second player core.
According to another aspect of the present disclosure, there is provided an electronic device including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the methods provided by any of the embodiments of the present disclosure.
According to another aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the method provided by any of the embodiments of the present disclosure.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
Drawings
The drawings are for a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
FIG. 1a is a flow chart of a video prerendering method provided in accordance with an embodiment of the present disclosure;
FIG. 1b is a schematic diagram of a video pre-rendering provided in accordance with an embodiment of the present disclosure;
FIG. 1c is a schematic diagram of a video pre-rendering scheme according to the related art;
FIG. 2 is a flow chart of another video prerendering method provided in accordance with an embodiment of the present disclosure;
FIG. 3a is a flow chart of yet another video prerendering method provided in accordance with an embodiment of the present disclosure;
FIG. 3b is a schematic illustration of selection of a second player core provided in accordance with an embodiment of the present disclosure;
FIG. 3c is a schematic diagram of a process of a player core provided in accordance with an embodiment of the present disclosure;
fig. 4 is a schematic structural view of a video prerendering apparatus according to an embodiment of the present disclosure;
fig. 5 is a block diagram of an electronic device used to implement a video pre-rendering method of an embodiment of the present disclosure.
Detailed Description
Fig. 1a is a flowchart of a video prerendering method provided according to an embodiment of the present disclosure. The method is suitable for the situation of switching video pages in the video content browsing process. The method may be performed by a video prerendering device, which may be implemented in software and/or hardware, and may be integrated in an electronic device. As shown in fig. 1a, the video prerendering method of the present embodiment may include:
s101, responding to a page switching request of a first page, determining a second player core for a second page to be switched, and pre-rendering second video data in the first page by adopting the second player core to obtain a second video picture and an instance of the second player core; wherein an instance of the second player core includes the second video picture;
s102, creating a second page, and creating a second player in the second page;
S103, acquiring an instance of the second player core in a second page, and controlling the second player to play a second video picture according to the instance of the second player core.
During browsing of the first page, if a switch from the first page to the second page is desired, a page switch request of the first page may be triggered. The triggering mode of the page switching request is not particularly limited, and the page switching request can be initiated through a sliding operation, a clicking operation, or a selection operation of a video skip control.
In response to the page switching request, determining a second player core for a second page to be switched, triggering the playing of the second player core, and executing the following steps by adopting the second player core: pulling the second video data; decoding the second video data; and pre-rendering the decoding result of the second video data in the view container of the first page to obtain a second video picture and an instance of a second player core. An example of the second player core is an example of the second player core including the second video picture.
The view container of the first page may be a decorview of an Activity at the top of the page stack in the first page. Activity is an interface component of an application program, which is used for providing a display and interaction area on a screen, and decorview is a root layout of Activity, and belongs to a view container. The second player core obtains a second video picture by prerendering in the view container of the first page, such that prerendering of the second video picture is independent of the view container of the second page. That is, the creation of the view container of the second page is not a precondition for the prerendering of the second video frame, so that the prerendering of the second video frame and the creation of the second page can be synchronously performed, and the switching efficiency of the video pages is improved.
Responding to a page switching request of the first page, synchronously creating a second page, and initializing a view container of the second page by setting controls such as praise, interaction, comment and the like of the second page; creating a second player in a second page; and acquiring an instance of the prerendered second player kernel in the second page, and adding the second video picture to a view container of the second page by adopting the instance of the second player kernel to enable the second player to play the second video picture.
It should be noted that the first page has a first player, and the first player has a first player core; the second page is provided with a second player kernel and a second player; the player kernel is used for pulling video data of a corresponding page, decoding and rendering the pulled video data to obtain a video picture; the player is a framework for applying the player kernel, and may include a User Interface (UI) attribute of the player, a dotting function, and the like.
According to the embodiment of the disclosure, the second video data is prerendered in the first page through the second player kernel to obtain the second video picture, the second player is created in the second page, the prerendered second video picture can be directly played by the second player, the prerendered second video picture is synchronous with the creation of the second page, the playing efficiency of the second video picture can be improved, the playing time consumption of the second video picture is shortened, and therefore the problem of black screen in the video page switching process is avoided.
Fig. 1b is a schematic diagram of a video prerendering principle provided according to an embodiment of the present disclosure, and referring to fig. 1b, in the embodiment of the present disclosure, during a video page switching process, a second player kernel is created for a second page through prerendering a sub-process, and the second player kernel is adopted to prerendered in a view container of a first page to obtain a second video picture; and creating a second page through the page loading subprocess, and creating a second player in the second page, so that the second player can play a second video picture by adopting the instance of the second player kernel obtained by pre-rendering. The prerender subprocess and the page loading subprocess are executed synchronously.
Fig. 1c is a schematic diagram of a video prerendering principle provided in the related art, referring to fig. 1c, in the related art, in the video page switching process, the creation of a view container of a second page is completed as a precondition on prerendering a second video frame, the second page is created first, a second player is created in the second page, then a second player kernel is initialized, and the second video frame is rendered in the view container of the second page.
With reference to fig. 1b and fig. 1c, in the embodiment of the disclosure, by synchronously prerendering a second video frame and creating a second player in a second page, compared with serial processing, the playing time of the second page in a starting stage can be shortened, the inner sliding playing time can be shortened, and further, the user using playing experience is improved to realize user growth stimulation and user retention improvement. The starting stage refers to a stage from the time when a user clicks on a video to the time when a video playing page starts to play a video picture. The time-consuming process of sliding up and down in the immersive play page refers to the time-consuming process from the user to the next video to the stage when the next video starts to play.
According to the technical scheme provided by the embodiment of the disclosure, the second player kernel synchronously performs prerendering in the first page to obtain the second video picture in the process of creating the second page, so that the playing speed of the second video picture can be increased, and the problem of black screen in the process of switching the video pages is avoided.
Fig. 2 is a flowchart of another video prerendering method provided in accordance with an embodiment of the present disclosure. In an embodiment of the present disclosure, the pre-rendering to obtain the second video frame and the instance of the second player core may further include: caching an instance of a second player core obtained by prerendering; acquiring an instance of the second player core in a second page may include: and acquiring an instance of the second player core from the cache. Referring to fig. 2, the video prerendering method of the present embodiment may include:
s201, responding to a page switching request of a first page, determining a second player core for a second page to be switched, and pre-rendering second video data in the first page by adopting the second player core to obtain a second video picture and an instance of the second player core; wherein an instance of the second player core includes the second video picture;
S202, caching an instance of a second player core obtained by prerendering;
s203, creating a second page, and creating a second player in the second page;
s204, obtaining an instance of a second player core from the cache, and controlling the second player to play a second video picture according to the instance of the second player core.
In the embodiment of the disclosure, the instance of the second player kernel can be interacted between the first page and the second page through buffering. Specifically, the first page may store the instance of the second player core obtained by pre-rendering in the cache, and after the second page is initialized, the second page obtains the instance of the second player core from the cache, so as to control the second player to play the second video picture according to the instance of the second player core.
The interaction of the instance of the second player kernel is carried out between the first page and the second page through the cache, compared with the case that the instance of the second player kernel is directly transmitted from the first page to the second page, the data transmission between the two pages can be avoided, and the switching operation between the two pages is simplified.
In an alternative embodiment, the caching the instance of the second player core obtained by pre-rendering includes: performing information abstract calculation according to the video identification of the second video to obtain a cache index; caching an instance of the second player core obtained by prerendering by adopting the cache index; the obtaining the instance of the second player core from the cache includes: performing information abstract calculation according to the video identification of the second video to obtain a cache index; and acquiring an instance of the second player core from the cache by adopting the cache index.
Wherein the video identification (vid) of the second video is used to uniquely identify the second video, i.e. each video has a unique video identification. And performing information summary calculation on the video identification of the second video, for example, MD5 calculation to obtain a hash value with a fixed bit number, determining a cache index key according to the hash value, and storing the instance of the second player core into a cache address corresponding to the cache index key.
The second page obtains a video identification of a second video to be played, a cache index key is obtained by carrying out information summary calculation on the video identification of the second video, and an instance of a second player kernel is obtained from a cache address corresponding to the cache index key. By processing the second page, the instance of the second player core can be accurately obtained from the cache only by using the video identifier of the second video, so that the data interaction between the first page and the second page is further simplified.
According to the technical scheme provided by the embodiment of the disclosure, the video switching efficiency can be improved through the prerendering of the second video picture, the interaction of the instance of the second player kernel is carried out between the first page and the second page through the cache, and the data transmission between the two pages can be further simplified.
In an alternative embodiment, the method further comprises: and scaling the second video picture obtained by pre-rendering to hide the second video picture in the first page.
In the embodiment of the disclosure, the first player in the first page is used for playing the first video picture, and the first video picture may be the same as the second video picture or different from the second video picture. By scaling the pre-rendered second video picture in the first page, the second video picture in the first page may be set to 1 pixel, for example, so as to hide the second video picture in the first page, so as to avoid the second video picture interfering with the playing of the first video picture.
Fig. 3a is a flowchart of yet another video prerendering method provided in accordance with an embodiment of the present disclosure.
Referring to fig. 3a, the video prerendering method of the present embodiment may include:
s301, responding to a page switching request of a first page, determining a required target kernel type according to attribute information of a second page, and taking a player kernel belonging to the target kernel type as a candidate player kernel;
s302, determining a second player core for a second page to be switched from the candidate player cores;
S303, pre-rendering the second video data in the first page by adopting the second player core to obtain a second video picture and an instance of the second player core; wherein an instance of the second player core includes the second video picture.
S304, creating a second page, and creating a second player in the second page;
s305, acquiring an instance of the second player core in the second page, and controlling the second player to play a second video picture according to the instance of the second player core.
In the embodiment of the disclosure, multiplexing of the player cores can also be realized based on the scheduling policy of the player cores. That is, only a preset number of player cores may be maintained for use for each core type. In the case of a player core usage requirement, a player core usage request may be initiated and an available player core may be selected based on a player core scheduling policy. Through multiplexing and scheduling of the player cores, the resource occupation of video playing can be reduced, and the efficiency and stability of video page switching are further improved.
Wherein, the attribute information of the second page may include coding format, model scoring or initialization state, etc. And determining a target core type of the second player core according to the coding format, model scoring or initialization state and the like of the second page, and taking the player cores belonging to the target core type as candidate player cores. A second player core may be selected for the second page from the candidate player cores based on a scheduling policy of the player cores.
In an alternative embodiment, the determining a second player core for a second page to be switched from the candidate player cores includes: determining whether there are idle candidate player cores; determining the selection probability of the candidate player cores according to the use state data of each candidate player core under the absence condition; and selecting a second player core for the second page to be switched from the candidate player cores according to the selection probability.
FIG. 3b is a schematic illustration of selection of a second player core provided in accordance with an embodiment of the present disclosure; referring to fig. 3b, determining whether there is an idle candidate player core, and if so, using the idle candidate player core as a second player core; if the candidate player cores do not exist, determining the selection probability of the candidate player cores according to the use state data of the candidate player cores; the candidate player core having the greatest probability of selection may be selected as the second player core.
Under the condition that idle candidate player cores exist, the idle candidate player cores are used as second player cores, so that the determination efficiency of the second player cores can be considered, and other players can be prevented from being influenced; under the condition that no idle candidate player cores exist, the selection probability of each candidate player core is respectively determined, and the candidate player core with the largest selection probability is selected as a second player core, so that the influence on other players is reduced, and the video playing stability is maintained.
In an alternative embodiment, the candidate player core usage status data includes at least one of: the playing state, the service function calling state, the foreground showing state or the activating time of the candidate player kernel.
In the embodiment of the disclosure, the selection probability of the candidate player cores can be determined by combining the play state, the service function call state, the foreground display state and the background display state and the activation time of the candidate player cores. The playing state can be playing, pausing and stopping, wherein the playing corresponds to relatively low selection probability, and the pausing and stopping corresponds to relatively high selection probability. And increasing or decreasing the selection probability of the candidate player cores according to the frequency of the player which applies the candidate player cores and the type of the page function and the type of the service function call. For example, if a player to which the candidate play kernel is applied is frequently called or called by an important business function, the selection probability of the candidate player kernel may be reduced.
The display state of the foreground and the background can be foreground operation or background operation. The probability of selection corresponding to the foreground operation is relatively low relative to the background operation. The activation time is used for representing the time length from the last time the candidate player core is activated, and the longer the activation time is, the higher the corresponding selection probability is. The selection probability of the candidate player cores is determined by combining the play state, the service function call state, the foreground display state and the background display state and the activation time of the candidate player cores, for example, each item of score is respectively carried out on the candidate player cores according to the play state, the service function call state, the foreground display state and the background display state and the activation time of the candidate player cores, and each item of score results are fused to obtain the selection probability of the candidate player cores. In the selection process of the second player core, the selection probability of the candidate player core is determined by combining the play state, the service function call state, the foreground and background display state and the activation time of the candidate player core, so that the scheduling stability of the player core can be improved.
According to the technical scheme provided by the embodiment of the disclosure, multiplexing of candidate player cores is supported, a scheduling strategy is also provided for multiplexing, and video playing efficiency and scheduling stability of the player cores can be improved.
In an alternative embodiment, the method further comprises: under the condition that any candidate player core is selected as a second player core, unbinding the candidate player core and a player applying the candidate player core, and generating snapshot data for the unbinding player; the snapshot data is used for recovering the unbinding player.
The snapshot data may include a playing state, a playing progress, and view parameters of a player to which the candidate player kernel is applied, where the view parameters may include a view being in a display or hidden state, a width, a height, and the like of the view.
In the case that any candidate player core is selected as the second player core, unbinding the candidate player core and a player applying the candidate player core so that the candidate player core and the second player can be bound later, thereby taking the candidate player as the second player core; by generating snapshot data for an associated player, subsequent recovery of the player is facilitated.
In an alternative embodiment, the method further comprises: determining a player core to be restored for the player from the candidate player cores in response to a restoration request for any player; and recovering the player according to the snapshot data of the player by adopting the player core to be recovered.
Under the condition that any player needs to be recovered, the player can initiate a use request of the player cores to a scheduling module, and the scheduling module can select the player cores to be recovered from the candidate player cores based on the scheduling strategy of the player cores; and recovering the player according to the snapshot data of the player by adopting the player core to be recovered. By adopting snapshot data to recover the player, the recovery efficiency of the player can be improved.
Fig. 3c is a schematic processing diagram of a player core provided according to an embodiment of the present disclosure, referring to fig. 3c, in a case where a player a needs a player core, a use request of the player core may be initiated to a scheduling module, and the scheduling module selects a player core for the player a from the candidate player cores according to a selection probability of each candidate player core, for example, may select a player core B in the player B for use by the player a, unbind the player B from the player core B, and generate snapshot data for the player B. The player a may load the player core B, i.e. establish a binding relationship with the player core B.
In addition, when the player B has a playing requirement, the player B may initiate a use request of the player cores to the scheduling module, and the scheduling module selects a player core for the player B from the candidate player cores according to the selection probability of the candidate player cores, for example, may select the player core C in the player C for the player B to use, unbind the player C from the player core C, and generate snapshot data for the player C. The player B may load the player core C and resume with the snapshot data of the player B.
Fig. 4 is a schematic structural diagram of a video prerendering apparatus according to an embodiment of the present disclosure. The embodiment is suitable for the situation of switching video pages in the video content browsing process. The apparatus may be implemented in software and/or hardware. As shown in fig. 4, the video prerendering apparatus 400 of the present embodiment may include:
the picture prerendering module 410 is configured to determine a second player core for a second page to be switched in response to a page switching request of the first page, and prerendering second video data in the first page by using the second player core to obtain a second video picture and an instance of the second player core; wherein an instance of the second player core includes the second video picture;
A page creation module 420, configured to create a second page, and create a second player in the second page;
and the picture playing module 430 is configured to obtain an instance of the second player core from the second page, and control the second player to play a second video picture according to the instance of the second player core.
In an optional embodiment, the video prerendering apparatus 400 further includes a caching module, configured to cache an instance of the prerendered second player core;
the picture playing module is specifically configured to obtain an instance of the second player core from the cache.
In an alternative embodiment, the buffering module is specifically configured to:
performing information abstract calculation according to the video identification of the second video to obtain a cache index;
caching an instance of the second player core obtained by prerendering by adopting the cache index;
the picture playing module 430 is specifically configured to:
performing information abstract calculation according to the video identification of the second video to obtain a cache index;
and acquiring an instance of the second player core from the cache by adopting the cache index.
In an alternative embodiment, the video prerender 400 further includes:
And the picture scaling module is used for scaling the second video picture obtained by pre-rendering so as to hide the second video picture in the first page.
In an alternative embodiment, the screen prerendering module 410 includes:
the candidate kernel unit is used for determining a required target kernel type according to the attribute information of the second page, and taking the player kernels belonging to the target kernel type as candidate player kernels;
and the candidate core selection unit is used for determining a second player core for the second page to be switched from the candidate player cores.
In an alternative embodiment, the candidate core selection unit includes:
an idle determination subunit, configured to determine whether an idle candidate player kernel exists;
a selection probability subunit, configured to determine, in the absence, a selection probability of each candidate player core according to usage state data of the candidate player core;
and the kernel selection subunit is used for selecting a second player kernel from the candidate player kernels for the second page to be switched according to the selection probability.
In an alternative embodiment, the candidate player core usage status data includes at least one of: the playing state, the service function calling state, the foreground showing state or the activating time of the candidate player kernel.
In an alternative embodiment, the screen prerendering module 410 further includes:
the snapshot generating unit is used for unbinding any candidate player core and a player applying the candidate player core under the condition that any candidate player core is selected as a second player core, and generating snapshot data for the unbinding player; the snapshot data is used for recovering the unbinding player.
In an alternative embodiment, the screen prerendering module 410 further includes a player recovery unit, and the player recovery unit includes:
the kernel determining subunit is used for determining the player kernel to be restored from the candidate player kernels in response to the restoration request of any player;
and the player recovery subunit is used for recovering the player according to the snapshot data of the player by adopting the player kernel to be recovered.
According to the technical scheme, in the video switching process, a second player core is determined in parallel, and the second player core is adopted to pre-render second video data in a first page to obtain a second video picture and an instance of the second player core; and creating a second page, creating a second player in the second page, and controlling the second player to play a second video picture according to the instance of the inner core of the second player, so that the playing efficiency of the second video picture can be improved, and the problem of black screen in the switching process is avoided. In addition, the stability of video switching can be improved through multiplexing and scheduling of the player cores.
In the technical scheme of the disclosure, the acquisition, storage, application and the like of the related user personal information all conform to the regulations of related laws and regulations, and the public sequence is not violated.
According to embodiments of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
Fig. 5 is a block diagram of an electronic device used to implement a video pre-rendering method of an embodiment of the present disclosure.
Fig. 5 illustrates a schematic block diagram of an example electronic device 500 that may be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 5, the electronic device 500 includes a computing unit 501 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 502 or a computer program loaded from a storage unit 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 500 may also be stored. The computing unit 501, ROM 502, and RAM 503 are connected to each other by a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
A number of components in electronic device 500 are connected to I/O interface 505, including: an input unit 506 such as a keyboard, a mouse, etc.; an output unit 507 such as various types of displays, speakers, and the like; a storage unit 508 such as a magnetic disk, an optical disk, or the like; and a communication unit 509 such as a network card, modem, wireless communication transceiver, etc. The communication unit 509 allows the electronic device 500 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
The computing unit 501 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 501 include, but are not limited to, a Central Processing Unit (CPU), an image processing unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 501 performs the respective methods and processes described above, such as a video prerendering method. For example, in some embodiments, the video pre-rendering method may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as storage unit 508. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 500 via the ROM 502 and/or the communication unit 509. When a computer program is loaded into RAM 503 and executed by computing unit 501, one or more steps of the video pre-rendering method described above may be performed. Alternatively, in other embodiments, the computing unit 501 may be configured to perform the video pre-rendering method by any other suitable means (e.g. by means of firmware).
Various implementations of the systems and techniques described here above can be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), complex Programmable Logic Devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here 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 a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the internet.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server incorporating a blockchain.
Artificial intelligence is the discipline of studying the process of making a computer mimic certain mental processes and intelligent behaviors (e.g., learning, reasoning, thinking, planning, etc.) of a person, both hardware-level and software-level techniques. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing, and the like; the artificial intelligent software technology mainly comprises a computer vision technology, a voice recognition technology, a natural language processing technology, a machine learning/deep learning technology, a big data processing technology, a knowledge graph technology and the like.
Cloud computing (cloud computing) refers to a technical system that a shared physical or virtual resource pool which is elastically extensible is accessed through a network, resources can comprise servers, operating systems, networks, software, applications, storage devices and the like, and resources can be deployed and managed in an on-demand and self-service mode. Through cloud computing technology, high-efficiency and powerful data processing capability can be provided for technical application such as artificial intelligence and blockchain, and model training.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel or sequentially or in a different order, provided that the desired results of the technical solutions of the present disclosure are achieved, and are not limited herein.
The above detailed description should not be taken as limiting the scope of the present disclosure. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present disclosure are intended to be included within the scope of the present disclosure.

Claims (21)

1. A video prerendering method, comprising:
responding to a page switching request of a first page, determining a second player core for a second page to be switched, and pre-rendering second video data in the first page by adopting the second player core to obtain a second video picture and an instance of the second player core; wherein an instance of the second player core includes the second video picture;
creating a second page, and creating a second player in the second page;
and acquiring an instance of the second player core in the second page, and controlling the second player to play a second video picture according to the instance of the second player core.
2. The method of claim 1, wherein the pre-rendering results in an instance of a second video picture and a second player core further comprising: caching an instance of a second player core obtained by prerendering;
Obtaining an instance of the second player core in a second page, including: and acquiring an instance of the second player core from the cache.
3. The method of claim 2, wherein the caching the pre-rendered instance of the second player core comprises:
performing information abstract calculation according to the video identification of the second video to obtain a cache index;
caching an instance of the second player core obtained by prerendering by adopting the cache index;
the obtaining the instance of the second player core from the cache includes:
performing information abstract calculation according to the video identification of the second video to obtain a cache index;
and acquiring an instance of the second player core from the cache by adopting the cache index.
4. The method of claim 1, the method further comprising:
and scaling the second video picture obtained by pre-rendering to hide the second video picture in the first page.
5. The method of claim 1, wherein the determining a second player core for a second page to be switched comprises:
determining a required target kernel type according to the attribute information of the second page, and taking the player kernels belonging to the target kernel type as candidate player kernels;
And determining a second player core for a second page to be switched from the candidate player cores.
6. The method of claim 5, wherein the determining a second player core for a second page to be switched from among the candidate player cores comprises:
determining whether there are idle candidate player cores;
determining the selection probability of the candidate player cores according to the use state data of each candidate player core under the absence condition;
and selecting a second player core for the second page to be switched from the candidate player cores according to the selection probability.
7. The method of claim 6, wherein the candidate player core usage status data comprises at least one of: the playing state, the service function calling state, the foreground showing state or the activating time of the candidate player kernel.
8. The method of claim 5, the method further comprising:
under the condition that any candidate player core is selected as a second player core, unbinding the candidate player core and a player applying the candidate player core, and generating snapshot data for the unbinding player; the snapshot data is used for recovering the unbinding player.
9. The method of claim 8, further comprising:
determining a player core to be restored for the player from the candidate player cores in response to a restoration request for any player;
and recovering the player according to the snapshot data of the player by adopting the player core to be recovered.
10. A video prerendering apparatus, comprising:
the picture prerendering module is used for responding to a page switching request of a first page, determining a second player core for a second page to be switched, and prerendering second video data in the first page by adopting the second player core to obtain a second video picture and an instance of the second player core; wherein an instance of the second player core includes the second video picture;
the page creation module is used for creating a second page, and creating a second player in the second page;
and the picture playing module is used for acquiring the instance of the second player core from the second page and controlling the second player to play a second video picture according to the instance of the second player core.
11. The apparatus of claim 10, further comprising a caching module configured to cache an instance of the prerendered second player core;
The picture playing module is specifically configured to obtain an instance of the second player core from the cache.
12. The apparatus of claim 11, wherein the caching module is specifically configured to:
performing information abstract calculation according to the video identification of the second video to obtain a cache index;
caching an instance of the second player core obtained by prerendering by adopting the cache index;
the picture playing module is specifically used for:
performing information abstract calculation according to the video identification of the second video to obtain a cache index;
and acquiring an instance of the second player core from the cache by adopting the cache index.
13. The apparatus of claim 10, the apparatus further comprising:
and the picture scaling module is used for scaling the second video picture obtained by pre-rendering so as to hide the second video picture in the first page.
14. The apparatus of claim 10, wherein the picture pre-rendering module comprises:
the candidate kernel unit is used for determining a required target kernel type according to the attribute information of the second page, and taking the player kernels belonging to the target kernel type as candidate player kernels;
and the candidate core selection unit is used for determining a second player core for the second page to be switched from the candidate player cores.
15. The apparatus of claim 14, wherein the candidate kernel selection unit comprises:
an idle determination subunit, configured to determine whether an idle candidate player kernel exists;
a selection probability subunit, configured to determine, in the absence, a selection probability of each candidate player core according to usage state data of the candidate player core;
and the kernel selection subunit is used for selecting a second player kernel from the candidate player kernels for the second page to be switched according to the selection probability.
16. The apparatus of claim 15, wherein the candidate player core usage status data comprises at least one of: the playing state, the service function calling state, the foreground showing state or the activating time of the candidate player kernel.
17. The apparatus of claim 14, the picture pre-rendering module further comprising:
the snapshot generating unit is used for unbinding any candidate player core and a player applying the candidate player core under the condition that any candidate player core is selected as a second player core, and generating snapshot data for the unbinding player; the snapshot data is used for recovering the unbinding player.
18. The apparatus of claim 17, the picture prerendering module further comprising a player recovery unit, the player recovery unit comprising:
the kernel determining subunit is used for determining the player kernel to be restored from the candidate player kernels in response to the restoration request of any player;
and the player recovery subunit is used for recovering the player according to the snapshot data of the player by adopting the player kernel to be recovered.
19. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-9.
20. A non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the method of any one of claims 1-9.
21. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any of claims 1-9.
CN202310862875.1A 2023-07-13 2023-07-13 Video prerendering method, device, equipment and storage medium Pending CN116866661A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310862875.1A CN116866661A (en) 2023-07-13 2023-07-13 Video prerendering method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310862875.1A CN116866661A (en) 2023-07-13 2023-07-13 Video prerendering method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116866661A true CN116866661A (en) 2023-10-10

Family

ID=88230129

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310862875.1A Pending CN116866661A (en) 2023-07-13 2023-07-13 Video prerendering method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116866661A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117768728A (en) * 2023-12-25 2024-03-26 书行科技(北京)有限公司 Multimedia playing method, device, medium and equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117768728A (en) * 2023-12-25 2024-03-26 书行科技(北京)有限公司 Multimedia playing method, device, medium and equipment

Similar Documents

Publication Publication Date Title
CN112102448B (en) Virtual object image display method, device, electronic equipment and storage medium
CN112527115B (en) User image generation method, related device and computer program product
US11467717B2 (en) Optimizing window resize actions for remoted applications
US10768947B2 (en) Method for interface refresh synchronization,terminal device, and non-transitory computer-readable storage medium
CN112416461A (en) Video resource processing method and device, electronic equipment and computer readable medium
CN116866661A (en) Video prerendering method, device, equipment and storage medium
KR20160022362A (en) Synchronization points for state information
CN114422799A (en) Video file decoding method and device, electronic equipment and program product
CN114168793A (en) Anchor display method, device, equipment and storage medium
CN114125498A (en) Video data processing method, device, equipment and storage medium
CN114443197B (en) Interface processing method and device, electronic equipment and storage medium
CN114359017B (en) Multimedia resource processing method and device and electronic equipment
CN113608809B (en) Layout method, device, equipment, storage medium and program product of components
CN113407259B (en) Scene loading method, device, equipment and storage medium
CN114501084A (en) Play starting method, device, equipment and medium of player
CN114386577A (en) Method, apparatus, and storage medium for executing deep learning model
CN109859293B (en) Animation multi-state switching method and device for android device
CN114119374A (en) Image processing method, device, equipment and storage medium
CN115334159B (en) Method, apparatus, device and medium for processing stream data
CN113287092A (en) System and method for adding digital content during application opening operation
CN113658213B (en) Image presentation method, related device and computer program product
CN114329278B (en) Processing method and device of search result page, electronic equipment and storage medium
CN114816629B (en) Method and device for drawing display object, storage medium and electronic device
CN114125135B (en) Video content presentation method and device, electronic equipment and storage medium
CN114398130B (en) Page display method, device, equipment and storage medium

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