CN113434149A - 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
CN113434149A
CN113434149A CN202110767686.7A CN202110767686A CN113434149A CN 113434149 A CN113434149 A CN 113434149A CN 202110767686 A CN202110767686 A CN 202110767686A CN 113434149 A CN113434149 A CN 113434149A
Authority
CN
China
Prior art keywords
asset
assets
interface
application
optimized
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.)
Granted
Application number
CN202110767686.7A
Other languages
Chinese (zh)
Other versions
CN113434149B (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

Images

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The present disclosure provides an application generation method, an application loading method, an application 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 asset set, determining whether to optimize the asset based on a predetermined rule, and if the asset is determined to be optimized, optimizing the asset to generate an optimized asset set; serializing the optimized asset set based on the optimization 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 technologies, and more particularly, to an application generation method, an application loading method, an apparatus and a device, and a computer-readable storage medium.
Background
During the construction of an application, a large number of computer assets, such as User Interface (UI) assets, may be involved or included. Taking a common Android Application Package (APK) as an example, for a game program, for example, some UI modules (e.g., item descriptions, avatars, etc.) may repeatedly appear in multiple UI interfaces. In this case, to facilitate reuse and development maintenance, the UI modules that need to be reused are individually made into one asset, which can be referenced by other assets. Therefore, one UI interface tends to depend on a plurality of other UI assets, and such complex dependency causes the complexity of the asset composition of the application program to be very high, and the loading of UI assets into the memory during the running of the application program is also very time-consuming.
Aiming at the problems, after the assets of the application program are manufactured, the assets with the dependency relationship are disassembled, then packaging is carried out, APK is generated, and the dependent assets are loaded into a memory according to actual business requirements in the running process of the application program. However, the asset splitting method makes the application program production inefficient, makes subsequent maintenance of the application program assets difficult, and during the running process of the application program, repeated loading of the same asset module by different UI interfaces brings many repeated codes, which causes code logic redundancy.
Disclosure of Invention
In order to effectively solve the above problems, the present disclosure provides an application generation method, an application loading method, and apparatus and a computer-readable storage medium.
According to an aspect of an embodiment of the present disclosure, there is provided an application generation method including: determining a set of assets for generating an application; for each asset in the asset set, determining whether to optimize the asset based on a predetermined rule, and if the asset is determined to be optimized, optimizing the asset to generate an optimized asset set; serializing the optimized asset set based on the optimization 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, the asset set includes dependent assets that are depended on by other assets in the asset set, and determining whether to optimize the assets based on a predetermined rule includes: determining whether the asset is a dependent asset; and determining to optimize the asset in the case that the asset is a dependent asset.
According to an example of the embodiment of the present disclosure, determining whether to optimize the asset based on a predetermined rule further includes: determining to optimize the asset if the asset is a dependent asset and the size of the asset exceeds a predetermined threshold.
According to an example of the embodiment of the present disclosure, optimizing the asset if it is determined to optimize the asset includes: the asset is deleted from the parent that depends on it and the name and path of the asset are saved in the parent.
According to an example of an embodiment of the present disclosure, wherein serializing the set of optimized assets based on the optimization processing status of each asset in the set of optimized assets comprises, for each asset in the set of optimized assets: skipping serialization of the asset where the asset is optimally processed; and serializing the asset if the asset is not optimally processed.
According to an example of the disclosed embodiment, wherein determining whether to optimize the asset based on a predetermined rule comprises: determining whether an element having a size exceeding a predetermined threshold is included in the asset; and determining to optimize the asset when determining that the asset contains an element with a size exceeding a predetermined threshold.
According to an example of the embodiment of the present disclosure, optimizing the asset if it is determined to optimize the asset includes: deleting the elements having a size that exceeds a predetermined threshold from the assets and saving names and paths of the elements in the assets, and wherein serializing the set of optimized assets based on the optimization processing state of each asset in the set of optimized assets comprises, for each asset in the set of optimized assets: skipping serialization of the element of the asset and serializing other elements of the asset if 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, wherein serializing the assets comprises: and writing the persistent attribute of the asset into a disk file, wherein the persistent 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 program loading method, including: loading a set of assets corresponding to an interface of an application program and displaying at least a portion of the interface based on the set of assets; receiving a triggering command for a sub-interface of the interface, and determining whether a sub-interface asset corresponding to the sub-interface exists in the asset collection; and displaying the child interface if the child interface asset exists in the asset set, and acquiring a path of the child interface asset from a parent asset depending on the child interface asset based on a 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 if the child interface asset does not exist in the asset set.
According to an example of the embodiment of the present disclosure, in a case where the child interface asset is subjected to optimization processing in the generation process of the application program, the child interface asset does not exist in the asset collection.
According to an example of the disclosed embodiment, wherein the optimization process comprises: and when the child interface asset is a dependent asset, deleting the child interface asset from a parent asset dependent on the child interface asset, and storing the name and the path of the child interface asset in the parent asset.
According to an example of the embodiment of the present disclosure, the trigger command is an operation command for the sub-interface or a message command related to the sub-interface and received by the application program through a network, and the 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 set to obtain the asset set corresponding to the interface of the application.
According to another aspect of the embodiments of the present disclosure, there is provided an application generation apparatus, including: a determining unit configured to determine a set of assets for generating an application; the optimization unit is configured to determine whether to optimize the assets based on a preset rule for each asset in the asset set, and if the assets are determined to be optimized, optimize the assets to generate an optimized asset set; a serialization unit configured to serialize the optimized asset set based on an optimization processing state of each asset in the optimized asset set to generate a serialized asset set; and a generating 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 displaying unit, wherein the loading unit is configured to load a set of assets corresponding to an interface of the application program, and the displaying unit is configured to display at least a portion of the interface based on the set of assets. 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 is present in the set of assets, a display unit is configured to display the sub-interface. In a case where the child interface asset does not exist in the asset set, the loading unit is further configured to acquire a path of the child interface asset from a parent asset depending on the child interface asset based on a 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 generation apparatus including: one or more processors; and one or more memories having computer-readable instructions stored therein, which when executed by the one or more processors, cause the one or more processors to perform the methods of the various aspects described 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 the method according to any one 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 the method according to any one of the above aspects of the present disclosure.
By using the application generation method, the application loading method, the device, the equipment, the computer readable storage medium and the computer program product according to the embodiments of the disclosure, the asset structure of the application can be greatly simplified without splitting the asset of the application by removing 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, so that the production efficiency of the application can be effectively improved, and the memory and the disk space occupied by the application can be reduced; in addition, in the subsequent running process of the application program, when the optimized asset needs to be loaded, redundant code logic is not needed, and the asset or the name and the path of the asset element are saved, so that the loading speed of the application program can be effectively improved, and the user experience is optimized.
Drawings
The above and other objects, features and advantages of the embodiments of the present disclosure will become more apparent by describing in more detail the embodiments of the present disclosure with reference to the attached drawings. The accompanying drawings are included to provide a further understanding of the 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 principles of the disclosure and not to limit the disclosure. In the drawings, like reference numbers generally represent like parts or steps.
FIG. 1 shows a layout diagram of UI assets according to an example of the present disclosure;
FIG. 2 shows a schematic diagram of a UI asset structure in a game engine according to an example of the present disclosure;
FIG. 3 shows a schematic diagram of a game interface according to an example of the present disclosure;
FIG. 4 shows a flow diagram of an application generation method according to an embodiment of the present disclosure;
FIG. 5 shows another flowchart of an application generation method according to an example of an embodiment of the present disclosure;
FIG. 6 illustrates a flow chart of an application loading method according to an embodiment of the disclosure;
FIG. 7 shows a schematic structural diagram of a disk file according to an example of an embodiment of the present disclosure;
FIG. 8 shows a flowchart of application execution according to an example of an embodiment of the present disclosure;
FIG. 9 shows a UI asset structure diagram according to an example of an embodiment of the disclosure;
fig. 10 shows a schematic structural diagram of an application generation apparatus according to an embodiment of the present disclosure;
FIG. 11 shows a schematic structural diagram of an application in accordance with 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 is to be understood that the described embodiments are merely exemplary of some, and not all, of the present disclosure. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without any inventive step, are intended to be within the scope of the present disclosure.
In this disclosure, an asset of an application may refer to, for example, a collection of various virtual data, information, resources, etc. involved or contained by the application, e.g., a User Interface (UI) asset may be composed of various elements such as a text picture, an audio-video file, etc. Fig. 1 shows a layout diagram of UI assets 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, wherein the menus and content areas may also be separate assets. After a user clicks on a certain menu (e.g. menu 1 in fig. 1), the content area changes accordingly, that is, the content area and the menu are associated with each other or have a dependency relationship. In addition, for better visual presentation, there are strict requirements on the top, bottom, left and right of menus and content areas in the UI, and "pixel level" alignment is usually required. Therefore, when making UI assets, it is necessary to put these associated assets together to facilitate uniform interface setup and adjustment.
The illustration is in terms of UI assets for the game application. FIG. 2 shows a schematic diagram of a UI asset structure in a game engine according to an example of the present disclosure. As can be seen from fig. 2, a game interface may include multiple UI assets, and each UI asset may in turn contain, or be dependent 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, it is time consuming to load all these UI assets into the memory, for example, a game interface is opened with a noticeable click feeling, resulting in a poor user experience.
FIG. 3 shows 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 so on. For example, a user may click on a "knapsack" menu, thereby displaying a corresponding knapsack interface. It can be seen that in the backpack interface, a large number of menu items such as "weapon", "armor", "helmet", etc. are further included, and clicking each of them will display a plurality of operation interfaces at a lower level, and there may be a mutual reference and hierarchical relationship between these operation interfaces. That is, only the backpack interface is composed of a large number of assets with complex structures, and if the structures of the assets are not optimized, when a user clicks the backpack interface, the time consumption for loading all the assets of the backpack interface is high, so that a large delay occurs in opening the backpack interface, and a bad game experience is brought to the user.
One solution to the above problem is to split the reusable dependent asset from its upper asset after the asset of the application is made, and package it as a separate asset, thereby simplifying the asset structure of the application; and then, loading the corresponding dependent assets into a memory according to the actual service requirements in the running process of the application program. However, this approach can present further problems. On one hand, when the assets need to be modified and maintained subsequently, the assets need to be assembled again, and 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 the asset complexity, if the coordinate alignment parameter of the UI asset is to be adjusted subsequently, the content area and the menu need to be reassembled to perform a uniform 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, under the condition that the asset module is split, the different UI interfaces repeatedly load the asset module, so that many repeated codes are added, and code logic redundancy is caused.
In view of this, the embodiments of the present disclosure provide an application program generation method and a corresponding application program loading method, which can avoid code logic redundancy, greatly simplify an asset structure of an application program, improve manufacturing efficiency of the application program, and effectively improve loading speed of the application program and optimize 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 flow diagram of an application generation method 400 according to an embodiment of the 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 Package (APK), but the present disclosure is not limited thereto, and the Application may be any other Application such as an EXE (executable file). As previously mentioned, an application may be composed of many assets, which may include various elements such as pictures, text, audio-video files, etc., and which are collectively referred to herein as a collection of assets. There may be a dependency relationship (otherwise known as a referral relationship) between the assets in the application's collection of assets, e.g., asset A may depend on asset C and asset B may also depend on asset C. In embodiments of the present disclosure, assets that are relied upon by other assets in the collection of assets may be referred to as dependent assets, e.g., in the above example, asset C may be referred to as dependent assets. According to an example of an embodiment of the present disclosure, an application development engine may be utilized to build a set of assets for generating an application, which is not specifically limited by the embodiment of the present disclosure.
In step S420, for each asset in the asset set used for generating the application, it may be determined whether to optimize the asset based on a predetermined rule, and in the case where it is determined to optimize the asset, the asset is optimized to generate an optimized asset set.
According to an example of an embodiment of the present disclosure, the predetermined rule may be whether the asset is a dependent asset. Specifically, the asset indicates that the asset is depended on by one or more other assets, if the asset is not optimized, the asset structure is complex, the asset production efficiency is reduced, and the asset is repeatedly serialized in the serialization process, so that the application program is bulky and is slow to load during running. Therefore, 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 that the asset is subject to an optimization process.
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 assets are judged to be dependent assets, and all dependent assets are optimized, the number of assets to be judged and optimized may be large, especially if there are many dependent assets, the optimization process may take a long time, and at this time, the advantages of the optimization process performed on some small dependent assets, such as the reduction of asset structure, the reduction of APK volume, and the reduction of time consumed by application program loading, may not be significant.
Thus, an asset may be determined to be optimized 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 and does not have a significant impact on the complexity of the asset structure, it may not be optimized, but only if the asset size exceeds a predetermined threshold, which would significantly increase the complexity of the asset structure. The predetermined threshold may be determined according to actual design requirements, and is not particularly limited by the embodiments of the present disclosure. In this way, the efficiency of asset optimization processing can be improved while effectively achieving the advantages of the embodiments of the present disclosure, such as asset structure reduction, APK volume reduction, and reduction in application program loading time.
In the embodiment of the present disclosure, it may also be determined whether to optimize the asset through other predetermined rules, which is not specifically limited by the embodiment of the present disclosure. In addition, when the application generation method according to the embodiment of the present disclosure is adopted, an optimization option may be set in a development engine of an application accordingly, so that a predetermined optimization rule, determination of whether to perform optimization processing on an asset, and the like may be set by the optimization option.
In an example of an embodiment of the present disclosure, when determining to optimize an asset, the asset may be optimized by deleting the asset from the parent asset that depends on it, and saving the asset's name and path in the parent asset. In the following, a description is given with reference to a specific example, where each asset may be considered as a Node, for example, a parent asset Node may be defined as a "Node" type, the parent asset containing or depending on a plurality of other child assets, which may be defined as < Node > Children. Before the optimization process is performed, the Class Node of each parent asset Node comprises a list consisting of a plurality of child asset nodes, as follows:
Figure BDA0003152505680000081
TABLE 1 data Structure before optimization
After determining that a dependent asset in the parent asset is to be optimized, the dependent asset node is deleted from the child asset node list in the parent asset node, and the name and path of the dependent asset are saved in the parent asset node. For example, in the above example, the dependent asset Node may be deleted from the List < Node > Children of the parent asset Node, and a new SoftNode type is added to store the Name (Name) and the path (AssetPath) of the dependent asset, and the data structure after the optimization process may be represented as:
Figure BDA0003152505680000091
TABLE 2 optimized data Structure
Where the path of the asset being optimized points to the storage space of the asset, such as may point to a root directory of an application, an associated directory in a client device, and so on, embodiments of the present disclosure are not particularly limited in this respect.
It should be noted that the data structures in table 1 and table 2 are only used as examples and are not limited, for example, many other attributes may be included in the parent asset Node class in addition to the Children field, and the optimized data structure may also take other suitable forms, which is not limited in particular by the embodiments of the present disclosure.
The above describes an optimization process in which an asset to be optimized is deleted directly from its parent asset while preserving its name and path. According to another example of the 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 optimization is performed only on a specific element in the asset, for example, optimization is performed on an element such as a picture, a font, and the like, which occupies more disk space and memory space in the asset. Then, in this example, determining whether to optimize the asset based on the predetermined rules may include: determining whether an element having a size exceeding a predetermined threshold is contained in the asset; and determining to optimize the asset upon determining that the asset contains an element having a size exceeding a predetermined threshold. In this case, the asset may be optimized 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, and the specific implementation manner of the optimization is similar to that described above with reference to table 1 and table 2, and details are not described here. The predetermined threshold may be determined according to actual design requirements, and is not particularly limited by the embodiments of the present disclosure.
Through the optimization processing, each asset in the asset set used for generating the application program is optimized to generate the optimized asset set, and the asset structure of the optimized asset set 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 optimization process status of each asset in the optimized asset set to generate a serialized asset set.
Generally, in the building process of an application program such as an APK, processes such as compiling an engine, compiling a dynamic library, packaging a resource, generating the APK, and the like may be included, where a 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 operations such as serializing, compressing, format-compatible, and the like on the resource, where serializing refers to a process of writing a persistent attribute of the resource into a disk file. In the disclosed embodiment, serialization and other operations are also required before the application program is generated by utilizing the optimized asset set.
In an example where an asset is optimized by deleting the asset from its dependent parent and saving the asset's name and path in the parent, for each asset in the set of optimized assets, serialization of the asset may be skipped if the asset is optimized, and serialized if the asset is not optimized. As previously mentioned, serializing an asset refers to writing a persistent attribute of the asset into a disk file, where the persistent attribute may include content information, coordinate information, alignment information, path information, memory information, and any other desired attributes of elements of the asset, and so forth. For example, for a Text box (Text), the properties that need to be persisted may include coordinates, alignment information, Text content, Text color, and so on. As another example, for a picture (Image), the attributes that need to be persisted may include picture path, picture size, picture RGB, and so forth. By the optimization processing mode, the dependency relationship between the optimized asset and the parent asset of the optimized asset is removed, so that the serialization process of the optimized asset cannot be triggered when the parent asset is serialized, and the resource serialization time, energy consumption and memory cost 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 set of optimized assets, where the asset is optimized, serialization of the element of the asset and serialization of other elements of the asset may be skipped; and serializing the asset if the asset is not optimally processed. Similarly, when the optimized asset is serialized, serialization of elements occupying a large memory or disk space in the asset is not triggered, so that the resource serialization time, energy consumption and memory cost can be effectively reduced.
After completion of the serialization of the optimized asset set to generate the 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 dynamic link libraries, serialized assets, and the like into individual application files according to the specifications of the application platform (such as a mobile terminal). In the embodiments 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 the like, 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, which is not particularly limited by the embodiments of the present disclosure.
In order to make the steps of the application generation method according to the embodiment of the present disclosure clearer, the following is further described with reference to fig. 5. Fig. 5 shows another flowchart of an application generation method according to an example of an embodiment of the present disclosure. As shown in fig. 5, after determining the asset set for generating the application, for an asset in the asset set, determining whether to optimize the asset according to a predetermined rule; if it is determined that the asset is optimized, the asset may be deleted from its parent asset and its name and path may be 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 serializing process; then repeating the above operations for other assets in the asset set, namely traversing all the assets in the asset set until the serialization of the asset set is completed; finally, based on the serialized set of assets, an application is generated, such as generating an APK.
By using the application program generation method, the asset structure of the application program can be greatly simplified by removing the dependency relationship between the asset and the parent asset and storing the name and the path of the asset in the parent asset without splitting the asset of the application program, so that the production efficiency of the application program can be effectively improved, and the memory and disk space occupied by the application program can be reduced; in addition, in the subsequent running process of the application program, when the optimized asset needs to be loaded, redundant code logic is not needed, and the asset or the name and the path of the asset element are saved, so that the loading speed of the application program can be effectively improved, 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 shows a flow diagram of an application loading method 600 according to an embodiment of the disclosure. Since some 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 description of the same is omitted here for simplicity.
The application program may be obtained by the application program generation method described above, for example. When the application program is running, as shown in fig. 6, in step S610, a set of assets corresponding to an interface of the application program is loaded, and at least a portion of the interface is displayed based on the set of assets. The interface of the application may include a plurality of sub-interfaces, for example, the application interfaces corresponding to the UI assets shown in fig. 1 may include a menu 1 interface, a menu 2 interface, a menu 3 interface, and so on. During the initial loading process of the application program, only a part of the interface thereof may be displayed, for example, in fig. 1, only the menu 1 interface may be displayed, and the user may click other menu options as needed to display other menu interfaces.
In the disclosed embodiment, loading the asset set corresponding to the interface of the application may refer to obtaining a serialized asset set of the application from a storage space such as a disk file, and deserializing the serialized asset set to obtain the asset set corresponding to the interface of the application. Where deserialization is the process that is the reverse of serialization, i.e., the process of reading the persistent 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 structural diagram of a disk file according to an example of the embodiment of the present disclosure. As shown in fig. 7, a disk file may include a header and a plurality of attribute parts, where the header includes file description information such as the total length of the file, the file type, and the like; the attribute part contains the length information of the attribute and the corresponding attribute content. When deserializing the disk file as shown in fig. 7, first read the file header of the disk file to obtain the description information, and then read the content of each attribute part according to the description information until the end of the file stream is read, i.e. complete the deserializing process of the disk file, or complete the loading of the assets in the disk file.
In step S620, a trigger command for a sub-interface of the interface is received, and it is determined whether a sub-interface asset corresponding to the sub-interface exists in the asset set. Wherein the trigger command may be an operation command for the sub-interface, for example, in fig. 1, the user may trigger to display the menu 2 interface by clicking the menu 2 option; the trigger command may also be a message command received by the application over a network, such as a wired or network, associated with the sub-interface, e.g., the application may receive a conversation message from another application that triggers the display of a conversation window, etc.
In the case where the application is obtained by using the application generation method as described above, if the assets used for generating the application are subjected to the optimization processing step before being serialized, some assets may be deleted from their parent assets during the optimization processing, and only their names and paths are retained, and therefore they will not be serialized, and the serialized asset set of the application obtained from the disk file will not include the part of assets, and accordingly the asset set loaded in step S610 will not include the part of assets. Therefore, when a trigger command for a sub-interface is received in step S620, it is first determined whether a sub-interface asset corresponding to the sub-interface exists in the loaded asset set.
On one hand, if the sub-interface assets are not optimized in the generation process of the application program, the sub-interface assets exist in the loaded asset set, and the corresponding sub-interface can be directly displayed based on the sub-interface assets.
On the other hand, if a child interface asset is optimized during the generation of the application, the child interface asset may not be present in the loaded collection of assets. For example, as described above, the optimization process may be to delete a child interface asset from a parent asset that depends on the child interface asset when the child interface asset is a dependent asset, and save the name and path of the child interface asset in the parent asset, so that the child interface asset will not be serialized in the serialization process, and accordingly the child interface asset will not exist in the loaded asset set. In this case, a path of the child interface asset may be obtained from a parent asset of the loaded asset set 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.
To more clearly describe the 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 shows a flowchart of application execution according to an example of an embodiment of the present disclosure. As shown in fig. 8, the asset set 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 triggering command for a certain sub-interface is received, for example, an operation command for the sub-interface or a message command received through a network and related to the sub-interface, 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, acquiring a path of the child interface asset from a parent asset of the child interface asset in the loaded asset set based on the name of the child interface asset, loading the child interface asset from the acquired path, and displaying the child interface accordingly, so that the current running of the application program is finished.
By using the application program loading method according to the embodiment of the disclosure, the loading speed of the application program can be effectively increased and the user experience can be optimized under the condition that the application program is subjected to the optimization processing.
This is illustrated in connection with the example in fig. 9. FIG. 9 shows an example UI asset structure diagram in accordance with an embodiment of the present disclosure. As shown in fig. 9, there is a dependency relationship between the asset "BP _ mobilevidge _ NewBag _ Container" marked as (i) and the asset "BP _ Container" marked as (ii), and if the asset (ii) is not optimized, the asset (i) is loaded, the asset (ii) is also simultaneously triggered to be loaded, so that the loading of the asset (i) is slowed, especially when the asset (ii) occupies a large disk or memory space. If the assets (II) are optimized as described above, for example, the assets (II) are deleted from the assets (I) to remove the dependency relationship between the assets (II) and only the names and paths of the assets (II) are stored in the assets (I), the assets (I) are loaded without being triggered, so that the loading speed of the assets (I) can be effectively increased, and if the assets (II) need to be loaded, corresponding loading paths can be quickly obtained from the assets (I) to be loaded.
By the method, the loading speed of the application program can be obviously improved, and particularly the interface with more sub-interfaces of different levels is loaded. Taking the game interface in fig. 3 as an example, the backpack interface includes more sub-interfaces, and if the assets of the sub-interfaces are not optimized, all the assets of the sub-interfaces need to be loaded each time the backpack interface is opened, which may cause a large delay in opening the backpack interface. By using the application generation method and the application loading method of the embodiment of the disclosure, for example, optimization processing can be performed on sub-interface assets corresponding to weapon sub-interfaces, armor sub-interfaces, helmet sub-interfaces, and the like in the backpack interface, when a 'backpack' menu is clicked, the backpack interface can be quickly loaded and displayed, and for example, if a user wishes to further open the armor sub-interface, the corresponding sub-interface assets can also be quickly acquired according to the stored path, and the armor sub-interface can be loaded and displayed.
An application generation 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 generation apparatus 1000 according to an embodiment of the present disclosure. As shown in fig. 10, the application generation apparatus 1000 may include a determination unit 1010, an optimization unit 1020, a serialization unit 1030, and a generation unit 1040. The application generating apparatus 1000 may include other units in addition to the 4 units, but since they are not related to the contents of the embodiments of the present invention, the description of the units is omitted here. In addition, since the function of the application generating apparatus 1000 is similar to the details of the application generating method 400 described with reference to fig. 4, a repetitive description of the same contents is omitted here.
The determining unit 1010 is configured to determine a set of assets for generating an application. Here, the application program may be, for example, an android system Application Package (APK), but this is not particularly limited by the embodiment of the present disclosure, and the application program may also be any other application program such as an EXE (executable file). As previously mentioned, an application may be composed of many assets, which may include various elements such as pictures, text, audio-video files, etc., and which are collectively referred to herein as a collection of assets. There may be a dependency relationship (otherwise known as a referral relationship) between the assets in the application's collection of assets, e.g., asset A may depend on asset C and asset B may also depend on asset C. In embodiments of the present disclosure, assets that are relied upon by other assets in the collection of assets may be referred to as dependent assets, e.g., in the above example, asset C may be referred to as dependent assets. According to an example of an embodiment of the present disclosure, an application development engine may be utilized to build a set of assets for generating an application, which is not specifically limited by the embodiment of the present disclosure.
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 if it is determined to optimize the asset, optimize the asset to generate the 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, the asset indicates that the asset is depended on by one or more other assets, if the asset is not optimized, the asset structure is complex, the asset production efficiency is reduced, and the asset is repeatedly serialized in the serialization process, so that the application program is bulky and is slow to load during running. Therefore, optimization unit 1020 may perform optimization on the dependent assets. In this case, the optimization 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 that the asset is subject to an optimization process.
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 assets are judged to be dependent assets, and all dependent assets are optimized, the number of assets to be judged and optimized may be large, especially if there are many dependent assets, the optimization process may take a long time, and at this time, the advantages of the optimization process performed on some small dependent assets, such as the reduction of asset structure, the reduction of APK volume, and the reduction of time consumed by application program loading, may not be significant. Thus, the optimization unit 1020 may be configured to: in the event that an asset is a dependent asset and the size of the asset exceeds a predetermined threshold, it is determined that the asset is to be optimized. That is, if the asset is a dependent asset, but the asset is small and does not have a significant impact on the complexity of the asset structure, it may not be optimized, but only if the asset size exceeds a predetermined threshold, which would significantly increase the complexity of the asset structure. The predetermined threshold may be determined according to actual design requirements, and is not particularly limited by the embodiments of the present disclosure. In this way, the efficiency of asset optimization processing can be improved while effectively achieving the advantages of the embodiments of the present disclosure, such as asset structure reduction, APK volume reduction, and reduction in application program loading time.
In the embodiment of the present disclosure, the optimization unit 1020 may also determine whether to optimize the asset through other predetermined rules, which is not specifically limited by the embodiment of the present disclosure. In addition, when the application generation device according to the embodiment of the present disclosure is adopted, an optimization option may be set in a development engine of an application accordingly, so that a predetermined optimization rule, determination of whether to perform optimization processing on an asset, and the like may be set by the optimization option.
In an example of an embodiment of the present disclosure, when determining to optimize an asset, optimization unit 1020 may optimize the asset by deleting the asset from the parent asset that depends on it, and saving the name and path of the asset in the parent asset. According to another example of the embodiment of the present disclosure, for determining an asset to be optimized, the optimization unit 1020 may also reserve the asset node in its parent asset node, and perform optimization processing only on a specific element in the asset, for example, perform optimization processing on an element such as a picture, a font, and the like, which occupies more disk space and memory space in the asset. Then, in this example, optimization unit 1020 may be configured to: determining whether an element having a size exceeding a predetermined threshold is contained in the asset; and determining to optimize the asset upon determining that the asset contains an element having a size exceeding a predetermined threshold. Also, in this case, the optimization unit 1020 may perform optimization processing 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. The predetermined threshold may be determined according to actual design requirements, and is not particularly limited by the embodiments of the present disclosure.
Through the optimization processing, each asset in the asset set used for generating the application program is optimized to generate the optimized asset set, and the asset structure of the optimized asset set is effectively simplified, so that the asset production efficiency of the application program is improved.
The serialization unit 1030 is configured to serialize the set of optimized assets based on the optimization processing state of each asset in the set of optimized assets to generate a set of serialized assets.
In an example where an asset is optimized by deleting the asset from its dependent parent and saving the asset's name and path in the parent, for each asset in the set of optimized assets, serialization unit 1030 may skip serializing the asset if the asset is optimized and serialize the asset if the asset is not optimized. As previously mentioned, serializing an asset refers to writing a persistent attribute of the asset into a disk file, where the persistent attribute may include content information, coordinate information, alignment information, path information, memory information, and any other desired attributes of elements of the asset, and so forth. By the optimization processing mode, the dependency relationship between the optimized asset and the parent asset of the optimized asset is removed, so that the serialization process of the optimized asset cannot be triggered when the parent asset is serialized, and the resource serialization time, energy consumption and memory cost 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 a name and a path of the element in the asset, for each asset in the set of optimized assets, the serialization unit 1030 may skip serialization of the element of the asset and serialize other elements of the asset if the asset is optimized; and serializing the asset if the asset is not optimally processed. Similarly, when the optimized asset is serialized, serialization of elements occupying a large memory or disk space in the asset is not triggered, so that the resource serialization time, energy consumption and memory cost can be effectively reduced.
After completing the serialization of the optimized asset collection to generate the serialized asset collection, the generation unit 1040 may generate an application based on the serialized asset collection. For example, where the application is an APK, the process compresses dynamic link libraries, serialized assets, and the like into individual application files according to the specifications of the application platform (such as a mobile terminal). In the embodiments 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 the like, 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, which is not particularly limited by the embodiments of the present disclosure.
By utilizing the application program generating device, the asset structure can be greatly simplified by removing the dependency relationship between the asset and the parent asset and storing the name and the path of the asset in the parent asset 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 subsequent running process of the application program, when the optimized asset needs to be loaded, redundant code logic is not needed, and the asset or the name and the path of the asset element are saved, so that the loading speed of the application program can be effectively improved, 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 disclosure. As shown in fig. 11, the application 1100 may include a loading unit 1110, a determination unit 1120, and a display unit 1130. The application 1100 may include other units in addition to the 3 units, but since they are not related to the contents of the embodiments of the present invention, the description of the units is omitted here. In addition, since the functions of the application 1100 are similar to the details of the application loading method 600 described with reference to FIG. 6, a repeated description of the same contents is omitted here.
The application program may be obtained by the application program generation method described above, for example. When the application program is running, the loading unit 1110 is configured to load an asset set corresponding to an interface of the application program, and accordingly the display unit 1130 is configured to display at least a portion of the interface based on the asset set. The interface of the application may include a plurality of sub-interfaces, for example, the application interfaces corresponding to the UI assets shown in fig. 1 may include a menu 1 interface, a menu 2 interface, a menu 3 interface, and so on. During the initial loading process of the application program, only a part of the interface thereof may be displayed, for example, in fig. 1, only the menu 1 interface may be displayed, and the user may click other menu options as needed to display other menu interfaces.
In the disclosed embodiment, loading the asset set corresponding to the interface of the application may refer to obtaining a serialized asset set of the application from a storage space such as a disk file, and deserializing the serialized asset set to obtain the asset set corresponding to the interface of the application. Where deserialization is the process that is the reverse of serialization, i.e., the process of reading the persistent attributes of an asset from a disk file.
The determining unit 1120 is configured to receive a trigger command for a sub-interface of an interface and determine whether a sub-interface asset corresponding to the sub-interface exists in the asset set. Wherein the trigger command may be an operation command for the sub-interface, for example, in fig. 1, the user may trigger to display the menu 2 interface by clicking the menu 2 option; the trigger command may also be a message command received by the application over a network, such as a wired or network, associated with the sub-interface, e.g., the application may receive a conversation message from another application that triggers the display of a conversation window.
In the case where the application 1100 is obtained by using the application generation method as described above, if the assets used for generating the application are subjected to the optimization processing step before being serialized, some assets may be deleted from their parent assets during the optimization processing, but only names and paths are retained, and therefore, the assets are not serialized, and the application serialized asset set obtained from the disk file does not include the part of assets, and accordingly, the application serialized asset set obtained by the loading unit 1110 does not include the part of assets. Therefore, when the determining unit 1120 receives a trigger command for a sub-interface, it first determines whether a sub-interface asset corresponding to the sub-interface exists in the loaded asset set.
On one hand, if the sub-interface asset is not optimized in the generation process of the application, and the sub-interface asset exists in the loaded asset set, the display unit 1130 may directly display the corresponding sub-interface based on the sub-interface asset.
On the other hand, if a child interface asset is optimized during the generation of the application, the child interface asset may not be present in the loaded collection of assets. For example, as described above, the optimization process may be to delete a child interface asset from a parent asset that depends on the child interface asset when the child interface asset is a dependent asset, and save the name and path of the child interface asset in the parent asset, so that the child interface asset will not be serialized in the serialization process, and accordingly the child interface asset will not exist in the loaded asset set. 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 asset structure of the application program is reduced through the optimization processing in the generation process as described above, the memory space occupied by the obtained application program is effectively reduced, and the loading speed is high 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 by way of the architecture of an 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, the 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 communications port 1250 to connect to a network, input/output components 1260, a hard disk 1270, and the like. Storage devices in the computing device 1200, such as the ROM 1230 or hard disk 1270, may store various data or files used in computer processing and/or communications 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 needed in implementing different devices. The device according to the embodiments of the present disclosure may be configured to execute the application generating method and the application loading method according to the above-described various embodiments of the present disclosure, or to implement the application generating apparatus or the application according to the above-described various embodiments of the present disclosure.
Embodiments of the present disclosure may also be implemented as a computer-readable storage medium. A computer readable storage medium according to an embodiment of the present disclosure has computer readable instructions stored thereon. 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 when the computer readable instructions are executed by a processor. 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), cache memory (or the like). The non-volatile memory may include, for example, Read Only Memory (ROM), a hard disk, flash memory, and the like.
There is also provided, in accordance with an embodiment of the present disclosure, a computer program product or computer program, including computer readable instructions, the computer readable instructions being 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 the processor executes the computer readable instructions, so that the computer device executes the application generating method and the application loading method described in the above embodiments.
Those skilled in the art will appreciate that the disclosure of the present disclosure is susceptible to numerous variations and modifications. 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 used in this disclosure and in the claims, the terms "a," "an," "the," and/or "the" are not intended to be inclusive in the singular, but rather are inclusive in the plural, unless the context clearly dictates otherwise. The use of "first," "second," and similar terms in this disclosure is not intended to indicate any order, quantity, or importance, but rather is used to distinguish one element from another. Likewise, the word "comprising" or "comprises", and the like, means that the element or item listed before the word covers the element or item listed after the word and its equivalents, but does not exclude other elements or items. The terms "connected" or "coupled" and the like are not restricted to physical or mechanical connections, but may include electrical connections, whether direct or indirect.
Furthermore, flow charts are used in this disclosure to illustrate operations performed by systems according to embodiments of the present disclosure. It should be understood that the preceding or following operations are not necessarily performed in the exact order in which they are performed. Rather, various steps may be processed in reverse order or simultaneously. Meanwhile, other operations may be added to the processes, or one or more operations 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 can be implemented as modifications and variations without departing from the spirit and scope of the present disclosure defined by the claims. Accordingly, the description of the present specification is for the purpose of illustration and is not intended to be in any way limiting of the present disclosure.

Claims (15)

1. An application generation method, comprising:
determining a set of assets for generating an application;
for each asset in the asset set, determining whether to optimize the asset based on a predetermined rule, and if the asset is determined to be optimized, optimizing the asset to generate an optimized asset set;
serializing the optimized asset set based on the optimization 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.
2. The application generation method of claim 1, wherein the set of assets includes dependent assets that are depended upon by other assets in the set of assets, and determining whether to optimize the assets based on predetermined rules comprises:
determining whether the asset is a dependent asset; and is
And determining to optimize the assets under the condition that the assets are dependent assets.
3. The application generation method of claim 2, wherein determining whether to optimize the asset based on predetermined rules further comprises:
determining to optimize the asset if the asset is a dependent asset and the size of the asset exceeds a predetermined threshold.
4. The application generation method of claim 2 or 3, wherein optimizing the asset if it is determined to optimize the asset comprises:
the asset is deleted from the parent that depends on it and the name and path of the asset are saved in the parent.
5. The application generation method of claim 4, wherein serializing the set of optimized assets based on the optimization processing status of each asset in the set of optimized assets comprises, for each asset in the set of optimized assets:
skipping serialization of the asset where the asset is optimally processed; and is
Serializing the asset if the asset is not optimally processed.
6. The application generation method of claim 1, wherein determining whether to optimize the asset based on predetermined rules comprises:
determining whether an element having a size exceeding a predetermined threshold is included in the asset; and
determining to optimize the asset when determining that the asset contains an element with a size exceeding a predetermined threshold.
7. The application generation method of claim 6, wherein optimizing the asset if it is determined to optimize the asset comprises:
deleting said element whose size exceeds a predetermined threshold from said asset and saving the name and path of said element in said asset, and
wherein serializing the optimized asset set based on the optimization processing status of each asset in the optimized asset set comprises, for each asset in the optimized asset set:
skipping serialization of the element of the asset and serializing other elements of the asset if the asset is optimally processed; and is
Serializing the asset if the asset is not optimally processed.
8. The application generation method of claim 5 or 7, wherein serializing the assets comprises:
and writing the persistent attribute of the asset into a disk file, wherein the persistent attribute comprises at least one of content information, coordinate information, alignment information, path information and memory information of elements in the asset.
9. An application program loading method, comprising:
loading a set of assets corresponding to an interface of an application program and displaying at least a portion of the interface based on the set of assets;
receiving a triggering command for a sub-interface of the interface, and determining whether a sub-interface asset corresponding to the sub-interface exists in the asset collection; and
displaying the child interface if the child interface asset exists in the set of assets, and if the child interface asset does not exist in the set of assets, obtaining a path of the child interface asset from a parent asset that depends on the child interface asset based on a 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.
10. The application loading method of claim 9, wherein the sub-interface asset is not present in the collection of assets if the sub-interface asset is optimized during the generation of the application.
11. The application loading method of claim 10, wherein the optimization process comprises:
and when the child interface asset is a dependent asset, deleting the child interface asset from a parent asset dependent on the child interface asset, and storing the name and the path of the child interface asset in the parent asset.
12. The application loading method according to claim 9, wherein the trigger command is an operation command for the sub-interface or a message command related to the sub-interface received by the application through a network, and
wherein loading the asset set corresponding to the interface of the application comprises:
acquiring a serialized asset set of the application program from a disk file; and
deserializing the serialized asset set to obtain the asset set corresponding to an interface of the application.
13. An application generation apparatus, the apparatus comprising:
a determining unit configured to determine a set of assets for generating an application;
the optimization unit is configured to determine whether to optimize the assets based on a preset rule for each asset in the asset set, and if the assets are determined to be optimized, optimize the assets to generate an optimized asset set;
a serialization unit configured to serialize the optimized asset set based on an optimization processing state of each asset in the optimized asset set to generate a serialized asset set; and
a generating unit configured to generate the application based on the serialized asset collection.
14. An application generation apparatus comprising:
one or more processors; and
one or more memories having computer-readable instructions stored therein, which when executed by the one or more processors, cause the one or more processors to perform the method of any one of claims 1-8.
15. A computer readable storage medium having computer readable instructions stored thereon, which, when executed by a processor, cause the processor to perform the method of any one of claims 1-12.
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 true CN113434149A (en) 2021-09-24
CN113434149B 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 (18)

* 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
US20140237026A1 (en) * 2012-12-11 2014-08-21 Tencent Technology (Shenzhen) Company Limited Method and apparatus for loading resource files of an application
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
US20190342425A1 (en) * 2018-05-01 2019-11-07 Unity IPR ApS Method and system for autonomous content optimization in games and graphical interactive applications
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

Patent Citations (18)

* 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
US20140237026A1 (en) * 2012-12-11 2014-08-21 Tencent Technology (Shenzhen) Company Limited Method and apparatus for loading resource files of an application
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
US20190342425A1 (en) * 2018-05-01 2019-11-07 Unity IPR ApS Method and system for autonomous content optimization in games and graphical interactive applications
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
CN113434149B (en) 2023-09-08

Similar Documents

Publication Publication Date Title
WO2021218327A1 (en) Page processing method and related device
CN111045655B (en) Page rendering method and device, rendering server and storage medium
JP2019518257A (en) State control method and apparatus
WO2018058811A1 (en) Virtual reality scene loading method and device
CN112667860A (en) Sub-graph matching method, device, equipment and storage medium
JP7368623B2 (en) Point cloud processing method, computer system, program and computer readable storage medium
CN113885935A (en) Resource packaging method and device, electronic equipment and computer readable storage medium
CN111694733A (en) API (application programming interface) testing method and device for software development kit SDK (software development kit)
CN112052157B (en) Method, device and system for constructing test message
CN114117992A (en) Serialization and deserialization method and device and electronic equipment
CN113434149A (en) Application program generating and loading method, device and medium
CN114791984B (en) Navigation tree display method, navigation tree display device and electronic equipment
CN111228815B (en) Method, apparatus, storage medium and system for processing configuration table of game
CN117234582A (en) Project code processing method and device, electronic equipment and storage medium
CN115357696A (en) Dynamic chart billboard display method based on components and related equipment
CN112148287B (en) Dynamic table display method and device and electronic equipment
CN111124386B (en) Animation event processing method, device, equipment and storage medium based on Unity
CN113778412A (en) Data resource arranging method and device, computer equipment and readable storage medium
CN115687704A (en) Information display method and device, electronic equipment and computer readable storage medium
CN113778624B (en) Object processing method and device, intelligent terminal and storage medium
CN113342413B (en) Method, apparatus, device, medium, and article for processing components
CN116595284B (en) Webpage system operation method, device, equipment, storage medium and program
CN113779483B (en) Page component generation method and device, storage medium and computer equipment
CN116567350B (en) Panoramic video data processing method and system
CN118519781A (en) Resource allocation method, apparatus, device, storage medium and program product

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