Application installation package processing method and device, equipment and storage medium
By compressing the language resource files during the application installation package packaging process, the problem of excessive volume of the application installation package is solved and the installation conversion rate is improved.
Patent Information
- Application Number
- CN202310948494.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-28
- Publication Date
- 2025-02-14
AI Technical Summary
The package of the application installation package is too large, resulting in a decrease in the installation conversion rate, and it is necessary to reduce the volume of the application installation package.
During the application installation package packaging process, the language resource file is compressed, the language resource compression package is generated, and it is packaged into the application installation package.
By compressing language resource files, the volume of application installation packages is significantly reduced, thereby improving installation conversion rate.
Smart Images

Figure CN119440552A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present disclosure relate to the field of computer application technology, and in particular, to a method, apparatus, device, and storage medium for processing an application installation package. Background Art
[0002] The excessive size of application installation packages has always been a problem that needs to be solved in the industry. With the increasing number of business iterations, application installation packages will inevitably have a lot of uncontrollable volume increments. Larger application installation packages will lead to lower installation conversion rates, so reducing the size of application installation packages is particularly important. Summary of the invention
[0003] The embodiments of the present disclosure provide a method, apparatus, device and storage medium for processing an application installation package, which can greatly reduce the size of the application installation package by compressing language resource files during the packaging process of the application installation package.
[0004] In a first aspect, an embodiment of the present disclosure provides a method for processing an application installation package, including:
[0005] Get a language resource file of at least one language type;
[0006] In response to the installation package packaging request, compress at least part of the language resource files of the at least one language type to obtain a language resource compressed package;
[0007] The language resource compression package is packaged to obtain an application installation package.
[0008] In a second aspect, the embodiment of the present disclosure further provides a method for processing an application installation package, including:
[0009] In response to an application startup request, obtaining first resource version information of a language resource file in an application installation package and second resource version information in a local resource directory; wherein the application corresponds to the application installation package; the application installation package includes a language resource compression package of at least one language type; the language resource compression package is obtained by compressing the language resource file;
[0010] Verifying the second resource version information based on the first resource version information;
[0011] After the verification is completed, the target language resource file is obtained based on the triggered resource request; wherein the resource request carries the target language type.
[0012] In a third aspect, the present disclosure also provides a device for processing an application installation package, including:
[0013] A language resource file acquisition module, used to acquire a language resource file of at least one language type;
[0014] A language resource file compression module, configured to respond to an installation package packaging request, compress at least part of the language resource file of the at least one language type, and obtain a language resource compression package;
[0015] The application installation package packaging module is used to package the language resource compression package to obtain an application installation package.
[0016] In a fourth aspect, an embodiment of the present disclosure further provides a device for processing an application installation package, including:
[0017] A resource version information acquisition module, used to respond to an application startup request, and acquire first resource version information of a language resource file in an application installation package and second resource version information in a local resource directory; wherein the application corresponds to the application installation package; the application installation package includes a language resource compression package of at least one language type; the language resource compression package is obtained by compressing a language resource file;
[0018] A verification module, configured to verify the second resource version information based on the first resource version information;
[0019] The target language resource file acquisition module is used to acquire the target language resource file based on the triggered resource request after the verification is completed; wherein the resource request carries the target language type.
[0020] In a sixth aspect, an embodiment of the present disclosure further provides an electronic device, the electronic device comprising:
[0021] one or more processors;
[0022] a storage device for storing one or more programs,
[0023] When the one or more programs are executed by the one or more processors, the one or more processors implement the method for processing the application installation package as described in the embodiment of the present disclosure.
[0024] In a seventh aspect, an embodiment of the present disclosure further provides a storage medium comprising computer executable instructions, which, when executed by a computer processor, are used to execute the method for processing an application installation package as described in an embodiment of the present disclosure.
[0025] The disclosed embodiment discloses a method, device, equipment and storage medium for processing an application installation package, which obtains a language resource file of at least one language type; in response to an installation package packaging request, compresses at least part of the language resource file of at least one language type to obtain a language resource compressed package; and packages the language resource compressed package to obtain an application installation package. The method for processing an application installation package provided by the disclosed embodiment compresses the language resource file to reduce the size of the installation package, thereby improving the installation conversion rate of the application installation package. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.
[0027] Figure 1 It is a flowchart of a method for processing an application installation package provided by an embodiment of the present disclosure;
[0028] Figure 2 It is a flowchart of a method for processing an application installation package provided by an embodiment of the present disclosure;
[0029] Figure 3 This is a flowchart of a method for processing an application installation package provided by an embodiment of the present disclosure.
[0030] Figure 4 It is a structural schematic diagram of a device for processing an application installation package provided by an embodiment of the present disclosure;
[0031] Figure 5 It is a structural schematic diagram of a device for processing an application installation package provided by an embodiment of the present disclosure;
[0032] Figure 6 It is a structural schematic diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0033] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0034] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0035] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0036] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0037] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0038] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0039] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0040] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.
[0041] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0042] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0043] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.
[0044] The application installation package contains a part of language resource files, which are used to switch the language of the application (also called language type). The language resource files occupy a large amount of data in the application installation package, and the compression rate of this part of the content is very high. Therefore, the language resource files can be compressed when packaging to form the application installation package, and decompressed before starting the application, which can improve the installation conversion rate to a certain extent.
[0045] Figure 1 A flowchart of a method for processing an application installation package provided in an embodiment of the present disclosure is provided. The embodiment of the present disclosure is applicable to situations where application installation packages are processed. The method can be executed by a processing device for the application installation package, which can be implemented in the form of software and / or hardware, and optionally, by an electronic device, which can be a mobile terminal, a PC, a server, etc.
[0046] like Figure 1 As shown, the method includes:
[0047] S110: Acquire a language resource file of at least one language type.
[0048] Among them, the language type can be understood as a language type, that is, a language. The language resource file can be understood as a resource file that displays the content of the application interface in a certain language type, and can also be called a translation resource file. In this embodiment, when the application development technician develops or upgrades the application, it is necessary to develop or update the language resource file corresponding to the application, and submit the developed or updated language resource file to obtain at least one language resource file. For applications installed on different operating systems, the language resource file is embodied in a format corresponding to the operating system.
[0049] S120, in response to the installation package packaging request, compress at least part of the language resource files of at least one language type to obtain a language resource compression package.
[0050] Among them, at least part of the language resource files of at least one language type can be understood as part or all of the language resource files of at least one language type. The installation package packaging request can be triggered by the user, and the compression method of the language resource files can adopt any existing compression algorithm, which is not limited here, for example: ZIP compression. In this embodiment, when the installation package packaging request is detected, part or all of the acquired language resource files are compressed to obtain a language resource compressed package.
[0051] Optionally, at least a portion of a language resource file of at least one language type is compressed to obtain a language resource compression package by: acquiring a target language type; and compressing a language resource file of a non-target language type to obtain a language resource compression package corresponding to the non-target language type.
[0052] Among them, the target language type can be a language type set by the user, for example, it can be Chinese, English or French, etc., which is not limited here. In order to facilitate subsequent application programs to switch between various language types, language resource files corresponding to multiple language types will be developed. When compressing the language resource files, only the language resource files of non-target language types are compressed, and the language resource files corresponding to the target language type are not compressed. Exemplarily, it is assumed that the language resource files include: Chinese resource files and English resource files. If the target language type is English, the Chinese resource files are compressed and the English resource files are not compressed. In this embodiment, compressing the language resource files of non-target language types can prevent problems in the decompression process when starting the application, so that the language resource files corresponding to the target language type are used as a fallback solution to load the language resource files corresponding to the target language type to start the application, thereby preventing the failure of starting the application due to problems in the decompression process.
[0053] S130, packaging the language resource compression package to obtain an application installation package.
[0054] The process of packaging the language resource compression package can be understood as the process of adding the language resource compression package to the executable resource file, so that the application program can be successfully started by loading the generated application installation package.
[0055] Optionally, the process of packaging the language resource compression package to obtain the application installation package may be: placing the language resource compression package into an executable resource file to obtain the application installation package.
[0056] The executable resource file may be embodied in a set format. Specifically, after obtaining the language resource compression package, the language resource compression package is placed into an executable file in the set format to obtain an application installation package.
[0057] The technical solution of the embodiment of the present disclosure obtains a language resource file of at least one language type; in response to an installation package packaging request, compresses at least part of the language resource file of at least one language type to obtain a language resource compressed package; and packages the language resource compressed package to obtain an application installation package. The method for processing an application installation package provided by the embodiment of the present disclosure compresses the language resource file to reduce the size of the installation package, thereby improving the installation conversion rate of the application installation package.
[0058] Optional, Figure 2 The present disclosure provides a method for processing an application installation package. The method is applicable to the case of processing an application installation package and can be executed by a processing device for the application installation package. The device can be implemented in the form of software and / or hardware. Optionally, the device can be implemented by an electronic device, which can be a mobile terminal, a PC, or a server. Figure 2 As shown, the method comprises the following steps:
[0059] S210, responding to an application startup request, obtaining first resource version information of a language resource file in an application installation package and second resource version information of a language resource file in a local resource directory.
[0060] The application corresponds to an application installation package; the application installation package includes a language resource compression package of at least one language type; and the language resource compression package is obtained by compressing a language resource file.
[0061] The first resource version information can be understood as the version information corresponding to the language resource file in the application installation package. The second resource version information can be understood as the version information corresponding to the language resource file of the application program installed on the terminal device. The first resource version information and the second resource version information are both embodied in the form of setting fields.
[0062] Optionally, the method of obtaining the first resource version information of the language resource file in the application installation package may be: obtaining a first configuration file in the application installation package; and extracting the first resource version information of the language resource file from the first configuration file.
[0063] The first configuration file is stored in an executable file of the application installation package, and then the first resource version information corresponding to the resource version field of the language resource file is extracted from the first configuration file.
[0064] Optionally, the process of obtaining the second resource version information of the language resource file in the local resource directory may be: obtaining a second configuration file in the local resource directory; and extracting the second resource version information of the language resource file from the second configuration file.
[0065] The local resource directory is used to display the language resource files stored locally, and the second configuration file is used to store the version information corresponding to the local language resource files.
[0066] S220: Verify the second resource version information based on the first resource version information.
[0067] In this application scenario, after the application is developed, it will continue to be updated and upgraded, so the language resource files will have different versions. In order to start the application with the latest version, it is necessary to use the first resource version information in the application installation package to verify the second resource version information in the local resource directory. After the verification is completed, the latest target resource file will be loaded to start the application.
[0068] Optionally, the method for verifying the second resource version information based on the first resource version information can be: if the first resource version information and the second resource version information are the same, the second resource version information in the local resource directory is kept unchanged; if the first resource version information and the second resource version information are different, the second resource version information in the local resource directory is replaced with the first resource version information.
[0069] Among them, if the first resource version information and the second resource version information are the same, it indicates that the target resource file in the local area is the latest and does not need to be updated. If the first resource version information and the second resource version information are different, it indicates that the target resource file in the local area is not the latest and needs to be updated. Specifically, the process of replacing the second resource version information in the local resource directory with the first resource version information can be: clearing the second configuration file under the local resource directory, and then adding the first configuration file where the first resource version information is located to the local directory.
[0070] Optionally, if the second resource version information in the local resource directory is not obtained, the first resource version information is added to the local resource directory.
[0071] Among them, if the second resource version information in the local resource directory is not obtained, it means that the application corresponding to the application installation package is installed and started on the terminal device for the first time. At this time, the first resource version information is directly added to the local resource directory to facilitate the subsequent startup of the application.
[0072] S230: After the verification is completed, obtain the target language resource file based on the triggered resource request.
[0073] The resource request carries the target language type. The resource request is triggered by the user or automatically. In this application scenario, when starting the application, the user selects the language type, and the terminal generates a resource request based on the selection operation triggered by the user. Alternatively, when starting the application, if the user-triggered operation of selecting the target language type is not detected, a resource request corresponding to the default language type is automatically generated.
[0074] Optionally, the process of obtaining the target language resource file based on the triggered resource request can be: determining whether there is a decompressed target language resource file corresponding to the resource request in the local resource directory; if there is no decompressed target language resource file corresponding to the resource request in the local resource directory, decompressing the resource compression package corresponding to the resource request to obtain the target language resource file.
[0075] In this embodiment, after detecting the triggered resource request, it is first determined whether the local resource directory already has a decompressed target language resource file corresponding to the resource request. If so, the target language resource file is directly obtained. If not, the resource compression package corresponding to the resource request is decompressed to obtain the target language resource file. In this embodiment, it is first determined whether the local resource directory already has a decompressed target language resource file corresponding to the resource request, which can prevent repeated decompression of the language resource compression package, thereby saving resources.
[0076] Optionally, the language resource compression package corresponding to the resource request is decompressed to obtain the target language resource file by starting a child thread, and decompressing the language resource compression package corresponding to the resource request through the child thread to obtain the target language resource file.
[0077] The sub-thread is started based on a resource request triggered by a user, and is a sub-thread relative to the main thread. The main thread is used to obtain the target language resource file to start the application, and the sub-thread is used to decompress the language resource compressed package. In this embodiment, the speed of starting the application can be improved by decompressing the language resource compressed package corresponding to the resource request through the sub-thread.
[0078] In this embodiment, the target language resource file is a language resource file corresponding to the target language type. After the target language resource file is obtained, the application is started based on the target language resource file, so that the started application is displayed in the target language type.
[0079] Exemplarily, based on the above embodiments, Figure 3 is a flowchart of a method for processing an application installation package in an embodiment of the present disclosure, such as Figure 3 As shown, the method comprises the following steps:
[0080] S310, responding to an application startup request, obtaining first resource version information in the application installation package.
[0081] S320, determine whether the second resource version information exists in the local resource directory; if so, execute S330, otherwise, execute S340.
[0082] S330, determining whether the first resource version information and the second resource version information are the same, if not, executing S340, if the two are the same, executing S350.
[0083] S340: Clear the local resource directory, and add the first resource version information to the local resource directory.
[0084] S350: Acquire a resource request triggered by a user.
[0085] S360, determine whether there is a decompressed target language resource file corresponding to the resource request in the local resource directory, if so, execute 380, otherwise, execute S370.
[0086] S370, decompress the language resource compression package corresponding to the resource request to obtain the target language resource file.
[0087] S380, obtaining a target language resource file from a local resource directory.
[0088] The technical solution of the disclosed embodiment is to respond to an application startup request, obtain the first resource version information of the language resource file in the application installation package and the second resource version information in the local resource directory; wherein the application corresponds to the application installation package; the application installation package includes a language resource compression package of at least one language type; the language resource compression package is obtained by compressing the language resource file; the second resource version information is verified based on the first resource version information; after the verification is completed, the target language resource file is obtained based on the triggered resource request; wherein the resource request carries the target language type. In this embodiment, the second resource version information is verified based on the first resource version information to ensure that the application is started based on the latest version of the resource file.
[0089] Figure 4 A schematic diagram of a structure of a device for processing an application installation package provided by an embodiment of the present disclosure, such as Figure 4 As shown, the device comprises:
[0090] A language resource file acquisition module 410 is used to acquire a language resource file of at least one language type;
[0091] The language resource file compression module 420 is used to respond to the installation package packaging request, compress at least part of the language resource file of the at least one language type, and obtain a language resource compressed package;
[0092] The application installation package packaging module 430 is used to package the language resource compression package to obtain an application installation package.
[0093] Optionally, the language resource file compression module 420 is further used to:
[0094] Get the target language type;
[0095] The language resource file of the non-target language type is compressed to obtain a language resource compression package corresponding to the non-target language type.
[0096] Figure 5 A schematic diagram of a structure of a device for processing an application installation package provided by an embodiment of the present disclosure, such as Figure 5 As shown, the device comprises:
[0097] The resource version information acquisition module 510 is used to respond to the application startup request and acquire the first resource version information of the language resource file in the application installation package and the second resource version information in the local resource directory; wherein the application corresponds to the application installation package; the application installation package includes a language resource compressed package of at least one language type; the language resource compressed package is obtained by compressing the language resource file;
[0098] A verification module 520, configured to verify the second resource version information based on the first resource version information;
[0099] The target language resource file acquisition module 530 is used to acquire the target language resource file based on the triggered resource request after the verification is completed; wherein the resource request carries the target language type.
[0100] Optionally, the verification module 520 is further configured to:
[0101] If the first resource version information and the second resource version information are the same, keeping the second resource version information in the local resource directory unchanged;
[0102] If the first resource version information and the second resource version information are different, the second resource version information in the local resource directory is replaced with the first resource version information.
[0103] Optionally, the verification module 520 is further used to: if the second resource version information in the local resource directory is not obtained, then add the first resource version information to the local resource directory.
[0104] Optionally, the target language resource file acquisition module 530 is further used to:
[0105] Determine whether there is an unpacked target language resource file corresponding to the resource request in the local resource directory;
[0106] If the decompressed target language resource file corresponding to the resource request does not exist in the local resource directory, the language resource compressed package corresponding to the resource request is extracted from the application installation package, and the language resource compressed package is decompressed to obtain the target language resource file.
[0107] Optionally, the target language resource file acquisition module 530 is further used to:
[0108] A sub-thread is started, and the language resource compression package corresponding to the resource request is decompressed by the sub-thread to obtain a target resource file.
[0109] The device for processing an application installation package provided in the embodiments of the present disclosure can execute the method for processing an application installation package provided in any embodiment of the present disclosure, and has functional modules and beneficial effects corresponding to the execution method.
[0110] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present disclosure.
[0111] Figure 6 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. Figure 6 , which shows an electronic device (eg, Figure 6 The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 6 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0112] like Figure 6As shown, the electronic device 500 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 500 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An edit / output (I / O) interface 505 is also connected to the bus 504.
[0113] Typically, the following devices may be connected to the I / O interface 505: an input device 506 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 508 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 509. The communication device 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 6 The electronic device 500 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0114] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 509, or installed from a storage device 508, or installed from a ROM 502. When the computer program is executed by the processing device 501, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0115] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0116] The electronic device provided in the embodiment of the present disclosure and the method for processing the application installation package provided in the above embodiment belong to the same inventive concept. For technical details not fully described in this embodiment, reference can be made to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.
[0117] The embodiments of the present disclosure provide a computer storage medium on which a computer program is stored. When the program is executed by a processor, the method for processing an application installation package provided in the above embodiments is implemented.
[0118] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0119] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0120] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0121] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device:
[0122] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: obtains a language resource file of at least one language type; responds to an installation package packaging request, compresses at least part of the language resource file of the at least one language type, and obtains a language resource compressed package; and packages the language resource compressed package to obtain an application installation package.
[0123] Alternatively, in response to an application startup request, first resource version information of a language resource file in an application installation package and second resource version information in a local resource directory are obtained; wherein the application corresponds to the application installation package; the application installation package includes a language resource compression package of at least one language type; the language resource compression package is obtained by compressing a language resource file; the second resource version information is verified based on the first resource version information; after the verification is completed, the target language resource file is obtained based on a triggered resource request; wherein the resource request carries the target language type.
[0124] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0125] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0126] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a unit does not limit the unit itself in some cases. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses".
[0127] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0128] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A 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, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0129] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0130] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0131] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.
Claims
1. A method for processing an application installation package, characterized in that: include: Get a language resource file of at least one language type; In response to the installation package packaging request, compress at least part of the language resource files of the at least one language type to obtain a language resource compressed package; The language resource compression package is packaged to obtain an application installation package.
2. The method according to claim 1, characterized in that Compressing at least part of the language resource file of the at least one language type to obtain a language resource compression package includes: Get the target language type; The language resource file of the non-target language type is compressed to obtain a language resource compression package corresponding to the non-target language type.
3. A method for processing an application installation package, characterized in that: include: In response to an application startup request, obtaining first resource version information of a language resource file in an application installation package and second resource version information in a local resource directory; wherein the application corresponds to the application installation package; the application installation package includes a language resource compression package of at least one language type; the language resource compression package is obtained by compressing the language resource file; Verifying the second resource version information based on the first resource version information; After the verification is completed, the target language resource file is obtained based on the triggered resource request; wherein the resource request carries the target language type.
4. The method according to claim 3, characterized in that Verifying the second resource version information based on the first resource version information includes: If the first resource version information and the second resource version information are the same, keeping the second resource version information in the local resource directory unchanged; If the first resource version information and the second resource version information are different, the second resource version information in the local resource directory is replaced with the first resource version information.
5. The method according to claim 3, characterized in that: If the second resource version information in the local resource directory is not obtained, the first resource version information is added to the local resource directory.
6. The method according to claim 3, characterized in that Obtain the target language resource file based on the triggered resource request, including: Determine whether there is an unpacked target language resource file corresponding to the resource request in the local resource directory; If the decompressed target language resource file corresponding to the resource request does not exist in the local resource directory, the language resource compressed package corresponding to the resource request is extracted from the application installation package, and the language resource compressed package is decompressed to obtain the target language resource file.
7. The method according to claim 6, characterized in that Decompressing the language resource compressed package corresponding to the resource request to obtain the target language resource file includes: A sub-thread is started, and the language resource compression package corresponding to the resource request is decompressed by the sub-thread to obtain a target resource file.
8. A device for processing an application installation package, characterized in that: include: A language resource file acquisition module, used to acquire a language resource file of at least one language type; A language resource file compression module, configured to respond to an installation package packaging request, compress at least part of the language resource file of the at least one language type, and obtain a language resource compression package; The application installation package packaging module is used to package the language resource compression package to obtain an application installation package.
9. A device for processing an application installation package, characterized in that: include: A resource version information acquisition module, used to respond to an application startup request, and acquire first resource version information of a language resource file in an application installation package and second resource version information in a local resource directory; wherein the application corresponds to the application installation package; the application installation package includes a language resource compression package of at least one language type; the language resource compression package is obtained by compressing a language resource file; A verification module, configured to verify the second resource version information based on the first resource version information; The target language resource file acquisition module is used to acquire the target language resource file based on the triggered resource request after the verification is completed; wherein the resource request carries the target language type.
10. An electronic device, characterized in that: The electronic device comprises: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method for processing the application installation package as described in any one of claims 1-7.
11. A storage medium comprising computer executable instructions, wherein the computer executable instructions are used to execute the method for processing an application installation package as claimed in any one of claims 1 to 7 when executed by a computer processor.