A media resource preloading method and device, electronic equipment and medium

By obtaining and preloading the configuration files and resources of the target media content in the media content stream, the problem of preloading information sources with non-fixed content is solved, thus improving the rendering performance of the page.

CN119829154BActive Publication Date: 2026-04-17BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING ZITIAO NETWORK TECH CO LTD
Filing Date
2023-10-13
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

Existing technologies cannot effectively preload information sources with non-fixed content, resulting in a decrease in page rendering performance.

Method used

By obtaining the configuration file of the target media content in the media content stream, the loading information of the media resources to be loaded is determined, and these resources are preloaded before display. The configuration file is used to achieve preloading of information sources with non-fixed content.

Benefits of technology

It improves page rendering performance, especially by enabling fast rendering before the target media content is displayed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119829154B_ABST
    Figure CN119829154B_ABST
Patent Text Reader

Abstract

This disclosure provides a media resource preloading method, apparatus, electronic device, and medium. The media resource preloading method includes: acquiring a media content stream; if the media content stream includes target media content and the preloading conditions for the target media content are met, acquiring a configuration file for the target media content, wherein the target media content includes general media resources and media resources to be loaded; determining loading information for the media resources to be loaded based on the configuration file; and preloading the media resources to be loaded based on the loading information. This solves the problem of preloading information sources with non-fixed content. When the media content stream includes target media content and the preloading conditions for the target media content are met, the preloading of media resources to be loaded is achieved through the configuration file, realizing the preloading of information sources with non-fixed content. This preloading operation before the display of the target media content improves page rendering performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to computer technology, and more particularly to a method, apparatus, electronic device, and medium for preloading media resources. Background Technology

[0002] With the development of internet technology, the variety of applications on electronic devices has increased. Applications generally have a visual, interactive interface through which users can browse content. The content presented by the interface is diverse, including both fixed and non-fixed information sources. The content of non-fixed information sources is not fixed.

[0003] Existing technologies can only preload information sources with fixed content that can be determined at compile time, and cannot preload information sources with non-fixed content, thus reducing page rendering performance. Summary of the Invention

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

[0005] In a first aspect, embodiments of this disclosure provide a media resource preloading method, including:

[0006] Acquire a media content stream, wherein the media content stream includes multiple media contents;

[0007] If the media content stream includes target media content and the preloading conditions of the target media content are met, the configuration file of the target media content is obtained. The target media content includes general media resources and media resources to be loaded.

[0008] The loading information of the media resources to be loaded is determined based on the configuration file;

[0009] The media resources to be loaded are preloaded based on the loading information.

[0010] Secondly, this disclosure also provides a media resource preloading device, comprising:

[0011] The first acquisition module is used to acquire a media content stream, wherein the media content stream includes multiple media contents;

[0012] The second acquisition module is used to acquire the configuration file of the target media content when the media content stream includes the target media content and the preloading conditions of the target media content are met. The target media content includes general media resources and media resources to be loaded.

[0013] The determination module is used 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 resources to be loaded based on the loading information.

[0015] Thirdly, embodiments of this disclosure also provide an electronic device, characterized in that the electronic device comprises:

[0016] One or more processing devices;

[0017] 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 embodiments of this disclosure.

[0019] Fourthly, embodiments of this disclosure also provide a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform the media resource preloading method provided in embodiments of this disclosure.

[0020] This embodiment of the disclosure obtains a media content stream, which includes multiple media contents; when the media content stream includes target media content and the preloading conditions of the target media content are met, it obtains a configuration file of the target media content, which includes general media resources and media resources to be loaded; it determines the loading information of the media resources to be loaded based on the configuration file; and it preloads the media resources to be loaded based on the loading information. This solves the preloading problem of 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 media resources to be loaded is achieved through the configuration file, realizing the preloading of information sources with non-fixed content. The preloading operation before the display of the target media content improves the rendering performance of the page. Attached Figure Description

[0021] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote 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 This is a flowchart illustrating a media resource preloading method provided in an embodiment of this disclosure;

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

[0024] Figure 3 This is a schematic diagram of a target media content preview provided in an embodiment of this disclosure;

[0025] Figure 4 This is a schematic flowchart of a media resource preloading method provided in an embodiment of this disclosure;

[0026] Figure 5 This is a schematic diagram of a process for preloading runtime resources provided in an embodiment of this disclosure;

[0027] Figure 6 This is a schematic diagram illustrating the loading of a template resource provided in an embodiment of this disclosure;

[0028] Figure 7 This is a schematic diagram illustrating the loading of an image resource according to an embodiment of this disclosure;

[0029] Figure 8 This is a schematic diagram illustrating the loading of a main template and dynamic component resources according to an embodiment of this disclosure;

[0030] Figure 9 This is a flowchart of a non-standard card display scheme provided in an embodiment of this disclosure;

[0031] Figure 10 This is a schematic diagram of the structure of a media resource preloading device provided in an embodiment of this disclosure;

[0032] Figure 11 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation

[0033] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.

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

[0035] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based 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". Definitions of other terms will be given in the description below.

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

[0037] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

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

[0039] Figure 1 This is a flowchart illustrating a media resource preloading method provided in this embodiment. This embodiment is applicable to situations where media content is preloaded. The method can be executed by a media resource preloading device, which can be implemented in software and / or hardware. Optionally, it can be implemented by an electronic device, such as a mobile terminal, a PC, or a server.

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

[0041] S110. Obtain a media content stream, wherein the media content stream includes multiple media contents.

[0042] Media content streaming can be considered an information flow composed of multiple media content streams. Media content streaming can be an information source provided to users for browsing. Media content can be a multimedia format, such as video, text and images, and customizable cards. Customizable cards can be content presented in card form. A customizable card can include a content presentation area and an operation area. The content presentation area displays the content provided by the content provider. The operation area can include negative feedback controls and operation controls. Negative feedback controls can be considered controls that indicate a lack of interest. Operation controls can be controls that allow operation of the customizable card, such as controls to increase volume and fast forward.

[0043] The video can be a short video, such as one with a playback duration shorter than a set length. Unlike short videos, which each video uses a fixed message source, irregularly shaped cards dynamically load different types of cards for different services, all based on the same base. Even irregularly shaped cards of the same type can have different content; they are highly customized and cannot be determined by the compiler, only at runtime. In other words, irregularly shaped cards have diverse structures and dynamic content. This disclosure ensures the flexibility of customized content within irregularly shaped cards while reusing the general capabilities of the base. The base can be considered the common content within the irregularly shaped card; subroutines are called on top of the base to achieve the acquisition and rendering of customized content.

[0044] In one embodiment, the base's general capabilities may include the ability to influence page switching, such as the ability to switch between different types of cards by swiping up and down the page.

[0045] This operation retrieves the media content stream from the server. The media content stream contains multiple media items that are to be displayed to the user.

[0046] For the irregularly shaped card that enables the listening function, the strategy for distribution from the server to the client can be as follows: after a set time, the m-th element of the media content stream requested by the client from the server on the nth request contains the irregularly shaped card containing sleep-aid related audio and video. When the distribution strategy is satisfied, the media content stream distributed by the server to the client includes the irregularly shaped card that enables the listening function. Here, m and n are positive integers.

[0047] S120. If the media content stream includes target media content and the preloading conditions of the target media content are met, obtain the configuration file of the target media content. The target media content includes general media resources and media resources to be loaded.

[0048] Target media content can be considered media content with customized features. General media resources can be media resources that are common to all or some users. The loading time of general media resources is not limited and can be earlier than the loading time of the page displaying the target media content.

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

[0050] The preloading condition can be any condition for preloading the target media content. Here, the preloading condition is not limited, as long as it ensures that the target media content is preloaded before the electronic device displays it. For example, the preloading condition could be that when displaying the x-th element of the media content stream requested n times, the media content stream is traversed to determine if an irregularly shaped card exists; if so, the preloading condition is considered satisfied. Here, x is a positive integer less than m.

[0051] For example, the server may include a sleep-aid-related irregularly shaped card in the media content stream requested by the client for the second time after 9:00 PM. The irregularly shaped card may be located in the sixth position in the media content stream. When displaying the first media content in the media content stream, the stream can be traversed to determine if the irregularly shaped card is included. If so, a view can be pre-created and a configuration file can be obtained to preload the target media content.

[0052] The configuration file can be a file that configures the information associated with the media resources to be loaded in the target media content. Based on the irregular card's pattern (schema parsing), the configuration file is read and preloaded, including the irregular card base, dynamic components, video, audio, and image resources. Dynamic components can be dynamically loaded, such as components defined by the business logic.

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

[0054] Loading information can be considered as the information required to load 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 can be configured by the business owner of the non-standard card.

[0056] The configuration file can store loading information. After determining the media resources to be loaded, the loading information of the media resources to be loaded can be obtained from the configuration file.

[0057] The configuration file can contain multiple configuration items, each corresponding to a different media resource to be loaded. When determining the loading information, this operation can iterate through all configuration items to determine the loading information for each item.

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

[0059] Once the loading information is determined, this operation can load the media resources to be loaded based on that information. For example, starting from the path of the media resources to be loaded, the media resources to be loaded are recorded according to the corresponding loading method.

[0060] This operation preloads the target media content before it is displayed, enabling faster page rendering when the target media content is displayed, thus improving the rendering efficiency of the target media content.

[0061] The technical solution of this disclosure embodiment obtains a media content stream, which includes multiple media contents; when the media content stream includes target media content and the preloading conditions of the target media content are met, it obtains a configuration file of the target media content, which includes general media resources and media resources to be loaded; it determines the loading information of the media resources to be loaded based on the configuration file; and it preloads the media resources to be loaded based on the loading information. This solves the preloading problem of 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 media resources to be loaded is achieved through the configuration file, realizing the preloading of information sources with non-fixed content. The preloading operation before the display of the target media content improves the rendering performance of the page.

[0062] Based on the above embodiments, modified embodiments of the above embodiments are proposed. It should be noted that, in order to keep the description brief, only the differences from the above embodiments are described in the modified embodiments.

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

[0064] Traverse the items to be processed in the configuration file to determine the preloading path and preloading method corresponding to the items to be processed.

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

[0066] The items to be processed can be considered as the configuration items in the configuration file that need to be processed. 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 the path of the media resource to be loaded. Resource link data can be the links that enable the preloading of the media resource. There can be a correspondence between the preload path and the resource link data; in this embodiment, the resource link data corresponding to the preload path can be retrieved from the database. The database can be transmitted from the server to the client. The timing of the transmission is not limited; 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 that includes the target media content.

[0068] This embodiment iterates through each item to be processed in the configuration file to determine the preloading method and preloading path for each item. After determining the preloading path, it determines the resource link data corresponding to the preloading path.

[0069] In one embodiment, if the media content stream includes target media content and the preloading conditions of the target media content are met, the method further includes:

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

[0071] The local service layer, also known as the native layer, is a software layer that provides local services. In this embodiment, under the condition of meeting the preloading requirements, a view of the target media content can be created through the local service layer. After switching to the target media content, the view can be associated with the target media content to visualize it.

[0072] This embodiment enables the 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 in a disclosed embodiment, see below. Figure 2 The system architecture includes a native layer, a container layer, a cross-platform layer, and a platform layer. This embodiment uses the native layer to pre-create views, specifically, it pre-creates views of the target media content through the local service layer. These views are used to visualize the target media content.

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

[0075] Display the target page, which includes the target media content;

[0076] The container layer receives operation events related to the target media content.

[0077] Respond to the operation event.

[0078] The container layer can be considered the network layer associated with the container in the network architecture. Action events can be considered events that manipulate the target media content, such as click events on controls within the target media content.

[0079] The target page can be a page that displays the target media content. After the target media content is displayed, this embodiment can receive operation events of the target media content through the container layer. The way of responding to operation events is not limited; different operation events correspond to different response methods, such as implementing page adjustments or volume adjustments.

[0080] like Figure 2As shown, the container layer enables reusable basic container capabilities for various services, as well as performance optimization and analysis, providing general capabilities for the base. Container basic capabilities include data communication capabilities and event reception and communication capabilities, such as the ability to receive operation events on the target page, and the ability to swipe on the target page to switch the displayed content.

[0081] Performance optimization and analysis implements functions such as preloading and resource loading status monitoring. Preloading allows for the preloading of loading information for media resources to be loaded. Resource loading status monitoring includes determining and reporting the resource loading status, such as the loading status of loading information.

[0082] The cross-platform layer enables cross-platform compatibility. It provides common capabilities for the base layer, including dynamic component rendering and fallback strategies. The platform layer offers efficiency tools with debugging previews and event simulation capabilities.

[0083] Dynamic component rendering can be used to render media resources to be loaded. A fallback strategy checks page resource loading status in advance; if the core content of the page fails to load, the irregularly shaped card is removed and not counted in the already distributed state, allowing it to be distributed to the client again later. The core content can be preset content; there are no restrictions here.

[0084] This public announcement Figure 2 The system architecture diagram shown enables control and allows business users to flexibly customize personalized content on non-standard cards, such as media resources to be loaded via configuration files.

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

[0086] If the preset media resource in the media resource to be loaded fails to load, the target media content is deleted from the media content stream.

[0087] If the preset media resource is loaded successfully, the event indicating that the media resource to be loaded has been successfully loaded is triggered.

[0088] Preset media resources can be considered as pre-defined media resources. Preset media resources can be the core content of the target media content. When the preset media resources fail to load, the target media content can be deleted to avoid displaying inefficient target media content, which means deleting irregular card processing.

[0089] If the preset media resources are successfully loaded, a media resource loading success event can be triggered. The media resource loading success event indicates that the media resources have been successfully loaded and the target media content can be displayed.

[0090] For example, a successful media resource loading event indicates that the core business content, such as preset media resources, has been loaded and can be displayed.

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

[0092] The format of the media content to be loaded is not limited; it can include a base, images, videos, text, dynamic components, audio and video, external JS files, arbitrary files, and animated resources. Preloading reduces the time spent loading resources per instance and improves resource hit rate.

[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 triggered by clicking a negative feedback control. The negative feedback control can be a general media resource; clicking it to close the irregular card will display a success message. When negative feedback is submitted to the server, the irregular card can also be swiped off-screen. Clicking the negative feedback control will prevent the display of irregular cards or similar irregular cards for y days.

[0095] A common media resource can serve as the main framework base. The backend of the main framework base can centrally manage negative feedback logic, enabling unified management of negative feedback from multiple users and distribution to various non-standard graphics cards. The main framework base can also collect click events from negative feedback controls, supporting dynamic expansion of negative feedback events by the business side.

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

[0097] The container layer receives operation events for negative feedback controls and / or operation controls in the target media content. The jump address, display style, and display state corresponding to the operation control are custom items of the operation control.

[0098] The redirect address can be considered the address to which the user is redirected after clicking the control. The display style can be considered the style in which the control is displayed. The display state can be considered the state of the control, including showing and hiding. Custom items are items that can be customized by the business side.

[0099] There are two configuration methods for operation controls: default operation controls and custom operation controls.

[0100] The default operation controls can detect click events through instrumentation, support configuration of control styles (controls can support only navigation without being limited to a specific protocol), support configuration of control styles, custom click events, and hiding of operation controls, etc.

[0101] To avoid duplicate click event reporting for custom operation controls, click event detection can be implemented by having the business side report event tracking points.

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

[0103] Scan the preview pattern, which is a pattern generated by the server based on the media resources associated with the target media content;

[0104] Preview the target media content.

[0105] A preview pattern can be considered as a pre-defined pattern of the target media content; scanning the preview pattern allows you to preview the target media content.

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

[0107] The preview image can be generated by the server based on the media resources included in the target media content. Electronic devices can preview the target media content by scanning the preview image.

[0108] Figure 3 This is a preview diagram of target media content provided in an embodiment of this disclosure. See also: Figure 3 The backend of the electronic device displaying the irregularly shaped SIM card can configure the media resources associated with the SIM card and then transmit them to the server of the electronic device. The backend can interact with the server using CRUD operations on media resources, while the server can query media resources from the backend using list queries. After obtaining the media resources, the server can authenticate the business server. After successful authentication, it can transmit data, such as media resources, to the business server. The business server can then interact with the business backend using CRUD operations on media resources.

[0109] The link parsed from the preview QR code can be encrypted to improve security. For example, a QR code can be generated by obtaining the client's encrypted ID parameter. The device used to generate the QR code is not limited here. The client scans the QR code to preview the irregularly shaped card. The server can configure the client's redirect page, which can query the server based on the encrypted ID.

[0110] The server and backend support adding, deleting, modifying, and querying configuration items, displaying a list of configuration items. The backend generates a QR code for the client redirect page based on the configuration and environment. After scanning the code to enter the client redirect page, the environment is determined based on the parameters on the schema, and the complete configuration of the irregular card is retrieved by ID. After obtaining the complete configuration, the irregular card is assembled, and a preview is displayed. When authenticating the business party's server, authentication can be based on a whitelist, which can include authorized business party servers.

[0111] Figure 4 This is a flowchart illustrating a media resource preloading method provided in this embodiment. This embodiment details the operation of obtaining the configuration file of the target media content, including the following steps:

[0112] S210. Obtain a media content stream, wherein the media content stream includes multiple media contents.

[0113] S220. If the target media content is included in the media content stream and the preloading conditions of the target media content are met, obtain the identification information corresponding to the target media content.

[0114] Identification information can be considered as information that identifies the target media content; no specific limitations are imposed on identification information here. Identification information can be included in the media content stream.

[0115] S230. Determine whether the resource package corresponding to the identification information exists locally. If yes, proceed to S240; otherwise, proceed to S250.

[0116] After determining the identification information, this embodiment can perform a local search based on the identification information to determine whether the resource package corresponding to the identification information exists 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; if so, it retrieves the configuration file based on the resource package; otherwise, it preloads the configuration file.

[0117] S240. The configuration file in the resource package is determined as the configuration file of the target media content.

[0118] When storing resource packages locally, the configuration files within the resource packages can be used as configuration files for the target media content, directly using existing local configuration files and improving the speed of configuration file retrieval.

[0119] S250. Preload the 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 in order to parse the configuration file and preload media resources.

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

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

[0123] Figure 5 This is a schematic diagram illustrating a process for preloading runtime resources according to an embodiment of this disclosure. See also... Figure 5 First, the identification information is determined, such as the channel and bundle information parsed from the schema, to locate the non-standard card. It then checks if a local resource package, such as a Gecko package, exists. If a Gecko package exists, it reads the resource package and checks if a configuration file exists within it. The configuration file is then read, and its data structure is verified to meet expectations. Next, each preloaded item is iterated over; that is, the configuration file is checked for any unprocessed items. If no unprocessed items exist, the preload result for each item is returned. If unprocessed items exist, the preload path (path) is read, and the corresponding resource link data is retrieved from the database. The preload method is then read; when reading the preload method, it can be found based on the category field read from the configuration file, and the corresponding resource link data is loaded according to the preload method. Finally, it checks if loading is complete; if not, it returns to continue iterating over the configuration file.

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

[0125] In the steps of failing to load the configuration file and checking whether the loading was successful, you can report the loading status and trigger callbacks.

[0126] When the category field is a dynamic component, a schema can be constructed based on the dynamic component links, and the entire process can be recursively repeated. When the category field is other resources, the resource preloading method can be reused.

[0127] This embodiment refines the operation of obtaining the configuration file, improves the efficiency of obtaining the configuration file, and further accelerates the rendering efficiency of the page.

[0128] The following is an exemplary description of this disclosure. The media resource preloading method provided in this disclosure can be considered as a non-standard card design scheme in a media content streaming scenario. This embodiment starts from... Figure 2 The framework shown implements decoupling, supporting the separate maintenance of dynamic components of non-standard cards for different businesses in different warehouses.

[0129] In terms of performance, runtime resource preloading is implemented. When content is dynamic, resources can be preloaded, eliminating the need to wait for network overhead during resource execution, thus accelerating rendering and shortening the time to display the target page. From a bandwidth cost perspective, different types of non-standard graphics cards and different distribution strategies can be used to ensure that only users who will see the non-standard graphics card at runtime download its resource package, achieving fine-grained on-demand loading.

[0130] Avoid issuing fixed-form templates based on irregularly shaped memory cards, resulting in high code coupling across different business iterations. Avoid developing multiple templates for different form factors, as this leads to low reusability and high development costs. Avoid preloading only resources that the compiler can determine, and not runtime resources. Avoid issuing commands to all users to download resource packages for irregularly shaped memory cards to ensure initial page rendering performance, resulting in most users downloading the resource packages without using the irregularly shaped cards, thus wasting resources.

[0131] This disclosure addresses the need for the main framework to manage all types of irregularly shaped cards while reusing common components, and simultaneously achieves convenience for different business parties to access the system and flexibility in content expansion. It resolves the trade-off between the higher cost of full offline package push and page performance. Different businesses and different types of irregularly shaped cards have different distribution strategies and users; without full push, page loading performance cannot be guaranteed, while full push results in high bandwidth costs. The solution provided in this disclosure is cost-effective and ensures that users have downloaded the offline package before viewing the irregularly shaped card. It also addresses how to reduce the manpower cost of debugging the process during irregularly shaped card development. Irregularly shaped card distribution strategies are complex, and displaying irregularly shaped cards in the actual process requires numerous pre-operations, which vary significantly depending on the type of card. The disclosure also addresses the issue of how to quickly preview and debug card content during development. Finally, it resolves the lack of a security review process. The distribution process for irregularly shaped cards is complex, requiring reviewers to approve the cards. Opening the corresponding type of irregularly shaped card is virtually impossible for non-developers to simulate, thus the entire process lacks a review step. To address stability issues and ensure that the probability of the card content being readable is 100% when users see irregularly shaped cards.

[0132] To address the need for the main framework base to manage all types of non-standard cards, and to ensure that updates to the management components do not require a separate release for each card, but rather are implemented by updating the base once, affecting all non-standard cards, this disclosure presents the architecture of the main framework base and dynamic business components. (See [link to relevant documentation]). Figure 2Customization of irregularly shaped cards is achieved through dynamic loading of dynamic components. To address the balance between the high cost of full offline package push and page performance, a scheme of pre-creating views and pre-loading runtime resources was designed. To address the lack of a secure review process and reduce manpower costs during the development of irregularly shaped cards, a debugging and preview tool was designed during the R&D phase. This tool allows users to generate a QR code after configuring the irregularly shaped card base template data on the platform, enabling direct scanning for preview. Reviewers can also scan the code on the platform to open a simulated page with content identical to the actual irregularly shaped card for review. To address stability issues, a communication mechanism was designed between the client and dynamic business components. When the core content of the irregularly shaped card base or dynamic business components times out or fails to load, the front-end notifies the client in real time to delete the irregularly shaped card from the media content stream, without the user witnessing the card deletion process.

[0133] This disclosure utilizes a cross-platform scenario base and dynamic component architecture, ensuring both the base's control capabilities and preserving the flexibility of the business-side dynamic components, thus possessing excellent horizontal scalability. The architecture decouples the main framework base and the business-side dynamic components, reducing development and communication costs. It significantly reduces bandwidth costs, enabling real-time, on-demand loading, with only users about to see the irregularly shaped SIM card downloading the offline package. It also completes the crucial security audit step. Irregularly shaped SIM cards are effectively displayed 100% of the time, with an average loading success rate of 99.93%, of which 0.07% of failures are attributed to network issues.

[0134] Figure 6 This is a schematic diagram illustrating the loading of a template resource according to an embodiment of this disclosure. Figure 6 The template resources can be general-purpose resources. In related technologies, template resources are requested and loaded after the page is loaded, and then the page is rendered. This disclosure advances the loading time of template resources, such as to the time when the page is loaded. After the template resources are loaded, the page is rendered, thereby improving the time when the first meaningful paint (fmp) of the page appears on the screen.

[0135] Figure 7 This is a schematic diagram illustrating the loading of image resources according to an embodiment of this disclosure. The first-screen resources may include image resources from the media resources to be loaded. In related technologies, template loading occurs after the page is loaded, followed by page rendering, with the first-screen resources being loaded during the page rendering process. This disclosure advances the timing of first-screen resource loading, such as loading it during page loading. Template resource loading occurs after the page is loaded, and page rendering is performed last, thus improving the first-screen performance (FMP).

[0136] Figure 8 This is a schematic diagram illustrating the loading of a main template and dynamic component resources according to an embodiment of this disclosure. See also... Figure 8In related technologies, after the page loads, the template is loaded, then the page is rendered, and the first-screen resources are loaded during the rendering process. After the page is rendered, the first-screen business logic is executed, and dynamic component templates are loaded within the first-screen business logic. Resources are loaded during the loading of dynamic component templates. This application advances the loading timing of the main template (i.e., the primary template, which can be pre-defined) and dynamic component templates, and advances the loading timing of static resources for the first screen of dynamic components, such as advancing it to the page load time. Figure 6-8 The content in advance can be considered as Figure 5 Different pending items require different loading methods. Improvements were achieved by preloading the first valid rendering fmp.

[0137] Figure 9 This is a flowchart of a non-standard card display scheme provided in an embodiment of this disclosure. See also... Figure 9 The front-end, a non-standard card, interacts with the client to load media resources, including the card base, dynamic components, videos, and images. The non-standard card consists of the card base and card content. The card content is developed by the business side and packaged into dynamic components, enabling interaction between business data and dynamic components with the card base. The card base loads dynamic components, including built-in components, feedback buttons (negative feedback controls), action buttons (operation controls), fallback strategies, and pre-loaded configurations. The card base can also report uninteresting 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 (x-1)th refresh and the xth refresh, each refresh containing multiple media items. The (x-1)th refresh includes the yth media item. The xth refresh includes the 1st media item, the 2nd media item, ..., the zth non-standard card. The non-standard card framework enables client-side data pass-through functionality.

[0138] The irregularly shaped card base can implement event listening functionality. In one embodiment, when swiping up or down to enter the target page, the background video reloads; when returning to the irregularly shaped card from a secondary page of the target page, the background video resumes its previous progress. For example, the following four events can be defined:

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

[0140] The second event is triggered when returning to the card after opening the headphone page, and the callback is executed to continue playing the background video and background music.

[0141] The third event is triggered when the card slides out of the screen and is no longer in the visible area. The callback process pauses the background video and background music, and the progress is reset to zero.

[0142] The fourth event is triggered when the target page is scrolled away, the control is switched, the page is switched to the background, and the callback execution pauses the background video and background music, and the progress is cleared to zero.

[0143] Figure 10 This is a schematic diagram of the structure of a media resource preloading device provided in an embodiment of this disclosure, as shown below. Figure 10 As shown, the device includes:

[0144] The first acquisition module 1010 is used to acquire a media content stream, wherein the media content stream includes multiple media contents;

[0145] The second acquisition module 1020 is used to acquire the configuration file of the target media content when the media content stream includes target media content and the preloading conditions of the target media content are met. The target media content includes general media resources and media resources to be loaded.

[0146] The determining module 1030 is used 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 in this disclosure solves the problem of preloading information sources with non-fixed content. When the media content stream includes target media content and meets the preloading conditions for the target media content, the preloading of media resources to be loaded is achieved through a configuration file. This realizes the preloading of information sources with non-fixed content, and the preloading operation before the target media content is displayed improves the page rendering performance.

[0148] In one embodiment, the second acquisition module 1020 is specifically used for:

[0149] If the media content stream includes target media content and the preloading conditions of the target media content are met, the identification information corresponding to the target media content is obtained.

[0150] Determine whether the resource package corresponding to the identification information exists 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 method and resource link data, and the determining module 1030 is specifically used for:

[0153] Traverse the items to be processed in the configuration file to determine the preloading path and preloading method corresponding to the items to be processed.

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

[0155] In one embodiment, the apparatus further includes a creation module for pre-creating a view of the target media content through a local service layer, wherein the target media content is included in the media content stream and the pre-loading conditions of the target media content are met, the view being used to visualize the target media content.

[0156] In one embodiment, the device further includes a display module that, after preloading the media resources to be loaded based on the loading information, displays a target page, the target page including target media content;

[0157] The container layer receives operation events related to the target media content.

[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] The container layer receives operation events for negative feedback controls and / or operation controls in the target media content. The jump address, display style, and display state corresponding to the operation control are custom items of the operation control.

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

[0163] If the preset media resource is loaded successfully, the event indicating that the media resource to be loaded has been successfully loaded is triggered.

[0164] In one embodiment, the device further includes a preview module for:

[0165] Scan the preview pattern, which is a pattern generated by the server based on the media resources associated with the target media content;

[0166] Preview the target media content.

[0167] The media resource preloading device provided in this disclosure can execute the media resource preloading method provided in any embodiment of this disclosure, and has the corresponding functional modules and beneficial effects of executing the 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 division, as long as the corresponding functions can be realized; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the protection scope of the embodiments of this disclosure.

[0169] Figure 11 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Refer to the following... Figure 11 It illustrates an electronic device suitable for implementing embodiments of the present disclosure (e.g., Figure 11 A structural diagram of the terminal device or server in the 500.

[0170] Electronic devices 500 include:

[0171] One or more processing devices 501;

[0172] Storage device 508, for storing 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 perform the methods provided in this disclosure.

[0174] The terminal devices in this disclosure may include, but are not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), and vehicle terminals (e.g., vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 11 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.

[0175] like Figure 11 As shown, electronic device 500 may include a processing unit (e.g., central processing unit, graphics processor, etc.) 501, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 502 or a program loaded from storage device 508 into random access memory (RAM) 503. The RAM 503 also stores various programs and data required for the operation of electronic device 500. The processing unit 501, ROM 502, and RAM 503 are interconnected via bus 504. An edit / output (I / O) interface 505 is also connected to bus 504.

[0176] Typically, the following devices can be connected to I / O interface 505: input devices 506 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 507 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 508 including, for example, magnetic tapes, hard disks, etc.; and communication devices 509. Communication device 509 allows electronic device 500 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 11 An electronic device 500 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.

[0177] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via 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, it performs the functions defined in the methods of embodiments of this disclosure.

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

[0179] The electronic device provided in this embodiment and the media resource preloading method provided in the above embodiments belong to the same inventive concept. Technical details not described in detail in this embodiment can be found in the above embodiments, and this embodiment has the same beneficial effects as the above embodiments.

[0180] This disclosure provides a computer storage medium storing a computer program that, when executed by a processor, implements the media resource preloading method provided in the above embodiments.

[0181] It should be noted that the computer-readable medium described above in this disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination thereof.

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

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

[0184] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.

[0185] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.

[0186] The aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to:

[0187] The aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: acquire a media content stream, the media content stream including multiple media contents; acquire a configuration file of the target media content, the target media content including general media resources and media resources to be loaded, provided that the media content stream includes target media content and satisfies the preloading conditions of the target media content; determine loading information of the media resources to be loaded based on the configuration file; and preload the media resources to be loaded based on the loading information.

[0188] Computer program code for performing the operations of this disclosure can be written in one or more programming languages ​​or a combination thereof, including but not limited to object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone 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 remote computers, the remote computer can be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0189] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0190] The modules or units described in the embodiments of this disclosure can be implemented in software or hardware. The names of modules or units do not necessarily limit the specific unit; for example, the first acquisition module can also be described as a "media content stream acquisition module".

[0191] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.

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

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

[0194] Acquire a media content stream, wherein the media content stream includes multiple media contents;

[0195] If the media content stream includes target media content and the preloading conditions of the target media content are met, the configuration file of the target media content is obtained. The target media content includes general media resources and media resources to be loaded.

[0196] The loading information of the media resources to be loaded is determined based on the configuration file;

[0197] The media resources to be loaded are preloaded based on the loading information.

[0198] According to one or more embodiments of this disclosure, [Example 2] provides a method of Example 1, wherein, when the media content stream includes target media content and the preloading conditions of the target media content are met, the method obtains a configuration file of the target media content, including:

[0199] If the media content stream includes target media content and the preloading conditions of the target media content are met, the identification information corresponding to the target media content is obtained.

[0200] Determine whether the resource package corresponding to the identification information exists 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 this disclosure, [Example 3] provides the method of Example 1, wherein the loading information includes a preloading method and resource link data, and the step of determining the loading information of the media resource to be loaded based on the configuration file includes:

[0203] Traverse the items to be processed in the configuration file to determine the preloading path and preloading method corresponding to the items to be processed.

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

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

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

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

[0208] Display the target page, which includes the target media content;

[0209] The container layer receives operation events related to the target media content.

[0210] Respond to the operation event.

[0211] According to one or more embodiments of this 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 this disclosure, [Example 7] provides the method of Example 5, wherein receiving operation events on the target media content through a container layer includes:

[0213] The container layer receives operation events for negative feedback controls and / or operation controls in the target media content. The jump address, display style, and display state corresponding to the operation control are custom items of the operation control.

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

[0215] If the preset media resource in the media resource to be loaded fails to load, the target media content is deleted from the media content stream.

[0216] If the preset media resource is loaded successfully, the event indicating that the media resource to be loaded has been successfully loaded is triggered.

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

[0218] Scan the preview pattern, which is a pattern generated by the server based on the media resources associated with the target media content;

[0219] Preview the target media content.

[0220] According to one or more embodiments of this disclosure, [Example 10] provides a media resource preloading apparatus, comprising:

[0221] The first acquisition module is used to acquire a media content stream, wherein the media content stream includes multiple media contents;

[0222] The second acquisition module is used to acquire the configuration file of the target media content when the media content stream includes the target media content and the preloading conditions of the target media content are met. The target media content includes general media resources and media resources to be loaded.

[0223] The determination module is used 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 resources to be loaded based on the loading information.

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

[0226] One or more processing devices;

[0227] 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 of Examples 1-9.

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

[0230] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.

[0231] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.

[0232] Although the subject matter has been described using language specific to structural features and / or methodological logic, 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. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.

Claims

1. A method for preloading media resources, characterized in that, include: Acquire a media content stream, wherein the media content stream includes multiple media contents; If the media content stream includes target media content and the preloading conditions of the target media content are met, the configuration file of the target media content is obtained. The target media content includes general media resources and media resources to be loaded. The target media content includes media content with customized content. The configuration file is a file that configures the information associated with the media resources to be loaded in the target media content. The media resources to be loaded are resources customized for users and displayed on the target media content. The loading information of the media resources to be loaded is determined based on the configuration file; The media resources to be loaded are preloaded based on the loading information; The method further includes: Scan the preview pattern, which is a pattern generated by the server based on the media resources associated with the target media content; Preview the target media content.

2. The method according to claim 1, characterized in that, If the media content stream includes target media content and the preloading conditions of the target media content are met, the configuration file of the target media content is obtained, including: If the media content stream includes target media content and the preloading conditions of the target media content are met, the identification information corresponding to the target media content is obtained. Determine whether the resource package corresponding to the identification information exists 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. Determining the loading information of the media resource to be loaded based on the configuration file includes: Traverse the items to be processed in the configuration file to determine the preloading path and preloading method corresponding to the items to be processed. Determine the resource link data corresponding to the preloaded path.

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

5. The method according to claim 1, characterized in that, After preloading the media resources to be loaded based on the loading information, the process further includes: Display the target page, which includes the target media content; The container layer receives operation events related to the target media content. Respond to the operation event.

6. The method according to claim 5, characterized in that, The general media resources include negative feedback controls, and the operation events include click events of the negative feedback controls.

7. The method according to claim 5, characterized in that, The process of receiving operation events on the target media content through the container layer includes: The container layer receives operation events for negative feedback controls and / or operation controls in the target media content. The jump address, display style, and display state corresponding to the operation control are custom items of the operation control.

8. The method according to claim 1, characterized in that, After preloading the media resources to be loaded based on the loading information, the process further includes: If the preset media resource in the media resource to be loaded fails to load, the target media content is deleted from the media content stream. If the preset media resource is loaded successfully, the event indicating that the media resource to be loaded has been successfully loaded is triggered.

9. A media resource preloading device, characterized in that, include: The first acquisition module is used to acquire a media content stream, wherein the media content stream includes multiple media contents; The second acquisition module is used to acquire the configuration file of the target media content when the media content stream includes the target media content and the preloading conditions of the target media content are met. The target media content includes general media resources and media resources to be loaded. The target media content includes media content with customized content. The configuration file is a file that configures the information associated with the media resources to be loaded in the target media content. The media resources to be loaded are resources customized for users to display on the target media content. The determination module is used 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 resources to be loaded based on the loading information; The device further includes a preview module, used for: Scan the preview pattern, which is a pattern generated by the server based on the media resources associated with the target media content; Preview the target media content.

10. An electronic device, characterized in that, The electronic device includes: One or more processing devices; 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-8.

11. A storage medium comprising computer-executable instructions, which, when executed by a computer processor, are used to perform the media resource preloading method as described in any one of claims 1-8.

Citation Information

Patent Citations

  • 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

  • Multi-popup window display processing method and device and computer readable medium

    CN116302244A