Application program publishing method and system, medium and terminal

By obfuscating the source code and update resource files of published applications, and generating obfuscated installation packages for release, the problems of inefficient and poor stability of application publishing in the existing technology are solved, and more efficient and stable Application release.

CN119415113APending Publication Date: 2025-02-11CHENGDU MEGAYOU TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411281875.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-13
Publication Date
2025-02-11

AI Technical Summary

Technical Problem

When existing applications of the same type are released, it takes a long time to rewrite the code, resulting in inefficient release, and new code may have program vulnerabilities, affecting the stability of the application.

Method used

By obtaining the original source code of the published application and the updated resource file of the application to be published, the name path obfuscation and bytecode file obfuscation are performed based on the preset mapping file, and the obfuscated installation package is generated for release.

Benefits of technology

Reduces the risk of the application to be published being associated, saves time and testing steps for rewriting code, and improves the application's release efficiency and stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119415113A_ABST
    Figure CN119415113A_ABST
Patent Text Reader

Abstract

The invention discloses an application program publishing method and system, a medium and a terminal, relates to the technical field of Internet, and mainly aims to solve the problems that when existing application programs of the same type are published, the application program publishing efficiency is low and the application program publishing efficiency is poor due to long code rewriting time consumption. And the problem of poor stability of the application program caused by a new program bug existing in the new code is solved. Comprising the steps of obtaining an original source code of a published application program and an update resource file of a to-be-published application program; performing name path confusion processing on the updated resource file based on a preset mapping file to obtain a confused updated resource file; based on the mapping file, obfuscating the bytecode file of the original source code to obtain an obfuscated bytecode file; and mixing and packaging the obfuscated update resource file and the obfuscated byte code file to generate an installation package of the to-be-published application program, and publishing the installation package after the installation package is operated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of Internet technology, and in particular to a method and system, medium, and terminal for publishing an application. Background Art

[0002] In today's era of widespread Internet access, when an Internet company develops a popular application, in order to gain more users and thus ensure the survival of the application in the market, while also sharing the risk of the application being banned or removed from the shelves, the Internet company usually releases multiple similar applications.

[0003] Currently, when releasing an application of the same type again, developers are usually required to rewrite the code to prevent it from being associated.

[0004] However, rewriting the code takes a long time, resulting in inefficient application release; and the new code may contain new program vulnerabilities, resulting in poor application stability. Summary of the invention

[0005] In view of this, the present application provides a method and system, medium, and terminal for publishing an application. The main purpose is to solve the problem that when existing applications of the same type are released, the application publishing efficiency is low due to the long time spent on rewriting the code, and the new program vulnerabilities in the new code lead to poor application stability.

[0006] According to one aspect of the present application, a method for publishing an application is provided, comprising:

[0007] Obtaining the original source code of the published application and the updated resource file of the application to be published, wherein the updated resource file is obtained by compiling the original resource file of the published application;

[0008] Based on a preset mapping file, performing name path obfuscation processing on the update resource file to obtain an obfuscated update resource file, wherein the mapping file is used to store a mapping relationship between an original name path of an expected obfuscated resource file and a preset name path, wherein the expected obfuscated resource file is screened out from an original resource file of the published application;

[0009] Based on the mapping file, the bytecode file of the original source code is obfuscated to obtain an obfuscated bytecode file, wherein the mapping file is also used to store obfuscation rules for the bytecode file;

[0010] The obfuscated update resource file and the obfuscated bytecode file are mixed and packaged to generate an installation package of the application to be released, and the installation package is released after it is run.

[0011] Preferably, before performing name path obfuscation processing on the update resource file based on a preset mapping file to obtain an obfuscated update resource file, and performing obfuscation processing on the bytecode file of the original source code based on the mapping file to obtain the obfuscated bytecode file, the method further comprises:

[0012] Obtaining the original resource files of the published application;

[0013] Determine an expected obfuscated resource file from the original resource file, and configure a preset name path for the expected obfuscated resource file;

[0014] The expected obfuscated resource file, the original name path of the expected obfuscated resource file, and the preset name path are stored in a preset mapping file in a mapping manner;

[0015] as well as,

[0016] Obtaining a bytecode file of the original source code of the published application, and configuring an estimated class parameter for the bytecode file;

[0017] The bytecode file, the original class parameters of the bytecode file, and the expected class parameters are stored in the mapping file in a mapping manner.

[0018] Preferably, the performing name path obfuscation processing on the update resource file based on a preset mapping file to obtain an obfuscated update resource file includes:

[0019] According to the expected obfuscated resource file in the mapping file, searching the update resource file for the corresponding target obfuscated resource file;

[0020] The name path of the target obfuscated resource file is replaced with the preset name path to obtain an obfuscated updated resource file.

[0021] Preferably, the obfuscating the bytecode file of the original source code based on the mapping file to obtain the obfuscated bytecode file includes:

[0022] The original class parameters of the bytecode file of the original source code are replaced with the expected class parameters to obtain an obfuscated bytecode file.

[0023] Preferably, before performing name path obfuscation processing on the update resource file based on a preset mapping file to obtain the obfuscated update resource file, the method further comprises:

[0024] Acquire an update resource file in a preset file format from the update resource file;

[0025] The update resource file in the preset file format is encrypted based on a preset key to obtain an encrypted update resource file in the preset file format, so as to perform name and path obfuscation processing on the encrypted update resource file in the preset file format.

[0026] Preferably, before performing name path obfuscation processing on the update resource file based on a preset mapping file to obtain the obfuscated update resource file, the method further comprises:

[0027] Before the end tag of the element that allows space processing, a random number of space symbols are injected to modify the column information of the update resource file;

[0028] And / or, before the end tags of all elements, a random number of line break symbols are injected to modify the line information of the update resource file.

[0029] Preferably, when the published application is an application that has access to other software development kits, before performing name path obfuscation processing on the update resource file based on a preset mapping file to obtain the obfuscated update resource file, the method further includes:

[0030] Locate the location of token verification logic in the files of the other software development kits of the update resource files;

[0031] The return value of the verification logic is modified to success, so that the return value of the verification logic remains successful, and the modified files of other software development kits are stored in the installation package of the application to be released.

[0032] According to another aspect of the present application, a system for publishing an application is provided, comprising:

[0033] A file acquisition module is used to acquire the original source code of the published application and the updated resource files of the application to be published;

[0034] A resource file obfuscation module, used to perform name path obfuscation processing on the update resource file based on a preset mapping file to obtain an obfuscated update resource file, wherein the mapping file is used to store a mapping relationship between the original resource file name path of the published application and the preset resource file name path;

[0035] A bytecode file obfuscation module, used to perform obfuscation processing on the bytecode file of the original source code based on the mapping file to obtain an obfuscated bytecode file, wherein the mapping file is also used to store bytecode file obfuscation rules;

[0036] The installation package generation module is used to mix and package the obfuscated update resource files and the obfuscated bytecode files to generate an installation package of the application to be released, and release it after the installation package is run.

[0037] Preferably, before the resource file obfuscation module and the bytecode file obfuscation module, the system further includes a mapping file construction module for:

[0038] Obtaining the original resource files of the published application;

[0039] Determine an expected obfuscated resource file from the original resource file, and configure a preset name path for the expected obfuscated resource file;

[0040] The expected obfuscated resource file, the original name path of the expected obfuscated resource file, and the preset name path are stored in a preset mapping file in a mapping manner;

[0041] as well as,

[0042] Obtaining a bytecode file of the original source code of the published application, and configuring an estimated class parameter for the bytecode file;

[0043] The bytecode file, the original class parameters of the bytecode file, and the expected class parameters are stored in the mapping file in a mapping manner.

[0044] Preferably, the resource file obfuscation module is used to:

[0045] According to the expected obfuscated resource file in the mapping file, searching the update resource file for the corresponding target obfuscated resource file;

[0046] The name path of the target obfuscated resource file is replaced with the preset name path to obtain an obfuscated updated resource file.

[0047] Preferably, the bytecode file obfuscation module is used to:

[0048] The original class parameters of the bytecode file of the original source code are replaced with the expected class parameters to obtain an obfuscated bytecode file.

[0049] Preferably, before the resource file obfuscation module, the system further includes an update resource file encryption module for:

[0050] Acquire an update resource file in a preset file format from the update resource file;

[0051] The update resource file in the preset file format is encrypted based on a preset key to obtain an encrypted update resource file in the preset file format, so as to perform name and path obfuscation processing on the encrypted update resource file in the preset file format.

[0052] Preferably, before the resource file obfuscation module, the system further includes a row and column information obfuscation module, which is used to:

[0053] Before the end tag of the element that allows space processing, a random number of space symbols are injected to modify the column information of the update resource file;

[0054] And / or, before the end tags of all elements, a random number of line break symbols are injected to modify the line information of the update resource file.

[0055] Preferably, when the published application is an application that has access to other software development kits, before the resource file obfuscation module, the system further includes a verification logic return value modification module, which is used to:

[0056] Locate the location of token verification logic in the files of the other software development kits of the update resource files;

[0057] The return value of the verification logic is modified to success, so that the return value of the verification logic remains successful, and the modified files of other software development kits are stored in the installation package of the application to be released.

[0058] According to another aspect of the present application, a storage medium is provided, wherein at least one executable instruction is stored in the storage medium, and the executable instruction enables a processor to execute operations corresponding to the above-mentioned method for publishing an application.

[0059] According to another aspect of the present application, a terminal is provided, comprising: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other through the communication bus;

[0060] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute operations corresponding to the above-mentioned application publishing method.

[0061] By means of the above technical solution, the technical solution provided by the embodiment of the present application has at least the following advantages:

[0062] The present application provides a method and system for publishing an application, a medium, and a terminal. First, the original source code of the published application and the updated resource file of the to-be-published application are obtained; secondly, based on a preset mapping file, the name path obfuscation processing is performed on the updated resource file to obtain an obfuscated updated resource file, and the mapping file is used to store the mapping relationship between the name path of the original resource file of the published application and the name path of the preset resource file; again, based on the mapping file, the bytecode file of the original source code is obfuscated to obtain an obfuscated bytecode file, and the mapping file is also used to store bytecode file obfuscation rules; finally, the obfuscated updated resource file and the obfuscated bytecode file are mixed and packaged to generate an installation package of the to-be-published application, and the installation package is published after the installation package is run. Compared with the prior art, the embodiment of the present application reduces the risk of the application to be released being associated by respectively obfuscating the bytecode files of the source code of the published application and the update resource files of the application to be released, and then combining them to generate an installation package of the application to be released; and since there is no need to rewrite the source code, the time consumed in rewriting the code and the steps of source code testing are saved, so that the application can be released after the installation package is run, thereby improving the release efficiency of the application, while avoiding new program vulnerabilities that may exist in the new code and improving the stability of the application.

[0063] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present application. Also, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0065] Figure 1 A flow chart of a method for publishing an application provided by an embodiment of the present application is shown;

[0066] Figure 2 A block diagram of a publishing system for an application provided in an embodiment of the present application is shown;

[0067] Figure 3 A schematic diagram of the structure of a terminal provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0068] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary 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 limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0069] At the same time, it should be understood that for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship.

[0070] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the present application, its application, or uses.

[0071] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered as part of the specification.

[0072] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.

[0073] The embodiments of the present application can be applied to computer systems / servers, which can operate with many other general or special computing system environments or configurations. Examples of well-known computing systems, environments and / or configurations suitable for use with computer systems / servers include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, handheld or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, network personal computers, small computer systems, large computer systems, and distributed cloud computing technology environments including any of the above systems, etc.

[0074] Computer systems / servers may be described in the general context of computer system executable instructions (such as program modules) executed by a computer system. In general, program modules may include routines, programs, object programs, components, logic, data structures, etc., which perform specific tasks or implement specific abstract data types. Computer systems / servers may be implemented in a distributed cloud computing environment where tasks are performed by remote processing devices linked through a communication network. In a distributed cloud computing environment, program modules may be located on local or remote computing system storage media including storage devices.

[0075] The present application embodiment provides a method for publishing an application program, such as Figure 1 As shown, the method includes:

[0076] 101. Obtain the original source code of the published application and the updated resource files of the application to be published.

[0077] Among them, the updated resource file is obtained by compiling the original resource file of the published application; the application to be published is the same type of application as the published application. In a specific application scenario, when an Internet company develops a popular application, in order to obtain more users, thereby ensuring the survival market of the application and sharing the risk of the application being banned and removed from the shelves, the Internet company usually releases multiple similar applications, namely, the application to be published. In the embodiment of the present application, the current execution end can be an application publishing system.

[0078] 102. Based on the preset mapping file, perform name and path obfuscation processing on the update resource file to obtain an obfuscated update resource file.

[0079] Wherein, the mapping file is used to store the mapping relationship between the original name path of the expected obfuscated resource file and the preset name path; the expected obfuscated resource file is screened from the original resource file of the published application. Exemplary, mapping relationship 1: expected obfuscated resource file 1, original name path A, preset name path D; mapping relationship 2: expected obfuscated resource file 2, original name path B, preset name path E; mapping relationship 3: expected obfuscated resource file 3, original name path C, preset name path F. Further, based on the mapping file, the name path obfuscation processing is performed on the updated resource file. Specifically, it is expected that the obfuscated resource file 1 is compiled to obtain the updated resource file a, and the name path of the updated resource file a is replaced with D to obtain the obfuscated updated resource file a; it is expected that the obfuscated resource file 2 is compiled to obtain the updated resource file b, and the name path of the updated resource file b is replaced with E to obtain the obfuscated updated resource file b; it is expected that the obfuscated resource file 3 is compiled to obtain the updated resource file c, and the name path of the updated resource file c is replaced with F to obtain the obfuscated updated resource file c.

[0080] It should be noted that the mapping file may be in the form of a mapping file.

[0081] 103. Based on the mapping file, the bytecode file of the original source code is obfuscated to obtain an obfuscated bytecode file.

[0082] The mapping file is also used to store the bytecode file obfuscation rules, which can be obfuscation for class parameters and other parameters. For example, bytecode file 1, class name a, method name b, field name c, bytecode file 1 after obfuscation, class name A, method name B, field name C.

[0083] It should be noted that the bytecode file is obtained by compiling the original source code, which can be in the form of a class file or a dex file.

[0084] 104. Mix and package the obfuscated update resource files and the obfuscated bytecode files to generate an installation package of the application to be released, and release the application after the installation package is run.

[0085] In the embodiment of the present application, the obfuscated update resource file is obtained by compiling and obfuscating the resource file of the published application, and the obfuscated bytecode file is obtained by compiling and obfuscating the source code of the published application. Since the original source code and the original resource file of the published application have not been changed and have been tested and published, the obfuscated update resource file and the obfuscated bytecode file are mixed and packaged, and the generated installation package of the application to be published does not need to be tested again and can be published after running.

[0086] Compared with the prior art, the embodiment of the present application reduces the risk of the application to be released being associated by respectively obfuscating the bytecode files of the source code of the published application and the update resource files of the application to be released, and then combining them to generate an installation package of the application to be released; and since there is no need to rewrite the source code, the time consumed in rewriting the code and the steps of source code testing are saved, so that the application can be released after the installation package is run, thereby improving the release efficiency of the application, while avoiding new program vulnerabilities that may exist in the new code and improving the stability of the application.

[0087] In an embodiment of the present application, for further limitation and explanation, in step 102 of the embodiment, based on a preset mapping file, name path obfuscation processing is performed on the update resource file to obtain the obfuscated update resource file, and in step 103 of the embodiment, based on the mapping file, obfuscation processing is performed on the bytecode file of the original source code to obtain the obfuscated bytecode file. Before, the embodiment method also includes: obtaining the original resource file of the published application; determining the expected obfuscated resource file from the original resource file, and configuring a preset name path for the expected obfuscated resource file; storing the expected obfuscated resource file, the original name path of the expected obfuscated resource file, and the preset name path in a mapping manner in a preset mapping file; and obtaining the bytecode file of the original source code of the published application, and configuring the expected class parameters for the bytecode file; storing the bytecode file, the original class parameters of the bytecode file, and the expected class parameters in the mapping file in a mapping manner.

[0088] Specifically, before starting obfuscation, first scan the original resource files of the published application to determine the expected obfuscated resource files, including but not limited to the resource files under the assets directory, the four major component files, the custom view control files, the xml files, etc.; further, configure a new name path for each of the above-mentioned expected obfuscated resource files, that is, the expected name path; finally, store each expected obfuscated resource file, its original name path, and the configured preset name path in a mapping manner in a preset mapping file. For example, mapping relationship 1: expected obfuscated resource file 1, original name path A, preset name path D; mapping relationship 2: expected obfuscated resource file 2, original name path B, preset name path E; mapping relationship 3: expected obfuscated resource file 3, original name path C, preset name path F.

[0089] Similarly, the bytecode files of the original source code of the published application are scanned, and new class parameters are configured for each bytecode file, including but not limited to class name, method name, field name, etc., i.e., expected class parameters; finally, each bytecode file, its original class parameters, and the configured preset class parameters are stored in a preset mapping file in a mapping manner as bytecode file obfuscation rules. For example, bytecode file obfuscation rule 1: bytecode file 1, original class name a, original method name b, original field name c, expected class name A, expected method name B, expected field name C.

[0090] In an embodiment of the present application, for further limitation and explanation, step 102 of the embodiment performs name path obfuscation processing on the update resource file based on a preset mapping file to obtain an obfuscated update resource file, including: searching for the corresponding target obfuscated resource file in the update resource file according to the expected obfuscated resource file in the mapping file; replacing the name path of the target obfuscated resource file with the preset name path to obtain the obfuscated update resource file.

[0091] Exemplarily, in the mapping file, mapping relationship 1: expected obfuscated resource file 1, original name path A, preset name path D; mapping relationship 2: expected obfuscated resource file 2, original name path B, preset name path E; mapping relationship 3: expected obfuscated resource file 3, original name path C, preset name path F. Since the expected obfuscated resource file 1 is selected from the original resource file, it is compiled to obtain the updated resource file a. Further, according to the expected obfuscated resource file 1, the corresponding target obfuscated resource file is found in the updated resource file as the updated resource file a, and the name path of the updated resource file a is replaced with D to obtain the obfuscated updated resource file a.

[0092] In one embodiment of the present application, for further limitation and explanation, step 103 of the embodiment performs obfuscation processing on the bytecode file of the original source code based on the mapping file to obtain an obfuscated bytecode file, including: replacing the original class parameters of the bytecode file of the original source code with the expected class parameters to obtain the obfuscated bytecode file.

[0093] Exemplarily, in the mapping file, bytecode file obfuscation rule 1: bytecode file 1, original class name a, original method name b, original field name c, expected class name A, expected method name B, expected field name. Further, according to the above bytecode file obfuscation rule, the class parameters of the bytecode file are changed to obtain the obfuscated bytecode file.

[0094] It should be noted that obfuscating the class parameters of the bytecode file directly acts on the Java bytecode level, which can further reduce the degree of association between the application to be released and the released application, thereby reducing the risk of being associated.

[0095] In an embodiment of the present application, for further limitation and explanation, step 102 of the embodiment performs name path obfuscation processing on the update resource file based on a preset mapping file, and before obtaining the obfuscated update resource file, the embodiment method also includes: obtaining an update resource file in a preset file format from the update resource file; encrypting the update resource file in a preset file format based on a preset key to obtain an encrypted update resource file in a preset file format, and performing name path obfuscation processing on the encrypted update resource file in a preset file format.

[0096] Preferably, before name and path obfuscation processing is performed on the update resource file, the update resource file can be encrypted to further reduce the degree of association between the application to be released and the released application. Specifically, multiple keys can be pre-configured, and then multiple update resource files in a preset file format, such as files in XML format, can be obtained from the update resource file, and each update resource file in XML format can be further encrypted based on the key to obtain an encrypted update resource file in XML format, so that the name and path obfuscation processing can be performed on the encrypted update resource file in the preset file format later.

[0097] In an embodiment of the present application, for further limitation and explanation, step 102 of the embodiment performs name path obfuscation processing on the update resource file based on a preset mapping file, and before obtaining the obfuscated update resource file, the embodiment method also includes: injecting a random number of space symbols before the end tag of an element that allows space processing to modify the column information of the update resource file; and / or, injecting a random number of line feed symbols before the end tags of all elements to modify the row information of the update resource file.

[0098] Among them, the element end tag can be ">". In the embodiment of the present application, a random number of space symbols can be injected before the element end tag that allows space processing (excluding self-closing tags?>, / >), so that the column information in the flat file (one of the intermediate products of Android resource compilation, which records the original location and content of the resources) is modified, and then the resource file decompiled by the flat file is different from the original file in column number, thereby reducing the degree of association. And / or, a random number of line feed symbols are injected before all element end tags (including self-closing tags?>, / >), so that the line information in the flat file is modified, and then the resource file decompiled by the flat file is different from the original file in line number, thereby reducing the degree of association.

[0099] In an embodiment of the present application, for further limitation and explanation, when the published application is an application that has access to other software development kits, step 102 of the embodiment performs name path obfuscation processing on the update resource file based on a preset mapping file, and before obtaining the obfuscated update resource file, the embodiment method also includes: locating the position of the token verification logic in the file of the other software development kit of the update resource file; modifying the return value of the verification logic to success so that the return value of the verification logic remains successful, and storing the modified file of the other software development kit in the installation package of the application to be published.

[0100] Among them, other software development kits may be SDK (Software Development Kit) software development kits; token verification logic is used to characterize the token verification method. In the embodiment of the present application, the location of the token verification logic can be located by scanning the Jar package of the SDK, and the return value of the token verification logic can be modified to success, so that it directly returns success when executing the verification logic, and finally the modified Jar package is stored in the installation package of the application to be released.

[0101] Further optionally, the source code of the SDK jar package can be dynamically scanned during compilation to locate the location where the above verification logic is used, and the reference of the so file can be modified to point to the modified Jar package to achieve reuse of the SDK.

[0102] The present application provides a method for publishing an application. First, the original source code of the published application and the updated resource file of the to-be-published application are obtained; secondly, based on a preset mapping file, the name path obfuscation processing is performed on the updated resource file to obtain an obfuscated updated resource file, and the mapping file is used to store the mapping relationship between the name path of the original resource file of the published application and the name path of the preset resource file; again, based on the mapping file, the bytecode file of the original source code is obfuscated to obtain an obfuscated bytecode file, and the mapping file is also used to store bytecode file obfuscation rules; finally, the obfuscated updated resource file and the obfuscated bytecode file are mixed and packaged to generate an installation package of the to-be-published application, and the installation package is published after the installation package is run. Compared with the prior art, the embodiment of the present application reduces the risk of the application to be released being associated by respectively obfuscating the bytecode files of the source code of the published application and the update resource files of the application to be released, and then combining them to generate an installation package of the application to be released; and since there is no need to rewrite the source code, the time consumed in rewriting the code and the steps of source code testing are saved, so that the application can be released after the installation package is run, thereby improving the release efficiency of the application, while avoiding new program vulnerabilities that may exist in the new code and improving the stability of the application.

[0103] Furthermore, as a response to the above Figure 1 The implementation of the method shown in the embodiment of the present application provides a publishing system for an application program, such as Figure 2 As shown, the system includes:

[0104] A file acquisition module 21, a resource file obfuscation module 22, a bytecode file obfuscation module 23, and an installation package generation module 24;

[0105] A file acquisition module 21 is used to acquire the original source code of the published application and the updated resource file of the application to be published;

[0106] A resource file obfuscation module 22, configured to perform name path obfuscation processing on the update resource file based on a preset mapping file to obtain an obfuscated update resource file, wherein the mapping file is configured to store a mapping relationship between the original resource file name path of the published application and the preset resource file name path;

[0107] A bytecode file obfuscation module 23 is used to perform obfuscation processing on the bytecode file of the original source code based on the mapping file to obtain an obfuscated bytecode file. The mapping file is also used to store bytecode file obfuscation rules.

[0108] The installation package generation module 24 is used to perform mixed packaging processing on the obfuscated update resource file and the obfuscated bytecode file to generate the installation package of the application to be released, and release it after the installation package is run.

[0109] In a specific application scenario, before the resource file obfuscation module and the bytecode file obfuscation module, the system further includes a mapping file construction module for:

[0110] Obtaining the original resource files of the published application;

[0111] Determine an expected obfuscated resource file from the original resource file, and configure a preset name path for the expected obfuscated resource file;

[0112] The expected obfuscated resource file, the original name path of the expected obfuscated resource file, and the preset name path are stored in a preset mapping file in a mapping manner;

[0113] as well as,

[0114] Obtaining a bytecode file of the original source code of the published application, and configuring an estimated class parameter for the bytecode file;

[0115] The bytecode file, the original class parameters of the bytecode file, and the expected class parameters are stored in the mapping file in a mapping manner.

[0116] In a specific application scenario, the resource file obfuscation module is used to:

[0117] According to the expected obfuscated resource file in the mapping file, searching the update resource file for the corresponding target obfuscated resource file;

[0118] The name path of the target obfuscated resource file is replaced with the preset name path to obtain an obfuscated updated resource file.

[0119] In a specific application scenario, the bytecode file obfuscation module is used to:

[0120] The original class parameters of the bytecode file of the original source code are replaced with the expected class parameters to obtain an obfuscated bytecode file.

[0121] In a specific application scenario, before the resource file obfuscation module, the system further includes an update resource file encryption module for:

[0122] Acquire an update resource file in a preset file format from the update resource file;

[0123] The update resource file in the preset file format is encrypted based on a preset key to obtain an encrypted update resource file in the preset file format, so as to perform name and path obfuscation processing on the encrypted update resource file in the preset file format.

[0124] In a specific application scenario, before the resource file obfuscation module, the system further includes a row and column information obfuscation module, which is used to:

[0125] Before the end tag of the element that allows space processing, a random number of space symbols are injected to modify the column information of the update resource file;

[0126] And / or, before the end tags of all elements, a random number of line break symbols are injected to modify the line information of the update resource file.

[0127] In a specific application scenario, when the published application is an application that has access to other software development kits, before the resource file obfuscation module, the system further includes a verification logic return value modification module, which is used to:

[0128] Locate the location of token verification logic in the files of the other software development kits of the update resource files;

[0129] The return value of the verification logic is modified to success, so that the return value of the verification logic remains successful, and the modified files of other software development kits are stored in the installation package of the application to be released.

[0130] The present application provides an application publishing system, which first obtains the original source code of the published application and the update resource file of the to-be-published application; secondly, based on a preset mapping file, performs name path obfuscation processing on the update resource file to obtain an obfuscated update resource file, and the mapping file is used to store the mapping relationship between the name path of the original resource file of the published application and the preset resource file name path; again, based on the mapping file, performs obfuscation processing on the bytecode file of the original source code to obtain an obfuscated bytecode file, and the mapping file is also used to store bytecode file obfuscation rules; finally, the obfuscated update resource file and the obfuscated bytecode file are mixed and packaged to generate an installation package of the to-be-published application, and the installation package is published after the installation package is run. Compared with the prior art, the embodiment of the present application reduces the risk of the application to be released being associated by respectively obfuscating the bytecode files of the source code of the published application and the update resource files of the application to be released, and then combining them to generate an installation package of the application to be released; and since there is no need to rewrite the source code, the time consumed in rewriting the code and the steps of source code testing are saved, so that the application can be released after the installation package is run, thereby improving the release efficiency of the application, while avoiding new program vulnerabilities that may exist in the new code and improving the stability of the application.

[0131] According to an embodiment of the present application, a storage medium is provided, wherein the storage medium stores at least one executable instruction, and the computer executable instruction can execute the method for publishing the application in any of the above method embodiments.

[0132] Based on this understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.), and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each implementation scenario of the present application.

[0133] Figure 3 A schematic diagram of the structure of a terminal provided according to an embodiment of the present application is shown, and the specific embodiment of the present application does not limit the specific implementation of the terminal.

[0134] like Figure 3 As shown, the terminal may include: a processor (processor) 302 , a communication interface (Communications Interface) 304 , a memory (memory) 306 , and a communication bus 308 .

[0135] The processor 302 , the communication interface 304 , and the memory 306 communicate with each other via the communication bus 308 .

[0136] The communication interface 304 is used to communicate with other devices such as clients or other servers.

[0137] The processor 302 is used to execute the program 310, and specifically can execute the relevant steps in the above-mentioned application publishing method embodiment.

[0138] Specifically, the program 310 may include program codes, which include computer operation instructions.

[0139] The processor 302 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application. The one or more processors included in the computer device may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.

[0140] The memory 306 is used to store the program 310. The memory 306 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.

[0141] The program 310 may be specifically configured to enable the processor 302 to perform the following operations:

[0142] Obtaining the original source code of the published application and the updated resource file of the application to be published, wherein the updated resource file is obtained by compiling the original resource file of the published application;

[0143] Based on a preset mapping file, performing name path obfuscation processing on the update resource file to obtain an obfuscated update resource file, wherein the mapping file is used to store a mapping relationship between an original name path of an expected obfuscated resource file and a preset name path, wherein the expected obfuscated resource file is screened out from an original resource file of the published application;

[0144] Based on the mapping file, the bytecode file of the original source code is obfuscated to obtain an obfuscated bytecode file, wherein the mapping file is also used to store obfuscation rules for the bytecode file;

[0145] The obfuscated update resource file and the obfuscated bytecode file are mixed and packaged to generate an installation package of the application to be released, and the installation package is released after it is run.

[0146] The storage medium may also include an operating system and a network communication module. The operating system is a program that manages the hardware and software resources of the physical device of the above-mentioned application publishing method, and supports the operation of the information processing program and other software and / or programs. The network communication module is used to realize the communication between the components inside the storage medium, and the communication with other hardware and software in the information processing physical device.

[0147] Each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the system embodiment, since it basically corresponds to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0148] The method and system of the present application may be implemented in many ways. For example, the method and system of the present application may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above order of steps for the method is for illustration only, and the steps of the method of the present application are not limited to the order specifically described above, unless otherwise specifically stated. In addition, in some embodiments, the present application may also be implemented as a program recorded in a recording medium, which includes machine-readable instructions for implementing the method according to the present application. Therefore, the present application also covers a recording medium storing a program for executing the method according to the present application.

[0149] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.

[0150] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A method for publishing an application, characterized in that: include: Obtaining the original source code of the published application and the updated resource file of the application to be published, wherein the updated resource file is obtained by compiling the original resource file of the published application; Based on a preset mapping file, performing name path obfuscation processing on the update resource file to obtain an obfuscated update resource file, wherein the mapping file is used to store a mapping relationship between an original name path of an expected obfuscated resource file and a preset name path, wherein the expected obfuscated resource file is screened out from an original resource file of the published application; Based on the mapping file, the bytecode file of the original source code is obfuscated to obtain an obfuscated bytecode file, wherein the mapping file is also used to store obfuscation rules for the bytecode file; The obfuscated update resource file and the obfuscated bytecode file are mixed and packaged to generate an installation package of the application to be released, and the installation package is released after it is run.

2. The method according to claim 1, characterized in that: Before the method further comprises: performing name path obfuscation processing on the update resource file based on the preset mapping file to obtain the obfuscated update resource file, and performing obfuscation processing on the bytecode file of the original source code based on the mapping file to obtain the obfuscated bytecode file, the method further comprises: Obtaining the original resource files of the published application; Determine an expected obfuscated resource file from the original resource file, and configure a preset name path for the expected obfuscated resource file; The expected obfuscated resource file, the original name path of the expected obfuscated resource file, and the preset name path are stored in a preset mapping file in a mapping manner; as well as, Obtaining a bytecode file of the original source code of the published application, and configuring an estimated class parameter for the bytecode file; The bytecode file, the original class parameters of the bytecode file, and the expected class parameters are stored in the mapping file in a mapping manner.

3. The method according to claim 2, characterized in that The step of performing name and path obfuscation processing on the update resource file based on the preset mapping file to obtain the obfuscated update resource file includes: According to the expected obfuscated resource file in the mapping file, searching the update resource file for the corresponding target obfuscated resource file; The name path of the target obfuscated resource file is replaced with the preset name path to obtain an obfuscated updated resource file.

4. The method according to claim 2, characterized in that: The step of performing obfuscation processing on the bytecode file of the original source code based on the mapping file to obtain an obfuscated bytecode file includes: The original class parameters of the bytecode file of the original source code are replaced with the expected class parameters to obtain an obfuscated bytecode file.

5. The method according to claim 1, characterized in that Before performing name and path obfuscation processing on the update resource file based on the preset mapping file to obtain the obfuscated update resource file, the method further includes: Acquire an update resource file in a preset file format from the update resource file; The update resource file in the preset file format is encrypted based on a preset key to obtain an encrypted update resource file in the preset file format, so as to perform name and path obfuscation processing on the encrypted update resource file in the preset file format.

6. The method according to claim 1, characterized in that Before performing name and path obfuscation processing on the update resource file based on the preset mapping file to obtain the obfuscated update resource file, the method further includes: Before the end tag of the element that allows space processing, a random number of space symbols are injected to modify the column information of the update resource file; And / or, before the end tags of all elements, a random number of line break symbols are injected to modify the line information of the update resource file.

7. The method according to claim 1, characterized in that When the published application is an application that has access to other software development kits, before performing name path obfuscation processing on the update resource file based on a preset mapping file to obtain the obfuscated update resource file, the method further includes: Locate the location of token verification logic in the files of the other software development kits of the update resource files; The return value of the verification logic is modified to success, so that the return value of the verification logic remains successful, and the modified files of other software development kits are stored in the installation package of the application to be released.

8. A system for publishing an application, characterized in that: include: A file acquisition module is used to acquire the original source code of the published application and the updated resource files of the application to be published; A resource file obfuscation module, used to perform name path obfuscation processing on the update resource file based on a preset mapping file to obtain an obfuscated update resource file, wherein the mapping file is used to store a mapping relationship between the original resource file name path of the published application and the preset resource file name path; A bytecode file obfuscation module, used to perform obfuscation processing on the bytecode file of the original source code based on the mapping file to obtain an obfuscated bytecode file, wherein the mapping file is also used to store bytecode file obfuscation rules; The installation package generation module is used to mix and package the obfuscated update resource files and the obfuscated bytecode files to generate an installation package of the application to be released, and release it after the installation package is run.

9. A storage medium, wherein at least one executable instruction is stored in the storage medium, characterized in that: The executable instructions enable the processor to execute operations corresponding to the method for publishing an application program according to any one of claims 1 to 7.

10. A terminal, comprising: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, wherein the executable instruction enables the processor to execute an operation corresponding to the method for publishing an application according to any one of claims 1 to 7.