Multimedia resource loading method and related device

By obtaining and utilizing the resource mapping table to determine the storage path of multimedia resources, the inconvenience of replacing multimedia resources in client applications is solved, enabling fast and flexible resource configuration and improved user experience.

CN119202421BActive Publication Date: 2025-12-16BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310774295.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-27
Publication Date
2025-12-16
Estimated Expiration
2043-06-27

AI Technical Summary

Technical Problem

In existing technologies, replacing multimedia resources in client applications requires an additional multimedia resource distribution process or version upgrade, which leads to inconvenience and a decline in user experience.

Method used

By obtaining the resource mapping table of the target page, the identifier of the multimedia resource is determined and its storage path is obtained according to the mapping table, enabling the rapid replacement of multimedia resources without changing client application data or upgrading the version.

Benefits of technology

It improves the flexibility and development efficiency of client applications, enhances the user experience, and simplifies the configuration process of multimedia resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119202421B_ABST
    Figure CN119202421B_ABST
Patent Text Reader

Abstract

The present disclosure provides a multimedia resource loading method, comprising: in response to a trigger operation of 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; determining a storage path of the target multimedia resource according to the resource mapping table corresponding to the target page based on the identifier of the target multimedia resource; and obtaining and loading the target multimedia resource based on the storage path of the target multimedia resource. Based on the above multimedia resource loading method, the present disclosure further provides a multimedia resource loading device, an electronic device, a storage medium and a program product.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of Internet, and particularly relates to a multimedia resource loading method, a multimedia resource loading device, an electronic device, a storage medium and a program product. BACKGROUND

[0002] With the development of mobile Internet technology, various types of client applications are becoming more and more popular. Moreover, in order to bring users a richer visual experience, during the use of the client application, it is usually necessary to load multimedia content such as pictures, sounds or videos in the client to present a variety of pages to the user.

[0003] Generally, the multimedia resources loaded in the client application can include two types of local multimedia resources and network multimedia resources. Among them, the local multimedia resource usually refers to the multimedia resource pre-downloaded and stored in the local client during the installation and update process of the client application or through other ways; and the network multimedia resource generally refers to the multimedia resource stored on the network side and needs to be downloaded by the client during the loading process. For the local multimedia resource, the client can usually access and load it through its corresponding local path. And for the network multimedia resource, the client can usually access, download and load it through its 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.

[0004] It can be understood that, whether it is a local multimedia resource or a network multimedia resource, the storage path of the multimedia resource to be loaded in the client application is usually pre-configured in the client application data packet. That is, the storage path of the multimedia resource to be loaded by the client application is usually pre-configured and fixed. Therefore, if you want to replace a certain multimedia resource on a certain page during the use of the client application, you usually need to directly replace the original local multimedia resource stored in the client with a new multimedia resource through an additional multimedia resource issuing process, or you need to modify the storage path of a certain multimedia resource loaded by the client application by upgrading the version of the client application. It can be seen that either of the two ways of replacing the multimedia resource brings great inconvenience to the use of the client application, and also affects the user's experience. SUMMARY

[0005] Therefore, the embodiment of the present disclosure provides a multimedia resource loading method, which can quickly complete the configuration of the multimedia resource without changing the client application data, and can quickly replace the multimedia resource without additional multimedia resource issuing process and version upgrade of the client application, thereby greatly facilitating the use of the client application, improving the flexibility and development efficiency of the client application, and improving the user experience.

[0006] According to some embodiments of the present disclosure, the above multimedia resource loading method can include: in response to a trigger operation of 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 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 multimedia resource based on the storage path of the target multimedia resource.

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

[0008] In the embodiments of the present disclosure, the above determining 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, taking 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.

[0009] In the embodiments of the present disclosure, the above determining the storage path of the target multimedia resource according to the resource mapping table corresponding to the target page based on the identifier of the target multimedia resource includes: taking the identifier of the target multimedia resource as an index to search the resource mapping table corresponding to the target page to find a storage path corresponding to the identifier of the target multimedia resource; and taking the found storage path as the storage path of the target multimedia resource.

[0010] In embodiments of the present disclosure, the target page is a target page of a target application; and 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 identifier of the target multimedia resource is not included in the resource mapping table corresponding to the target page, obtaining a cached global resource mapping table corresponding to the target application; taking 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 taking the found storage path as the storage path of the target multimedia resource.

[0011] In embodiments of the present disclosure, 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 identifier of the target multimedia resource is not included in the global resource mapping table, determining the type of the information of the multimedia resource; in response to determining that the type of the information of the multimedia resource is a string type, taking the information of the multimedia resource as the 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 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.

[0012] In embodiments of the present disclosure, the method further includes: in response to determining that the 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.

[0013] In embodiments of the present disclosure, the method further includes: in response to determining that the request to access the target application is received, obtaining an update package of a 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.

[0014] In embodiments of the present disclosure, the obtaining and loading of the target multimedia 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 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 whether a 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; and 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.

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

[0016] a resource mapping table obtaining module, configured to obtain a resource mapping table corresponding to a target page in response to a trigger operation of requesting to display the target page;

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

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

[0019] a loading module, configured to obtain and load the target multimedia resource based on the storage path of the target multimedia resource.

[0020] 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 multimedia resource loading method when executing the program.

[0021] An embodiment of the present disclosure further provides a non-transitory computer readable storage medium, which stores computer instructions for causing a computer to execute the above multimedia resource loading method.

[0022] An embodiment of the present disclosure further provides a computer program product, which includes computer program instructions, and when the computer program instructions are executed on a computer, the computer executes the above multimedia resource loading method.

[0023] The multimedia resource loading method and the related device can obtain the storage path of the target multimedia resource through the resource mapping table when loading the target multimedia resource on the target page, and then obtain the corresponding multimedia resource based on the storage path and load it. It can be seen that in the multimedia resource loading method and device, the corresponding multimedia resource on a page can be replaced by modifying the storage path of a certain multimedia resource in the resource mapping table corresponding to the page of a certain client application, without modifying the client application data, i.e., without updating the client application, and without replacing the old multimedia resource with the new multimedia resource through an additional multimedia resource distribution process. Therefore, the use of the client application can be greatly facilitated, the flexibility and development efficiency of the client application can be improved, and the user experience can be improved. BRIEF DESCRIPTION OF DRAWINGS

[0024] In order to more clearly illustrate the technical solutions in the present disclosure or the related art, the following will briefly introduce the drawings needed to be used in the embodiments or the related art description. Obviously, the drawings in the following description are only embodiments of the present disclosure, and other drawings can be obtained by those skilled in the art without any creative effort on the basis of these drawings.

[0025] Figure 1 An implementation process of the multimedia resource loading method according to some embodiments of the present disclosure is shown.

[0026] Figure 2 An implementation process of the method for determining the identification of the target multimedia resource to be loaded on the target page according to some embodiments of the present disclosure is shown.

[0027] Figure 3 An implementation process of determining the storage path of the target multimedia resource according to the resource mapping table corresponding to the target page according to some embodiments of the present disclosure is shown.

[0028] Figure 4 An implementation process of the multimedia resource loading method when a user requests to display the target page of the target application according to some embodiments of the present disclosure is shown.

[0029] Figure 5 The internal structure of the multimedia resource loading device according to some embodiments of the present disclosure is shown.

[0030] Figure 6 A more specific hardware structure of an electronic device according to some embodiments of the present disclosure is shown. DETAILED DESCRIPTION

[0031] In order to make the objects, technical solutions and advantages of the present disclosure clearer, the present disclosure will be further described in detail below with reference to specific embodiments and drawings.

[0032] It should be noted that, unless otherwise defined, technical terms or scientific terms used in the embodiments of the present disclosure should be understood as their common meanings to those skilled in the art to which the present disclosure pertains. The terms "first", "second" and similar terms used in the embodiments of the present disclosure do not denote any order, quantity or importance, but are merely used to distinguish different components. The terms "include" or "contain" and similar terms mean that the elements or objects before the terms encompass the elements or objects listed after the terms and their equivalents, and do not exclude other elements or objects. The terms "connect" or "connected" and similar terms do not mean physical or mechanical connection, but can include electrical connection, whether direct or indirect. The terms "upper", "lower", "left", "right" and the like are merely used to represent relative positional relationships, and when the absolute positions of the described objects are changed, the relative positional relationships can also be changed accordingly.

[0033] It can be understood that, before using the technical solutions of the embodiments of the present disclosure, the user will be informed of the type, use range, use scenario and the like of the personal information involved by appropriate means, and the authorization of the user will be obtained.

[0034] For example, in response to receiving the active request of the user, the user is sent prompt information to explicitly prompt the user that the operation requested to be performed will require the acquisition and use of personal information of the user. Thus, the user can voluntarily choose whether to provide personal information to the software or hardware such as electronic device, application program, server or storage medium that performs the operation of the technical solutions of the present disclosure according to the prompt information.

[0035] As an optional but non-limiting implementation manner, in response to accepting the active request of the user, the manner of sending prompt information to the user may, for example, be a pop-up window manner, and the prompt information can be presented in the form of text in the pop-up window. In addition, the pop-up window can also carry selection controls for the user to select "agree" or "disagree" to provide personal information to the electronic device.

[0036] It can be understood that the above notification and user authorization process is only illustrative, and does not limit the implementation manner of the present disclosure, and other manners meeting the relevant laws and regulations can also be applied to the implementation manner of the present disclosure.

[0037] As mentioned above, in the current use of the client application, if it is desired to replace a certain multimedia resource on a certain page, it is usually necessary to issue a new multimedia resource to the client to replace the original local multimedia resource through an additional multimedia resource issuing process, or to modify the storage path of a certain multimedia resource by upgrading the version of the client application. Obviously, either of the above-mentioned ways of replacing multimedia resources brings great inconvenience and burden to the use of the client application, and also affects the user experience.

[0038] To this end, some embodiments of the present disclosure provide a multimedia resource loading method to achieve flexible configuration of multimedia resources without changing the data of the client application. In the embodiments of the present disclosure, the above-mentioned multimedia resource loading method is executed by a client. The above-mentioned client usually includes a hardware device with data information processing capability and / or necessary software for driving the hardware device to work. Optionally, the above-mentioned client can be configured in a computer, a tablet computer, a mobile terminal or another smart device.

[0039] Figure 1 The implementation process of the multimedia resource loading method according to some embodiments of the present disclosure is shown. As shown in Figure 1 The multimedia resource loading method according to some embodiments of the present disclosure can include the following steps.

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

[0041] In the embodiments of the present disclosure, the target page refers to a target page of a target application. In addition, the trigger operation of requesting to display a target page can usually be an operation performed by a user when the user selects to open or access a certain target page in a certain target application through a client.

[0042] In the embodiments 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 the storage path thereof. The identifier of the multimedia resource usually refers to a string that can identify the multimedia resource, for example, the name of the multimedia resource. The storage path of the multimedia resource refers to the location information of the storage of the multimedia resource. Usually, if the multimedia resource is a local multimedia resource, the storage path usually refers to the local path of the storage of the local multimedia resource; and if the multimedia resource is a network multimedia resource, the storage path usually refers to the URL of the storage of the network multimedia resource.

[0043] Specifically, in some embodiments of the present disclosure, the obtaining of the resource mapping table corresponding to the target page in step 102 can include: obtaining the resource mapping table corresponding to the target page from the server side through an application program interface of the target page. In some embodiments of the present disclosure, the client application can be pre-configured with an application program interface for each page. The client can pull the resource mapping table corresponding to each page from the server side through the application program interface configured for each page.

[0044] In some embodiments of the present disclosure, the client application can not be configured with an application program interface for each page, but can be configured with a 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.

[0045] As described 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 the storage path thereof. It should be noted that the identifier of the multimedia resource stored in the resource mapping table corresponding to a certain page can be a subset of the multimedia resources contained in the page. That is, the resource mapping table corresponding to a certain page can not store the corresponding relationship between the identifiers of all multimedia resources contained in the page and the storage paths thereof, and the identifiers of some multimedia resources contained in the page can not be recorded in the resource mapping table corresponding to the page.

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

[0047] In the embodiments 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 in step 104 can be as shown in Figure 2 Figure 2 The method shown can include the following steps:

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

[0049] ​In some embodiments of the present disclosure, the application data corresponding to the target page can generally refer to a set of data compositions required for loading the target page, such as configuration information corresponding to the target page, and the like. These data define the content and form of the target page. Generally, after the client application is installed, the application data of each page included in the client application is stored locally on the client. During the use of the client application by the user, if the user requests to display a target page, the client can generally first acquire the application data corresponding to the target page, and then obtain the target page by loading the application data and display the target page to the user.

[0050] In step 204, the information of the multimedia resource to be loaded on the target page is acquired from the application data.

[0051] It can be understood that when the target page includes multimedia resources such as pictures, sounds, or videos, the application data corresponding to the target page will include the information of one or more multimedia resources to be loaded on the target page.

[0052] In some embodiments of the present disclosure, the information of the multimedia resource can be the 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.

[0053] In some other embodiments of the present disclosure, the information of the multimedia resource can also be a unique serial number allocated to the multimedia resource. Generally, the serial number is a local identifier allocated to the multimedia resource by the client. After the serial number is allocated 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 based on the serial number of the multimedia resource by calling the pre-set system method. Specifically, in actual applications, after the client acquires the serial number of the multimedia resource to be loaded from the application data of the target page, the pre-set system method can be called based on the serial number of the multimedia resource, so as to obtain the local path of the multimedia resource.

[0054] In some other embodiments of the present disclosure, the information of the multimedia resource can also be the storage path of the multimedia resource, such as the local storage path or the URL of the multimedia resource. In this way, after the information of the multimedia resource is acquired, the multimedia resource can be directly read.

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

[0056] As mentioned above, the information of the multimedia resource can be the name or the storage path of the multimedia resource, in which case the type of the information of the multimedia resource is usually string type. In addition, the information of the multimedia resource can also be the serial number corresponding to the multimedia resource, in which case the type of the information of the multimedia resource is usually integer type, instead of string type. In an embodiment of the present disclosure, the processing manner of the information of the multimedia resource is different for different types of the information of the multimedia resource.

[0057] Specifically, if it is determined that the type of the information of the multimedia resource is string type, i.e., the information of the multimedia resource is the name or the storage path of the multimedia resource, in step 206, the information of the multimedia resource can be directly taken as the identifier of the target multimedia resource, so that the subsequent table lookup operation can be performed.

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

[0059] Further, if it is determined that the type of the information of the multimedia resource is not string type, i.e., the information of the multimedia resource is the serial number corresponding to the multimedia resource, in step 208, a pre-set system method can be called based on the information of the multimedia resource, and the calling result of the system method can be taken as the identifier of the target multimedia resource. For example, by calling the pre-set system method, the local path of the multimedia resource corresponding to the serial number of the multimedia resource can usually be obtained. At this time, the obtained local path can be taken as the identifier of the target multimedia resource.

[0060] Further, in order to avoid the situation that the identifier of the target multimedia resource cannot be found in the resource mapping table, so that the multimedia resource cannot be loaded, and in order to facilitate implementation, in the process of determining the identifier of the target multimedia resource to be loaded on the target page, as shown in the above embodiment, the information of the multimedia resource can be set as the loading default value of the target multimedia resource. Figure 2 In the process of determining the identifier of the target multimedia resource to be loaded on the target page, as shown in the above embodiment, the information of the multimedia resource can be set as the loading default value of the target multimedia resource.

[0061] In an embodiment of the present disclosure, by setting the information of the multimedia resource as the loading default value of the target multimedia resource, the client can still complete the loading of the target multimedia resource based on the loading default value of the target multimedia resource in the case that the identifier of the target multimedia resource cannot be found in the resource mapping table. The specific process of loading the target multimedia resource based on the loading default value of the target multimedia resource will be described in detail hereinafter, which is temporarily omitted here.

[0062] At step 106, based on the identification 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.

[0063] In an embodiment of the present disclosure, the determination of the storage path of the target multimedia resource according to the resource mapping table corresponding to the target page in step 106 can include: taking the identification of the target multimedia resource as an index, retrieving the resource mapping table corresponding to the target page, and searching for the storage path corresponding to the identification of the target multimedia resource; and taking the searched storage path as the storage path of the target multimedia resource.

[0064] As can be seen from the above method, if the mapping relationship between the identification of the target multimedia resource and the storage path of the target multimedia resource is stored in the resource mapping table corresponding to the target page, then in step 106, the storage path of the target multimedia resource corresponding to the identification of the target multimedia resource can be obtained by querying the resource mapping table corresponding to the target page.

[0065] At step 108, the target multimedia resource is obtained and loaded based on the storage path of the target multimedia resource.

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

[0067] Specifically, in some embodiments of the present disclosure, the obtaining and loading of the target multimedia resource based on the storage path of the target multimedia resource in step 108 can include: 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 whether the local has cached the multimedia resource corresponding to the network path based on the network path; in response to determining that the local has cached the multimedia resource corresponding to the network path, loading the locally cached multimedia resource corresponding to the network path; and in response to determining that the local has not cached the multimedia resource corresponding to the network path, downloading the multimedia resource based on the network path and loading the downloaded multimedia resource. As can be seen, in the process of loading the target multimedia resource, for a network multimedia resource, if the corresponding target multimedia resource has been cached in the local, the cached target multimedia resource can be used preferentially without repeated downloading, thereby improving the loading efficiency of the multimedia resource, reducing the loading delay, and further improving the user experience.

[0068] It should be noted that if there are multiple target multimedia resources to be loaded on the target page, after the first target multimedia resource is loaded, 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.

[0069] As can be seen, the above multimedia resource loading method obtains a resource mapping table recording the mapping relationship between the identifier of at least one multimedia resource contained in the target page and the storage path thereof, and when loading the target multimedia resource on the target page, the storage path of the target multimedia resource is obtained through the obtained resource mapping table, and then the corresponding multimedia resource is obtained based on the storage path and loaded. It can be seen that in the above multimedia resource loading method, since the resource mapping table records the multimedia resources on the page and their corresponding storage paths, and the multimedia resource loading is performed by preferentially following the storage path recorded in the resource mapping table, when it is necessary to replace a certain multimedia resource to be loaded on the target page, 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, so that the replacement of a certain multimedia resource to be loaded on the target page can be realized, without the need to modify the client application data, i.e., without the need to update the client application, and without the need to replace the local multimedia resource through an additional multimedia resource sending process, thereby greatly facilitating the use of the client application, improving the flexibility and development efficiency of the client application, without the need to re-release due to the replacement of the multimedia resource, and also improving the user experience.

[0070] On the basis of the above multimedia resource loading method, in some 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, i.e., the target application, and the storage path thereof. 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, 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.

[0071] In an embodiment of the present disclosure, the global resource mapping table corresponding to the target application can be downloaded from the server side and cached each time the target application is accessed. In this case, the multimedia resource loading method can further include: in response to determining that the request for accessing the target application is 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. Generally, the request for accessing the target application can be a trigger operation of opening the target application by the user.

[0072] Considering that the global resource mapping table generally contains a large amount of data, in order to save traffic and improve efficiency, the client can also download an update package of the global resource mapping table from the server side in an incremental update manner each time the target application is accessed, and update the cached global resource mapping table based on the downloaded update package. In this case, the multimedia resource loading method can further include: in response to determining that the request for accessing 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 side can determine whether the client needs to update the global resource mapping table or determine the update package of the global resource mapping table according to version numbers or timestamps and the like.

[0073] Based on the above setting, 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 can be as shown in Figure 3 , including the following steps.

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

[0075] In step 304, in response to determining that the identifier of the target multimedia resource is contained in the resource mapping table corresponding to the target page, the found storage path is taken as the storage path of the target multimedia resource.

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

[0077] In step 308, the identifier of the target multimedia resource is taken 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 performed.

[0078] At step 310, in response to determining that the global resource mapping table contains the identification of the target multimedia resource, the found storage path is taken as the storage path of the target multimedia resource.

[0079] As can be seen, in the embodiments of the present disclosure, even if the resource mapping table corresponding to the target page does not include the identification of the target multimedia resource, the client can further find the identification 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 the page is only valid within the page; and the mapping relationship stored in the global resource mapping table is valid in all pages within the entire application without special provisions (no corresponding mapping relationship is stored in the resource mapping table corresponding to the page).

[0080] By setting the multi-level resource mapping tables (the page-level resource mapping table and the global resource mapping table), the configuration of the multimedia resource in the target application is more flexible, and even local replacement of the multimedia resource can be implemented.

[0081] Specifically, in some embodiments, the same identification of a multimedia resource can correspond to the same storage path or different storage paths in the global resource mapping table and in the resource mapping table corresponding to a certain page. For example, for a multimedia resource with an identification of A, assume that the global resource mapping table corresponding to the target application, the resource mapping table corresponding to page 1 of the target application, and the resource mapping table corresponding to page 2 of the target application all record that the multimedia resource A corresponds to URL 1, while the resource mapping tables corresponding to other pages of the target application do not record the multimedia resource A. At this time, in 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 the multimedia resource A needs to be loaded, the multimedia resource of URL 1 will be read and loaded. In this case, if it is desired to replace the multimedia resource A on page 1 with a multimedia resource B (with a storage path of URL 2) and replace the multimedia resource A on page 2 with a multimedia resource C (with a storage path of URL 3), it is only necessary to modify the storage path of the multimedia resource A in the resource mapping table corresponding to page 1 from URL 1 to URL 2 and modify the storage path of the multimedia resource A in the resource mapping table corresponding to page 2 from URL 1 to URL 3, without modifying the application data corresponding to page 1 and page 2. In this way, if a 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 of the multimedia resource A is URL 2. In this case, when the multimedia resource A is loaded, the multimedia resource B stored in URL 2 will be read and loaded. That is, although the identification of the multimedia resource in the application data and the resource mapping table corresponding to page 1 is still the multimedia resource A, the actual loaded multimedia resource will be the multimedia resource B stored in URL 2. Similarly, if a 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 of the multimedia resource A is URL 3. In this case, when the multimedia resource A is loaded, the multimedia resource C stored in URL 3 will be read and loaded. At this time, although the identification of the multimedia resource in the application data and the resource mapping table corresponding to page 2 is still the multimedia resource A, the actual loaded multimedia resource will be the multimedia resource C stored in URL 3. If a user requests to display other pages of the target application, since the resource mapping tables corresponding to the other pages do not contain the multimedia resource A, the client will query the global resource mapping table corresponding to the target application, and obtain that the storage path of the multimedia resource A is URL 1. In this case, when the multimedia resource A is loaded, the multimedia resource A stored in URL 1 will be read and loaded.As can be seen from the above examples, by setting the multi-level resource mapping table (the page-level resource mapping table and the global resource mapping table), the multimedia resources loaded on the page can be flexibly configured or replaced in the target application without modifying the application data of the client application, and partial replacement of the multimedia resources can be achieved instead of global replacement.

[0082] In addition, in some embodiments of the present disclosure, in the case where the identifier of the target multimedia resource cannot be found in the resource mapping table corresponding to the target page and the global resource mapping table corresponding to the target application, the storage path of the target multimedia resource can be further determined according to the information of the target multimedia resource. In this case, the storage path of the target multimedia resource can be determined by the following steps 312-316. Figure 3 The method shown in FIG. 12 can further include the following steps 312-316.

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

[0084] As described above, the information of the target multimedia resource can generally be the serial number or the storage path (including the local path or the URL) corresponding to the target multimedia resource.

[0085] In step 314, in response to determining that the type of the information of the target multimedia resource is the string type, it can be basically determined that the information of the target multimedia resource is the storage path of the target multimedia resource, and at this time, the information of the target multimedia resource can be directly used as the storage path of the target multimedia resource.

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

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

[0088] As can be seen, in the embodiments of the present disclosure, even if the identification of the target multimedia resource is not included in the resource mapping table corresponding to the target page and the resource mapping table corresponding to the target application, the client can still determine the storage path of the target multimedia resource according to the information of the target multimedia resource recorded in the application data corresponding to the target page or the loading default value of the target multimedia resource, and read and load the target multimedia resource according to the storage path. Thus, the situation that the target multimedia resource fails to be loaded when neither the resource mapping table of the page nor the global resource mapping table configures a certain multimedia resource can be effectively avoided.

[0089] Figure 4 The specific implementation process of the method for loading a multimedia resource when a user requests to display a target page of a target application is shown. As shown in Figure 4 The method can include the following steps.

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

[0091] In step 404, the identification of the target multimedia resource to be loaded on the target page is determined based on the application data of the target page.

[0092] In step 406, the identification of the target multimedia resource is taken as an index to search the resource mapping table corresponding to the target page to find the storage path corresponding to the identification of the target multimedia resource.

[0093] In step 408, in response to determining that the resource mapping table corresponding to the target page contains the identification of the target multimedia resource, the found storage path is taken as the storage path of the target multimedia resource, and then step 418 is performed.

[0094] In step 410, in response to determining that the resource mapping table corresponding to the target page does not contain the identification of the target multimedia resource, the cached global resource mapping table corresponding to the target application is obtained, and then step 412 is performed.

[0095] At step 412, the identification of the target multimedia resource is taken as an index to search the global resource mapping table to find the storage path corresponding to the identification of the target multimedia resource, and then step 414 is executed.

[0096] At step 414, in response to determining that the identification of the target multimedia resource is contained in the global resource mapping table, the found storage path is taken as the storage path of the target multimedia resource, and then step 418 is executed.

[0097] At step 416, in response to determining that the identification of the target multimedia resource is not contained in the global resource mapping table, the storage path of the target multimedia resource is determined based on the information of the target multimedia resource, and then step 418 is executed.

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

[0099] The specific implementation method of each step shown above can refer to the foregoing embodiments, which will not be repeated here. Figure 4

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

[0101] In actual application, the above multimedia resource loading method can be applied to the skin changing scene of the client application. Through this method, the skin configuration can be flexibly performed, and the skin of the client application or each page can be quickly replaced, thereby greatly meeting the skin changing needs of users.

[0102] In addition, even in the case where the identification of the target multimedia resource is not contained in the resource mapping table corresponding to the target page and the resource mapping table corresponding to the target application, 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 loading, effectively avoiding the case where the target multimedia resource fails to be loaded.

[0103] It should be noted that the method of the embodiment of the disclosure can be executed by a single device, such as a computer or a server. The method of the embodiment can also be applied to a distributed scenario and completed by multiple devices in cooperation. In the case of such a distributed scenario, one of the multiple devices can only execute one or more steps in the method of the embodiment of the disclosure, and the multiple devices will interact with each other to complete the method.

[0104] ​It should be noted that the above describes some embodiments of the present disclosure. Other embodiments are within the scope of the appended claims. In some cases, the acts or steps recited in the claims can be performed in a different order than those described above and still achieve desirable results. In addition, the processes depicted in the figures do not necessarily require the particular order shown, or sequential order to achieve the desired results. In certain implementations, multitasking and parallel processing can be advantageous.

[0105] Corresponding to the above method, the embodiments of the present disclosure also disclose a multimedia resource loading device. Figure 5 The internal structure of the device described in the embodiments of the present disclosure is shown. As shown in the figure, Figure 5 The device can include:

[0106] 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 of requesting to display the target page.

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

[0108] The analysis module 520 is configured to acquire an identifier of a target multimedia resource to be loaded on the target page.

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

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

[0111] The specific implementation of each module can refer to the foregoing method and the accompanying drawings, which will not be repeated here. For the convenience of description, the above device is described in various modules based on functions. Of course, in the implementation of the present disclosure, the functions of each module can be implemented in the same or multiple software and / or hardware.

[0112] The device of the above embodiments is used to implement the corresponding multimedia resource loading method in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0113] Based on the same inventive concept, corresponding to any of the above embodiment methods, the present disclosure also 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 executes the program to implement the multimedia resource loading method of any one of the above embodiments.

[0114] Figure 6 A more specific electronic device hardware structure diagram provided by the embodiment is shown, which can 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 connected through the bus 2050 for communication between each other within the device.

[0115] The processor 2010 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits, etc., for executing related programs to implement the technical solutions provided by the embodiments of the present specification.

[0116] The memory 2020 can be implemented by a ROM (Read Only Memory), a RAM (Random Access Memory), a static storage device, a dynamic storage device, etc. The memory 2020 can store an operating system and other application programs, and when the technical solutions provided by the embodiments of the present specification are implemented by software or firmware, the related program codes are stored in the memory 2020 and called and executed by the processor 2010.

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

[0118] The communication interface 2040 is used to connect a communication module (not shown in the figure) to realize the communication interaction between the device and other devices. The communication module can realize communication through a wired manner (such as USB, network cable, etc.) or through a wireless manner (such as mobile network, WIFI, Bluetooth, etc.).

[0119] The bus 2050 includes a channel to transmit information between various components (such as the processor 2010, the memory 2020, the input / output interface 2030, and the communication interface 2040) of the device.

[0120] 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, but in the specific implementation process, the device can also include other components necessary for normal operation. In addition, those skilled in the art can understand that the above device can also only contain the components necessary to implement the embodiments of the present disclosure, and does not necessarily contain all the components shown in the figure.

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

[0122] Based on the same inventive concept, the disclosure also provides a non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform the multimedia resource loading method of any of the above embodiments.

[0123] The computer-readable medium of the present embodiment includes permanent and non-permanent, removable and non-removable media, which can be implemented by any method or technology to store information. 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 technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible by a computing device.

[0124] The computer instructions stored in the storage medium of the above embodiment are used to cause the computer to perform the task processing method of any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which are not described here.

[0125] Those skilled in the art should understand that the discussion of any of the above embodiments is only exemplary and is not intended to imply that the scope of the present disclosure (including claims) is limited to these examples; under the idea of the present disclosure, the above embodiments or technical features in different embodiments can also be combined, the steps can be implemented in any order, and there are many other changes of different aspects of the embodiments of the present disclosure as described above. In order to be brief, they are not provided in detail.

[0126] Additionally, to simplify the description and discussion, and so as not to obscure the embodiments of the disclosure with details that are well known to those skilled in the art, some conventional attributes of integrated circuit (IC) chips and other components can or can not be shown in the drawings or discussed below. Furthermore, devices can be shown in block diagram form in order to avoid obscuring the embodiments of the disclosure, and this also acknowledges the fact that the details in regard to how such block devices are implemented are highly dependent on the platform within which an embodiment of the disclosure is being implemented (i.e., such details should be completely evident to those skilled in the art). Where specific details are set forth in order to describe an illustrative embodiment of the disclosure, it will be apparent to one skilled in the art that the embodiment of the disclosure can be practiced without, or with variations of, these specific details. Thus, the description is to be considered as illustrative and not restrictive, and the scope of the disclosure is to be determined not with the assistance of the foregoing description alone.

[0127] While the disclosure has been described in connection with specific embodiments thereof, many alternatives, modifications and variations will be apparent to those skilled in the art in light of the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) can use the embodiments discussed.

[0128] Embodiments of the disclosure are intended to cover all such alternatives, modifications and variations as falling within the scope of the appended claims. Accordingly, any omission, modification, equivalent replacement, improvement, etc. made within the spirit and principle of the embodiments of the disclosure should be included in the protection scope of the disclosure.

Claims

1. A method for loading multimedia resources, comprising: In response to a triggering operation that requests to display a target page, obtain the resource mapping table corresponding to the target page; Determine the identifier of the target multimedia resource to be loaded on the target page; 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; as well as The target multimedia resource is obtained and loaded based on its storage path; wherein, The identifier for determining the target multimedia resource to be loaded on the target page includes: Retrieve application data corresponding to the target page; Obtain information about the multimedia resources to be loaded on the target page from the application data; In response to determining that the information of the multimedia resource is of type string, the information of the multimedia resource is used as the identifier of the target multimedia resource; and In response to determining that the information of the multimedia resource is not of type string, a pre-defined system method is invoked based on the information of the multimedia resource to obtain the identifier of the target multimedia resource.

2. The multimedia resource loading method according to claim 1, wherein, The target page is the target page of the target application; The step of obtaining the resource mapping table corresponding to the target page includes: The resource mapping table corresponding to the target page is obtained from the server through the application programming interface corresponding to the target page. or Obtain the storage path of the resource mapping table corresponding to the target page from the configuration information of the target application, and obtain the resource mapping table corresponding to the target page 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, The step of determining the storage path of the target multimedia resource based on its identifier and according to the resource mapping table corresponding to the target page includes: Using the identifier of the target multimedia resource as an index, the resource mapping table corresponding to the target page is retrieved to find the storage path corresponding to the identifier of the target multimedia resource; and The found storage path will be used as the storage path for the target multimedia resource.

4. The multimedia resource loading method according to claim 3, wherein, The target page is the target page of the target application; The step of determining the storage path of the target multimedia resource based on its identifier 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, Obtain the cached global resource mapping table corresponding to the target application; Using the identifier of the target multimedia resource as an index, the global resource mapping table is searched to find the storage path corresponding to the identifier of the target multimedia resource; and The found storage path will be used as the storage path for the target multimedia resource.

5. The multimedia resource loading method according to claim 4, wherein, The step of determining the storage path of the target multimedia resource based on its identifier 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, the type of information of the multimedia resource is determined; In response to determining that the information of the multimedia resource is of type string, the information of the multimedia resource is used 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, a pre-set system method is invoked based on the information of the multimedia resource to obtain the storage path of the target multimedia resource.

6. The multimedia resource loading method according to claim 4, wherein, Further includes: In response to determining that a request to access the target application has been received, the global resource mapping table corresponding to the target application is obtained; as well as Cache the global resource mapping table corresponding to the target application.

7. The multimedia resource loading method according to claim 4, wherein, Further includes: In response to determining that a request to access the target application has been received, an update package of the global resource mapping table corresponding to the target application is obtained; as well as The cached global resource mapping table corresponding to the target application is updated based on the update package obtained from the global resource mapping table corresponding to the target application.

8. The multimedia resource loading method according to claim 1, wherein, The step of obtaining and loading the target multimedia resource based on its storage path includes: In response to determining that the storage path of the target multimedia resource is a local path, the target multimedia resource is loaded based on the local path; In response to determining that the storage path of the target multimedia resource is a network path, the system determines whether the local storage has cached the multimedia resource corresponding to the network path based on the network path. In response to determining that a local multimedia resource corresponding to the network path is cached, the locally cached multimedia resource corresponding to the network path is loaded; and In response to determining that the local system does not cache the multimedia resource corresponding to the network path, the multimedia resource is downloaded based on the network path, and the downloaded multimedia resource is loaded.

9. A multimedia resource loading device, comprising: The resource mapping table acquisition module is used to acquire the resource mapping table corresponding to the target page in response to a trigger operation that requests to display the target page. The parsing module is used to obtain the identifier of the target multimedia resource to be loaded on the target page; The storage path determination module is used 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 A loading module is used to obtain and load the target multimedia resource based on its storage path; wherein, The identifier of the target multimedia resource to be loaded on the target page includes: Retrieve application data corresponding to the target page; Obtain information about the multimedia resources to be loaded on the target page from the application data; In response to determining that the information of the multimedia resource is of type string, the information of the multimedia resource is used as the identifier of the target multimedia resource; and In response to determining that the information of the multimedia resource is not of type string, a pre-defined system method is invoked based on the information of the multimedia resource to obtain the identifier of the target multimedia resource.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the multimedia resource loading method as described in any one of claims 1-8.

11. A non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the multimedia resource loading method according to any one of claims 1-8.

12. A computer program product comprising computer program instructions that, when executed on a computer, cause the computer to perform the multimedia resource loading method as described in any one of claims 1-8.

Citation Information

Patent Citations

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

    CN116204749A