Application skin resource management method, device, equipment and computer readable storage medium
By configuring application skin resources into the skin resource components and adjusting the development framework to match the main engineering level, the problem of the repeated introduction of application skin resources has been solved, and the optimization of resource management and the improvement of development efficiency has been achieved.
Patent Information
- Application Number
- CN202210074641.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-21
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2042-01-21
AI Technical Summary
In the prior art, repeated introduction of application skin resources leads to the problem of increasing application size.
By obtaining the application skin resources and configuring it into the application's skin resource component, check whether the build script of the application to be compiled includes dynamic skin identifiers. If so, adjust the development framework so that the level of the skin resource component is the same as that of the main project, so as to ensure that the business components in the compiled application can call the application skin resources in the skin resource component.
This avoids the additional increase in the size of the application due to the repeated introduction of the same application skin resources, and improves the application development efficiency and resource management optimization effect.
Smart Images

Figure CN114398037B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of application resource management, and in particular to an application skin resource management method, device, equipment and computer-readable storage medium. Background Art
[0002] In the field of application resource management, application skin resource management refers to allowing computers to automatically identify application skin resources and manage application skin resources, which is of great significance in avoiding repeated introduction of the same application skin resources.
[0003] Each application contains a large number of application skin resources such as pictures, colors, animations, etc. During the application development phase, the application skin resources need to be managed. At present, the industry generally compiles application skin resources such as pictures, colors, animations, etc. into skin resource packages, and places the application skin resources in the skin resource packages in the corresponding locations through the application skin framework and loads them for use. Application skin resources placed in different locations cannot be universal. Therefore, even if the same application skin resources such as pictures, colors, animations, etc. are referenced in different locations of the application, the corresponding application skin resources need to be copied multiple times, renamed, and compressed into skin resource packages, which are loaded into the corresponding locations for use through the skin framework. The scattered placement of application skin resources is prone to additionally increase the size of the application due to repeated introduction of the same application skin resources. Summary of the invention
[0004] The main purpose of the present application is to provide an application skin resource management method, device, equipment and computer-readable storage medium, aiming to avoid additional increase in application size due to repeated introduction of the same application skin resources.
[0005] In a first aspect, the present application provides an application skin resource management method, the application skin resource management method comprising the following steps:
[0006] Acquire application skin resources, and configure the application skin resources into the skin resource component of the application;
[0007] Detect whether the build script of the application to be compiled includes a dynamic skin identifier;
[0008] If the construction script of the application includes a dynamic skin identifier, adjusting the development framework of the application so that the level of the skin resource component in the adjusted development framework is the same as the level of the main project of the application, the construction script is used to indicate the level of the development framework;
[0009] Based on the adjusted development framework, the application is compiled to obtain a compiled application, wherein the business components, basic business components and basic components in the compiled application can call the application skin resources in the skin resource component.
[0010] In a second aspect, the present application further provides an application skin resource management device, the skin resource management device comprising:
[0011] An acquisition module, used to acquire application skin resources and configure the application skin resources into a skin resource component of an application;
[0012] A detection module, used to detect whether a build script of an application to be compiled includes a dynamic skin identifier;
[0013] An adjustment module, for adjusting the development framework of the application if the construction script of the application includes a dynamic skin identifier, so that the level of the skin resource component in the adjusted development framework is the same as the level of the main project of the application, and the construction script is used to indicate the level of the development framework;
[0014] The compiling module is used to compile the application based on the adjusted development framework to obtain a compiled application, wherein the business components, basic business components and basic components in the compiled application can call the application skin resources in the skin resource component.
[0015] In a third aspect, the present application further provides a computer device, the computer device comprising a memory and a processor; the memory is used to store a computer program;
[0016] The processor is used to execute the computer program and implement the above-mentioned application skin resource management method when executing the computer program.
[0017] In a fourth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the application skin resource management method as described above are implemented.
[0018] The present application provides an application skin resource management method, apparatus, device and computer-readable storage medium, the method comprising: obtaining application skin resources, configuring the application skin resources into the skin resource component of the application; detecting whether the build script of the application to be compiled includes a dynamic skin identifier; if the build script of the application includes a dynamic skin identifier, adjusting the development framework of the application so that the level of the skin resource component in the adjusted development framework is the same as the level of the main project of the application, and the build script is used to indicate the level of the development framework; based on the adjusted development framework, compiling the application to obtain a compiled application, wherein the business components, basic business components and basic components in the compiled application can call the application skin resources in the skin resource component to avoid additional increase in the size of the application due to repeated introduction of the same application skin resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0020] Figure 1 A schematic diagram of a process for applying a skin resource management method provided in an embodiment of the present application;
[0021] Figure 2 A usage scenario diagram of a skin resource management method provided in an embodiment of the present application;
[0022] Figure 3 This is a schematic diagram of an application framework involved in an embodiment of the present application;
[0023] Figure 4 A schematic block diagram of a skin resource management device provided in an embodiment of the present application;
[0024] Figure 5 This is a schematic block diagram of the structure of a computer device involved in one embodiment of the present application. DETAILED DESCRIPTION
[0025] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0026] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.
[0027] The embodiments of the present application provide an application skin resource management method, device, computer equipment and computer-readable storage medium. Among them, the application skin resource management method can be applied to a terminal device, which can be an electronic device such as a mobile phone, a tablet computer, a laptop computer, a desktop computer, etc. It can also be applied to a server, which can be a separate server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and big data and artificial intelligence platforms.
[0028] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0029] See also Figure 1 , Figure 1 The flowchart of a method for managing application skin resources provided by an embodiment of the present application is shown in FIG. The method for managing application skin resources can be used in a terminal device, and of course can also be used in a server.
[0030] The terminal device may include at least one of the following: a mobile phone, a tablet computer, a laptop computer, a desktop computer; the server may be a stand-alone server or a cloud server that provides cloud computing services.
[0031] See also Figure 2 , Figure 2 This is a usage scenario diagram of an application skin resource management method provided in an embodiment of the present application.
[0032] like Figure 2 As shown, the application skin resource can be obtained by the server from the terminal device, and the compiled application can be stored in the server or the terminal device, which is not limited here.
[0033] like Figure 1 As shown, the application skin resource management method includes steps S101 to S104.
[0034] Step S101: Acquire application skin resources, and configure the application skin resources into the skin resource component of the application.
[0035] Exemplarily, application skin resources include pictures, colors, and animations. It is understandable that application skin resources such as pictures, colors, and animations can be designed by designers or obtained from the Internet. The obtained application skin resources are uniformly configured in the skin resource component. It is understandable that the management of application skin resources in the skin resource component can be achieved by managing the skin resource component.
[0036] Optionally, determine at least one of the average color value, icon size, image aspect ratio, image file size, and animation resource file size of each of the acquired application skin resources; output processing suggestions for the application skin resources based on at least one of the average color value, icon size, image aspect ratio, image file size, and animation resource file size of each of the application skin resources.
[0037] In some embodiments, during the development phase of an application, after obtaining application skin resources designed by a designer or obtaining application skin resources from the Internet, relevant personnel need to debug the obtained application skin resources in order to observe the display effect of the application skin resources. Before debugging, the compatibility between application skin resources can be determined based on the respective properties of the application skin resources, such as the average color value of the color, the icon size, the aspect ratio of the picture, the size of the picture file, the size of the animation resource file, etc., and processing suggestions for the application skin resources can be output.
[0038] Exemplarily, the outputted processing suggestion for the application skin resource may be a retain suggestion, a replacement suggestion, or a deletion suggestion.
[0039] Optionally, during the development phase of the application, a reference color value range is preset, wherein the color value lower limit of the reference color value range is a first preset color value, and the color value upper limit of the reference color value range is a second preset color value. Compare whether the color average color values of the respective application skin resources are within the reference color value range. If the color average color values of the respective application skin resources are within the reference color value range, output a retention suggestion for the corresponding application skin resource. If the color average color values of the respective application skin resources are outside the reference color value range, output a replacement suggestion or a deletion suggestion for the corresponding application skin resource.
[0040] Similarly, you can preset a reference icon size range, a reference image width-to-horizontal ratio range, a reference image file size range, and a reference animation resource file size range, and output retention suggestions, replacement suggestions, or deletion suggestions for the corresponding application skin resources based on whether the attributes of the application skin resources are within the above reference ranges. It is understandable that the relevant staff can retain, replace, or delete the corresponding application skin resources based on the retention suggestions, replacement suggestions, or deletion suggestions, thereby simplifying the skin resource debugging process and helping to improve the application development efficiency.
[0041] Optionally, obtain the skin resource component to be switched and the application skin resource to be switched; replace the skin resource component in the compiled application with the skin resource component to be switched; replace the application skin resource in the skin resource component in the compiled application with the application skin resource to be switched.
[0042] In some embodiments, during the development stage of an application, relevant personnel need to debug the acquired application skin resources, and retain, add, replace or delete the corresponding application skin resources based on the display effect of the application skin resources. At this time, the application skin resources in the skin resource component have changed. In order to respond to the changes in the application skin resources and the skin resource components, the application needs to obtain the skin resource component to be switched and the application skin resources to be switched during compilation, and replace the skin resource component in the compiled application with the skin resource component to be switched, and replace the application skin resources in the skin resource component in the compiled application with the application skin resources to be switched, so as to facilitate relevant personnel to further observe the display effect of the application skin resources after retaining, adding, replacing or deleting the corresponding application skin resources.
[0043] In some embodiments, obtaining the skin resource component to be switched and the skin resource to be switched includes: when obtaining the application skin resource, obtaining the first name of the application skin resource and the first acquisition time of the application skin resource; when configuring the application skin resource to the skin resource component of the application, obtaining the first modification time of the skin resource component; when compiling the application, obtaining the second modification time of the skin resource component in the currently compiled application, if the first modification time is not within the time range corresponding to the second modification time, marking the skin resource component as the skin resource component to be switched; obtaining the second name of the application skin resource in the skin resource component to be switched and the second acquisition time of the application skin resource, if the first name is different from the second name, and / or the first acquisition time is not within the time range corresponding to the second acquisition time, marking the application skin resource corresponding to the second acquisition time as the application skin resource to be switched.
[0044] It is understandable that if the relevant personnel have not added, replaced or deleted the application skin in the skin resource component, the first modification time of the skin resource component obtained when the application skin resource is configured into the skin resource component of the application will be within the time range corresponding to the second modification time of the skin resource component in the currently compiled application obtained when the application is compiled.
[0045] In some embodiments, whether the skin resource component has changed is determined by judging whether the first modification time is within the time range corresponding to the second modification time. If the first modification time is outside the time range corresponding to the second modification time, it is determined that the skin resource component has changed, and the relevant personnel have added, replaced or deleted the application skin resource in the skin resource component.
[0046] It is understandable that after detecting whether the skin resource component has changed, the specific application skin resources that have changed in the skin resource component can be further detected. It is understandable that when the relevant personnel add the application skin resources in the skin resource component, the second acquisition time corresponding to the added, replaced or deleted application skin resources will exceed the time range corresponding to the first acquisition time when the application skin resources are acquired, and the second name corresponding to the added application skin resource may also be different from the first name when the application skin resources are acquired.
[0047] In some embodiments, whether the application skin resource has changed is determined by judging whether the first acquisition time is within the time range corresponding to the second acquisition time. If the first acquisition time is outside the time range corresponding to the second acquisition time, it is determined that the application skin resource has changed, and the relevant personnel have performed corresponding addition, replacement or deletion operations on the corresponding application skin resource. It is also possible to determine whether the application skin resource has changed by judging whether the first name is the same as the second name. If the first name is different from the second name, it is determined that the application skin resource has changed, and the relevant personnel have performed corresponding addition, replacement or deletion operations on the corresponding application skin resource.
[0048] It is understandable that if the application skin resources are configured in different components, it is necessary to detect the changes of the application skin resources in each component, and the application skin resource change detection process is complicated. However, if the application skin resources are configured in the skin resource component, when detecting the changes of the skin resource component, the modification time of the skin resource component can be used to synchronously detect whether there are changed application skin resources in the skin resource component, and then the corresponding changed application skin resources in the skin resource component can be detected based on whether the name and acquisition time of the application skin resource have changed, thereby simplifying the process of detecting application skin resource changes and improving the efficiency of application development.
[0049] In some embodiments, the skin resource components that have been debugged and have good display effects can also be compiled into an application skin resource package, and the skin resource package can be configured in the application and / or uploaded to the online application skin resource library of the application, so as to control the size of the application space occupied by the application skin resource. It is understandable that the user can switch between multiple sets of preset skins in the application, or select a skin in the online application skin resource library of the application for download and use.
[0050] Step S102: Detect whether the construction script of the application to be compiled includes a dynamic skin identifier.
[0051] In some embodiments, the application's build script can be used for application version management. During the application development phase, after completing the debugging of the application skin resources, the relevant personnel can perform corresponding retention, replacement, and deletion operations on the application skin resources in the skin resource component according to the display effect of the application skin resources, and determine the skin of the released version of the application. At this time, the debugging process of the application skin resources ends, and the relevant personnel can add a dynamic skin identifier in the application's build script. By detecting whether the dynamic skin identifier is included in the build script of the application to be compiled, it is determined whether the application skin resources have been debugged, thereby determining whether to enter the release version compilation process of the application.
[0052] Step S103: If the application's build script includes a dynamic skin identifier, adjust the application's development framework so that the level of the skin resource component in the adjusted development framework is the same as the level of the application's main project. The build script is used to indicate the level of the development framework.
[0053] See also Figure 3 , Figure 3 It is a schematic diagram of an application framework involved in an embodiment of the present application.
[0054] like Figure 3 As shown, the build script is used to indicate the level of the development framework. If the build script of the application includes a dynamic skin identifier, it is determined that the application skin resource has been debugged and the release version compilation phase of the application has been entered, so that in response to the corresponding operation, the level of the development framework of the application is adjusted so that the level of the skin resource component in the adjusted development framework is the same as the level of the main project of the application.
[0055] Optionally, if the application's build script includes a dynamic skin identifier, adjusting the application's development framework includes: obtaining the application's development framework, the development framework being used to indicate the hierarchical relationship between the application's main project, business components, basic business components, basic components, and skin resource components; adjusting the hierarchical relationship between the main project, business components, basic business components, basic components, and skin resource components in the development framework so that the main project is located above the business components, the business components are located above the basic business components, the basic business components are located above the basic components, and the basic components are located above the skin resource components.
[0056] In some embodiments, the main project of the application is located at the upper layer of all components in the framework of the application. The resource coverage principle of the application is that the lower the component level, the easier it is to replace the resources in the component. It is understandable that during the debugging stage of the application skin resources, relevant personnel need to retain, add, replace or delete the corresponding application skin resources at any time according to the debugging effect of the application skin resources. Therefore, during the debugging stage of the application skin resources, the acquired application skin resources are configured into the skin resource component of the application, and the application skin resources are uniformly managed. The skin resource components are configured in the business components, basic business components and the lower layers of the basic components, which is beneficial for relevant personnel to directly add, replace or delete the corresponding application skin resources in the skin resource component according to the display effect of the application skin resources during the debugging stage of the application skin resources.
[0057] Optionally, a dependency configuration file of the skin resource component is obtained; and the dependency configuration file is configured in the basic component, the basic business component and the business component.
[0058] It is understandable that the business components, basic business components and basic components are located in the upper layer of the skin resource components, which is equivalent to providing the business components, basic business components and basic components with a basis for calling the application skin resources in the skin resource components. However, how the business components, basic business components and basic components specifically call the application skin resources in the skin resource components requires configuring the business components, basic business components and the dependency relationship between the basic components and the skin resource components of the application during the development phase of the application. It is understandable that the dependency configuration file is used to indicate the dependency relationship between the business components, basic business components and basic components of the application and the skin resource components. Exemplarily, the dependency configuration file can be configured in the basic components, basic business components and business components, and the basic components and business components perform the corresponding application skin resources in the skin resource components based on the relevant information in the dependency configuration file. In some embodiments, the dependency configuration file can also be configured in the basic component, and the basic business component or business component establishes a calling relationship with the application skin resources of the skin resource component by calling the basic component.
[0059] In some embodiments, the resource coverage principle of the application is that the higher the component level, the greater the resource replacement authority in the component. If the level of the skin resource component is not adjusted, when the upper component of the skin resource component, such as the business component, has the same application skin resource as the application skin resource in the skin resource component, it is equivalent to an application skin resource call conflict. Since the business component is located in the upper layer of the skin resource component, the application skin resource in the business component has a higher application skin resource replacement authority, so the application skin resource in the business component will be called. For example, if the same application skin resource exists in the business component and the skin resource component, the application skin resource in the business component will be called, while the application skin resource in the skin resource component will not be called. It can be understood that if the release version of the application is compiled directly at this time, the application skin resources that are not called in the skin resource component will increase the size of the application. If the level of the skin resource component is adjusted, and the level of the skin resource component is adjusted to be the same as the level of the main project of the application, it is ensured that the application skin resources in the skin resource component can be called.
[0060] Optionally, it is also possible to detect whether the business components, basic business components and basic components contain application skin resources in the skin resource components; if the business components, basic business components and basic components contain application skin resources in the skin resource components, delete the business components, basic business components and application skin resources in the basic components.
[0061] In some embodiments, when the business components, basic business components, and basic components of an application are debugged separately, the corresponding application skin resources can be directly placed in the corresponding components. When the business components, basic business components, basic components, and skin resource components of an application are debugged as a whole, the acquired application skin resources are configured into the skin resource components of the application, and a calling relationship between the business components, basic business components, basic components, and application skin resources in the skin resource components is established by configuring the dependency configuration files of the skin resource components to the business components, basic business components, and basic components. If the application skin resources in the business components, basic business components, and basic components are not detected and deleted, the size of the application will be increased due to the repeated introduction of the same skin resources.
[0062] Step S104, compiling the application based on the adjusted development framework to obtain a compiled application, wherein the business components, basic business components and basic components in the compiled application can call the application skin resources in the skin resource component.
[0063] For example, after adjusting the level of the skin resource component to the same level as the main project of the application, the skin resource component is located at the upper layer of the business component, the basic business component, and the basic component. Then, when compiling the application, the business component, the basic business component, and the basic component can be detected according to the application skin resources in the skin resource component to perform corresponding operations, and ensure that the business component, the basic business component, and the basic component in the compiled application can call the skin resources in the skin resource component, thereby avoiding the repeated introduction of the same application skin resources and ensuring that the size of the application is not increased additionally.
[0064] In some embodiments, based on the adjusted development framework, the application is compiled to obtain a compiled application. It is understandable that the compiled application can be uploaded to the application platform as a release version of the application for users to download and use.
[0065] Exemplarily, the compiled application can be stored in the blockchain. The blockchain referred to in this application is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. The blockchain can include the blockchain underlying platform, the platform product service layer, and the application service layer.
[0066] It is understandable that when the server needs to obtain the compiled application, it can broadcast to the blockchain, thereby determining the storage node or storage address of the compiled application to obtain the compiled application from the storage node or storage address.
[0067] The application skin resource management method provided in the above embodiment obtains application skin resources, configures the application skin resources into the skin resource component of the application, detects whether the build script of the application to be compiled includes a dynamic skin identifier, and if the build script of the application includes a dynamic skin identifier, adjusts the development framework of the application so that the level of the skin resource component in the adjusted development framework is the same as the level of the main project of the application. The build script is used to indicate the level of the development framework, and the application is compiled based on the adjusted development framework to obtain a compiled application, wherein the business components, basic business components, and basic components in the compiled application can call the application skin resources in the skin resource component, thereby avoiding the additional increase in the size of the application due to the repeated introduction of the same application skin resources.
[0068] See also Figure 4 , Figure 4It is a schematic block diagram of an application skin resource management device provided in an embodiment of the present application. The application skin resource management device can be configured in a server or a terminal to execute the aforementioned application skin resource management method.
[0069] like Figure 4 As shown, the application skin resource management device includes: an acquisition module 110, a detection module 120, an adjustment module 130, and a compilation module 140.
[0070] The acquisition module 110 is used to acquire application skin resources and configure the application skin resources into the skin resource component of the application.
[0071] The detection module 120 is used to detect whether the construction script of the application to be compiled includes a dynamic skin identifier.
[0072] The adjustment module 130 is used to adjust the development framework of the application if the construction script of the application includes a dynamic skin identifier so that the level of the skin resource component in the adjusted development framework is the same as the level of the main project of the application. The construction script is used to indicate the level of the development framework.
[0073] The compiling module 140 is used to compile the application based on the adjusted development framework to obtain a compiled application, wherein the business components, basic business components and basic components in the compiled application can call the application skin resources in the skin resource component.
[0074] Exemplarily, the adjustment module 130 includes: a development framework acquisition submodule and a level adjustment submodule.
[0075] The development framework acquisition submodule is used to obtain the development framework of the application. The development framework is used to indicate the hierarchical relationship between the main project, business components, basic business components, basic components and skin resource components of the application.
[0076] The hierarchical adjustment submodule is used to adjust the hierarchical relationship between the main project, business components, basic business components, basic components and skin resource components in the development framework, so that the main project is located above the business components, the business components are located above the basic business components, the basic business components are located above the basic components and the basic components are located above the skin resource components.
[0077] Exemplarily, the application skin resource management device further includes: a dependency configuration file acquisition module and a dependency configuration module. The dependency configuration file acquisition module is used to acquire the dependency configuration file of the skin resource component when the application is being developed.
[0078] The dependency configuration module is used to configure dependency configuration files in basic components, basic business components and business components.
[0079] Exemplarily, the application skin resource management device also includes: a skin resource acquisition module to be switched, a skin resource component replacement module to be switched, and a skin resource replacement module to be switched.
[0080] The skin resource acquisition module to be switched is used to obtain the skin resource components to be switched and the application skin resources to be switched.
[0081] The skin resource component replacement module to be switched is used to replace the skin resource component in the compiled application with the skin resource component to be switched.
[0082] The application skin resource replacement module to be switched is used to replace the application skin resources in the skin resource component of the compiled application with the application skin resources to be switched.
[0083] Exemplarily, the module for acquiring application skin resources to be switched includes: an application skin resource information acquisition submodule, a skin resource component information acquisition submodule, a skin resource component marking submodule to be switched, and an application skin resource marking submodule to be switched.
[0084] The application skin resource information acquisition submodule is used to acquire the first name of the application skin resource and the first acquisition time of the application skin resource when acquiring the application skin resource.
[0085] The skin resource component information acquisition submodule is used to acquire the first modification time of the skin resource component when configuring the application skin resource into the skin resource component of the application.
[0086] The skin resource component to be switched marking submodule is used to obtain the second modification time of the skin resource component in the currently compiled application when compiling the application. If the first modification time is not within the time range corresponding to the second modification time, the skin resource component is marked as the skin resource component to be switched.
[0087] The application skin resource marking submodule to be switched is used to obtain the second name of the application skin resource in the skin resource component to be switched and the second acquisition time of the application skin resource. If the first name is different from the second name, and / or the first acquisition time is not within the time range corresponding to the second acquisition time, the application skin resource corresponding to the second acquisition time is marked as the application skin resource to be switched.
[0088] Exemplarily, the application skin resource management device further includes: an application skin resource detection module and an application skin resource deletion module.
[0089] The application skin resource detection module is used to detect whether the business components, basic business components and basic components contain application skin resources in the skin resource components.
[0090] The application skin resource deletion module is used to delete the business component, the basic business component and the application skin resources in the basic component if the business component, the basic business component and the basic component contain the application skin resources in the skin resource component.
[0091] Exemplarily, the application skin resource management device further includes: an application skin resource attribute judgment module and an application skin resource suggestion output module.
[0092] The application skin resource attribute judgment module is used to determine at least one of the average color value, icon size, picture aspect ratio, picture file size and animation resource file size of each of the acquired application skin resources.
[0093] The application skin resource suggestion output module is used to output processing suggestions for application skin resources based on at least one of the average color value, icon size, picture aspect ratio, picture file size and animation resource file size of each application skin resource.
[0094] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and modules and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0095] The method of the present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld devices or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0096] Exemplarily, the above method and apparatus may be implemented in the form of a computer program, which may be run on a computer device.
[0097] See also Figure 5 , Figure 5 A schematic block diagram of the structure of a computer device provided in an embodiment of the present application. The computer device may be a server or a terminal.
[0098] like Figure 5 As shown, the computer device includes a processor, a memory, and a network interface connected via a system bus, wherein the memory may include a storage medium and an internal memory.
[0099] The storage medium can store an operating system and a computer program. The computer program includes program instructions, and when the program instructions are executed, the processor can execute any skin resource management method.
[0100] The processor is used to provide computing and control capabilities and support the operation of the entire computer equipment.
[0101] The internal memory provides an environment for the operation of the computer program in the storage medium. When the computer program is executed by the processor, the processor can execute any application skin resource management method.
[0102] The network interface is used for network communication, such as sending assigned tasks, etc. Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0103] It should be understood that the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0104] In one embodiment, the processor is used to run a computer program stored in the memory to implement the following steps:
[0105] Acquire application skin resources, and configure the application skin resources into the skin resource component of the application;
[0106] Detect whether the build script of the application to be compiled includes a dynamic skin identifier;
[0107] If the construction script of the application includes a dynamic skin identifier, adjusting the development framework of the application so that the level of the skin resource component in the adjusted development framework is the same as the level of the main project of the application, the construction script is used to indicate the level of the development framework;
[0108] Based on the adjusted development framework, the application is compiled to obtain a compiled application, wherein the business components, basic business components and basic components in the compiled application can call the application skin resources in the skin resource component.
[0109] In one embodiment, the processor, when implementing the step of adjusting the development framework of the application if the construction script of the application includes a dynamic skin identifier, is configured to implement:
[0110] Acquire a development framework of the application, wherein the development framework is used to indicate the hierarchical relationship between the main project, business components, basic business components, basic components, and skin resource components of the application;
[0111] Adjust the hierarchical relationship between the main project, business components, basic business components, basic components and skin resource components in the development framework so that the main project is located on the upper layer of the business components, the business components are located on the upper layer of the basic business components, the basic business components are located on the upper layer of the basic components and the basic components are located on the upper layer of the skin resource components.
[0112] In one embodiment, when implementing the skin resource management method, the processor is used to implement:
[0113] When the application is being developed, obtaining a dependency configuration file of the skin resource component; and
[0114] The dependency configuration file is configured in the basic component, the basic business component and the business component.
[0115] In one embodiment, the processor, when implementing the application skin resource management method, is used to implement:
[0116] Get the skin resource component to be switched and the skin resource to be switched;
[0117] Replacing the skin resource component in the compiled application with the skin resource component to be switched;
[0118] The application skin resource in the skin resource component of the compiled application is replaced with the application skin resource to be switched.
[0119] In one embodiment, when the processor implements the step of obtaining the skin resource component to be switched and the skin resource to be switched, the processor implements:
[0120] When acquiring an application skin resource, acquiring a first name of the application skin resource and a first acquisition time of the application skin resource;
[0121] When configuring the application skin resource into the skin resource component of the application, obtaining the first modification time of the skin resource component;
[0122] When compiling the application, obtaining a second modification time of a skin resource component in the currently compiled application, and if the first modification time is not within a time range corresponding to the second modification time, marking the skin resource component as a skin resource component to be switched;
[0123] Obtain the second name of the application skin resource in the skin resource component to be switched and the second acquisition time of the application skin resource. If the first name is different from the second name, and / or the first acquisition time is not within the time range corresponding to the second acquisition time, mark the application skin resource corresponding to the second acquisition time as the application skin resource to be switched.
[0124] In one embodiment, the processor, when implementing the application skin resource management method, is used to implement:
[0125] Detecting whether the business component, the basic business component, and the basic component include application skin resources in the skin resource component;
[0126] If the business component, the basic business component and the basic component include the application skin resource in the skin resource component, the business component, the basic business component and the application skin resource in the basic component are deleted.
[0127] In one embodiment, the processor, when implementing the application skin resource management method, is used to implement:
[0128] Determine at least one of the average color value, icon size, picture aspect ratio, picture file size, and animation resource file size of each of the acquired application skin resources;
[0129] Output processing suggestions for the application skin resources based on at least one of the average color value, icon size, picture aspect ratio, picture file size, and animation resource file size of each of the application skin resources.
[0130] It should be noted that technical personnel in the relevant field can clearly understand that for the convenience and brevity of description, the specific working process of the above-described application skin resource management can refer to the corresponding process in the aforementioned application skin resource management method embodiment, and will not be repeated here.
[0131] An embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. The computer program includes program instructions. The method implemented when the program instructions are executed can refer to the various embodiments of the skin resource management method applied in the present application.
[0132] The computer-readable storage medium may be an internal storage unit of the computer device described in the foregoing embodiment, such as a hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc., equipped on the computer device.
[0133] It should be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0134] It should also be understood that the term "and / or" used in the specification of this application and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, including these combinations. It should be noted that, in this article, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "including a..." does not exclude the presence of other identical elements in the process, method, article or system including the element.
[0135] The serial numbers of the embodiments of the present application are for description only and do not represent the advantages and disadvantages of the embodiments. The above description is only a specific implementation mode of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A method for managing application skin resources, characterized in that: include: Acquire application skin resources, and configure the application skin resources into the skin resource component of the application; Detect whether the build script of the application to be compiled includes a dynamic skin identifier; If the construction script of the application includes a dynamic skin identifier, adjusting the development framework of the application so that the level of the skin resource component in the adjusted development framework is the same as the level of the main project of the application, the construction script is used to indicate the level of the development framework; Based on the adjusted development framework, the application is compiled to obtain a compiled application, wherein the business components, basic business components and basic components in the compiled application can call the application skin resources in the skin resource component; Get the skin resource component to be switched and the application skin resource to be switched; Replacing the skin resource component in the compiled application with the skin resource component to be switched; Replacing the application skin resource in the skin resource component of the compiled application with the application skin resource to be switched; The step of obtaining the skin resource component to be switched and the application skin resource to be switched includes: When acquiring an application skin resource, acquiring a first name of the application skin resource and a first acquisition time of the application skin resource; When configuring the application skin resource into the skin resource component of the application, obtaining the first modification time of the skin resource component; When compiling the application, obtaining a second modification time of a skin resource component in the currently compiled application, and if the first modification time is not within a time range corresponding to the second modification time, marking the skin resource component as a skin resource component to be switched; Obtain the second name of the application skin resource in the skin resource component to be switched and the second acquisition time of the application skin resource. If the first name is different from the second name, and / or the first acquisition time is not within the time range corresponding to the second acquisition time, mark the application skin resource corresponding to the second acquisition time as the application skin resource to be switched.
2. The method for managing applied skin resources according to claim 1, characterized in that: If the construction script of the application includes a dynamic skin identifier, adjusting the development framework of the application includes: Acquire a development framework of the application, wherein the development framework is used to indicate the hierarchical relationship between the main project, business components, basic business components, basic components, and skin resource components of the application; Adjust the hierarchical relationship between the main project, business components, basic business components, basic components and skin resource components in the development framework so that the main project is located on the upper layer of the business components, the business components are located on the upper layer of the basic business components, the basic business components are located on the upper layer of the basic components and the basic components are located on the upper layer of the skin resource components.
3. The method for managing applied skin resources according to claim 1, characterized in that: Also includes: When the application is being developed, obtaining a dependency configuration file of the skin resource component; as well as The dependency configuration file is configured in the basic component, the basic business component and the business component.
4. The method for managing applied skin resources according to any one of claims 1 to 3, characterized in that: Also includes: Detecting whether the business component, the basic business component, and the basic component include application skin resources in the skin resource component; If the business component, the basic business component and the basic component include the application skin resource in the skin resource component, the business component, the basic business component and the application skin resource in the basic component are deleted.
5. The method for managing applied skin resources according to any one of claims 1 to 3, characterized in that: Also includes: Determine at least one of the average color value, icon size, picture aspect ratio, picture file size, and animation resource file size of each of the acquired application skin resources; Output processing suggestions for the application skin resources based on at least one of the average color value, icon size, picture aspect ratio, picture file size, and animation resource file size of each of the application skin resources.
6. An application skin resource management device, characterized in that: The application skin resource management device comprises: An acquisition module, used to acquire application skin resources and configure the application skin resources into a skin resource component of an application; A detection module, used to detect whether a build script of an application to be compiled includes a dynamic skin identifier; An adjustment module, for adjusting the development framework of the application if the construction script of the application includes a dynamic skin identifier, so that the level of the skin resource component in the adjusted development framework is the same as the level of the main project of the application, and the construction script is used to indicate the level of the development framework; A compiling module, used for compiling the application based on the adjusted development framework to obtain a compiled application, wherein the business components, basic business components and basic components in the compiled application can call the application skin resources in the skin resource component; The skin resource acquisition module to be switched is used to obtain the skin resource components to be switched and the application skin resources to be switched; The skin resource component replacement module to be switched is used to replace the skin resource component in the compiled application with the skin resource component to be switched; The application skin resource replacement module to be switched is used to replace the application skin resources in the skin resource component of the compiled application with the application skin resources to be switched; The step of obtaining the skin resource component to be switched and the application skin resource to be switched includes: When acquiring an application skin resource, acquiring a first name of the application skin resource and a first acquisition time of the application skin resource; When configuring the application skin resource into the skin resource component of the application, obtaining the first modification time of the skin resource component; When compiling the application, obtaining a second modification time of a skin resource component in the currently compiled application, and if the first modification time is not within a time range corresponding to the second modification time, marking the skin resource component as a skin resource component to be switched; Obtain the second name of the application skin resource in the skin resource component to be switched and the second acquisition time of the application skin resource. If the first name is different from the second name, and / or the first acquisition time is not within the time range corresponding to the second acquisition time, mark the application skin resource corresponding to the second acquisition time as the application skin resource to be switched.
7. A computer device comprising a memory and a processor; The memory is used to store computer programs; It is characterized in that The processor is used to execute the computer program and implement the application skin resource management method according to any one of claims 1 to 5 when executing the computer program.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the application skin resource management method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Android system-based APP skin changing method
CN110399130A
Component level adjusting method and device
CN110471656A