CN113434149B - Application program generating and loading method, device and medium - Google Patents

Application program generating and loading method, device and medium Download PDF

Info

Publication number
CN113434149B
CN113434149B CN202110767686.7A CN202110767686A CN113434149B CN 113434149 B CN113434149 B CN 113434149B CN 202110767686 A CN202110767686 A CN 202110767686A CN 113434149 B CN113434149 B CN 113434149B
Authority
CN
China
Prior art keywords
asset
interface
application
optimized
assets
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110767686.7A
Other languages
Chinese (zh)
Other versions
CN113434149A (en
Inventor
贺德华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202110767686.7A priority Critical patent/CN113434149B/en
Publication of CN113434149A publication Critical patent/CN113434149A/en
Application granted granted Critical
Publication of CN113434149B publication Critical patent/CN113434149B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/44Encoding
    • G06F8/443Optimisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files

Abstract

The present disclosure provides an application program generation method, an application program loading method, an application program generation apparatus and device, and a computer-readable storage medium. The application program generation method comprises the following steps: determining a set of assets for generating an application; for each asset in the set of assets, determining whether to optimize the asset based on a predetermined rule, and if so, optimizing the asset to generate an optimized set of assets; serializing the optimized asset set based on the optimized processing state of each asset in the optimized asset set to generate a serialized asset set; and generating an application based on the serialized asset collection.

Description

Application program generating and loading method, device and medium
Technical Field
The present disclosure relates to the field of computer technology, and more particularly, to an application program generation method, an application program loading method, an apparatus, and a device, and a computer-readable storage medium.
Background
During the construction of an application, a number of computer assets, such as User Interface (UI) assets, may be involved or included. Taking the common android application packages (Android Application Package, APK) as an example, for a game program, certain UI modules (e.g., item descriptions, avatars, etc.) may repeatedly appear in multiple UI interfaces. In this case, to facilitate multiplexing and development and maintenance, UI modules that need to be multiplexed may be separately manufactured as one asset, which may be referred to by other assets. Thus, one UI interface often relies on multiple other UI assets, such complex dependencies make the asset composition of an application very complex, and loading the UI assets into memory while the application is running also requires very high time consumption.
In order to solve the problems, after the asset production of the application program is completed, the assets with the dependency relationship can be detached, packaged and APK is generated, and in the running process of the application program, the dependent assets are loaded into the memory according to actual business requirements. However, the manner of asset splitting makes application fabrication inefficient and makes subsequent maintenance of application assets difficult, and repeated loading of the same asset module by different UI interfaces during application operation can bring about many repeated codes, resulting in code logical redundancy.
Disclosure of Invention
In order to effectively solve the above problems, the present disclosure provides an application program generation method, an application program loading method, and apparatus and computer-readable storage medium.
According to an aspect of the embodiments of the present disclosure, there is provided an application program generating method, including: determining a set of assets for generating an application; for each asset in the set of assets, determining whether to optimize the asset based on a predetermined rule, and if so, optimizing the asset to generate an optimized set of assets; serializing the optimized asset set based on an optimized processing state of each asset in the optimized asset set to generate a serialized asset set; and generating the application based on the serialized asset collection.
According to an example of an embodiment of the present disclosure, wherein the set of assets includes dependent assets that are dependent on other assets in the set of assets, and determining whether to optimize the assets based on predetermined rules includes: determining whether the asset is a dependent asset; and determining to optimize the asset in the event that the asset is a dependent asset.
According to an example of an embodiment of the present disclosure, determining whether to optimize the asset based on a predetermined rule further comprises: in the event that the asset is a dependent asset and the size of the asset exceeds a predetermined threshold, determining to optimize the asset.
According to an example of an embodiment of the present disclosure, wherein optimizing the asset in a case where it is determined to optimize the asset comprises: deleting the asset from the parent asset depending on it and saving the name and path of the asset in the parent asset.
According to an example of an embodiment of the present disclosure, wherein serializing the optimized asset set based on the optimized processing state of each asset in the optimized asset set comprises, for each asset in the optimized asset set: skipping serialization of the asset in the event that the asset is optimally processed; and serializing the asset if the asset is not optimally processed.
According to an example of an embodiment of the present disclosure, determining whether to optimize the asset based on a predetermined rule includes: determining whether an element of a size exceeding a predetermined threshold is contained in the asset; and determining to optimize the asset when it is determined that the asset contains elements of a size exceeding a predetermined threshold.
According to an example of an embodiment of the present disclosure, wherein optimizing the asset in a case where it is determined to optimize the asset comprises: deleting the elements having a size exceeding a predetermined threshold from the assets and saving names and paths of the elements in the assets, and wherein serializing the optimized asset sets based on the optimized processing state of each asset in the optimized asset sets comprises, for each asset in the optimized asset sets: skipping serialization of the elements of the asset and serializing other elements of the asset in the event that the asset is optimized; and serializing the asset if the asset is not optimally processed.
According to an example of an embodiment of the present disclosure, serializing the asset comprises: writing the persistence attribute of the asset into a disk file, wherein the persistence attribute comprises at least one of content information, coordinate information, alignment information, path information and memory information of elements in the asset.
According to another aspect of the embodiments of the present disclosure, there is provided an application loading method, including: loading a set of assets corresponding to an interface of an application and displaying at least a portion of the interface based on the set of assets; receiving a triggering command of a sub-interface of the interface, and determining whether a sub-interface asset corresponding to the sub-interface exists in the asset set; and in the event that the child interface asset is present in the asset collection, displaying the child interface, and in the event that the child interface asset is not present in the asset collection, based on the name of the child interface asset, obtaining a path of the child interface asset from a parent asset that depends on the child interface asset, loading the child interface asset from the path, and displaying the child interface based on the loaded child interface asset.
According to an example of an embodiment of the present disclosure, in a case where the sub-interface asset is subjected to optimization processing in the generation process of the application, the sub-interface asset does not exist in the asset collection.
According to an example of an embodiment of the present disclosure, the optimization process includes: and deleting the child interface asset from the parent asset depending on the child interface asset when the child interface asset is a dependent asset, and storing the name and the path of the child interface asset in the parent asset.
According to an example of an embodiment of the present disclosure, the trigger command is an operation command to the sub-interface or a message command related to the sub-interface received by the application program through a network, and loading the asset set corresponding to the interface of the application program includes: acquiring a serialized asset set of the application program from a disk file; and deserializing the serialized asset collection to obtain the asset collection corresponding to the interface of the application.
According to another aspect of the embodiments of the present disclosure, there is provided an application generating apparatus, including: a determining unit configured to determine an asset set for generating an application; an optimizing unit configured to determine, for each asset in the asset set, whether to perform an optimizing process on the asset based on a predetermined rule, and in a case where it is determined to perform an optimizing process on the asset, perform an optimizing process on the asset to generate an optimized asset set; a serialization unit configured to serialize the optimized asset set based on an optimized processing state of each asset in the optimized asset set to generate a serialized asset set; and a generation unit configured to generate the application based on the serialized asset set.
According to another aspect of the embodiments of the present disclosure, there is provided an application program including a loading unit, a determining unit, and a display unit, wherein the loading unit is configured to load an asset set corresponding to an interface of the application program, and the display unit is configured to display at least a part of the interface based on the asset set. The determining unit is configured to receive a trigger command for a sub-interface of the interface and determine whether a sub-interface asset corresponding to the sub-interface exists in the asset collection. In the event that the sub-interface asset exists in the asset collection, a display unit is configured to display the sub-interface. In the event that the child interface asset is not present in the asset collection, the loading unit is further configured to obtain a path of the child interface asset from a parent asset dependent on the child interface asset based on the name of the child interface asset and load the child interface asset from the path, and the display unit is further configured to display the child interface based on the loaded child interface asset.
According to another aspect of the embodiments of the present disclosure, there is provided an application generating apparatus including: one or more processors; and one or more memories, wherein the memories have stored therein computer readable instructions that, when executed by the one or more processors, cause the one or more processors to perform the methods described in the various aspects above.
According to another aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium having stored thereon computer-readable instructions, which when executed by a processor, cause the processor to perform a method according to any of the above aspects of the present disclosure.
According to another aspect of embodiments of the present disclosure, there is provided a computer program product comprising computer readable instructions which, when executed by a processor, cause the processor to perform a method as in any of the above aspects of the present disclosure.
By utilizing the application program generating method, the application program loading method, the device, the equipment, the computer readable storage medium and the computer program product according to the various embodiments of the present disclosure, by releasing the dependency relationship between the asset and the parent asset thereof and simultaneously storing the name and the path of the asset in the parent asset, the asset structure of the application program can be greatly simplified without splitting the asset of the application program, thereby effectively improving the manufacturing efficiency of the application program and reducing the memory and the disk space occupied by the application program; in addition, in the running process of the subsequent application program, when the optimized asset needs to be loaded, redundant code logic is not needed, and the loading can be performed quickly through the saved names and paths of the asset or the asset element, so that the loading speed of the application program can be improved effectively, and the user experience is optimized.
Drawings
The above and other objects, features and advantages of the presently disclosed embodiments will become more apparent from the more detailed description of the presently disclosed embodiments when taken in conjunction with the accompanying drawings. The accompanying drawings are included to provide a further understanding of embodiments of the disclosure, and are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the description serve to explain the disclosure, without limitation to the disclosure. In the drawings, like reference numerals generally refer to like parts or steps.
FIG. 1 illustrates a layout schematic of a UI asset according to an example of the disclosure;
FIG. 2 illustrates a schematic diagram of a UI asset structure in a game engine according to an example of the present disclosure;
FIG. 3 illustrates a schematic diagram of a game interface according to an example of the present disclosure;
FIG. 4 illustrates a flowchart of an application generation method according to an embodiment of the present disclosure;
FIG. 5 illustrates another flow chart of an example application generation method in accordance with an embodiment of the present disclosure;
FIG. 6 illustrates a flowchart of an application loading method according to an embodiment of the present disclosure;
FIG. 7 illustrates a schematic diagram of an exemplary disk file, according to an embodiment of the present disclosure;
FIG. 8 illustrates a flowchart of an example application running in accordance with an embodiment of the present disclosure;
FIG. 9 illustrates an example UI asset structure schematic in accordance with embodiments of the disclosure;
FIG. 10 shows a schematic diagram of an application generation device according to an embodiment of the present disclosure;
FIG. 11 illustrates a schematic diagram of an application program according to an embodiment of the present disclosure;
fig. 12 shows a schematic diagram of an architecture of an exemplary computing device, according to an embodiment of the present disclosure.
Detailed Description
The technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the drawings in the embodiments of the present disclosure. It will be apparent that the described embodiments are merely embodiments of a portion, but not all, of the present disclosure. All other embodiments, which can be made by one of ordinary skill in the art without the need for inventive faculty, are intended to be within the scope of the present disclosure, based on the embodiments in this disclosure.
In this disclosure, an asset of an application may refer to, for example, a collection of various virtual data, information, resources, etc., related to or contained by the application, e.g., a User Interface (UI) asset may be composed of various elements such as a literal picture, an audio-visual file, etc. Fig. 1 illustrates a layout schematic of a UI asset according to an example of the present disclosure. As shown in fig. 1, a UI asset may for example contain several menus and content areas, which may also be separate assets. After the user clicks on a certain menu (e.g. menu 1 in fig. 1), the content area changes accordingly, i.e. the content area and the menu are related to each other or have a dependency relationship. In addition, there are strict requirements on the up, down, left, and right of menus and content areas in the UI for better visual performance, and "pixel level" alignment is often required. Thus, in making UI assets, it is desirable to splice together these associated assets to facilitate uniform interface settings and adjustments.
Illustrated with the UI assets of the game application. FIG. 2 illustrates a schematic diagram of a UI asset structure in a game engine according to an example of the disclosure. As can be seen in fig. 2, a game interface may include multiple UI assets, and each UI asset may in turn contain or rely on multiple subordinate assets. The tree-shaped asset structure causes the asset complexity of the application program to be very high, so that the manufacturing efficiency of the application program is low and the volume is huge; and when the application program runs, the time for loading all the UI assets into the memory is also very high, for example, when a certain game interface is opened, the user experience is poor.
FIG. 3 illustrates a schematic diagram of a game interface according to an example of the present disclosure. As shown in FIG. 3, the game interface includes a plurality of menu items such as "backpack," "task," "map," "health," and the like. For example, the user may click on a "backpack" menu, thereby displaying a corresponding backpack interface. It can be seen that in the backpack interface, further comprising a number of menu items such as "weapon", "armour", "helmet", clicking on each item will display a plurality of operation interfaces of a further level, and that there may also be a mutual reference and hierarchical relationship between these operation interfaces. That is, only the knapsack interface is composed of a large number of assets with complex structures, if the structures of the assets are not optimized, when a user clicks the knapsack interface, the time for loading all the assets of the knapsack interface is very high, so that a large delay occurs in opening the knapsack interface, and bad game experience is brought to the user.
In view of the above problems, one solution is to split the reused dependent assets from their upper level assets after the asset fabrication of the application is completed, and package them as individual assets, thereby simplifying the asset structure of the application; then, in the running process of the application program, the corresponding dependent assets are loaded into the memory according to the actual business requirements. However, this approach presents further problems. On one hand, when the subsequent modification and maintenance of the asset are needed, the asset is also needed to be assembled again, so that the operation is inconvenient. For example, for the UI asset in fig. 1, assuming that the content area is split as a separate asset in order to reduce complexity of the asset, if the coordinate alignment parameters of the UI asset are to be adjusted later, the content area and the menu need to be reassembled for a unified adjustment operation, which is inconvenient. On the other hand, in the running process of the application program, for different UI interfaces using the same asset module, in the case that the asset module is split, the different UI interfaces can reload the asset module repeatedly, so that a plurality of repeated codes are added, and code logic redundancy is caused.
In view of this, the embodiments of the present disclosure provide an application program generating method and a corresponding application program loading method, which can avoid code logic redundancy, greatly simplify the asset structure of an application program, improve the manufacturing efficiency of the application program, effectively improve the loading speed of the application program, and optimize the user experience.
An application generation method according to an embodiment of the present disclosure is described below with reference to fig. 4. Fig. 4 shows a flowchart of an application generation method 400 according to an embodiment of the present disclosure.
As shown in fig. 4, in step S410, a set of assets for generating an application is determined. Here, the application may be, for example, an android system application package (Android Application Package, APK), but the embodiments of the present disclosure are not limited thereto, and the application may be any other application such as EXE (executable file) or the like. As previously mentioned, an application may be made up of many assets, which may include various elements such as pictures, text, audio video files, etc., collectively referred to herein as an asset collection. There may be dependencies (or referred to as reference relationships) between individual assets in the application's collection of assets, for example asset a may depend on asset C, and asset B may also depend on asset C. In the disclosed embodiments, an asset that is relied upon by other assets in the set of assets may be referred to as a dependent asset, for example, in the above example, asset C may be referred to as a dependent asset. According to examples of embodiments of the present disclosure, an application development engine may be utilized to build a collection of assets for generating an application, which embodiments of the present disclosure are not particularly limited.
In step S420, for each asset in the set of assets used to generate the application, a determination may be made as to whether to optimize the asset based on predetermined rules, and in the event that it is determined to optimize the asset, the asset may be optimized to generate an optimized set of assets.
According to an example of an embodiment of the present disclosure, the predetermined rule may be whether the asset is a dependent asset. Specifically, an asset being dependent indicates that the asset is dependent on one or more other assets, which if not optimized can complicate the structure of the asset, reduce asset fabrication efficiency, and the asset can be repeatedly serialized during serialization, resulting in a bulky application and slow runtime loading. Thus, the dependent assets can be optimized. In this case, determining whether to optimize the asset based on the predetermined rule may include: it is determined whether the asset is a dependent asset and, in the event that the asset is a dependent asset, it is determined to perform an optimization process on the asset.
According to another example of an embodiment of the present disclosure, the predetermined rule may be whether the asset is a dependent asset and whether the size of the asset exceeds a predetermined threshold. In practical applications, if all the assets are judged to be dependent assets, and all the dependent assets are optimized, the number of the assets to be judged and optimized may be larger, especially if there are more dependent assets, the optimizing process may take longer, and at this time, advantages such as simplified asset structure, reduced APK volume, and shortened application loading time, which are brought about by optimizing some of the smaller dependent assets, may not be significant.
Thus, the optimization of an asset may be determined only if the asset is a dependent asset and the size of the asset exceeds a predetermined threshold. That is, if the asset is a dependent asset, but the asset is small, it does not greatly affect the complexity of the asset structure, and may not be optimized, but only if the asset size exceeds a predetermined threshold, resulting in a significant increase in the complexity of the asset structure. Wherein the predetermined threshold may be determined according to actual design requirements, which is not particularly limited by the embodiments of the present disclosure. In this way, the efficiency of the asset optimization process may be improved while the advantages of embodiments of the present disclosure, such as reduced asset architecture, reduced APK volume, reduced application loading time, etc., are effectively achieved.
In embodiments of the present disclosure, it may also be determined whether to optimize the asset by other predetermined rules, which embodiments of the present disclosure are not particularly limited. In addition, when the application generating method according to the embodiment of the present disclosure is adopted, an optimization option may be set accordingly in the development engine of the application, so that a predetermined optimization rule may be set by the optimization option, whether to perform an optimization process on an asset, or the like.
In examples of embodiments of the present disclosure, when an asset is determined to be optimized, the asset may be optimized by deleting the asset from the parent asset on which it depends and saving the name and path of the asset in the parent asset. Described below in connection with a specific example, where each asset may be considered a Node, for example, a parent asset Node may be defined as a "Node" type, a parent asset containing or being dependent on a plurality of other child assets, which may be defined as < Node > child. Before the optimization process, each parent asset Node Class Node includes a list of a plurality of child asset nodes, as follows:
table 1 data structure before optimization
After determining that a certain one of the parent assets is to be optimized, the dependent asset node is deleted from the list of child asset nodes in the parent asset node and the name and path of the dependent asset is saved in the parent asset node. For example, in the above example, the dependent asset Node may be deleted from List < Node > child of the parent asset Node, and a SoftNode type is added to save the Name (Name) and path (AssetPath) of the dependent asset, and the optimized data structure may be expressed as:
Table 2 data structure after optimization
Where the path of the asset being optimized points to the storage space of the asset, such as may point to the root directory of an application, an associated directory in a client device, etc., embodiments of the present disclosure are not particularly limited.
It should be noted that the data structures in table 1 and table 2 are merely examples and are not limiting, for example, many other attributes may be included in the parent asset Node class besides the child field, and the optimized data structure may take other suitable forms, which is not particularly limited by the embodiments of the present disclosure.
The above describes the optimization process in which the asset to be optimized is deleted directly from its parent asset while preserving its name and path. According to another example of an embodiment of the present disclosure, for determining an asset to be optimized, the asset node may also be reserved in its parent asset node, and only a specific element in the asset may be optimized, for example, an element such as a picture, a font, etc. that occupies more disk space and memory space in the asset may be optimized. Then in this example, determining whether to optimize the asset based on the predetermined rule may include: determining whether an element having a size exceeding a predetermined threshold is contained in the asset; and upon determining that the asset contains an element of a size exceeding a predetermined threshold, determining to optimize the asset. In this case, the asset may be optimized by deleting the element having the size exceeding the predetermined threshold from the asset and saving the name and path of the element in the asset, and the detailed implementation is similar to that described above with reference to tables 1 and 2, and will not be repeated here. Wherein the predetermined threshold may be determined according to actual design requirements, which is not particularly limited by the embodiments of the present disclosure.
Through the optimization processing, each asset in the asset collection for generating the application program is subjected to the optimization processing so as to generate an optimized asset collection, and the asset structure of the optimized asset collection is effectively simplified, so that the asset production efficiency of the application program is improved.
Next, in step S430, the optimized asset set is serialized based on the optimized processing state of each asset in the optimized asset set to generate a serialized asset set.
In general, in the construction process of an application program such as APK, a compiling engine, compiling a dynamic library, packaging a resource, and generating APK may be included, where the packaging resource refers to a process of converting a resource in an engine editor into a resource used by a device (e.g., a mobile terminal), and the process may include, for example, serializing, compressing, format-compatible, and the like, the resource, where serialization refers to a process of writing a persistent attribute of the resource to a disk file. In the disclosed embodiment, serialization and the like are also required before the application is generated using the optimized asset collection.
In an example of optimizing an asset by deleting the asset from its dependent parent asset and saving the name and path of the asset in the parent asset, for each asset in the optimized asset set, serialization of the asset may be skipped if the asset is optimized and only if the asset is not optimized. Serializing an asset, as previously mentioned, refers to writing the persisted attributes of the asset to a disk file, where the persisted attributes may include the content information, coordinate information, alignment information, path information, memory information, and any other desired attributes of the elements of the asset, and so forth. For example, for a Text box (Text), the attributes that need to be persisted may include coordinates, alignment information, text content, text color, and so forth. For another example, for a picture (Image), the attributes that need to be persisted may include picture path, picture size, picture RGB, and so on. Due to the adoption of the optimization processing mode, the dependency relationship between the optimized asset and the parent asset is relieved, so that the serialization process of the optimized asset is not triggered when the parent asset is serialized, and the time, the energy consumption and the memory cost of resource serialization are effectively reduced.
In addition, similarly, in an example of optimizing an asset by deleting an element whose size exceeds a predetermined threshold from the asset and saving the name and path of the element in the asset, for each asset in the optimized asset set, serialization of the element of the asset and serialization of other elements of the asset may be skipped in the case where the asset is optimized; and serializing the asset if the asset is not optimally processed. In addition, when the optimized asset is serialized, serialization of elements occupying larger memory or disk space in the asset is not triggered, so that the time, energy consumption and memory cost of resource serialization can be effectively reduced.
After the serialization of the optimized asset set is completed to generate a serialized asset set, in step S440, an application may be generated based on the serialized asset set. For example, where the application is an APK, the process compresses the dynamically linked library, serialized asset, etc. into a separate application file in accordance with the specifications of the application platform (such as a mobile terminal). In the embodiment of the present disclosure, the application platform of the application program may be a fixed terminal such as a desktop computer, an internet of things device, or may be a mobile terminal such as a smart phone, a tablet computer, a portable computer, a smart wearable device, a Personal Digital Assistant (PDA), or the like, to which the embodiment of the present disclosure is not limited in particular.
In order to make the steps of the application generation method according to the embodiment of the present disclosure clearer, further description is made below in connection with fig. 5. Fig. 5 illustrates another flow chart of an example application generation method according to an embodiment of the disclosure. After determining the set of assets for generating the application, as shown in FIG. 5, for the assets in the set of assets, determining whether to optimize the assets according to a predetermined rule; if it is determined to optimize the asset, the asset may be deleted from its parent asset and its name and path saved in the parent asset and serialization of the optimized asset may be skipped in a subsequent serialization process; otherwise, if the asset is not optimized, serializing the asset in a subsequent serialization process; repeating the above operation on other assets in the asset collection, namely traversing all the assets in the asset collection until the serialization of the asset collection is completed; finally, an application is generated, such as an APK, based on the serialized asset collection.
By using the method for generating the application program, the asset structure of the application program can be greatly simplified without splitting the asset of the application program by releasing the dependency relationship between the asset and the parent asset and simultaneously storing the name and the path of the asset in the parent asset, so that the manufacturing efficiency of the application program can be effectively improved and the memory and the disk space occupied by the application program can be reduced; in addition, in the running process of the subsequent application program, when the optimized asset needs to be loaded, redundant code logic is not needed, and the loading can be performed quickly through the saved names and paths of the asset or the asset element, so that the loading speed of the application program can be improved effectively, and the user experience is optimized.
An application loading method according to an embodiment of the present disclosure is described below with reference to fig. 6. Fig. 6 illustrates a flowchart of an application loading method 600 according to an embodiment of the present disclosure. Since some of the details in the application loading method 600 are the same as those of the application generating method 400 described above with reference to fig. 4, repeated descriptions of the same are omitted here for simplicity.
The application here may be, for example, obtained according to the application generation method described above. At the time of application running, as shown in fig. 6, in step S610, an asset collection corresponding to an interface of an application is loaded, and at least a part of the interface is displayed based on the asset collection. The interface of the application may include a plurality of sub-interfaces, for example, the application interface corresponding to the UI asset shown in fig. 1 may include a menu 1 interface, a menu 2 interface, a menu 3 interface, and so on. During initial loading of an application, only a portion of its interface may be displayed, e.g., in FIG. 1, only the menu 1 interface may be displayed, and the user may click on other menu options as needed to display other menu interfaces.
In the embodiment of the present disclosure, loading the asset set corresponding to the interface of the application may refer to acquiring the serialized asset set of the application from the storage space such as the disk file, and deserializing the serialized asset set to obtain the asset set corresponding to the interface of the application. Where reverse serialization is the process that is the inverse of serialization, i.e., the process of reading out the persisted attributes of an asset from a disk file. In general, the structure of a disk file may be as shown in FIG. 7. Fig. 7 shows a schematic diagram of an example disk file according to an embodiment of the present disclosure. As shown in fig. 7, the disk file may include a file header and a plurality of attribute parts, where the file header includes file description information such as a total length of the file, a file type, and the like; the attribute part contains the length information of the attribute and the corresponding attribute content. When the disk file shown in fig. 7 is deserialized, the file header of the disk file is first read to obtain description information, and then the contents of each attribute part are respectively read according to the description information until the end of the file stream is read, so that the deserialization process of the disk file is completed, or the loading of the assets in the disk file is completed.
In step S620, a trigger command is received for a sub-interface of the interface and a determination is made as to whether a sub-interface asset corresponding to the sub-interface exists in the asset collection. Wherein the trigger command may be an operation command to the sub-interface, for example, in fig. 1, the user may trigger the display of the menu 2 interface by clicking on the menu 2 option; the trigger command may also be a message command received by the application program, such as over a wired or wire network, that is associated with the sub-interface, e.g., the application program may receive a session message from another application program that triggers the display of a session window, etc.
In the case where the application is obtained using the application generation method as described above, the asset used for generating the application is subjected to the optimization processing step before being serialized, some of the assets may be deleted from its parent asset during the optimization processing, but only the name and path thereof are retained, and thus are not serialized, and the part of the asset is not included in the serialized asset set of the application obtained from the disk file, and accordingly is not included in the asset set loaded in step S610. Thus, upon receiving a trigger command for a particular sub-interface in step S620, it is first determined whether the sub-interface asset corresponding to the sub-interface exists in the loaded asset collection.
In one aspect, if the sub-interface asset is not optimized during the generation of the application, the sub-interface asset exists in the loaded asset set, and the corresponding sub-interface may be displayed directly based on the sub-interface asset.
On the other hand, if a sub-interface asset is optimized during the generation of an application, the sub-interface asset may not be present in the loaded asset collection. For example, as described above, the optimization process may be to delete a child interface asset from its dependent parent asset and save the name and path of the child interface asset in the parent asset when the child interface asset is a dependent asset, so that the child interface asset will not be serialized during serialization and accordingly the child interface asset will not exist in the loaded asset collection. In this case, a path of the child interface asset may be obtained from a parent asset in the loaded set of assets that depends on the child interface asset based on the name of the child interface asset, and the child interface asset may be loaded from the obtained path to display the child interface further based on the loaded child interface asset.
In order to more clearly describe an application loading method according to an embodiment of the present disclosure, further description is made with reference to an example in fig. 8. FIG. 8 illustrates a flowchart of an example application running in accordance with an embodiment of the present disclosure. As shown in fig. 8, the asset collection of the application is first loaded and at least a portion of the corresponding interface is displayed accordingly, at which point the current running of the application ends if there are no additional trigger commands. If a trigger command for a certain sub-interface is received, for example, an operation command for the sub-interface or a message command related to the sub-interface received through a network is received, determining whether a sub-interface asset corresponding to the sub-interface exists in the loaded asset set, if so, directly displaying the sub-interface based on the sub-interface asset, and ending the current running of the application program; if not, based on the name of the child interface asset, a path of the child interface asset is obtained from the parent asset of the child interface asset in the loaded asset collection, the child interface asset is loaded from the obtained path, and the child interface is correspondingly displayed, and then the current running of the application program is ended.
By using the application program loading method according to the embodiment of the disclosure, under the condition that the application program is subjected to the optimization processing as described above, the loading speed of the application program can be effectively improved, and the user experience is optimized.
The description is made in connection with the example in fig. 9. Fig. 9 illustrates an example UI asset structure schematic according to an embodiment of the disclosure. As shown in fig. 9, there is a dependency between the asset "bp_mobile Widget_NewBag_container" labeled (1) and the asset "bp_container" labeled (2), and if the asset (2) is not optimized, the loading of the asset (2) is triggered at the same time, so that the loading of the asset (1) becomes slow, especially when the asset (2) occupies a larger disk or memory space. If the asset (2) is subjected to the optimization process as described above, for example, the asset (2) is deleted from the asset (1) to release the dependency relationship between the asset (2) and the asset (2) is only stored in the asset (1), the loading of the asset (1) is not triggered, so that the loading speed of the asset (1) can be effectively improved, and if the asset (2) needs to be loaded, the corresponding loading path can be quickly acquired from the asset (1) for loading.
By the method, the loading speed of the application program can be remarkably improved, and particularly, interfaces with sub-interfaces with more different levels are loaded. Taking the game interface in fig. 3 as an example, where the knapsack interface includes more sub-interfaces, if the assets of the sub-interfaces are not optimized, all the sub-interface assets need to be loaded each time the knapsack interface is opened, which results in a larger delay in opening the knapsack interface. By using the application program generating method and the application program loading method of the embodiment of the disclosure, for example, corresponding sub-interface assets such as weapon sub-interfaces, armor sub-interfaces, helmet sub-interfaces and the like in a knapsack interface can be optimized, so that when clicking a knapsack menu, the knapsack interface can be rapidly loaded and displayed, and for example, if a user wishes to further open the armor sub-interface, the corresponding sub-interface assets can be rapidly acquired according to the stored path, and the armor sub-interface can be loaded and displayed.
An application generating apparatus according to an embodiment of the present disclosure is described below with reference to fig. 10. Fig. 10 shows a schematic structural diagram of an application generating apparatus 1000 according to an embodiment of the present disclosure. As shown in fig. 10, the application generating apparatus 1000 may include a determining unit 1010, an optimizing unit 1020, a serializing unit 1030, and a generating unit 1040. In addition to these 4 units, the application generating apparatus 1000 may include other units, but since they are not related to the contents of the embodiment of the present invention, a description of these units is omitted here. In addition, since the functions of the application generating apparatus 1000 are similar to those of the application generating method 400 described with reference to fig. 4, a repetitive description of some of the same contents is omitted here.
The determination unit 1010 is configured to determine a set of assets for generating an application. Here, the application may be, for example, an android system Application Package (APK), but the embodiment of the present disclosure is not particularly limited thereto, and the application may be any other application such as EXE (executable file) or the like. As previously mentioned, an application may be made up of many assets, which may include various elements such as pictures, text, audio video files, etc., collectively referred to herein as an asset collection. There may be dependencies (or referred to as reference relationships) between individual assets in the application's collection of assets, for example asset a may depend on asset C, and asset B may also depend on asset C. In the disclosed embodiments, an asset that is relied upon by other assets in the set of assets may be referred to as a dependent asset, for example, in the above example, asset C may be referred to as a dependent asset. According to examples of embodiments of the present disclosure, an application development engine may be utilized to build a collection of assets for generating an application, which embodiments of the present disclosure are not particularly limited.
The optimization unit 1020 is configured to determine, for each asset in the set of assets used to generate the application, whether to optimize the asset based on a predetermined rule, and in the event that it is determined to optimize the asset, optimize the asset to generate an optimized set of assets.
According to an example of an embodiment of the present disclosure, the predetermined rule may be whether the asset is a dependent asset. Specifically, an asset being dependent indicates that the asset is dependent on one or more other assets, which if not optimized can complicate the structure of the asset, reduce asset fabrication efficiency, and the asset can be repeatedly serialized during serialization, resulting in a bulky application and slow runtime loading. Thus, the optimization unit 1020 may perform optimization processing on the dependent assets. In this case, the optimizing unit 1020 may be configured to: it is determined whether the asset is a dependent asset and, in the event that the asset is a dependent asset, it is determined to perform an optimization process on the asset.
According to another example of an embodiment of the present disclosure, the predetermined rule may be whether the asset is a dependent asset and whether the size of the asset exceeds a predetermined threshold. In practical applications, if all the assets are judged to be dependent assets, and all the dependent assets are optimized, the number of the assets to be judged and optimized may be larger, especially if there are more dependent assets, the optimizing process may take longer, and at this time, advantages such as simplified asset structure, reduced APK volume, and shortened application loading time, which are brought about by optimizing some of the smaller dependent assets, may not be significant. Accordingly, the optimization unit 1020 may be configured to: in the event that the asset is a dependent asset and the size of the asset exceeds a predetermined threshold, a determination is made to optimize the asset. That is, if the asset is a dependent asset, but the asset is small, it does not greatly affect the complexity of the asset structure, and may not be optimized, but only if the asset size exceeds a predetermined threshold, resulting in a significant increase in the complexity of the asset structure. Wherein the predetermined threshold may be determined according to actual design needs, which is not particularly limited by the embodiments of the present disclosure. In this way, the efficiency of the asset optimization process may be improved while the advantages of embodiments of the present disclosure, such as reduced asset architecture, reduced APK volume, reduced application loading time, etc., are effectively achieved.
In the embodiment of the present disclosure, the optimizing unit 1020 may also determine whether to perform the optimizing process on the asset through other predetermined rules, which is not particularly limited by the embodiment of the present disclosure. In addition, when the application generating apparatus according to the embodiment of the present disclosure is employed, an optimization option may be set accordingly in the development engine of the application, so that a predetermined optimization rule may be set by the optimization option, whether to perform an optimization process on an asset, or the like.
In an example of an embodiment of the present disclosure, when determining to optimize an asset, the optimization unit 1020 may optimize the asset by deleting the asset from the parent asset on which it depends and saving the name and path of the asset in the parent asset. According to another example of an embodiment of the present disclosure, for determining an asset to be optimized, the optimizing unit 1020 may also reserve the asset node in its parent asset node, and perform optimization processing only for a specific element in the asset, for example, perform optimization processing on elements such as pictures, fonts, and the like that occupy more disk space and memory space in the asset. Then in this example, the optimization unit 1020 may be configured to: determining whether an element having a size exceeding a predetermined threshold is contained in the asset; and upon determining that the asset contains an element of a size exceeding a predetermined threshold, determining to optimize the asset. Also, in this case, the optimizing unit 1020 may perform an optimizing process on the asset by deleting the element whose size exceeds the predetermined threshold from the asset and saving the name and path of the element in the asset. Wherein the predetermined threshold may be determined according to actual design requirements, which is not particularly limited by the embodiments of the present disclosure.
Through the optimization processing, each asset in the asset collection for generating the application program is subjected to the optimization processing so as to generate an optimized asset collection, and the asset structure of the optimized asset collection is effectively simplified, so that the asset production efficiency of the application program is improved.
The serialization unit 1030 is configured to serialize the optimized asset set based on the optimized processing state of each asset in the optimized asset set to generate a serialized asset set.
In an example of optimizing an asset by deleting the asset from the parent asset depending on it and saving the name and path of the asset in the parent asset, for each asset in the optimized asset set, the serialization unit 1030 may skip serialization of the asset if the asset is optimized, and serialize the asset if the asset is not optimized. Serializing an asset, as previously mentioned, refers to writing the persisted attributes of the asset to a disk file, where the persisted attributes may include the content information, coordinate information, alignment information, path information, memory information, and any other desired attributes of the elements of the asset, and so forth. Due to the adoption of the optimization processing mode, the dependency relationship between the optimized asset and the parent asset is relieved, so that the serialization process of the optimized asset is not triggered when the parent asset is serialized, and the time, the energy consumption and the memory cost of resource serialization are effectively reduced.
In addition, similarly, in an example of optimizing an asset by deleting an element whose size exceeds a predetermined threshold from the asset and saving the name and path of the element in the asset, the serialization unit 1030 may skip serialization of the element of the asset and serialize other elements of the asset in a case where the asset is optimized for each asset in the optimized asset set; and serializing the asset if the asset is not optimally processed. In addition, when the optimized asset is serialized, serialization of elements occupying larger memory or disk space in the asset is not triggered, so that the time, energy consumption and memory cost of resource serialization can be effectively reduced.
After completing serialization of the optimized asset set to generate a serialized asset set, the generation unit 1040 may generate an application based on the serialized asset set. For example, where the application is an APK, the process compresses the dynamically linked library, serialized asset, etc. into a separate application file in accordance with the specifications of the application platform (such as a mobile terminal). In the embodiment of the present disclosure, the application platform of the application program may be a fixed terminal such as a desktop computer, an internet of things device, or may be a mobile terminal such as a smart phone, a tablet computer, a portable computer, a smart wearable device, a Personal Digital Assistant (PDA), or the like, to which the embodiment of the present disclosure is not limited in particular.
By using the application program generating device, the dependency relationship between the asset and the parent asset is relieved, the name and the path of the asset are stored in the parent asset, and the asset structure can be greatly simplified without splitting the asset of the application program, so that the manufacturing efficiency of the application program can be effectively improved, and the memory and the disk space occupied by the application program are reduced; in addition, in the running process of the subsequent application program, when the optimized asset needs to be loaded, redundant code logic is not needed, and the loading can be performed quickly through the saved names and paths of the asset or the asset element, so that the loading speed of the application program can be improved effectively, and the user experience is optimized.
An application according to an embodiment of the present disclosure is described below with reference to fig. 11. Fig. 11 shows a schematic structural diagram of an application 1100 according to an embodiment of the present disclosure. As shown in fig. 11, the application 1100 may include a loading unit 1110, a determining unit 1120, and a display unit 1130. In addition to these 3 units, the application 1100 may include other units, but since they are not related to the contents of the embodiment of the present invention, a description of these units is omitted here. In addition, since the functions of the application 1100 are similar to those of the application loading method 600 described with reference to fig. 6, a repetitive description of some of the same contents is omitted here.
The application here may be, for example, obtained according to the application generation method described above. While the application is running, the loading unit 1110 is configured to load a set of assets corresponding to an interface of the application, and accordingly the display unit 1130 is configured to display at least a portion of the interface based on the set of assets. The interface of the application may include a plurality of sub-interfaces, for example, the application interface corresponding to the UI asset shown in fig. 1 may include a menu 1 interface, a menu 2 interface, a menu 3 interface, and so on. During initial loading of an application, only a portion of its interface may be displayed, e.g., in FIG. 1, only the menu 1 interface may be displayed, and the user may click on other menu options as needed to display other menu interfaces.
In the embodiment of the present disclosure, loading the asset set corresponding to the interface of the application may refer to acquiring the serialized asset set of the application from the storage space such as the disk file, and deserializing the serialized asset set to obtain the asset set corresponding to the interface of the application. Where reverse serialization is the process that is the inverse of serialization, i.e., the process of reading out the persisted attributes of an asset from a disk file.
The determining unit 1120 is configured to receive a trigger command for a sub-interface of the interface, and determine whether a sub-interface asset corresponding to the sub-interface exists in the asset collection. Wherein the trigger command may be an operation command to the sub-interface, for example, in fig. 1, the user may trigger the display of the menu 2 interface by clicking on the menu 2 option; the trigger command may also be a message command received by the application program, such as over a wired or wire network, that is associated with the sub-interface, e.g., the application program may receive a session message from another application program that triggers the display of a session window.
In the case where the application 1100 is obtained using the application generation method as described above, the asset used to generate the application is subjected to the optimization processing step before being serialized, some of the assets may be deleted from its parent asset during the optimization processing, only the name and path are retained, and thus are not serialized, and the part of the asset is not included in the serialized asset set of the application obtained from the disk file, and accordingly the part of the asset is not included in the asset set obtained by the loading unit 1110. Thus, when the determining unit 1120 receives a trigger command for a certain sub-interface, it first determines whether a sub-interface asset corresponding to the sub-interface exists in the loaded asset set.
In one aspect, if the sub-interface asset is not optimized during the generation of the application, the sub-interface asset exists in the loaded asset set, the display unit 1130 may display the corresponding sub-interface directly based on the sub-interface asset.
On the other hand, if a sub-interface asset is optimized during the generation of an application, the sub-interface asset may not be present in the loaded asset collection. For example, as described above, the optimization process may be to delete a child interface asset from its dependent parent asset and save the name and path of the child interface asset in the parent asset when the child interface asset is a dependent asset, so that the child interface asset will not be serialized during serialization and accordingly the child interface asset will not exist in the loaded asset collection. In this case, the loading unit 1110 may acquire a path of the child interface asset from a parent asset depending on the child interface asset in the loaded asset set based on the name of the child interface asset, and load the child interface asset from the acquired path, and then the display unit 1130 may display the child interface based on the loaded child interface asset.
With the application program according to the embodiment of the present disclosure, since the application program simplifies the asset structure through the optimization process as described above in the generation process, the memory space occupied by the obtained application program is effectively reduced, and the loading speed is fast in the running process, so that the user experience can be significantly optimized.
Furthermore, devices (e.g., application generation devices, etc.) according to embodiments of the present disclosure may also be implemented with the architecture of the exemplary computing device shown in fig. 12. Fig. 12 shows a schematic diagram of an architecture of an exemplary computing device, according to an embodiment of the present disclosure. As shown in fig. 12, computing device 1200 may include a bus 1210, one or more CPUs 1220, a Read Only Memory (ROM) 1230, a Random Access Memory (RAM) 1240, a communication port 1250 connected to a network, an input/output component 1260, a hard disk 1270, and the like. A storage device in computing device 1200, such as ROM 1230 or hard disk 1270, may store various data or files for computer processing and/or communication and program instructions for execution by the CPU. Computing device 1200 may also include a user interface 1280. Of course, the architecture shown in FIG. 12 is merely exemplary, and one or more components of the computing device shown in FIG. 12 may be omitted as may be practical in implementing different devices. The apparatus according to the embodiments of the present disclosure may be configured to perform the application generating method and the application loading method according to the above-described respective embodiments of the present disclosure, or to implement the application generating device or the application according to the above-described respective embodiments of the present disclosure.
Embodiments of the present disclosure may also be implemented as a computer-readable storage medium. Computer readable storage media according to embodiments of the present disclosure have computer readable instructions stored thereon. When the computer readable instructions are executed by the processor, the application generation method and the application loading method according to the embodiments of the present disclosure described with reference to the above drawings may be performed. Computer-readable storage media include, but are not limited to, volatile memory and/or nonvolatile memory, for example. Volatile memory can include, for example, random Access Memory (RAM) and/or cache memory (cache) and the like. The non-volatile memory may include, for example, read Only Memory (ROM), hard disk, flash memory, and the like.
According to an embodiment of the present disclosure, there is also provided a computer program product or a computer program comprising computer readable instructions stored in a computer readable storage medium. The processor of the computer device may read the computer-readable instructions from the computer-readable storage medium, and execute the computer-readable instructions, so that the computer device performs the application program generating method and the application program loading method described in the respective embodiments above.
Those skilled in the art will appreciate that various modifications and improvements can be made to the disclosure. For example, the various devices or components described above may be implemented in hardware, or may be implemented in software, firmware, or a combination of some or all of the three.
Furthermore, as shown in the present disclosure and claims, unless the context clearly indicates otherwise, the words "a," "an," "the," and/or "the" are not specific to the singular, but may include the plural. The terms "first," "second," and the like, as used in this disclosure, do not denote any order, quantity, or importance, but rather are used to distinguish one element from another. Likewise, the word "comprising" or "comprises", and the like, means that elements or items preceding the word are included in the element or item listed after the word and equivalents thereof, but does not exclude other elements or items. The terms "connected" or "connected," and the like, are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect.
Further, a flowchart is used in this disclosure to describe the operations performed by the system according to embodiments of the present disclosure. It should be understood that the preceding or following operations are not necessarily performed in order precisely. Rather, the various steps may be processed in reverse order or simultaneously. Also, other operations may be added to the processes or a step or steps may be removed from the processes.
Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the relevant art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
While the present disclosure has been described in detail above, it will be apparent to those skilled in the art that the present disclosure is not limited to the embodiments described in the present specification. The present disclosure may be embodied as modifications and variations without departing from the spirit and scope of the disclosure, which is defined by the appended claims. Accordingly, the description herein is for the purpose of illustration and is not intended to be in any limiting sense with respect to the present disclosure.

Claims (12)

1. An application generation method, comprising:
determining a set of assets for generating an application;
for each asset in the set of assets, determining whether to optimize the asset based on a predetermined rule, and if so, optimizing the asset to generate an optimized set of assets;
Serializing the optimized asset set based on an optimized processing state of each asset in the optimized asset set to generate a serialized asset set; and
generating the application based on the serialized asset collection,
wherein the set of assets includes dependent assets that are dependent on other assets in the set of assets, and determining whether to optimize the assets based on predetermined rules includes:
determining to perform an optimization process on the asset, where the asset is a dependent asset, the optimization process including deleting the asset from a parent asset on which it depends, and saving a name and path of the asset in the parent asset,
and wherein serializing the optimized asset set based on the optimized process state for each asset in the optimized asset set comprises:
for each asset in the optimized asset set, skipping serialization of the asset if the asset is optimized and serializing the asset if the asset is not optimized.
2. The application generation method of claim 1, wherein determining whether to optimize the asset based on a predetermined rule further comprises:
In the event that the asset is a dependent asset and the size of the asset exceeds a predetermined threshold, determining to optimize the asset.
3. The application generation method of claim 1, wherein determining whether to optimize the asset based on a predetermined rule further comprises:
determining whether an element of a size exceeding a predetermined threshold is contained in the asset; and
upon determining that the asset contains an element of a size exceeding a predetermined threshold, determining to optimize the asset.
4. The application generation method of claim 3, wherein optimizing the asset if it is determined to optimize the asset comprises:
deleting the elements with sizes exceeding a predetermined threshold from the asset and saving the names and paths of the elements in the asset, and
wherein serializing the optimized asset set based on the optimized process state of each asset in the optimized asset set comprises, for each asset in the optimized asset set:
skipping serialization of the elements of the asset and serializing other elements of the asset in the event that the asset is optimized; and is also provided with
The asset is serialized in the event that the asset is not optimally processed.
5. The application generation method of claim 1 or 4, wherein serializing the asset comprises:
writing the persistence attribute of the asset into a disk file, wherein the persistence attribute comprises at least one of content information, coordinate information, alignment information, path information and memory information of elements in the asset.
6. An application loading method, wherein an application is generated based on the method of claim 1, the method comprising:
loading a set of assets corresponding to an interface of the application and displaying at least a portion of the interface based on the set of assets;
receiving a triggering command of a sub-interface of the interface, and determining whether a sub-interface asset corresponding to the sub-interface exists in the asset set; and
displaying the child interface in the case that the child interface asset exists in the asset collection, and acquiring a path of the child interface asset from a parent asset depending on the child interface asset based on the name of the child interface asset, loading the child interface asset from the path, and displaying the child interface based on the loaded child interface asset in the case that the child interface asset does not exist in the asset collection.
7. The application loading method of claim 6, wherein the sub-interface asset is not present in the asset collection in the case where the sub-interface asset is optimized during the generation of the application.
8. The application loading method of claim 7, wherein the optimizing process comprises:
and deleting the child interface asset from the parent asset depending on the child interface asset when the child interface asset is a dependent asset, and storing the name and the path of the child interface asset in the parent asset.
9. The application loading method according to claim 6, wherein the trigger command is an operation command to the sub-interface or a message command related to the sub-interface received by the application through a network, and
wherein loading the set of assets corresponding to the interface of the application comprises:
acquiring a serialized asset set of the application program from a disk file; and
the serialized asset collection is deserialized to obtain the asset collection corresponding to an interface of the application.
10. An application generation apparatus, the apparatus comprising:
a determining unit configured to determine an asset set for generating an application;
An optimizing unit configured to determine, for each asset in the asset set, whether to perform an optimizing process on the asset based on a predetermined rule, and in a case where it is determined to perform an optimizing process on the asset, perform an optimizing process on the asset to generate an optimized asset set;
a serialization unit configured to serialize the optimized asset set based on an optimized processing state of each asset in the optimized asset set to generate a serialized asset set; and
a generation unit configured to generate the application based on the serialized asset collection,
wherein the set of assets includes dependent assets that are relied upon by other assets in the set of assets, the optimization unit further configured to: determining to perform an optimization process on the asset, where the asset is a dependent asset, the optimization process including deleting the asset from a parent asset on which it depends, and saving a name and path of the asset in the parent asset,
the serialization unit is further configured to: for each asset in the optimized asset set, skipping serialization of the asset if the asset is optimized and serializing the asset if the asset is not optimized.
11. An application generation device, comprising:
one or more processors; and
one or more memories having stored therein computer readable instructions that, when executed by the one or more processors, cause the one or more processors to perform the method of any of claims 1-5.
12. A computer readable storage medium having stored thereon computer readable instructions which, when executed by a processor, cause the processor to perform the method of any of claims 1-9.
CN202110767686.7A 2021-07-07 2021-07-07 Application program generating and loading method, device and medium Active CN113434149B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110767686.7A CN113434149B (en) 2021-07-07 2021-07-07 Application program generating and loading method, device and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110767686.7A CN113434149B (en) 2021-07-07 2021-07-07 Application program generating and loading method, device and medium

Publications (2)

Publication Number Publication Date
CN113434149A CN113434149A (en) 2021-09-24
CN113434149B true CN113434149B (en) 2023-09-08

Family

ID=77759529

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110767686.7A Active CN113434149B (en) 2021-07-07 2021-07-07 Application program generating and loading method, device and medium

Country Status (1)

Country Link
CN (1) CN113434149B (en)

Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2000048073A1 (en) * 1999-02-09 2000-08-17 Hearme Method and apparatus for managing assets of a client side application
US6947959B1 (en) * 1992-10-01 2005-09-20 Quark, Inc. Digital media asset management system and process
US7386752B1 (en) * 2004-06-30 2008-06-10 Symantec Operating Corporation Using asset dependencies to identify the recovery set and optionally automate and/or optimize the recovery
CA2759516A1 (en) * 2011-11-24 2013-05-24 Ibm Canada Limited - Ibm Canada Limitee Serialization of pre-initialized objects
US8893014B1 (en) * 2012-06-28 2014-11-18 Google Inc. Deferred loading of a web page
CN108536463A (en) * 2018-04-09 2018-09-14 深圳市腾讯网络信息技术有限公司 Obtain method, apparatus, equipment and the computer readable storage medium of resource packet
CN109522020A (en) * 2018-09-29 2019-03-26 中国平安人寿保险股份有限公司 Android system installation kit method for reducing body weight, device, terminal and storage medium
WO2019062615A1 (en) * 2017-09-27 2019-04-04 阿里巴巴集团控股有限公司 User interface rendering method and apparatus
CN110134650A (en) * 2019-04-28 2019-08-16 深圳市腾讯网域计算机网络有限公司 A kind of file loading method, device, equipment and storage medium
CN110399415A (en) * 2019-07-23 2019-11-01 江苏鼎速网络科技有限公司 A kind of data unserializing device and computing terminal
CN110727473A (en) * 2019-10-10 2020-01-24 Oppo广东移动通信有限公司 Resource control method, device, system, storage medium and electronic equipment
CN110968310A (en) * 2018-09-30 2020-04-07 北京国双科技有限公司 Webpage component rendering method and system
CN111897596A (en) * 2020-07-21 2020-11-06 珠海剑心互动娱乐有限公司 Unity game resource loading optimization method and system
CN112181554A (en) * 2020-09-08 2021-01-05 安徽鸿程光电有限公司 Interactive interface display method and device, electronic device and storage medium
CN112379933A (en) * 2019-07-29 2021-02-19 腾讯科技(深圳)有限公司 Application program starting method, device, medium and electronic equipment
CN112386916A (en) * 2020-12-01 2021-02-23 网易(杭州)网络有限公司 Resource loading method and device and electronic equipment

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103870470B (en) * 2012-12-11 2016-05-11 腾讯科技(深圳)有限公司 A kind of method of resource file of loading application programs and charger
US20190342425A1 (en) * 2018-05-01 2019-11-07 Unity IPR ApS Method and system for autonomous content optimization in games and graphical interactive applications

Patent Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6947959B1 (en) * 1992-10-01 2005-09-20 Quark, Inc. Digital media asset management system and process
WO2000048073A1 (en) * 1999-02-09 2000-08-17 Hearme Method and apparatus for managing assets of a client side application
US7386752B1 (en) * 2004-06-30 2008-06-10 Symantec Operating Corporation Using asset dependencies to identify the recovery set and optionally automate and/or optimize the recovery
CA2759516A1 (en) * 2011-11-24 2013-05-24 Ibm Canada Limited - Ibm Canada Limitee Serialization of pre-initialized objects
US8893014B1 (en) * 2012-06-28 2014-11-18 Google Inc. Deferred loading of a web page
WO2019062615A1 (en) * 2017-09-27 2019-04-04 阿里巴巴集团控股有限公司 User interface rendering method and apparatus
CN108536463A (en) * 2018-04-09 2018-09-14 深圳市腾讯网络信息技术有限公司 Obtain method, apparatus, equipment and the computer readable storage medium of resource packet
CN109522020A (en) * 2018-09-29 2019-03-26 中国平安人寿保险股份有限公司 Android system installation kit method for reducing body weight, device, terminal and storage medium
CN110968310A (en) * 2018-09-30 2020-04-07 北京国双科技有限公司 Webpage component rendering method and system
CN110134650A (en) * 2019-04-28 2019-08-16 深圳市腾讯网域计算机网络有限公司 A kind of file loading method, device, equipment and storage medium
CN110399415A (en) * 2019-07-23 2019-11-01 江苏鼎速网络科技有限公司 A kind of data unserializing device and computing terminal
CN112379933A (en) * 2019-07-29 2021-02-19 腾讯科技(深圳)有限公司 Application program starting method, device, medium and electronic equipment
CN110727473A (en) * 2019-10-10 2020-01-24 Oppo广东移动通信有限公司 Resource control method, device, system, storage medium and electronic equipment
CN111897596A (en) * 2020-07-21 2020-11-06 珠海剑心互动娱乐有限公司 Unity game resource loading optimization method and system
CN112181554A (en) * 2020-09-08 2021-01-05 安徽鸿程光电有限公司 Interactive interface display method and device, electronic device and storage medium
CN112386916A (en) * 2020-12-01 2021-02-23 网易(杭州)网络有限公司 Resource loading method and device and electronic equipment

Also Published As

Publication number Publication date
CN113434149A (en) 2021-09-24

Similar Documents

Publication Publication Date Title
WO2021218327A1 (en) Page processing method and related device
US11144286B2 (en) Generating synchronous digital circuits from source code constructs that map to circuit implementations
US10810343B2 (en) Mapping software constructs to synchronous digital circuits that do not deadlock
CN111400246B (en) Asynchronous file import method, device, computer equipment and storage medium
WO2023065707A1 (en) Method and apparatus for page display
CN106850650B (en) Method for accessing data by game client and client game system
US11907296B2 (en) Method and system for traversing an object graph using traversal context objects
CN114117992B (en) Serialization and deserialization method and device and electronic equipment
CN113885935A (en) Resource packaging method and device, electronic equipment and computer readable storage medium
CN113434149B (en) Application program generating and loading method, device and medium
CN113553033A (en) Object serialization and deserialization method, device and computer readable storage medium
CN117234582A (en) Project code processing method and device, electronic equipment and storage medium
CN117271014A (en) Data processing method and client based on web worker
WO2023143545A1 (en) Resource processing method and apparatus, electronic device, and computer-readable storage medium
CN111797278A (en) Method for mapping associated object and relation
CN111228815B (en) Method, apparatus, storage medium and system for processing configuration table of game
CN113485686B (en) Information system program generation method and device, electronic equipment and storage medium
CN109739548A (en) Program packaging method, program packing apparatus and computer readable storage medium
US9910834B2 (en) Converting terminal-based legacy applications to web-based applications
CN111124386A (en) Unity-based animation event processing method, device, equipment and storage medium
CN111243069A (en) Scene switching method and system of Unity3D engine
CN117331578B (en) Cluster mirror image deployment method and system for microminiature data center
CN116595284B (en) Webpage system operation method, device, equipment, storage medium and program
CN114356589B (en) Multi-writer and multi-reader data storage and reading method, device and equipment
CN117406992A (en) Special effect display method and device, electronic equipment and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40051746

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant