CN113961229A - Method for generating application program installation package and method for running application program - Google Patents
Method for generating application program installation package and method for running application program Download PDFInfo
- Publication number
- CN113961229A CN113961229A CN202111223895.1A CN202111223895A CN113961229A CN 113961229 A CN113961229 A CN 113961229A CN 202111223895 A CN202111223895 A CN 202111223895A CN 113961229 A CN113961229 A CN 113961229A
- Authority
- CN
- China
- Prior art keywords
- picture
- address
- remote
- resource
- picture resource
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 78
- 238000009434 installation Methods 0.000 claims description 57
- 238000004590 computer program Methods 0.000 claims description 13
- 238000010586 diagram Methods 0.000 description 14
- 238000004891 communication Methods 0.000 description 9
- 238000012545 processing Methods 0.000 description 8
- 238000011161 development Methods 0.000 description 6
- 230000008569 process Effects 0.000 description 6
- 230000006870 function Effects 0.000 description 5
- 230000004048 modification Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 238000004364 calculation method Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 238000004806 packaging method and process Methods 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000001953 sensory effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The disclosure provides a method for generating an application program installation package, a method, a device, equipment, a storage medium and a program product for running an application program, and relates to the technical field of computers, in particular to the technical field of clients. The specific implementation scheme is as follows: determining at least one picture control in original program data; uploading at least one picture resource corresponding to at least one picture control to a remote storage device, and obtaining a picture remote address of each picture resource in the at least one picture resource, wherein the picture remote address is used for indicating the storage position of the picture resource in the remote storage device; recording the picture remote address in the original program data, and deleting the picture resource in the original program data to obtain target program data; and generating an application program installation package according to the target program data.
Description
Technical Field
The present disclosure relates to the field of computer technology, and more particularly, to the field of client technology.
Background
The file size of an application installation package (installation package for short) affects the download amount and the user amount of the installation package to a certain extent. The larger the file size of the installation package is, the larger the network traffic consumed by downloading the installation package is, and the longer the required downloading time is. Thus, an oversized installation package can shed potential users who are traffic tight or unwilling to wait.
Disclosure of Invention
The disclosure provides a method for generating an application installation package, a method for running an application, a device, equipment, a storage medium and a program product.
According to an aspect of the present disclosure, there is provided a method of generating an application installation package, including: determining at least one picture control in original program data; uploading at least one picture resource corresponding to the at least one picture control to a remote storage device, and obtaining a picture remote address of each picture resource in the at least one picture resource, wherein the picture remote address is used for indicating the storage position of the picture resource in the remote storage device; recording the picture remote address in the original program data, and deleting the picture resource in the original program data to obtain target program data; and generating an application program installation package according to the target program data.
According to another aspect of the present disclosure, there is provided a method of running an application, including: acquiring a picture remote address of at least one picture resource; and downloading the at least one picture resource according to the picture remote address of the at least one picture resource, and storing the at least one picture resource in a local storage device, wherein the application program is obtained through an application program installation file, and the application program installation file is generated by the method for generating the application program installation package according to the embodiment of the disclosure.
According to another aspect of the present disclosure, there is provided an apparatus for generating an application installation package, including: the determining module is used for determining at least one picture control in the original program data; the uploading module is used for uploading at least one picture resource corresponding to the at least one picture control to a remote storage device and obtaining a picture remote address of each picture resource in the at least one picture resource, wherein the picture remote address is used for indicating the storage position of the picture resource in the remote storage device; the recording module is used for recording the picture remote address in the original program data and deleting the picture resource in the original program data to obtain target program data; and the generating module is used for generating the application program installation package according to the target program data.
According to another aspect of the present disclosure, there is provided an apparatus for running an application, including: the acquisition module is used for acquiring a picture remote address of at least one picture resource; and a downloading module, configured to download the at least one picture resource according to a picture remote address of the at least one picture resource, and store the at least one picture resource in a local storage device, where the application is obtained by installing an application installation file, and the application installation file is generated by the method according to any one of claims 1 to 4.
Another aspect of the present disclosure provides an electronic device including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of the embodiments of the present disclosure.
According to another aspect of the disclosed embodiments, there is provided a non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method shown in the disclosed embodiments.
According to another aspect of the embodiments of the present disclosure, there is provided a computer program product comprising computer programs/instructions, characterized in that the computer programs/instructions, when executed by a processor, implement the steps of the method shown in the embodiments of the present disclosure.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
fig. 1 is an application scenario diagram of a method for generating an application installation package and a method and an apparatus for running an application according to an embodiment of the present disclosure;
FIG. 2 schematically illustrates a flow diagram of a method of generating an application installation package, in accordance with an embodiment of the present disclosure;
FIG. 3 schematically shows a flow chart of a method of running an application according to an embodiment of the present disclosure;
FIG. 4 schematically illustrates a flow chart of a method of generating an application installation package according to another embodiment of the present disclosure;
FIG. 5 schematically illustrates a flow chart of a method of obtaining a picture remote address of a picture resource according to another embodiment of the present disclosure;
FIG. 6 schematically illustrates a flow chart of a method of generating an application installation package according to another embodiment of the present disclosure;
FIG. 7 schematically shows a flow chart of a method of running an application according to another embodiment of the present disclosure;
FIG. 8A schematically illustrates a diagram of generating an application installation package, according to an embodiment of the disclosure;
FIG. 8B schematically shows a running application diagram according to an embodiment of the disclosure;
FIG. 9 schematically illustrates a block diagram of an apparatus for generating an application installation package, in accordance with an embodiment of the present disclosure;
FIG. 10 schematically illustrates a block diagram of an apparatus running an application in accordance with an embodiment of the present disclosure; and
FIG. 11 schematically shows a block diagram of an example electronic device that may be used to implement embodiments of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
An application scenario of the method and apparatus provided by the present disclosure will be described below with reference to fig. 1.
Fig. 1 is an application scenario diagram of a method for generating an application installation package, a method for running an application, and an apparatus according to an embodiment of the present disclosure. It should be noted that fig. 1 is only an example of a system architecture to which the embodiments of the present disclosure may be applied to help those skilled in the art understand the technical content of the present disclosure, and does not mean that the embodiments of the present disclosure may not be applied to other devices, systems, environments or scenarios.
As shown in fig. 1, the application scenario 100 includes a development end 110, a client 120, and a remote storage 130.
The development end 110 and the client 120 may be various electronic devices having display screens and supporting network communication, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like. The development end 110 and the client 120 may interact with the remote storage 130 to send or receive data, respectively.
The remote storage 130 may be, for example, a server for providing storage services. The Server may be a cloud Server, which is also called a cloud computing Server or a cloud host, and is a host product in a cloud computing service system, so as to solve the defects of high management difficulty and weak service extensibility in a traditional physical host and a VPS service (Virtual Private Server, or VPS for short). The server may also be a server of a distributed system, or a server incorporating a blockchain.
According to an embodiment of the present disclosure, a program developer may develop an application through the development terminal 110, generating program data 101. Application installation package 102 can then be generated from program data 101. A user may run application installation package 102 through client 120 to install application 103.
According to the embodiment of the present disclosure, since the application program uses a picture resource such as an icon or a picture. Thus, one or more picture resources 104 may be included in program data 101. When the application installation package 103 is generated according to the program data, the picture resource 104 is stored in the application installation package 103 and occupies a part of the package volume, so that the file size of the application installation package 103 is large.
Based on this, in the present embodiment, a picture control using a local picture resource in the program data 103 can be determined. Uploading the picture resources 104 corresponding to the picture controls to the remote storage device 130, and obtaining a picture remote address of each picture resource 104 in the picture resources 104, wherein the picture remote address can be used for indicating a storage location of the picture resource 104 in the remote storage device 130. The picture remote address is then recorded in the program data 103 and the picture resource 104 in the program data 103 is deleted. An application installation package 102 is generated from the program data 103 from which the picture resource 104 has been deleted. Since the picture resource 104 is deleted from the application installation package 102, the file size of the application installation package 102 is reduced.
When the application 103 installed based on the application installation package 102 runs, a picture remote address of the recorded picture resource 104 can be acquired. According to the picture remote addresses, the corresponding picture resources 104 are downloaded, and the picture resources 104 are stored in the local storage device, so that the picture control in the application program 103 can normally use the picture resources 104.
In the technical scheme of the present disclosure, the collection, storage, use, processing, transmission, provision, disclosure and other processing of the related program data, remote address and other information all meet the regulations of related laws and regulations, and do not violate the good custom of the public order.
FIG. 2 schematically shows a flow diagram of a method of generating an application installation package according to an embodiment of the present disclosure.
As shown in fig. 2, the method 200 of generating an application installation package includes determining at least one picture control in original program data in operation S210.
According to an embodiment of the present disclosure, the raw program data may include, for example, a code file of an application program and a corresponding resource, and the like.
According to embodiments of the present disclosure, a picture control may include, for example, a control that uses native picture resources. The local picture resource comprises a picture resource with a storage position located in the local storage device. For example, in this embodiment, it may be determined whether each control in the original program data uses a local picture resource, and then determine a control using the local picture resource as a picture control.
Then, in operation S220, at least one picture resource corresponding to the at least one picture control is uploaded to a remote storage device, and a picture remote address of each picture resource in the at least one picture resource is obtained.
According to embodiments of the present disclosure, the picture remote address may be used to indicate a storage location of the picture asset in the remote storage device.
In operation S230, a picture remote address is recorded in original program data, and a picture resource in the original program data is deleted, resulting in target program data.
In operation S240, an application installation package is generated according to the target program data.
According to the embodiment of the disclosure, in the process of generating the application program installation package, the picture resources used by the picture control are uploaded to the storage server, the picture resources in the program data are deleted, and then the application program installation package is generated according to the program data, so that the application program installation package does not contain the picture resources any more, and the volume of the application program installation package is reduced.
Fig. 3 schematically shows a flow chart of a method of running an application according to an embodiment of the present disclosure. The application program may be obtained through an application program installation file, which may be generated by the method for generating the application program installation package described above, for example.
As shown in fig. 3, the method 300 of running an application includes acquiring a picture remote address of at least one picture resource in operation S310.
Then, in operation S320, at least one picture resource is downloaded according to the picture remote address of the at least one picture resource, and the at least one picture resource is stored in the local storage device.
According to the embodiment of the disclosure, the picture remote address of the picture resource can be acquired when the application program runs, and the picture resource is downloaded and stored in the local memory according to the picture remote address, so that the picture control in the application program can normally use the corresponding picture resource.
According to an embodiment of the present disclosure, in order to record a picture remote address in original program data in the process of generating an application installation package, an address table file may be set in the program data, in which the picture remote address is recorded. According to other embodiments of the present disclosure, in order to further reduce the file size of the application installation package, the address table file may also be uploaded to a remote storage device, and only the file remote address of the address table file is reserved.
Based on this, fig. 4 schematically shows a flowchart of a method of generating an application installation package according to another embodiment of the present disclosure.
As shown in fig. 4, the method 400 of generating an application installation package includes determining at least one picture control in original program data in operation S410.
Then, in operation S420, at least one picture resource corresponding to the at least one picture control is uploaded to a remote storage device, and a picture remote address of each picture resource in the at least one picture resource is obtained.
In operation S430, an address table file is generated according to the picture remote address of the at least one picture resource.
In operation S440, the address table file is uploaded to the remote storage device, and a file remote address of the address table file is obtained.
Wherein the file remote address may be used to indicate a storage location of the address table file in the remote storage device.
In operation S450, a file remote address of the address table file is recorded in the original program data.
In operation S460, the picture resource in the original program data is deleted, and the target program data is obtained.
In operation S470, an application installation package is generated according to the target program data.
According to an embodiment of the present disclosure, the picture resource and the address table file may be stored in the same remote storage device, or may be stored in different remote storage devices, which is not specifically limited by the present disclosure.
Correspondingly, when the application program is run, the address table file can be obtained from the remote storage device, and then the picture remote address of the picture resource can be obtained according to the address table file.
Based on this, fig. 5 schematically shows a flowchart of a method of obtaining a picture remote address of a picture resource according to another embodiment of the present disclosure.
As shown in fig. 5, the method 510 of acquiring a picture remote address of a picture resource may include acquiring a file remote address of an address table file in operation S511.
According to the embodiment of the disclosure, whether the address table file is downloaded or not can be detected by utilizing a background thread of the application program when the application program runs. And under the condition that the address table file is not downloaded, acquiring the file remote address of the address table file.
Then, the address table file is downloaded according to the file remote address in operation S512.
According to an embodiment of the present disclosure, since the address table file includes the picture remote address of the at least one picture resource. Therefore, the remote address of each picture resource can be obtained by downloading the address table file from the remote storage device through the file remote address recorded by the application program.
FIG. 6 schematically shows a flow chart of a method of generating an application installation package according to another embodiment of the present disclosure.
As shown in fig. 6, the method 600 of generating an application installation package includes determining at least one picture control in program data in operation S610.
Then, in operation S620, at least one picture resource corresponding to the at least one picture control is uploaded to a remote storage device, and a picture remote address of each picture resource in the at least one picture resource is obtained.
In operation S630, a picture remote address is recorded in the program data, and a picture resource in the program data is deleted.
In operation S640, a remote address attribute is added for each of the at least one picture control.
According to the embodiment of the disclosure, the remote address attribute can be added on the basis of the original picture control, and is used for recording the remote address of the picture resource corresponding to the picture control.
In operation S650, the remote address attribute of the picture control is configured according to the picture remote address of the picture resource corresponding to the picture control.
According to the embodiment of the disclosure, the value of the remote address attribute of the picture control can be set as the picture remote address of the picture resource corresponding to the picture control.
In operation S660, an application installation package is generated according to the program data.
According to the embodiment of the present disclosure, for example, reference may be made to the above in operations S610 to S630, and S660, which are not described herein again.
Correspondingly, fig. 7 schematically shows a flowchart of a method of running an application according to another embodiment of the present disclosure.
As shown in fig. 7, the method 700 of running an application includes acquiring a file remote address of an address table file in operation S710.
Then, the address table file is downloaded according to the file remote address in operation S720.
In operation S730, a local address of each of the at least one picture resource is obtained, where the local address is used to indicate a storage location of the picture resource in the local storage device.
In operation S740, a correspondence between the picture remote address and the local address of the at least one picture resource is recorded in the address table file.
According to an embodiment of the present disclosure, the address table file may include, for example, at least one entry, each entry corresponding to one picture resource. Each entry may include a picture remote address and a local address of the picture resource. It should be noted that, besides the picture remote address and the picture local address, each item may also include other information such as an identifier of a picture resource, and this disclosure does not specifically limit this.
In operation S750, in a case that a target picture control of the at least one picture control is executed, a target picture remote address configured in the remote address attribute of the target picture control is obtained.
In operation S760, a target local address corresponding to the target picture remote address in the address table file is determined.
According to the embodiment of the disclosure, for example, an entry where the remote address of the target picture is located may be searched in the address table file, and the target local address in the entry may be obtained.
In operation S770, it is determined whether a target picture resource corresponding to the target picture control exists in the local location indicated by the target local address.
In operation S780, in the case that the target picture resource does not exist in the local location, the target picture resource is downloaded according to the target picture remote address.
According to an embodiment of the present disclosure, for example, the target picture resource may be looked up in the local location indicated by the target local address. In the event that a target picture resource exists in the home location, the target picture resource may be provided for use by the picture control. And under the condition that the target picture resource does not exist in the local position, downloading the target picture resource according to the target picture remote address, and then providing the downloaded target picture resource for the picture control to use.
According to other embodiments of the present disclosure, a picture resource may fail to be downloaded, and a picture resource in a local storage may be lost. Based on the above, the picture resource can be downloaded again according to the picture remote address of the picture resource in the address table file when any one of the at least one picture resource fails to be downloaded and/or any one of the picture resources in the local storage device is lost. And then storing the re-downloaded picture resource to a local storage device to obtain a local address of the picture resource, and recording a corresponding relation between the picture remote address and the local address of the picture resource in an address table file.
According to an embodiment of the present disclosure, a remote address attribute may also be added for each of the at least one picture control. And then configuring the remote address attribute of the picture control according to the picture remote address of the picture resource corresponding to the picture control.
The method for generating the application installation package and the method for running the application shown above are further described with reference to fig. 8A to 8B. Those skilled in the art will appreciate that the following example embodiments are only for the understanding of the present disclosure, and the present disclosure is not limited thereto.
During the development of the application program, a large number of pictures are used, and the pictures are different in size. Most pictures exist in a picture resource folder in the form of resources, and each picture is assigned an id for uniquely identifying the picture. The display of the picture needs to depend on the picture control ImageView, the picture control has a 'src' attribute, the picture id can be assigned to the 'src' attribute, and when the program runs, if the current control is detected to be the picture control, the corresponding picture resource file can be loaded to display according to the picture id in the 'src' attribute. The picture control can also display the picture file in the file system of the mobile phone, namely, the picture is analyzed and displayed through the picture file path.
FIG. 8A schematically illustrates a schematic diagram of generating an application installation package, according to an embodiment of the disclosure.
Fig. 8A shows that, for example, in this embodiment, the application may be an application running in an Android operating system, and the remote storage device may be a picture server 810, for example. According to an embodiment of the present disclosure, all picture controls in program data 801 may be traversed to detect whether they use local picture resources. If the picture control uses a local picture resource, a tag is added to the picture resource 802 with which the picture control uses. Then uploading all marked picture resources 802 to the picture server 810, and acquiring picture remote addresses of the picture resources 802. The picture remote addresses of all picture resources are recorded in the address table file 803, and the address table file 803 is uploaded to the picture server 810, assuming that the storage address of the address table file 803 in the picture server 810 is remoteUrl, that is, the file remote address.
According to an embodiment of the present disclosure, a custom picture control may be set for each native picture control. The user-defined picture control is developed on the basis of the original picture control, inherits the original picture control, has all functions of the original picture control, and can expand new functions. Compared with the native picture control, the custom picture control is added with an attribute: remoteSrc for representing a picture remote address of the picture resource. When a program runs, if the remotessrc attribute of the picture control is detected to have a value, whether the picture is downloaded or not is detected according to the picture remote address, if the picture is downloaded, the downloaded local picture is directly loaded, if the picture is not downloaded, the picture is downloaded according to the picture remote address in the remotessrc attribute value, the picture is displayed through the picture control after the downloading is completed, the picture is stored locally, and the picture does not need to be downloaded again when being displayed next time.
Based on this, in this embodiment, all the marked picture controls may be replaced with corresponding custom controls, and remoteSrc of the custom control is assigned as the picture remote address of the picture resource 802 corresponding to the original picture control. All marked picture resources 802 in the program data 801 may then be deleted and the file remote address remoteUrl of the address table file 803 saved in the program data 801. The program data 801 is then packaged into a package for installation.
Next, an installation package can be run to install the application.
Fig. 8B schematically shows a running application schematic according to an embodiment of the disclosure.
Fig. 8B shows that after the application 804 is installed, when the application 804 is started, whether the address table file 803 has been downloaded is detected in the background thread according to the file remote address remoteUrl of the address table file 803. If not, the address table file 803 is downloaded to the local.
According to the picture remote addresses in the address table file 803, whether the corresponding picture resources 802 have been downloaded is inquired one by one. If the picture resource 802 is not downloaded, downloading is performed according to the picture remote address, the downloaded picture resource 802 is stored in a local storage device, and the corresponding relation between the local address of the downloaded picture resource 802 and the picture remote address is recorded.
If a user-defined picture control is detected in the running process of the application 804, firstly, a picture remote address corresponding to the picture resource 802 is obtained according to the remoteSrc attribute of the user-defined picture control, a corresponding local address is inquired according to the picture remote address, and the inquired picture resource 802 is displayed.
If the downloading of the picture resource 802 fails or the downloaded picture resource 802 is lost, the picture resource 802 is directly downloaded again according to the corresponding picture remote address, the downloaded picture resource 802 is stored locally, and the corresponding relation between the remote address and the downloaded local picture file is recorded for subsequent use, so that the picture resource 802 does not need to be downloaded again in subsequent use.
According to the embodiment of the disclosure, the operations of traversing the picture control, uploading and deleting local picture resources, downloading remote pictures and the like are all automatically processed, manual intervention is not needed, and manpower can be saved. Second, the process is completely transparent to the developer and does not require any changes to the development process. In addition, the installation package formed by packaging the application program does not contain processed local picture resources, so that the volume of the installation package is reduced, meanwhile, the use experience is almost the same as that of the installation package generated by the original packaging mode, and the method is very suitable for scenes sensitive to the volume of the installation package.
Fig. 9 schematically shows a block diagram of an apparatus for generating an application installation package according to an embodiment of the present disclosure.
As shown in fig. 9, the apparatus 900 for generating an application installation package includes a determination module 910, an upload module 920, a recording module 930, and a generation module 940.
A determining module 910 configured to determine at least one picture control in the original program data.
And an uploading module 920, configured to upload at least one picture resource corresponding to at least one picture control to a remote storage device, and obtain a picture remote address of each picture resource in the at least one picture resource, where the picture remote address is used to indicate a storage location of the picture resource in the remote storage device.
The recording module 930 is configured to record the picture remote address in the original program data, and delete the picture resource in the original program data to obtain the target program data.
A generating module 940, configured to generate an application installation package according to the target program data.
Fig. 10 schematically shows a block diagram of an apparatus running an application according to an embodiment of the present disclosure.
As shown in fig. 10, the apparatus 1000 for running an application includes an obtaining module 1010 and a downloading module 1020.
An obtaining module 1010, configured to obtain a picture remote address of at least one picture resource.
The downloading module 1020 is configured to download the at least one picture resource according to the picture remote address of the at least one picture resource, and store the at least one picture resource in the local storage device.
The application program is obtained by installing an application program installation file, and the application program installation file is generated by the method for generating the application program installation package according to the embodiment of the disclosure.
The present disclosure also provides an electronic device, a readable storage medium, and a computer program product according to embodiments of the present disclosure.
FIG. 11 schematically shows a block diagram of an example electronic device 1100 that may be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 11, the device 1100 comprises a computing unit 1101, which may perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM)1102 or a computer program loaded from a storage unit 1108 into a Random Access Memory (RAM) 1103. In the RAM 1103, various programs and data necessary for the operation of the device 1100 may also be stored. The calculation unit 1101, the ROM 1102, and the RAM 1103 are connected to each other by a bus 1104. An input/output (I/O) interface 1105 is also connected to bus 1104.
A number of components in device 1100 connect to I/O interface 1105, including: an input unit 1106 such as a keyboard, a mouse, and the like; an output unit 1107 such as various types of displays, speakers, and the like; a storage unit 1108 such as a magnetic disk, optical disk, or the like; and a communication unit 1109 such as a network card, a modem, a wireless communication transceiver, and the like. The communication unit 1109 allows the device 1100 to exchange information/data with other devices through a computer network such as the internet and/or various telecommunication networks.
The computing unit 1101 can be a variety of general purpose and/or special purpose processing components having processing and computing capabilities. Some examples of the computing unit 1101 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and the like. The calculation unit 1101 performs the respective methods and processes described above, such as a method of generating an application installation package and a method of running an application. For example, in some embodiments, the methods of generating an application installation package and the methods of running an application may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as storage unit 1108. In some embodiments, part or all of the computer program may be loaded and/or installed onto device 1100 via ROM 1102 and/or communication unit 1109. When the computer program is loaded into the RAM 1103 and executed by the computing unit 1101, one or more steps of the method of generating an application installation package and the method of running an application described above may be performed. Alternatively, in other embodiments, the computing unit 1101 may be configured by any other suitable means (e.g., by means of firmware) to perform the method of generating the application installation package and the method of running the application.
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure may be executed in parallel, sequentially, or in different orders, as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved, and the present disclosure is not limited herein.
The above detailed description should not be construed as limiting the scope of the disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present disclosure should be included in the scope of protection of the present disclosure.
Claims (15)
1. A method of generating an application installation package, comprising:
determining at least one picture control in original program data;
uploading at least one picture resource corresponding to the at least one picture control to a remote storage device, and obtaining a picture remote address of each picture resource in the at least one picture resource, wherein the picture remote address is used for indicating the storage position of the picture resource in the remote storage device;
recording the picture remote address in the original program data, and deleting the picture resource in the original program data to obtain target program data; and
and generating an application program installation package according to the target program data.
2. The method of claim 1, wherein the determining at least one picture control in original program data comprises:
determining whether each control in the original program data uses a local picture resource, wherein the local picture resource comprises a picture resource with a storage location in a local storage device; and
determining a control using the local picture resource as the picture control.
3. The method of claim 1, wherein said recording the picture remote address in the original program data comprises:
generating an address table file according to the picture remote address of the at least one picture resource;
uploading the address table file to the remote storage device to obtain a file remote address of the address table file, wherein the file remote address is used for indicating a storage position of the address table file in the remote storage device; and
and recording the file remote address of the address table file in the original program data.
4. The method of claim 1, further comprising:
adding a remote address attribute to each picture control of the at least one picture control; and
and configuring the remote address attribute of the picture control according to the picture remote address of the picture resource corresponding to the picture control.
5. A method of running an application, comprising:
acquiring a picture remote address of at least one picture resource; and
downloading the at least one picture resource according to the picture remote address of the at least one picture resource, and storing the at least one picture resource to a local storage device,
wherein the application is obtained by an application installation file generated by the method of any one of claims 1-4.
6. The method of claim 5, wherein the obtaining a picture remote address for at least one picture resource comprises:
acquiring a file remote address of an address table file; and
and downloading the address table file according to the file remote address, wherein the address table file comprises the picture remote address of the at least one picture resource.
7. The method of claim 6, wherein the obtaining a file remote address of an address table file comprises:
detecting whether the address table file is downloaded or not by utilizing a background thread of the application program; and
and under the condition that the address table file is not downloaded, acquiring a file remote address of the address table file.
8. The method of claim 6, further comprising:
acquiring a local address of each picture resource in the at least one picture resource, wherein the local address is used for indicating a storage position of the picture resource in the local storage device; and
and recording the corresponding relation between the picture remote address and the local address of the at least one picture resource in the address table file.
9. The method of claim 8, further comprising:
under the condition that a target picture control in the at least one picture control is operated, acquiring a target picture remote address configured in a remote address attribute of the target picture control;
determining a target local address corresponding to the target picture remote address in the address table file;
determining whether a target picture resource corresponding to the target picture control exists in a local position indicated by the target local address; and
and downloading the target picture resource according to the target picture remote address under the condition that the target picture resource does not exist in the local position.
10. The method of claim 8, further comprising:
under the condition that any one picture resource in the at least one picture resource fails to be downloaded and/or any one picture resource in a local storage device is lost, the picture resource is downloaded again according to the picture remote address of the picture resource in the address table file;
storing the re-downloaded picture resource to a local storage device to obtain a local address of the picture resource; and
and recording the corresponding relation between the picture remote address and the local address of the picture resource in the address table file.
11. An apparatus for generating an application installation package, comprising:
the determining module is used for determining at least one picture control in the original program data;
the uploading module is used for uploading at least one picture resource corresponding to the at least one picture control to a remote storage device and obtaining a picture remote address of each picture resource in the at least one picture resource, wherein the picture remote address is used for indicating the storage position of the picture resource in the remote storage device;
the recording module is used for recording the picture remote address in the original program data and deleting the picture resource in the original program data to obtain target program data; and
and the generating module is used for generating the application program installation package according to the target program data.
12. An apparatus for running an application, comprising:
the acquisition module is used for acquiring a picture remote address of at least one picture resource; and
a download module for downloading the at least one picture resource according to the picture remote address of the at least one picture resource and storing the at least one picture resource to a local storage device,
wherein the application is obtained by installing an application installation file generated by the method of any one of claims 1-4.
13. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-10.
14. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-10.
15. A computer program product comprising computer program/instructions, characterized in that the computer program/instructions, when executed by a processor, implement the steps of the method according to any of claims 1-10.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111223895.1A CN113961229A (en) | 2021-10-20 | 2021-10-20 | Method for generating application program installation package and method for running application program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111223895.1A CN113961229A (en) | 2021-10-20 | 2021-10-20 | Method for generating application program installation package and method for running application program |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113961229A true CN113961229A (en) | 2022-01-21 |
Family
ID=79465126
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111223895.1A Pending CN113961229A (en) | 2021-10-20 | 2021-10-20 | Method for generating application program installation package and method for running application program |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113961229A (en) |
-
2021
- 2021-10-20 CN CN202111223895.1A patent/CN113961229A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN114389969B (en) | Method and device for testing client, electronic equipment and storage medium | |
CN114090602A (en) | Configuration file updating method and device, server and storage medium | |
CN112269706A (en) | Interface parameter checking method and device, electronic equipment and computer readable medium | |
CN114398023A (en) | File generation method and page configuration method and device | |
CN113127430B (en) | Mirror image information processing method, mirror image information processing device, computer readable medium and electronic equipment | |
CN111985760A (en) | Data content evaluation method and device, electronic equipment and storage medium | |
CN116545905A (en) | Service health detection method and device, electronic equipment and storage medium | |
CN114138397B (en) | Page display method and device, electronic equipment and storage medium | |
CN116301992A (en) | Upgrading method, device, equipment and storage medium | |
CN113986135B (en) | Method, device, equipment and storage medium for processing request | |
CN113961229A (en) | Method for generating application program installation package and method for running application program | |
CN114218166A (en) | Data processing method and device, electronic equipment and readable storage medium | |
CN114327577A (en) | Code change determining method and device, electronic equipment and storage medium | |
CN113110846A (en) | Method and device for acquiring environment variable | |
CN111562958A (en) | Page data display management method and device | |
CN109656961B (en) | Method and device for searching homonymous tasks based on data analysis, medium and electronic equipment | |
CN112947846B (en) | Batch processing task execution method and device of object storage system and electronic equipment | |
CN115840604B (en) | Data processing method, device, electronic equipment and computer readable storage medium | |
CN117156398B (en) | Message processing method, device, electronic equipment and storage medium | |
CN113220282B (en) | Development processing method, device and storage medium for applet | |
CN114281436A (en) | Applet communication method, apparatus, device and storage medium | |
CN114416194A (en) | Picture loading method and device based on ImageView aggregation function component | |
CN115686911A (en) | Server-side self-checking method and device, electronic equipment and storage medium | |
CN118363626A (en) | Android application program upgrading method and device, electronic equipment and storage medium | |
CN115480922A (en) | Resource information processing method, device, electronic equipment and 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 |