CN113377415A - Application publishing method and device - Google Patents

Application publishing method and device Download PDF

Info

Publication number
CN113377415A
CN113377415A CN202110723284.7A CN202110723284A CN113377415A CN 113377415 A CN113377415 A CN 113377415A CN 202110723284 A CN202110723284 A CN 202110723284A CN 113377415 A CN113377415 A CN 113377415A
Authority
CN
China
Prior art keywords
file
application
installation package
specific
code
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110723284.7A
Other languages
Chinese (zh)
Inventor
易亚洲
李涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhengzhou Apas Digital Cloud Information Technology Co ltd
Original Assignee
Zhengzhou Apas Digital Cloud Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhengzhou Apas Digital Cloud Information Technology Co ltd filed Critical Zhengzhou Apas Digital Cloud Information Technology Co ltd
Priority to CN202110723284.7A priority Critical patent/CN113377415A/en
Publication of CN113377415A publication Critical patent/CN113377415A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3604Software analysis for verifying properties of programs

Landscapes

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

Abstract

The embodiment of the application discloses an application publishing method and device, and aims to solve the problems that the existing application publishing method causes low publishing efficiency of an application program and high maintenance cost of a product. The method comprises the following steps: determining a specific function supported by a channel to be published corresponding to an application program; acquiring a resource list file corresponding to an application program, and acquiring a specific code corresponding to a specific function and a public code required by an application installation package when the application installation package is released on each application release channel from a pre-split file corresponding to the application program; constructing the specific code into a specific installation package file in an executable file format, and constructing the public code and the resource list file into a public installation package file in the executable file format; combining the specific installation package file and the public installation package file to obtain an application installation package corresponding to the application program; and publishing the application installation package on a channel to be published. By adopting the technical scheme, the release efficiency of the application program can be improved, and the product maintenance cost can be reduced.

Description

Application publishing method and device
Technical Field
The present application relates to the field of computer technologies, and in particular, to an application publishing method and apparatus.
Background
When an application program is published, a project file corresponding to the application program generally needs to be constructed into an application installation package and published through an application publishing channel, and the project file generally includes all codes, resource files and related description files of the application program.
With the strictness of issuing and auditing of application programs and the differentiation of auditing standards of various application issuing channels, at present, when the application programs are issued through various application issuing channels, project files are generally required to be modified according to the auditing standards of the various application issuing channels, and application installation packages are constructed according to the modified project files.
Disclosure of Invention
An object of the embodiments of the present application is to provide an application publishing method and apparatus, so as to solve the problems of low publishing efficiency of an application program and high product maintenance cost caused by the existing application publishing method.
In order to solve the above technical problem, the embodiment of the present application is implemented as follows:
in one aspect, an embodiment of the present application provides an application publishing method, including:
determining a specific function supported by a channel to be published corresponding to an application program;
acquiring a resource list file corresponding to the application program, and acquiring a specific code corresponding to the specific function and a public code required by the application installation package when the application installation package is released on each application release channel from a pre-split file corresponding to the application program; the pre-splitting file comprises the public codes pre-split from the program source codes corresponding to the application programs and specific codes corresponding to specific functions supported by each application release channel;
constructing the specific code into a specific installation package file in an executable file format, and constructing the public code and the resource list file into a public installation package file in the executable file format;
combining the specific installation package file and the public installation package file to obtain an application installation package corresponding to the application program; and publishing the application installation package on the channel to be published.
On the other hand, an embodiment of the present application provides an application publishing apparatus, including:
the determining module is used for determining the specific functions supported by the channel to be published corresponding to the application program;
the first acquisition module is used for acquiring the resource list file corresponding to the application program, and acquiring a specific code corresponding to the specific function and a public code required by the application installation package when the application installation package is released on each application release channel from the pre-split file corresponding to the application program; the pre-splitting file comprises the public codes pre-split from the program source codes corresponding to the application programs and specific codes corresponding to specific functions supported by each application release channel;
the construction module is used for constructing the specific code into a specific installation package file in an executable file format, and constructing the public code and the resource list file into a public installation package file in the executable file format;
the merging and publishing module is used for merging the specific installation package file and the public installation package file to obtain an application installation package corresponding to the application program; and publishing the application installation package on the channel to be published.
In another aspect, an embodiment of the present application provides an application publishing device, including a processor and a memory electrically connected to the processor, where the memory stores a computer program, and the processor is configured to call and execute the computer program from the memory to implement the application publishing method.
In still another aspect, an embodiment of the present application provides a storage medium for storing a computer program, where the computer program is executable by a processor to implement the application publishing method.
By adopting the technical scheme of the embodiment of the application, the resource list file corresponding to the application program is obtained by determining the specific function supported by the channel to be published corresponding to the application program, the specific code corresponding to the specific function which is pre-split and the public code required by the application installation package when the application installation package is published on each application publishing channel are obtained, the specific code is constructed into the specific installation package file in the executable file format, the public code and the resource list file are constructed into the public installation package file in the executable file format, so that the specific installation package file and the public installation package file are combined to obtain the application installation package corresponding to the application program, and the application installation package is published on the channel to be published. Compared with the traditional method for constructing the application installation package, the technical scheme has the advantages that the program source code corresponding to the application program is pre-split into the public code and the specific code, so that when the application installation package is published on the channel to be published, the public code and the specific code required by the channel to be published are only required to be respectively constructed and then combined according to the channel to be published, the complete application installation package can be published on each channel to be published, the publishing success rate of the application program is improved, repeated construction of the public code which consumes a long time in the construction process is not required, the construction time of the application installation package is greatly saved, and the publishing efficiency of the application program is improved. Moreover, only the specific installation package files in each application installation package issued on each channel to be issued are different, so that when an application program is abnormal, the examination of each file in each application installation package corresponding to the application program is not needed, only the public installation package files and the resource list files in one application installation package and each specific installation package file in each application installation package are examined, the number of the examined files is reduced, the abnormal condition can be rapidly examined, and the product maintenance cost is reduced.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only some embodiments described in the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without any creative effort.
FIG. 1 is a schematic flow chart diagram of a method for application publication in accordance with an embodiment of the present application;
FIG. 2 is a schematic flow chart diagram of a method of application publication in accordance with another embodiment of the present application;
FIG. 3 is a schematic block diagram of an application publication apparatus according to an embodiment of the present application;
fig. 4 is a schematic diagram of a hardware structure of an application distribution device according to an embodiment of the present application.
Detailed Description
The embodiment of the application issuing method and device is used for solving the problems that the existing application issuing method causes low issuing efficiency of application programs and high maintenance cost of products.
In order to make those skilled in the art better understand the technical solutions in the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Fig. 1 is a schematic flow chart of an application publishing method according to an embodiment of the present application, as shown in fig. 1, the method including:
and S102, determining the specific functions supported by the channel to be published corresponding to the application program.
In one embodiment, the specific functions may include out-of-application advertising functions, barrier-free service functions, and the like. The external advertisement function may be a function of displaying an advertisement unrelated to the application program in the form of a pop-up window, a floating window, or the like. The barrier-free service function may be a function of monitoring operations (e.g., clicking, dragging, interface updating, etc.) of each interface on the electronic device in which the application is installed, or a function of acquiring information (e.g., chat text, call records, etc.) of each screen on the electronic device in which the application is installed. Due to the fact that the auditing standards of the application publishing channels are different, the specific functions supported by the application publishing channels are different in order to pass the auditing.
It should be understood that the specific function is a function that each application program set at the time of application program development has, and the specific code corresponding to the specific function exists in the program source code corresponding to the application program. The specific functions include other various functions in addition to the out-of-application advertisement function and the barrier-free service function enumerated in the present embodiment. For example, when an application is released overseas, the types of specific functions may be more or less due to different auditing standards, and this embodiment is not illustrated, but the types of specific functions do not constitute a limitation to the present application.
S104, acquiring a resource list file corresponding to the application program, and acquiring a specific code corresponding to a specific function and a public code required by the application installation package when the application installation package is released on each application release channel from a pre-split file corresponding to the application program.
After the application program is developed, each file for implementing the application program is generally stored in a project file corresponding to the application program. In this embodiment, the resource manifest file and the pre-split file may be obtained from the project file corresponding to the application program. The pre-splitting file comprises public codes pre-split from program source codes corresponding to the application programs and specific codes corresponding to specific functions supported by each application release channel.
Wherein the common code may be a main program code for implementing a main function of the application. If an application program is an instant messaging application, the public code can be a code capable of realizing a chat interaction function; if an application is a video playing application, the common code may be a code that can implement a function of playing video. The application distribution channel may include platforms developed by various electronic device manufacturers for exposing various applications to users and providing functions for downloading the various applications. For example, applications of the android system typically require an application marketplace on the shelf for users to download and update. In addition to the application market, there are some special promoters, which may be collectively referred to as the application distribution channels described above. There are about ten large and well-known application markets in China, and the total number of all the application markets can reach thousands, and general commercial application programs may need to be published through hundreds of application publishing channels.
S106, constructing the specific code into a specific installation package file in an executable file format, and constructing the public code and the resource list file into a public installation package file in the executable file format.
The construction refers to a process of finally converting a program source code corresponding to an application program into an application installation package capable of being installed in an application market through a series of processing. For android applications, this process uses Gradle (Java virtual machine based build tool) for management and customization.
S108, combining the specific installation package file and the public installation package file to obtain an application installation package corresponding to the application program; and publishing the application installation package on a channel to be published.
For an application program of the Android system, the application installation package is a compressed file with an extension name of APK (Android application package), and is generally called as an APK file. The application installation package comprises a code file in a dex (executable file of android) format after construction, a resource manifest file (including file resources, native resource files, and manifest file manifest) and signature information. In the APK file, code files in a dex format must be named as classes.dex, classes01.dex, classes02.dex, etc., and as long as the naming rules are met, the android system searches for needed codes in the named files to execute when running the application.
It should be noted that, when the installation files corresponding to the application program are incomplete, part of the application distribution channels cannot distribute the installation files, and therefore, the distribution success rate of the application program with the incomplete installation files in each application distribution channel is greatly reduced. The incomplete installation file generally refers to an installation file set composed of function installation packages after an application installation package corresponding to an application program is split into a plurality of function installation packages according to functions, and any installation package in the set does not contain a complete resource list file corresponding to the application program.
By adopting the technical scheme of the embodiment of the application, the resource list file corresponding to the application program is obtained by determining the specific function supported by the channel to be published corresponding to the application program, the specific code corresponding to the specific function which is pre-split and the public code required by the application installation package when the application installation package is published on each application publishing channel are obtained, the specific code is constructed into the specific installation package file in the executable file format, the public code and the resource list file are constructed into the public installation package file in the executable file format, so that the specific installation package file and the public installation package file are combined to obtain the application installation package corresponding to the application program, and the application installation package is published on the channel to be published. Compared with the traditional method for constructing the application installation package, the technical scheme has the advantages that the program source code corresponding to the application program is pre-split into the public code and the specific code, so that when the application installation package is published on the channel to be published, the public code and the specific code required by the channel to be published are only required to be respectively constructed and then combined according to the channel to be published, the complete application installation package can be published on each channel to be published, the publishing success rate of the application program is improved, repeated construction of the public code which consumes a long time in the construction process is not required, the construction time of the application installation package is greatly saved, and the publishing efficiency of the application program is improved. Moreover, only the specific installation package files in each application installation package issued on each channel to be issued are different, so that when an application program is abnormal, the examination of each file in each application installation package corresponding to the application program is not needed, only the public installation package files and the resource list files in one application installation package and each specific installation package file in each application installation package are examined, the number of the examined files is reduced, the abnormal condition can be rapidly examined, and the product maintenance cost is reduced.
The application publishing method provided by the embodiment of the present application is described in detail below by taking an application program applied to an android system as an example.
In an embodiment, before the specific code corresponding to the specific function and the public code required by the application installation package when the application installation package is published on each application publishing channel are obtained from the pre-split file corresponding to the application program, the program source code corresponding to the application program may be obtained first, then the program source code is split into the public code and each specific code, and the public code and each specific code are stored in an associated manner, so as to obtain the pre-split file corresponding to the application program.
For example, a program source code corresponding to an application program includes a public code, a first specific code corresponding to an out-of-application advertisement function, and a second specific code corresponding to an unobstructed service function, and by using the technical scheme of this embodiment, the program source code can be split into the public code, the first specific code, and the second specific code, and the public code, the first specific code, and the second specific code are stored in an associated manner, so as to obtain a pre-split file corresponding to the application program.
In this embodiment, splitting the program source code corresponding to the application program provides a basis for respectively constructing the public code and each specific code in the following process, and directly storing each split code in an associated manner, so that the number of files of the program source code corresponding to the application program can be prevented from being changed, and the required code can be quickly and accurately determined in the following process of constructing the application installation package.
In one embodiment, the executable file format may be a dex format. When the specific code is constructed into the specific installation package file in the executable file format, and the public code and the resource list file are constructed into the public installation package file in the executable file format, the specific code and the resource list file can be combined to obtain a first combined file, and the first combined file is constructed into the specific installation package file in the dex format; and the public code and the resource list file can be combined to obtain a second combined file, and the second combined file is constructed into a public installation package file in a dex format.
The first combination file and the second combination file are only exemplarily shown for distinguishing each combination, when the program source code corresponding to the application program is split into a plurality of specific codes such as a first specific code, a second specific code, a third specific code and the like, the specific codes and the resource list file are respectively combined to obtain the first combination file, the second combination file, the third combination file and the like, and the public codes and the resource list file are simultaneously combined to obtain the fourth combination file.
In the embodiment, by constructing the public code as the public installation package file and constructing the specific code as the specific installation package file, when the channels to be published corresponding to the application program comprise a plurality of channels, the time for repeatedly constructing the public installation package file can be saved, and the publishing efficiency of the application program is improved; in addition, the resource list file is completely involved in packaging of each installation package file (including a public installation package file and a specific installation package file), so that the difficulty of splitting and merging the resource list file is avoided, and the implementation is simple. It should be noted that the android system does not support loading a split resource manifest file.
In an embodiment, when the specific installation package file and the public installation package file are combined to obtain the application installation package corresponding to the application program, the specific code file in the specific installation package file may be extracted first, and then the specific code file is added to the public installation package file to obtain the application installation package corresponding to the application program. The specific installation package file comprises a specific code file in a dex format corresponding to a specific code.
In this embodiment, since the android system is loaded indifferently to the file in the dex format, for a specific code file in the dex format, the android system can find a needed code therein to execute. In addition, the time consumption of the process of combining the specific installation package file and the public installation package file is short, so that the application installation package corresponding to the application program is obtained by combining the specific installation package file and the public installation package file, the integrity of the application installation package can be ensured, the issuing success rate of the application program is improved, the construction time of the application installation package can be greatly saved, and the issuing efficiency of the application program is improved.
For example, the program source code corresponding to an application program includes a public code, a first specific code corresponding to an out-of-application advertisement function, and a second specific code corresponding to an unobstructed service function, the first application market requires that the application program cannot have the out-of-application advertisement function, the second application market requires that the application program cannot have the unobstructed service function, and the third application market does not have any requirement for the application program. Assuming that it takes about 20 minutes to build the whole program source code, about 1 minute to build the first specific code and the second specific code separately, and about 18 minutes to build the common code separately.
Then, without adopting the technical solution of the embodiment of the present application, it is necessary to delete the first specific code in the program source code for the first application market separately, and construct the modified program source code and the resource manifest file as the application installation package, which takes about 19 minutes; deleting second specific codes in the program source codes for the second application market separately, and constructing the modified program source codes and the resource list file into an application installation package, which takes about 19 minutes; building unmodified program source code and resource manifest files as an application installation package for the third application marketplace alone takes about 20 minutes. As can be seen, it takes about 58 minutes to complete the publishing of the application program on the three application publication channels, i.e., the first application market, the second application market, and the third application market. After the technical scheme of the embodiment of the application is adopted, only the first specific code and the second specific code need to be constructed independently, about 1 minute is consumed respectively, the public code is constructed independently, about 18 minutes is consumed, and about 20 minutes is consumed in total, then the first specific code, the second specific code and the public code are combined according to the requirements of all application release channels, the time consumption of the process is about 1 minute, and therefore, the total time consumption of about 21 minutes is consumed for completing the release of the application programs on three application release channels, namely the first application market, the second application market, the third application market and the like. Compared with the situation that the technical scheme of the embodiment of the application is not adopted, the construction time of the application installation package is saved by about 60%.
It should be noted that the construction time of the application installation package is directly proportional to the complexity of the application program and the code amount of the program source code corresponding to the application program, and the construction process of the code is time-consuming in the construction process of the application installation package.
In one embodiment, after the specific code file in the specific installation package file is extracted, if the first file name of the specific code file is the same as the second file name of the public code file, the first file name is modified into a third file name different from the second file name, so that the specific code file and the public code file are respectively identified by the channel to be published.
The public installation package file comprises a dex format public code file corresponding to the public code. It should be understood that the names of the code files in the dex format in each installation package file (including the specific installation package file and the common installation package file) are class.dex, class 01.dex, class 02.dex and the like in sequence, and the named sequence number is consistent with the number of the code files in the dex format in the installation package file.
In this embodiment, since the android system is loaded indifferently to the file in the dex format, the first file name of the specific code file is modified when the first file name is the same as the second file name of the public code file, so as to avoid the situation that the names of the specific code file and the public code file are the same, thereby ensuring that the specific code file and the public code file are respectively identified by the channel to be published.
In one embodiment, before the application installation package is published on the channel to be published, signature information corresponding to the application program and/or the channel to be published may be generated, and the application installation package is signed by using the signature information, so that when the application installation package is published on the channel to be published, security verification is performed on the application installation package based on the signature.
The signature information corresponding to each application program can be generated according to the application program, and the signature information of different application programs is different. Or generating signature information of the application program on each application distribution channel according to each application distribution channel corresponding to the same application program, wherein the signature information of the same application program on different application distribution channels can be the same or different. If the signature information of the application program on different application distribution channels is the same, the effect of updating the application program from different application distribution channels can be realized.
After the application installation package is signed, any modification in the application installation package can result in the signature being invalid, so that when the application installation package is issued on a channel to be issued, the security verification of the application installation package based on the signature cannot pass, and the security of the electronic equipment to which the application installation package is to be installed is ensured.
In this embodiment, by signing the application installation package, when the application installation package is published on a channel to be published, security verification is performed on the application installation package based on the signature, so that authenticity of a source of the application installation package can be ensured, and the application installation package is not tampered by a third party.
Assuming that the program source code corresponding to an application program comprises a public code, a first specific code corresponding to an out-of-application advertisement function and a second specific code corresponding to an barrier-free service function, the first application market requires that the application program cannot have the out-of-application advertisement function, the second application market requires that the application program cannot have the barrier-free service function, and the third application market does not have any requirement on the application program. According to the technical solution of the above embodiment, the application issuing method may be specifically executed as the following steps a1-a 5:
step a1, splitting the program source code corresponding to the application program into: and storing the public code, the first specific code and the second specific code in an associated manner to obtain a pre-split file corresponding to the application program. And acquiring a resource list file corresponding to the application program.
Step A2, acquiring a first specific code and a second specific code in the pre-split file, and respectively combining the first specific code and the second specific code with the resource list file to construct:
step A2-1, combining the first specific code and the resource list file to obtain a first combined file, constructing the first combined file into a first specific installation package file in a dex format, wherein the first specific installation package file comprises a constructed resource list file and a dex file, and the name of the dex file is classes.
Step A2-2, combining the second specific code and the resource list file to obtain a second combined file, constructing the second combined file into a second specific installation package file in a dex format, wherein the second specific installation package file comprises the constructed resource list file and a dex file, and the name of the dex file is classes.
Step A3, combining the public code and the resource list file to obtain a third combined file, and constructing the third combined file into a dex format public installation package file, wherein the public installation package file comprises a constructed resource list file and a dex file, and the name of the dex file is classes.
Step A4, extracting classes.dex files in the first specific installation package file in the step A2-1, modifying the files with the names of classes01.dex, adding the files into a public installation package file to obtain an application installation package corresponding to the application program, and releasing the application installation package to a second application market; extracting class.dex files in the second specific installation package file in the step A2-2, modifying the files with class 01.dex names, adding the modified files into the public installation package file to obtain an application installation package corresponding to the application program, and releasing the application installation package to a first application market; and B, extracting class.dex files in the first specific installation package file in the step A2-1, modifying the files with the names of class 01.dex, adding the files to the public installation package file, extracting class.dex files in the second specific installation package file in the step A2-2, modifying the files with the names of class 02.dex, adding the files to the public installation package file, and obtaining an application installation package corresponding to the application program for publishing to a third application market.
And step A5, signing the application installation packages respectively, and releasing the application installation packages through the first application market, the second application market and the third application market respectively.
Fig. 2 is a schematic flow chart of an application publishing method according to another embodiment of the present application, as shown in fig. 2, the method including:
s201, determining the specific functions supported by the channel to be published corresponding to the application program.
The specific functions may include an out-of-application advertisement function, an out-of-service function, and the like.
S202, acquiring a program source code corresponding to the application program, splitting the program source code into a public code and specific codes, and storing the public code and the specific codes in an associated manner to obtain a pre-split file corresponding to the application program.
In this embodiment, the execution order of S202 is not limited. For example, in addition to the execution sequence of executing S201 first and then S202 in this embodiment, S202 first and then S201 may be executed, or S201 and S202 may be executed simultaneously.
And S203, acquiring a resource list file corresponding to the application program, and acquiring a specific code corresponding to a specific function and a public code required by the application installation package when the application installation package is released on each application release channel from a pre-split file corresponding to the application program.
S204, combining the specific code and the resource list file to obtain a first combined file, and constructing the first combined file into a specific installation package file in an executable file format; and combining the public code and the resource list file to obtain a second combined file, and constructing the second combined file into a public installation package file in an executable file format.
The executable file format may be a dex format.
S205, extracting the specific code file in the specific installation package file.
If the first file name of the specific code file is the same as the second file name of the public code file, the first file name is modified into a third file name different from the second file name, so that the specific code file and the public code file are respectively identified by a channel to be issued.
And S206, adding the specific code file into the public installation package file to obtain an application installation package corresponding to the application program.
And S207, generating signature information corresponding to the application program and/or the channel to be published, and signing the application installation package by using the signature information.
By adopting the technical scheme of the embodiment, the security verification can be carried out on the application installation package based on the signature when the application installation package is released on the channel to be released.
And S208, publishing the signed application installation package on the channel to be published.
The specific processes of S201 to S208 are described in detail in the above embodiments, and are not described herein again.
By adopting the technical scheme of the embodiment of the application, the resource list file corresponding to the application program is obtained by determining the specific function supported by the channel to be published corresponding to the application program, the specific code corresponding to the specific function which is pre-split and the public code required by the application installation package when the application installation package is published on each application publishing channel are obtained, the specific code is constructed into the specific installation package file in the executable file format, the public code and the resource list file are constructed into the public installation package file in the executable file format, so that the specific installation package file and the public installation package file are combined to obtain the application installation package corresponding to the application program, and the application installation package is published on the channel to be published. Compared with the traditional method for constructing the application installation package, the technical scheme has the advantages that the program source code corresponding to the application program is pre-split into the public code and the specific code, so that when the application installation package is published on the channel to be published, the public code and the specific code required by the channel to be published are only required to be respectively constructed and then combined according to the channel to be published, the complete application installation package can be published on each channel to be published, the publishing success rate of the application program is improved, repeated construction of the public code which consumes a long time in the construction process is not required, the construction time of the application installation package is greatly saved, and the publishing efficiency of the application program is improved. Moreover, only the specific installation package files in each application installation package issued on each channel to be issued are different, so that when an application program is abnormal, the examination of each file in each application installation package corresponding to the application program is not needed, only the public installation package files and the resource list files in one application installation package and each specific installation package file in each application installation package are examined, the number of the examined files is reduced, the abnormal condition can be rapidly examined, and the product maintenance cost is reduced.
In summary, particular embodiments of the present subject matter have been described. Other embodiments are within the scope of the following claims. In some cases, the actions recited in the claims can be performed in a different order and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may be advantageous.
Based on the same idea, the application publishing method provided in the embodiment of the present application further provides an application publishing device.
Fig. 3 is a schematic block diagram of an application issuing apparatus according to an embodiment of the present application, and as shown in fig. 3, the application issuing apparatus includes:
the determining module 310 is configured to determine a specific function supported by a channel to be published corresponding to an application;
the first obtaining module 320 is configured to obtain a resource list file corresponding to an application program, and obtain a specific code corresponding to a specific function and a public code required by an application installation package when the application installation package is published in each application publishing channel from a pre-split file corresponding to the application program; the pre-splitting file comprises public codes pre-split from program source codes corresponding to the application programs and specific codes corresponding to specific functions respectively supported by each application release channel;
the building module 330 is configured to build the specific code into a specific installation package file in an executable file format, and build the common code and the resource manifest file into a common installation package file in the executable file format;
the merging and publishing module 340 is configured to merge the specific installation package file and the public installation package file to obtain an application installation package corresponding to the application program; and publishing the application installation package on a channel to be published.
In one embodiment, the application issuing apparatus further includes:
the second acquisition module is used for acquiring a program source code corresponding to the application program;
the splitting module is used for splitting the program source code into a public code and each specific code;
and the storage module is used for storing the public codes and the specific codes in an associated manner to obtain a pre-split file corresponding to the application program.
In one embodiment, the executable file format is a dex format;
the building block 330 includes:
the first combination and construction unit is used for combining the specific code and the resource list file to obtain a first combination file; constructing the first combined file into a specific installation package file in a dex format;
the second combination and construction unit is used for combining the public codes and the resource list file to obtain a second combination file; and constructing the second combined file into a dex format public installation package file.
In one embodiment, the specific installation package file includes a specific code file in a dex format corresponding to the specific code;
the merge and publish module 340 includes:
the extracting unit is used for extracting a specific code file in the specific installation package file;
and the adding unit is used for adding the specific code file into the public installation package file to obtain an application installation package corresponding to the application program.
In one embodiment, the public installation package file comprises a public code file in a dex format corresponding to the public code;
the merge and publish module 340 further includes:
and the modifying unit is used for modifying the first file name into a third file name different from the second file name if the first file name of the specific code file is the same as the second file name of the public code file, so that the specific code file and the public code file are respectively identified by the channel to be issued.
In one embodiment, the application issuing apparatus further includes:
the generating module is used for generating signature information corresponding to the application program and/or the channel to be published;
and the signature module is used for signing the application installation package by utilizing the signature information so as to carry out security verification on the application installation package based on the signature when the application installation package is issued on the channel to be issued.
By adopting the device provided by the embodiment of the application, the specific functions supported by the channel to be published corresponding to the application are determined, the resource list file corresponding to the application is obtained, the specific codes corresponding to the specific functions which are pre-split and the public codes required by the application installation package when the application installation package is published on each application publishing channel are obtained, the specific codes are constructed into the specific installation package file in the executable file format, the public codes and the resource list file are constructed into the public installation package file in the executable file format, so that the specific installation package file and the public installation package file are combined to obtain the application installation package corresponding to the application, and the application installation package is published on the channel to be published. Compared with the traditional method for constructing the application installation package, the device is characterized in that the program source code corresponding to the application program is pre-split into the public code and the specific code, so that when the application installation package is published on the channel to be published, the public code and the specific code required by the channel to be published are only required to be respectively constructed and then combined according to the channel to be published, the complete application installation package can be published on each channel to be published, the publishing success rate of the application program is improved, repeated construction of the public code which consumes a long time in the construction process is not required, the construction time of the application installation package is greatly saved, and the publishing efficiency of the application program is improved. Moreover, only the specific installation package files in each application installation package issued on each channel to be issued are different, so that when an application program is abnormal, the examination of each file in each application installation package corresponding to the application program is not needed, only the public installation package files and the resource list files in one application installation package and each specific installation package file in each application installation package are examined, the number of the examined files is reduced, the abnormal condition can be rapidly examined, and the product maintenance cost is reduced.
It should be understood by those skilled in the art that the application issuing device in fig. 3 can be used to implement the application issuing method described above, and the detailed description thereof should be similar to that of the method described above, and is not repeated herein to avoid complexity.
Based on the same idea, an application publishing device is further provided in the embodiments of the present application, as shown in fig. 4. The application distribution device may have a large difference due to different configurations or performances, and may include one or more processors 401 and a memory 402, where the memory 402 may store one or more stored applications or data. Wherein memory 402 may be transient or persistent. The application program stored in memory 402 may include one or more modules (not shown), each of which may include a series of computer-executable instructions for an application publication device. Still further, the processor 401 may be configured to communicate with the memory 402 to execute a series of computer-executable instructions in the memory 402 on an application publishing device. The application publication apparatus may also include one or more power supplies 403, one or more wired or wireless network interfaces 404, one or more input-output interfaces 405, and one or more keyboards 406.
In particular, in this embodiment, the application issuing device includes a memory, and one or more programs, where the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module may include a series of computer-executable instructions for the application issuing device, and the one or more programs configured to be executed by the one or more processors include computer-executable instructions for:
determining a specific function supported by a channel to be published corresponding to an application program;
acquiring a resource list file corresponding to an application program, and acquiring a specific code corresponding to a specific function and a public code required by an application installation package when the application installation package is released on each application release channel from a pre-split file corresponding to the application program; the pre-splitting file comprises public codes pre-split from program source codes corresponding to the application programs and specific codes corresponding to specific functions respectively supported by each application release channel;
constructing the specific code into a specific installation package file in an executable file format, and constructing the public code and the resource list file into a public installation package file in the executable file format;
combining the specific installation package file and the public installation package file to obtain an application installation package corresponding to the application program; and publishing the application installation package on a channel to be published.
By adopting the device of the embodiment of the application, the specific function supported by the channel to be published corresponding to the application program is determined, the resource list file corresponding to the application program is obtained, the specific code corresponding to the specific function which is pre-split is obtained, the public code required by the application installation package when the application installation package is published on each application publishing channel is obtained, the specific code is constructed into the specific installation package file in the executable file format, the public code and the resource list file are constructed into the public installation package file in the executable file format, so that the specific installation package file and the public installation package file are combined to obtain the application installation package corresponding to the application program, and the application installation package is published on the channel to be published. Compared with the traditional method for constructing the application installation package, the device is used for pre-dividing the program source code corresponding to the application program into the public code and the specific code, so that when the application installation package is published on the channel to be published, the public code and the specific code required by the channel to be published are only required to be constructed respectively and then combined according to the channel to be published, the complete application installation package can be published on each channel to be published, the publishing success rate of the application program is improved, repeated construction of the public code which consumes a long time in the construction process is not required, the construction time of the application installation package is greatly saved, and the publishing efficiency of the application program is improved. Moreover, only the specific installation package files in each application installation package issued on each channel to be issued are different, so that when an application program is abnormal, the examination of each file in each application installation package corresponding to the application program is not needed, only the public installation package files and the resource list files in one application installation package and each specific installation package file in each application installation package are examined, the number of the examined files is reduced, the abnormal condition can be rapidly examined, and the product maintenance cost is reduced.
The embodiment of the present application further provides a storage medium, where the storage medium stores one or more computer programs, where the one or more computer programs include instructions, and when the instructions are executed by an electronic device including multiple application programs, the electronic device can execute the processes of the application issuing method embodiment, and can achieve the same technical effects, and in order to avoid repetition, details are not described here again.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing the present application.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (10)

1. An application publishing method, comprising:
determining a specific function supported by a channel to be published corresponding to an application program;
acquiring a resource list file corresponding to the application program, and acquiring a specific code corresponding to the specific function and a public code required by the application installation package when the application installation package is released on each application release channel from a pre-split file corresponding to the application program; the pre-splitting file comprises the public codes pre-split from the program source codes corresponding to the application programs and specific codes corresponding to specific functions supported by each application release channel;
constructing the specific code into a specific installation package file in an executable file format, and constructing the public code and the resource list file into a public installation package file in the executable file format;
combining the specific installation package file and the public installation package file to obtain an application installation package corresponding to the application program; and publishing the application installation package on the channel to be published.
2. The method according to claim 1, wherein before obtaining the specific code corresponding to the specific function from the pre-split file corresponding to the application program and the common code required by the application installation package when the application installation package is published on each application publishing channel, the method further comprises:
acquiring the program source code corresponding to the application program;
splitting the program source code into the common code and each of the specific codes;
and storing the public codes and each specific code in an associated manner to obtain the pre-split file corresponding to the application program.
3. The method of claim 1, wherein the executable file format is a dex format;
the constructing the specific code into a specific installation package file in an executable file format, and the constructing the common code and the resource list file into a common installation package file in the executable file format includes:
combining the specific code and the resource list file to obtain a first combined file; constructing the first combined file into the specific installation package file in the dex format;
combining the public code and the resource list file to obtain a second combined file; and constructing the second combined file into the public installation package file in the dex format.
4. The method of claim 3, wherein the specific installation package file comprises a specific code file in the dex format corresponding to the specific code;
the merging the specific installation package file and the public installation package file to obtain the application installation package corresponding to the application program includes:
extracting the specific code file in the specific installation package file;
and adding the specific code file into the public installation package file to obtain the application installation package corresponding to the application program.
5. The method of claim 4, wherein the common installation package file comprises a common code file in the dex format corresponding to the common code;
after the extracting the specific code file in the specific installation package file, the method further includes:
if the first file name of the specific code file is the same as the second file name of the public code file, the first file name is modified into a third file name different from the second file name, so that the specific code file and the public code file are respectively identified by the channel to be published.
6. The method of claim 1, wherein before publishing the application installation package on the channel to be published, the method further comprises:
generating signature information corresponding to the application program and/or the channel to be published;
and signing the application installation package by utilizing the signature information so as to carry out security verification on the application installation package based on the signature when the application installation package is issued on the channel to be issued.
7. An application publication apparatus, comprising:
the determining module is used for determining the specific functions supported by the channel to be published corresponding to the application program;
the first acquisition module is used for acquiring the resource list file corresponding to the application program, and acquiring a specific code corresponding to the specific function and a public code required by the application installation package when the application installation package is released on each application release channel from the pre-split file corresponding to the application program; the pre-splitting file comprises the public codes pre-split from the program source codes corresponding to the application programs and specific codes corresponding to specific functions supported by each application release channel;
the construction module is used for constructing the specific code into a specific installation package file in an executable file format, and constructing the public code and the resource list file into a public installation package file in the executable file format;
the merging and publishing module is used for merging the specific installation package file and the public installation package file to obtain an application installation package corresponding to the application program; and publishing the application installation package on the channel to be published.
8. The apparatus of claim 7, further comprising:
the second obtaining module is used for obtaining the program source code corresponding to the application program;
the splitting module is used for splitting the program source code into the public code and each specific code;
and the storage module is used for storing the public codes and each specific code in an associated manner to obtain the pre-split file corresponding to the application program.
9. An application publishing device comprising a processor and a memory electrically connected to the processor, the memory storing a computer program, the processor being configured to invoke and execute the computer program from the memory to implement the application publishing method of any of claims 1-6.
10. A storage medium for storing a computer program for execution by a processor to implement the application publishing method of any one of claims 1-6.
CN202110723284.7A 2021-06-28 2021-06-28 Application publishing method and device Pending CN113377415A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110723284.7A CN113377415A (en) 2021-06-28 2021-06-28 Application publishing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110723284.7A CN113377415A (en) 2021-06-28 2021-06-28 Application publishing method and device

Publications (1)

Publication Number Publication Date
CN113377415A true CN113377415A (en) 2021-09-10

Family

ID=77579691

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110723284.7A Pending CN113377415A (en) 2021-06-28 2021-06-28 Application publishing method and device

Country Status (1)

Country Link
CN (1) CN113377415A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117573154A (en) * 2024-01-16 2024-02-20 麒麟软件有限公司 Method and device for optimizing desktop application installation package based on electronics on Linux system

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104217140A (en) * 2014-08-29 2014-12-17 北京奇虎科技有限公司 Method and device for reinforcing application program
WO2015192637A1 (en) * 2014-06-17 2015-12-23 北京奇虎科技有限公司 Method and apparatus for reinforced protection of software installation package
CN105867993A (en) * 2016-03-29 2016-08-17 乐视控股(北京)有限公司 Software product compiling method and device
CN105893008A (en) * 2015-11-16 2016-08-24 乐视网信息技术(北京)股份有限公司 Method and device for customizing multi-channel installation package
CN108415725A (en) * 2018-03-01 2018-08-17 深圳市创梦天地科技有限公司 Channel application packet producing device, method, electronic equipment and storage medium
CN109783138A (en) * 2018-12-05 2019-05-21 北京奇艺世纪科技有限公司 Method for splitting, device, terminal and the medium that application package is constituted
CN111078223A (en) * 2018-10-22 2020-04-28 腾讯科技(深圳)有限公司 Application program packaging method and device
CN112416353A (en) * 2020-08-10 2021-02-26 上海幻电信息科技有限公司 Channel package packaging method and device and computer equipment
CN112905170A (en) * 2021-03-09 2021-06-04 百果园技术(新加坡)有限公司 Channel package generation method, device, equipment and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015192637A1 (en) * 2014-06-17 2015-12-23 北京奇虎科技有限公司 Method and apparatus for reinforced protection of software installation package
CN104217140A (en) * 2014-08-29 2014-12-17 北京奇虎科技有限公司 Method and device for reinforcing application program
CN105893008A (en) * 2015-11-16 2016-08-24 乐视网信息技术(北京)股份有限公司 Method and device for customizing multi-channel installation package
CN105867993A (en) * 2016-03-29 2016-08-17 乐视控股(北京)有限公司 Software product compiling method and device
CN108415725A (en) * 2018-03-01 2018-08-17 深圳市创梦天地科技有限公司 Channel application packet producing device, method, electronic equipment and storage medium
CN111078223A (en) * 2018-10-22 2020-04-28 腾讯科技(深圳)有限公司 Application program packaging method and device
CN109783138A (en) * 2018-12-05 2019-05-21 北京奇艺世纪科技有限公司 Method for splitting, device, terminal and the medium that application package is constituted
CN112416353A (en) * 2020-08-10 2021-02-26 上海幻电信息科技有限公司 Channel package packaging method and device and computer equipment
CN112905170A (en) * 2021-03-09 2021-06-04 百果园技术(新加坡)有限公司 Channel package generation method, device, equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
赵厚宝 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117573154A (en) * 2024-01-16 2024-02-20 麒麟软件有限公司 Method and device for optimizing desktop application installation package based on electronics on Linux system
CN117573154B (en) * 2024-01-16 2024-04-12 麒麟软件有限公司 Method and device for optimizing desktop application installation package based on electronics on Linux system

Similar Documents

Publication Publication Date Title
CN110704061B (en) Running method and device for deploying and delivering payment pieces based on micro-services
CN108964968B (en) Service access management method and system in container cloud environment
CN109933404B (en) Encoding and decoding method and system based on block chain intelligent contract
CN109062582B (en) Encryption method and device for application installation package
CN111782338A (en) Data processing method and system based on intelligent contract of block chain
CN111399840B (en) Module development method and device
US20150363195A1 (en) Software package management
CN109542459A (en) Application program packaging method and device, computer installation and computer storage medium
CN112965761B (en) Data processing method, system, electronic equipment and storage medium
CN110046991B (en) Data processing method and system based on intelligent contract of block chain
KR20060047998A (en) Method and system for embedding context information in a document
CN113377415A (en) Application publishing method and device
CN111443944B (en) Program construction method, device and equipment
CN110795143B (en) Method, apparatus, computing device, and medium for processing functional modules
CN111090425B (en) Program packaging method and device and electronic equipment
CN112235132A (en) Method, device, medium and server for dynamically configuring service
CN113835748B (en) Packaging method, system and readable medium for application program based on HTML5
CN110941443A (en) Method and device for modifying file name in SDK and electronic equipment
JP2019501459A (en) Application program execution method and apparatus
US11640281B2 (en) Tool for introspection in object-oriented source code
CN114791884A (en) Test environment construction method and device, storage medium and electronic equipment
CN114579142A (en) Dual-mode big data version deployment method, device and equipment supporting steady state and sensitive state
CN111310175A (en) iOS application safety monitoring and protecting method and device based on plug-in
CN115827140B (en) Method, device, equipment and storage medium for generating visual large screen
CN109976728A (en) A kind of generation method of native applications program, device, mobile terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20210910