In-application resource loading method and device, electronic equipment and resource loading system
By initiating resource acquisition requests and filtering target resources when the application starts, the high development costs and user experience caused by application iteration and update are solved, and the unified management and issuance of resources required for resource bits is achieved, reducing the Development costs and improve the configurability of the operating platform.
Patent Information
- Application Number
- CN202411546872.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2025-02-14
AI Technical Summary
When existing applications are iterated and updated, they cause high development costs and user experience to be affected. How to reduce development costs and improve the configurability of the operating platform.
When the application starts, a resource acquisition request containing a resource bit list is initiated, the target resources are received and filtered out, and the corresponding resource bits are loaded for display, so as to achieve unified management and issuance of resources required for resource bits.
It realizes fast and convenient management of resources required for resource bits. No matter how the application iterates and updates, you only need to modify the resource bit list, which reduces development costs and improves the configurability of the operation platform.
Smart Images

Figure CN119440665A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data processing technology, specifically to technical fields such as resource loading and information push, and in particular to an in-application resource loading method, device, electronic device, resource loading system, computer-readable storage medium and computer program product. Background Art
[0002] Terminal devices usually use various functions by installing different applications, and the applications usually have multiple resource locations on their interfaces at all levels for configuring operational activities or introducing content and pushing hot topics. Summary of the invention
[0003] The embodiments of the present disclosure provide a method, device, electronic device, computer-readable storage medium, and computer program product for loading resources within an application.
[0004] In a first aspect, an embodiment of the present disclosure proposes a method for loading resources within an application, comprising: initiating a resource acquisition request including a resource position list according to an activated application; wherein the resource position list includes each resource position that needs to display resources; receiving returned resource information of alternative resources corresponding to each resource position; based on the resource information of the alternative resources corresponding to each resource position, screening out target resources corresponding to each resource position respectively; and loading each target resource to the corresponding resource position to display the resources within the application.
[0005] In the second aspect, the embodiment of the present disclosure proposes an in-application resource loading device, including: a resource acquisition request initiating unit, configured to initiate a resource acquisition request including a resource position list according to the application being started; wherein the resource position list includes each resource position that needs to display resources; a resource information receiving unit, configured to receive returned resource information of alternative resources corresponding to each resource position; a target resource screening unit, configured to screen out target resources corresponding to each resource position based on the resource information of the alternative resources corresponding to each resource position; and a resource loading and display unit, configured to load each target resource to the corresponding resource position for displaying the in-application resource.
[0006] In a third aspect, an embodiment of the present disclosure provides a resource loading system, including: a client, for initiating a resource acquisition request including a resource position list according to an activated application, wherein the resource position list includes each resource position that needs to display resources; receiving returned resource information of alternative resources corresponding to each resource position; based on the resource information of the alternative resources corresponding to each resource position, screening out target resources corresponding to each resource position respectively; loading each target resource to a corresponding resource position for displaying the resources within the application; a server, for determining, according to the received resource acquisition request, the resource information of the alternative resources corresponding to each resource position included in the resource position list; and sending the resource information to the client.
[0007] In a fourth aspect, an embodiment of the present disclosure provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that when the at least one processor executes, the in-application resource loading method described in any implementation method in the first aspect can be implemented.
[0008] In a fifth aspect, an embodiment of the present disclosure provides a non-transitory computer-readable storage medium storing computer instructions, which are used to enable a computer to implement the in-application resource loading method described in any implementation method of the first aspect when executed.
[0009] In a sixth aspect, an embodiment of the present disclosure provides a computer program product including a computer program, which, when executed by a processor, can implement the steps of the in-application resource loading method as described in any implementation manner in the first aspect.
[0010] The in-application resource loading solution provided by the present disclosure initiates a resource acquisition request containing a resource position list corresponding to a certain application when sensing that a certain application is started, thereby receiving the corresponding resource information of the candidate resources corresponding to each requested resource position, and then filtering out the target resources corresponding to each resource position according to the resource information of each candidate resource, so as to finally load each target resource to the corresponding resource position for displaying the in-application resource. The solution initiates a resource acquisition request in the form of a list for all resource positions corresponding to the started application, so that the resource information of all candidate resources can be obtained through only one request processing, thereby realizing the unified management and distribution of the resources required for the resource positions, and no matter how the application is iterated and updated, only the resource position list needs to be modified to realize fast and convenient management.
[0011] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Other features, objects and advantages of the present disclosure will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:
[0013] Figure 1 is an exemplary system architecture in which the present disclosure may be applied;
[0014] Figure 2 A flowchart of a method for loading resources within an application provided by an embodiment of the present disclosure;
[0015] Figure 3 A flowchart of a method for selecting a matching target resource for each resource location according to resource information provided in an embodiment of the present disclosure;
[0016] Figure 4 A flowchart of a method for loading each target resource into a corresponding resource position for display provided in an embodiment of the present disclosure;
[0017] Figure 5 A timing diagram of resource loading implemented by a resource loading system provided in an embodiment of the present disclosure;
[0018] Figure 6 A structural block diagram of an in-application resource loading device provided by an embodiment of the present disclosure;
[0019] Figure 7 A schematic diagram of the structure of an electronic device suitable for executing an in-application resource loading method provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0020] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description. It should be noted that the embodiments in the present disclosure and the features in the embodiments may be combined with each other without conflict.
[0021] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0022] Taking smart mobile terminals as an example, in order to push and promote content, the applications installed on smart mobile terminals often have multiple resource locations for configuring operational activities. At the same time, with the iteration of the application, more and more operational locations need to be developed, and each independently proposed operational location often has its own independent page, independent network interface, processing resource download, parsing and rendering logic, etc., which makes each independent and repeated development lead to high development costs, and different processing logics may also affect the user's application experience. How to reduce development costs and increase the configurability of the operation platform is an urgent problem to be solved by those skilled in the art.
[0023] Figure 1 An exemplary system architecture 100 is shown to which embodiments of the in-application resource loading method, apparatus, electronic device, and computer-readable storage medium of the present disclosure can be applied.
[0024] like Figure 1 As shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0025] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Terminal devices 101, 102, 103 and server 105 can be installed with various applications for realizing information communication between the two, such as shopping applications, cloud storage applications, instant messaging applications, etc.
[0026] Terminal devices 101, 102, 103 and server 105 can be hardware or software. When terminal devices 101, 102, 103 are hardware, they can be various electronic devices with display screens, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, etc.; when terminal devices 101, 102, 103 are software, they can be installed in the electronic devices listed above, which can be implemented as multiple software or software modules, or as a single software or software module, and no specific limitation is made here. When server 105 is hardware, it can be implemented as a distributed server cluster composed of multiple servers, or as a single server; when the server is software, it can be implemented as multiple software or software modules, or as a single software or software module, and no specific limitation is made here.
[0027] Terminal devices 101, 102, and 103 can provide various services through various built-in applications. Taking any type of application with built-in resource positions as an example, terminal devices 101, 102, and 103 can achieve the following effects when running such applications: first, according to the application being started, a resource acquisition request containing a resource position list is initiated to server 105 through network 104, and the resource position list contains each resource position that needs to display resources; then, resource information of alternative resources corresponding to each resource position returned by server 105 is received through network 104; then, based on the resource information of the alternative resources corresponding to each resource position, the target resources corresponding to each resource position are screened out; finally, the target resources are loaded to the corresponding resource position to display the resources within the application.
[0028] The in-application resource loading method provided in the subsequent embodiments of the present disclosure is generally executed by the terminal devices 101 , 102 , 103 that provide functions and information push to users. Accordingly, the in-application resource loading device is generally also provided in the terminal devices 101 , 102 , 103 .
[0029] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0030] Please refer to Figure 2 , Figure 2 A flowchart of a method for loading resources within an application provided by an embodiment of the present disclosure, wherein process 200 includes the following steps:
[0031] Step 201: Initiate a resource acquisition request including a resource bit list according to the started application program;
[0032] This step is intended to be performed by the execution body of the resource loading method in the application (for example Figure 1 The terminal devices 101, 102, and 103 shown in the figure, after sensing that the application installed thereon has been started, initiate a resource acquisition request to a destination end that can respond to its request for a list of resource positions contained in the started application that need to be loaded for in-application display. That is, the executor wants to ensure that it can obtain the resources to be loaded in the resource position (Resource Position) of the application by initiating the request so as to correctly display the interface and provide the expected user experience.
[0033] Specifically, the resource acquisition request should at least include a resource bit list corresponding to the launched application, or enable the receiving end that correctly responds to the request to determine the relevant content of the resource bit list. For example, when the receiving end pre-maintains a correspondence table of the correspondence between the application identifier and the resource bit list, the resource acquisition request may only include the identifier of the application, so that the receiving end can determine the resource bit list by looking up the table based on the identifier.
[0034] Resource slots usually refer to the various parts or components that need to be displayed in the user interface, such as images, texts, videos, etc. Each resource slot can be regarded as a specific area or functional module on the application interface, and the resource slot list contains the resource slots that need to display resources. The resource slot list is usually not only a simple name or identifier, but also can contain more detailed information, such as the resource slot number (ID) used to uniquely identify each resource slot, the resource slot type (which can correspond to the resource type loaded by the resource slot, such as pictures, videos, texts, etc.), location information (the location or layout information of the resource slot in the application interface), and status information (such as whether the resource has been loaded, whether the correct new resource or old resource has been loaded, and whether it needs to be updated, etc.).
[0035] Step 202: receiving the returned resource information of the candidate resources corresponding to each resource position;
[0036] Based on step 201, this step aims to receive the returned resource information of the candidate resources corresponding to each resource position by the above-mentioned execution subject. The resource information of the candidate resources corresponding to each resource position should be determined by the receiving end that receives the resource acquisition request according to the content contained in the resource acquisition request.
[0037] When the executing subject of this embodiment is the client and the receiving end can correspond to the server, then steps 201 and 202 can be adaptively changed to: based on the received startup signal of the application, a resource acquisition request including a resource position list is initiated to a server matching the application, and a resource list corresponding to the resource position list returned by the receiving server is recorded in the resource list. The resource information of the alternative resources corresponding to each resource position is recorded.
[0038] Resource information is information used to describe the characteristics of candidate resources, and may include characteristics in multiple aspects, such as location characteristics, timeliness characteristics, type characteristics, user preference characteristics, priority characteristics, and the like.
[0039] Considering that a launched application usually contains multiple resource locations on its homepage, and the information loaded in the multiple resource locations should be as different as possible, there should also be multiple candidate resources returned, so as to facilitate the subsequent determination of which candidate resources are more suitable for loading and displaying in which resource locations. That is, the multiple candidate resources received in this step may not clearly correspond to different resource locations, but are simply packaged as a whole and returned to the above-mentioned execution subject, and the above-mentioned execution subject is required to determine the matching and appropriate target resources for each resource location in the multiple candidate resources; conversely, the multiple candidate resources received can also clearly record which resource location they correspond to, so when only one candidate resource is received at a certain resource location, it should be directly used as the target resource of the resource location for subsequent loading and display. If a certain resource location receives multiple candidate resources, when selecting which one or which candidate resources are used as the target resource for subsequent loading and display, further screening can also be performed in combination with various screening dimensions.
[0040] Step 203: based on the resource information of the candidate resources corresponding to each resource position, screen out the target resources corresponding to each resource position;
[0041] On the basis of step 202, this step aims at having the execution subject screen out target resources corresponding to each resource position based on resource information of candidate resources corresponding to each resource position.
[0042] Resource information is information used to describe the characteristics of alternative resources, and may include characteristics in multiple aspects, such as location characteristics, timeliness characteristics, type characteristics, user preference characteristics, priority characteristics, etc. When screening, you can select at least one of the above characteristics. It should be understood that the more screening items are selected, the more the target resources finally screened out should meet the needs, and vice versa, the greater the deviation from the needs.
[0043] Step 204: Load each target resource to a corresponding resource location to display the resource within the application.
[0044] On the basis of step 203, this step aims at having the above-mentioned execution subject load each target resource into the corresponding resource position to display the resources within the application.
[0045] The in-application resource loading method provided by the disclosed embodiment initiates a resource acquisition request containing a resource position list corresponding to the application when sensing that a certain application is started, thereby receiving the corresponding returned resource information of the candidate resources corresponding to each requested resource position, and then filtering out the target resources corresponding to each resource position according to the resource information of each candidate resource, so as to finally load each target resource to the corresponding resource position for displaying the in-application resource. This solution initiates a resource acquisition request in the form of a list for all resource positions corresponding to the started application, so that the resource information of all candidate resources can be obtained through only one request processing, thereby realizing the unified management and distribution of the resources required for the resource positions, and no matter how the application is iterated and updated, only the resource position list needs to be modified to realize fast and convenient management.
[0046] For a better understanding of step 203, please refer to Figure 3 , Figure 3 A flowchart of a method for selecting a matching target resource for each resource location according to resource information provided by an embodiment of the present disclosure, wherein process 300 includes the following steps:
[0047] Step 301: According to the resource location information in the resource information, a first candidate resource matching the location of each resource is selected from the candidate resources;
[0048] This step aims to have the execution subject firstly select the first candidate resource matching the position characteristics for each resource position according to the position characteristics of the candidate resources, that is, the first candidate resource should be a part of all the candidate resources.
[0049] Specifically, when position numbers are directly used to refer to resource bits at different positions, the candidate resource having a resource position number consistent with the position number of each resource bit can be determined as the first candidate resource that matches the corresponding resource bit in position.
[0050] Step 302: According to the timeliness information in the resource information, select second candidate resources that meet the preset timeliness requirement from the first candidate resources corresponding to each resource position;
[0051] Based on step 301, this step aims to have the above-mentioned execution subject screen out second candidate resources that meet the timeliness requirements for each resource position according to the timeliness characteristics of the first candidate resources, that is, the second candidate resources should be a part of all the first candidate resources.
[0052] Assuming that there are currently 5 first candidate resources in resource position 01, assuming that the current start time is close to holiday X, and assuming that the 5 first candidate resources each have timeliness information of the time period in which the resource is presented, then the first candidate resource with timeliness information matching holiday X (for example, the time of holiday X falls within the resource presentation time period) should be screened as the second candidate resource for resource position 01.
[0053] Step 303: According to the user preference information in the resource information, a third candidate resource matching the user preference of the logged-in user is selected from the second candidate resources corresponding to each resource position;
[0054] On the basis of step 302, this step aims to further screen out, for each resource location, a third candidate resource that matches the user preference of the currently logged-in user of the launched application (for example, it can be determined by the user profile of the user, which can come from other launched applications and should of course be used under the premise of prior authorization by the user) according to the user preference characteristics of the second candidate resources by the above-mentioned execution entity, that is, the third candidate resource should be a part of all the second candidate resources.
[0055] For example, if the user preference of the currently logged-in user Y is to shop online through holiday promotions, then the third candidate resource selected should also have preference characteristics related to holiday publicity or holiday promotions. In this way, the loaded resources can be more targeted to different users, achieving more accurate push and recommendation.
[0056] Step 304: According to the priority information in the resource information, select the target resource from the third candidate resources corresponding to each resource position.
[0057] On the basis of step 303, this step aims to have the above-mentioned execution subject select target resources that meet the priority requirements for each resource position according to the priority characteristics in the resource information, that is, the target resource should be a part of all third candidate resources.
[0058] Specifically, a feasible implementation method may be: determining the third candidate resource corresponding to each resource bit and having the highest priority as the target resource corresponding to the corresponding resource bit.
[0059] Furthermore, if the resource position chooses to present a resource presentation form that does not present a single resource, but instead chooses to display multiple resources in an alternating manner at intervals, then the first N resources with the highest priority ranking can also be selected as the target resources of the resource position, and the first presentation order can be set according to the priority.
[0060] This embodiment provides a solution for selecting matching target resources for each resource position from multiple candidate resources through multiple screening dimensions in sequence according to different dimensional information recorded in resource information through steps 301 to 304, and specifically involves location features, timeliness features, user preference features, and priority features. It should be understood that the more screening items are selected, the more the target resources finally screened out should meet the requirements, and vice versa, the higher the degree of deviation from the requirements.
[0061] This embodiment exists only as a preferred embodiment that simultaneously embodies the use of four screening dimensions. In some other embodiments, only two or three of them may be used. There is no specific limitation here and it can be flexibly selected according to actual needs.
[0062] Furthermore, based on the solution provided in the above embodiment on how to screen and obtain matching target resources for each resource position respectively, in order to make different resource positions present different information to users as much as possible, the resource content or resource-oriented objects corresponding to the target resources corresponding to each resource position can also be controlled to be not completely the same, thereby avoiding the problem of overlapping or partial overlapping of the screened target resources as much as possible.
[0063] Based on any of the above embodiments, in order to deepen the understanding of how to load each target resource into the corresponding resource position for display (ie, step 204), please refer to Figure 4 , Figure 4 A flowchart of a method for loading each target resource into a corresponding resource position for display provided in an embodiment of the present disclosure is shown, wherein the flowchart 400 includes the following steps:
[0064] Step 401: Determine the portion of each target resource that has been stored in the local resource library as the first target resource;
[0065] This step involves identifying the resources stored in the local resource library as the first target resources. That is, when the application starts, it first checks the resources (such as pictures, audio, video, etc.) already in its local storage. These resources can be previously downloaded content, and the program will give priority to these local resources to improve loading speed and user experience.
[0066] Step 402: determining the part of each target resource except the local target resource as the second target resource;
[0067] This step identifies target resources that are not in the local resource library as secondary target resources. This means that all required resources are analyzed and which ones have not yet been downloaded or stored locally. These resources need to be obtained from the server to ensure that the application can work properly and display complete content.
[0068] Step 403: Obtain the second target resource from the server through the resource acquisition link of the second target resource, and store it in the local resource library;
[0069] In this step, the execution subject requests these resources from the server through the resource acquisition link of the second target resource and stores them in the local resource library. That is, the link of the second target resource is used to make a network request to request these resources from the server. If the resources are successfully acquired, they will be downloaded and stored locally for subsequent use. This process usually involves network protocols and may include asynchronous processing to avoid blocking the user interface.
[0070] Step 404: by establishing a mapping relationship between each resource location and the first target resource and the second target resource stored in the local resource library, the first target resource and the second target resource are loaded into the corresponding resource location to display the resources in the application.
[0071] This step is intended to enable the above-mentioned execution subject to load these resources into the corresponding positions for display according to the mapping relationship between the established resource positions and the first and second target resources stored in the local resource library. That is, it is first necessary to associate the acquired resources with the specific positions in the user interface, so that the above-mentioned execution subject can load the first target resource stored locally and the second target resource just downloaded into the predetermined resource position according to the design and layout of the interface. In this way, the user can see the complete content in the application. The establishment of the mapping relationship ensures the correct display of the resources, so that the interface of the application can be orderly and consistent.
[0072] This embodiment provides a resource management workflow process through steps 401-404, which starts with checking the locally stored resources, identifying the required resources, and obtaining the resources from the server when necessary, and finally loading these resources into the application interface. By using this method, not only the performance is improved (by giving priority to using local resources), but also the user is guaranteed to obtain the latest and complete content.
[0073] Furthermore, considering that some resources that may be used later may be stored in advance, in order to avoid the pre-downloaded resources occupying too much storage space of the above-mentioned execution entity and affecting the normal operation of other services, the outdated resources stored in the local resource library can be deleted in time before each startup or shutdown.
[0074] The above embodiments are all descriptions of the entire resource loading process from the perspective of the client. To more intuitively see the operations performed by each execution subject in this process, please refer to Figure 5 , Figure 5 A timing diagram for implementing resource loading through a resource loading system provided in an embodiment of the present disclosure includes the following steps:
[0075] S1: The client 20 starts the application A in response to the application start operation sent by the user 10;
[0076] S2: The client 20 initiates a resource acquisition request including a resource location list of A to the server 30;
[0077] S3: The server 30 determines resource information of candidate resources corresponding to each resource position included in the resource position list;
[0078] S4: The server 30 sends the determined resource information back to the client 20;
[0079] S5: The client 20 selects target resources corresponding to each resource position based on the resource information of the candidate resources corresponding to each resource position;
[0080] S6: The client 20 loads each target resource into a corresponding resource location;
[0081] S7: The client 20 displays the resources loaded in each resource position in A for the user 10 to view.
[0082] Based on the above embodiment, the server 30 can also be used for:
[0083] According to the received resource position update instruction of the application, the resource position parameters of the corresponding application are updated to obtain a new resource position configuration; in response to the existence of a new resource position configuration of the application corresponding to the resource acquisition request, the resource information of the corresponding candidate resource is determined according to the resource position parameters recorded in the new resource position configuration; and the new resource position configuration is sent to the client together with the resource information;
[0084] Correspondingly, the client 20 may also be used to adjust the resource location in the application program according to the received new resource location configuration.
[0085] That is, the modification of resource position parameters due to application update iterations, such as addition, deletion, change of position, etc., can be completed on the server 30 side. Then, even if the client 20 has not completed the update of the application version or the resource position list, the server 30 can also send the resource information according to the new resource position configuration, so that the client 20 can adaptively adjust the resource position parameters according to the received resource information.
[0086] Specifically, the resource position parameter includes at least one of the following:
[0087] The number of resource slots, the location of resource slots on various levels of application interfaces, the number of resource slots, the relationship between different resource slots, and the duration of a single resource displayed by a resource slot.
[0088] Furthermore, the client 20 can also be used to: determine the matching target resource location according to the received user voice command; and broadcast the resource content currently loaded in the target resource location in voice form. Or it can also be used to: determine the matching target resource location according to the received user forwarding instruction; and forward the resource content currently loaded in the target resource location to the target address in a preset forwarding encapsulation form.
[0089] In order to deepen the understanding of the solution provided by the present disclosure, a specific implementation method is provided in combination with specific scenarios to construct a resource location model and a resource management system:
[0090] In this embodiment, three main parts need to be established respectively, namely, a resource location model, a resource management system established at the client, and a resource location distribution system established at the server.
[0091] The resource location model established needs to meet the following requirements:
[0092] 1) The locations within the app need to be numbered, such as the homepage banner is numbered 1 and the homepage floating ball is numbered 2;
[0093] 2) Unique identification of materials (equivalent to the resources mentioned above);
[0094] 3) The effective time of the resource position (i.e. the timeliness feature mentioned above);
[0095] 4) The right group of people for resource location (i.e. the user preference characteristics mentioned above);
[0096] 5) Resource slot material information generally consists of general materials, resource slot jump links, resource slot material display diagrams, etc., to support different configurations for each resource slot.
[0097] Among them, the resource position distribution system established at the server end is used to distribute the resource position model list of all users that meet the profile according to the user's population profile after different users request the material interface.
[0098] Among them, the resource management system established at the client is to uniformly establish and manage the acquired materials. When the application is started, the effective time of the resource position material is parsed according to the interface request, all materials within the time range that meet the requirements are parsed, all timed materials are filtered out, and then deduplication is performed according to the location. If there are multiple resource position materials in the same location, a set of resource position mapping tables for the current user is established according to the priority, and then the unique identifier of the material is used to query whether there is a local mapping for the material in the order of location. If there is a local mapping material, it is completed. If there is no mapping, a local mapping is established. The elements that need to be downloaded in the resource position material information, such as pictures, Lottie (an open source tool that can add animation effects to native applications), afx videos (an animation playback capability that supports transparent backgrounds), GIFs (animated images), and other resources are downloaded to the local sandbox, and the sandbox path is written into the mapping table. When the user initializes the corresponding resource area, he can find the corresponding resource position model according to the location, and then find the corresponding downloaded file through the mapping table, and then immediately render the resource on the screen.
[0099] Under the above framework, the overall resource loading solution can be expressed as the following steps:
[0100] 1) The user starts the application, and the application requests the server to obtain the resource location model list of the user;
[0101] 2) Clean up the local model list cache and clear out the local cache files of all models whose effective time exceeds the current time;
[0102] 3) Parse the model list, remove the resource models that are not in the list at the time, and establish a mapping between the position and the model. Only the model with higher priority is retained in the same position;
[0103] 4) Traverse the remaining model list and create a local mapping table for the models that do not have a local mapping;
[0104] 5) In the process of establishing the local mapping table, the remote resource bit link is downloaded to the local, and then the remote link in the model is replaced with the local link. The following strategy can be adopted: select a file sandbox library, name it as the resource bit module, and then establish a secondary directory (such as the homepage banner) according to the location (establish the description of resource bit model 1). Under each secondary directory, download to the corresponding tertiary directory. The tertiary directory is confirmed by the unique identifier of the resource (establish the description of resource bit model 2). Through priority comparison, it is ensured that there is only one 3rd level directory, and the sandbox path of the tertiary directory is recorded in the mapping table established locally.
[0105] 6) When browsing the corresponding resource area, the user can find the corresponding resource bit model according to the location, and then find the corresponding downloaded file through the mapping table, and then immediately render the resource on the screen.
[0106] Further references Figure 6 As an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of an in-application resource loading device. Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0107] like Figure 6 As shown, the in-application resource loading device 600 of this embodiment may include: a resource acquisition request initiating unit 601, a resource information receiving unit 602, a target resource screening unit 603, and a resource loading and displaying unit 604. The resource acquisition request initiating unit 601 is configured to initiate a resource acquisition request including a resource position list according to the started application; wherein the resource position list includes each resource position that needs to display resources; the resource information receiving unit 602 is configured to receive the returned resource information of the candidate resources corresponding to each resource position; the target resource screening unit 603 is configured to screen out the target resources corresponding to each resource position based on the resource information of the candidate resources corresponding to each resource position; and the resource loading and displaying unit 604 is configured to load each target resource to the corresponding resource position to display the in-application resource.
[0108] In this embodiment, in the in-application resource loading device 600, the specific processing of the resource acquisition request initiating unit 601, the resource information receiving unit 602, the target resource screening unit 603, and the resource loading display unit 604 and the technical effects thereof can be referred to in detail. Figure 2 The relevant descriptions of steps 201 - 204 in the corresponding embodiment are not repeated here.
[0109] In some optional implementations of this embodiment, the resource acquisition request initiating unit 601 may be further configured to:
[0110] Initiate a resource acquisition request including a resource bit list to a server matching the application program according to the received application program start signal;
[0111] The resource information receiving unit 602 may be further configured to:
[0112] A resource list corresponding to the resource position list returned by the server is received; wherein the resource list records resource information of candidate resources corresponding to each resource position.
[0113] In some optional implementations of this embodiment, the target resource screening unit 603 may include:
[0114] The position screening subunit is configured to screen out a first candidate resource that matches each resource position from the candidate resources according to the resource position information in the resource information;
[0115] A timeliness screening subunit is configured to screen out second candidate resources that meet preset timeliness requirements from the first candidate resources corresponding to each resource position according to the timeliness information in the resource information;
[0116] The user preference screening subunit is configured to screen out third candidate resources that match the user preference of the logged-in user from the second candidate resources corresponding to each resource position respectively according to the user preference information in the resource information;
[0117] The priority screening subunit is configured to screen out the target resource from the third candidate resources corresponding to each resource bit respectively according to the priority information in the resource information.
[0118] In some optional implementations of this embodiment, the location screening subunit is further configured to:
[0119] The candidate resources having resource position numbers consistent with the position numbers of the resource bits are determined as the first candidate resources matching the corresponding resource bits in position.
[0120] In some optional implementations of this embodiment, the priority screening subunit is further configured to:
[0121] The third candidate resources corresponding to each resource bit and having the highest priority are determined as the target resources corresponding to the corresponding resource bit.
[0122] In some optional implementations of this embodiment, the in-application resource loading device 600 may further include:
[0123] The non-identical control unit is configured to control the resource content or resource-oriented object corresponding to the target resource corresponding to each resource bit to be non-identical.
[0124] In some optional implementations of this embodiment, the resource information includes a resource acquisition link, and the resource loading and displaying unit 604 may be further configured to:
[0125] Determine the portion of each target resource that has been stored in the local resource library as the first target resource;
[0126] Determine the part of each target resource except the local target resource as the second target resource;
[0127] Obtain the second target resource from the server through the resource acquisition link of the second target resource, and store it in the local resource library;
[0128] By establishing a mapping relationship between each resource position and the first target resource and the second target resource stored in the local resource library, the first target resource and the second target resource are loaded into the corresponding resource position to display the resources within the application.
[0129] This embodiment exists as a device embodiment corresponding to the above method embodiment. The in-application resource loading device provided by this embodiment, when sensing that a certain application is started, initiates a resource acquisition request containing a resource position list corresponding to the application, thereby receiving the corresponding returned resource information of the candidate resources corresponding to each requested resource position, and then filtering out the target resources corresponding to each resource position according to the resource information of each candidate resource, so as to finally load each target resource to the corresponding resource position for displaying the in-application resource. This scheme initiates a resource acquisition request in the form of a list for all resource positions corresponding to the started application, so that the resource information of all candidate resources can be obtained through only one request processing, thereby realizing unified management and distribution of resources required for the resource positions, and no matter how the application is iterated and updated, only the resource position list needs to be modified to realize fast and convenient management.
[0130] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can implement the in-application resource loading method described in any of the above embodiments when executing.
[0131] According to an embodiment of the present disclosure, the present disclosure further provides a readable storage medium, which stores computer instructions, and the computer instructions are used to enable a computer to implement the in-application resource loading method described in any of the above embodiments when executed.
[0132] According to an embodiment of the present disclosure, the present disclosure further provides a computer program product, which, when executed by a processor, can implement the in-application resource loading method described in any of the above embodiments.
[0133] Figure 7A schematic block diagram of an example electronic device 700 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0134] like Figure 7 As shown, the device 700 includes a computing unit 701, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 702 or a computer program loaded from a storage unit 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the device 700 can also be stored. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0135] A number of components in the device 700 are connected to the I / O interface 705, including: an input unit 706, such as a keyboard, a mouse, etc.; an output unit 707, such as various types of displays, speakers, etc.; a storage unit 708, such as a disk, an optical disk, etc.; and a communication unit 709, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 709 allows the device 700 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0136] The computing unit 701 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 701 performs the various methods and processes described above, such as the in-application resource loading method. For example, in some embodiments, the in-application resource loading method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 708. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 700 via the ROM 702 and / or the communication unit 709. When the computer program is loaded into the RAM 703 and executed by the computing unit 701, one or more steps of the in-application resource loading method described above may be performed. Alternatively, in other embodiments, the computing unit 701 may be configured to perform the in-application resource loading method in any other appropriate manner (e.g., by means of firmware).
[0137] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0138] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0139] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0140] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0141] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0142] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and virtual private servers (VPS) services.
[0143] According to the technical solution of the embodiment of the present disclosure, when a certain application is sensed to be started, a resource acquisition request containing a list of resource positions corresponding to the application is initiated, thereby receiving the corresponding resource information of the candidate resources corresponding to each requested resource position, and then filtering out the target resources corresponding to each resource position according to the resource information of each candidate resource, so as to finally load each target resource to the corresponding resource position for displaying the resources in the application. This solution initiates a resource acquisition request in the form of a list for all resource positions corresponding to the started application, so that the resource information of all candidate resources can be obtained through only one request processing, thereby realizing the unified management and distribution of the resources required for the resource positions, and no matter how the application is iterated and updated, it only needs to modify the resource position list to realize fast and convenient management.
[0144] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0145] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A method for loading resources within an application, comprising: Initiate a resource acquisition request including a resource position list according to the started application; wherein the resource position list includes each resource position of the resource that needs to be displayed; Receive returned resource information of candidate resources corresponding to each of the resource positions; Based on the resource information of the candidate resources corresponding to each of the resource positions, the target resources corresponding to each of the resource positions are screened out; Each of the target resources is loaded into a corresponding resource position to display the resources within the application.
2. The method according to claim 1, wherein: The initiating of a resource acquisition request including a resource bit list according to the started application program includes: Initiate a resource acquisition request including a resource bit list to a server matching the application program according to a received start signal of the application program; The received and returned resource information of the candidate resources corresponding to each of the resource positions includes: A resource list corresponding to the resource position list is received and returned by the server; wherein the resource list records resource information of candidate resources corresponding to each resource position.
3. The method according to claim 1 or 2, wherein: The step of screening out target resources corresponding to each of the resource positions based on the resource information of the candidate resources corresponding to each of the resource positions includes: According to the resource location information in the resource information, a first candidate resource matching the location of each resource is selected from the candidate resources; According to the timeliness information in the resource information, second candidate resources meeting preset timeliness requirements are screened out from the first candidate resources corresponding to each of the resource positions; According to the user preference information in the resource information, a third candidate resource matching the user preference of the logged-in user is screened out from the second candidate resources corresponding to each of the resource positions; The target resource is selected from the third candidate resources corresponding to each of the resource bits according to the priority information in the resource information.
4. The method according to claim 3, wherein: The step of selecting, from the candidate resources, a first candidate resource that matches each of the resource positions in position according to the resource position information in the resource information, comprises: The candidate resources having resource position numbers consistent with the position numbers of the resource bits are determined as first candidate resources that match the corresponding resource bits in position.
5. The method according to claim 3, wherein: The step of selecting the target resource from the third candidate resources respectively corresponding to each of the resource positions according to the priority information in the resource information includes: The third candidate resources corresponding to the resource bits respectively and having the highest priority are determined as the target resources corresponding to the corresponding resource bits.
6. The method according to claim 3, further comprising: The resource contents or resource-oriented objects corresponding to the target resources corresponding to the resource bits are controlled to be different from each other.
7. The method according to claim 2, wherein: The resource information includes a resource acquisition link, and the step of loading each target resource into a corresponding resource position to display the resource within the application includes: Determine the portion of each target resource that has been stored in the local resource library as the first target resource; Determine the part of each of the target resources except the local target resource as the second target resource; Acquire the second target resource from the server through the resource acquisition link of the second target resource, and store it in the local resource library; By establishing a mapping relationship between each resource position and the first target resource and the second target resource stored in the local resource library, the first target resource and the second target resource are loaded into the corresponding resource position to display the resources within the application.
8. An in-application resource loading device, wherein: include: A resource acquisition request initiating unit is configured to initiate a resource acquisition request including a resource position list according to the started application program; wherein the resource position list includes each resource position of the resource that needs to be displayed; A resource information receiving unit, configured to receive returned resource information of candidate resources corresponding to each of the resource positions; A target resource screening unit is configured to screen out target resources corresponding to each of the resource positions based on resource information of candidate resources corresponding to each of the resource positions; The resource loading and displaying unit is configured to load each of the target resources into a corresponding resource position to display the resources within the application.
9. The device according to claim 8, wherein: The resource acquisition request initiating unit is further configured to: Initiate a resource acquisition request including a resource bit list to a server matching the application program according to a received start signal of the application program; The resource information receiving unit is further configured to: A resource list corresponding to the resource position list is received and returned by the server; wherein the resource list records resource information of candidate resources corresponding to each resource position.
10. The device according to claim 8 or 9, wherein: The target resource screening unit comprises: A position screening subunit is configured to screen out first candidate resources that match each of the resource positions in position from the candidate resources according to the resource position information in the resource information; A timeliness screening subunit is configured to screen out second candidate resources that meet preset timeliness requirements from the first candidate resources corresponding to each of the resource positions according to the timeliness information in the resource information; A user preference screening subunit is configured to screen out third candidate resources that match the user preference of the logged-in user from the second candidate resources corresponding to each of the resource positions according to the user preference information in the resource information; The priority screening subunit is configured to screen out the target resource from the third candidate resources corresponding to each of the resource bits according to the priority information in the resource information.
11. The device according to claim 10, wherein: The position screening subunit is further configured to: The candidate resources having resource position numbers consistent with the position numbers of the resource bits are determined as first candidate resources that match the corresponding resource bits in position.
12. The device according to claim 10, wherein: The priority screening subunit is further configured to: The third candidate resources corresponding to the resource bits respectively and having the highest priority are determined as the target resources corresponding to the corresponding resource bits.
13. The method according to claim 10, further comprising: The non-identical control unit is configured to control the resource contents or resource-oriented objects corresponding to the target resources corresponding to each of the resource bits to be non-identical.
14. The device according to claim 9, wherein: The resource information includes a resource acquisition link, and the resource loading and display unit is further configured to: Determine the portion of each target resource that has been stored in the local resource library as the first target resource; Determine the part of each of the target resources except the local target resource as the second target resource; Acquire the second target resource from the server through the resource acquisition link of the second target resource, and store it in the local resource library; By establishing a mapping relationship between each resource position and the first target resource and the second target resource stored in the local resource library, the first target resource and the second target resource are loaded into the corresponding resource position to display the resources within the application.
15. A resource loading system, comprising: The client is used to initiate a resource acquisition request including a resource position list according to the started application, wherein the resource position list includes each resource position of the resource to be displayed; receive the returned resource information of the candidate resources corresponding to each resource position; based on the resource information of the candidate resources corresponding to each resource position, filter out the target resources corresponding to each resource position; load each target resource to the corresponding resource position to display the resource in the application; The server is used to determine the resource information of the candidate resources corresponding to each resource position included in the resource position list according to the received resource acquisition request; and send the resource information to the client.
16. The system of claim 15, wherein: The server is further configured to: update the resource position parameters of the corresponding application according to the received resource position update instruction of the application to obtain a new resource position configuration; in response to the existence of the new resource position configuration in the application corresponding to the resource acquisition request, determine the resource information of the corresponding candidate resource according to the resource position parameters recorded in the new resource position configuration; and send the new resource position configuration to the client together with the resource information; The client is further configured to adjust the resource bits in the application according to the received new resource bit configuration.
17. The system according to claim 16, wherein the resource bit parameter comprises at least one of the following: The number of resource slots, the positions of the resource slots on the interfaces of the application at all levels, the numbers of the resource slots, the associations between different resource slots, and the duration of a single resource displayed by a resource slot.
18. The system according to any one of claims 15 to 17, wherein: The client is also used to: determine a matching target resource location according to a received user voice instruction; and announce the resource content currently loaded in the target resource location in voice form.
19. The system according to any one of claims 15 to 17, wherein: The client is also used to: determine a matching target resource location according to a received user forwarding instruction; and forward the resource content currently loaded in the target resource location to the target address in a preset forwarding encapsulation form.
20. An electronic device, comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the in-application resource loading method according to any one of claims 1 to 7.
21. A non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable the computer to execute the in-application resource loading method according to any one of claims 1 to 7.
22. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the steps of the method for loading resources within an application according to any one of claims 1 to 7.