Resource dynamic management method, system and equipment and storage medium
By using predefined general data structures and differentiated expansion fields in audio and video editing tools, unified and dynamic management of resources is achieved, and the problem of excessive cost caused by scene resource management is solved, and resource update efficiency is improved.
Patent Information
- Application Number
- CN202510095410.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-21
- Publication Date
- 2025-05-23
AI Technical Summary
In audio and video editing tools, resource management in different scenarios leads to excessive management and development costs, and lacks a unified mechanism to maintain the resources required for each function.
By predefined general data structures, resource downloads are performed based on general data structures, and the application logic of resources in corresponding application scenarios is implemented in combination with differentiated expansion fields to achieve unified dynamic management of resources.
Reduce resource management and development costs, realize unified and dynamic management of resources, avoid resource update restrictions, and improve resource update efficiency.
Smart Images

Figure CN120029974A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present application relate to the field of computer technology, and in particular, to a method, system, device, and storage medium for dynamic resource management. Background Art
[0002] Currently, in the application scenarios of audio and video editing tools, it is often necessary to dynamically manage various media resources (such as audio, pictures, face stickers, special effects, filters, subtitles, etc.). When performing dynamic resource management, configuration management, material management, model management, model application, etc. are usually implemented separately for different usage scenarios, so as to reduce the data volume of the resource package and ensure that the resources can be updated dynamically in real time.
[0003] However, in order to meet the usage requirements of different scenarios (filters, beauty effects, face stickers, special effects, sound effects, transition effects, etc.), it is necessary to implement the management configuration of all scenarios. For example, for the face sticker scenario, it is necessary to determine which stickers are configured on the current face sticker panel and which models the stickers depend on; for the filter scenario, it is necessary to determine which filter effects are configured on the current filter panel, what is the default intensity of the filter effect, and what is the intensity of the filter selected by the user recorded, etc. Due to the differences in these scenarios, configuration management, material management, model management, model application, etc. need to be implemented separately for different usage scenarios, which will result in too high maintenance and management costs. In the case of a large number of usage scenario types, its development efficiency and cost are also relatively high. Summary of the Invention
[0004] Embodiments of the present application provide a method, system, device, and storage medium for dynamic resource management, which can realize unified dynamic management of resources, reduce resource management and development costs, and solve the technical problem of excessive management and development costs caused by resource management by scenarios.
[0005] In a first aspect, embodiments of the present application provide a method for dynamic resource management, including:
[0006] In response to an application request for a target resource, obtain a predefined general data structure of the target resource, where the general data structure includes material configuration information and calculation model configuration information of the target resource, and the material configuration information includes a differential expansion field, and the differential expansion field records differential application configuration information of the target resource in the corresponding application scenario;
[0007] Download the corresponding material file based on the material configuration information, and download the corresponding model file based on the calculation model configuration information;
[0008] Execute the resource application logic of the target resource in the corresponding application scenario based on the differential expansion field, the material file, and the model file.
[0009] In a second aspect, an embodiment of the present application provides a resource dynamic management system, including:
[0010] An acquisition module is configured to, in response to a received application request of a target resource, acquire a predefined general data structure of the target resource, the general data structure including material configuration information and computing model configuration information of the target resource, the material configuration information including a differential extension field, the differential extension field recording differential application configuration information of the target resource in a corresponding application scenario;
[0011] A download module, configured to download corresponding material files based on material configuration information, and to download corresponding model files based on calculation model configuration information;
[0012] The application module is configured to execute the resource application logic of the target resource in the corresponding application scenario based on the differentiated extension fields, material files and model files.
[0013] In a third aspect, an embodiment of the present application provides a resource dynamic management device, including:
[0014] memory and one or more processors;
[0015] The memory is configured to store one or more programs;
[0016] When the one or more programs are executed by the one or more processors, the one or more processors implement the resource dynamic management method as described in the first aspect.
[0017] In a fourth aspect, an embodiment of the present application provides a non-volatile computer-readable storage medium, which stores computer-executable instructions, and the computer-executable instructions, when executed by a computer processor, are configured to execute the resource dynamic management method as described in the first aspect.
[0018] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes instructions. When the instructions are executed on a computer or a processor, the computer or the processor executes the resource dynamic management method as described in the first aspect.
[0019] The embodiment of the present application obtains a predefined general data structure of the target resource in response to the received application request of the target resource, the general data structure includes the material configuration information and the calculation model configuration information of the target resource, the material configuration information includes the differential extension field, and the differential extension field records the differential application configuration information of the target resource in the corresponding application scenario; downloads the corresponding material file based on the material configuration information, and downloads the corresponding model file based on the calculation model configuration information; executes the resource application logic of the target resource in the corresponding application scenario based on the differential extension field, the material file and the model file. The above technical means are adopted, through pre-defining the general data structure, downloading resources based on the general data structure, and executing the application logic of the resource in the corresponding application scenario in combination with the differential extension field of the general data structure, so that resources in different scenarios can be uniformly configured, downloaded and applied based on the general data structure, realizing the unified dynamic management of resources and reducing the cost of resource management and development. And different resource updates do not need to be executed in the same resource package, thereby avoiding the restriction of resource updates and improving the efficiency of resource updates. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 is a flow chart of a resource dynamic management method provided by an embodiment of the present application;
[0021] Figure 2 is a schematic diagram of a general data structure in an embodiment of the present application;
[0022] Figure 3 This is a schematic diagram of configuration pulling based on a multi-tag nested structure in an embodiment of the present application;
[0023] Figure 4 It is a schematic diagram of a resource download node in an embodiment of the present application;
[0024] Figure 5 is a schematic diagram of resource update in an embodiment of the present application;
[0025] Figure 6 It is a structural diagram of a resource dynamic management system provided by an embodiment of the present application;
[0026] Figure 7 It is a structural diagram of a resource dynamic management device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0027] In order to make the purpose, technical scheme and advantages of the present application clearer, the specific embodiments of the present application are further described in detail below in conjunction with the accompanying drawings. It is understood that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for the convenience of description, only the part related to the present application but not all the contents are shown in the accompanying drawings. Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow chart describes each operation (or step) as a sequential process, many of the operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of each operation can be rearranged. The process can be terminated when its operation is completed, but it can also have additional steps not included in the accompanying drawings. The process can correspond to a method, a function, a procedure, a subroutine, a subprogram, etc.
[0028] The resource dynamic management method provided in this application aims to download resources based on the general data structure through pre-defined general data structures, and execute the application logic of resources in corresponding application scenarios in combination with differentiated extended fields of the general data structure, so that resources in different scenarios can be uniformly configured, downloaded and applied based on the general data structure, thereby realizing unified dynamic management of resources.
[0029] In the application scenarios of audio and video editing tools, whether it is professional software on the desktop or lightweight editing tools on the mobile side, it is necessary to dynamically manage various media resources (audio, pictures, face stickers, special effects, filters, subtitles, etc.). Related audio and video editing tools usually have the following two ways to manage resources: one is to package all the dependent resources into the tool. This method is relatively simple, but it will increase the size of the tool package, and the update of resources is affected by the tool update logic, which is easy to lead to update restrictions. This disadvantage is not friendly to mobile applications that are frequently updated and sensitive to the package. The other is to dynamically download the dependent resources. This method does not increase the package size and can dynamically update resources. However, in order to meet the use of different scenarios (filters, beauty, face stickers, special effects, sound effects, transition effects, etc.), it is necessary to implement the management configuration of all scenarios. For example, for the face sticker scene, it is necessary to determine which stickers are configured on the current face sticker panel and which models the stickers depend on; for the filter scene, it is necessary to determine which filter effects are configured on the current filter panel, what is the default strength of the filter effect, what is the filter strength selected by the recorded user, etc. Due to the differences in these scenarios, it is necessary to implement configuration management, material management, model management, model application and other logics for different usage scenarios. Therefore, although dynamic download of resources can be achieved, the maintenance and management costs will be too high. In the case of more usage scenarios, the development efficiency and cost are relatively high. There is a lack of a unified mechanism to maintain the resources (materials or models) required for each function of the entire editing tool.
[0030] Based on this, the embodiment of the present application provides a method for dynamic resource management to solve the technical problem that resource management by scenario leads to excessive management and development costs. In view of the current situation of resource management by audio and video editing tools, a set of general dynamic resource management solutions is provided to realize the entire resource management process of resource configuration pulling, resource downloading and application, update and disaster recovery processing.
[0031] For audio and video editing tools, resources are the main line throughout the entire tool capabilities, and resource updates are very frequent. As the tool scenarios continue to increase and the complexity and differences of the scenarios, the resource management and development of the entire tool will become more and more complicated. For this reason, this application proposes a set of general dynamic resource management solutions, which realizes the dynamic management of resources by implementing the entire process of resource configuration pulling, resource downloading, updating and disaster recovery processing, so that all scenarios are integrated into this solution, and there is no need to implement dynamic management solutions for each scenario, thereby greatly reducing development and maintenance costs.
[0032] Example:
[0033] Figure 1A flow chart of a resource dynamic management method provided in an embodiment of the present application is given. The resource dynamic management method provided in this embodiment can be executed by a resource dynamic management device, which can be implemented by software and / or hardware. The resource dynamic management device can be composed of two or more physical entities, or can be composed of one physical entity. Generally speaking, the resource dynamic management device can be a terminal device such as a computer, a mobile phone, or a tablet.
[0034] The following description is made by taking the resource dynamic management device as an example to describe the subject of the resource dynamic management method. Figure 1 , the resource dynamic management method specifically includes:
[0035] S110. In response to the received application request of the target resource, obtain a predefined general data structure of the target resource, the general data structure includes material configuration information and computing model configuration information of the target resource, the material configuration information includes a differentiated extension field, and the differentiated extension field records the differentiated application configuration information of the target resource in the corresponding application scenario.
[0036] This application uses a common data structure to manage resource configuration. When a user or system requests to apply a resource (such as using a specific filter, face sticker, etc.), this step triggers the resource dynamic management process, first obtaining the common data structure of the corresponding resource to pull the configuration information of the corresponding resource.
[0037] Among them, the resource that currently needs to be applied is defined as the target resource. Each resource (such as filters, stickers, etc.) has a predefined general data structure in the system. This structure contains the material configuration information and calculation model configuration information of the resource. The material configuration information describes the relevant configuration information of the material files (such as pictures, audio, etc.) required for the resource, such as material ID, material address, etc. The calculation model configuration information describes the relevant configuration information of the calculation model (such as AI model, filter algorithm, etc.) required for resource application processing, such as model ID, model address, etc. For the above-mentioned target resources, by pulling the general data structure to read the material configuration information and calculation model configuration information therein, the resource management process such as downloading and applying the resources can be performed according to these configuration information.
[0038] In addition, the material configuration information also needs to include a differentiated extension field, which is used to record the differentiated application configuration information of the corresponding resources in the corresponding application scenarios. It is understandable that different application scenarios will use different fields to set different effects. For example, the beauty scene will focus on the settings of face slimming and whitening effects; the transition special effects scene will set whether a transition transition is required, the filter scene will set the filter strength, and the sound effect scene will set the start and end time of the sound effect, etc. These are differentiated fields needed for different scenarios. In addition, for the same application scenario, different differentiated extension fields of resources can also be configured to achieve different application effects. Such as the strength of the beauty filter, etc.
[0039] Reference Figure 2 When configuring resources, the resource configuration information corresponding to each scene is abstracted into a common data structure, namely, the common data structure. Among them, for the resource configuration information, first remove the differentiated fields of each scene of audio and video editing in the resource configuration information, abstract the necessary fields and core processes in resource management, and put the differentiated fields into the extra extension field, namely, the differentiated extension field. In this way, the material configuration information and model configuration information corresponding to a resource are obtained.
[0040] In addition, for the resource configuration pulled, in addition to considering the general data structure of a single resource, it is also necessary to consider whether the panel corresponding to the current target resource supports the form of nested multiple tags (such as clicking a tag on the page to enter the next tag form). Therefore, the general data structure can be a nested structure. The general data structure is as follows: Figure 3 As shown. The resources of each scenario only need to be configured to support multi-tag nested structure, and the corresponding configuration information is configured in the multi-tag nested structure field to indicate whether the general data structure needs to be pulled in pages. There is no need to implement specific pulling logic, and the pulling of differentiated resource configuration in the multi-tag nested form can be realized.
[0041] Furthermore, based on the general data structure ResourceItem abstracted from the resources of each scenario, the resource loading method loadResouce is implemented through the general data structure ResourceItem. The resource loading method loadResouce contains a whole set of processes such as resource download, update, and disaster recovery. Each application scenario only needs to call this general resource loading method loadResouce to complete the resource dynamic management process, without the need to develop resource management logic for each application scenario separately.
[0042] When pulling the general data structure ResourceItem for resource configuration, you can pull the configuration list of the general data structure in the form of multi-tag nesting or single-tag general data structure according to different scenarios. In addition, for general data structures in the form of multi-tag nesting and single-tag, you can pull the paging configuration list. The specific general data structure configuration pull form can be specified in the form of an interface through panel parameters, and there is no fixed restriction here.
[0043] like Figure 3 As shown, taking the paging configuration list pulling in the form of multi-label nesting as an example, the method loadResourceConfig for loading resource configuration is implemented in the base class of resource management. loadResourceConfig pulls the general data structure of the first page of data, and saves the currently pulled general data structure as configuration list data. Returns a list of multiple tags, and records the associated ID information LastID of the configuration list of each current tag Tab, so as to use the associated ID information LastID to associate the pulling of the general data structure of the next page of resources. When pulling the next page of general data structure, the associated ID information LastID corresponding to these multiple tags Tab is used as a parameter to continue pulling, and then the data of the next page is pulled, so as to continue to save the currently pulled configuration list data. And so on, until the configuration list pulling in the form of multi-label nesting is completed, so as to obtain the resource configuration information of the multi-label nested structure corresponding to the target resource. Optionally, by providing a panel parameter interface, each panel can specify how the corresponding resource pulls the resource configuration, such as whether to paginate, the number of lists pulled per page, etc. Furthermore, according to the above configuration, the general data structure corresponding to the target resource can be adaptively acquired, thereby obtaining relevant resource configuration information corresponding to the target resource.
[0044] S120: Download corresponding material files based on the material configuration information, and download corresponding model files based on the calculation model configuration information.
[0045] Furthermore, based on the general data structure of the target resource pulled above, the material configuration information and model configuration information can be extracted, and the required material files can be downloaded from the resource server according to the material configuration information, and the required calculation model files can be downloaded according to the calculation model configuration information. Based on the resource loading method loadResource implemented in the base class of resource management, since it internally implements the resource download and update process, by calling the resource loading method loadResource, the corresponding material files and calculation model files can be downloaded in combination with the general data structure. Optionally, the resource loading method loadResource uses the model as a basic public capability, which can be reused by various scenarios, so there is no need to repeatedly download the model file, so as to improve the efficiency of resource download and update.
[0046] Downloading corresponding material files based on material configuration information and downloading corresponding model files based on calculation model configuration information include:
[0047] Building a download node based on the general data structure, the download node including a material sub-node built corresponding to the material configuration information and a model sub-node built corresponding to the calculation model configuration information;
[0048] The download node is added to the pre-built download queue, and the download process of the material sub-node and the model sub-node in the download node is executed based on the download queue to obtain the corresponding material files and model files.
[0049] For resource download, models and materials are both files, but the file formats and contents may be different. Therefore, in the process of resource download expansion, the two are generalized, that is, the general data structure ResourceItem of the target resource is converted into the download node ResourceItemNode. Both materials and models are subnodes ResourceIdNode in the download node ResourceItemNode, but the types are different.
[0050] When the target resource needs to be downloaded, the converted download node ResourceItemNode is added to the download queue, and then all the target resource's child nodes ResourceIdNode (material or model file) to be downloaded are added to the download node ResourceItemNode. Figure 4 When multiple resources need to be loaded at the same time, the nodes to be downloaded (materials or model files) can form a tree structure, through which the download of the resources corresponding to each download node is completed.
[0051] Optionally, the material configuration information includes a material ID, a material address, and a material storage path, and the model configuration information includes a model ID, a model address, and a model storage path;
[0052] Execute the download process of the material sub-node and the model sub-node in the download node based on the download queue to obtain the corresponding material files and model files, including:
[0053] Access the material address based on the material sub-node to download the material file corresponding to the material ID, and store the material file in the local material storage path;
[0054] Based on the model subnode, access the model address to download the model file corresponding to the model ID, and store the model file in the local model storage path.
[0055] Reference Figure 2 , the material configuration information may include the material ID (used to uniquely identify the material), the material address (the network download path of the material file), and the material storage path (the location where the material file is stored locally). The model configuration information may include the model ID (used to uniquely identify the model), the model address (the network download path of the model file), and the model storage path (the location where the model file is stored locally).
[0056] Based on the download queue maintained above, for the material subnode of the download node, it is used to represent the material file that needs to be downloaded. When the system processes the material subnode, it will access the corresponding network resource according to the material address in the material configuration information, download the material file with a specific material ID, and store it in the local material storage path. For the model subnode, it is used to represent the model resource that needs to be downloaded. When the system processes the model subnode, it will access the corresponding network resource according to the model address in the model configuration information, download the model file with a specific model ID, and store it in the local model storage path.
[0057] Optionally, the material configuration information includes material MD5 verification information, and the model configuration information includes model MD5 verification information;
[0058] Store the material files in the local material storage path, including:
[0059] Extract the material MD5 subfile contained in the material file, compare the material MD5 subfile based on the material MD5 verification information, and store the material file in the local material storage path when the material MD5 verification information matches the material MD5 subfile;
[0060] Store the model file in the local model storage path, including:
[0061] Extract the model MD5 subfile contained in the model file, compare the model MD5 subfile based on the model MD5 verification information, and store the model file in the local model storage path when the model MD5 verification information matches the model MD5 subfile.
[0062] After each material file or model file is downloaded, check whether the MD5 sub-file in the current material file or model file is consistent with the MD5 verification information configured and sent in the general data structure. If the MD5 verification is inconsistent, report the resource exception so that the subsequent server can handle the abnormal resource according to the resource exception. If the MD5 verification is consistent, continue to decompress it to the file directory specified in the storage path (material storage path or model storage path) in the general data structure resource configuration. And persistently record the currently downloaded child node ResourceIdNode (material or model), and check whether the material and all dependent models and other child nodes in the current resource download node ResourceItemNode have been completely downloaded. If they have all been downloaded, remove the download node ResourceItemNode from the queue to be downloaded, and notify the caller that the target resource has been completely downloaded.
[0063] For example, refer to Figure 5 , in the process of downloading the target resource, first determine whether the material file and model file of the current target resource already exist locally. If so, there is no need to download, and directly delete the general data structure information pulled by the target resource. If the current material or the dependent model only partially exists, the corresponding download process needs to be executed.
[0064] Furthermore, after completing the resource download, the material and model are further verified by MD5. If the verification is inconsistent, the downloaded material and model files need to be updated until the MD5 verification is consistent, so as to proceed with the subsequent resource application process. Optionally, when updating resources, the resource version can also be automatically updated each time the file is updated, and the current resource version and the newly pulled resource version are compared. If the resource version becomes larger, it means that the resource has been updated.
[0065] Optionally, the material configuration information includes a multi-tag nested structure field;
[0066] After obtaining the corresponding material files and model files, it also includes:
[0067] The general data structure of the next layer of nested associated resources of the target resource is obtained based on the multi-tag nested structure field, so as to download and apply the associated resources based on the general data structure of the associated resources.
[0068] After obtaining the material files and model files of the target resource, the system will recursively obtain the general data structure of other resources associated with the target resource based on the multi-tag nested structure field in the material configuration information. The multi-tag nested structure field records the associated ID information LastID of the next nested resource. The general data structure of the next nested resource can be pulled through the associated ID information LastID. The general data structure of these associated resources also contains material configuration information and model configuration information, as well as possible multi-tag nested structure fields, thereby forming a multi-tag nested resource structure.
[0069] For each associated resource obtained, the system will repeat the above-mentioned material file and model file download process, that is, download the corresponding material files and model files based on their material configuration information and model configuration information. After the download is completed, the system will execute the resource application logic in the corresponding application scenario according to the differentiated extension fields, material files and model files in the common data structure of the associated resources, thereby realizing the download and application management of the associated resources.
[0070] S130: Execute resource application logic of target resources in corresponding application scenarios based on differentiated extension fields, material files and model files.
[0071] Furthermore, by using the downloaded material files and model files, combined with the configuration information in the differential extension field, the application logic of the target resource in a specific application scenario can be executed. For example, for a face sticker resource (i.e., material file), the differential extension field contains information such as the sticker's position, size, and rotation angle. Based on this information, the system will use the processing model (model file) corresponding to the face to correctly apply the sticker to the face image, thereby realizing the application of the resource.
[0072] Based on this resource dynamic management method, dynamic resource management can be achieved in various scenarios. By downloading target resources on demand, it can not only meet the needs of rapid resource updates, but also compress the size of the installation package. And through a set of generalized resource management mechanisms, the fragmentation problem of resource management in various scenarios can be solved, thereby greatly reducing development and maintenance costs.
[0073] Specifically, the material configuration information includes a material dependency model field;
[0074] Execute the resource application logic of the target resource in the corresponding application scenario based on the differentiated extension fields, material files and model files, including:
[0075] Query the material storage path to extract the material file, and query the corresponding model storage path based on the material dependent model field to obtain the model file;
[0076] The model file is processed for resource application based on the model file and the differential extension fields to generate the application results of the target resources.
[0077] The material dependency model field in the material configuration information is used to specify the model that a certain material needs to rely on during processing or rendering. This field usually contains the ID or reference of the model, and the system can find and load the corresponding model file based on this information. Among them, the system first extracts the required material files from the local storage according to the material storage path in the material configuration information. Then the system queries the corresponding model storage path according to the model ID or reference specified in the material dependency model field, and extracts the required model files from the local storage.
[0078] After obtaining the material file and model file, the system will configure and initialize the model file accordingly according to the configuration information in the differential extension field (such as processing parameters, effect strength, etc.). Then, the system uses the corresponding model to process the material file and generate the application result of the target resource.
[0079] By proposing a generalized universal data structure to configure resources, the resources in each scene are abstracted into this generalized data structure. This universal data structure is used to implement a set of universal configuration data pulling and storage. This avoids the tedious process of each scene implementing this process, and improves the development efficiency of resource configuration. After implementing the universal resource configuration pulling, a universal resource downloading solution is proposed. The materials and models are generalized as download sub-nodes, thus avoiding the implementation of the internal details of the materials and models in each scene, and facilitating the reuse of downloaded sub-nodes.
[0080] Optionally, after downloading the corresponding material file based on the material configuration information and downloading the corresponding model file based on the calculation model configuration information, the method further includes:
[0081] Count the number of resource anomalies of material files and model files. When the number of resource anomalies reaches the set threshold, shut down the resource application service of the target resource.
[0082] The above MD5 check is used to determine whether a resource is abnormal and to count the number of resource anomalies. When the number of resource anomalies reaches a certain threshold, the server automatically removes the resource. The corresponding resource configuration cannot be pulled subsequently, and the client cannot find the application item of the resource, thereby shielding the problem resource and achieving resource anomaly disaster recovery.
[0083] In the above, by responding to the received application request of the target resource, a predefined general data structure of the target resource is obtained, the general data structure includes the material configuration information and the calculation model configuration information of the target resource, the material configuration information includes the differential extension field, and the differential extension field records the differential application configuration information of the target resource in the corresponding application scenario; the corresponding material file is downloaded based on the material configuration information, and the corresponding model file is downloaded based on the calculation model configuration information; the resource application logic of the target resource in the corresponding application scenario is executed based on the differential extension field, the material file and the model file. The above technical means are adopted, by predefining a general data structure, downloading resources based on the general data structure, and executing the application logic of the resource in the corresponding application scenario in combination with the differential extension field of the general data structure, so that resources in different scenarios can be uniformly configured, downloaded and applied based on the general data structure, realizing unified dynamic management of resources and reducing resource management and development costs. In addition, different resource updates do not need to be executed in the same resource package, thereby avoiding restrictions on resource updates and improving resource update efficiency.
[0084] Based on the above embodiments, Figure 6 A schematic diagram of the structure of a resource dynamic management system provided by this application. Figure 6 The resource dynamic management system provided in this embodiment specifically includes: an acquisition module 21, a download module 22 and an application module 23.
[0085] The acquisition module 21 is configured to, in response to the received application request of the target resource, acquire a predefined general data structure of the target resource, the general data structure including material configuration information and computing model configuration information of the target resource, the material configuration information including a differential extension field, the differential extension field recording the differential application configuration information of the target resource in the corresponding application scenario;
[0086] A download module 22, configured to download corresponding material files based on material configuration information, and to download corresponding model files based on calculation model configuration information;
[0087] The application module 23 is configured to execute the resource application logic of the target resource in the corresponding application scenario based on the differentiated extension fields, material files and model files.
[0088] Specifically, downloading corresponding material files based on material configuration information and downloading corresponding model files based on calculation model configuration information include:
[0089] Building a download node based on the general data structure, the download node including a material sub-node built corresponding to the material configuration information and a model sub-node built corresponding to the calculation model configuration information;
[0090] The download node is added to the pre-built download queue, and the download process of the material sub-node and the model sub-node in the download node is executed based on the download queue to obtain the corresponding material files and model files.
[0091] The material configuration information includes the material ID, material address and material storage path, and the model configuration information includes the model ID, model address and model storage path;
[0092] Execute the download process of the material sub-node and the model sub-node in the download node based on the download queue to obtain the corresponding material files and model files, including:
[0093] Access the material address based on the material sub-node to download the material file corresponding to the material ID, and store the material file in the local material storage path;
[0094] Based on the model subnode, access the model address to download the model file corresponding to the model ID, and store the model file in the local model storage path.
[0095] The material configuration information includes the material MD5 verification information, and the model configuration information includes the model MD5 verification information;
[0096] Store the material files in the local material storage path, including:
[0097] Extract the material MD5 subfile contained in the material file, compare the material MD5 subfile based on the material MD5 verification information, and store the material file in the local material storage path when the material MD5 verification information matches the material MD5 subfile;
[0098] Store the model file in the local model storage path, including:
[0099] Extract the model MD5 subfile contained in the model file, compare the model MD5 subfile based on the model MD5 verification information, and store the model file in the local model storage path when the model MD5 verification information matches the model MD5 subfile.
[0100] The material configuration information includes a material dependency model field;
[0101] Execute the resource application logic of the target resource in the corresponding application scenario based on the differentiated extension fields, material files and model files, including:
[0102] Query the material storage path to extract the material file, and query the corresponding model storage path based on the material dependent model field to obtain the model file;
[0103] The model file is processed for resource application based on the model file and the differential extension fields to generate the application results of the target resources.
[0104] The material configuration information includes multi-tag nested structure fields;
[0105] After obtaining the corresponding material files and model files, it also includes:
[0106] The general data structure of the next layer of nested associated resources of the target resource is obtained based on the multi-tag nested structure field, so as to download and apply the associated resources based on the general data structure of the associated resources.
[0107] Specifically, after downloading the corresponding material file based on the material configuration information and downloading the corresponding model file based on the calculation model configuration information, the method further includes:
[0108] Count the number of resource anomalies of material files and model files. When the number of resource anomalies reaches the set threshold, close the resource application service of the target resource.
[0109] In the above, by responding to the received application request of the target resource, a predefined general data structure of the target resource is obtained, the general data structure includes the material configuration information and the calculation model configuration information of the target resource, the material configuration information includes the differential extension field, and the differential extension field records the differential application configuration information of the target resource in the corresponding application scenario; the corresponding material file is downloaded based on the material configuration information, and the corresponding model file is downloaded based on the calculation model configuration information; the resource application logic of the target resource in the corresponding application scenario is executed based on the differential extension field, the material file and the model file. The above technical means are adopted, by predefining a general data structure, downloading resources based on the general data structure, and executing the application logic of the resource in the corresponding application scenario in combination with the differential extension field of the general data structure, so that resources in different scenarios can be uniformly configured, downloaded and applied based on the general data structure, realizing unified dynamic management of resources and reducing resource management and development costs. In addition, different resource updates do not need to be executed in the same resource package, thereby avoiding restrictions on resource updates and improving resource update efficiency.
[0110] The resource dynamic management system provided in the embodiment of the present application can be configured to execute the resource dynamic management method provided in the above embodiment, and has corresponding functions and beneficial effects.
[0111] Based on the above practical example, the present application embodiment also provides a resource dynamic management device, referring to Figure 7, the resource dynamic management device includes: a processor 31, a memory 32, a communication module 33, an input device 34 and an output device 35. The memory, as a computer-readable storage medium, can be configured to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the resource dynamic management method described in any embodiment of the present application (for example, the acquisition module, download module and application module in the resource dynamic management system). The communication module is configured to perform data transmission. The processor executes various functional applications and data processing of the device by running the software programs, instructions and modules stored in the memory, that is, realizes the above-mentioned resource dynamic management method. The input device can be configured to receive input digital or character information, and generate key signal input related to the user settings and function control of the device. The output device may include a display device such as a display screen. The resource dynamic management device provided above can be configured to execute the resource dynamic management method provided in the above-mentioned embodiment, and has corresponding functions and beneficial effects.
[0112] On the basis of the above embodiments, the embodiments of the present application further provide a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores computer-executable instructions, wherein the computer-executable instructions are configured to execute a resource dynamic management method when executed by a computer processor, and the storage medium may be any of various types of memory devices or storage devices. Of course, the non-volatile computer-readable storage medium provided in the embodiments of the present application, whose computer-executable instructions are not limited to the resource dynamic management method described above, may also execute related operations in the resource dynamic management method provided in any embodiment of the present application.
[0113] On the basis of the above embodiments, the embodiments of the present application also provide a computer program product. The essence of the technical solution of the present application or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer program product is stored in a storage medium, including a number of instructions for enabling a computer device, a mobile terminal or a processor therein to execute all or part of the steps of the resource dynamic management method described in each embodiment of the present application.
Claims
1. A resource dynamic management method, characterized in that: include: In response to the received application request of the target resource, a predefined general data structure of the target resource is obtained, the general data structure including material configuration information and computing model configuration information of the target resource, the material configuration information including a differential extension field, the differential extension field recording the differential application configuration information of the target resource in the corresponding application scenario; Download the corresponding material file based on the material configuration information, and download the corresponding model file based on the calculation model configuration information; The resource application logic of the target resource in the corresponding application scenario is executed based on the differential extension field, the material file and the model file.
2. The resource dynamic management method according to claim 1, characterized in that: The downloading of the corresponding material file based on the material configuration information and the downloading of the corresponding model file based on the calculation model configuration information include: Constructing a download node based on the general data structure, the download node including a material sub-node constructed corresponding to the material configuration information and a model sub-node constructed corresponding to the calculation model configuration information; The download node is added to a pre-built download queue, and the download process of the material sub-node and the model sub-node in the download node is executed based on the download queue to obtain the corresponding material file and model file.
3. The resource dynamic management method according to claim 2, characterized in that: The material configuration information includes a material ID, a material address and a material storage path, and the model configuration information includes a model ID, a model address and a model storage path; The download process of executing the material sub-node and the model sub-node in the download node based on the download queue to obtain the corresponding material file and model file includes: Accessing the material address based on the material subnode to download the material file corresponding to the material ID, and storing the material file in the local material storage path; Based on the model child node, the model address is accessed to download the model file corresponding to the model ID, and the model file is stored in the local model storage path.
4. The resource dynamic management method according to claim 3, characterized in that: The material configuration information includes material MD5 verification information, and the model configuration information includes model MD5 verification information; The step of storing the material file in the local material storage path includes: Extracting a material MD5 subfile contained in the material file, comparing the material MD5 subfile based on the material MD5 verification information, and storing the material file in the local material storage path when the material MD5 verification information matches the material MD5 subfile; The step of storing the model file in the local model storage path includes: Extract the model MD5 subfile contained in the model file, compare the model MD5 subfile based on the model MD5 verification information, and store the model file in the local model storage path when the model MD5 verification information matches the model MD5 subfile.
5. The resource dynamic management method according to claim 3, characterized in that: The material configuration information includes a material dependency model field; The resource application logic of executing the target resource in the corresponding application scenario based on the differential extension field, the material file and the model file includes: Query the material storage path to extract the material file, and query the corresponding model storage path based on the material dependency model field to obtain the model file; The model file is subjected to resource application processing based on the model file and the differential extension field to generate an application result of the target resource.
6. The resource dynamic management method according to claim 2, characterized in that: The material configuration information includes a multi-tag nested structure field; After obtaining the corresponding material files and model files, the method further includes: The general data structure of the next-layer nested associated resource of the target resource is acquired based on the multi-tag nested structure field, so as to download and apply the associated resource based on the general data structure of the associated resource.
7. The resource dynamic management method according to any one of claims 1 to 6, characterized in that: After downloading the corresponding material file based on the material configuration information and downloading the corresponding model file based on the calculation model configuration information, the method further includes: The resource anomaly times of the material file and the model file are counted, and when the resource anomaly times reach a set threshold, the resource application service of the target resource is closed.
8. A resource dynamic management system, characterized in that: include: an acquisition module, configured to, in response to a received application request of a target resource, acquire a predefined general data structure of the target resource, wherein the general data structure includes material configuration information and computing model configuration information of the target resource, wherein the material configuration information includes a differential extension field, and the differential extension field records differential application configuration information of the target resource in a corresponding application scenario; A download module, configured to download corresponding material files based on the material configuration information, and to download corresponding model files based on the calculation model configuration information; The application module is configured to execute the resource application logic of the target resource in the corresponding application scenario based on the differential extension field, the material file and the model file.
9. A resource dynamic management device, characterized in that: include: memory and one or more processors; The memory is configured to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the resource dynamic management method as described in any one of claims 1-7.
10. A non-volatile computer-readable storage medium, characterized in that: The non-volatile computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a computer processor, the computer-executable instructions are configured to execute the resource dynamic management method according to any one of claims 1 to 7.
11. A computer program product, characterized in that The computer program product includes instructions, and when the instructions are executed on a computer or a processor, the computer or the processor executes the resource dynamic management method according to any one of claims 1 to 7.