CN106874025B - Method and device for determining size of installation package - Google Patents

Method and device for determining size of installation package Download PDF

Info

Publication number
CN106874025B
CN106874025B CN201610671017.9A CN201610671017A CN106874025B CN 106874025 B CN106874025 B CN 106874025B CN 201610671017 A CN201610671017 A CN 201610671017A CN 106874025 B CN106874025 B CN 106874025B
Authority
CN
China
Prior art keywords
size
data
package
online
offline
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.)
Active
Application number
CN201610671017.9A
Other languages
Chinese (zh)
Other versions
CN106874025A (en
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.)
Advanced New Technologies Co Ltd
Advantageous New Technologies Co Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201610671017.9A priority Critical patent/CN106874025B/en
Publication of CN106874025A publication Critical patent/CN106874025A/en
Application granted granted Critical
Publication of CN106874025B publication Critical patent/CN106874025B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating

Abstract

In the method, a terminal or a server can determine the size of an online update package according to the sizes of various types of data contained in an offline installation package and an online installation package. The size of the online update package is determined by the terminal or the server according to the size of the data in the online update package, and the size of the online update package is determined comprehensively according to the size of the data in the online update package and the size of the data in the offline update package.

Description

Method and device for determining size of installation package
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for determining a size of an installation package.
Background
With the rapid development of computer technology and intelligent terminal technology, the use of intelligent terminals has been popularized in people's daily life, people have gradually got rid of the traditional way of operating various clients only on desktop computers, and can operate various applications (apps) on the intelligent terminals held by themselves anytime and anywhere to meet their living needs.
In practical applications, a software developer usually needs to develop a corresponding App for different operating systems (for example, some systems are 32-bit, some systems are 64-bit), and in general, an online platform requires the software developer to package data developed for the same App and applicable to different systems in the same installation package, and then upload the data to the online platform, and since the online platform provides a certain processing to the installation package uploaded by the software developer and then provides a download service to a user, for the same App, the installation package uploaded by the software developer to the online platform and the installation package finally provided by the online platform and downloaded to the user are often different in size, and the software developer usually wants that the App developed by the software developer itself, while including multiple functions, occupies a storage space of a user terminal as low as possible, therefore, before distributing the installation package of each developed App to the online platform, a software developer usually needs to determine the size of the online update package after the offline update package of each App is actually online, and adjust the size of the offline update package according to the estimated size, for example, when the software developer determines that the size of an online update package of a certain App is too large, some invalid and redundant data included in the offline update package may be deleted, so as to achieve the purpose of reducing the size of the offline update package, where the above-mentioned online update package is used for updating the online installation package that the software developer previously distributes to the App on the online platform, and the online update package is called the offline update package before the online update package is online, and the online installation package is called the offline installation package before the online update package is online.
In practice, a software developer will typically estimate the size of the online update package based on the data in the App's online installation package published on the online platform. Specifically, because installation packages of different versions of the same App generally have a certain relation in data, when determining the size of the online update package, a software developer usually obtains the online installation package from an online platform, where the online installation package includes data related to multiple systems, selects a specified system as a calculation standard, determines the proportion of data related to the specified system in the total size of the online installation package, and then the software developer can determine the size of the online update package according to the proportion and the size of the data related to the specified system included in the offline update package.
For example, assuming that a software developer needs to determine the size of the online update package a5 after the offline update package a4 goes online, the software developer can obtain the online installation package A3 to be updated by the online update package a5 from the online platform, and determine the size of the data in the online installation package A3 that is applicable to a 64-bit system. Because the software developer can determine the total size of the online installation package A3 according to the data provided by the online platform when obtaining the online installation package A3 from the online platform, the software developer can subsequently calculate the proportion of the size of the data applicable to the 64-bit system in the online installation package A3 in the total size of the online installation package A3 by determining the size of the data applicable to the 64-bit system in the online installation package A3 and the total size of the online installation package A3. Then, the software developer can estimate the size of the online update package A5 after the offline update package A4 is online according to the determined ratio and the size of the data in the offline update package A4, which is applicable to the 64-bit system.
Although the above method can estimate the size of the offline update package after the online update package is online, since the installation package usually contains data applicable to other systems (such as 32-bit system) in addition to data applicable to 64-bit system, there is often a portion of shared data between systems (there is a certain intersection on the data by the systems), that is, whether the installation package is not on-line or is on-line, the size is not simply the sum of the data of the systems, and therefore, the above-mentioned ratio calculated by the prior art is not actually accurate, and accordingly, the size of the online update package determined by the subsequent software developer based on the ratio should also be inaccurate, this presents difficulties for software developers to subsequently adjust offline update packages based on the determined size of the online update package.
Disclosure of Invention
The embodiment of the application provides a method for determining the size of an installation package, which is used for solving the problem that the size of an online update package determined by an online installation package is inaccurate in the prior art.
The embodiment of the application provides a device for determining the size of an installation package, which is used for solving the problem that the size of an online update package determined by an online installation package is inaccurate in the prior art.
The embodiment of the application adopts the following technical scheme:
the embodiment of the application provides a method for determining the size of an installation package, which comprises the following steps:
acquiring an online installation package and an offline installation package corresponding to the online installation package;
determining each estimation factor according to the size of each type of data contained in the online installation package and the offline installation package, wherein each data only belongs to one type;
determining the size of each type of data contained in the offline update package;
and determining the size of the online update package corresponding to the offline update package according to the determined size of each type of data in the offline update package and each estimation factor.
The embodiment of the present application provides a device for determining the size of an installation package, including:
the system comprises an acquisition module, a storage module and a control module, wherein the acquisition module is used for acquiring an online installation package and an offline installation package corresponding to the online installation package;
the determining factor module is used for determining each estimation factor according to the size of each type of data contained in the online installation package and the offline installation package, wherein each type of data only belongs to one type;
the first determining module is used for determining the size of each type of data contained in the offline updating packet;
and the second determining module is used for determining the size of the online update package corresponding to the offline update package according to the determined size of each type of data in the offline update package and each estimation factor.
The embodiment of the application adopts at least one technical scheme which can achieve the following beneficial effects:
in the embodiment of the application, a software developer can obtain the offline installation package and the online installation package corresponding to the offline update package to be published on the online platform through a terminal or a server, and determine the size of the online update package corresponding to the offline update package by determining the size of each type of data which are contained in the offline installation package and the online installation package and are not overlapped with each other. Because the terminal or the server determines the size of the online update package not only by the size of a part of data in the online update package, but also by the size of each type of data included in the online update package and the offline update package, the size of the online update package is determined comprehensively, and the size of the online update package is different from that of each system in the prior art by a certain intersection, in the embodiment of the present application, each type of data determined by the terminal or the server in the process of determining the size of the online update package does not contain an intersection, that is, each type of data corresponds to only one type, so that the situation that the size of the finally determined online update package has a large deviation due to the intersection among the types of data is avoided, and therefore, in sum, compared with the prior art, the size of the online update package can be determined accurately by the method, and further brings convenience to the process that a software developer adjusts the size of the offline update package by determining the size of the online update package.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
FIG. 1 is a process for determining a package size provided by an embodiment of the present application;
FIG. 2 is a detailed diagram of determining the size of an update packet on a line according to an embodiment of the present application;
FIG. 3 is a process for determining the size of each cell in an online update package according to an embodiment of the present application;
fig. 4 is a schematic diagram of an apparatus for determining a size of an installation package according to an embodiment of the present application.
Detailed Description
In practical application, in order to promote an App developed by a software developer, the software developer generally needs to publish an installation package of the App to an online platform, so as to promote the App by virtue of the advantage of a large access amount of users of the online platform, wherein for installation packages which are never published on the online platform, when the installation packages are published on the online platform, the installation packages can be called online installation packages, and correspondingly, before the online installation packages are not online, the installation packages which are offline can be called offline installation packages. After a software developer publishes an online installation package on an online platform, the App is subsequently refined and updated to some extent, and as a result, in order to enable a user to use the updated App, the software developer generally needs to publish an installation package corresponding to the updated App to the online platform and replace an existing online installation package on the online platform, wherein the installation package is not published on the online platform and is used for updating the App, and correspondingly, the online update package is called an online update package after being published on the online platform. The offline update package is described with respect to the offline installation package, that is, the offline installation package corresponds to a historical installation package of the offline update package, and correspondingly, the online installation package corresponds to a historical installation package of the online update package.
When the App's installation package is released to the online platform, the online platform performs certain processing on the installation package uploaded by the software developer, so that, in general, the online installation package and the offline installation package are different in size, and in the same way, the online update package and the offline update package are also different in size. In the prior art, the size of the online update package is usually determined by only a part of data in the offline installation package, and the part of data usually intersects with other data, so that the size of the online update package determined based on the part of data is usually inaccurate. In order to accurately determine the size of the online update package, in the embodiment of the present application, the terminal or the server determines each estimation factor according to the size of each type of data in the acquired online installation package and offline installation package, and further determines the size of the online update package according to each estimation factor and the size of each type of data in the offline update package, which will be described in detail below.
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be described in detail and completely with reference to the following specific embodiments of the present application and the accompanying drawings. It should be apparent that the described embodiments are only some of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The technical solutions provided by the embodiments of the present application are described in detail below with reference to the accompanying drawings.
Fig. 1 is a process for determining a size of a package according to an embodiment of the present application, which specifically includes the following steps:
s101: and acquiring an online installation package and an offline installation package corresponding to the online installation package.
In this embodiment, in order to accurately determine the size of the online update package, a software developer may obtain, through a terminal or a server, an online installation package corresponding to the online update package and an offline installation package corresponding to the online installation package, where the online installation package is already published on an online platform, so the software developer may obtain, through the terminal or the server, the online installation package from the online platform, and the software developer may store, for subsequent use, each time the offline installation package or the offline update package is developed, the offline installation package, so the software developer may directly obtain, from each installation package stored in the terminal or the server, the offline installation package, as shown in fig. 2.
FIG. 2 is a detailed diagram of determining the size of an online update packet according to an embodiment of the present application.
In fig. 2, the terminal may obtain the online installation package from the online platform and obtain the offline installation package corresponding to the online installation package from the terminal itself, and if the offline installation package is not stored in the terminal but in the local server of the software developer, the terminal may obtain the offline installation package from the local server. The terminal mentioned here may be a computer used by a software developer, a smart phone, or other smart devices. Of course, the server may also obtain the online installation package and the offline installation package, and in the subsequent process, send the determined size of the online update package to the terminal for display.
S102: and determining each estimation factor according to the size of each type of data contained in the online installation package and the offline installation package, wherein each data only belongs to one type.
After the terminal or the server obtains the online installation package and the offline installation package corresponding to the online installation package, the data contained in the online installation package and the offline installation package can be divided into various types according to the same division standard, so as to obtain various types of data, wherein each type of data corresponds to only one type of data according to the data divided according to the same classification standard. Then, the terminal or the server may determine, according to the determined sizes of the types of data in the online installation package and the offline installation package, estimation factors for determining the size of the online update package.
Specifically, in practical applications, whether the online installation package or the offline installation package, the data contained in the online installation package or the offline installation package can be generally classified into the following types: the first type is called variable data, and for such data, since the online installation package is obtained by the online platform after processing the offline installation package, a part of data in the online installation package is often different in size compared with the part of data in the offline installation package, and therefore, in the process that the offline installation package is changed into the online installation package via the online platform, such data whose size is changed may be called variable data, and such data generally includes binary data and device-specific data, where the device-specific data mentioned herein refers to data that is included in the online installation package and can be run on some wearable smart devices. In contrast to variable data, an online installation package or an offline installation package usually further includes fixed data, and the size of the data does not change along with the process of converting the offline installation package into the online installation package, that is, the size of the data does not change.
Therefore, in the embodiment of the present application, the terminal or the server may obtain the information according to the same division standardThe terminal or the server may determine the first estimation factor according to the determined sizes of the variable data of the offline installation package and the offline installation package, and may specifically divide the size of the variable data of the online installation package by the size of the variable data of the offline installation package to obtain a scaling factor of the online installation package and the offline installation package on the variable data, where the scaling factor is obtained by using a formula α w1(T)÷w0(T) wherein w1(T) is the size of the variable data in the on-line installation package, w0Of course, the first estimation factor may be determined by dividing the size of the variable data of the offline installation package by the size of the variable data of the online installation package, and the subsequent determination process only needs to be adjusted accordingly, or may be determined in other manners, such as determining according to the sizes of the variable data of the online installation package and the offline installation package and preset coefficients, which is not necessarily described herein.
In practical application, after the online platform performs certain processing on the offline installation package uploaded by the software developer, a part of data is usually added to the online installation package by the online platform according to the requirements of the online platform, and the size of the part of data is usually related to the total size of the offline installation package, for example, the larger the total size of the offline installation package is, the larger the size of the part of data in the online installation package is, since the part of data is provided by the online platform, the part of data can be generally called as third-party data, for example, for the online App platform store of apple, the third-party data in the online installation package refers to SC-Info data generated by the App store.
Since the third party data is typically associated with the total size of the offline installation package, the third party data should also be associated with variable data or fixed data in the offline installation package, and since embodiments of the present application are intended to accurately determine the size of the online update package, the online update packageThe third-party data is usually included in the upper update package, so in this embodiment of the present application, the terminal or the server needs to determine an estimation factor related to the third-party data, and then determine the size of the third-party data in the online update package according to the estimation factor and the size of each type of data in the offline update package, and further determine the size of the online update package accurately, so the terminal or the server needs to determine the size of the third-party data included in the online update package from the acquired online update package, and then, since the third-party data usually has a certain proportional relationship with the variable data or the fixed data in the offline update package, the terminal or the server can arbitrarily select one type of data from the acquired types of data in the offline update package as the first designated data, and according to the size of the first designated data and the determined size of the third-party data in the online update package, determining a second estimation factor, which may be determined by dividing the size of the third-party data in the determined on-line installation package by the size of the first designated data selected from the off-line installation package, for example, the formula δ ═ w1(v)÷w0(T) wherein w1(T) is the size of the third party data in the online installation package, w0(T) is the size of variable data in the offline installation package, and δ is the determined second estimation factor, which can be determined in other ways, and only the relationship between the size of third-party data in the online installation package and the offline installation package needs to be reflected.
For example, in the process of determining the second estimation factor, the terminal or the server may select variable data included in the offline installation package as first specified data, and determine the size of the first specified data, and then, the terminal or the server may determine the size of third party data included in the online installation package from the acquired online installation package, and use the above formula δ — w1(v)÷w0(T), determining a second estimation factor.
It should be noted that, in practical applications, the variable data generally includes binary data and device-specific data, and therefore, in this embodiment of the application, after the terminal or the server acquires the offline installation package and the online installation package, the terminal or the server may also split the variable data included in the online installation package and the offline installation package into the binary data and the device-specific data, and determine the third estimation factor or the fourth estimation factor included in the first estimation factor according to the sizes of the determined binary data and the determined device-specific data, respectively.
Specifically, in the process of determining the third estimation factor, the terminal or the server may determine the size of the binary data from the obtained online installation package and the obtained offline installation package, and determine the third estimation factor according to the determined sizes of the binary data of the online installation package and the offline installation package, where a specific implementation manner may be to divide the size of the binary data of the online installation package by the size of the binary data of the offline installation package, for example, where the formula β is w1(x)÷w0(x) Shown, wherein w in the formula1(x) Size, w, of binary data representing an on-line installation package0(x) It is needless to say that the third estimation factor is not determined exclusively, and a weight, a coefficient, or the like may be added to the above formula, which will not be described herein.
For the determining manner of the fourth estimation factor, the terminal or the server may determine the size of the device-specific data in the online installation package and the offline installation package, respectively, and determine the fourth estimation factor according to the determined size of the device-specific data in the online installation package and the offline installation package, and a specific implementation manner may be that the size of the device-specific data in the online installation package is divided by the size of the device-specific data in the offline installation package to obtain a ratio, and the ratio is used as the fourth estimation factor, for example, a formula γ ═ w1(y)÷w0(y) wherein w1(y) represents the size of device-specific data in the on-line installation package, w0(y) represents the size of the device-specific data in the offline installation package, and γ represents the determined fourth estimation factor. Of course, the fourth estimation factor is not necessarily determined according toThe above formula may be applied to γ ═ w1(y)÷w0Some weights, coefficients, etc. are added to (y), and will not be described in detail here.
S103: the size of each type of data included in the offline update package is determined.
In practical applications, the proportional relationship between the types of data in the online installation package and the offline installation package is usually similar to the proportional relationship between the types of data in the online update package and the offline update package, for example, the proportional relationship between the variable data in the online installation package and the offline installation package is usually the same as or similar to the proportional relationship between the variable data in the online update package and the offline update package, in other words, the size of each type of data in the online update package and the size of each type of data in the offline update package can be determined by the proportional relationship between the types of data in the online installation package and the offline installation package, and the size of the online update package can be determined. Since the embodiment of the present application intends to accurately determine the size of the online update package, after determining each estimation factor through steps S101 to S102, it is necessary to further determine the size of each type of data in the offline update package, and determine the size of the online update package according to the determined size of each type of data in the offline update package and each estimation factor through subsequent steps. Therefore, after determining the estimation factors, the terminal or the server may further determine the sizes of the types of data in the offline update packet, wherein the terminal or the server may divide the data in the offline update packet into variable data and fixed data according to the same division standard as in step S102, and determine the sizes of the variable data and the fixed data included in the offline update packet, or further divide the variable data into binary data and device-specific data, and determine the sizes of the binary data and the device-specific data in the offline update packet.
It should be noted that, instead of determining the estimation factors, the terminal or the server may also obtain the offline update package and determine the size of each type of data included in the offline update package at the same time as obtaining the online update package and the offline update package.
S104: and determining the size of the online update package corresponding to the offline update package according to the determined size of each type of data in the offline update package and each estimation factor.
After determining the size of each type of data included in the offline update package, the terminal or the server may determine the size of each type of data in the online update package according to the determined estimation factors and the size of each type of data in the offline update package, and further determine the size of the online update package according to the determined size of each type of data in the online update package.
Specifically, since the terminal or the server may divide the data in the offline update package into the variable data and the fixed data according to the data division standard in step S102, and determine the sizes of the variable data and the fixed data in the offline update package, therefore, the terminal or the server can determine the size of the variable data in the online update package based on the determined size of the variable data in the offline update package and the first estimation factor, and for the size of the fixed data in the online update package, since the size of the fixed data is not changed with the processing of the installation package by the online platform, therefore, the size of the fixed data in the online update package is actually the size of the fixed data in the offline update package, therefore, the size of the fixed data in the update packet on the line is determined at the same time as the size of the fixed data in the update packet under the line is determined.
Since the third party data obtained by processing the offline update package by the online platform is usually available in the online update package, in order to accurately determine the size of the online update package, the terminal or the server also needs to determine the size of the third party data in the online update package, and since the terminal or the server has determined a second estimation factor related to the third party data in step S102, although the second estimation factor is determined by the size of the third party data in the online update package and the size of any one of the variable data and the fixed data in the offline update package, since the ratio between the types of data of the online update package and the offline update package is similar to or the same as the ratio between the types of data of the online update package and the offline update package, when the terminal or the server determines the size of the third party data in the online update package, the second estimation factor may be used as well. Therefore, in this embodiment of the application, the terminal or the server may determine, according to the second estimation factor, which second estimation factor is obtained based on which data in the offline installation package is, that is, determine the first specified data in the offline installation package selected when the second estimation factor is calculated, and then, the terminal or the server may determine, from the offline update package, the size of the data of the same type as the first specified data, and determine the size of the third party data in the online update package according to the determined size of the data and the second estimation factor.
After the terminal or the server determines the sizes of the fixed data, the variable data and the third-party data in the online update package in sequence, the determined sizes of the three data can be summed to obtain the size of the online update package, for example, the formula a ═ w2(T)×α+w2(i)×δ+w2(z) in the formula, w2(T) is the size of the variable data in the offline update package, and w2(T) x α the result is the size of the variable data in the update packet on the line, w2(i) Updating the size of the first specified data in the package for offline, wherein when the variable data in the offline installation package is taken as the first specified data in the process of determining the second evaluation factor, then w2(i) Can be changed into w correspondingly2(T) representing the size of variable data in the offline update package, and w when the fixed data in the offline update package is taken as the first specified data in the process of determining the second evaluation factor2(i) Can be changed into w correspondingly2(z), i.e. representing the size of the fixed data in the offline update package, correspondingly, w2(i) The result obtained by x δ is the size of the third party data in the online update package, w2(z) represents the size of the fixed data in the offline update packet,the size of the fixed data in the online update package is also shown. Of course, the above formula is not exclusive, and may be represented by formula a ═ w2(T)×α+w2(i)×δ+w2(z) are added with weights, coefficients, etc., which are not described in detail herein.
It should be noted that the terminal or the server may further split the variable data into binary data and device-specific data, and determine the sizes of the binary data and the device-specific data in the online update packet according to the determined third estimation factor and the determined fourth estimation factor. Specifically, the terminal or the server may determine the size of the binary data in the online update package according to the determined binary data in the offline update package and the third estimation factor, and similarly, the terminal or the server may determine the size of the device-specific data in the online update package according to the determined device-specific data in the offline update package and the fourth estimation factor. Correspondingly, after successively determining the size of the third-party data and the fixed data in the online update package, the subsequent terminal or the server may further determine the size of the online update package according to the size of each type of data in the determined online update package, and the specific implementation manner may be that the formula a is w2(x)×β+w2(y)×γ+w2(i)×δ+w2(z) in the formula, w2(x) For the size of the binary data contained in the offline update package, corresponding w2(x) X β results in the size of binary data in an online update packet, w2(y) is the size of the device-specific data contained in the offline update package, and w2The result of (y) × γ is the size of the device-specific data in the online update packet.
According to the above mode, in the process of determining the size of the online update package, the terminal or the server does not determine the size of the online update package based on the size of a part of data in the online update package, but determines the size of the online update package comprehensively according to the sizes of various types of data included in the online update package and the offline update package.
It should be noted that, in practical applications, an installation package is generally composed of units developed by software developers, and therefore, when the size of the offline update package is adjusted according to the determined size of the online update package, the size of each unit in the offline update package is actually adjusted, and therefore, in the embodiment of the present application, the terminal or the server may determine the size of each unit in the online update package while determining the size of the online update package, and adjust the size of each unit in the offline update package according to the determined size of each unit in the online update package, where a specific process is shown in fig. 3.
Fig. 3 is a process for determining sizes of units in an online update package according to an embodiment of the present application, which specifically includes the following steps:
s301: determining each pre-package unit corresponding to each post-package unit included in the offline update package.
In practical application, considering the packaging factor, the sum of the sizes of the units contained in the offline update package before packaging is often different from the sum of the sizes of the units after packaging, and accordingly, the sizes of the units also change before packaging, so when determining the sizes of the units in the online update package, the sizes of the units cannot be regarded as the sizes of the units before packaging, and the factors that the sizes of the units before packaging and after packaging are changed are taken into consideration, and because the sizes of the online update package and the offline update package are often different, the sizes of the online update package and the offline update package are also often different for each unit, so the factors that the sizes of the units in the online update package and the offline update package are changed are also taken into consideration in the process of determining the sizes of the units in the online update package, therefore, before determining the size of each unit in the online update package, each pre-package unit corresponding to each post-package unit in the offline update package needs to be determined, where each post-package unit is a unit packaged in the offline update package or the online update package, and each pre-package unit is a unit not packaged in the offline update package. Since each software developer usually stores each unit in a local terminal or a local server after developing each unit, in this embodiment of the present application, the terminal or the server may retrieve each pre-packaged unit stored in advance from another terminal or the server, and determine the size of each type of data included in each pre-packaged unit in a subsequent process.
S302: and respectively determining the sizes of the binary data, the equipment-specific data and the fixed data contained in each pre-packaging unit and the total size of each type of data in each pre-packaging unit.
Although the size of each unit in the offline update package varies before and after packaging, the size of each packaged unit accounts for the same or similar proportion of the size of the offline update package to the total size of each pre-packaging unit, and the size of each packaged unit in the online update package accounts for the same or similar proportion of the size of each online update package to the size of each packaged unit in the offline update package, the size of each packaged unit in the online update package can be determined by determining the proportion of the size of each packaged unit in the online update package to the size of the offline update package and determining the size of each packaged unit in the online update package according to the estimation factors determined in step S102. Therefore, in this embodiment of the application, the terminal or the server may further determine the size of each type of data included before each package, determine the total size of each type of data included in each unit before package, and further determine each unit factor in the subsequent step S303, where the terminal or the server may divide the data into three types of data, i.e., binary data, device-specific data, and fixed data, according to the same dividing manner in the step S102.
It should be noted that, since the offline update package does not include the third party data included in the online update package, and the third party data is usually present in the online update package in a separate form, rather than being present in each post-package unit scattered in the online update package, each pre-package unit should not include the third party data.
S303: and for each pre-packaging unit, determining each unit factor according to the binary data contained in the pre-packaging unit, the size of the equipment special data and the total size of each type of data in each pre-packaging unit.
The terminal or the server may further determine each unit factor after determining the size of each type of data included in each pre-package unit and the total size of each type of data in each pre-package unit, where the terminal or the server may determine, for each pre-package unit, a first unit factor according to the determined size of the binary data included in the pre-package unit and the total size of the binary data included in each pre-package unit, and may specifically implement the method by dividing the size of the binary data of the pre-package unit by the total size of the binary data included in each pre-package unit, for example, according to a formula
Figure BDA0001079089560000141
Wherein u isi(x) Indicating the size of the binary data contained in the ith pre-package unit,
Figure BDA0001079089560000142
indicates the total size of binary data contained in each pre-package unit, and n indicates the number of pre-package units.
Similarly, the terminal or the server may determine, for each pre-encapsulation unit, the second unit factor according to the determined size of the device-specific data included in the pre-encapsulation unit and the total size of the device-specific data included in each pre-encapsulation unit, and a specific implementation manner may be to divide the determined size of the device-specific data included in the pre-encapsulation unit by each pre-encapsulation unitThe total size of the device-specific data contained in the element, e.g. formula
Figure BDA0001079089560000151
Wherein u isi(y) is the size of the device-specific data contained in the ith pre-encapsulation unit,
Figure BDA0001079089560000152
n is the number of pre-encapsulation units, which is the total size of the device-specific data contained in each pre-encapsulation unit.
It should be noted that the determination method of each unit factor described above is not exclusive, and for example, some coefficients or weights may be added to the formula for determining each unit factor described above, and the description is not necessarily made here.
S304: and determining the size of the packaged unit corresponding to the pre-packaging unit in the online update package according to the determined unit factors, the estimated factors, the size of the fixed data of the pre-packaging unit and the size of each type of data in the offline update package.
After determining each unit factor, the terminal or the server may further determine, for each pre-package unit, a size of each type of data included in the post-package unit corresponding to the pre-package unit in the online update package, and further determine, according to each estimation factor in step S102, a size of the post-package unit corresponding to the pre-package unit in the online update package.
Specifically, in practical applications, once each unit is packaged in an installation package or an update package, the size of each unit cannot be directly determined, but the size of each type of data in each packaged unit in the outgoing line lower update package needs to be determined according to the size of each type of data in each pre-packaging unit and the size of each type of data in the offline update package, so as to determine the size of each packaged unit in the outgoing line lower update package. Therefore, in this embodiment of the application, after determining, by the terminal or the server, the first unit factor corresponding to each pre-package unit, the terminal or the server may determine, according to the first unit factor, the first unit factorThe binary data size included in the offline update packet determined in step S103 is determined, and the binary data size included in the packaged unit corresponding to the pre-packaging unit in the offline update packet is determined, specifically, the binary data size included in the offline update packet may be multiplied by the first unit factor, for example, by formula mi(x)=ai×w2(x) Wherein m isi(x) Represents the size of the binary data contained in the ith packed cell in the offline update package.
Similarly, for each pre-package unit, the terminal or the server may determine, according to the determined second unit factor corresponding to the pre-package unit and the determined size of the device-specific data included in the offline update package, the size of the device-specific data included in the post-package unit corresponding to the pre-package unit in the offline update package, where a specific implementation manner may be that a formula m is usedi(y)=bi×w2(y) applying a second unit factor b corresponding to the ith pre-package unitiAnd multiplying the size of the device-specific data contained in the offline update package by the size of the device-specific data contained in the ith packaged unit corresponding to the ith pre-package unit in the offline update package. Of course, the determination method mentioned here is not unique, and other formulas may be used for determination, which is not described in detail here.
After determining the size of each type of data included in the post-package unit corresponding to the pre-package unit in the lower outgoing line update package for each pre-package unit, the terminal or the server may further determine each estimation factor according to step S102, and determine the size of each type of data included in the post-package unit corresponding to the pre-package unit in the online update package. Specifically, the terminal or the server may further determine the size of the binary data included in the packaged unit corresponding to the pre-packaging unit in the online update package according to the size of the binary data included in the packaged unit corresponding to the pre-packaging unit in the determined offline update package and the third estimation factor, and a specific embodiment may use a formula oi(x)=β×mi(x) Determining a third estimation factor β and a size m of binary data contained in an ith post-packaging cell corresponding to the ith pre-packaging cell in the offline update packagei(x) Multiplying to obtain the size o of binary data contained in the ith packaged unit corresponding to the ith pre-packaged unit in the online update packagei(x)。
Similarly, the terminal or the server may determine the size of the device-specific data included in the packaged unit corresponding to the pre-package unit in the online update package according to the determined size of the device-specific data included in the packaged unit corresponding to the pre-package unit in the offline update package and the fourth estimation factor determined in step S102, and a specific embodiment may adopt the formula oi(y)=γ×mi(y) determining the fourth estimation factor γ and the size m of the device-specific data contained in the ith post-package unit corresponding to the ith pre-package unit in the offline update packagei(y) multiplying to obtain the size o of the device-specific data contained in the ith unit corresponding to the ith pre-encapsulation unit in the online update packeti(y)。
Since the fixed data included in each pre-package unit does not change, the terminal or the server determines, for each pre-package unit, the size of the fixed data included in the pre-package unit, which is actually the size of the fixed data included in the post-package unit corresponding to the pre-package unit in the online update package, and correspondingly, after determining the sizes of the binary data, the device-specific data, and the fixed data included in the post-package unit corresponding to the pre-package unit in the online update package, the sizes of the binary data, the device-specific data, and the fixed data, respectively, the sizes of the three data can be summed, so as to obtain the size of the post-package unit corresponding to the pre-package unit in the online update package.
The terminal or the server can further display the determined size of the online update package and the size of each packaged unit contained in the online update package to a user, wherein the terminal or the server can display the determined result to a software developer in the form of text, pictures and the like in the modes of a webpage, a notebook and the like for viewing.
It should be noted that, in the embodiment of the present application, after the terminal or the server determines the size of the online update package, the offline update package corresponding to the online update package may be adjusted according to a preset adjustment rule, for example, when the size of the online update package exceeds a set threshold, the terminal or the server analyzes data in the offline update package corresponding to the online update package, and integrates some data that can be commonly used in the offline update package according to the analyzed result, and deletes redundant data, thereby achieving the purpose of reducing the size of the online update package by reducing the size of the offline update package.
Since the down update package or the up update package is basically composed of the units after the package, the essence of adjusting the size of the down update package is to adjust the size of each unit after the package in the down update package, and the essence of the adjustment is to adjust the size of each unit before the package. Therefore, in this embodiment of the present application, the terminal or the server may adjust, for each post-package unit in the online update package, a pre-package unit corresponding to the post-package unit in the offline update package according to the determined size of the online update package and the size of the post-package unit, specifically, when the terminal or the server finds that the determined size of the online update package exceeds the first set threshold, it may further check whether the size of each post-package unit in the online update package exceeds a second set threshold, where when the terminal or the server finds that the size of a certain post-package unit exceeds the second set threshold, the size of the pre-package unit corresponding to the post-package unit may be adjusted, so that the size of the post-package unit corresponding to the adjusted pre-package unit does not exceed the second set threshold. Similarly, the sizes of other pre-package units may also be adjusted in this way, so that the size of the online update package subsequently determined again by the terminal or the server can be smaller than the first set threshold.
Of course, after determining that the size of a certain packaged unit in the online update package exceeds the second set threshold, the terminal or the server may further determine, according to the identifier of the packaged unit, which software developer's terminal sent the pre-packaged unit corresponding to the packaged unit, according to the manner shown in fig. 2, and send a notification to the software developer's terminal in the form of information, so that the software developer adjusts the pre-packaged unit corresponding to the packaged unit after checking the notification.
It should be noted that the above-mentioned second set threshold may be a threshold set for all the packaged units in the online update package, or may also be a second set threshold set for each packaged unit in the online update package, and correspondingly, when the terminal or the server determines that the size of the online update package exceeds the first set threshold, each packaged unit included in the online update package may be checked to determine whether each packaged unit exceeds the second set threshold corresponding to the terminal or the server.
It should be noted that, in practical applications, whether the online update package, the offline update package, or the online installation package and the offline installation package exist in a compressed form, and since the embodiment of the present application intends to determine the size of the online update package, in the process of determining the size of each type of data in the offline update package, the online installation package, and the offline installation package, and determining each unit factor and each estimation factor, the determination should also be performed in a compressed form to ensure the rationality of the whole determination process. In addition, since the compression format of the online update package is usually determined by the online platform, in this embodiment of the application, the terminal or the server may first determine the compression format of the online installation package obtained from the online platform, and compress the subsequently obtained offline installation package and the offline update package according to the determined compression format, and then determine the size of the online update package according to the size of each type of data in the compressed online installation package, offline installation package and offline update package, where the compression format may be zip, tar, ditto, cab, bz2, jar, and the like.
Based on the same idea, the method for determining the size of the installation package provided in the embodiment of the present application further provides a device for determining the size of the installation package, as shown in fig. 4.
Fig. 4 is a schematic diagram of an apparatus for determining a size of an installation package according to an embodiment of the present application, which specifically includes:
the obtaining module 401 obtains an online installation package and an offline installation package corresponding to the online installation package;
a determining factor module 402, which determines each estimation factor according to the size of each type of data contained in the online installation package and the offline installation package, wherein each data only belongs to one type;
a first determining module 403, configured to determine sizes of data of various types included in the offline update package;
the second determining module 404 determines the size of the online update package corresponding to the offline update package according to the determined size of each type of data in the offline update package and each estimation factor.
The various types of data included in the offline installation package include: at least one of fixed data and variable data; each type of data included in the online installation package includes: at least one of fixed data, variable data, third party data.
The determination factor module 402 determines the size of the variable data included in the offline installation package and the online installation package, respectively; determining a first estimation factor according to the sizes of the variable data in the offline installation package and the online installation package which are respectively determined; determining the size of third party data contained in the online installation package; selecting any one data from variable data and fixed data contained in the offline installation package as first designated data; and determining a second estimation factor according to the third-party data and the size of the first specified data.
The second determining module 404 determines the size of the variable data in the online update packet according to the determined size of the variable data in the offline update packet and the first estimation factor; determining the size of third-party data in the online update package according to the second estimation factor and the size of data which is contained in the offline update package and has the same type as the first specified data; and determining the size of the online update package according to the determined variable data of the online update package, the size of the third party data and the size of the fixed data of the offline update package.
The variable data includes: at least one of binary data, device specific data; the first estimation factor includes: a third estimation factor and/or a fourth estimation factor;
the determining factor module 402 determines the sizes of binary data included in the offline installation package and the online installation package, and determines a third estimation factor according to the sizes of the binary data in the offline installation package and the online installation package determined respectively; and/or
Determining the size of the device-specific data contained in the offline installation package and the online installation package respectively, and determining a fourth estimation factor according to the size of the device-specific data in the offline installation package and the online installation package respectively determined;
the second determining module 404 determines the size of the binary data in the online update packet according to the determined size of the binary data in the offline update packet and the third estimation factor; determining the size of the device-specific data in the online update package according to the determined size of the device-specific data in the offline update package and the fourth estimation factor; and determining the size of the online update package according to the determined size of the binary data, the equipment special data and the third-party type data of the online update package and the size of the fixed type data of the offline update package.
The device further comprises:
a determining unit module 405 that determines each pre-package unit corresponding to each post-package unit included in the offline update package; respectively determining the sizes of the binary data, the equipment special data and the fixed data contained in each pre-packaging unit and the total size of each type of data in each pre-packaging unit; for each pre-packaging unit, determining each unit factor according to the binary data contained in the pre-packaging unit, the size of the equipment special data and the total size of each type of data in each pre-packaging unit; and determining the size of the packaged unit corresponding to the pre-packaging unit in the online update package according to the determined unit factors, the estimated factors, the size of the fixed data of the pre-packaging unit and the size of each type of data in the offline update package.
The determining unit module 405 determines a first unit factor according to the size of the binary data included in the pre-package unit and the determined total size of the binary data included in each pre-package unit; determining a second unit factor according to the size of the device-specific data contained in the pre-encapsulation unit and the determined total size of the device-specific data contained in each pre-encapsulation unit.
The determining unit module 405 determines, according to the first unit factor and the size of the binary data in the offline update packet, the size of the binary data of the post-package unit corresponding to the pre-package unit in the offline update packet; determining the size of the device-specific data of the encapsulated unit corresponding to the pre-encapsulation unit in the offline update package according to the second unit factor and the size of the device-specific data in the offline update package; determining the size of the binary data of the packaged unit corresponding to the pre-packaging unit in the online update package according to the third estimation factor and the determined size of the binary data of the packaged unit corresponding to the pre-packaging unit in the offline update package; determining the size of the device-specific data of the packaged unit corresponding to the pre-packaging unit in the online update package according to the fourth estimation factor and the determined size of the device-specific data of the packaged unit corresponding to the pre-packaging unit in the offline update package; and determining the size of the packaged unit corresponding to the pre-packaging unit in the online update package according to the size of the fixed data contained in the pre-packaging unit and the size of the binary data and the equipment special data of the packaged unit corresponding to the pre-packaging unit in the online update package.
The device further comprises:
and the adjusting module 406 adjusts the offline update package according to the determined size of the online update package.
The adjusting module 406 adjusts, for each packaged unit in the online update package, a pre-package unit corresponding to the packaged unit in the offline update package according to the determined size of the online update package and the determined size of the packaged unit.
In the method, a terminal or a server can acquire an offline installation package and an online installation package corresponding to an offline update package to be published on an online platform, and determine the size of an online update package corresponding to the offline update package and the online update package by determining the size of each type of data which are contained in the offline installation package and the online update package and are not overlapped with each other. Because the terminal or the server determines the size of the online update package not only by the size of a part of data in the online update package, but also by the size of each type of data included in the online update package and the offline update package, the size of the online update package is determined comprehensively, and the size of the online update package is different from that of each system in the prior art by a certain intersection, in the embodiment of the present application, each type of data determined by the terminal or the server in the process of determining the size of the online update package does not contain an intersection, that is, each type of data corresponds to only one type, so that the situation that the size of the finally determined online update package has a large deviation due to the intersection among the types of data is avoided, and therefore, in sum, compared with the prior art, the size of the online update package can be determined accurately by the method, and further brings convenience to the process that a software developer adjusts the size of the offline update package by determining the size of the online update package.
It should be noted that the execution subjects of the steps of the method provided in embodiment 1 may be the same device, or different devices may be used as the execution subjects of the method. For example, the executing agent of step S102 and step S103 may be a terminal, and the executing agent of step S101 may be a server; for another example, the execution subject of step 101 may be a terminal, and the execution subjects of step 102 and step 103 may be a server; and so on.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (20)

1. A method for determining an installation package size, comprising:
acquiring an online installation package and an offline installation package corresponding to the online installation package;
determining estimation factors according to the sizes of various types of data contained in the online installation package and the offline installation package, wherein each data only belongs to one type, and the estimation factors are proportional relations between the various types of data of the online installation package and the offline installation package;
determining the size of each type of data contained in the offline update package;
and determining the size of the online update package corresponding to the offline update package according to the determined size of each type of data in the offline update package and each estimation factor, wherein the proportional relationship between each type of data in the online update package and the offline update package is the same as the proportional relationship between each type of data in the online update package and the offline update package.
2. The method of claim 1, wherein the types of data included in the offline installation package include: at least one of fixed data and variable data; each type of data included in the online installation package includes: at least one of fixed data, variable data, third party data.
3. The method of claim 2, wherein determining the estimation factors based on the size of each type of data included in the online installation package and the offline installation package comprises:
respectively determining the sizes of variable data contained in the offline installation package and the online installation package;
determining a first estimation factor according to the sizes of the variable data in the offline installation package and the online installation package which are respectively determined;
determining the size of third party data contained in the online installation package;
selecting any one data from variable data and fixed data contained in the offline installation package as first designated data;
and determining a second estimation factor according to the third-party data and the size of the first specified data.
4. The method according to claim 3, wherein determining the size of the online update package after the offline update package is online according to the determined sizes of the types of data in the offline update package and the estimation factors comprises:
determining the size of the variable data in the online update package according to the determined size of the variable data in the offline update package and a first estimation factor;
determining the size of third-party data in the online update package according to the second estimation factor and the size of data which is contained in the offline update package and has the same type as the first specified data;
and determining the size of the online update package according to the determined variable data of the online update package, the size of the third party data and the size of the fixed data of the offline update package.
5. The method of claim 4, wherein the variable data comprises: at least one of binary data, device specific data;
the first estimation factor includes: a third estimation factor and/or a fourth estimation factor;
determining each estimation factor according to the size of each type of data contained in the online installation package and the offline installation package, wherein the determining specifically comprises the following steps:
determining the sizes of binary data contained in the offline installation package and the online installation package respectively, and determining a third estimation factor according to the sizes of the binary data in the offline installation package and the online installation package which are determined respectively; and/or
Determining the size of the device-specific data contained in the offline installation package and the online installation package respectively, and determining a fourth estimation factor according to the size of the device-specific data in the offline installation package and the online installation package respectively determined;
determining the size of the online update package after the offline update package is online according to the determined size of each type of data in the offline update package and each estimation factor, specifically comprising:
determining the size of the binary data in the online update package according to the determined size of the binary data in the offline update package and the third estimation factor;
determining the size of the device-specific data in the online update package according to the determined size of the device-specific data in the offline update package and the fourth estimation factor;
and determining the size of the online update package according to the determined size of the binary data, the equipment special data and the third-party type data of the online update package and the size of the fixed type data of the offline update package.
6. The method of claim 5, wherein the method further comprises:
determining each pre-package unit corresponding to each post-package unit included in the offline update package;
respectively determining the sizes of the binary data, the equipment special data and the fixed data contained in each pre-packaging unit and the total size of each type of data in each pre-packaging unit;
for each pre-packaging unit, determining each unit factor according to the binary data contained in the pre-packaging unit, the size of the equipment special data and the total size of each type of data in each pre-packaging unit;
and determining the size of the packaged unit corresponding to the pre-packaging unit in the online update package according to the determined unit factors, the estimation factors, the size of the fixed data of the pre-packaging unit and the size of each type of data in the offline update package, wherein the ratio of the size of each packaged unit to the total size of each packaging unit is the same as the ratio of the size of each pre-packaging unit to the size of each online update package, and the ratio of the size of each packaged unit in the online update package to the size of each packaged unit in the offline update package is the same as the ratio of the size of each post-packaging unit to the size of each online update package to the size of each offline update package.
7. The method of claim 6, wherein determining each unit factor according to the binary data contained in the pre-encapsulation unit, the size of the device-specific data, and the total size of each type of data in each pre-encapsulation unit comprises:
determining a first unit factor according to the size of the binary data contained in the pre-packaging unit and the determined total size of the binary data contained in each pre-packaging unit;
determining a second unit factor according to the size of the device-specific data contained in the pre-encapsulation unit and the determined total size of the device-specific data contained in each pre-encapsulation unit.
8. The method according to claim 7, wherein determining the size of the packed unit corresponding to the pre-packed unit in the online update package according to the determined unit factors, the estimation factors, the size of the fixed data of the pre-packed unit, and the sizes of the types of data in the offline update package comprises:
determining the size of the binary data of the packaged unit corresponding to the pre-packaging unit in the offline update package according to the first unit factor and the size of the binary data in the offline update package;
determining the size of the device-specific data of the encapsulated unit corresponding to the pre-encapsulation unit in the offline update package according to the second unit factor and the size of the device-specific data in the offline update package;
determining the size of the binary data of the packaged unit corresponding to the pre-packaging unit in the online update package according to the third estimation factor and the determined size of the binary data of the packaged unit corresponding to the pre-packaging unit in the offline update package;
determining the size of the device-specific data of the packaged unit corresponding to the pre-packaging unit in the online update package according to the fourth estimation factor and the determined size of the device-specific data of the packaged unit corresponding to the pre-packaging unit in the offline update package;
and determining the size of the packaged unit corresponding to the pre-packaging unit in the online update package according to the size of the fixed data contained in the pre-packaging unit and the size of the binary data and the equipment special data of the packaged unit corresponding to the pre-packaging unit in the online update package.
9. The method of claim 1, wherein the method further comprises:
and adjusting the offline update package according to the determined size of the online update package.
10. The method of claim 6, wherein adjusting the offline update package according to the determined size of the online update package comprises:
and aiming at each packaged unit in the online updating package, adjusting a pre-packaging unit corresponding to the packaged unit in the offline updating package according to the determined size of the online updating package and the determined size of the packaged unit.
11. An apparatus for determining a size of an installation package, comprising:
the system comprises an acquisition module, a storage module and a control module, wherein the acquisition module is used for acquiring an online installation package and an offline installation package corresponding to the online installation package;
the determining factor module is used for determining each estimation factor according to the size of each type of data contained in the online installation package and the offline installation package, wherein each data only belongs to one type, and the estimation factor is the proportional relation between each type of data of the online installation package and each type of data of the offline installation package;
the first determining module is used for determining the size of each type of data contained in the offline updating packet;
and the second determining module is used for determining the size of the online update package corresponding to the offline update package according to the determined size of each type of data in the offline update package and each estimation factor, wherein the proportional relationship between each type of data in the online update package and the offline update package is the same as the proportional relationship between each type of data in the online update package and the offline update package.
12. The apparatus of claim 11, wherein the types of data included in the offline installation package comprise: at least one of fixed data and variable data; each type of data included in the online installation package includes: at least one of fixed data, variable data, third party data.
13. The apparatus of claim 12, wherein the determination factor module determines a size of variable data contained in the offline installation package and the online installation package, respectively; determining a first estimation factor according to the sizes of the variable data in the offline installation package and the online installation package which are respectively determined; determining the size of third party data contained in the online installation package; selecting any one data from variable data and fixed data contained in the offline installation package as first designated data; and determining a second estimation factor according to the third-party data and the size of the first specified data.
14. The apparatus of claim 13, wherein the second determining module determines the size of the variable data in the online update packet based on the determined size of the variable data in the offline update packet and a first evaluation factor; determining the size of third-party data in the online update package according to the second estimation factor and the size of data which is contained in the offline update package and has the same type as the first specified data; and determining the size of the online update package according to the determined variable data of the online update package, the size of the third party data and the size of the fixed data of the offline update package.
15. The apparatus of claim 14, wherein the variable data comprises: at least one of binary data, device specific data; the first estimation factor includes: a third estimation factor and/or a fourth estimation factor;
the determining factor module is used for respectively determining the sizes of binary data contained in the offline installation package and the online installation package, and determining a third estimating factor according to the sizes of the binary data in the offline installation package and the online installation package which are respectively determined; and/or
Determining the size of the device-specific data contained in the offline installation package and the online installation package respectively, and determining a fourth estimation factor according to the size of the device-specific data in the offline installation package and the online installation package respectively determined;
the second determining module determines the size of the binary data in the online update package according to the determined size of the binary data in the offline update package and the third estimation factor; determining the size of the device-specific data in the online update package according to the determined size of the device-specific data in the offline update package and the fourth estimation factor; and determining the size of the online update package according to the determined size of the binary data, the equipment special data and the third-party type data of the online update package and the size of the fixed type data of the offline update package.
16. The apparatus of claim 15, wherein the apparatus further comprises:
a determining unit module that determines each pre-package unit corresponding to each post-package unit included in the offline update package; respectively determining the sizes of the binary data, the equipment special data and the fixed data contained in each pre-packaging unit and the total size of each type of data in each pre-packaging unit; for each pre-packaging unit, determining each unit factor according to the binary data contained in the pre-packaging unit, the size of the equipment special data and the total size of each type of data in each pre-packaging unit; and determining the size of the packaged unit corresponding to the pre-packaging unit in the online update package according to the determined unit factors, the estimation factors, the size of the fixed data of the pre-packaging unit and the size of each type of data in the offline update package, wherein the ratio of the size of each packaged unit to the total size of each packaging unit is the same as the ratio of the size of each pre-packaging unit to the size of each online update package, and the ratio of the size of each packaged unit in the online update package to the size of each packaged unit in the offline update package is the same as the ratio of the size of each post-packaging unit to the size of each online update package to the size of each offline update package.
17. The apparatus of claim 16, wherein the determining unit module determines a first unit factor according to a size of the binary data included in the pre-packing unit and a total size of the binary data included in each pre-packing unit; determining a second unit factor according to the size of the device-specific data contained in the pre-encapsulation unit and the determined total size of the device-specific data contained in each pre-encapsulation unit.
18. The apparatus of claim 17, wherein the determine unit module determines a size of the binary data of the post-package unit corresponding to the pre-package unit in the offline update packet according to the first unit factor and a size of the binary data in the offline update packet; determining the size of the device-specific data of the encapsulated unit corresponding to the pre-encapsulation unit in the offline update package according to the second unit factor and the size of the device-specific data in the offline update package; determining the size of the binary data of the packaged unit corresponding to the pre-packaging unit in the online update package according to the third estimation factor and the determined size of the binary data of the packaged unit corresponding to the pre-packaging unit in the offline update package; determining the size of the device-specific data of the packaged unit corresponding to the pre-packaging unit in the online update package according to the fourth estimation factor and the determined size of the device-specific data of the packaged unit corresponding to the pre-packaging unit in the offline update package; and determining the size of the packaged unit corresponding to the pre-packaging unit in the online update package according to the size of the fixed data contained in the pre-packaging unit and the size of the binary data and the equipment special data of the packaged unit corresponding to the pre-packaging unit in the online update package.
19. The apparatus of claim 11, wherein the apparatus further comprises:
and the adjusting module is used for adjusting the offline update package according to the determined size of the online update package.
20. The apparatus of claim 19, wherein the adjusting module adjusts, for each of the post-package units in the online update package, a pre-package unit corresponding to the post-package unit in the offline update package according to the determined size of the online update package and the determined size of the post-package unit.
CN201610671017.9A 2016-08-15 2016-08-15 Method and device for determining size of installation package Active CN106874025B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610671017.9A CN106874025B (en) 2016-08-15 2016-08-15 Method and device for determining size of installation package

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610671017.9A CN106874025B (en) 2016-08-15 2016-08-15 Method and device for determining size of installation package

Publications (2)

Publication Number Publication Date
CN106874025A CN106874025A (en) 2017-06-20
CN106874025B true CN106874025B (en) 2020-04-24

Family

ID=59238911

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610671017.9A Active CN106874025B (en) 2016-08-15 2016-08-15 Method and device for determining size of installation package

Country Status (1)

Country Link
CN (1) CN106874025B (en)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050204332A1 (en) * 2004-03-15 2005-09-15 Ramco Systems Limited Method and system for developing large web-based multi-language applications
CN101635640B (en) * 2009-09-04 2011-09-21 江苏天智互联科技有限公司 Method for automatically releasing terminal program version of WEB network station system server
CN103744692A (en) * 2013-12-13 2014-04-23 贝壳网际(北京)安全技术有限公司 Method and system for determining size of mobile terminal storage space occupied by application software

Also Published As

Publication number Publication date
CN106874025A (en) 2017-06-20

Similar Documents

Publication Publication Date Title
CN110768912B (en) API gateway current limiting method and device
US20180247263A1 (en) Method and apparatus for adjusting merchant delivery range
WO2016119412A1 (en) Resource scaling method on cloud platform and cloud platform
US10555142B2 (en) Adaptive multi-tenant monitoring in resource constrained environments
US9455928B2 (en) Balancing a load on a multiple consumer queue
CN110888922B (en) Method and device for creating target table during data synchronization
US10664743B2 (en) Modeling a subject process by machine learning with adaptive inputs
CN107291551B (en) Load balancing scheduling method and device for container
US20190155661A1 (en) Adaptive scaling of workloads in a distributed computing environment
CN106874025B (en) Method and device for determining size of installation package
CN111373374A (en) Automatic diagonal scaling of workloads in a distributed computing environment
CN108347355B (en) Application state detection method and device
KR20210113963A (en) Method and appartus for obtaining information
US11323379B2 (en) Adaptive monitoring of computing systems
CN115048186A (en) Method and device for processing expansion and contraction of service container, storage medium and electronic equipment
US11269689B2 (en) Distribution of components of displayed data between a server and a client based on server and client load factors
US10042787B2 (en) Controlling data transfer for data processing
US20180060887A1 (en) Brand equity prediction
CN110874268B (en) Data processing method, device and equipment
CN114254841A (en) Resource limit processing method, computing device, user device and server
CN112181577A (en) Display control system, method and device
CN110633181B (en) Visual display method and device
CN109729393B (en) Data processing method and device
US20220200879A1 (en) Managing stateful workloads executing on temporarily available resources of a cloud computing system
CN108805692B (en) Variable selection method and device and server

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
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20201015

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Patentee after: Innovative advanced technology Co.,Ltd.

Address before: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Patentee before: Advanced innovation technology Co.,Ltd.

Effective date of registration: 20201015

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Patentee after: Advanced innovation technology Co.,Ltd.

Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands

Patentee before: Alibaba Group Holding Ltd.