Multimedia resource loading method and related device

By obtaining and using the resource mapping table of the target page, the multimedia resources are directly loaded, which solves the inconvenience of multimedia resource replacement in client applications, and realizes rapid replacement and loading, improving user experience and development efficiency.

WO2025002136A1PCT designated stage expired Publication Date: 2025-01-02BEIJING ZITIAO NETWORK TECH CO LTD

Patent Information

Application Number
PCT/CN2024/101436
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-06-27
Filing Date
2024-06-25
Publication Date
2025-01-02

AI Technical Summary

Technical Problem

When an existing client application loads a multimedia resource, replacing the multimedia resource requires additional multimedia resource distribution or client application version upgrade, which leads to inconvenience and affects the user experience.

Method used

By obtaining the resource mapping table of the target page, determine the identity and storage path of the multimedia resource, and directly load the multimedia resource to avoid additional issuance and version upgrades.

Benefits of technology

It realizes rapid replacement and loading of multimedia resources, improves the flexibility and development efficiency of client applications, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024101436_02012025_PF_FP_ABST
    Figure CN2024101436_02012025_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the present disclosure is a multimedia resource loading method. The method comprises: in response to a trigger operation for requesting the display of a target page, acquiring a resource mapping table corresponding to the target page; determining an identifier of a target multimedia resource to be loaded on the target page; on the basis of the identifier of the target multimedia resource, determining a storage path of the target multimedia resource according to the resource mapping table corresponding to the target page; and on the basis of the storage path of the target multimedia resource, acquiring and loading a target media resource. On the basis of the multimedia resource loading method, further provided in the present disclosure are a multimedia resource loading apparatus, and an electronic device, a storage medium and a program product.
Need to check novelty before this filing date? Find Prior Art

Description

Multimedia resource loading method and related equipment

[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on June 27, 2023, with application number 202310774295.7 and invention name “Multimedia Resource Loading Method and Related Equipment”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present disclosure relates to the field of Internet technology, and in particular to a multimedia resource loading method, a multimedia resource loading device, an electronic device, a storage medium, and a program product. Background Art

[0003] With the development of mobile Internet technology, various types of client applications are becoming increasingly popular. Moreover, in order to provide users with a richer visual experience, the use of client applications usually requires the loading of multimedia content such as images, sounds, or videos on the client side to present users with a variety of pages.

[0004] Normally, the multimedia resources loaded in the client application can include local multimedia resources and network multimedia resources. Among them, local multimedia resources generally refer to multimedia resources that are pre-downloaded and stored locally on the client during the installation and update process of the client application or through other means; and network multimedia resources generally refer to multimedia resources stored on the network side that need to be downloaded by the client during the loading process. For local multimedia resources, the client can usually access and load them through their corresponding local paths. For network multimedia resources, the client can usually access, download and load them through their corresponding Uniform Resource Locator (URL). In this disclosure, for the convenience of description, the local path corresponding to the local multimedia resource and the URL corresponding to the network multimedia resource are collectively referred to as the storage path of the multimedia resource.

[0005] It can be understood that, whether it is a local multimedia resource or a network multimedia resource, in the client application, the storage path corresponding to the multimedia resource that needs to be loaded is usually pre-configured in the client application data packet. In other words, the storage path of the multimedia resources that need to be loaded by the client application is usually pre-configured and fixed. Therefore, if you want to replace a multimedia resource on a certain page during the use of the client application, you usually need to directly replace the local multimedia resource originally stored in the client with the new multimedia resource through an additional multimedia resource distribution process, or you need to modify the storage path of a multimedia resource loaded by the client application by upgrading the version of the client application. It can be seen that no matter which method of replacing multimedia resources is used, it brings great inconvenience to the use of the client application, and also affects the user experience.

[0006] Summary of the Invention

[0007] In view of this, an embodiment of the present disclosure provides a multimedia resource loading method.

[0008] According to some embodiments of the present disclosure, the above-mentioned multimedia resource loading method may include: in response to a trigger operation requesting to display a target page, obtaining a resource mapping table corresponding to the target page; determining an identifier of the target multimedia resource to be loaded on the target page; based on the identifier of the target multimedia resource, determining a storage path of the target multimedia resource according to the resource mapping table corresponding to the target page; and obtaining and loading the target media resource based on the storage path of the target multimedia resource.

[0009] In an embodiment of the present disclosure, the target page is the target page of the target application; the above-mentioned obtaining of the resource mapping table corresponding to the target page includes: obtaining the resource mapping table corresponding to the target page from the server side through the application program interface corresponding to the target page; or obtaining the storage path of the resource mapping table corresponding to the target page from the configuration information of the target application, and obtaining the resource mapping table corresponding to the target page from the storage path.

[0010] In an embodiment of the present disclosure, the above-mentioned determination of the identifier of the target multimedia resource to be loaded on the target page includes: obtaining application data corresponding to the target page; obtaining information of the multimedia resource to be loaded on the target page from the application data; in response to determining that the type of the information of the multimedia resource is a string type, using the information of the multimedia resource as the identifier of the target multimedia resource; and in response to determining that the type of the information of the multimedia resource is not a string type, calling a pre-set system method based on the information of the multimedia resource to obtain the identifier of the target multimedia resource.

[0011] In an embodiment of the present disclosure, the above-mentioned determination of the storage path of the target multimedia resource based on the identifier of the target multimedia resource and the resource mapping table corresponding to the target page includes: using the identifier of the target multimedia resource as an index, retrieving the resource mapping table corresponding to the target page, and finding the storage path corresponding to the identifier of the target multimedia resource; and using the found storage path as the storage path of the target multimedia resource.

[0012] In an embodiment of the present disclosure, the target page is a target page of a target application; the above-mentioned determination of the storage path of the target multimedia resource based on the identifier of the target multimedia resource and the resource mapping table corresponding to the target page further includes: in response to determining that the resource mapping table corresponding to the target page does not contain the identifier of the target multimedia resource, obtaining the cached global resource mapping table corresponding to the target application; using the identifier of the target multimedia resource as an index, retrieving the global resource mapping table, and finding the storage path corresponding to the identifier of the target multimedia resource; and using the found storage path as the storage path of the target multimedia resource.

[0013] In an embodiment of the present disclosure, the above-mentioned determination of the storage path of the target multimedia resource based on the identifier of the target multimedia resource and according to the resource mapping table corresponding to the target page further includes: in response to determining that the identifier of the target multimedia resource is not included in the global resource mapping table, determining the type of information of the multimedia resource; in response to determining that the type of information of the multimedia resource is a string type, using the information of the multimedia resource as the storage path of the target multimedia resource; and in response to determining that the type of information of the target multimedia resource is not a string type, calling a pre-set system method based on the information of the multimedia resource to obtain the storage path of the target multimedia resource.

[0014] In an embodiment of the present disclosure, the method further includes: in response to determining that a request to access the target application is received, obtaining a global resource mapping table corresponding to the target application; and caching the global resource mapping table corresponding to the target application.

[0015] In an embodiment of the present disclosure, the above method further includes: in response to determining that a request to access the target application is received, obtaining an update package of the global resource mapping table corresponding to the target application; and updating the cached global resource mapping table corresponding to the target application based on the obtained update package of the global resource mapping table.

[0016] In an embodiment of the present disclosure, the above-mentioned acquisition and loading of the target media resource based on the storage path of the target multimedia resource includes: in response to determining that the storage path of the target multimedia resource is a local path, loading the target media resource based on the local path; in response to determining that the storage path of the target multimedia resource is a network path, determining whether the multimedia resource corresponding to the network path has been cached locally based on the network path; in response to determining that the multimedia resource corresponding to the network path has been cached locally, loading the locally cached multimedia resource corresponding to the network path; in response to determining that the multimedia resource corresponding to the network path has not been cached locally, downloading the multimedia resource based on the network path, and loading the downloaded multimedia resource.

[0017] Based on the above method, an embodiment of the present disclosure provides a multimedia resource loading device, which may include:

[0018] A resource mapping table acquisition module, configured to acquire a resource mapping table corresponding to a target page in response to a trigger operation requesting display of the target page;

[0019] A parsing module, configured to obtain an identifier of a target multimedia resource to be loaded on the target page;

[0020] a storage path determining module, configured to determine the storage path of the target multimedia resource based on the identifier of the target multimedia resource and according to the resource mapping table corresponding to the target page; and

[0021] The loading module is used to obtain and load the target multimedia resource based on the storage path of the target multimedia resource.

[0022] In addition, an embodiment of the present disclosure further provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned multimedia resource loading method when executing the program.

[0023] An embodiment of the present disclosure further provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the above-mentioned multimedia resource loading method.

[0024] An embodiment of the present disclosure further provides a computer program product, comprising computer program instructions, which, when executed on a computer, enable the computer to execute the above-mentioned multimedia resource loading method.

[0025] The above-mentioned multimedia resource loading method and related equipment obtain a resource mapping table for storing the mapping relationship between the identifier of at least one multimedia resource contained in the target page and its storage path. When loading the target multimedia resource on the target page, the storage path of the target multimedia resource can be directly obtained through the above-mentioned resource mapping table, and then the corresponding multimedia resource can be obtained and loaded based on the storage path. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the technical solutions in the present disclosure or related technologies, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are only embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0027] FIG1 shows an implementation flow of a multimedia resource loading method according to some embodiments of the present disclosure.

[0028] FIG2 shows an implementation flow of a method for determining an identifier of a target multimedia resource to be loaded on a target page according to some embodiments of the present disclosure.

[0029] FIG3 shows an implementation process of determining a storage path of a target multimedia resource according to a resource mapping table corresponding to a target page according to some embodiments of the present disclosure.

[0030] FIG4 shows a specific implementation flow of a method for loading multimedia resources when a user requests to display a target page of a target application according to some embodiments of the present disclosure.

[0031] FIG5 shows the internal structure of a multimedia resource loading device according to some embodiments of the present disclosure.

[0032] FIG6 shows a more specific schematic diagram of the hardware structure of an electronic device according to some embodiments of the present disclosure. DETAILED DESCRIPTION

[0033] In order to make the objectives, technical solutions and advantages of the present disclosure more clearly understood, the present disclosure is further described in detail below in conjunction with specific embodiments and with reference to the accompanying drawings.

[0034] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present disclosure should have the usual meanings understood by people with ordinary skills in the field to which the present disclosure belongs. The "first", "second" and similar words used in the embodiments of the present disclosure do not indicate any order, quantity or importance, but are only used to distinguish different components. "Include" or "comprise" and similar words mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative position relationships. When the absolute position of the described object changes, the relative position relationship may also change accordingly.

[0035] It is understandable that before using the technical solutions of each embodiment of the present disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved will be informed to the user in an appropriate manner, and the user's authorization will be obtained.

[0036] For example, in response to a user's active request, a prompt message is sent to the user to clearly inform the user that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the electronic device, application, server, storage medium, or other software or hardware that performs the operation of the disclosed technical solution based on the prompt message.

[0037] As an optional but non-limiting implementation, in response to a user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. Furthermore, the pop-up window may also contain a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.

[0038] It is understandable that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0039] As previously mentioned, in current client applications, if you want to replace a multimedia resource on a page, you typically need to send a new multimedia resource to the client to replace the original local multimedia resource, or you need to modify the storage path corresponding to the multimedia resource by upgrading the client application version. Obviously, either method of replacing multimedia resources brings great inconvenience and burden to the use of the client application, and also affects the user experience.

[0040] To this end, some embodiments of the present disclosure provide a multimedia resource loading method that can quickly complete the configuration of multimedia resources without changing the client application data. It does not require an additional multimedia resource distribution process, nor does it require a version upgrade of the client application to achieve rapid replacement of multimedia resources, thereby greatly facilitating the use of client applications, improving the flexibility and development efficiency of client applications, and also improving the user experience. In the embodiments of the present disclosure, the above-mentioned multimedia resource loading method is executed by the client. The above-mentioned client generally includes a hardware device with data information processing capabilities and / or the necessary software required to drive the hardware device to work. Optionally, the above-mentioned client can be configured in a computer, tablet computer, mobile terminal or other smart device.

[0041] Figure 1 shows the implementation process of the multimedia resource loading method described in some embodiments of the present disclosure. As shown in Figure 1, the multimedia resource loading method described in the embodiments of the present disclosure may include the following steps.

[0042] In step 102 , in response to a trigger operation requesting to display a target page, a resource mapping table corresponding to the target page is obtained.

[0043] In the embodiment of the present disclosure, the target page is a target page of a target application. In addition, the trigger operation for requesting to display the target page can generally be an operation performed when a user chooses to open or access a target page in a target application through a client.

[0044] In an embodiment of the present disclosure, the resource mapping table corresponding to the target page is used to store the mapping relationship between the identifier of at least one multimedia resource contained in the target page and its storage path. The identifier of the multimedia resource generally refers to a character string that can identify the multimedia resource, such as the name of the multimedia resource. The storage path of the multimedia resource refers to the location information of the multimedia resource. Generally, if the multimedia resource is a local multimedia resource, the storage path generally refers to the local path for storing the local multimedia resource; and if the multimedia resource is a network multimedia resource, the storage path generally refers to the URL for storing the network multimedia resource.

[0045] Specifically, in some embodiments of the present disclosure, obtaining the resource mapping table corresponding to the target page in step 102 may include obtaining the resource mapping table corresponding to the target page from the server via an application programming interface (API) corresponding to the target page. In some embodiments of the present disclosure, the client application may be pre-configured with an API corresponding to each page. The client may use the API configured for each page to pull the resource mapping table corresponding to each page from the server.

[0046] In other embodiments of the present disclosure, the step 102 of obtaining the resource mapping table corresponding to the target page may include: obtaining the storage path of the resource mapping table corresponding to the target page from the configuration information of the target application, and obtaining the resource mapping table corresponding to the target page from the storage path. In some embodiments of the present disclosure, the client application does not configure an application program interface for each page, but configures the storage path of the resource mapping table corresponding to each page in the configuration information of the target application. In this case, the client can obtain the storage path of the resource mapping table corresponding to the target page from the configuration information of the target application, and then obtain the resource mapping table corresponding to the target page.

[0047] As mentioned above, the resource mapping table corresponding to each page of the client application stores the mapping relationship between the identifier of at least one multimedia resource contained in the corresponding page and its storage path. It should be noted that the identifier of the multimedia resource stored in the resource mapping table corresponding to a certain page may be a subset of the multimedia resources contained on the page. In other words, the resource mapping table corresponding to a certain page does not necessarily store the corresponding relationship between the identifiers of all multimedia resources on it and their storage paths. There may also be a situation where the identifiers of some multimedia resources on the page are not recorded in its corresponding resource mapping table.

[0048] In step 104, the identifier of the target multimedia resource to be loaded on the target page is determined.

[0049] In an embodiment of the present disclosure, the implementation process of the method for determining the identifier of the target multimedia resource to be loaded on the target page as described in step 104 above may be shown in FIG2 . The method shown in FIG2 may include the following steps:

[0050] In step 202, application data corresponding to the target page is obtained.

[0051] In some embodiments of the present disclosure, the application data corresponding to the above-mentioned target page may generally refer to a set of data required to load the target page, such as configuration information corresponding to the target page, etc. These data define the content and form of the target page. Normally, after the client application is installed, the application data of each page contained in the client application is stored locally on the client. During the process of the user using the client application, if the user requests to display a target page, the client can generally first obtain the application data corresponding to the target page, and then obtain the target page by loading the above-mentioned application data and display it to the user.

[0052] In step 204, information about the multimedia resources to be loaded on the target page is obtained from the application data.

[0053] It is understandable that when the target page contains multimedia resources such as pictures, sounds or videos, the application data corresponding to the target page will contain information about one or more multimedia resources to be loaded on the target page.

[0054] In some embodiments of the present disclosure, the multimedia resource information may be a name of the multimedia resource. In this case, the client and the server use the name of the multimedia resource to jointly identify a multimedia resource.

[0055] In other embodiments of the present disclosure, the information of the multimedia resource can also be a unique serial number assigned to the multimedia resource. Normally, this serial number is a local identifier assigned by the client to the multimedia resource. After assigning a serial number to a multimedia resource, the client will also record the mapping relationship between the local path of the multimedia resource and the serial number of the multimedia resource, and set the established mapping relationship as a system method. In this way, the client can obtain the local path of the multimedia resource by calling the pre-set system method based on the serial number of the multimedia resource. Specifically, in actual applications, after the client obtains the serial number of the multimedia resource to be loaded from the application data of the target page, it can call the above-mentioned pre-set system method based on the serial number of the multimedia resource to obtain the local path of the multimedia resource.

[0056] In some other embodiments of the present disclosure, the multimedia resource information may also be a storage path of the multimedia resource, for example, a local storage path or URL of the multimedia resource. In this way, after obtaining the multimedia resource information, the multimedia resource can be directly read and obtained.

[0057] In step 206 , in response to determining that the type of the multimedia resource information is a character string type, the multimedia resource information is used as an identifier of a target multimedia resource.

[0058] As previously mentioned, the multimedia resource information may be the name or storage path of the multimedia resource. In both cases, the type of the multimedia information is typically a string. Furthermore, the multimedia resource information may also be a serial number corresponding to the multimedia resource. In this case, the type of the multimedia information is typically an integer rather than a string. In the embodiments of the present disclosure, different types of multimedia resource information are processed differently.

[0059] Specifically, if it is determined that the type of the multimedia resource information is a string type, that is, the multimedia resource information is the name or storage path of the multimedia resource, then in the above step 206, the multimedia resource information can be directly used as the identifier of the target multimedia resource, so that subsequent table lookup operations can be performed.

[0060] In step 208 , in response to determining that the type of the multimedia resource information is not a character string type, a pre-set system method is called based on the multimedia resource information to obtain an identifier of the target multimedia resource.

[0061] Furthermore, if it is determined that the multimedia resource information is not a string type, that is, the multimedia resource information is a serial number corresponding to the multimedia resource, then in step 208, a pre-defined system method can be called based on the multimedia resource information, and the result of the system method call can be used as the identifier of the target multimedia resource. For example, by calling the pre-defined system method, the local path of the multimedia resource corresponding to the multimedia resource serial number can usually be obtained. In this case, the obtained local path can be used as the identifier of the target multimedia resource.

[0062] Furthermore, in order to avoid the situation where the identifier of the target multimedia resource cannot be found in the resource mapping table, resulting in the inability to load the multimedia resource, and for the convenience of implementation, the process of determining the identifier of the target multimedia resource to be loaded on the target page shown in Figure 2 above can further include the following steps: setting the information of the above multimedia resource as the loading default value of the target multimedia resource.

[0063] In an embodiment of the present disclosure, by setting the aforementioned multimedia resource information as the default value for loading the target multimedia resource, the client can still complete the loading of the target multimedia resource based on the default value for loading the target multimedia resource even if the client fails to find the identifier of the target multimedia resource in the resource mapping table. The specific process of loading the target multimedia resource based on the default value for loading the target multimedia resource will be described in detail later and is omitted here for the time being.

[0064] In step 106, based on the identifier of the target multimedia resource, the storage path of the target multimedia resource is determined according to the resource mapping table corresponding to the target page.

[0065] In an embodiment of the present disclosure, determining the storage path of the target multimedia resource based on the resource mapping table corresponding to the target page as described in the above step 106 may include: using the identifier of the target multimedia resource as an index, retrieving the resource mapping table corresponding to the target page, and finding the storage path corresponding to the identifier of the target multimedia resource; and using the found storage path as the storage path of the target multimedia resource.

[0066] It can be seen from the above method that if the resource mapping table corresponding to the target page stores the mapping relationship between the identifier of the target multimedia resource and its storage path, then in the above step 106, the storage path of the target multimedia resource corresponding to the identifier of the target multimedia resource can be obtained by querying the resource mapping table corresponding to the target page.

[0067] In step 108, the target media resource is acquired and loaded based on the storage path of the target multimedia resource.

[0068] In an embodiment of the present disclosure, if the storage path of the target multimedia resource is obtained by querying a resource mapping table corresponding to the target page, the storage path may generally be a local path or URL where the target multimedia resource is stored. In this case, the client may directly obtain and load the target multimedia resource based on the local path or URL where the target multimedia resource is stored.

[0069] Specifically, in some embodiments of the present disclosure, the acquisition and loading of the target media resource based on the storage path of the target multimedia resource described in step 108 may include: in response to determining that the storage path of the target multimedia resource is a local path, loading the target media resource based on the local path; in response to determining that the storage path of the target multimedia resource is a network path, determining whether the multimedia resource corresponding to the network path has been cached locally based on the network path; in response to determining that the multimedia resource corresponding to the network path has been cached locally, loading the locally cached multimedia resource corresponding to the network path; in response to determining that the multimedia resource corresponding to the network path has not been cached locally, downloading the multimedia resource based on the network path, and loading the downloaded multimedia resource. It can be seen that in the process of loading the target multimedia resource, for network multimedia resources, if the corresponding target multimedia resource has been cached locally, the cached target multimedia resource can be used first without the need for repeated downloading, thereby improving the loading efficiency of the multimedia resource, reducing the loading delay, and further enhancing the user experience.

[0070] It should be noted that if there are multiple target multimedia resources to be loaded on the target page, after loading the first target multimedia resource, the above steps 104-108 can be repeated for other target multimedia resources to be loaded to complete the loading of the target multimedia resources one by one.

[0071] Thus, it can be seen that the above-mentioned multimedia resource loading method obtains a resource mapping table for storing the mapping relationship between the identifier of at least one multimedia resource contained in the target page and its storage path. When loading the target multimedia resource on the target page, the storage path of the target multimedia resource can be obtained through the obtained resource mapping table, and then the corresponding multimedia resource is obtained and loaded based on the storage path. It can be seen that in the above-mentioned multimedia resource loading method, since the resource mapping table records the multimedia resources on the page and their corresponding storage paths, and when loading the multimedia resources, the multimedia resources are loaded according to the storage path recorded in the resource mapping table first. Therefore, when it is necessary to replace a multimedia resource to be loaded on the target page, only the storage path corresponding to the multimedia resource in the corresponding resource mapping table can be modified, and the resource mapping table can be sent to the user when the user requests to display the target page to achieve the replacement of a multimedia resource to be loaded on the target page without modifying the client application data, that is, without updating the client application, and without going through an additional multimedia resource sending process to replace the local multimedia resource, thereby greatly facilitating the use of the client application, improving the flexibility and development efficiency of the client application, without having to re-release the version due to the replacement of the multimedia resource, and also improving the user experience.

[0072] On the basis of the above-mentioned multimedia resource loading method, in other embodiments of the present disclosure, in addition to configuring a resource mapping table for each page of the client application, the server side further configures a global resource mapping table for the client application. The global resource mapping table stores the mapping relationship between the identifier of at least one multimedia resource contained in the client application, that is, the above-mentioned target application, and its storage path. It should be noted that, compared with the resource mapping table configured for each page, the priority of the global resource mapping table is relatively low. That is to say, in the process of determining the storage address of the target multimedia resource, the resource mapping table corresponding to the target page will be searched first.

[0073] In an embodiment of the present disclosure, the global resource mapping table corresponding to the target application may be downloaded and cached from the server each time the target application is accessed. In this case, the multimedia resource loading method may further include: in response to determining that a request to access the target application has been received, obtaining the global resource mapping table corresponding to the target application; and caching the obtained global resource mapping table corresponding to the target application. Typically, the request to access the target application may be a triggering operation in which a user opens the target application.

[0074] Taking into account that the global resource mapping table usually contains a large amount of data, in order to save traffic and improve efficiency, the client can also adopt an incremental update method to download the update package of the global resource mapping table from the server each time the target application is accessed, and incrementally update the cached global resource mapping table based on the downloaded update package. In this case, the above-mentioned multimedia resource loading method may further include: in response to determining that a request to access the target application is received, obtaining an update package of the global resource mapping table corresponding to the target application; and updating the cached global resource mapping table corresponding to the target application based on the obtained update package of the global resource mapping table. It should be noted that the client and the server can determine whether the client needs to update the global resource mapping table or determine the update package of the global resource mapping table based on information such as the version number or timestamp.

[0075] Based on the above settings, in an embodiment of the present disclosure, the implementation process of determining the storage path of the target multimedia resource according to the resource mapping table corresponding to the target page in step 106 may be as shown in FIG. 3 , including the following steps.

[0076] In step 302, the identifier of the target multimedia resource is used as an index to search the resource mapping table corresponding to the target page and find the storage path corresponding to the identifier of the target multimedia resource.

[0077] In step 304 , in response to determining that the resource mapping table corresponding to the target page contains an identifier of the target multimedia resource, the found storage path is used as the storage path of the target multimedia resource.

[0078] In step 306 , in response to determining that the resource mapping table corresponding to the target page does not include the identifier of the target multimedia resource, the cached global resource mapping table corresponding to the target application is obtained, and then step 308 is executed.

[0079] In step 308 , the identifier of the target multimedia resource is used as an index to search the global resource mapping table to find the storage path corresponding to the identifier of the target multimedia resource, and then step 310 is executed.

[0080] In step 310 , in response to determining that the global resource mapping table contains an identifier of the target multimedia resource, the found storage path is used as the storage path of the target multimedia resource.

[0081] Thus, it can be seen that in the embodiment of the present disclosure, even if the resource mapping table corresponding to the target page does not include the identifier of the target multimedia resource, the client can still further search for the identifier of the target multimedia resource in the global resource mapping table corresponding to the target application, thereby obtaining the storage path of the target multimedia resource at the target application level. It can be understood that the mapping relationship stored in the resource mapping table corresponding to a page is only valid within that page; while the mapping relationship stored in the global resource mapping table is valid for all pages in the entire application that are not specially specified (the corresponding mapping relationship is not stored in the resource mapping table corresponding to the page).

[0082] By setting up a multi-level resource mapping table (a page-level resource mapping table and a global resource mapping table), the configuration of multimedia resources in the target application is made more flexible, and even partial replacement of multimedia resources can be achieved.

[0083] Specifically, in some embodiments, the identifier of the same multimedia resource may correspond to the same storage path in the global resource mapping table and in the resource mapping table corresponding to a certain page, or may correspond to different storage paths. For example, for a multimedia resource whose identifier is A, it is assumed that multimedia resource A is recorded as corresponding to URL 1 in the global resource mapping table corresponding to the target application, in the resource mapping table corresponding to its page 1, and in the resource mapping table corresponding to its page 2, while multimedia resource A is not recorded in the resource mapping tables corresponding to other pages. Then, during the use of the target application, whether in page 1 or page 2 of the target application, or in other pages of the target application, if multimedia resource A needs to be loaded, the multimedia resource of URL 1 will be read and loaded. In this case, if you want to replace multimedia resource A on page 1 with multimedia resource B (whose storage path is URL 2), and also want to replace multimedia resource A on page 2 with multimedia resource C (whose storage path is URL 3), you only need to modify the storage path URL 1 corresponding to multimedia resource A in the resource mapping table corresponding to page 1 to URL 2, and modify the storage path URL 1 corresponding to multimedia resource A in the resource mapping table corresponding to page 2 to URL 3. There is no need to modify the application data corresponding to pages 1 and 2. In this way, if the user requests to display page 1 of the target application, the client will obtain the resource mapping table corresponding to page 1, in which the storage path corresponding to multimedia resource A is URL 2. In this case, when loading multimedia resource A, multimedia resource B will be read and loaded from URL 2. In other words, although the identification of the media resource in the application data and resource mapping table corresponding to page 1 is still multimedia resource A, the multimedia resource actually loaded will be multimedia resource B stored at URL 2. Similarly, if the user requests to display page 2 of the target application, the client will obtain the resource mapping table corresponding to page 2, in which the storage path corresponding to multimedia resource A is URL 3. In this case, when loading multimedia resource A, multimedia resource C will be read and loaded from URL 3. At this time, although the identification of the media resource in the application data and resource mapping table corresponding to page 2 is still multimedia resource A, the multimedia resource actually loaded will be multimedia resource C stored in URL 3. If the user requests to display other pages of the target application, since the resource mapping table corresponding to the other page does not include multimedia resource A, the client will query the global resource mapping table corresponding to the target application and obtain the storage path corresponding to multimedia resource A as URL 1. In this case, when loading multimedia resource A, multimedia resource A will be read and loaded from URL 1.It can be seen from the above examples that without modifying the application data of the client application, by setting up multi-level resource mapping tables (page-level resource mapping tables and global resource mapping tables), not only can the multimedia resources loaded on the page be flexibly configured or replaced in the target application, but also local replacement of multimedia resources can be achieved, not necessarily global replacement.

[0084] Furthermore, in some embodiments of the present disclosure, if the identifier of the target multimedia resource cannot be found in either the resource mapping table corresponding to the target page or the global resource mapping table corresponding to the target application, the storage path of the target multimedia resource can be further determined based on the information of the target multimedia resource. In this case, the method shown in FIG3 can further include the following steps 312-316.

[0085] In step 312, in response to determining that the global resource mapping table does not include the identifier of the target multimedia resource, the type of information of the target multimedia resource is determined.

[0086] As mentioned above, the information of the target multimedia resource may generally be a serial number or a storage path (including a local path or URL) corresponding to the target multimedia resource.

[0087] In step 314, in response to determining that the type of the information of the above-mentioned target multimedia resource is a string type, it can be basically determined that the information of the above-mentioned target multimedia resource is the storage path of the target multimedia resource. At this time, the information of the above-mentioned target multimedia resource can be directly used as the storage path of the above-mentioned target multimedia resource.

[0088] In step 316, in response to determining that the type of the information of the above-mentioned target multimedia resource is not a string type, it can be basically determined that the information of the above-mentioned target multimedia resource is the serial number corresponding to the target multimedia resource. At this time, a pre-set system method can be called based on the information of the above-mentioned target multimedia resource; then, the calling result of the system method is used as the storage path of the above-mentioned target multimedia resource.

[0089] In other embodiments of the present disclosure, assuming that the information of the above-mentioned target multimedia resource has been set as the loading default value of the above-mentioned target multimedia resource, the above-mentioned steps 312-316 can also be replaced by the following steps: first, determine the type of the loading default value of the above-mentioned target multimedia resource; in response to determining that the type of the loading default value of the above-mentioned target multimedia resource is a string type, directly use the loading default value of the above-mentioned target multimedia resource as the storage path of the above-mentioned target multimedia resource; in response to determining that the type of the loading default value of the above-mentioned target multimedia resource is not a string type, call a pre-set system method based on the loading default value of the above-mentioned target multimedia resource, and use the calling result of the system method as the storage path of the above-mentioned target multimedia resource.

[0090] As can be seen, in the embodiments of the present disclosure, even if neither the resource mapping table corresponding to the target page nor the resource mapping table corresponding to the target application includes the identifier of the target multimedia resource, the client can still determine the storage path of the target multimedia resource based on the target multimedia resource information recorded in the application data corresponding to the target page or the default value for loading the target multimedia resource, and read and load the target multimedia resource based on the storage path. This effectively avoids the situation where the target multimedia resource fails to load when neither the resource mapping table of the page nor the global resource mapping table has configured a certain multimedia resource.

[0091] Figure 4 shows a specific implementation process of a method for loading multimedia resources when a user requests to display a target page of a target application according to some embodiments of the present disclosure. As shown in Figure 4, the method may include the following steps.

[0092] In step 402, a resource mapping table corresponding to the target page is obtained.

[0093] In step 404 , an identifier of a target multimedia resource to be loaded on the target page is determined based on the application data of the target page.

[0094] In step 406, the identifier of the target multimedia resource is used as an index to search the resource mapping table corresponding to the target page and find the storage path corresponding to the identifier of the target multimedia resource.

[0095] In step 408 , in response to determining that the resource mapping table corresponding to the target page contains the identifier of the target multimedia resource, the found storage path is used as the storage path of the target multimedia resource, and then step 418 is executed.

[0096] In step 410 , in response to determining that the resource mapping table corresponding to the target page does not include the identifier of the target multimedia resource, a cached global resource mapping table corresponding to the target application is obtained, and then step 412 is executed.

[0097] In step 412 , the identifier of the target multimedia resource is used as an index to search the global resource mapping table to find the storage path corresponding to the identifier of the target multimedia resource, and then step 414 is executed.

[0098] In step 414 , in response to determining that the global resource mapping table contains the identifier of the target multimedia resource, the found storage path is used as the storage path of the target multimedia resource, and then step 418 is executed.

[0099] In step 416 , in response to determining that the global resource mapping table does not include the identifier of the target multimedia resource, a storage path of the target multimedia resource is determined based on the information of the target multimedia resource, and then step 418 is executed.

[0100] In step 418, the target multimedia resource is acquired and loaded based on the storage path of the target multimedia resource.

[0101] The specific implementation methods of the steps shown in FIG4 can be referred to the above embodiments and will not be repeated here.

[0102] It can be seen that the above multimedia resource loading method makes the configuration of multimedia resources in the target application more flexible by setting the page-level resource mapping table and the global resource mapping table, and can even realize partial replacement of multimedia resources.

[0103] In practical applications, the above multimedia resource loading method can be applied to the skinning scenario of client applications. Through this method, skin configuration can be flexibly performed, and the skin of client applications or various pages can be quickly replaced, thereby greatly satisfying the user's skinning needs.

[0104] In addition, even if the resource mapping table corresponding to the target page and the resource mapping table corresponding to the target application do not include the identifier of the target multimedia resource, the client can still determine the storage path of the target multimedia resource based on the information of the target multimedia resource recorded in the application data corresponding to the target page, and complete the loading, effectively avoiding the situation where the target multimedia resource loading fails.

[0105] It should be noted that the method of the embodiments of the present disclosure can be performed by a single device, such as a computer or server. The method of the embodiments of the present disclosure can also be applied in a distributed scenario, where multiple devices cooperate to perform the method. In such a distributed scenario, one of the multiple devices may only perform one or more steps of the method of the embodiments of the present disclosure, and the multiple devices will interact with each other to complete the method.

[0106] It should be noted that the above description is limited to some embodiments of the present disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in an order different from that described in the above embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order or sequential order shown to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0107] Corresponding to the above method, the embodiment of the present disclosure further discloses a multimedia resource loading device. FIG5 shows the internal structure of the device described in the embodiment of the present disclosure. As shown in FIG5, the device may include:

[0108] The resource mapping table acquisition module 510 is configured to acquire a resource mapping table corresponding to a target page in response to a trigger operation requesting to display the target page.

[0109] The resource mapping table corresponding to the target page is used to store a mapping relationship between an identifier of at least one multimedia resource included in the target page and its storage path.

[0110] The parsing module 520 is used to obtain the identifier of the target multimedia resource to be loaded on the target page.

[0111] The storage path determining module 530 is configured to determine the storage path of the target multimedia resource based on the identifier of the target multimedia resource and the resource mapping table corresponding to the target page.

[0112] The loading module 540 is configured to acquire and load the target multimedia resource based on the storage path of the target multimedia resource.

[0113] The specific implementation of each of the above modules can be referenced in the aforementioned methods and accompanying drawings, and will not be repeated here. For ease of description, the above device is described as functionally divided into various modules and described separately. Of course, when implementing the present disclosure, the functions of each module can be implemented in the same or multiple software and / or hardware.

[0114] The apparatus of the above embodiment is used to implement the corresponding multimedia resource loading method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.

[0115] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments and methods, the present disclosure also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and runnable on the processor, wherein when the processor executes the program, the multimedia resource loading method described in any of the above embodiments is implemented.

[0116] 6 shows a more specific schematic diagram of the hardware structure of an electronic device provided in this embodiment. The device may include: a processor 2010, a memory 2020, an input / output interface 2030, a communication interface 2040, and a bus 2050. The processor 2010, the memory 2020, the input / output interface 2030, and the communication interface 2040 are communicatively connected to each other within the device via the bus 2050.

[0117] The processor 2010 can be implemented using a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.

[0118] The memory 2020 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage devices, dynamic storage devices, etc. The memory 2020 can store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 220 and is called and executed by the processor 2010.

[0119] The input / output interface 2030 is used to connect input / output modules to implement information input and output. The input / output modules can be configured as components within the device (not shown in the figure) or can be externally connected to the device to provide corresponding functions. Input devices may include a keyboard, mouse, touch screen, microphone, various sensors, etc., and output devices may include a display, speaker, vibrator, indicator light, etc.

[0120] The communication interface 2040 is used to connect to a communication module (not shown) to enable communication between the device and other devices. The communication module can communicate via a wired method (such as USB, network cable, etc.) or a wireless method (such as mobile network, WiFi, Bluetooth, etc.).

[0121] The bus 2050 comprises a path for transmitting information between the various components of the device (eg, the processor 2010 , the memory 2020 , the input / output interface 2030 , and the communication interface 2040 ).

[0122] It should be noted that although the above device only shows the processor 2010, the memory 2020, the input / output interface 2030, the communication interface 2040, and the bus 2050, in a specific implementation, the device may also include other components necessary for normal operation. In addition, it will be understood by those skilled in the art that the above device may only include the components necessary to implement the embodiments of this specification, and does not necessarily include all the components shown in the figure.

[0123] The electronic device of the above embodiment is used to implement the corresponding multimedia resource loading method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.

[0124] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present disclosure also provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the multimedia resource loading method described in any of the above embodiments.

[0125] The computer-readable media of this embodiment include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.

[0126] The computer instructions stored in the storage medium of the above embodiment are used to enable the computer to execute the task processing method described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0127] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present disclosure (including the claims) is limited to these examples. Within the scope of the present disclosure, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present disclosure as described above, which are not provided in detail for the sake of simplicity.

[0128] In addition, to simplify the description and discussion, and so as not to obscure the embodiments of the present disclosure, known power / ground connections to integrated circuit (IC) chips and other components may or may not be shown in the provided figures. In addition, devices may be shown in the form of block diagrams to avoid obscuring the embodiments of the present disclosure, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform on which the embodiments of the present disclosure are to be implemented (i.e., these details should be fully within the purview of those skilled in the art). Where specific details (e.g., circuits) are set forth to describe exemplary embodiments of the present disclosure, it will be apparent to those skilled in the art that the embodiments of the present disclosure may be implemented without these specific details or with variations in these specific details. Therefore, these descriptions should be considered illustrative rather than restrictive.

[0129] Although the present disclosure has been described in conjunction with specific embodiments thereof, many alternatives, modifications, and variations of these embodiments will be apparent to those skilled in the art based on the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed.

[0130] The embodiments of the present disclosure are intended to cover all such substitutions, modifications, and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present disclosure should be included in the scope of protection of the present disclosure.

Claims

1. A multimedia resource loading method, comprising: In response to a trigger operation requesting to display a target page, obtaining a resource mapping table corresponding to the target page; Determining an identifier of a target multimedia resource to be loaded on the target page; Based on the identifier of the target multimedia resource, determining the storage path of the target multimedia resource according to the resource mapping table corresponding to the target page; as well as The target media resource is acquired and loaded based on the storage path of the target multimedia resource.

2. The multimedia resource loading method according to claim 1, wherein: The target page is a target page of a target application; The obtaining of the resource mapping table corresponding to the target page includes: Obtaining a resource mapping table corresponding to the target page from a server through an application program interface corresponding to the target page; or The storage path of the resource mapping table corresponding to the target page is obtained from the configuration information of the target application, and the resource mapping table corresponding to the target page is obtained from the storage path of the resource mapping table corresponding to the target page.

3. The multimedia resource loading method according to claim 1, wherein: Determining the identifier of the target multimedia resource to be loaded on the target page includes: Get the application data corresponding to the target page; Acquire information of multimedia resources to be loaded on the target page from the application data; In response to determining that the type of the multimedia resource information is a character string type, using the multimedia resource information as an identifier of the target multimedia resource; and In response to determining that the type of the multimedia resource information is not a character string type, a preset system method is called based on the multimedia resource information to obtain an identifier of the target multimedia resource.

4. The multimedia resource loading method according to claim 3, wherein: The determining, based on the identifier of the target multimedia resource and according to the resource mapping table corresponding to the target page, the storage path of the target multimedia resource comprises: Using the identifier of the target multimedia resource as an index, searching a resource mapping table corresponding to the target page, and finding a storage path corresponding to the identifier of the target multimedia resource; and The found storage path is used as the storage path of the target multimedia resource.

5. The multimedia resource loading method according to claim 4, wherein: The target page is a target page of a target application; The step of determining the storage path of the target multimedia resource based on the identifier of the target multimedia resource and according to the resource mapping table corresponding to the target page further includes: In response to determining that the resource mapping table corresponding to the target page does not contain the identifier of the target multimedia resource, Obtaining a cached global resource mapping table corresponding to the target application; Using the identifier of the target multimedia resource as an index, searching the global resource mapping table to find a storage path corresponding to the identifier of the target multimedia resource; and The found storage path is used as the storage path of the target multimedia resource.

6. The multimedia resource loading method according to claim 5, wherein: The step of determining the storage path of the target multimedia resource based on the identifier of the target multimedia resource and according to the resource mapping table corresponding to the target page further includes: In response to determining that the global resource mapping table does not contain the identifier of the target multimedia resource, determining the type of information of the multimedia resource; In response to determining that the type of the multimedia resource information is a character string type, using the multimedia resource information as a storage path of the target multimedia resource; and In response to determining that the type of the information of the target multimedia resource is not a character string type, a preset system method is called based on the information of the multimedia resource to obtain a storage path of the target multimedia resource.

7. The multimedia resource loading method according to claim 5, further comprising: In response to determining that a request to access the target application is received, obtaining a global resource mapping table corresponding to the target application; as well as The global resource mapping table corresponding to the target application is cached.

8. The multimedia resource loading method according to claim 5, further comprising: In response to determining that a request to access the target application is received, obtaining an update package of a global resource mapping table corresponding to the target application; as well as The cached global resource mapping table corresponding to the target application is updated based on the acquired update package of the global resource mapping table corresponding to the target application.

9. The multimedia resource loading method according to claim 1, wherein: The acquiring and loading the target media resource based on the storage path of the target multimedia resource comprises: In response to determining that the storage path of the target multimedia resource is a local path, loading the target multimedia resource based on the local path; In response to determining that the storage path of the target multimedia resource is a network path, determining based on the network path whether a multimedia resource corresponding to the network path has been cached locally; In response to determining that the multimedia resource corresponding to the network path has been cached locally, loading the locally cached multimedia resource corresponding to the network path; and In response to determining that the multimedia resource corresponding to the network path is not cached locally, the multimedia resource is downloaded based on the network path, and the downloaded multimedia resource is loaded.

10. A multimedia resource loading device, comprising: A resource mapping table acquisition module, configured to acquire a resource mapping table corresponding to a target page in response to a trigger operation requesting display of the target page; A parsing module, used for obtaining an identifier of a target multimedia resource to be loaded on the target page; A storage path determination module, configured to determine the storage path of the target multimedia resource based on the identifier of the target multimedia resource and according to the resource mapping table corresponding to the target page; as well as The loading module is used to acquire and load the target media resource based on the storage path of the target multimedia resource.

11. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the multimedia resource loading method according to any one of claims 1 to 9 when executing the program.

12. A non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute the multimedia resource loading method according to any one of claims 1 to 9.

13. A computer program product, comprising computer program instructions, which, when executed on a computer, enable the computer to execute the multimedia resource loading method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Information processing method, server and computer storage medium

    CN108875291A

  • Page loading method and system, computer equipment and computer readable storage medium

    CN111159595A

  • Page access data statistical method and device, electronic equipment and storage medium

    CN111523072A

  • Page loading method and device, electronic equipment and storage medium

    CN116204749A

  • Method and system to convert globally unique identifiers to electronic data interchange document identifiers

    US20180219964A1

Cited By

  • Method and system for generating and loading business object resources

    CN122431754A