Data volume-based application program packaging method and device
Technical Field
The present application relates to the field of application development technologies, and in particular, to a data volume-based application packaging method and apparatus.
Background
With the development and popularization of smart phones, mobile application developers represented by platforms for making APPs, such as iOS and Android platforms, are extremely active, and more people want to create curiosity by means of one mobile APP, and create another new world. Under the environment, ordinary people also want to develop the APP carrying the originality and conception of the ordinary people, but for the field of mobile internet with too high technical threshold, the ordinary people who cannot program often do not have the skill of APP development. In order to meet the requirements of people, self-service APP development platforms are produced.
The self-service APP development platform can help ordinary users to easily solve technical obstacles for developing mobile phone APPs, any user can develop Native mobile phone APPs with excellent quality according to own originality and conception without any technical knowledge, and the manufacturing speed is high, simple, free and professional. For the APP generated on the self-service APP development platform, a complete iOS and Android installation package is formed through packaging, the packaged installation package is submitted to the publishing platform, and the APP can be downloaded, installed and used on the publishing platform by the terminal user after verification.
Along with the continuous improvement of people's living standard, the people who develop APP are more and more, and the user also can produce new demand in the use, and the continuous accumulation of new demand impels the function of APP platform to upgrade and update from low to high continuously. The APP that generates on the preparation platform is in the packing process, because the APP that needs the packing is many, and packing time is very long to current APP packing all concentrates on a development platform in a large number, when the machine breaks down the back, need pack all packing files again, causes packing inefficiency.
In the prior art, document CN 104615433 a proposes a method for performing cluster packing on APP applications generated on an development platform. The method is characterized in that two groups of development platforms are arranged, two sub-development platforms are arranged on each group of development platforms, one of the two sub-development platforms executes packaging operation aiming at an IOS system, and the other one executes packaging operation aiming at an Android system.
Because the packing method can only classify and pack different types of operating systems, the classification packing method has certain limitations, for example, if a certain operating system has more packing programs and another operating system has less packing programs, a platform with more packing can be blocked or detained in packing, and a packing platform on the other side has a redundant idle condition in packing, so that the classification packing condition has the problem of low packing efficiency, and a new classification packing method is to be proposed; secondly, because the data volumes of the application programs to be packaged are different in size, namely as small as several K and as large as several G, high requirements are put forward on the performance of a packaging channel, and therefore, the packaging method cannot provide an effective packaging method aiming at the difference of the data volumes of the application programs to be packaged; finally, because the above-mentioned packing method is a pipeline operation, if a certain program fails to pack in the packing process, the packing of the whole packing pipeline is halted, and the packing efficiency is seriously affected.
In view of the above analysis, the prior art does not provide a batch packaging method for applications, which flexibly deals with the data size of the applications to be packaged and has high fluency and high efficiency.
Disclosure of Invention
A method for data volume based packaging of applications, said method comprising the steps of:
s1, receiving data streams of a plurality of application programs to be packaged, dividing the data streams of the plurality of packaged application programs into a plurality of data volume grades according to data volume, and marking the data streams of the plurality of application programs to be packaged according to the data volume grades;
s2, configuring a plurality of packaging channels of application program data streams, wherein the packaging channels correspond to the data volume grades one by one;
s3, transmitting the data streams of the plurality of application programs to be packaged to the packaging channels corresponding to the data streams according to the data volume grade marks, and sequentially performing packaging operation;
s4, if the application program is packaged successfully, uploading the successfully packaged application program to a server and issuing the successfully packaged application program; and if the packaging of the application program fails, recording packaging failure information.
As a preferred embodiment, the data stream of the plurality of applications to be packaged includes: application program function code data, operation platform data and user configuration data.
As a preferred embodiment, a plurality of packing subchannels are provided for each packing channel, the packing subchannels belonging to the same packing channel have the same packing performance, and the plurality of packing subchannels belonging to the same packing channel are referred to as a packing subchannel group; the method comprises the steps of obtaining data streams of each application program to be packaged and data volume grade marks of the data streams, transmitting the data streams of the application programs to be packaged to packaging channels corresponding to the data volume grade marks, sequencing the data streams according to queues, inputting the data streams of the application programs belonging to the same packaging channel to a packaging sub-channel group in a polling operation mode, and packaging the data streams of the application programs input to the sub-channel by the packaging sub-channel group.
As a preferred embodiment, the step S3 further includes: dividing the packaging operation into a plurality of different packaging stages, wherein each packaging stage completes a different packaging task; and each packaging channel sequentially packages the data streams of the plurality of application programs to be packaged in a pipeline mode.
As a preferred embodiment, the step S4 further includes: if the packaging of the application program fails, recording packaging failure information; and analyzing the packaging failure reason according to the analysis, the conversion information, the packaging information and the packaging failure information.
As a preferred embodiment, a packing repair channel is provided; recording the packaging information of the plurality of application programs in each packaging stage in each packaging channel, if the application programs have packaging errors in a certain packaging stage, recording the packaging error information of the packaging stage, exiting from a packaging pipeline, returning the packaging interrupted packaging data to the previous packaging stage, transferring the packaging data returned to the previous packaging stage to the packaging repair channel, acquiring the packaging error information of the packaging stage by the packaging repair channel, and performing packaging operation on the packaging data returned to the previous packaging stage in the packaging repair channel after analyzing the information.
The invention provides an application program packing method based on data volume, which divides data streams of a plurality of application programs to be packed into a plurality of data volume grades according to the data volume and packs the plurality of application programs in a classified manner according to the data volume grades, namely, a novel classified packing method is provided, the method solves the problem of low packing efficiency caused by classified packing according to different operating systems, and improves the packing efficiency of the application programs; in addition, a plurality of packing sub-channels are arranged for each packing channel, and the packing operation is carried out on the application program data streams in each packing channel and the packing sub-channels thereof in a flow line and polling mode, so that the fluency and the efficiency of application program packing are improved; finally, the problem of packing pause caused by individual data packing errors in the process of pipeline packing operation is solved by setting a packing repair channel, so that the packing efficiency of the application program is improved.
In addition, the invention provides an application packaging device based on data volume, which comprises the following modules:
the device comprises a receiving module, a sending module and a receiving module, wherein the receiving module is used for receiving data streams of a plurality of application programs to be packaged, dividing the data streams of the plurality of packaged application programs into a plurality of data volume grades according to data volume, and marking the data streams of the plurality of application programs to be packaged according to the data volume grades;
the configuration module is used for configuring a plurality of packaging channels of application program data streams, and the packaging channels correspond to the data volume grades one by one;
the packaging module is used for transmitting the data streams of the plurality of application programs to be packaged to the packaging channels corresponding to the data streams according to the data volume grade marks to sequentially perform packaging operation;
a packing repair module, configured to record packing information of each packing stage in each packing channel of the multiple applications, if a packing error occurs in a certain packing stage of an application, record information of the packing error in the packing stage, exit from a packing pipeline, return the packed data interrupted by packing to an upper packing stage, and transfer the packed data returned to the upper packing stage to the packing repair channel, where the packing repair channel obtains the information of the packing error in the packing stage, and performs a packing operation on the packed data returned to the upper packing stage in the packing repair channel after analyzing the information;
the packaging confirmation module uploads the successfully packaged application program to a server and releases the successfully packaged application program if the application program is successfully packaged; and if the packaging of the application program fails, recording packaging failure information.
The invention provides an application program packing device based on data volume, which divides data streams of a plurality of application programs to be packed into a plurality of data volume grades according to the data volume and packs the plurality of application programs in a classified manner according to the data volume grades, namely, a novel classified packing method is provided, the method solves the problem of low packing efficiency caused by classified packing according to different operating systems, and improves the packing efficiency of the application programs; in addition, a plurality of packing sub-channels are arranged for each packing channel, and the packing operation is carried out on the application program data streams in each packing channel and the packing sub-channels thereof in a flow line and polling mode, so that the fluency and the efficiency of application program packing are improved; finally, the problem of packing pause caused by individual data packing errors in the process of pipeline packing operation is solved by setting a packing repair channel, so that the packing efficiency of the application program is improved.
Drawings
FIG. 1 is a flow chart of a data volume-based application packaging method according to the present invention.
Detailed Description
The embodiments of the present invention are further described below with reference to the drawings.
The first embodiment is as follows:
FIG. 1 is a flow chart of a data volume-based application packaging method according to the present invention, which includes the following steps:
a method of packaging an application, the method comprising the steps of:
s1, receiving data streams of a plurality of application programs to be packaged, dividing the data streams of the plurality of packaged application programs into a plurality of data volume grades according to data volume, and marking the data streams of the plurality of application programs to be packaged according to the data volume grades;
s2, configuring a plurality of packaging channels of application program data streams, wherein the packaging channels correspond to the data volume grades one by one;
s3, transmitting the data streams of the plurality of application programs to be packaged to the packaging channels corresponding to the data streams according to the data volume grade marks, and sequentially performing packaging operation;
s4, if the application program is packaged successfully, uploading the successfully packaged application program to a server and issuing the successfully packaged application program; and if the packaging of the application program fails, recording packaging failure information.
The problem of low packaging efficiency caused by the fact that a packaging channel needs to package application software of various data volume levels is solved by dividing the packaged data streams of the plurality of application programs into a plurality of data volume levels according to the data volume. For example, a plurality of packaging channels T1, T2, T3 and T4 are provided, and corresponding application programs thereofThe data volume is 10 in turn3,102,101,100M four data volume levels, and corresponding data volume level marks a, b, c and d are established. If the application program to be packaged and the data volume thereof are 6 x 103,2*101,8*102,9*103,7*100,3*102,5*103When the units are all M, 6 x 103、9*103、5*103The corresponding program data streams are labeled a1, a2, a3 and are fed into channel T1, 8X 102、3*102The corresponding program data streams are labeled b1, b2 and are sent to channel T2 at 2 x 101The corresponding program data stream is marked c and is sent to channel T3, 7 x 100The corresponding program data stream is labeled d and is fed into channel T4. And sequentially performing packing operation on the plurality of application program data streams at packing channels T1, T2, T3 and T4.
As a preferred embodiment, the data stream of the plurality of applications to be packaged includes: application program function code data, operation platform data and user configuration data.
As a preferred embodiment, a plurality of packing subchannels are provided for each packing channel, the packing subchannels belonging to the same packing channel have the same packing performance, and the plurality of packing subchannels belonging to the same packing channel are referred to as a packing subchannel group; the method comprises the steps of obtaining data streams of each application program to be packaged and data volume grade marks of the data streams, transmitting the data streams of the application programs to be packaged to packaging channels corresponding to the data volume grade marks, sequencing the data streams according to queues, inputting the data streams of the application programs belonging to the same packaging channel to a packaging sub-channel group in a polling operation mode, and packaging the data streams of the application programs input to the sub-channel by the packaging sub-channel group.
For example, the above-mentioned packetizing channel has T1 two packetizing sub-channels T11, T12, and the data stream to be packetized in this packetizing channel has three a1, a2, a3, then the data streams a1, a2 to be packetized are first allocated to the packetizing sub-channels T11, T12, and polling operation is performed on the two packetizing sub-channels T11, T12, if the packetizing sub-channel T11 finishes the packetizing operation of the data stream to be packetized a1 first, then the data stream a3 to be packetized is allocated to the packetizing sub-channel T11 for packetizing operation. The above is merely an exemplary embodiment.
As a preferred embodiment, the step S3 further includes: dividing the packaging operation into a plurality of different packaging stages, wherein each packaging stage completes a different packaging task; and each packaging channel sequentially packages the data in the general packaging format in a pipeline mode.
As a preferred embodiment, the step S4 further includes: if the packaging of the application program fails, recording packaging failure information; and analyzing the packaging failure reason according to the analysis, the conversion information, the packaging information and the packaging failure information.
As a preferred embodiment, a packing repair channel is provided; recording the packaging information of the plurality of application programs in each packaging stage in each packaging channel, if the application programs have packaging errors in a certain packaging stage, recording the packaging error information of the packaging stage, exiting from a packaging pipeline, returning the packaging interrupted packaging data to the previous packaging stage, transferring the packaging data returned to the previous packaging stage to the packaging repair channel, acquiring the packaging error information of the packaging stage by the packaging repair channel, and performing packaging operation on the packaging data returned to the previous packaging stage in the packaging repair channel after analyzing the information.
For example, a packing repair channel X is set, if in the first round of packing process, the data stream a1 to be packed in the T11 channel has undergone the packing data QA3a and the packing information ma thereof at the packing stage a, the packing data QA3b and the packing information mb thereof at the stage b, the packing data QA3c and the packing information mc thereof at the stage c, and a packing error occurs at the packing stage c, the packing data QA3c is exited from the packing pipeline, the packing interrupted packing data QA3c is exited to the previous packing stage QA3b, the packing data QA3b exited to the previous packing stage is transferred to the packing repair channel X, the packing repair channel X acquires the packing error information mc at the packing stage c, and after analyzing the packing error information mc, the packing data QA3b is subjected to a packing operation at the packing repair channel X.
The invention provides an application program packing method based on data volume, which divides data streams of a plurality of application programs to be packed into a plurality of data volume grades according to the data volume and packs the plurality of application programs in a classified manner according to the data volume grades, namely, a novel classified packing method is provided, the method solves the problem of low packing efficiency caused by classified packing according to different operating systems, and improves the packing efficiency of the application programs; in addition, a plurality of packing sub-channels are arranged for each packing channel, and the packing operation is carried out on the application program data streams in each packing channel and the packing sub-channels thereof in a flow line and polling mode, so that the fluency and the efficiency of application program packing are improved; finally, the problem of packing pause caused by individual data packing errors in the process of pipeline packing operation is solved by setting a packing repair channel, so that the packing efficiency of the application program is improved.
In addition, the invention provides an application packaging device based on data volume, which comprises the following modules:
the device comprises a receiving module, a sending module and a receiving module, wherein the receiving module is used for receiving data streams of a plurality of application programs to be packaged, dividing the data streams of the plurality of packaged application programs into a plurality of data volume grades according to data volume, and marking the data streams of the plurality of application programs to be packaged according to the data volume grades;
the configuration module is used for configuring a plurality of packaging channels of application program data streams, and the packaging channels correspond to the data volume grades one by one;
the packaging module is used for transmitting the data streams of the plurality of application programs to be packaged to the packaging channels corresponding to the data streams according to the data volume grade marks to sequentially perform packaging operation;
a packing repair module, configured to record packing information of each packing stage in each packing channel of the multiple applications, if a packing error occurs in a certain packing stage of an application, record information of the packing error in the packing stage, exit from a packing pipeline, return the packed data interrupted by packing to an upper packing stage, and transfer the packed data returned to the upper packing stage to the packing repair channel, where the packing repair channel obtains the information of the packing error in the packing stage, and performs a packing operation on the packed data returned to the upper packing stage in the packing repair channel after analyzing the information;
the packaging confirmation module uploads the successfully packaged application program to a server and releases the successfully packaged application program if the application program is successfully packaged; and if the packaging of the application program fails, recording packaging failure information.
It should be noted that, a general application packaging device of the present invention may be a module device corresponding to the above application packaging method one by one, and is used to implement various functions in the method, and therefore, details are not described herein.
The invention provides an application program packing device based on data volume, which divides data streams of a plurality of application programs to be packed into a plurality of data volume grades according to the data volume and packs the plurality of application programs in a classified manner according to the data volume grades, namely, a novel classified packing method is provided, the method solves the problem of low packing efficiency caused by classified packing according to different operating systems, and improves the packing efficiency of the application programs; in addition, a plurality of packing sub-channels are arranged for each packing channel, and the packing operation is carried out on the application program data streams in each packing channel and the packing sub-channels thereof in a flow line and polling mode, so that the fluency and the efficiency of application program packing are improved; finally, the problem of packing pause caused by individual data packing errors in the process of pipeline packing operation is solved by setting a packing repair channel, so that the packing efficiency of the application program is improved.
The above description is only an embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes performed by the present specification and drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.