Media resource preloading method and device, electronic equipment and medium

By obtaining the media content stream and parsing the configuration file of the target media content, preloading the media resources to be loaded, the problem of the existing technology being unable to preload content is solved, and the page rendering performance is improved.

CN119829154AActive Publication Date: 2025-04-15BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202311332615.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-13
Publication Date
2025-04-15
Estimated Expiration
2043-10-13

AI Technical Summary

Technical Problem

The prior art cannot effectively preload content non-fixed information sources, resulting in a degradation of page rendering performance.

Method used

By obtaining the media content stream, obtaining the configuration file of the target media content, determining the loading information of the media resources to be loaded, and preloading the media resources to be loaded based on this information.

Benefits of technology

Preloading of non-fixed information sources for content is realized, improving the rendering performance of the page.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119829154A_ABST
    Figure CN119829154A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a media resource preloading method and device, electronic equipment and a medium. The media resource preloading method comprises the following steps: acquiring a media content stream; under the condition that the media content stream comprises target media content and the preloading condition of the target media content is met, a configuration file of the target media content is obtained, and the target media content comprises universal media resources and media resources to be loaded; determining loading information of the media resource to be loaded based on the configuration file; and preloading the media resources to be loaded based on the loading information. The preloading problem of the information source with the non-fixed content is solved, under the condition that the media content stream comprises the target media content and the preloading condition of the target media content is met, preloading of the media resource to be loaded is achieved through the configuration file, preloading of the information source with the non-fixed content is achieved, and the preloading efficiency of the information source with the non-fixed content is improved. And the preloading operation is carried out before the target media content is displayed, so that the rendering performance of the page is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to computer technology, and more particularly to a method, device, electronic device and medium for preloading media resources. Background Art

[0002] With the development of Internet technology, the types of applications on electronic devices have increased. Applications generally have visual interactive interfaces, through which users can browse content. The interactive interface presents a variety of content, including information sources with fixed content and information sources with non-fixed content. Among them, the content of non-fixed content information sources is not fixed.

[0003] The prior art can only preload information sources with fixed contents that can be determined at compile time, but cannot preload information sources with non-fixed contents, thereby reducing the rendering performance of the page. Summary of the invention

[0004] The present disclosure provides a media resource preloading method, device, electronic device and medium to improve page rendering performance.

[0005] In a first aspect, an embodiment of the present disclosure provides a media resource preloading method, including:

[0006] Acquire a media content stream, where the media content stream includes a plurality of media contents;

[0007] When the media content stream includes target media content and a preloading condition of the target media content is met, obtaining a configuration file of the target media content, wherein the target media content includes common media resources and media resources to be loaded;

[0008] Determining loading information of the media resource to be loaded based on the configuration file;

[0009] The media resource to be loaded is preloaded based on the loading information.

[0010] In a second aspect, the embodiment of the present disclosure further provides a media resource preloading device, including:

[0011] A first acquisition module, configured to acquire a media content stream, wherein the media content stream includes a plurality of media contents;

[0012] A second acquisition module is used to acquire a configuration file of the target media content when the media content stream includes the target media content and the preloading condition of the target media content is met, wherein the target media content includes a common media resource and a media resource to be loaded;

[0013] A determination module, configured to determine the loading information of the media resource to be loaded based on the configuration file;

[0014] A preloading module is used to preload the media resource to be loaded based on the loading information.

[0015] In a third aspect, an embodiment of the present disclosure further provides an electronic device, characterized in that the electronic device includes:

[0016] one or more processing devices;

[0017] a storage device for storing one or more programs,

[0018] When the one or more programs are executed by the one or more processing devices, the one or more processing devices implement the media resource preloading method provided in the embodiment of the present disclosure.

[0019] In a fourth aspect, an embodiment of the present disclosure further provides a storage medium comprising computer executable instructions, which, when executed by a computer processor, are used to execute the media resource preloading method provided in the embodiment of the present disclosure.

[0020] In an embodiment of the present disclosure, a media content stream is obtained, wherein the media content stream includes a plurality of media contents; when the media content stream includes target media content and a preloading condition of the target media content is met, a configuration file of the target media content is obtained, wherein the target media content includes common media resources and media resources to be loaded; loading information of the media resources to be loaded is determined based on the configuration file; and the media resources to be loaded are preloaded based on the loading information, thereby solving the problem of preloading of information sources with non-fixed contents. When the media content stream includes target media content and the preloading condition of the target media content is met, preloading of the media resources to be loaded is implemented through the configuration file, thereby implementing preloading of information sources with non-fixed contents. The preloading operation before displaying the target media content improves the rendering performance of the page. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.

[0022] Figure 1 It is a flowchart of a media resource preloading method provided by an embodiment of the present disclosure;

[0023] Figure 2 It is a schematic diagram of a system architecture provided by a disclosed embodiment;

[0024] Figure 3 is a schematic diagram of a target media content preview provided by an embodiment of the present disclosure;

[0025] Figure 4 It is a flowchart of a media resource preloading method provided by an embodiment of the present disclosure;

[0026] Figure 5 is a schematic diagram of a process of preloading runtime resources provided by an embodiment of the present disclosure;

[0027] Figure 6 is a schematic diagram of loading a template resource provided by an embodiment of the present disclosure;

[0028] Figure 7 is a schematic diagram of loading a picture resource provided by an embodiment of the present disclosure;

[0029] Figure 8 It is a schematic diagram of a main template and dynamic component resource loading provided by an embodiment of the present disclosure;

[0030] Fig. 9 is a flow chart of a special-shaped card display solution provided by an embodiment of the present disclosure;

[0031] Fig.10 is a structural schematic diagram of a media resource preloading device provided by an embodiment of the present disclosure;

[0032] Fig.11 It is a structural schematic diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0033] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0034] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0035] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0036] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0037] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0038] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0039] Figure 1 It is a flow chart of a media resource preloading method provided by an embodiment of the present disclosure. The embodiment of the present disclosure is applicable to the situation of preloading media content. The method can be executed by a media resource preloading device, which can be implemented in the form of software and / or hardware. Optionally, it can be implemented by an electronic device, which can be a mobile terminal, a PC or a server, etc.

[0040] like Figure 1 As shown, the method includes:

[0041] S110: Acquire a media content stream, where the media content stream includes a plurality of media contents.

[0042] The media content stream can be considered as an information stream formed by multiple media contents. The media content stream can be an information source provided to users for browsing. The media content can be an information source presented to users, and the media content can be content in multimedia form, such as video, graphics and special-shaped cards. Among them, the special-shaped card can be content presented in the form of a card. The special-shaped card can include a content presentation area and an operation area, and the content presentation area can present the content provided by the content provider. The operation area can include a negative feedback control and an operation control. The negative feedback control can be considered as a control that feedbacks the intention of not being interested. The operation control can be a control that implements the operation of the special-shaped card, such as a control for increasing the volume and a control for fast forwarding.

[0043] Among them, the video can be a short video, such as a video whose playing time is less than the set time. Special-shaped cards are different from short videos. Each short video is a fixed message source. Special-shaped cards are based on the same base and dynamically load special-shaped cards of different forms for different businesses. Special-shaped cards of the same form may have different contents. Special-shaped cards are different for different people and are resources that cannot be determined by the compiler and can only be determined at runtime. That is, the structure of special-shaped cards is multi-form and the content is dynamic. While reusing the general capabilities of the base, the present disclosure ensures the flexibility of customized content in special-shaped cards. The base can be considered as the common content in the special-shaped card. The subroutine is called on the basis of the base to realize the acquisition and rendering of customized content.

[0044] In one embodiment, the universal capabilities of the base may include the ability to affect page switching, such as the ability to switch between cards of the opposite sex by sliding the page up and down.

[0045] This operation can obtain a media content stream from the server. The multiple media contents in the media content stream are media contents to be displayed to the user.

[0046] For the special-shaped card that realizes the listening function, the policy sent from the server to the client may be: after a set time, the mth position in the media content stream requested by the client to the server for the nth time is a special-shaped card with audio and video related to sleep aid. When the sent policy is met, the media content stream sent by the server to the client includes the special-shaped card that realizes the listening function. Where m and n are positive integers.

[0047] S120: When the media content stream includes target media content and a preloading condition of the target media content is met, obtain a configuration file of the target media content, wherein the target media content includes common media resources and media resources to be loaded.

[0048] The target media content may be considered as media content with customized content. The general media resources may be media resources common to all or part of users, and the loading timing of the general media resources is not limited, and may be advanced to the loading timing of the page displaying the target media content.

[0049] The media resources to be loaded can be customized media resources for users, such as resources displayed on the first screen and dynamic components. Dynamic components can be customized media resources for different business parties. Media resources can be resources displayed on media content, such as controls, pictures, videos and other data.

[0050] The preloading condition may be a condition for preloading the target media content. The preloading condition is not limited here, as long as the target media content is preloaded before the electronic device displays the target media content. Exemplarily, the preloading condition may be that when the x-th media content in the media content stream requested for the nth time is currently displayed, the media content stream is traversed to determine whether there is a special-shaped card. If so, it can be considered that the preloading condition is met. Where x is a positive integer less than m.

[0051] For example, the second media content stream requested by the server from the client after 21:00 includes a special-shaped card related to sleep aid. The special-shaped card can be located at the sixth position in the media content stream. When the first media content in the media content stream is displayed, the media content stream can be traversed to determine whether it includes the special-shaped card. If so, a view can be pre-created, that is, a view and a configuration file can be obtained to preload the target media content.

[0052] The configuration file may be a file that configures information associated with the media resources to be loaded in the target media content. According to the mode of the special-shaped card, the configuration file is read by the schema parsing, and the special-shaped card base, dynamic components, video, audio, pictures and other resources are preloaded according to the configuration file. Among them, the dynamic component may be a dynamically loaded component, such as a component customized by the business party.

[0053] S130: Determine loading information of the media resource to be loaded based on the configuration file.

[0054] The loading information may be considered as information required for loading the media resource to be loaded, such as obtaining the address of the media resource to be loaded, the loading method of the media resource to be loaded, and the storage address after loading.

[0055] The configuration file may be a file configured by the business party of the special-shaped card.

[0056] The configuration file may store loading information. After the media resource to be loaded is determined, the loading information of the media resource to be loaded may be obtained from the configuration file.

[0057] There may be multiple configuration items in the configuration file, which may correspond to different media resources to be loaded. When determining the loading information, this operation may traverse all configuration items to determine the loading information of each configuration item.

[0058] S140: Preload the media resource to be loaded based on the loading information.

[0059] After the loading information is determined, this operation can realize the loading of the media resource to be loaded based on the loading information. For example, from the path of obtaining the media resource to be loaded, the media resource to be loaded is recorded according to the corresponding loading method.

[0060] This operation implements preloading before the target media content is displayed, and can implement page rendering more quickly when the target media content is displayed, thereby improving the rendering efficiency of the target media content.

[0061] The technical solution of the disclosed embodiment is as follows: by acquiring a media content stream, the media content stream includes multiple media contents; when the media content stream includes target media content and the preloading condition of the target media content is met, acquiring a configuration file of the target media content, the target media content includes common media resources and media resources to be loaded; determining loading information of the media resources to be loaded based on the configuration file; and preloading the media resources to be loaded based on the loading information, so as to solve the problem of preloading of information sources with non-fixed contents. When the media content stream includes target media content and the preloading condition of the target media content is met, preloading of the media resources to be loaded is implemented through the configuration file, so as to implement preloading of information sources with non-fixed contents. The preloading operation before displaying the target media content improves the rendering performance of the page.

[0062] Based on the above embodiment, a variant embodiment of the above embodiment is proposed. It should be noted that in order to make the description concise, only the differences from the above embodiment are described in the variant embodiment.

[0063] In one embodiment, the loading information includes a preloading mode and resource link data, and the determining the loading information of the media resource to be loaded based on the configuration file includes:

[0064] Traversing the items to be processed in the configuration file, and determining the preloading path and preloading method corresponding to the items to be processed;

[0065] Determine the resource link data corresponding to the preload path.

[0066] The pending items can be considered as the configuration items to be processed in the configuration file. The preloading method can be considered as the preloading method, and different media resources to be loaded can correspond to different loading methods.

[0067] The preload path can be considered as the path of the media resource to be loaded. The resource link data can be a link for implementing the preloading of the media resource to be loaded. There can be a corresponding relationship between the preload path and the resource link data. In this embodiment, the resource connection data corresponding to the preload path can be searched from the database. The database can be transmitted from the server to the client. The timing of transmission is not limited, and it can be included in the corresponding media content stream or transmitted synchronously with the corresponding media content stream. The corresponding media content stream can be a media content stream including the target media content.

[0068] This embodiment traverses each item to be processed in the configuration file to determine the preloading mode and preloading path of each item to be processed. After determining the preloading path, the resource link data corresponding to the preloading path is determined.

[0069] In one embodiment, when the media content stream includes target media content and the preloading condition of the target media content is met, the method further includes:

[0070] A view of the target media content is pre-created through a local service layer, where the view is used to visualize the target media content.

[0071] The local service layer is also called the native layer, which is a software layer that provides local services. In this embodiment, if the preloading conditions are met, a view of the target media content can be created through the local service layer, and after switching to the target media content, the view can be associated with the target media content to visualize the target media content.

[0072] This embodiment implements pre-creation of views, further improving the rendering efficiency of target media content.

[0073] Figure 2 This is a schematic diagram of a system architecture provided by the disclosed embodiment, see Figure 2 The system architecture includes a native layer, a container layer, a cross-end layer and a platform layer. In this embodiment, the view is pre-created through the native layer, that is, the view of the target media content is pre-created through the local service layer, and the view is used to visualize the target media content.

[0074] In one embodiment, after preloading the to-be-loaded media resource based on the loading information, the method further includes:

[0075] Displaying a target page, wherein the target page includes target media content;

[0076] Receiving an operation event on the target media content through a container layer;

[0077] Respond to the operation event.

[0078] The container layer can be considered as the network layer associated with the container in the network architecture. The operation event can be considered as an event for operating the target media content, such as a click event on a control in the target media content.

[0079] The target page may be a page that displays the target media content. After the target media content is displayed, the present embodiment may receive an operation event of the target media content through the container layer. The method of responding to the operation event is not limited, and different operation events correspond to different response means, such as implementing page adjustment, implementing volume adjustment, etc.

[0080] like Figure 2As shown in the figure, the container layer realizes the basic container capabilities that can be reused by various businesses, as well as performance optimization and analysis, which are the general capabilities of the base. The basic container capabilities include the ability to communicate data and the ability to receive and communicate events, such as the ability to receive operation events in the target page, and the ability to slide on the target page to switch the displayed content.

[0081] Performance optimization and analysis implements functions such as preloading and resource loading status. Among them, preloading can be a function for preloading loading information of the media resource to be loaded. Resource loading status includes determining resource loading status and reporting resource loading status, such as the loading status of loading information.

[0082] The cross-end layer can implement the cross-end layer. The cross-end layer has the base general capability class, which is the general capability of the base. The base general capability class implements dynamic component rendering and fallback strategy. The platform layer can provide efficiency tools with debugging preview and event simulation.

[0083] Among them, dynamic component rendering can be rendering of the media resources to be loaded. The fallback strategy checks the loading status of page resources in advance. If the core content of the page fails to load, the special card is deleted and is not counted as distributed. It can be distributed to the client next time. The core content can be the preset content, which is not limited here.

[0084] This disclosure is Figure 2 The system architecture diagram shown implements management and control, and supports the business side to flexibly customize the personalized content in the special-shaped card, such as the media resources to be loaded pre-loaded through the configuration file.

[0085] In one embodiment, after preloading the to-be-loaded media resource based on the loading information, the method further includes:

[0086] If the preset media resource in the media resources to be loaded fails to be loaded, deleting the target media content from the media content stream;

[0087] If the preset media resource is loaded successfully, a loading success event of the media resource to be loaded is triggered.

[0088] The preset media resource can be considered as a pre-set media resource. The preset media resource can be the core content of the target media content. When the preset media resource fails to load, the target media content can be deleted to avoid displaying inefficient target media content, that is, to achieve deletion of special-shaped card processing.

[0089] When the preset media resource is recorded successfully, a media resource loading success event may be triggered. The media resource loading success event indicates that the media resource is loaded successfully and the target media content may be displayed.

[0090] Exemplarily, the media resource loading success event indicates that the core content of the business, such as a preset media resource, has been loaded and the target media content can be displayed.

[0091] In this embodiment, the timing of triggering the media resource loading success event can be determined based on the priority of the media content. If the target media content is strongly dependent on a certain image, the media resource loading success event can be triggered after the image is loaded. If there is no strong dependent object, the media resource loading success event can be triggered after determining that the data is normal, and the loading status can be reported after being triggered.

[0092] The form of the media content to be loaded is not limited, such as base, image, video, text, dynamic component, audio and video, external js file, any file and animated image resources, etc. Preloading reduces the time consumption of single resource loading and improves the hit rate of resources.

[0093] In one embodiment, the general media resource includes a negative feedback control, and the operation event includes a click event of the negative feedback control.

[0094] The click event can be an event of clicking a negative feedback control. The negative feedback control can be a general media resource. After clicking the negative feedback control to close the special-shaped card, a message of successful operation can be popped up. When the negative feedback is submitted to the server, the special-shaped card can also be swiped out of the screen. After clicking the negative feedback control, the special-shaped card or the same type of special-shaped card can be not displayed for y days.

[0095] The common media resource can be the main frame base. The backend of the main frame base can uniformly manage the negative feedback logic, and the negative feedback of multiple users can be uniformly managed to achieve the distribution of different special-shaped cards. The main frame base can also collect click events of negative feedback controls and support the dynamic expansion of negative feedback events on the business side.

[0096] In one embodiment, receiving the operation event on the target media content through the container layer includes:

[0097] An operation event of a negative feedback control and / or an operation control in the target media content is received through a container layer, and the jump address, display style and display state corresponding to the operation control are customized items of the operation control.

[0098] The jump address can be considered as the address to which the operation control jumps after clicking. The display style can be considered as the style of the operation control display. The display state can be considered as the state of whether the display control is displayed or not, and the display state includes display and hide. Custom items can be items that can be customized by the business party.

[0099] There are two configuration modes for operation controls, including default operation controls and customized operation controls.

[0100] The default operation control can detect click events by embedding points, support configuration of control styles (the control can only support jumps without limiting the protocol), support configuration of control styles, customize click events, and hide operation controls.

[0101] In order to avoid repeated reporting of click events, the business side can report the tracking points to implement click event detection.

[0102] In one embodiment, the media resource preloading method further includes:

[0103] Scanning a preview pattern, where the preview pattern is a pattern generated by the server based on a media resource associated with the target media content;

[0104] The target media content is previewed.

[0105] The preview pattern can be considered as a pattern in advance of realizing the target media content, and the target media content can be previewed by scanning the preview pattern.

[0106] The preview pattern may be a pattern presented in a set encoding manner, such as a QR code.

[0107] The preview pattern can be generated by the server based on the media resources included in the target media content. The electronic device can preview the target media content by scanning the preview pattern.

[0108] Figure 3 is a schematic diagram of a target media content preview provided by an embodiment of the present disclosure, see Figure 3 , the background of the electronic device that displays the special-shaped card can configure the media resources associated with the special-shaped card, and then transmit it to the server of the electronic device. The background can interact with the server through the method of adding, deleting and modifying the media resources, and the server can query the media resources from the background through the list query method. After the server obtains the media resources, it can authenticate the business party server. After the authentication is passed, it can transmit data, such as media resources, to the business party server. The business party server can interact with the business party background through the method of adding, deleting, modifying and querying the media resources.

[0109] The link parsed from the previewed QR code can be encrypted to improve security. For example, the QR code is generated by obtaining the client encrypted ID parameter. The QR code generation device is not limited here. The client previews the special-shaped card by scanning the QR code. The server can configure the client redirection page, and the redirection page (i.e. the redirected page) can query the server according to the encrypted ID.

[0110] The server and backend support adding, deleting, modifying and checking configuration items, and displaying the configuration item list. The backend generates a QR code for the client redirection page based on the configuration and environment. After scanning the code to enter the client redirection page, the environment is determined based on the parameters on the schema and the complete configuration of the special-shaped card is queried based on the id. After obtaining the complete configuration, the special-shaped card is spliced ​​and the preview is jumped. When authenticating the business party server, it can be based on the whitelist authentication, and the whitelist can include authorized business party servers.

[0111] Figure 4 : is a flow chart of a media resource preloading method provided by an embodiment of the present disclosure. This embodiment refines the operation of obtaining the configuration file of the target media content, including the following steps:

[0112] S210: Acquire a media content stream, where the media content stream includes a plurality of media contents.

[0113] S220: When the media content stream includes target media content and a preloading condition of the target media content is met, obtain identification information corresponding to the target media content.

[0114] The identification information may be considered as information for identifying the target media content, and the identification information is not limited herein. The identification information may be included in the media content stream.

[0115] S230, determining whether a resource package corresponding to the identification information exists locally, if so, executing S240; if not, executing S250.

[0116] After determining the identification information, this embodiment can search locally based on the identification information to determine whether there is a resource package corresponding to the identification information locally on the electronic device. The resource package can be a data package corresponding to the target media content. If the target media content has been displayed, the resource package will be stored locally. This embodiment can first determine whether the resource package is stored locally, and if so, obtain the configuration file based on the resource package. If not, preload the configuration file.

[0117] S240: Determine the configuration file in the resource package as the configuration file of the target media content.

[0118] In the case of locally storing resource packages, the configuration files in the resource packages can be used as the configuration files of the target media content. Directly using the existing local configuration files improves the speed of obtaining the configuration files.

[0119] S250: Preload a configuration file corresponding to the identification information.

[0120] If the resource package does not exist locally, this operation can preload the configuration file corresponding to the identification information, so as to parse the configuration file and preload the media resources.

[0121] S260: Determine loading information of the media resource to be loaded based on the configuration file.

[0122] S270: Preload the media resource to be loaded based on the loading information.

[0123] Figure 5 is a schematic diagram of a process of preloading runtime resources provided by an embodiment of the present disclosure. Figure 5 First, determine the identification information, such as parsing the identification information according to the schema: channel and bundle, to locate the special-shaped card, and check whether there is a local resource package, such as a gecko package. If there is a gecko package: read the resource package and find out whether there is a configuration file in the gecko package; read the configuration file, verify whether the data structure meets expectations, and implement the verification structure. Then traverse each preloaded item, that is, traverse the configuration file to see if there are unprocessed pending items. If not, return the preload result of each preloaded item. If there are unprocessed pending items, read the preload path, that is, path, and obtain the resource link data corresponding to the preload path from the database; read the preload method. When reading the preload method, you can find the preload method according to the category field read from the configuration file, and then load the corresponding resource link data according to the preload method. Finally, determine whether the loading is complete. If not, return to continue traversing the configuration file.

[0124] If there is no local resource package, preload the configuration file and the resources required to render the target media content, then determine whether the configuration file is loaded successfully. If so, read the configuration file and verify the structure, and perform subsequent operations.

[0125] When the configuration file is not loaded successfully or when judging whether the loading is successful, you can perform a check to report the loading status and callback.

[0126] When the category field is a dynamic component, you can construct a schema based on the dynamic component link and recursively repeat the entire process. If the category field is other resources, you can reuse the resource preloading method.

[0127] In this embodiment, the operation of obtaining the configuration file is refined, the efficiency of obtaining the configuration file is improved, and the efficiency of rendering the page is further accelerated.

[0128] The present disclosure is described exemplarily below. The media resource preloading method provided by the present disclosure can be considered as a special-shaped card design solution in a media content stream scenario. Figure 2 Decoupling is achieved on the framework shown, supporting the separate maintenance of special-shaped card dynamic components for different businesses in different warehouses.

[0129] In terms of performance, runtime resource preloading is implemented. In the case of dynamic content, resources can be preloaded, and there is no need to wait for network overhead when resources are executed, so as to achieve the effect of accelerating rendering and shorten the time to display the target page. From the perspective of bandwidth cost, according to different forms of special-shaped cards and different distribution strategies, only users who are about to see special-shaped cards at runtime can download the resource package of special-shaped cards, so as to achieve fine-grained on-demand loading.

[0130] Avoid issuing fixed-form templates based on the form of special-shaped cards. Each business iterates a set of templates, which results in high code coupling. Avoid developing multiple templates based on different forms, which results in low reuse and high development costs. Avoid preloading only resources that can be determined by the compiler, but not preloading runtime resources. Avoid issuing instructions to all users of the application to download resource packages for special-shaped cards in order to ensure the rendering performance of the first screen of the page from a bandwidth perspective. Most users download the resource package but do not use the resources of the special-shaped card, which is a waste.

[0131] The disclosure solves the problem that the main frame base needs to control the demands of all forms of special-shaped cards and reuse common components, while realizing the convenience of different business parties when accessing and the flexibility of content expansion. The balance problem that the full push cost of the offline package is higher than the page performance is solved. The distribution strategies and users of special-shaped cards of different forms in different businesses are different. If the full push is not made, the loading performance of the page cannot be guaranteed. If the full push is made, the bandwidth cost is high. The solution provided by the disclosure is cost-controllable and ensures that the user has downloaded the offline package before viewing the special-shaped card. The solution solves the problem of how to reduce the labor cost of the debugging link in the development process of special-shaped cards. The distribution strategy of special-shaped cards is complex. There are many pre-operations to be done to display special-shaped cards in the actual link, and the pre-operation links of special-shaped cards of different forms are completely different. When developing card content, how to quickly preview and debug the problem. The problem of lack of security audit link is solved. The distribution link of special-shaped cards is complex. Auditors need to audit special-shaped cards. It is basically impossible for non-R&D personnel to simulate the corresponding form of special-shaped cards. Therefore, the entire link lacks the problem of audit. Solve the stability problem and ensure that when users see special-shaped cards, the probability that the card content is effectively readable reaches 100%.

[0132] In order to solve the problem that the main frame base needs to control all special-shaped cards, and when the control component is updated, it is not necessary to release each special-shaped card before updating, but it is updated once through the base, and all special-shaped cards are effective. This paper designs the architecture of the main frame base and business dynamic components, see Figure 2. Customization of special-shaped cards is achieved by dynamically loading dynamic components. In order to balance the high cost of pushing full offline packages and page performance, a solution for pre-creating views and pre-loading resources at runtime was designed; in order to solve the problem of the lack of security audit links and the labor cost in the development of special-shaped cards, a debugging preview tool was designed in the R&D stage, which supports the generation of a QR code after configuring the data of the special-shaped card base template on the platform, and directly scans the code for preview. Auditors can also scan the code on the platform to open a simulated page with the same content as the actual special-shaped card for review. In order to solve the stability problem, a communication mechanism between the client and the business dynamic component is designed. When the core content of the special-shaped card base or the business dynamic component times out or loads abnormally, the front end notifies the client in real time to delete the special-shaped card in the media content stream, and the user will not see the jump process of deleting the card.

[0133] The present disclosure not only ensures the control capabilities of the base, but also retains the flexibility of the dynamic components on the business side through a cross-end scenario base and dynamic component architecture, and has good horizontal scalability. The architecture decouples the main framework base and the dynamic components on the business side, reducing development costs and communication costs. It greatly reduces bandwidth costs and loads on demand in real time. Only users who are about to see the special-shaped card download the offline package. It completes the important link of security audit. The special-shaped card is effectively displayed 100%, and the success rate of loading the special-shaped card is 99.93% on average, of which 0.07% of the failures are attributed to network problems.

[0134] Figure 6 is a schematic diagram of loading a template resource provided by an embodiment of the present disclosure. Figure 6 The template resource can be a general resource. In the related art, the template resource is requested to be loaded after the page is loaded, and then the page is rendered. The present disclosure advances the timing of template resource loading, such as when the page is loaded, and the page is rendered after the template resource is loaded, thereby improving the time when the primary content of the page appears on the screen (First Meaningful Paint, fmp).

[0135] Figure 7 This is a schematic diagram of loading a picture resource provided by an embodiment of the present disclosure. The first screen resource may include a picture resource in the media resource to be loaded. In the related art, the template is loaded after the page is loaded, and then the page is rendered, and the first screen resource is loaded during the page rendering process. The present disclosure advances the timing of loading the first screen resource, such as to the timing of page loading, and after the page is loaded, the template resource is loaded, and finally the page is rendered, thereby improving fmp.

[0136] Figure 8 is a schematic diagram of a main template and dynamic component resource loading provided by an embodiment of the present disclosure, see Figure 8In the related art, after the page is loaded, the template is loaded, and then the page is rendered. During the page rendering process, the first screen resources are loaded. After the page is rendered, the first screen business logic is executed, and the dynamic component template is loaded in the first screen business logic. Resources are loaded during the dynamic component template loading process. This application advances the timing of loading the main template (i.e., the main template, which can be pre-set) and the dynamic component template, and advances the timing of loading the dynamic component first screen static resources, such as in advance to the page loading timing. Figure 6-8 The content in advance can be considered as Figure 5 Different pending items in the ,correspond to different loading methods.,The first effective drawing fmp is improved by preloading in advance.

[0137] Fig. 9 is a flowchart of a special-shaped card display solution provided by an embodiment of the present disclosure, see Fig. 9 , as the front-end special-shaped card, it interacts with the client for media resources and loads the special-shaped card base, dynamic components, videos and pictures. The special-shaped card includes the special-shaped card base and card content. The card content is developed by the business party and packaged into dynamic components to interact with the special-shaped card base for business data and dynamic components. The special-shaped card base implements dynamic component loading, built-in components, feedback buttons (i.e. negative feedback controls), action buttons (i.e. operation controls), fallback strategies and base pre-loading configurations. The special-shaped card base can also report uninterested data and playback data to the server. The front-end fallback strategy can notify the client to delete the card. The client can refresh the media content stream to the server, such as the media content stream of the x-1th refresh and the media content stream of the xth refresh. Each refresh of the media content stream includes multiple media contents. The media content stream of the x-1th refresh includes the media content of the yth position. The xth refresh includes the media content of the 1st position, the media content of the 2nd position...the special-shaped card of the zth position. The special-shaped card framework can realize the function of client transparent transmission of data.

[0138] The special-shaped card base can realize the event monitoring function. In one embodiment, when entering the target page by sliding up and down, the background video is reloaded; when returning to the special-shaped card from the secondary page of the target page, the background video continues the previous progress. For example, the following four events are defined:

[0139] The first event is that when the swipe up and down gesture on the media content stream is triggered, the callback is executed to play the background video and background music.

[0140] The second event is triggered when the headset page is opened and the special-shaped card is returned. The callback is executed to continue playing the background video and background music.

[0141] The third event is triggered when the special-shaped card slides out of the screen and is no longer in the visible area. The callback execution pauses the background video and background music, and the progress is cleared.

[0142] The fourth event is that the target page is swiped away, the control is switched, the page is switched, the background is triggered, the callback is executed to pause the background video and background music, and the progress is cleared.

[0143] Fig.10 is a structural diagram of a media resource preloading device provided by an embodiment of the present disclosure, such as Fig.10 As shown, the device comprises:

[0144] A first acquisition module 1010, configured to acquire a media content stream, wherein the media content stream includes a plurality of media contents;

[0145] A second acquisition module 1020 is used to acquire a configuration file of the target media content when the media content stream includes the target media content and the preloading condition of the target media content is met, wherein the target media content includes a common media resource and a media resource to be loaded;

[0146] A determination module 1030, configured to determine the loading information of the media resource to be loaded based on the configuration file;

[0147] The preloading module 1040 is used to preload the media resources to be loaded based on the loading information. The technical solution provided by the embodiment of the present disclosure solves the problem of preloading information sources with non-fixed content. When the media content stream includes target media content and the preloading conditions of the target media content are met, the preloading of the media resources to be loaded is realized through the configuration file, and the preloading of information sources with non-fixed content is realized. The preloading operation before the target media content is displayed improves the rendering performance of the page.

[0148] In one embodiment, the second acquisition module 1020 is specifically configured to:

[0149] When the media content stream includes target media content and a preloading condition of the target media content is met, acquiring identification information corresponding to the target media content;

[0150] Determine whether there is a resource package corresponding to the identification information locally;

[0151] If it exists, the configuration file in the resource package is determined as the configuration file of the target media content; otherwise, the configuration file corresponding to the identification information is preloaded.

[0152] In one embodiment, the loading information includes a preloading mode and resource link data, and the determination module 1030 is specifically used to:

[0153] Traversing the items to be processed in the configuration file, and determining the preloading path and preloading method corresponding to the items to be processed;

[0154] Determine the resource link data corresponding to the preload path.

[0155] In one embodiment, the device also includes a creation module for pre-creating a view of the target media content through a local service layer when the media content stream includes the target media content and the preloading condition of the target media content is met, wherein the view is used to visualize the target media content.

[0156] In one embodiment, the device further comprises a display module, which displays a target page after preloading the to-be-loaded media resource based on the loading information, wherein the target page comprises target media content;

[0157] Receiving an operation event on the target media content through a container layer;

[0158] Respond to the operation event.

[0159] In one embodiment, the general media resource includes a negative feedback control, and the operation event includes a click event of the negative feedback control.

[0160] In one embodiment, the display module is specifically used for:

[0161] An operation event of a negative feedback control and / or an operation control in the target media content is received through a container layer, and the jump address, display style and display state corresponding to the operation control are customized items of the operation control.

[0162] In one embodiment, the device further comprises a deletion module, which is used to delete the target media content from the media content stream if the preset media resource in the media resource to be loaded fails to be loaded after the media resource to be loaded is preloaded based on the loading information;

[0163] If the preset media resource is loaded successfully, a loading success event of the media resource to be loaded is triggered.

[0164] In one embodiment, the device further comprises a preview module, which is used to:

[0165] Scanning a preview pattern, where the preview pattern is a pattern generated by the server based on a media resource associated with the target media content;

[0166] The target media content is previewed.

[0167] The media resource preloading device provided in the embodiments of the present disclosure can execute the media resource preloading method provided in any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.

[0168] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present disclosure.

[0169] Fig.11 Schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. Fig.11 , which shows an electronic device (eg, Fig.11 A schematic diagram of the structure of a terminal device or server) 500.

[0170] The electronic device 500 includes:

[0171] One or more processing devices 501;

[0172] The storage device 508 is used to store one or more programs.

[0173] When the one or more programs are executed by the one or more processing devices 501 , the one or more processing devices 501 implement the method provided in the present disclosure.

[0174] The terminal devices in the embodiments of the present disclosure may include but are not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., as well as fixed terminals such as digital TVs, desktop computers, etc. Fig.11 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0175] like Fig.11 As shown, the electronic device 500 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 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 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An edit / output (I / O) interface 505 is also connected to the bus 504.

[0176] Typically, the following devices may be connected to the I / O interface 505: an input device 506 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 508 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 509. The communication device 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. Although Fig.11 The electronic device 500 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0177] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 509, or installed from a storage device 508, or installed from a ROM 502. When the computer program is executed by the processing device 501, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0178] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0179] The electronic device provided by the embodiment of the present disclosure and the media resource preloading method provided by the above embodiment belong to the same inventive concept. The technical details not fully described in this embodiment can be referred to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.

[0180] The embodiments of the present disclosure provide a computer storage medium on which a computer program is stored. When the program is executed by a processor, the media resource preloading method provided in the above embodiments is implemented.

[0181] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the two.

[0182] The computer storage medium may be a storage medium of computer executable instructions, which, when executed by a computer processor, are used to perform the methods provided by the present disclosure.

[0183] Computer readable storage media may be, for example, but not limited to: electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or devices, or any combination thereof. More specific examples of computer readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate, or transmit a program used by or in combination with an instruction execution system, device, or device. The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wire, optical cable, RF (radio frequency), etc., or any suitable combination of the foregoing.

[0184] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0185] The computer-readable medium may be included in the electronic device, or may exist independently without being installed in the electronic device.

[0186] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device:

[0187] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: obtains a media content stream, wherein the media content stream includes multiple media contents; obtains a configuration file of the target media content when the media content stream includes target media content and the preloading condition of the target media content is met, wherein the target media content includes common media resources and media resources to be loaded; determines loading information of the media resources to be loaded based on the configuration file; and preloads the media resources to be loaded based on the loading information.

[0188] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or combinations thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0189] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0190] The modules or units involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a module or unit does not limit the unit itself in some cases. For example, the first acquisition module may also be described as a "media content stream acquisition module".

[0191] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

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

[0193] According to one or more embodiments of the present disclosure, [Example 1] provides a media resource preloading method, including:

[0194] Acquire a media content stream, where the media content stream includes a plurality of media contents;

[0195] When the media content stream includes target media content and a preloading condition of the target media content is met, obtaining a configuration file of the target media content, wherein the target media content includes common media resources and media resources to be loaded;

[0196] Determining loading information of the media resource to be loaded based on the configuration file;

[0197] The media resource to be loaded is preloaded based on the loading information.

[0198] According to one or more embodiments of the present disclosure, [Example 2] provides the method of Example 1, where the media content stream includes target media content and the preloading condition of the target media content is met, obtaining a configuration file of the target media content, including:

[0199] When the media content stream includes target media content and a preloading condition of the target media content is met, acquiring identification information corresponding to the target media content;

[0200] Determine whether there is a resource package corresponding to the identification information locally;

[0201] If it exists, the configuration file in the resource package is determined as the configuration file of the target media content; otherwise, the configuration file corresponding to the identification information is preloaded.

[0202] According to one or more embodiments of the present disclosure, [Example 3] provides the method of Example 1, wherein the loading information includes a preloading mode and resource link data, and the determining the loading information of the media resource to be loaded based on the configuration file includes:

[0203] Traversing the items to be processed in the configuration file, and determining the preloading path and preloading method corresponding to the items to be processed;

[0204] Determine the resource link data corresponding to the preload path.

[0205] According to one or more embodiments of the present disclosure, [Example 4] provides the method of Example 1, wherein, when the media content stream includes target media content and the preloading condition of the target media content is met, the method further includes:

[0206] A view of the target media content is pre-created through a local service layer, where the view is used to visualize the target media content.

[0207] According to one or more embodiments of the present disclosure, [Example 5] provides the method of Example 1, which further includes, after preloading the to-be-loaded media resource based on the loading information:

[0208] Displaying a target page, wherein the target page includes target media content;

[0209] Receiving an operation event on the target media content through a container layer;

[0210] Respond to the operation event.

[0211] According to one or more embodiments of the present disclosure, [Example 6] provides the method described in Example 5, wherein the general media resource includes a negative feedback control, and the operation event includes a click event of the negative feedback control.

[0212] According to one or more embodiments of the present disclosure, [Example 7] provides the method described in Example 5, wherein receiving an operation event on the target media content through the container layer includes:

[0213] An operation event of a negative feedback control and / or an operation control in the target media content is received through a container layer, and the jump address, display style and display state corresponding to the operation control are customized items of the operation control.

[0214] According to one or more embodiments of the present disclosure, [Example 8] provides the method of Example 1, which further includes, after preloading the to-be-loaded media resource based on the loading information:

[0215] If the preset media resource in the media resources to be loaded fails to be loaded, deleting the target media content from the media content stream;

[0216] If the preset media resource is loaded successfully, a loading success event of the media resource to be loaded is triggered.

[0217] According to one or more embodiments of the present disclosure, [Example 9] provides the method described in Example 1, further comprising:

[0218] Scanning a preview pattern, where the preview pattern is a pattern generated by the server based on a media resource associated with the target media content;

[0219] The target media content is previewed.

[0220] According to one or more embodiments of the present disclosure, [Example 10] provides a media resource preloading device, including:

[0221] A first acquisition module, configured to acquire a media content stream, wherein the media content stream includes a plurality of media contents;

[0222] A second acquisition module is used to acquire a configuration file of the target media content when the media content stream includes the target media content and the preloading condition of the target media content is met, wherein the target media content includes a common media resource and a media resource to be loaded;

[0223] A determination module, configured to determine the loading information of the media resource to be loaded based on the configuration file;

[0224] A preloading module is used to preload the media resource to be loaded based on the loading information.

[0225] According to one or more embodiments of the present disclosure, [Example 11] provides an electronic device, the electronic device comprising:

[0226] one or more processing devices;

[0227] a storage device for storing one or more programs,

[0228] When the one or more programs are executed by the one or more processing devices, the one or more processing devices implement the media resource preloading method as described in any one of Examples 1-9.

[0229] According to one or more embodiments of the present disclosure, [Example 12] provides a storage medium containing computer executable instructions, which, when executed by a computer processor, are used to execute the media resource preloading method as described in any one of Examples 1-9.

[0230] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0231] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0232] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.

Claims

1. A media resource preloading method, characterized in that: include: Acquire a media content stream, where the media content stream includes a plurality of media contents; When the media content stream includes target media content and a preloading condition of the target media content is met, obtaining a configuration file of the target media content, wherein the target media content includes common media resources and media resources to be loaded; Determining loading information of the media resource to be loaded based on the configuration file; The media resource to be loaded is preloaded based on the loading information.

2. The method according to claim 1, characterized in that When the media content stream includes target media content and a preloading condition of the target media content is met, obtaining a configuration file of the target media content includes: When the media content stream includes target media content and a preloading condition of the target media content is met, acquiring identification information corresponding to the target media content; Determine whether there is a resource package corresponding to the identification information locally; If it exists, the configuration file in the resource package is determined as the configuration file of the target media content; otherwise, the configuration file corresponding to the identification information is preloaded.

3. The method according to claim 1, characterized in that: The loading information includes a preloading method and resource link data, and the determining the loading information of the media resource to be loaded based on the configuration file includes: Traversing the items to be processed in the configuration file, and determining the preloading path and preloading method corresponding to the items to be processed; Determine the resource link data corresponding to the preload path.

4. The method according to claim 1, characterized in that: In a case where the media content stream includes target media content and the preloading condition of the target media content is met, the method further includes: A view of the target media content is pre-created through a local service layer, where the view is used to visualize the target media content.

5. The method according to claim 1, characterized in that After preloading the to-be-loaded media resource based on the loading information, the method further includes: Displaying a target page, wherein the target page includes target media content; Receiving an operation event on the target media content through a container layer; Respond to the operation event.

6. The method according to claim 5, characterized in that The general media resource includes a negative feedback control, and the operation event includes a click event of the negative feedback control.

7. The method according to claim 5, characterized in that The receiving, through the container layer, an operation event on the target media content includes: An operation event of a negative feedback control and / or an operation control in the target media content is received through a container layer, and the jump address, display style and display state corresponding to the operation control are customized items of the operation control.

8. The method according to claim 1, characterized in that After preloading the to-be-loaded media resource based on the loading information, the method further includes: If the preset media resource in the media resources to be loaded fails to be loaded, deleting the target media content from the media content stream; If the preset media resource is loaded successfully, a loading success event of the media resource to be loaded is triggered.

9. The method according to claim 1, characterized in that: Also includes: Scanning a preview pattern, where the preview pattern is a pattern generated by the server based on a media resource associated with the target media content; The target media content is previewed.

10. A media resource preloading device, characterized in that: include: A first acquisition module, configured to acquire a media content stream, wherein the media content stream includes a plurality of media contents; A second acquisition module is used to acquire a configuration file of the target media content when the media content stream includes the target media content and the preloading condition of the target media content is met, wherein the target media content includes a common media resource and a media resource to be loaded; A determination module, configured to determine the loading information of the media resource to be loaded based on the configuration file; A preloading module is used to preload the media resource to be loaded based on the loading information.

11. An electronic device, characterized in that: The electronic device comprises: one or more processing devices; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processing devices, the one or more processing devices implement the media resource preloading method as described in any one of claims 1-9.

12. A storage medium comprising computer executable instructions, wherein the computer executable instructions are used to execute the media resource preloading method as described in any one of claims 1 to 9 when executed by a computer processor.

Citation Information

Patent Citations

  • Method and equipment for loading application resource

    CN105760199A

  • Page loading method and system and related equipment

    CN106302557A

  • Data processing method and device, electronic equipment and storage medium

    CN111581403A

  • Multimedia resource preloading method and device, electronic equipment and storage medium

    CN112203111A

  • Video processing method and device, electronic equipment, medium and product

    CN113949935A