WO2025002136A1 - 多媒体资源加载方法及相关设备 - Google Patents

多媒体资源加载方法及相关设备 Download PDF

Info

Publication number
WO2025002136A1
WO2025002136A1 PCT/CN2024/101436 CN2024101436W WO2025002136A1 WO 2025002136 A1 WO2025002136 A1 WO 2025002136A1 CN 2024101436 W CN2024101436 W CN 2024101436W WO 2025002136 A1 WO2025002136 A1 WO 2025002136A1
Authority
WO
WIPO (PCT)
Prior art keywords
target
multimedia resource
resource
mapping table
storage path
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2024/101436
Other languages
English (en)
French (fr)
Inventor
叶阳天
骆煜
李浩民
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Zitiao Network Technology Co Ltd
Original Assignee
Beijing Zitiao Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Zitiao Network Technology Co Ltd filed Critical Beijing Zitiao Network Technology Co Ltd
Publication of WO2025002136A1 publication Critical patent/WO2025002136A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/40Information retrieval; Database structures therefor; File system structures therefor of multimedia data, e.g. slideshows comprising image and additional audio data
    • G06F16/43Querying
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/40Information retrieval; Database structures therefor; File system structures therefor of multimedia data, e.g. slideshows comprising image and additional audio data
    • G06F16/44Browsing; Visualisation therefor
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching

Definitions

  • 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.
  • the multimedia resources loaded in the client application may include local multimedia resources and network multimedia resources.
  • 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 by 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.
  • the client can usually access and load them through their corresponding local paths.
  • the client can usually access, download and load them through their corresponding Uniform Resource Locator (URL).
  • URL Uniform Resource Locator
  • 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.
  • the storage path corresponding to the multimedia resource that needs to be loaded is usually pre-configured in the client application data packet.
  • the storage path of the multimedia resource that needs 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 use an additional multimedia resource distribution process to directly replace the local multimedia resource originally stored in the client with the new multimedia resource, or you need
  • the storage path of a multimedia resource loaded by the client application needs to be modified by upgrading the version of the client application. It can be seen that no matter which multimedia resource replacement method is used, it brings great inconvenience to the use of the client application and also affects the user experience.
  • an embodiment of the present disclosure provides a multimedia resource loading method.
  • 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 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 media resource based on the storage path of the target multimedia resource.
  • the target page is a target page of a 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 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.
  • 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.
  • 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 includes: using the identifier 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 identifier of the target multimedia resource; and using the found storage path as the storage path of the target multimedia resource.
  • the target page is a target page of a target application; the target multimedia resource is identified based on the resource mapping table corresponding to the target page.
  • the storage path of the target multimedia resource 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.
  • 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.
  • the method further includes: in response to determining that a request to access the target application is received, acquiring a global resource mapping table corresponding to the target application; and caching the global resource mapping table corresponding to the target application.
  • 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.
  • 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.
  • an embodiment of the present disclosure provides a multimedia resource loading device, which may include:
  • 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;
  • the loading module is used to acquire and load the target media resource based on the storage path of the target multimedia resource.
  • 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.
  • 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.
  • An embodiment of the present disclosure further provides a computer program product, including computer program instructions.
  • the computer program instructions When the computer program instructions are executed on a computer, the computer executes the above-mentioned multimedia resource loading method.
  • 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.
  • 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 based on the storage path and loaded.
  • FIG. 1 shows an implementation flow of a multimedia resource loading method according to some embodiments of the present disclosure.
  • FIG. 2 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.
  • FIG. 3 shows the method for determining the resource mapping table corresponding to the target page according to some embodiments of the present disclosure.
  • FIG. 4 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.
  • FIG. 5 shows the internal structure of a multimedia resource loading device according to some embodiments of the present disclosure.
  • FIG6 shows a more specific schematic diagram of the hardware structure of an electronic device according to some embodiments of the present disclosure.
  • a prompt message is sent to the user to clearly remind the user that the operation requested to be performed will require obtaining and using the user's personal information.
  • the user can independently choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.
  • the prompt information in response to receiving the user's active request, 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.
  • the pop-up window may also carry a selection control for the user to choose "agree” or “disagree” to provide personal information to the electronic device.
  • some embodiments of the present disclosure provide a multimedia resource loading method, which can quickly complete the configuration of multimedia resources without changing the client application data, and 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.
  • 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.
  • the above-mentioned client can be configured in a computer, a tablet computer, a mobile terminal or other smart device.
  • Fig. 1 shows the implementation process of the multimedia resource loading method described in some embodiments of the present disclosure. As shown in Fig. 1, the multimedia resource loading method described in the embodiments of the present disclosure may include the following steps.
  • 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.
  • the target page is a target page of a target application.
  • the trigger operation of requesting to display the target page can usually be an operation performed when a user chooses to open or access a target page in a target application through a client.
  • 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 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 local multimedia resource, the storage path generally refers to the local path for storing the local multimedia resource. If the resource is a network multimedia resource, the storage path generally refers to the URL storing the network multimedia resource.
  • the acquisition of the resource mapping table corresponding to the target page described in step 102 may specifically include: acquiring the resource mapping table corresponding to the target page from the server through the application program interface corresponding to the target page.
  • the client application may be pre-configured with an application program interface corresponding to each page. The client may pull the resource mapping table corresponding to each page from the server through the application program interface configured for each page.
  • the acquisition of the resource mapping table corresponding to the target page described in the above step 102 may include: acquiring the storage path of the resource mapping table corresponding to the target page from the configuration information of the target application, and acquiring the resource mapping table corresponding to the target page from the above storage path.
  • 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.
  • 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.
  • 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.
  • 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, and 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.
  • step 104 the identifier of the target multimedia resource to be loaded on the target page is determined.
  • the implementation process of the method for determining the identifier of the target multimedia resource to be loaded on the target page described in step 104 may be as shown in FIG2.
  • the method shown in FIG2 may include the following steps:
  • step 202 application data corresponding to the target page is obtained.
  • the application data corresponding to the 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. These data define the content and format of the target page.
  • the application data of each page contained in the client application is stored locally on the client.
  • the client can usually first obtain application data corresponding to the target page, then obtain the target page by loading the above application data, and display it to the user.
  • step 204 information about the multimedia resources to be loaded on the target page is obtained from the application data.
  • the application data corresponding to the target page will contain information of one or more multimedia resources to be loaded on the target page.
  • the multimedia resource information may be a name of the multimedia resource.
  • the client and the server use the name of the multimedia resource to jointly identify a multimedia resource.
  • the information of the above-mentioned 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.
  • the client 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.
  • 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 may be directly read and obtained.
  • 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.
  • the information of the multimedia resource can be the name of the multimedia resource or the storage path.
  • the type of the multimedia information is usually a string type.
  • the information of the multimedia resource can also be a serial number corresponding to the multimedia resource.
  • the type of the multimedia information is usually an integer type, not a string type.
  • the processing methods for information of different types of multimedia resources are different.
  • 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.
  • step 208 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.
  • a pre-set system method can be called based on the multimedia resource information, and the result of calling the system method is used as the identifier of the target multimedia resource. For example, by calling a 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 used as the identifier of the above target multimedia resource.
  • 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.
  • the client can still complete the loading of the target multimedia resource based on the default value for loading the target multimedia resource when the identifier of the target multimedia resource is not found 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 will be omitted here for the time being.
  • 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.
  • determining the storage path of the target multimedia resource according to 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.
  • the resource mapping table corresponding to the target page stores the target multiple The mapping relationship between the identifier of the media resource and its storage path
  • 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.
  • step 108 the target media resource is acquired and loaded based on the storage path of the target multimedia resource.
  • the storage path of the target multimedia resource may generally be a local path or URL storing the target multimedia resource.
  • the client may directly obtain and load the target media resource based on the local path or URL storing the target multimedia resource.
  • the acquisition and loading of the target media resource based on the storage path of the target multimedia resource described in the above 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 above 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 above network path has been cached locally based on the above network path; in response to determining that the multimedia resource corresponding to the above network path has been cached locally, loading the locally cached multimedia resource corresponding to the above network path; in response to determining that the multimedia resource corresponding to the above network path has not been cached locally, downloading the multimedia resource based on the above network path, and loading the downloaded multimedia resource.
  • 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.
  • the above steps 104-108 can be repeatedly performed for other target multimedia resources to be loaded to complete the loading of the target multimedia resources one by one.
  • the above-mentioned method for loading multimedia resources 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.
  • 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 based on the storage path and loaded.
  • the resource mapping table records the multimedia resources on the page and their corresponding storage paths, and the multimedia resources are preferentially loaded when loading.
  • the multimedia resources are first loaded according to the storage path recorded in the resource mapping table.
  • the resource mapping table can be sent to the user to achieve the replacement of the multimedia resource to be loaded on the target page without making changes to the client application data, that is, there is no need to update the client application, and there is no need to go through an additional multimedia resource sending process to replace the local multimedia resources, which can greatly facilitate the use of the client application, improve the flexibility and development efficiency of the client application, and there is no need to re-issue the version due to the replacement of the multimedia resources, and at the same time can also improve the user experience.
  • the server side 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.
  • the global resource mapping table corresponding to the target application may be downloaded and cached from the server side each time the target application is accessed.
  • the multimedia resource loading method may further include: in response to determining that a request to access 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.
  • the request to access the target application may generally refer to a trigger operation for a user to open the target application.
  • the client can also use incremental update 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.
  • 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.
  • 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.
  • the implementation process of determining the storage path of the target multimedia resource according to the resource mapping table corresponding to the target page described in step 106 may be shown in FIG. 3 , including the following steps.
  • 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.
  • step 304 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.
  • step 306 in response to determining that the resource mapping table corresponding to the target page does not contain 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.
  • 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.
  • 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.
  • 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.
  • the mapping relationship stored in the resource mapping table corresponding to the page is only valid within the page; while the mapping relationship stored in the global resource mapping table is valid in 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).
  • the configuration of multimedia resources in the target application is made more flexible, and even partial replacement of multimedia resources can be achieved.
  • 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.
  • the multimedia resource A is recorded corresponding to URL 1 in the global resource mapping table corresponding to the target application, in the resource mapping table corresponding to page 1, and in the resource mapping table corresponding to page 2, while the multimedia resource A is not recorded in the resource mapping tables corresponding to other pages.
  • the multimedia resource of URL 1 will be read and loaded.
  • you want to replace multimedia resource A on page 1 with multimedia resource B (whose storage path is URL 2), and you 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, without modifying the application data corresponding to page 1 and page 2.
  • the client will now obtain the resource mapping table corresponding to page 1, in which the storage path corresponding to multimedia resource A is URL 2.
  • multimedia resource B when loading multimedia resource A, multimedia resource B will be read and loaded from URL 2. That is to say, 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 in URL 2.
  • the client if the user requests to display page 2 of the target application, the client will now 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 multimedia resource A is loaded, multimedia resource C will be read and loaded from URL 3.
  • 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 other pages does not contain 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 multimedia resource A is loaded, multimedia resource A will be read and loaded from URL 1.
  • the storage path of the target multimedia resource can be further determined based on the information of the target multimedia resource.
  • the method shown in FIG. 3 can further include the following steps 312-316.
  • step 312 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 target multimedia resource is determined.
  • 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.
  • step 314 in response to determining that the type of the target multimedia resource information is a string type, it can be basically determined that the target multimedia resource information is the storage path of the target multimedia resource. At this time, the target multimedia resource information can be directly used as the storage path of the target multimedia resource.
  • 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.
  • 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.
  • 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 default value of the target multimedia resource loading, and read and load the target multimedia resource according to the storage path. This effectively avoids the situation where the target multimedia resource fails to load when the resource mapping table of the page and the global resource mapping table do not configure a certain multimedia resource.
  • Figure 4 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. As shown in Figure 4, the method may include the following steps.
  • step 402 a resource mapping table corresponding to the target page is obtained.
  • 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.
  • 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.
  • 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.
  • step 410 in response to determining that the resource mapping table corresponding to the target page does not contain 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.
  • 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.
  • 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.
  • 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.
  • step 418 the target multimedia resource is acquired and loaded based on the storage path of the target multimedia resource.
  • 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.
  • the above multimedia resource loading method can be applied to the skinning scenario of client applications.
  • 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.
  • 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 loading of the target multimedia resource fails.
  • the method of the embodiment of the present disclosure can be performed by a single device, such as a computer or a server.
  • the method of the present embodiment can also be applied in a distributed scenario and completed by multiple devices cooperating with each other.
  • one of the multiple devices can only perform one or more steps in the method of the embodiment of the present disclosure, and the multiple devices will interact with each other to complete the described method.
  • FIG5 shows the internal structure of the device described in the embodiment of the present disclosure.
  • the device may include:
  • the resource mapping table acquisition module 510 is used to acquire the resource mapping table corresponding to the target page in response to a trigger operation requesting to display the target page.
  • 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 parsing module 520 is used to obtain the identifier of the target multimedia resource to be loaded on the target page.
  • the storage path determination module 530 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.
  • the loading module 540 is used to acquire and load the target media resource based on the storage path of the target multimedia resource.
  • each of the above modules can refer to the above methods and drawings, and will not be repeated here.
  • the above device is described by function and is divided into various modules and described separately.
  • the functions of each module can be implemented in the same or multiple software and/or hardware.
  • the device of the above embodiment is used to implement the corresponding multimedia resource loading method in any of the above embodiments.
  • the method has the beneficial effects of the corresponding method embodiments, which will not be described in detail here.
  • 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 when the processor executes the program, the multimedia resource loading method described in any of the above embodiments is implemented.
  • FIG. 6 shows a more specific schematic diagram of the hardware structure of an electronic device provided in this embodiment, and 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 connected to each other in communication within the device through the bus 2050.
  • Processor 2010 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, etc., to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.
  • a general-purpose CPU Central Processing Unit
  • ASIC application-specific integrated circuit
  • the memory 2020 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc.
  • the memory 2020 may store an operating system and other application programs.
  • the relevant program codes are stored in the memory 2020 and are called and executed by the processor 2010.
  • the input/output interface 2030 is used to connect the input/output module to realize information input and output.
  • the input/output module can be configured as a component in the device (not shown in the figure), or it can be externally connected to the device to provide corresponding functions.
  • the input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc.
  • the output device may include a display, a speaker, a vibrator, an indicator light, etc.
  • the communication interface 2040 is used to connect a communication module (not shown) to realize communication interaction between the device and other devices.
  • the communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).
  • the bus 2050 includes a path that transmits 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).
  • 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 the specific implementation process, the device may also include other components necessary for normal operation. It is understandable that the above-mentioned device may only include components necessary to implement the embodiments of this specification, and does not necessarily include all the components shown in the figure.
  • 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.
  • 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.
  • the computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology.
  • Information can be computer-readable instructions, data structures, modules of programs, 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 disk read-only memory (CD-ROM), digital versatile disk (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.
  • PRAM phase change memory
  • SRAM static random access memory
  • DRAM dynamic random access memory
  • RAM random access memory
  • ROM read-only memory
  • EEPROM electrically erasable programmable
  • the computer instructions stored in the storage medium of the above embodiments 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.
  • DRAM dynamic RAM

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Stored Programmes (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本公开提供一种多媒体资源加载方法,包括:响应于请求显示目标页面的触发操作,获取所述目标页面对应的资源映射表;确定所述目标页面上待加载的目标多媒体资源的标识;基于所述目标多媒体资源的标识,根据所述目标页面对应的资源映射表确定所述目标多媒体资源的存储路径;以及基于所述目标多媒体资源的存储路径获取并加载所述目标媒体资源。基于上述多媒体资源加载方法,本公开还提供了多媒体资源加载装置、电子设备、存储介质以及程序产品。

Description

多媒体资源加载方法及相关设备
本申请要求于2023年06月27日提交中国国家知识产权局、申请号为202310774295.7、发明名称为“多媒体资源加载方法及相关设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本公开涉及互联网技术领域,尤其涉及一种多媒体资源加载方法、多媒体资源加载装置、电子设备、存储介质及程序产品。
背景技术
随着移动互联网技术的发展,各种类型的客户端应用越来越普及。而且,为了给用户带来更丰富的视觉体验,客户端应用的使用过程中,通常需要在客户端完成图片、声音或者视频等多媒体内容的加载,以为用户呈现多种多样的页面。
通常情况下,上述在客户端应用中加载的多媒体资源可以包括本地多媒体资源和网络多媒体资源两种。其中,本地多媒体资源通常是指在客户端应用的安装更新过程中或者通过其他方式预先下载并存储到客户端本地的多媒体资源;而网络多媒体资源一般是指存储在网络侧的需要客户端在加载过程中下载的多媒体资源。对于本地多媒体资源,客户端通常可以通过其对应的本地路径进行访问并加载。而对于网络多媒体资源,客户端通常可以通过其对应的统一资源定位符(Uniform Resource Locator,URL)进行访问、下载以及加载。在本公开中,为了描述上的方便,将本地多媒体资源对应的本地路径以及网络多媒体资源对应的URL统称为多媒体资源的存储路径。
可以理解,无论是本地多媒体资源还是网络多媒体资源,在客户端应用中,需要加载的多媒体资源对应的存储路径通常都是预先配置在客户端应用数据包中的。也就是说,需要客户端应用加载的多媒体资源的存储路径通常是预先配置且固定的。因此,如果想要在客户端应用的使用过程中替换掉其中某个页面上的某个多媒体资源,则通常需要通过额外的多媒体资源下发过程用新的多媒体资源直接替换客户端原来存储的本地多媒体资源,或者则需 要通过升级客户端应用的版本的方式来修改客户端应用加载的某个多媒体资源的存储路径。可见,无论是哪一种多媒体资源的替换方式给客户端应用的使用都带来的极大地不便,同时也影响了用户的使用体验。
发明内容
有鉴于此,本公开的实施例提供一种多媒体资源加载方法。
根据本公开的一些实施例,上述多媒体资源加载方法可以包括:响应于请求显示目标页面的触发操作,获取所述目标页面对应的资源映射表;确定所述目标页面上待加载的目标多媒体资源的标识;基于所述目标多媒体资源的标识,根据所述目标页面对应的资源映射表确定所述目标多媒体资源的存储路径;以及基于所述目标多媒体资源的存储路径获取并加载所述目标媒体资源。
在本公开的实施例中,所述目标页面为目标应用的目标页面;上述获取所述目标页面对应的资源映射表包括:通过所述目标页面对应的应用程序接口从服务器端获取所述目标页面对应的资源映射表;或者从所述目标应用的配置信息中获取所述目标页面对应的资源映射表的存储路径,并从所述存储路径获取所述目标页面对应的资源映射表。
在本公开的实施例中,上述确定所述目标页面上待加载的目标多媒体资源的标识包括:获取目标页面对应的应用数据;从所述应用数据中获取所述目标页面上待加载的多媒体资源的信息;响应于确定所述多媒体资源的信息的类型为字符串类型,将所述多媒体资源的信息作为所述目标多媒体资源的标识;以及响应于确定所述多媒体资源的信息的类型不为字符串类型,基于所述多媒体资源的信息调用预先设定的系统方法,获取所述目标多媒体资源的标识。
在本公开的实施例中,上述基于所述目标多媒体资源的标识,根据所述目标页面对应的资源映射表确定所述目标多媒体资源的存储路径包括:将所述目标多媒体资源的标识作为索引,检索所述目标页面对应的资源映射表,查找与所述目标多媒体资源的标识对应的存储路径;以及将查找到的存储路径作为所述目标多媒体资源的存储路径。
在本公开的实施例中,所述目标页面为目标应用的目标页面;上述基于所述目标多媒体资源的标识,根据所述目标页面对应的资源映射表确定所述 目标多媒体资源的存储路径进一步包括:响应于确定所述目标页面对应的资源映射表中不包含所述目标多媒体资源的标识,获取缓存的所述目标应用对应的全局资源映射表;将所述目标多媒体资源的标识作为索引,检索所述全局资源映射表,查找与所述目标多媒体资源的标识对应的存储路径;以及将查找到的存储路径作为所述目标多媒体资源的存储路径。
在本公开的实施例中,上述基于所述目标多媒体资源的标识,根据所述目标页面对应的资源映射表确定所述目标多媒体资源的存储路径进一步包括:响应于确定所述全局资源映射表中不包含所述目标多媒体资源的标识,确定所述多媒体资源的信息的类型;响应于确定所述多媒体资源的信息的类型为字符串类型,将所述多媒体资源的信息作为所述目标多媒体资源的存储路径;以及响应于确定所述目标多媒体资源的信息的类型不为字符串类型,基于所述多媒体资源的信息调用预先设定的系统方法,获取所述目标多媒体资源的存储路径。
在本公开的实施例中,上述方法进一步包括:响应于确定接收到访问所述目标应用的请求,获取所述目标应用对应的全局资源映射表;以及缓存所述目标应用对应的全局资源映射表。
在本公开的实施例中,上述方法进一步包括:响应于确定接收到访问所述目标应用的请求,获取所述目标应用对应的全局资源映射表的更新包;以及基于获取的全局资源映射表的更新包更新已缓存的所述目标应用对应的全局资源映射表。
在本公开的实施例中,上述基于所述目标多媒体资源的存储路径获取并加载所述目标媒体资源包括:响应于确定所述目标多媒体资源的存储路径为本地路径,基于所述本地路径加载所述目标媒体资源;响应于确定所述目标多媒体资源的存储路径为网络路径,基于所述网络路径确定本地是否已缓存与所述网络路径对应的多媒体资源;响应于确定本地已缓存与所述网络路径对应的多媒体资源,加载本地缓存的与所述网络路径对应的多媒体资源;响应于确定本地未缓存与所述网络路径对应的多媒体资源,基于所述网络路径下载所述多媒体资源,并加载下载的多媒体资源。
基于上述方法,本公开的实施例提供了一种多媒体资源加载装置,该多媒体资源加载装置可以包括:
资源映射表获取模块,用于响应于请求显示目标页面的触发操作,获取所述目标页面对应的资源映射表;
解析模块,用于获取所述目标页面上待加载的目标多媒体资源的标识;
存储路径确定模块,用于基于所述目标多媒体资源的标识,根据所述目标页面对应的资源映射表确定所述目标多媒体资源的存储路径;以及
加载模块,用于基于所述目标多媒体资源的存储路径获取并加载所述目标媒体资源。
此外,本公开的实施例还提供了一种电子设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现上述多媒体资源加载方法。
本公开的实施例还提供了一种非暂态计算机可读存储介质,所述非暂态计算机可读存储介质存储计算机指令,所述计算机指令用于使计算机执行上述多媒体资源加载方法。
本公开的实施例还提供了一种计算机程序产品,包括计算机程序指令,当所述计算机程序指令在计算机上运行时,使得计算机执行上述多媒体资源加载方法。
上述多媒体资源加载方法以及相关设备通过获取用于存储目标页面所包含的至少一个多媒体资源的标识及其存储路径之间的映射关系的资源映射表,在加载目标页面上的目标多媒体资源时,可以通过上述资源映射表直接获得目标多媒体资源的存储路径,进而基于该存储路径获取相应的多媒体资源并进行加载。
附图说明
为了更清楚地说明本公开或相关技术中的技术方案,下面将对实施例或相关技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本公开的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1显示了本公开一些实施例所述的多媒体资源加载方法的实现流程。
图2显示了本公开一些实施例所述的确定目标页面上待加载的目标多媒体资源的标识的方法的实现流程。
图3显示了本公开一些实施例所述的根据目标页面对应的资源映射表确 定目标多媒体资源的存储路径的实现流程。
图4显示了本公开一些实施例所述的在用户请求显示目标应用的目标页面时多媒体资源的加载方法的一个具体实现流程。
图5显示了本公开一些实施例所述的多媒体资源加载装置的内部结构。
图6示出了本公开一些实施例所述的一种更为具体的电子设备硬件结构示意图。
具体实施方式
为使本公开的目的、技术方案和优点更加清楚明白,以下结合具体实施例,并参照附图,对本公开进一步详细说明。
需要说明的是,除非另外定义,本公开实施例使用的技术术语或者科学术语应当为本公开所属领域内具有一般技能的人士所理解的通常意义。本公开实施例中使用的“第一”、“第二”以及类似的词语并不表示任何顺序、数量或者重要性,而只是用来区分不同的组成部分。“包括”或者“包含”等类似的词语意指出现该词前面的元件或者物件涵盖出现在该词后面列举的元件或者物件及其等同,而不排除其他元件或者物件。“连接”或者“相连”等类似的词语并非限定于物理的或者机械的连接,而是可以包括电性的连接,不管是直接的还是间接的。“上”、“下”、“左”、“右”等仅用于表示相对位置关系,当被描述对象的绝对位置改变后,则该相对位置关系也可能相应地改变。
可以理解的是,在使用本公开中各个实施例的技术方案之前,均会通过恰当的方式对所涉及的个人信息的类型、使用范围、使用场景等告知用户,并获得用户的授权。
例如,在响应于接收到用户的主动请求时,向用户发送提示信息,以明确的提示用户,其请求执行的操作将需要获取和使用到用户的个人信息。从而,使得用户可以根据提示信息来自主的选择是否向执行本公开技术方案的操作的电子设备、应用程序、服务器或存储介质等软件或硬件提供个人信息。
作为一种可选的但非限定的实现方式,响应于接受到用户的主动请求,向用户发送提示信息的方式例如可以是弹窗的方式,弹窗中可以以文字的方式呈现提示信息。此外,弹窗中还可以承载供用户选择“同意”或者“不同意”向电子设备提供个人信息的选择控件。
可以理解的是,上述通知和获取用户授权过程仅是示意性的,不对本公 开的实现方式构成限定,其他满足相关法律法规的方式也可应用于本公开的实现方式中。
如前所述,在当前的客户端应用的使用过程中,如果想要替换某个页面上的某个多媒体资源,通常需要通过额外的多媒体资源下发过程将新的多媒体资源下发给客户端用以替换原来的本地多媒体资源,或者需要通过升级客户端应用的版本的方式来修改某个多媒体资源对应的存储路径。很明显,无论是哪一种多媒体资源的替换方式给客户端应用的使用都带来的极大地不便和负担,同时也影响了用户的使用体验。
为此,本公开的一些实施例给出了一种多媒体资源加载方法,可以在不改变客户端应用数据的基础之上快速完成多媒体资源的配置,既不需要额外的多媒体资源下发过程,也不需要对客户端应用进行版本升级即可实现多媒体资源的快速替换,从而极大地方便了客户端应用的使用,提高了客户端应用的灵活性以及开发效率,同时也提升了用户的使用体验。在本公开的实施例中,上述多媒体资源加载方法是由客户端执行的。上述客户端通常包括具有数据信息处理能力的硬件设备和/或驱动该硬件设备工作所需必要的软件。可选的,上述客户端可以配置在计算机、平板电脑、移动终端或者他智能设备中。
图1显示了本公开一些实施例所述的多媒体资源加载方法的实现流程。如图1所示,本公开实施例所述的多媒体资源加载方法可以包括如下步骤。
在步骤102,响应于请求显示目标页面的触发操作,获取目标页面对应的资源映射表。
在本公开的实施例中,上述目标页面是指目标应用的目标页面。此外,上述请求显示目标页面的触发操作通常可以是用户通过客户端选择打开或者访问某个目标应用中的某个目标页面时执行的操作。
在本公开的实施例中,上述目标页面对应的资源映射表用于存储上述目标页面所包含的至少一个多媒体资源的标识及其存储路径之间的映射关系。其中,上述多媒体资源的标识通常是指可以标识多媒体资源的一个字符串,例如,多媒体资源的名称等。上述多媒体资源的存储路径是指存储上述多媒体资源的位置信息。通常,如果上述多媒体资源是本地多媒体资源,则上述存储路径通常是指存储上述本地多媒体资源的本地路径;而如果上述多媒体 资源是网络多媒体资源,则上述存储路径通常是指存储上述网络多媒体资源的URL。
具体地,在本公开的一些实施例中,上述步骤102所述的获取目标页面对应的资源映射表具体可以包括:通过目标页面对应的应用程序接口从服务器端获取目标页面对应的资源映射表。在本公开的一些实施例中,客户端应用对应每个页面均可预先配置有应用程序接口。客户端可以通过上述为每个页面配置的应用程序接口从服务器端分别拉取与各个页面对应的资源映射表。
在本公开的另一些实施例中,上述步骤102所述的获取目标页面对应的资源映射表可以包括:从目标应用的配置信息中获取目标页面对应的资源映射表的存储路径,并从上述存储路径获取目标页面对应的资源映射表。在本公开的一些实施例中,客户端应用并不会为各个页面配置应用程序接口,但是会在目标应用的配置信息中配置各个页面所对应资源映射表的存储路径。在这种情况下,客户端可以从目标应用的配置信息中获取目标页面对应的资源映射表的存储路径,进而获取目标页面对应的资源映射表。
如前所述,客户端应用的每个页面所对应的资源映射表中均存储了其对应页面所包含的至少一个多媒体资源的标识及其存储路径之间的映射关系。需要说明的是,某一个页面对应的资源映射表中存储的多媒体资源的标识可以是该页面上所包含的多媒体资源的一个子集。也就是说,某一个页面对应的资源映射表中不一定会存储其上全部的多媒体资源的标识与其存储路径之间的对应关系,可能也会存在页面上部分多媒体资源的标识没有记录在其对应资源映射表中的情况。
在步骤104,确定目标页面上待加载的目标多媒体资源的标识。
在本公开的实施例中,上述步骤104所述的确定目标页面上待加载的目标多媒体资源的标识的方法的实现流程可以如图2所示。图2所示的方法可以包括如下步骤:
在步骤202,获取目标页面对应的应用数据。
在本公开的一些实施例中,上述目标页面对应的应用数据通常可以是指用于加载目标页面所需的数据组成的集合,例如目标页面对应的配置信息等等。这些数据定义了目标页面的内容以及形式。通常情况下,在客户端应用安装后,客户端应用所包含各个页面的应用数据就已存储在客户端本地。在 用户使用客户端应用的过程中,如果用户请求显示某个目标页面,则客户端通常可以先获取这个目标页面对应的应用数据,然后通过加载上述应用数据的方式得到目标页面,并显示给用户。
在步骤204,从上述应用数据中获取目标页面上待加载的多媒体资源的信息。
可以理解,当目标页面上包含图片、声音或者视频等多媒体资源时,上述目标页面对应的应用数据中将包含目标页面上待加载的一个或多个多媒体资源的信息。
在本公开的一些实施例中,上述多媒体资源的信息可以是多媒体资源的名称。在这种情况下,客户端和服务器端使用多媒体资源的名称来共同标识一个多媒体资源。
在本公开的另一些实施例中,上述多媒体资源的信息还可以是为多媒体资源分配的唯一的序列号。通常情况下,这个序列号是客户端为多媒体资源分配的本地标识。在为某个多媒体资源分配了序列号之后,客户端还将记录该多媒体资源的本地路径和该多媒体资源的序列号之间的映射关系,并将建立的映射关系设定为一个系统方法。这样,客户端可以基于多媒体资源的序列号通过调用该预先设定的系统方法得到该多媒体资源的本地路径。具体地,在实际应用中,当客户端从目标页面的应用数据中获取到需要加载的多媒体资源的序列号后,可以基于该多媒体资源的序列号调用上述预先设定的系统方法,从而得到多媒体资源的本地路径。
在本公开的又一些实施例中,上述多媒体资源的信息还可以是多媒体资源的存储路径,例如,可以是多媒体资源的本地存储路径或者URL。这样,在获取了多媒体资源的信息之后可以直接读取获取该多媒体资源。
在步骤206,响应于确定上述多媒体资源的信息的类型为字符串类型,将上述多媒体资源的信息作为目标多媒体资源的标识。
如前所述,上述多媒体资源的信息可以是多媒体资源的名称或者存储路径,在这两种情况下,上述多媒体信息的类型通常为字符串类型的。此外,上述多媒体资源的信息还可以是多媒体资源对应的序列号,在这种情况下,上述多媒体信息的类型通常为整型的,而不是字符串类型的。在本公开的实施例中,对于不同类型的多媒体资源的信息的处理方式是不同的。
具体地,如果确定上述多媒体资源的信息的类型为字符串类型,也即上述多媒体资源的信息是多媒体资源的名称或者存储路径,则在上述步骤206,可以将上述多媒体资源的信息直接作为目标多媒体资源的标识,从而可以进行后续的查表操作。
在步骤208,响应于确定上述多媒体资源的信息的类型不为字符串类型,基于上述多媒体资源的信息调用预先设定的系统方法,获取目标多媒体资源的标识。
进一步地,如果确定上述多媒体资源的信息的类型不是字符串类型,也即上述多媒体资源的信息是多媒体资源对应的序列号,则在上述步骤208,可以基于上述多媒体资源的信息调用预先设定的系统方法,将系统方法的调用结果作为目标多媒体资源的标识。例如,通过调用预先设定的系统方法通常可以得到与多媒体资源的序列号对应的多媒体资源的本地路径。此时,可以将得到的本地路径作为上述目标多媒体资源的标识。
更进一步,为了避免出现在资源映射表中找不到目标多媒体资源的标识,从而导致无法加载多媒体资源的情况,也为了实现上的方便,在上述图2所示的确定目标页面上待加载的目标多媒体资源的标识的过程中,还可以进一步包括如下步骤:将上述多媒体资源的信息设置为目标多媒体资源的加载默认值。
在本公开的实施例中,通过将上述多媒体资源的信息设置为目标多媒体资源的加载默认值可以使得客户端在资源映射表中没有查找到目标多媒体资源的标识的情况下仍能基于目标多媒体资源的加载默认值完成目标多媒体资源的加载。具体的基于目标多媒体资源的加载默认值加载目标多媒体资源的程将在后文中详细描述,在此暂且略过。
在步骤106,基于上述目标多媒体资源的标识,根据上述目标页面对应的资源映射表确定上述目标多媒体资源的存储路径。
在本公开的实施例中,上述步骤106所述的根据目标页面对应的资源映射表确定目标多媒体资源的存储路径可以包括:将目标多媒体资源的标识作为索引,检索目标页面对应的资源映射表,查找与目标多媒体资源的标识对应的存储路径;以及将查找到的存储路径作为目标多媒体资源的存储路径。
从上述方法可以看出,如果目标页面对应的资源映射表中存储了目标多 媒体资源的标识及其存储路径的映射关系,则在上述步骤106,可以通过查询目标页面对应的资源映射表得到与目标多媒体资源的标识对应的目标多媒体资源的存储路径。
在步骤108,基于上述目标多媒体资源的存储路径获取并加载上述目标媒体资源。
在本公开的实施例中,在上述目标多媒体资源的存储路径是通过查询目标页面对应的资源映射表得到的,则上述存储路径通常可以是存储目标多媒体资源的本地路径或者URL。在这种情况下,客户端可以直接基于上述存储目标多媒体资源的本地路径或者URL获取并加载目标媒体资源。
具体地,在本公开的一些实施例中,上述步骤108所述的基于目标多媒体资源的存储路径获取并加载目标媒体资源可以包括:响应于确定目标多媒体资源的存储路径为本地路径,基于上述本地路径加载目标媒体资源;响应于确定目标多媒体资源的存储路径为网络路径,基于上述网络路径确定本地是否已缓存与上述网络路径对应的多媒体资源;响应于确定本地已缓存与上述网络路径对应的多媒体资源,加载本地缓存的与上述网络路径对应的多媒体资源;响应于确定本地未缓存与上述网络路径对应的多媒体资源,基于上述网络路径下载所述多媒体资源,并加载下载的多媒体资源。可以看出,在加载目标多媒体资源的过程中,对于网络多媒体资源,则在本地已经缓存了相应的目标多媒体资源的情况下,可以优先使用缓存的目标多媒体资源,而无需重复下载,从而可以提高多媒体资源的加载效率,降低加载时延,进一步提升用户的使用体验。
需要说明的是,如果目标页面上有多个待加载的目标多媒体资源,则在加载完第一个目标多媒体资源后,针对其他待加载的目标多媒体资源可以分别重复执行上述步骤104-108,逐个完成目标多媒体资源的加载。
如此可以看出,上述多媒体资源的加载方法通过获取用于存储目标页面所包含的至少一个多媒体资源的标识及其存储路径之间的映射关系的资源映射表,在加载目标页面上的目标多媒体资源时,可以通过获取的资源映射表获得目标多媒体资源的存储路径,进而基于该存储路径获取相应的多媒体资源并进行加载。可见,在上述多媒体资源的加载方法中,由于资源映射表记录的是页面上多媒体资源及其对应的存储路径,并且多媒体资源加载时是优 先按照资源映射表所记录的存储路径进行多媒体资源加载的,因此,在需要替换目标页面上某个待加载的多媒体资源时,可以仅修改相应资源映射表中的与该多媒体资源对应的存储路径,并在用户请求显示目标页面时将该资源映射表下发给用户即可实现目标页面上某个待加载的多媒体资源的替换,而无需对客户端应用数据进行改动,也即无需更新客户端应用,也无需通过额外的多媒体资源下发过程以替换本地多媒体资源,从而可以极大地方便客户端应用的使用,提高客户端应用的灵活性以及开发效率,无需因为多媒体资源的替换进行重新发版,同时也可以提升用户的使用体验。
在上述多媒体资源加载方法的基础之上,在本公开的另一些实施例中,除了为客户端应用的每个页面分别配置资源映射表之外,服务器端还进一步为客户端应用配置了一个全局资源映射表。该全局资源映射表中存储了该客户端应用也就是上述目标应用中所包含的至少一个多媒体资源的标识及其存储路径之间的映射关系。需要说明的是,与为各个页面配置的资源映射表相比,全局资源映射表的优先级相对较低。也就是说,在确定目标多媒体资源的存储地址过程中,将优先查找目标页面所对应的资源映射表。
在本公开的实施例中,上述目标应用对应的全局资源映射表可以是在每次访问目标应用时从服务器端下载并缓存的。在这种情况下,上述多媒体资源加载方法可以进一步包括:响应于确定接收到访问目标应用的请求,获取目标应用对应的全局资源映射表;以及缓存获取的目标应用对应的全局资源映射表。通常情况下,上述访问目标应用的请求通常可以是指用户打开上述目标应用的触发操作。
考虑到全局资源映射表通常包含的数据量较大,为了节约流量,提高效率,客户端也可以采用增量更新的方式在每次访问目标应用时从服务器端下载全局资源映射表的更新包,并基于下载的更新包增量更新缓存的全局资源映射表。在这种情况下,上述多媒体资源加载方法可以进一步包括:响应于确定接收到访问目标应用的请求,获取所述目标应用对应的全局资源映射表的更新包;以及基于获取的全局资源映射表的更新包更新已缓存的所述目标应用对应的全局资源映射表。需要说明的是,客户端和服务器端可以根据版本号或者时间戳等信息确定客户端是否需要进行全局资源映射表的更新或者确定全局资源映射表的更新包。
基于上述设置,在本公开的实施例中,上述步骤106所述的根据目标页面对应的资源映射表确定目标多媒体资源的存储路径的实现流程可如图3所示,包括如下步骤。
在步骤302,将目标多媒体资源的标识作为索引,检索目标页面对应的资源映射表,查找与目标多媒体资源的标识对应的存储路径。
在步骤304,响应于确定目标页面对应的资源映射表中包含目标多媒体资源的标识,将查找到的存储路径作为目标多媒体资源的存储路径。
在步骤306,响应于确定所述目标页面对应的资源映射表中不包含目标多媒体资源的标识,获取缓存的目标应用对应的全局资源映射表,然后执行步骤308。
在步骤308,将目标多媒体资源的标识作为索引,检索全局资源映射表,查找与目标多媒体资源的标识对应的存储路径,然后执行步骤310。
在步骤310,响应于确定全局资源映射表中包含目标多媒体资源的标识,将查找到的存储路径作为所述目标多媒体资源的存储路径。
如此可以看出,在本公开的实施例中,即使目标页面所对应的资源映射表不包括目标多媒体资源的标识,客户端仍可以进一步在目标应用所对应的全局资源映射表中查找目标多媒体资源的标识,从而获得目标应用级别的目标多媒体资源的存储路径。可以理解,页面所对应的资源映射表所存储的映射关系只在该页面内有效;而全局资源映射表所存储的映射关系在整个应用内没有进行特殊规定(页面所对应的资源映射表中没有存储相应的映射关系)的所有页面内都有效。
通过设置多级的资源映射表(页面级的资源映射表以及全局资源映射表),使得多媒体资源在目标应用中的配置更为灵活,甚至可以实现多媒体资源的局部替换。
具体来讲,在一些实施例中,同一个多媒体资源的标识在全局资源映射表中以及在某个页面对应的资源映射表中可以对应相同的存储路径,也可以对应不同的存储路径。例如,对于多媒体资源的标识为A的多媒体资源,假设在目标应用对应的全局资源映射表中、在其页面1对应的资源映射表中以及在其页面2对应的资源映射表中均记录多媒体资源A对应于URL 1,而其他页面对应的资源映射表中均没有记录多媒体资源A。则此时,在目标应用 的使用过程中,无论是在目标应用的页面1或页面2中,还是在目标应用的其他页面中,如需要加载多媒体资源A均将读取并加载URL 1的多媒体资源。在这种情况下,如果想要将页面1上的多媒体资源A替换为多媒体资源B(其存储路径为URL 2),同时想要将页面2上的多媒体资源A替换为多媒体资源C(其存储路径为URL 3),则仅需要将页面1对应的资源映射表中多媒体资源A对应的存储路径URL 1修改为URL 2以及将页面2对应的资源映射表中多媒体资源A对应的存储路径URL 1修改为URL 3即可,而不需要修改页面1和页面2对应的应用数据。这样,如果用户请求显示目标应用的页面1,则客户端将现获取页面1对应的资源映射表,其中多媒体资源A对应的存储路径为URL 2。这种情况下,在加载多媒体资源A时将从URL 2读取并加载多媒体资源B。也就是说,虽然页面1对应的应用数据和资源映射表中对媒体资源的标识仍然是多媒体资源A,但是实际加载的多媒体资源将是存储在URL 2的多媒体资源B。类似地,如果用户请求显示目标应用的页面2,则客户端将现获取页面2对应的资源映射表,其中多媒体资源A对应的存储路径为URL 3。这种情况下,在加载多媒体资源A时将从URL 3读取并加载多媒体资源C。此时,虽然页面2对应的应用数据和资源映射表中对媒体资源的标识仍然是多媒体资源A,但是实际加载的多媒体资源将是存储在URL 3的多媒体资源C。而如果用户请求显示目标应用的其他页面,由于其他页面对应的资源映射表中不包含多媒体资源A,客户端将查询目标应用对应的全局资源映射表,从而得到多媒体资源A对应的存储路径为URL 1。这种情况下,在加载多媒体资源A时将从URL 1读取并加载多媒体资源A。从上述示例可以看出,在不需要修改客户端应用的应用数据的情况下,通过设置多级的资源映射表(页面级的资源映射表以及全局资源映射表),不仅可以在目标应用中灵活配置或者灵活替换页面上加载的多媒体资源,并且可以实现多媒体资源的局部替换,而不一定是全局替换。
此外,在本公开的一些实施例中,在目标页面所对应的资源映射表以及目标应用所对应的全局资源映射表中均查询不到目标多媒体资源的标识的情况下,还可以进一步根据上述目标多媒体资源的信息确定上述目标多媒体资源的存储路径。在这种情形下,上述图3所示的方法还可以进一步包括如下步骤312-316。
在步骤312,响应于确定全局资源映射表中不包含目标多媒体资源的标识,确定上述目标多媒体资源的信息的类型。
如前所述,上述目标多媒体资源的信息通常可以是目标多媒体资源对应的序列号或者存储路径(包括本地路径或者URL)。
在步骤314,响应于确定上述目标多媒体资源的信息的类型为字符串类型,则可以基本判断出上述目标多媒体资源的信息是目标多媒体资源的存储路径,此时,可以直接将上述目标多媒体资源的信息作为上述目标多媒体资源的存储路径。
在步骤316,响应于确定上述目标多媒体资源的信息的类型不是字符串类型,则可以基本判断出上述目标多媒体资源的信息是目标多媒体资源对应的序列号,此时,可以基于上述目标多媒体资源的信息调用预先设定的系统方法;然后,再将系统方法的调用结果作为上述目标多媒体资源的存储路径。
在本公开的另一些实施例中,假设已经将上述目标多媒体资源的信息设置为上述目标多媒体资源的加载默认值,则上述步骤312-316也可以替换为下述步骤:首先,确定上述目标多媒体资源的加载默认值的类型;响应于确定上述目标多媒体资源的加载默认值的类型为字符串类型,直接将上述目标多媒体资源的加载默认值作为上述目标多媒体资源的存储路径;响应于确定上述目标多媒体资源的加载默认值的类型不是字符串类型,基于上述目标多媒体资源的加载默认值调用预先设定的系统方法,并将系统方法的调用结果作为上述目标多媒体资源的存储路径。
如此可以看出,在本公开的实施例中,即使目标页面所对应的资源映射表以及目标应用所对应的资源映射表中均不包括目标多媒体资源的标识,客户端仍可以根据目标页面所对应应用数据中记录的目标多媒体资源的信息或者目标多媒体资源的加载默认值确定目标多媒体资源的存储路径,并根据该存储路径读取并加载目标多媒体资源。从而有效避免出现在页面的资源映射表以及全局资源映射表均未对某个多媒体资源进行配置的情况下,出现目标多媒体资源加载不成功的情况。
图4显示了本公开一些实施例所述的在用户请求显示目标应用的目标页面时多媒体资源的加载方法的具体实现流程。如图4所示,该方法可以包括如下步骤。
在步骤402,获取目标页面对应的资源映射表。
在步骤404,基于目标页面的应用数据确定目标页面上待加载的目标多媒体资源的标识。
在步骤406,将目标多媒体资源的标识作为索引,检索目标页面对应的资源映射表,查找与目标多媒体资源的标识对应的存储路径。
在步骤408,响应于确定目标页面对应的资源映射表中包含目标多媒体资源的标识,将查找到的存储路径作为目标多媒体资源的存储路径,然后执行步骤418。
在步骤410,响应于确定所述目标页面对应的资源映射表中不包含目标多媒体资源的标识,获取缓存的目标应用对应的全局资源映射表,然后执行步骤412。
在步骤412,将目标多媒体资源的标识作为索引,检索全局资源映射表,查找与目标多媒体资源的标识对应的存储路径,然后执行步骤414。
在步骤414,响应于确定全局资源映射表中包含目标多媒体资源的标识,将查找到的存储路径作为所述目标多媒体资源的存储路径,然后执行步骤418。
在步骤416,响应于确定全局资源映射表中不包含目标多媒体资源的标识,基于目标多媒体资源的信息确定目标多媒体资源的存储路径,然后执行步骤418。
在步骤418,基于目标多媒体资源的存储路径获取并加载所述目标媒体资源。
上述图4所示的各个步骤的具体实现方法可以参考前述实施例,在此不再重复说明。
可见,上述多媒体资源加载方法通过设置页面级的资源映射表以及全局资源映射表,使得多媒体资源在目标应用中的配置更为灵活,甚至可以实现多媒体资源的局部替换。
在实际应用中,上述多媒体资源的加载方法可以应用于客户端应用的换肤场景中。通过该方法可以灵活地进行皮肤配置,快速替换客户端应用或者各个页面的皮肤,从而可以极大地满足用户的换肤需求。
此外,即使在目标页面所对应的资源映射表以及目标应用所对应的资源 映射表中均不包括目标多媒体资源的标识的情况下,客户端仍可以基于目标页面所对应应用数据中记录的目标多媒体资源的信息确定目标多媒体资源的存储路径,并完成加载,有效避免出现目标多媒体资源加载不成功的情况。
需要说明的是,本公开实施例的方法可以由单个设备执行,例如一台计算机或服务器等。本实施例的方法也可以应用于分布式场景下,由多台设备相互配合来完成。在这种分布式场景的情况下,这多台设备中的一台设备可以只执行本公开实施例的方法中的某一个或多个步骤,这多台设备相互之间会进行交互以完成所述的方法。
需要说明的是,上述对本公开的一些实施例进行了描述。其它实施例在所附权利要求书的范围内。在一些情况下,在权利要求书中记载的动作或步骤可以按照不同于上述实施例中的顺序来执行并且仍然可以实现期望的结果。另外,在附图中描绘的过程不一定要求示出的特定顺序或者连续顺序才能实现期望的结果。在某些实施方式中,多任务处理和并行处理也是可以的或者可能是有利的。
对应上述方法,本公开的实施例还公开了一种多媒体资源加载装置。图5显示了本公开实施例所述的装置的内部结构。如图5所示,该装置可以包括:
资源映射表获取模块510,用于响应于请求显示目标页面的触发操作,获取目标页面对应的资源映射表。
其中,目标页面对应的资源映射表用于存储目标页面所包含的至少一个多媒体资源的标识及其存储路径之间的映射关系。
解析模块520,用于获取目标页面上待加载的目标多媒体资源的标识。
存储路径确定模块530,用于基于目标多媒体资源的标识,根据目标页面对应的资源映射表确定目标多媒体资源的存储路径。
加载模块540,用于基于目标多媒体资源的存储路径获取并加载目标媒体资源。
上述各个模块的具体实现可以参考前述方法以及附图,在此不再重复说明。为了描述的方便,描述以上装置时以功能分为各种模块分别描述。当然,在实施本公开时可以把各模块的功能在同一个或多个软件和/或硬件中实现。
上述实施例的装置用于实现前述任一实施例中相应的多媒体资源加载方 法,并且具有相应的方法实施例的有益效果,在此不再赘述。
基于同一发明构思,与上述任意实施例方法相对应的,本公开还提供了一种电子设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现上任意一实施例所述的多媒体资源加载方法。
图6示出了本实施例所提供的一种更为具体的电子设备硬件结构示意图,该设备可以包括:处理器2010、存储器2020、输入/输出接口2030、通信接口2040和总线2050。其中处理器2010、存储器2020、输入/输出接口2030和通信接口2040通过总线2050实现彼此之间在设备内部的通信连接。
处理器2010可以采用通用的CPU(Central Processing Unit,中央处理器)、微处理器、应用专用集成电路(Application Specific Integrated Circuit,ASIC)、或者一个或多个集成电路等方式实现,用于执行相关程序,以实现本说明书实施例所提供的技术方案。
存储器2020可以采用ROM(Read Only Memory,只读存储器)、RAM(Random Access Memory,随机存取存储器)、静态存储设备,动态存储设备等形式实现。存储器2020可以存储操作系统和其他应用程序,在通过软件或者固件来实现本说明书实施例所提供的技术方案时,相关的程序代码保存在存储器2020中,并由处理器2010来调用执行。
输入/输出接口2030用于连接输入/输出模块,以实现信息输入及输出。输入输出/模块可以作为组件配置在设备中(图中未示出),也可以外接于设备以提供相应功能。其中输入设备可以包括键盘、鼠标、触摸屏、麦克风、各类传感器等,输出设备可以包括显示器、扬声器、振动器、指示灯等。
通信接口2040用于连接通信模块(图中未示出),以实现本设备与其他设备的通信交互。其中通信模块可以通过有线方式(例如USB、网线等)实现通信,也可以通过无线方式(例如移动网络、WIFI、蓝牙等)实现通信。
总线2050包括一通路,在设备的各个组件(例如处理器2010、存储器2020、输入/输出接口2030和通信接口2040)之间传输信息。
需要说明的是,尽管上述设备仅示出了处理器2010、存储器2020、输入/输出接口2030、通信接口2040以及总线2050,但是在具体实施过程中,该设备还可以包括实现正常运行所必需的其他组件。此外,本领域的技术人员 可以理解的是,上述设备中也可以仅包含实现本说明书实施例方案所必需的组件,而不必包含图中所示的全部组件。
上述实施例的电子设备用于实现前述任一实施例中相应的多媒体资源加载方法,并且具有相应的方法实施例的有益效果,在此不再赘述。
基于同一发明构思,与上述任意实施例方法相对应的,本公开还提供了一种非暂态计算机可读存储介质,所述非暂态计算机可读存储介质存储计算机指令,所述计算机指令用于使所述计算机执行如上任一实施例所述的多媒体资源加载方法。
本实施例的计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。
上述实施例的存储介质存储的计算机指令用于使所述计算机执行如上任一实施例所述的任务处理方法,并且具有相应的方法实施例的有益效果,在此不再赘述。
所属领域的普通技术人员应当理解:以上任何实施例的讨论仅为示例性的,并非旨在暗示本公开的范围(包括权利要求)被限于这些例子;在本公开的思路下,以上实施例或者不同实施例中的技术特征之间也可以进行组合,步骤可以以任意顺序实现,并存在如上所述的本公开实施例的不同方面的许多其它变化,为了简明它们没有在细节中提供。
另外,为简化说明和讨论,并且为了不会使本公开实施例难以理解,在所提供的附图中可以示出或可以不示出与集成电路(IC)芯片和其它部件的公知的电源/接地连接。此外,可以以框图的形式示出装置,以便避免使本公开实施例难以理解,并且这也考虑了以下事实,即关于这些框图装置的实施方式的细节是高度取决于将要实施本公开实施例的平台的(即,这些细节应 当完全处于本领域技术人员的理解范围内)。在阐述了具体细节(例如,电路)以描述本公开的示例性实施例的情况下,对本领域技术人员来说显而易见的是,可以在没有这些具体细节的情况下或者这些具体细节有变化的情况下实施本公开实施例。因此,这些描述应被认为是说明性的而不是限制性的。
尽管已经结合了本公开的具体实施例对本公开进行了描述,但是根据前面的描述,这些实施例的很多替换、修改和变型对本领域普通技术人员来说将是显而易见的。例如,其它存储器架构(例如,动态RAM(DRAM))可以使用所讨论的实施例。
本公开实施例旨在涵盖落入所附权利要求的宽泛范围之内的所有这样的替换、修改和变型。因此,凡在本公开实施例的精神和原则之内,所做的任何省略、修改、等同替换、改进等,均应包含在本公开的保护范围之内。

Claims (13)

  1. 一种多媒体资源加载方法,包括:
    响应于请求显示目标页面的触发操作,获取所述目标页面对应的资源映射表;
    确定所述目标页面上待加载的目标多媒体资源的标识;
    基于所述目标多媒体资源的标识,根据所述目标页面对应的资源映射表确定所述目标多媒体资源的存储路径;以及
    基于所述目标多媒体资源的存储路径获取并加载所述目标媒体资源。
  2. 根据权利要求1所述的多媒体资源加载方法,其中,所述目标页面为目标应用的目标页面;
    所述获取所述目标页面对应的资源映射表包括:
    通过所述目标页面对应的应用程序接口从服务器端获取所述目标页面对应的资源映射表;或者
    从所述目标应用的配置信息中获取所述目标页面对应的资源映射表的存储路径,并从所述目标页面对应的资源映射表的存储路径获取所述目标页面对应的资源映射表。
  3. 根据权利要求1所述的多媒体资源加载方法,其中,所述确定所述目标页面上待加载的目标多媒体资源的标识包括:
    获取目标页面对应的应用数据;
    从所述应用数据中获取所述目标页面上待加载的多媒体资源的信息;
    响应于确定所述多媒体资源的信息的类型为字符串类型,将所述多媒体资源的信息作为所述目标多媒体资源的标识;以及
    响应于确定所述多媒体资源的信息的类型不为字符串类型,基于所述多媒体资源的信息调用预先设定的系统方法,获取所述目标多媒体资源的标识。
  4. 根据权利要求3所述的多媒体资源加载方法,其中,所述基于所述目标多媒体资源的标识,根据所述目标页面对应的资源映射表确定所述目标多媒体资源的存储路径包括:
    将所述目标多媒体资源的标识作为索引,检索所述目标页面对应的资源映射表,查找与所述目标多媒体资源的标识对应的存储路径;以及
    将查找到的存储路径作为所述目标多媒体资源的存储路径。
  5. 根据权利要求4所述的多媒体资源加载方法,其中,所述目标页面为目标应用的目标页面;
    所述基于所述目标多媒体资源的标识,根据所述目标页面对应的资源映射表确定所述目标多媒体资源的存储路径进一步包括:
    响应于确定所述目标页面对应的资源映射表中不包含所述目标多媒体资源的标识,
    获取缓存的所述目标应用对应的全局资源映射表;
    将所述目标多媒体资源的标识作为索引,检索所述全局资源映射表,查找与所述目标多媒体资源的标识对应的存储路径;以及
    将查找到的存储路径作为所述目标多媒体资源的存储路径。
  6. 根据权利要求5所述的多媒体资源加载方法,其中,所述基于所述目标多媒体资源的标识,根据所述目标页面对应的资源映射表确定所述目标多媒体资源的存储路径进一步包括:
    响应于确定所述全局资源映射表中不包含所述目标多媒体资源的标识,确定所述多媒体资源的信息的类型;
    响应于确定所述多媒体资源的信息的类型为字符串类型,将所述多媒体资源的信息作为所述目标多媒体资源的存储路径;以及
    响应于确定所述目标多媒体资源的信息的类型不为字符串类型,基于所述多媒体资源的信息调用预先设定的系统方法,获取所述目标多媒体资源的存储路径。
  7. 根据权利要求5所述的多媒体资源加载方法,进一步包括:
    响应于确定接收到访问所述目标应用的请求,获取所述目标应用对应的全局资源映射表;以及
    缓存所述目标应用对应的全局资源映射表。
  8. 根据权利要求5所述的多媒体资源加载方法,进一步包括:
    响应于确定接收到访问所述目标应用的请求,获取所述目标应用对应的全局资源映射表的更新包;以及
    基于获取的所述目标应用对应的全局资源映射表的更新包更新已缓存的所述目标应用对应的全局资源映射表。
  9. 根据权利要求1所述的多媒体资源加载方法,其中,所述基于所述目标多媒体资源的存储路径获取并加载所述目标媒体资源包括:
    响应于确定所述目标多媒体资源的存储路径为本地路径,基于所述本地路径加载所述目标媒体资源;
    响应于确定所述目标多媒体资源的存储路径为网络路径,基于所述网络路径确定本地是否已缓存与所述网络路径对应的多媒体资源;
    响应于确定本地已缓存与所述网络路径对应的多媒体资源,加载本地缓存的与所述网络路径对应的多媒体资源;以及
    响应于确定本地未缓存与所述网络路径对应的多媒体资源,基于所述网络路径下载所述多媒体资源,并加载下载的多媒体资源。
  10. 一种多媒体资源加载装置,包括:
    资源映射表获取模块,用于响应于请求显示目标页面的触发操作,获取所述目标页面对应的资源映射表;
    解析模块,用于获取所述目标页面上待加载的目标多媒体资源的标识;
    存储路径确定模块,用于基于所述目标多媒体资源的标识,根据所述目标页面对应的资源映射表确定所述目标多媒体资源的存储路径;以及
    加载模块,用于基于所述目标多媒体资源的存储路径获取并加载所述目标媒体资源。
  11. 一种电子设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现如权利要求1-9中任意一项所述的多媒体资源加载方法。
  12. 一种非暂态计算机可读存储介质,所述非暂态计算机可读存储介质存储计算机指令,所述计算机指令用于使计算机执行权利要求1-9中任意一项所述的多媒体资源加载方法。
  13. 一种计算机程序产品,包括计算机程序指令,当所述计算机程序指令在计算机上运行时,使得计算机执行如权利要求1-9中任意一项所述的多媒体资源加载方法。
PCT/CN2024/101436 2023-06-27 2024-06-25 多媒体资源加载方法及相关设备 Ceased WO2025002136A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202310774295.7A CN119202421B (zh) 2023-06-27 2023-06-27 多媒体资源加载方法及相关设备
CN202310774295.7 2023-06-27

Publications (1)

Publication Number Publication Date
WO2025002136A1 true WO2025002136A1 (zh) 2025-01-02

Family

ID=93937626

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2024/101436 Ceased WO2025002136A1 (zh) 2023-06-27 2024-06-25 多媒体资源加载方法及相关设备

Country Status (2)

Country Link
CN (1) CN119202421B (zh)
WO (1) WO2025002136A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180219964A1 (en) * 2017-01-30 2018-08-02 Dell Products, L.P. Method and system to convert globally unique identifiers to electronic data interchange document identifiers
CN108875291A (zh) * 2017-05-11 2018-11-23 腾讯科技(深圳)有限公司 一种信息处理方法及服务器、计算机存储介质
CN111159595A (zh) * 2019-12-24 2020-05-15 平安养老保险股份有限公司 页面加载方法、系统、计算机设备和计算机可读存储介质
CN111523072A (zh) * 2020-04-20 2020-08-11 咪咕文化科技有限公司 页面访问数据统计方法、装置、电子设备及存储介质
CN116204749A (zh) * 2023-02-02 2023-06-02 京东科技控股股份有限公司 页面加载方法、装置、电子设备及存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180219964A1 (en) * 2017-01-30 2018-08-02 Dell Products, L.P. Method and system to convert globally unique identifiers to electronic data interchange document identifiers
CN108875291A (zh) * 2017-05-11 2018-11-23 腾讯科技(深圳)有限公司 一种信息处理方法及服务器、计算机存储介质
CN111159595A (zh) * 2019-12-24 2020-05-15 平安养老保险股份有限公司 页面加载方法、系统、计算机设备和计算机可读存储介质
CN111523072A (zh) * 2020-04-20 2020-08-11 咪咕文化科技有限公司 页面访问数据统计方法、装置、电子设备及存储介质
CN116204749A (zh) * 2023-02-02 2023-06-02 京东科技控股股份有限公司 页面加载方法、装置、电子设备及存储介质

Also Published As

Publication number Publication date
CN119202421A (zh) 2024-12-27
CN119202421B (zh) 2025-12-16

Similar Documents

Publication Publication Date Title
EP3657358B1 (en) Method, device and system for persistent data processing, and readable storage medium
US11706331B2 (en) Information processing method and apparatus, storage medium, and electronic device
CN105389191B (zh) 一种基于局域网的软件升级方法、装置和系统
US20210216700A1 (en) Information Processing Method and System
CN107635027B (zh) 一种域名解析方法、介质、装置和计算设备
WO2017114206A1 (zh) 短链接处理方法、装置及短链接服务器
US12106253B2 (en) Container management method, apparatus, and device
US20170289243A1 (en) Domain name resolution method and electronic device
CN112134908B (zh) 应用适配方法及服务器、介质、车载多媒体系统
CN110968331B (zh) 应用程序运行的方法和装置
CN107943505A (zh) 应用升级管理方法、装置、存储介质及电子设备
CN107798064B (zh) 页面处理方法、电子设备及计算机可读存储介质
US20160315997A1 (en) File transfer method, device, and system
CN109033302A (zh) 一种页面跳转方法、装置、终端及存储介质
CN109729121A (zh) 一种云存储系统及用于云存储系统中实现自定义数据处理的方法
US20180198843A1 (en) Nonconsecutive File Downloading
WO2014190700A1 (zh) 一种内存访问的方法、缓冲调度器和内存模块
CN106161656A (zh) 一种界面跳转的方法及装置
CN109428872B (zh) 数据传输方法、设备、服务器及启动方法、系统
WO2025002136A1 (zh) 多媒体资源加载方法及相关设备
CN107395737A (zh) 访问网络资源的方法、装置、系统及计算机可读存储介质
CN112765503A (zh) 页面加载数据的静态化处理方法和装置
WO2024251107A1 (zh) 容器编排与数据访问方法、电子设备及存储介质
CN107783837A (zh) 一种进行存储扩展的方法、装置及电子设备
CN107357853B (zh) 一种redis控制台的操作方法、装置及计算机系统

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 24830776

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE