CN112988176A - Channel package generation method and device, storage medium and electronic equipment - Google Patents

Channel package generation method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN112988176A
CN112988176A CN202110407923.9A CN202110407923A CN112988176A CN 112988176 A CN112988176 A CN 112988176A CN 202110407923 A CN202110407923 A CN 202110407923A CN 112988176 A CN112988176 A CN 112988176A
Authority
CN
China
Prior art keywords
channel
target
package
directory
information
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
CN202110407923.9A
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202110407923.9A priority Critical patent/CN112988176A/en
Publication of CN112988176A publication Critical patent/CN112988176A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a channel package generation method and device, a storage medium and electronic equipment. Wherein, the method comprises the following steps: acquiring an installation package of a target application, wherein the installation package of the target application is a compressed file in a target compression format; searching a directory marking area of the installation package, wherein the information written in the directory marking area is allowed to be modified; and writing the channel information of the target channel into a directory marking area of the installation package to obtain a target channel package, wherein the target channel package is a channel package which is allowed to be released through the target channel. The invention solves the technical problem of long time consumption of the channel package packaging mode in the prior art.

Description

Channel package generation method and device, storage medium and electronic equipment
Technical Field
The invention relates to the field of computers, in particular to a channel package generation method and device, a storage medium and electronic equipment.
Background
Currently, a relatively common channel packaging mode is available on the market to directly rewrite Android Package (xml) files in an application Package (Android Package, APK for short). The construction of each channel package needs to modify the android manifest of the project, and then starts the construction, which is very troublesome and is prone to errors. In addition, each channel package is constructed independently, the project code and resource amount of a phantom Engine (UE for short) are large, the whole construction process of one package needs more than 1 hour, and when many channel packages exist, the time is very long.
Therefore, the channel package packaging mode in the prior art has the problem of long time consumption, and an effective solution does not exist at present.
Disclosure of Invention
The embodiment of the invention provides a channel package generation method and device, a storage medium and electronic equipment, and at least solves the technical problem that a channel package packaging mode in the prior art is long in time consumption.
According to an aspect of an embodiment of the present invention, there is provided a channel package generation method, including: acquiring an installation package of a target application, wherein the installation package of the target application is a compressed file in a target compression format; searching a directory tag area of the installation package, wherein the information written in the directory tag area is allowed to be modified; and writing channel information of a target channel into the directory marking area of the installation package to obtain a target channel package, wherein the target channel package is a channel package which is allowed to be published through the target channel.
Optionally, the writing the channel information of the target channel into the directory marking area of the installation package to obtain the target channel package includes: acquiring channel information of the target channel from a preset channel information set, wherein the preset channel information set comprises channel information of at least 1 channel, and the at least 1 channel is used for publishing a channel package formed by the installation package; and writing the channel information of the target channel into a first target field in the directory marking area to obtain the target channel packet.
Optionally, the writing the channel information of the target channel into the first target field in the directory marking area to obtain the target channel packet includes: setting a value of a second target field in the directory marking area as a target value, wherein the value of the second target field is used for representing the maximum character length allowed to be written in the first target field, and the maximum character length represented by the target value is larger than or equal to the character length occupied by the channel information of the target channel; and writing the channel information of the target channel into the first target field to obtain the target channel packet.
Optionally, the setting the value of the second target field in the directory flag area to a target value includes: determining the character length occupied by the channel information of the target channel; and setting the value of the second target field in the directory marking area as the target value according to the occupied character length.
Optionally, the writing the channel information of the target channel into the first target field in the directory marking area to obtain the target channel packet includes: and writing the channel information of the target channel into an annotation field in a central directory end marking area to obtain the target channel package, wherein the installation package is an Apk file, the Apk file is a compressed file in a Zip format, the directory marking area is the central directory end marking area in the Apk file, and the first target field is the annotation field.
Optionally, the method further comprises: acquiring signature information of the installation package, wherein the signature information is obtained by signing information except the directory mark area in the installation package; and associating the signature information with the target channel package, wherein the signature information is used for verifying the information in the target channel package except the catalog marking area.
Optionally, the obtaining an installation package of a target application, searching a directory tag area of the installation package, writing channel information of a target channel into the directory tag area of the installation package, and obtaining the target channel package includes: repeating the following steps for N times, wherein N is 1 or a natural number which is more than or equal to 2: copying the basic installation package of the target application to obtain the installation package; searching the directory label area of the installation package; and writing the channel information of the current channel into the directory marking area of the installation package to obtain a current channel package, wherein the current channel package is a channel package which is allowed to be published through the current channel.
Optionally, the writing the channel information of the current channel into the directory marking area of the installation package to obtain the current channel package includes: acquiring channel information of the current channel from a preset channel information set; setting a value of a second target field in the catalog marking area as a target value, wherein the value of the second target field is used for representing the maximum character length allowed to be written in the first target field in the catalog marking area, and the maximum character length represented by the target value is greater than or equal to the character length occupied by the channel information of the current channel; and writing the channel information of the current channel into the first target field to obtain the current channel packet.
Optionally, the repeatedly performing the following steps N times includes: and running a preset target script to repeatedly execute the step N times.
According to another aspect of the embodiments of the present invention, there is also provided a channel package generating apparatus, including: the device comprises an acquisition module, a storage module and a processing module, wherein the acquisition module is used for acquiring an installation package of a target application, and the installation package of the target application is a compressed file in a target compression format; the searching module is used for searching a directory marking area of the installation package, wherein the information written in the directory marking area is allowed to be modified; and the writing module is used for writing the channel information of the target channel into the directory marking area of the installation package to obtain a target channel package, wherein the target channel package is a channel package which is allowed to be released through the target channel.
According to still another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium having a computer program stored therein, wherein the computer program is configured to execute the channel package generation method when running.
According to still another aspect of the embodiments of the present invention, there is also provided an electronic device, including a memory and a processor, where the memory stores therein a computer program, and the processor is configured to execute the channel package generation method through the computer program.
In the embodiment of the invention, channel information is written into a directory tag area of an installation package, and the installation package of the target application is obtained and is a compressed file in a target compression format; searching a directory marking area of the installation package, wherein the information written in the directory marking area is allowed to be modified; and writing the channel information of the target channel into a directory marking area of the installation package to obtain that the target channel package is a channel package which can be released through the target channel. The purpose of automatically generating the channel package is achieved, the technical effects of reducing time consumption for generating the channel package and improving the generation efficiency of the channel package are achieved, and the technical problem that time consumption is long in a channel package packaging mode in the prior art is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a schematic diagram of an application environment of an alternative channel package generation method according to an embodiment of the present invention;
FIG. 2 is a flow chart of an alternative channel package generation method according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of an alternative publication platform according to an embodiment of the invention;
FIG. 4 is a first system block diagram of an alternative channel package generation method according to an embodiment of the present invention;
FIG. 5 is a system block diagram II of an alternative channel package generation method according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of an alternative Central end of directory marker area (EOCD) structure according to an embodiment of the present invention;
FIG. 7 is a system operation diagram of an alternative channel package generation method according to an embodiment of the present invention;
FIG. 8 is an alternative information interaction diagram according to an embodiment of the invention;
FIG. 9 is an alternative channel publishing holistic framework diagram according to an embodiment of the invention;
fig. 10 is a schematic structural diagram of an alternative channel package generation apparatus according to an embodiment of the present invention;
fig. 11 is a schematic structural diagram of an alternative electronic device according to an embodiment of the invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, 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 invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to an aspect of the embodiments of the present invention, a method for generating a channel package is provided, and optionally, as an optional implementation manner, the method for writing channel information may be applied, but not limited to, in a hardware environment formed by the server 102 and the terminal device 104 as shown in fig. 1. As shown in fig. 1, server 102 is connected to terminal device 104 via a network, which may include, but is not limited to: a wired network, a wireless network, wherein the wired network comprises: a local area network, a metropolitan area network, and a wide area network, the wireless network comprising: bluetooth, WIFI, and other networks that enable wireless communication. The terminal device may include, but is not limited to, at least one of: mobile phones (such as Android phones, iOS phones, etc.), notebook computers, tablet computers, palm computers, MID (Mobile Internet Devices), PAD, desktop computers, smart televisions, etc. The server may be a single server, a server cluster composed of a plurality of servers, or a cloud server. The above is merely an example, and this is not limited in this embodiment.
Optionally, as an optional implementation manner, as shown in fig. 2, the method for generating a channel package includes:
step S202, obtaining an installation package of a target application, wherein the installation package of the target application is a compressed file in a target compression format;
an application installation Package (Android Package, APK for short) is a compressed set of all files, and after the files are decompressed and installed in a terminal, an application can be run. The compressed file may be in a zip compressed format.
Step S204, searching a directory marking area of the installation package, wherein the information written in the directory marking area is allowed to be modified;
wherein the directory flag area may be a central directory end flag area. Since the directory flag area is not signed and the modification of the contents of the directory flag area does not destroy the compressed file itself, the contents recorded in the directory flag area are allowed to be modified.
Step S206, writing the channel information of the target channel into the directory marking area of the installation package to obtain a target channel package, wherein the target channel package is a channel package which is allowed to be released through the target channel.
The channel can be a publisher of the application program, and the user can download and install the specified application program installation package through a publishing platform of the channel publisher.
Through the steps, channel information is written into a directory marking area of an installation package, and the installation package of the target application is obtained and is a compressed file in a target compression format; searching a directory marking area of the installation package, wherein the information written in the directory marking area is allowed to be modified; and writing the channel information of the target channel into a directory marking area of the installation package to obtain that the target channel package is a channel package which can be released through the target channel. The purpose of automatically generating the channel package is achieved, the technical effects of reducing time consumption for generating the channel package and improving the generation efficiency of the channel package are achieved, and the technical problem that time consumption is long in a channel package packaging mode in the prior art is solved.
As an alternative embodiment, the application installation package is a compressed collection of files, and after the application installation package is decompressed to the terminal, the application can be run on the terminal. A user may download different application installation packages in the publishing platform, as shown in fig. 3, which is a schematic diagram of the publishing platform according to an alternative embodiment of the present invention, the user downloads the installation packages of the application in the publishing platform, the installation packages may be downloaded to a local area of the user terminal, and the user terminal may install the corresponding application after decompressing the installation packages. At present, a plurality of application program publishing platforms exist, different publishing platforms correspond to different publishers, channel information of the publishers needs to be carried in an application program installation package in the publishing platform, and the application program installation package carrying the channel information can be called a channel package.
As an optional implementation manner, as shown in fig. 4, a system block diagram of a channel package generating method according to an optional embodiment of the present invention is shown, wherein the application installation package APK may be a basic package, different channel information may be recorded in a channel information recording table, for example, channel information-1, channel information-2, etc. in the drawing, the different channel information corresponds to different channels, for example, channel information-1 corresponds to channel 1, and channel information-2 corresponds to channel 2. The channel package generating system can be a system operated on a computer terminal, the channel package generating system can acquire channel information in a channel information recording table, the acquired channel information is written into the basic package APK to generate a corresponding channel package, and the generated channel package can be published on a publishing platform of a corresponding channel. For example, the channel package generation system acquires channel information-1 in a channel information record table, writes the channel information-1 into a basic package APK to obtain a channel package APK-1, and the channel package APK-1 is published in a publishing platform APP Store-1. In this embodiment, the channel package generation system may automatically write the channel information in the channel information record table into the basic package APK, so as to obtain different channel packages. The time consumption for generating the channel package is reduced, and the generation efficiency of the channel package is improved.
As an optional implementation, the target compression format may be a Zip format, the application function package Apk is actually a Zip compressed file, and the directory marker area is a component of the application program package, and may write the channel information into the component of the application program package. The Zip compressed file composition comprises: (1) a data area: all data of the compressed file are recorded; (2) central directory area: recording directory information of the compressed file; (3) central end of directory marker area (EOCD): the central directory size, offset, Zip annotation information, etc. are recorded. The directory flag area may be a central directory end flag area.
Optionally, the writing the channel information of the target channel into the directory marking area of the installation package to obtain the target channel package includes: acquiring channel information of the target channel from a preset channel information set, wherein the preset channel information set comprises channel information of at least 1 channel, and the at least 1 channel is used for publishing a channel package formed by the installation package; and writing the channel information of the target channel into a first target field in the directory marking area to obtain the target channel packet.
As an alternative embodiment, the preset channel information set may be a set of some or all of the channel information recorded in the channel information recording table shown in fig. 4. The channel package generation system may acquire a plurality of channel information in the channel information record table, and write the acquired plurality of channel information in the basic package APK. Specifically, as shown in fig. 5, which is a system block diagram of a channel package generating method according to an alternative embodiment of the present invention, the channel package generating system may copy the basic package APK, and if there are N channel information, copy the N basic package APK, and write the N channel information into the N basic packages, respectively, to obtain N channel packages.
As an alternative implementation, fig. 6 is a schematic diagram illustrating a structure of a central end of directory mark (EOCD) according to an alternative embodiment of the present invention, where the first target field may be a Comment portion of the central end of directory mark, and the channel information may be written into the Comment portion of the EOCD.
As an optional implementation, fig. 7 is a system operation diagram illustrating a channel package generation method according to an optional embodiment of the present invention, in which a base package and channel information may be selected in the system interface, and different applications correspond to different base packages, for example, the base package of application a is base package APK-a, and the base package of application B is base package APK-B. The user may select a base package in the interface, for example, base package APK-B of base package application B. After selecting the basic package, the user may select channel information to be added, where different channel information corresponds to different publishing channels, for example, the publishing channel corresponding to the channel information-1 is APP Store1, and "All" in the figure may be used to indicate total selection, that is, to select All channel information in the system. The user can also select part of the channel information, such as the drawing to select the channel information-1 and the channel information-2, or select the channel information-1 and the channel information-2. After the basic package and the channel information are selected, the channel information can be written into an EOCD area of the basic package by clicking the 'channel generation package' to generate a corresponding channel package. Suppose that APK-B is selected, and after channel information 1 and channel information 2 are selected, channel packages APK-B-1 and APK-B-2 are generated, wherein the channel package APK-B-1 is published on a platform of the channel 1, the APK-B-2 is published on a platform of the channel 2, and installation packages of the application program B can be downloaded on the platform of the channel 1 and the platform of the channel 2. In the embodiment, different channel packages can be generated by one key through the channel package generating system, so that the generating time of the channel packages is saved, and the generating efficiency of the channel packages is improved.
As an alternative implementation, as shown in fig. 8, an information interaction schematic diagram according to an alternative embodiment of the present invention is shown, where a system of a channel package generation method includes a client and a server, a script file of the system of the channel package generation method runs in the server, and a memory in the server is used for storing an application installation package APK and a channel information record table. The user can send a channel package generation request through the client, and the server provides an application program installation package list to the client after receiving the request, wherein the application program installation package list comprises different application program installation packages, the different application program installation packages refer to installation packages corresponding to different application programs, for example, the application program installation package list comprises APK-A and APK-B, wherein the APK-A is a basic package of the application program A, and the APK-B is a basic package of the application program B. The server also provides the client with a channel information record table in which different channel information is recorded, the different channel information corresponding to different distribution channels, for example, the distribution channel corresponding to the channel information-1 is channel 1, and the distribution channel corresponding to the channel information-2 is channel 2. The user can select the application installation package from the application installation package list and select the channel information from the channel information recording list. Suppose that the user selects APK-B in the application installation package list, and selects channel information-1 and channel information-2 in the channel information recording table. The server receives APK-B, channel information-1 and channel information-2 selected by the user. The server copies the APK-B into two basic packages APK-B, and adds the channel information-1 and the channel information-2 into the two basic packages APK-B respectively to obtain channel packages APK-B-1 and APK-B-2. The server sends the channel package to the corresponding publishing platform, so that the corresponding publishing platform publishes the corresponding channel package, for example, the channel package APK-B-1 is published on the publishing platform 1, and the channel package APK-B-2 is published on the publishing platform 2. In the embodiment, the user can select the basic package and the channel information at the client, the server can generate the channel package according to the basic package and the channel information selected by the user, and the method and the system can automatically generate multiple different channel packages at the same time, so that the problems that in the prior art, each channel package needs to be independently constructed, the operation is complex and time is consumed are solved, and the generation efficiency of the channel package is improved.
Optionally, the writing the channel information of the target channel into the first target field in the directory marking area to obtain the target channel packet includes: setting a value of a second target field in the directory marking area as a target value, wherein the value of the second target field is used for representing the maximum character length allowed to be written in the first target field, and the maximum character length represented by the target value is larger than or equal to the character length occupied by the channel information of the target channel; and writing the channel information of the target channel into the first target field to obtain the target channel packet.
As an alternative embodiment, the second target field may be a Commment length field in the Central end of directory (EOCD) structure, which is used to indicate the maximum length of characters in the Commment that are allowed to be written. The maximum length of characters allowed to be written in the Comment field is changed by changing the value of n in the Comment length (n). The initial value of the n value in the Comment length (n) may be 0, which indicates that no character is allowed to be written in the Comment field. The Comment length (10) indicates that the maximum length of characters allowed to be written in the Comment field is 10 characters. The Comment field can write characters within 10 characters at this time, for example, 9 characters, 8 characters, 1 character, and the like can be written. In this embodiment, the value of the second target field may be modified according to a character length included in the channel information of the target channel. The value of the second target field is greater than or equal to the character length contained in the channel information. For example, the channel information is abc and includes 3 characters, and the value of n in the Comment length (n) may be set to any value greater than or equal to 3, for example, 4, 5, or the like. After setting the value of n in the second field Comment length (n) is completed, the channel information abc may be written in the Comment field. In this embodiment, the channel package is obtained by modifying the value of n in the Comment length (n) and writing the channel information into the Comment field. The method and the device can avoid the time-consuming problem caused by adding the channel information in the channel package constructing process, and can achieve the effects of saving time and improving the channel package generating efficiency by writing the channel information into the Comment field of the EOCD area of the installation package.
Optionally, the setting the value of the second target field in the directory flag area to a target value includes: determining the character length occupied by the channel information of the target channel; and setting the value of the second target field in the directory marking area as the target value according to the occupied character length.
As an optional implementation manner, a value of the second target field may be modified according to the character length of the channel information, where the value of the second target field is greater than or equal to the character length of the channel information. Assuming that the channel information is cdei6_ h, it can be determined that the length of the character occupied by the channel information is 7 characters, and the value of the second target field can be set to any value greater than or equal to 7, for example, the value of n in the Comment length (n) can be set to 10, and at this time, the second target field is Comment length (10). The value of the second target field is used for representing the maximum character length allowed to be written in the first target field, and the channel information can be written in the first target field by setting the value of the second target field according to the character length of the channel information. In this embodiment, by writing the channel information into the Comment field of the central directory end flag (EOCD) of the installation package, different channel packages only need to write the corresponding channel information into the basic package APK, and do not need to construct channel packages separately, which avoids the time-consuming problem that each channel package needs to be constructed separately, saves the construction time of the channel package, and improves the generation efficiency of the channel package.
Optionally, the writing the channel information of the target channel into the first target field in the directory marking area to obtain the target channel packet includes: and writing the channel information of the target channel into an annotation field in a central directory end marking area to obtain the target channel package, wherein the installation package is an Apk file, the Apk file is a compressed file in a Zip format, the directory marking area is the central directory end marking area in the Apk file, and the first target field is the annotation field.
As an alternative, the installation package is an Apk file, which is actually a Zip compressed file, and the Apk file includes a central end of directory marker area (EOCD) in which the central directory size, offset, Zip annotation information, and the like are recorded. The channel information may be written in a Comment field in a central end of directory marker area (EOCD), which may be a Comment field. Since the EOCD part is not verified, the channel information can be written in the Comment part of the EOCD. In the embodiment, since the EOCD part is not verified, the channel information is written without modifying the signature information of the Apk file, and the security of the Apk file is improved on the basis of saving the channel packet generation time.
Optionally, the method further comprises: acquiring signature information of the installation package, wherein the signature information is obtained by signing information except the directory mark area in the installation package; and associating the signature information with the target channel package, wherein the signature information is used for verifying the information in the target channel package except the catalog marking area.
As an alternative embodiment, each application running on the system platform of the terminal must have a signature of the developer, for example, each application running on the Android platform must have an Android signature of the developer. Since the EOCD portion of the installation package is not verified when the installation package is signed, the channel information can be written to the Comment portion of the EOCD. In this embodiment, since the signature information of the installation package is to verify the information outside the directory marker area, and the EOCD part is not to be verified, the channel information is written into the EOCD area without modifying the signature information of the installation package, thereby avoiding the security problem caused by re-signing. The technical effect of ensuring the safety of the channel package is achieved.
Optionally, the obtaining an installation package of a target application, searching a directory tag area of the installation package, writing channel information of a target channel into the directory tag area of the installation package, and obtaining the target channel package includes: repeating the following steps for N times, wherein N is 1 or a natural number which is more than or equal to 2: copying the basic installation package of the target application to obtain the installation package; searching the directory label area of the installation package; and writing the channel information of the current channel into the directory marking area of the installation package to obtain a current channel package, wherein the current channel package is a channel package which is allowed to be published through the current channel.
As an optional implementation manner, in this embodiment, N channel packages may be generated simultaneously, and the value of N may be determined according to an actual situation, and may be, for example, 1, 2, 10, 100, and the like. Specifically, a basic installation package can be constructed, the basic installation package is a compressed package of an application installation file, the basic installation package can be copied into N parts, N different channel information is written into a central directory end mark (EOCD) area of the N basic installation packages, and then the N channel packages can be published on a publishing platform of a corresponding channel. Supposing that three channel information including channel information abc, 123 and rao9-1 exist, the three channel information respectively correspond to A, B, C different channel providers, the basic installation package APK can be copied into three parts, and the abc, 123 and rao9-1 are respectively written into the three basic installation packages APK, so that a channel package a, a channel package B and a channel package C corresponding to A, B, C different channel providers can be obtained, wherein the channel package a includes the channel information abc, the channel package B includes the channel information 123, and the channel package C includes the channel information rao 9-1. The channel package A, the channel package B and the channel package C can be published to A, B, C publishing platforms corresponding to three different channels. In the embodiment, by copying the basic installation package and respectively writing different channel information into the basic installation package, a plurality of channel packages containing different channel information can be generated simultaneously, and the generation efficiency of the channel packages is improved.
Optionally, the writing the channel information of the current channel into the directory marking area of the installation package to obtain the current channel package includes: acquiring channel information of the current channel from a preset channel information set; setting a value of a second target field in the catalog marking area as a target value, wherein the value of the second target field is used for representing the maximum character length allowed to be written in the first target field in the catalog marking area, and the maximum character length represented by the target value is greater than or equal to the character length occupied by the channel information of the current channel; and writing the channel information of the current channel into the first target field to obtain the current channel packet.
As an optional implementation, the generation of the channel package may include the following steps:
in step S31, channel information is obtained from a preset channel information set, where the preset channel information set may be a set formed by a plurality of channel information recorded in a channel information recording table, such as channel information-1, channel information-2, and the like. The channel information may be sequentially acquired in a preset channel information set, for example, the channel information-1 and the channel information-2 may be sequentially acquired, respectively.
Step S32, setting the value of n in the Comment length (n) field in the central directory end marker area (EOCD). Specifically, the value of n may be set according to the number of characters included in the channel information. The value of n is greater than or equal to the number of characters contained in the channel information, for example, 3 characters are contained in the channel information, and the value of n in the Comment length (n) may be set to a numerical value greater than or equal to 3.
Step S33, writing the channel information into the Comment field of the central directory end mark area (EOCD) to obtain the channel package.
Optionally, the repeatedly performing the following steps N times includes: and running a preset target script to repeatedly execute the step N times.
In this embodiment, the generation process of the channel package may be implemented by a script, and the script file may be run once to generate N channel packages at the same time. In this embodiment, the script file may be automatically executed, and N different channel packages may be simultaneously generated by automatically executing the script file once, so that the generation efficiency of the channel packages is improved.
As an optional implementation, as shown in fig. 9, which is an overall framework diagram of channel publishing optionally implemented according to the present invention, all channel packages may be constructed and generated using a construction system, and the generated channel packages may be saved to a cloud storage. Channel packages to be distributed are determined and synchronized to the cloud disk server. The channel operator can download and obtain the appointed channel package on the cloud disk server according to the requirement and release the appointed channel package to the own operation platform. The one-key publishing process greatly simplifies the channel publishing process, and channel operators can conveniently and quickly acquire the appointed channel packages. According to the method and the device, the package outlet time is shortened, the safety of the channel package is improved, meanwhile, the channel package is automatically generated, and the channel package generation efficiency is improved.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
According to another aspect of the embodiment of the present invention, there is also provided a channel package generation apparatus for implementing the channel package generation method. As shown in fig. 10, the apparatus includes: an obtaining module 1002, configured to obtain an installation package of a target application, where the installation package of the target application is a compressed file in a target compression format; a searching module 1004, configured to search a directory flag area of the installation package, where information written in the directory flag area is allowed to be modified; a writing module 1006, configured to write channel information of a target channel into the directory tag area of the installation package, so as to obtain a target channel package, where the target channel package is a channel package that is allowed to be published through the target channel.
Optionally, the apparatus is further configured to write channel information of the target channel into the directory tag area of the installation package to obtain the target channel package in the following manner: acquiring channel information of the target channel from a preset channel information set, wherein the preset channel information set comprises channel information of at least 1 channel, and the at least 1 channel is used for publishing a channel package formed by the installation package; and writing the channel information of the target channel into a first target field in the directory marking area to obtain the target channel packet.
Optionally, the apparatus is further configured to write the channel information of the target channel into the first target field in the directory mark area to obtain the target channel packet, in the following manner: setting a value of a second target field in the directory marking area as a target value, wherein the value of the second target field is used for representing the maximum character length allowed to be written in the first target field, and the maximum character length represented by the target value is larger than or equal to the character length occupied by the channel information of the target channel; and writing the channel information of the target channel into the first target field to obtain the target channel packet.
Optionally, the apparatus is further configured to set the value of the second target field in the directory flag area to a target value by: determining the character length occupied by the channel information of the target channel; and setting the value of the second target field in the directory marking area as the target value according to the occupied character length.
Optionally, the apparatus is further configured to write the channel information of the target channel into the first target field in the directory mark area to obtain the target channel packet, in the following manner: and writing the channel information of the target channel into an annotation field in a central directory end marking area to obtain the target channel package, wherein the installation package is an Apk file, the Apk file is a compressed file in a Zip format, the directory marking area is the central directory end marking area in the Apk file, and the first target field is the annotation field.
Optionally, the apparatus is further configured to obtain signature information of the installation package, where the signature information is obtained by signing information in the installation package except for the directory marker area; and associating the signature information with the target channel package, wherein the signature information is used for verifying the information in the target channel package except the catalog marking area.
Optionally, the apparatus is further configured to obtain the installation package of the target application, search for a directory tag area of the installation package, and write channel information of the target channel into the directory tag area of the installation package to obtain the target channel package: repeating the following steps for N times, wherein N is 1 or a natural number which is more than or equal to 2: copying the basic installation package of the target application to obtain the installation package; searching the directory label area of the installation package; and writing the channel information of the current channel into the directory marking area of the installation package to obtain a current channel package, wherein the current channel package is a channel package which is allowed to be published through the current channel.
Optionally, the apparatus is further configured to write the channel information of the current channel into the directory tag area of the installation package to obtain the current channel package in the following manner: acquiring channel information of the current channel from a preset channel information set; setting a value of a second target field in the catalog marking area as a target value, wherein the value of the second target field is used for representing the maximum character length allowed to be written in the first target field in the catalog marking area, and the maximum character length represented by the target value is greater than or equal to the character length occupied by the channel information of the current channel; and writing the channel information of the current channel into the first target field to obtain the current channel packet.
Optionally, the apparatus is further configured to repeatedly perform the following steps N times by: and running a preset target script to repeatedly execute the step N times.
According to another aspect of the embodiment of the present invention, there is also provided an electronic device for implementing the method for generating a channel package, where the electronic device may be a terminal device or a server shown in fig. 1. The present embodiment takes the electronic device as a server as an example for explanation. As shown in fig. 11, the electronic device comprises a memory 1102 and a processor 1104, wherein the memory 1102 stores a computer program and the processor 1104 is arranged to execute the steps of any of the above method embodiments by means of the computer program.
Optionally, in this embodiment, the electronic device may be located in at least one network device of a plurality of network devices of a computer network.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, acquiring an installation package of the target application, wherein the installation package of the target application is a compressed file in a target compression format;
s2, searching a directory tag area of the installation package, wherein the information written in the directory tag area is allowed to be modified;
s3, writing the channel information of the target channel into the directory label area of the installation package to obtain a target channel package, wherein the target channel package is a channel package which is allowed to be released through the target channel.
Alternatively, it can be understood by those skilled in the art that the structure shown in fig. 11 is only an illustration, and the electronic device may also be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palmtop computer, a Mobile Internet Device (MID), a PAD, and the like. Fig. 11 is a diagram illustrating a structure of the electronic device. For example, the electronics may also include more or fewer components (e.g., network interfaces, etc.) than shown in FIG. 11, or have a different configuration than shown in FIG. 11.
The memory 1102 may be configured to store software programs and modules, such as program instructions/modules corresponding to the method and apparatus for generating a channel package in the embodiment of the present invention, and the processor 1104 executes various functional applications and data processing by running the software programs and modules stored in the memory 1102, that is, implements the method for generating a channel package. The memory 1102 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 1102 can further include memory located remotely from the processor 1104 and such remote memory can be coupled to the terminal via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof. The memory 1102 may be specifically, but not limited to, used for storing information such as sample characteristics of the item and the target virtual resource account number. As an example, as shown in fig. 11, the memory 1102 may include, but is not limited to, an obtaining module 1002, a searching module 1004, and a writing module 1006 in the channel package generating device. In addition, the channel package generation device may further include, but is not limited to, other module units in the channel package generation device, which is not described in detail in this example.
Optionally, the transmitting device 1106 is used for receiving or transmitting data via a network. Examples of the network may include a wired network and a wireless network. In one example, the transmission device 1106 includes a Network adapter (NIC) that can be connected to a router via a Network cable to communicate with the internet or a local area Network. In one example, the transmission device 1106 is a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
In addition, the electronic device further includes: a display 1108 for displaying the information of the order to be processed; and a connection bus 1110 for connecting the respective module components in the above-described electronic apparatus.
In other embodiments, the terminal device or the server may be a node in a distributed system, where the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting a plurality of nodes through a network communication. Nodes can form a Peer-To-Peer (P2P, Peer To Peer) network, and any type of computing device, such as a server, a terminal, and other electronic devices, can become a node in the blockchain system by joining the Peer-To-Peer network.
According to an aspect of the application, a computer program product or computer program is provided, comprising computer instructions, the computer instructions being stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the method provided in the various alternative implementations described above. Wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
Alternatively, in the present embodiment, the above-mentioned computer-readable storage medium may be configured to store a computer program for executing the steps of:
s1, acquiring an installation package of the target application, wherein the installation package of the target application is a compressed file in a target compression format;
s2, searching a directory tag area of the installation package, wherein the information written in the directory tag area is allowed to be modified;
s3, writing the channel information of the target channel into the directory label area of the installation package to obtain a target channel package, wherein the target channel package is a channel package which is allowed to be released through the target channel.
Alternatively, in this embodiment, a person skilled in the art may understand that all or part of the steps in the methods of the foregoing embodiments may be implemented by a program instructing hardware associated with the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
The integrated unit in the above embodiments, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in the above computer-readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing one or more computer devices (which may be personal computers, servers, network devices, etc.) to execute all or part of the steps of the method according to the embodiments of the present invention.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (12)

1. A channel package generation method is characterized by comprising the following steps:
acquiring an installation package of a target application, wherein the installation package of the target application is a compressed file in a target compression format;
searching a directory tag area of the installation package, wherein the information written in the directory tag area is allowed to be modified;
and writing channel information of a target channel into the directory marking area of the installation package to obtain a target channel package, wherein the target channel package is a channel package which is allowed to be published through the target channel.
2. The method as claimed in claim 1, wherein said writing channel information of the target channel into said directory tag area of said installation package to obtain the target channel package comprises:
acquiring channel information of the target channel from a preset channel information set, wherein the preset channel information set comprises channel information of at least 1 channel, and the at least 1 channel is used for publishing a channel package formed by the installation package;
and writing the channel information of the target channel into a first target field in the directory marking area to obtain the target channel packet.
3. The method as claimed in claim 2, wherein said writing the channel information of the target channel into the first target field in the directory tag area to obtain the target channel packet comprises:
setting a value of a second target field in the directory marking area as a target value, wherein the value of the second target field is used for representing the maximum character length allowed to be written in the first target field, and the maximum character length represented by the target value is larger than or equal to the character length occupied by the channel information of the target channel;
and writing the channel information of the target channel into the first target field to obtain the target channel packet.
4. The method of claim 3, wherein setting the value of the second target field in the directory marker area to a target value comprises:
determining the character length occupied by the channel information of the target channel;
and setting the value of the second target field in the directory marking area as the target value according to the occupied character length.
5. The method as claimed in claim 2, wherein said writing the channel information of the target channel into the first target field in the directory tag area to obtain the target channel packet comprises:
and writing the channel information of the target channel into an annotation field in a central directory end marking area to obtain the target channel package, wherein the installation package is an Apk file, the Apk file is a compressed file in a Zip format, the directory marking area is the central directory end marking area in the Apk file, and the first target field is the annotation field.
6. The method of claim 1, further comprising:
acquiring signature information of the installation package, wherein the signature information is obtained by signing information except the directory mark area in the installation package;
and associating the signature information with the target channel package, wherein the signature information is used for verifying the information in the target channel package except the catalog marking area.
7. The method of claim 1, wherein the obtaining an installation package of a target application, searching a directory tag area of the installation package, and writing channel information of a target channel into the directory tag area of the installation package to obtain a target channel package comprises:
repeating the following steps for N times, wherein N is 1 or a natural number which is more than or equal to 2:
copying the basic installation package of the target application to obtain the installation package;
searching the directory label area of the installation package;
and writing the channel information of the current channel into the directory marking area of the installation package to obtain a current channel package, wherein the current channel package is a channel package which is allowed to be published through the current channel.
8. The method as claimed in claim 7, wherein said writing channel information of the current channel into said directory tag area of said installation package to obtain a current channel package comprises:
acquiring channel information of the current channel from a preset channel information set;
setting a value of a second target field in the catalog marking area as a target value, wherein the value of the second target field is used for representing the maximum character length allowed to be written in the first target field in the catalog marking area, and the maximum character length represented by the target value is greater than or equal to the character length occupied by the channel information of the current channel;
and writing the channel information of the current channel into the first target field to obtain the current channel packet.
9. The method of claim 7, wherein the repeating the following steps N times comprises:
and running a preset target script to repeatedly execute the step N times.
10. An apparatus for generating a channel package, comprising:
the device comprises an acquisition module, a storage module and a processing module, wherein the acquisition module is used for acquiring an installation package of a target application, and the installation package of the target application is a compressed file in a target compression format;
the searching module is used for searching a directory marking area of the installation package, wherein the information written in the directory marking area is allowed to be modified;
and the writing module is used for writing the channel information of the target channel into the directory marking area of the installation package to obtain a target channel package, wherein the target channel package is a channel package which is allowed to be released through the target channel.
11. A computer-readable storage medium comprising a stored program, wherein the program when executed performs the method of any of claims 1 to 9.
12. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method of any of claims 1 to 9 by means of the computer program.
CN202110407923.9A 2021-04-15 2021-04-15 Channel package generation method and device, storage medium and electronic equipment Pending CN112988176A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110407923.9A CN112988176A (en) 2021-04-15 2021-04-15 Channel package generation method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110407923.9A CN112988176A (en) 2021-04-15 2021-04-15 Channel package generation method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN112988176A true CN112988176A (en) 2021-06-18

Family

ID=76340713

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110407923.9A Pending CN112988176A (en) 2021-04-15 2021-04-15 Channel package generation method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN112988176A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115801769A (en) * 2023-01-06 2023-03-14 广州简悦信息科技有限公司 Channel package obtaining method, electronic device and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110362337A (en) * 2019-07-12 2019-10-22 腾讯科技(北京)有限公司 Version dissemination method, device, equipment and the storage medium of application program
CN111459511A (en) * 2020-03-31 2020-07-28 北京百度网讯科技有限公司 Application program downloading method and device and electronic equipment
CN112416353A (en) * 2020-08-10 2021-02-26 上海幻电信息科技有限公司 Channel package packaging method and device and computer equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110362337A (en) * 2019-07-12 2019-10-22 腾讯科技(北京)有限公司 Version dissemination method, device, equipment and the storage medium of application program
CN111459511A (en) * 2020-03-31 2020-07-28 北京百度网讯科技有限公司 Application program downloading method and device and electronic equipment
CN112416353A (en) * 2020-08-10 2021-02-26 上海幻电信息科技有限公司 Channel package packaging method and device and computer equipment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
YANYONGSHAN: "VasDolly实现原理", 《HTTP://GITHUB.COM/TENCENT/WIKI/VASDOLLY实现原理》, pages 6 - 8 *
第七个佩恩: "VasDolly多渠道打包", 《HTTPS://WWW.JIANSHU.COM/P/98432557406E》, pages 2 - 4 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115801769A (en) * 2023-01-06 2023-03-14 广州简悦信息科技有限公司 Channel package obtaining method, electronic device and storage medium
CN115801769B (en) * 2023-01-06 2023-05-05 广州简悦信息科技有限公司 Channel package acquisition method, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN106843828B (en) Interface display and loading method and device
CN111176976B (en) Test data generation method and device, storage medium and electronic device
CN108769165B (en) Data processing method in Internet of things and Internet of things access system
CN106406846B (en) Display interface creating method and device
TWI493465B (en) Method and system for distributed application stack deployment
CN111831548A (en) Method and device for drawing dependency relationship topological graph
CN110019081A (en) Data persistence processing method, device, system and readable storage medium storing program for executing
CN104754062B (en) Information popularization method, server and user terminal based on internet
CN106598673B (en) Application program upgrading method and system
CN107632827B (en) Method and device for generating installation package of application
CN107291759B (en) Method and device for processing browser page resources
CN112052013A (en) Software package generation method and device, storage medium and electronic device
CN104090946A (en) Method and device for adding information to application installation package
CN110875850A (en) Firmware upgrading method and system, readable storage medium and terminal equipment
CN112887451B (en) Domain name resolution method and device and computer equipment
CN111552484A (en) Application package distribution method, device, equipment and storage medium
CN112149035A (en) Website static resource processing method and device
CN108737487B (en) Data synchronization method and device, storage medium and electronic device
CN112241298A (en) Page display method and device, storage medium and electronic device
CN115509582A (en) Application program issuing method, device, equipment and storage medium
CN112988176A (en) Channel package generation method and device, storage medium and electronic equipment
CN107577822A (en) A kind of method of data synchronization, data synchronization unit and mobile terminal
CN105119944A (en) Application starting method and related device
CN111001157B (en) Method and device for generating reference information, storage medium and electronic device
CN110895583A (en) Method, device and system for acquiring data resources

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40045925

Country of ref document: HK