WO2021097621A1 - 一种增量包生成方法、增量包生成装置及服务器 - Google Patents

一种增量包生成方法、增量包生成装置及服务器 Download PDF

Info

Publication number
WO2021097621A1
WO2021097621A1 PCT/CN2019/119240 CN2019119240W WO2021097621A1 WO 2021097621 A1 WO2021097621 A1 WO 2021097621A1 CN 2019119240 W CN2019119240 W CN 2019119240W WO 2021097621 A1 WO2021097621 A1 WO 2021097621A1
Authority
WO
WIPO (PCT)
Prior art keywords
installation package
difference
package
original
original installation
Prior art date
Application number
PCT/CN2019/119240
Other languages
English (en)
French (fr)
Inventor
赵杰
Original Assignee
深圳市欢太科技有限公司
Oppo广东移动通信有限公司
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 深圳市欢太科技有限公司, Oppo广东移动通信有限公司 filed Critical 深圳市欢太科技有限公司
Priority to CN201980100488.6A priority Critical patent/CN114402288A/zh
Priority to PCT/CN2019/119240 priority patent/WO2021097621A1/zh
Publication of WO2021097621A1 publication Critical patent/WO2021097621A1/zh

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

Definitions

  • This application belongs to the field of data processing technology, and in particular relates to an incremental package generation method, an incremental package generation device, a server, and a computer-readable storage medium.
  • This application provides an incremental package generation method, an incremental package generation device, a server, and a computer-readable storage medium, which can generate incremental packages based on various applications, so that when the client downloads a new application for the first time, it is consistent with The data consumption of the client can be reduced to a certain extent when required.
  • the first aspect of this application provides an incremental package generation method, including:
  • the second aspect of the present application provides an incremental package generation device, including:
  • the first obtaining unit is configured to obtain more than one original installation package, where the application programs corresponding to each original installation package belong to different application categories;
  • the first determining unit is used to determine each original installation package as a to-be-differentiated installation package
  • the differential unit is used to perform differential calculations on the installation package to be synthesized and each installation package to be differentialized to obtain the differential results corresponding to the respective differential calculations in this round;
  • the screening unit is used to screen the above-mentioned difference results based on preset screening conditions to obtain a preset number of target difference results;
  • Combination unit used to combine any two target difference results into a difference result group
  • the second determining unit is configured to determine, for any difference result group, the original installation package associated with any target difference result in the difference result group as the installation package to be spliced of the difference result group;
  • the splicing unit is used for splicing all the installation packages to be spliced in the above-mentioned difference result group to obtain the splicing installation package of the above-mentioned difference result group;
  • the update unit is used to update the above-mentioned installation package to be differenced into the spliced installation package of each difference result group;
  • the above-mentioned difference unit is triggered to execute again after the above-mentioned update unit, until the preset stopping condition is satisfied.
  • a third aspect of the present application provides a server.
  • the server includes a memory, a processor, and a computer program stored in the memory and capable of running on the processor.
  • the processor executes the computer program, the above first aspect is implemented. Steps of the method.
  • the fourth aspect of the present application provides a computer-readable storage medium, the above-mentioned computer-readable storage medium stores a computer program, and when the above-mentioned computer program is executed by a processor, the steps of the method of the above first aspect are realized.
  • the fifth aspect of the present application provides a computer program product.
  • the computer program product includes a computer program, and the computer program is executed by one or more processors to implement the steps of the method of the first aspect.
  • FIG. 1 is a schematic diagram of the implementation process of an incremental package generation method provided by an embodiment of the present application
  • FIG. 2 is a schematic diagram of the difference operation performed by the incremental packet generation method provided by the embodiment of the present application
  • Fig. 3 is a structural block diagram of an incremental package generating apparatus provided by an embodiment of the present application.
  • Fig. 4 is a schematic diagram of a server provided by an embodiment of the present application.
  • the following describes a method for generating an incremental package provided by an embodiment of the present application. Please refer to FIG. 1.
  • the method for generating an incremental package in an embodiment of the present application is applied to a server and includes:
  • step 101 obtain more than one original installation package
  • the server may first obtain more than one original installation package.
  • the application programs corresponding to each original installation package belong to different application categories.
  • the server may pre-divide more than one application category, for example, it may be divided into instant messaging application category, shopping application category, photography tool application category, game application category, etc.; further, considering the game application category, different game applications
  • the game application category can be further subdivided. For example, according to the development engine, there are unity game application category, cocos game application category and laya game application category, etc. The above applications are not included here.
  • the classification of categories is limited. After multiple application categories are divided, all applications in the application mall are classified based on the application categories obtained by the division.
  • each application can only be classified under one type of application category. That is, for one application, it cannot belong to two different application categories at the same time.
  • more than one application category can be obtained, and each application category contains more than one application program.
  • a unique application is selected under each application category, and the installation package of the application is determined as the original installation package under the corresponding application category.
  • application category 1 contains four applications, APP1, APP2, APP3, and APP4.
  • One application can be selected from these four applications, such as APP2, and the installation package APP2-apk of APP2 can be determined as The original installation package of application category 1.
  • step 101 specifically includes:
  • the application mall will count the installation volume of each installation package; alternatively, it is generally believed that the mobile terminal will usually automatically perform the installation operation after downloading the installation package. Therefore, here can also be directly obtained from the application mall.
  • the download volume of the installation package, and the download volume of the installation package as the installation volume of the installation package.
  • the situation where a mobile terminal downloads the same installation package multiple times can be filtered out, that is, when a mobile terminal downloads the same installation package multiple times, the installation package
  • the number of downloads (that is, the number of installations) will only be counted once.
  • A2. Determine the installation package with the highest installation volume under each application category as the original installation package.
  • the installation package with the highest installation volume under each application category can be filtered based on the installation volume of each installation package, and the installation package with the highest installation volume under each application category can be determined as the original installation package.
  • the original installation package can also be determined in other ways. For example, it can be to obtain the comment volume of each installation package in the application store, and determine the installation package with the highest comment volume under each application category as the original installation package; or An installation package is randomly determined as the original installation package under each application category, and the method for determining the above-mentioned original installation package is not limited here.
  • each original installation package is determined as a to-be-differentiated installation package
  • each original installation package is first determined as the installation package to be differential. It should be noted that after each round of difference calculation, the above-mentioned installation package for difference will be updated, that is, the above-mentioned installation package for difference will be updated to other installation packages later.
  • step 103 the difference operation is performed on the installation package to be synthesized and each installation package to be differenced, respectively, to obtain the difference results corresponding to each difference operation in this round;
  • the above-mentioned difference operation is specifically to find the difference between two input files for performing the difference operation, and the difference is the difference result, and the difference result can be restored by combining any input file to obtain another input file.
  • the input file file1 and the input file file2 are differentiated, and the difference result diff-file1-file2 is obtained.
  • the input file file2 can be restored; or, when the input file file2 and the difference result diff-file1-file2 are known, the result can be restored Input file file1.
  • the above-mentioned installation package to be synthesized refers to any installation package in the non-original installation package.
  • the application category 1 includes four applications: APP1, APP2, APP3, and APP4, and the installation package of APP2 If APP2-apk is determined as the original installation package of application category 1, the installation package of APP1, APP3 or APP4 can all be used as the installation package to be synthesized. It should be noted that there will be multiple difference operations in one round. For example, in the first round of difference operations, assuming there are four application categories, the original installation packages corresponding to these four application categories will be used as the pending difference.
  • the installation package that is, there are four installation packages to be differential; the installation package to be synthesized will perform differential calculations with each installation package to be differential, and a total of four differential calculations are performed to obtain the corresponding four differential results; it can be seen that this round The number of difference results obtained will be consistent with the number of installation packages to be differentiated.
  • step 104 the above difference results are filtered based on preset filtering conditions to obtain a preset number of target difference results
  • step 104 considering that the number of difference results in this round obtained in step 103 may be many, in order to reduce the amount of calculation and avoid the data explosion of the server, in step 104, it can be based on preset filtering conditions.
  • the above difference results are screened to obtain a preset number of target difference results, where the above preset number is an empirical value set by the research and development personnel, and the specific value of the above preset number is not limited here.
  • the respective difference results may be sorted based on a preset sort order first, and then the preset number of difference results that are ranked higher are determined as the target difference results for this round.
  • the file size of the difference result is smaller, it can be considered that the difference between the two input files participating in the difference is smaller. Therefore, the aforementioned preset sorting order may be sorted in the order of the file size of the difference result from small to large. Of course, other sorting orders can also be used for sorting, which is not limited here.
  • step 105 group any two target difference results into a difference result group
  • any two target difference results can form a difference result group, that is, two target difference results are taken out of the above target difference results to be combined.
  • the above-mentioned preset number is N
  • the number of difference result groups that can be formed based on step 105 is A.
  • step 106 for any difference result group, the original installation package associated with any target difference result in the difference result group is determined as the installation package to be spliced of the difference result group;
  • each difference result group is composed of two target difference results, where each target difference result is associated with more than one original installation package.
  • the original installation package may be determined as one of the installation packages to be spliced in the difference result group. For example, suppose there are four application categories, namely application category 1, application category 2, application category 3, and application category 4, corresponding to category 1-apk, category 2-apk, category 3-apk, and category 4-apk. After performing the first round of difference calculation with the installation package to be synthesized, the original installation package will obtain the difference result 1, the difference result 2, the difference result 3, and the difference result 4 respectively.
  • Difference result 2 and difference result 3 can form three difference result groups (differential result 1, difference result 2), (differential result 1, difference result 3) and (differential result 2, difference result 3).
  • Result 1, difference result 2) In this difference result group, it can be found that the original installation package related to difference result 1 is category 1-apk, and the original installation package related to difference result 2 is category 2-apk, then category 1-apk The two original installation packages of category 2-apk will be determined as the installation package to be spliced of the difference result group (differential result 1, difference result 2).
  • step 107 all the installation packages to be spliced in the above-mentioned difference result group are spliced to obtain the spliced installation packages of the above-mentioned difference result group;
  • splicing specifically refers to splicing two files together in order to form one file.
  • the difference in the splicing order mentioned above will affect the file content of the subsequent difference results, but will not affect the file size of the subsequent difference results.
  • a splicing order can be pre-appointed, for example, each time the splicing is performed , All are spliced in the order of the file size of the installation package to be spliced from small to large; of course, the splicing sequence mentioned above can also be another sequence, as long as it is agreed in advance, and it is not limited here.
  • step 108 the above-mentioned installation package to be differenced is updated to the spliced installation package of each difference result group;
  • the above-mentioned installation package to be differentiated is updated, specifically, the spliced installation package updated to each of the above-mentioned difference result groups.
  • the spliced installation package of category 1-apk-category 2-apk will participate in the next round of difference calculation as one of the new to-be-differentiated installation packages, that is, the next One of the difference operations performed during the round difference operation is to perform the difference operation on the composite installation package and the spliced installation package of category 1-apk-category 2-apk.
  • step 109 it is detected whether the preset stop condition is met, and if the preset stop condition is still not met, then return to step 103 and subsequent steps.
  • the difference operation when the preset stop condition has been met, the difference operation can be stopped, and all the difference results obtained from each round of difference operation are saved; and when the preset stop condition has not been met In the case of conditions, it is necessary to continue the difference operation, that is, return to step 103 and subsequent steps.
  • the differential round can be initialized after step 102, and the initialization value of the differential round is set to 0; and after each step 103, the above-mentioned differential round is updated, specifically, the difference round is recorded Add 1 to the value of to record how many rounds of difference calculations have been performed.
  • the above-mentioned stopping condition may be: the above-mentioned differential round reaches a preset differential round threshold, and step 109 may be specifically expressed as: detecting whether the above-mentioned differential round reaches the above-mentioned differential round Sub-threshold; if the above-mentioned difference round does not reach the above-mentioned difference round threshold, return to step 103 and subsequent steps; if the above-mentioned difference round has reached the above-mentioned difference round threshold, save all the differences obtained from each round of difference calculation result.
  • step 109 may be specifically expressed as: detection and target-to-be-detected Whether the number of original installation packages associated with the difference result reaches the above-mentioned quantity threshold, where the above-mentioned target difference result to be detected is any target difference result; if the number of original installation packages associated with the above-mentioned target difference result does not reach the above-mentioned If the number threshold value, return to step 103 and subsequent steps; if the number of original installation packages associated with the target difference result to be detected has reached the number threshold value, all difference results obtained from each round of difference calculation are saved.
  • the difference operation is performed on the installation package to be synthesized and the spliced installation package of category 1-apk-category 2-apk to obtain a difference result of 5.
  • the difference result 5 is the target difference result, you need to determine the original installation package associated with the difference result 5: because the difference result 5 is through the installation package to be synthesized and the spliced installation package of category 1-apk-category 2-apk
  • the difference calculation is performed, and the spliced installation package of category 1-apk-category 2-apk is spliced by the original installation package category 1-apk and category 2-apk.
  • the original installation packages are category 1-apk and category 2-apk, so it can be known that the number of original installation packages associated with the difference result 5 has reached the above-mentioned number threshold 2. Based on this, the next round of difference calculations can not be performed, and Save all the difference results obtained in each round of difference operation.
  • the difference result may also be recorded after each round of difference calculation.
  • the above incremental packet generation method further includes:
  • the aforementioned database can be set locally on the aforementioned server, or can be set in another location, which is not limited here.
  • the client traverses its file system to learn all the original installation packages that it has installed.
  • the client may not be able to know what the original installation package contains in time. Therefore, the client can also install it after traversing its own file system. All the installation packages of the client are reported to the server through the above-mentioned download instruction. After analyzing and knowing all the installation packages installed by the client, the server can learn the original installation packages installed by the client by comparing with the original installation packages.
  • the above step C2 can be implemented in the following way: firstly detect whether there is a set of candidate original installation packages in the above database, where each original installation package in the set of candidate original installation packages has been installed by the client, if it is detected If there is only one candidate original installation package set, the only one candidate original installation package set is directly determined as the target original installation package set; if it is detected that there are more than two candidate original installation package sets, each candidate original installation package is obtained The number of original installation packages included in the collection, and the candidate original installation package set containing the largest number of original installation packages is determined as the target original installation package set.
  • the client can restore the above-mentioned to-be-combined installation through the difference result associated with the target original installation package set. package. It should be noted that if the client does not install any original installation package, any matching candidate original installation package set cannot be found in step C2. At this time, the server can only send the installation to be synthesized to the client. The full package of the package, that is, the client can only download the installation package to be synthesized in full at this time.
  • the stopping condition is that the difference round reaches 3 rounds, or the number of original installation packages associated with any target difference result reaches 3, and it is assumed that the preset number of target difference results is 3.
  • difference result 1 difference result 2, difference result 3, and difference result 4 are obtained respectively.
  • the filtered target difference results are difference result 1, difference result 2, difference result 3, consisting of (differential result 1, difference result 2), (differential result 1, difference result 3), and (differential result 2, difference result 3).
  • the splicing installation package that can be obtained (differential result 1, difference result 2) is category 1-apk-category 2-apk
  • the splicing installation package of (differential result 1, difference result 3) is category 1-apk-category 3-apk
  • the splicing installation package of (Differential Result 2, Difference Result 3) is category 2-apk-category 3-apk. That is, the above category 1-apk-category 2-apk, category 1-apk-category 3-apk, and category 2-apk-category 3-apk are updated as the second round of differential installation packages.
  • difference result 5 is the difference between category 1-apk-category 2-apk and apk0; difference result 6 is the difference between category 1-apk-category 3-apk and apk0; difference result 7 is category 2-apk-category The difference between 3-apk and apk0 is derived.
  • the above difference result 5, difference result 6, and difference result 7 are all target difference results, which consist of (difference result 5, difference result 6), (difference result 5, difference result 7) and (difference result 6, difference result 7).
  • Group difference result group since the original installation package associated with difference result 5 is category 1-apk and category 2-apk, the original installation package associated with difference result 6 is category 1-apk and category 3-apk, which are related to difference result 7.
  • the original installation package of the link is category 2-apk and category 3-apk.
  • the splicing installation packages are all category 1-apk, category 2-apk, and category 3-apk, that is, the splicing installation packages obtained by these three sets of difference result groups are the same, and they are all category 1-apk-category 2-apk-category 3-apk.
  • the client sends a download instruction to the server, and the server learns the original installation package that the client has downloaded by parsing the download instruction.
  • the specific restoration process is: the original installation package installed on the client: category 1-apk and category 3-apk are spliced in accordance with the agreed splicing order to obtain category 1-apk-category 3-apk; because the server is performing differential calculations ,
  • the above difference result 6 is the difference between category 1-apk-category 3-apk and apk0, so the client can restore the installation package apk0 to be synthesized based on the spliced category 1-apk-category 3-apk and the difference result 6. .
  • the server will directly send the entire installation package apk0 to be synthesized to the client.
  • the differential file for each other installation package is generated as an incremental package based on the installation package of each application of different categories in the server in advance.
  • the subsequent client downloads the new application for the first time.
  • the synthesis of packages can reduce the client's traffic consumption to a certain extent.
  • Embodiment 2 of the present application provides an incremental package generating device.
  • the above incremental package generating device can be integrated in a server.
  • the incremental package generating device 300 in this embodiment of the present application includes:
  • the first obtaining unit 301 is configured to obtain more than one original installation package, where the application programs corresponding to each original installation package belong to different application categories;
  • the first determining unit 302 is configured to determine each original installation package as a to-be-differentiated installation package
  • the difference unit 303 is configured to perform difference calculations on the installation package to be synthesized and each installation package to be differentiated to obtain the difference results corresponding to each difference operation in the current round;
  • the screening unit 304 is configured to screen the aforementioned difference results based on preset screening conditions to obtain a preset number of target difference results;
  • the combining unit 305 is used to combine any two target difference results into a difference result group
  • the second determining unit 306 is configured to determine, for any difference result group, the original installation package associated with any target difference result in the difference result group as the installation package to be spliced of the difference result group;
  • the splicing unit 307 is configured to splice all the installation packages to be spliced in the difference result group to obtain the spliced installation package of the difference result group;
  • the update unit 308 is configured to update the above-mentioned installation package to be differenced into the spliced installation package of each difference result group;
  • the difference unit 303 is triggered to execute again after the update unit 308 until the preset stop condition is satisfied.
  • the foregoing incremental package generating apparatus 300 further includes:
  • the second acquiring unit is configured to respectively acquire the original installation package set associated with each difference result, wherein the above-mentioned original installation package set includes more than one original installation package;
  • the recording unit is used to record each difference result and the original installation package collection associated with each difference result in a preset database.
  • the foregoing incremental package generating apparatus 300 further includes:
  • the parsing unit is configured to, if a download instruction sent by the client based on the above-mentioned installation package to be synthesized is received, analyze the above-mentioned download instruction to obtain the original installation package installed by the above-mentioned client;
  • the searching unit is configured to find the original installation package collection with the highest degree of matching with the original installation package installed by the client in the aforementioned database as the target original installation package collection;
  • the sending unit is configured to send the difference result associated with the target original installation package set to the client, so that the client synthesizes the installation package to be synthesized based on the difference result and the original installation package installed by the client.
  • the above search unit includes:
  • the candidate original installation package set detection subunit is used to detect whether there is a candidate original installation package set in the database, wherein each original installation package in the candidate original installation package set has been installed by the client;
  • the original installation package quantity obtaining subunit is used to obtain the number of original installation packages contained in each candidate original installation package set if there is more than one candidate original installation package set;
  • the target original installation package set determining subunit is used to determine the candidate original installation package set containing the largest number of original installation packages as the target original installation package set.
  • the foregoing screening unit 304 includes:
  • the sorting subunit is used to sort the difference results based on the preset sorting order
  • the target difference result determination sub-unit is used to determine the preset number of difference results ranked at the top as the target difference result of the current round.
  • the foregoing first obtaining unit 301 includes:
  • the installation quantity acquisition subunit is used to obtain the installation quantity of each installation package in the application mall
  • the original installation package determination subunit is used to determine the installation package with the highest installation volume under each application category as the original installation package.
  • the foregoing incremental package generating apparatus 300 further includes:
  • the differential round initialization unit is used to initialize the differential round after the first determining unit 302 determines each original installation package as the installation package to be differential;
  • the difference round update unit is used to update the difference round after the update unit 308 performs difference calculations on the installation package to be synthesized and each installation package to be differenced, and obtains the difference results corresponding to each difference operation in the current round.
  • the aforementioned preset stopping condition is that the aforementioned differential round reaches a preset differential round threshold
  • the aforementioned incremental packet generating device 300 further includes:
  • the first detection unit is configured to detect whether the above-mentioned differential round reaches the above-mentioned differential round threshold
  • the first saving unit is configured to save all the difference results obtained in each round of difference calculation if the above difference round has reached the above difference round threshold;
  • the difference unit 303 is triggered when the difference round does not reach the difference round threshold.
  • the foregoing preset stopping condition is that the number of original installation packages associated with any target difference result reaches a preset number threshold, then the foregoing incremental package generating device 300 further includes:
  • the second detection unit is configured to detect whether the number of original installation packages associated with the difference result of the target to be detected reaches the above-mentioned quantity threshold, wherein the difference result of the target to be detected is any target difference result;
  • the second saving unit is configured to save all the difference results obtained in each round of difference operation if the number of original installation packages associated with the above-mentioned target difference result to be detected has reached the above-mentioned quantity threshold;
  • the difference unit 303 is triggered when the number of original installation packages associated with the difference result of the target to be detected does not reach the number threshold.
  • the differential file for each other installation package is generated as an incremental package based on the installation package of each application of different categories in the server in advance.
  • the subsequent client downloads the new application for the first time.
  • the synthesis of packages can reduce the client's traffic consumption to a certain extent.
  • Embodiment 3 of the present application provides a server. Please refer to FIG. 4.
  • the server in the embodiment of the present application includes: a memory 401, one or more processors 402 (only one is shown in FIG. 4) and stored on the memory 401 A computer program that can run on the processor.
  • the memory 401 is used to store software programs and modules, and the processor 402 executes various functional applications and data processing by running the software programs and units stored in the memory 401 to obtain resources corresponding to the aforementioned preset events.
  • the processor 402 implements the following steps when running the above-mentioned computer program stored in the memory 401:
  • the processor 402 further implements the following steps by running the above-mentioned computer program stored in the memory 401:
  • the processor 402 further implements the following steps when running the above-mentioned computer program stored in the memory 401:
  • the above-mentioned download instruction is parsed to obtain the original installation package installed by the above-mentioned client;
  • the difference result associated with the target original installation package set is sent to the client, so that the client synthesizes the installation package to be synthesized based on the difference result and the original installation package installed by the client.
  • the above-mentioned database searches for the original installation package set with the highest degree of matching with the original installation package installed by the client as the target original installation.
  • Package collection including:
  • the candidate original installation package set containing the largest number of original installation packages is determined as the target original installation package set.
  • the fifth possibility provided based on the first possible implementation manner, or the second possible implementation manner as the basis, or the third possible implementation manner as the basis, or the fourth possible implementation manner as the basis includes:
  • the preset number of difference results ranked at the top is determined as the target difference result of this round.
  • the foregoing obtaining more than one original installation package includes:
  • the installation package with the highest installation volume under each application category is determined as the original installation package.
  • the seventh possibility is provided based on the first possible implementation manner, or the second possible implementation manner as the basis, or the third possible implementation manner as the basis, or the fourth possible implementation manner as the basis
  • the processor 402 further implements the following steps by running the computer program stored in the memory 401:
  • the processor 402 returns by running the above-mentioned computer program stored in the memory 401. Implement the following steps:
  • the aforementioned preset stopping condition is that the aforementioned differential round reaches the preset differential round threshold, then the aforementioned return to execute the above-mentioned pending synthesis
  • the installation package and each to-be-differentiated installation package respectively perform differential calculation steps and subsequent steps until the preset stopping conditions are met, including:
  • the preset stop condition is that the number of original installation packages associated with any target difference result reaches the preset number threshold, and then the foregoing returns to execute the foregoing separate installation package to be synthesized and each installation package to be differentiated
  • the steps and subsequent steps of the difference operation until the preset stopping conditions are met including:
  • the above-mentioned server may further include: one or more input devices 403 (only one is shown in FIG. 4) and one or more output devices 404 (only one is shown in FIG. 4).
  • the memory 401, the processor 402, the input device 403, and the output device 404 are connected by a bus 405.
  • the processor 402 may be a central processing unit (Central Processing Unit, CPU), and the processor may also be other general-purpose processors or digital signal processors (Digital Signal Processors, DSPs). , Application Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc.
  • the general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like.
  • the input device 403 may include a keyboard, a touch panel, a fingerprint sensor (used to collect user fingerprint information and fingerprint orientation information), a microphone, etc.
  • the output device 404 may include a display, a speaker, and the like.
  • the memory 401 may include a read-only memory and a random access memory, and provides instructions and data to the processor 402. A part or all of the memory 401 may also include a non-volatile random access memory. For example, the memory 401 may also store device type information.
  • the differential file for each other installation package is generated as an incremental package based on the installation package of each application of different categories in the server in advance.
  • the subsequent client downloads the new application for the first time.
  • the synthesis of packages can reduce the client's traffic consumption to a certain extent.
  • the disclosed device and method may be implemented in other ways.
  • the system embodiment described above is only illustrative.
  • the division of the above-mentioned modules or units is only a logical function division.
  • there may be other division methods for example, multiple units or components may be combined. Or it can be integrated into another system, or some features can be ignored or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
  • the units described above as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • the aforementioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • this application implements all or part of the processes in the above-mentioned embodiments and methods, and can also be completed by instructing relevant hardware through a computer program.
  • the above-mentioned computer program can be stored in a computer-readable storage medium, and the computer program When executed by the processor, the steps of the foregoing method embodiments can be implemented.
  • the above-mentioned computer program includes computer program code, and the above-mentioned computer program code may be in the form of source code, object code, executable file, or some intermediate forms.
  • the above-mentioned computer-readable storage medium may include: any entity or device capable of carrying the above-mentioned computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer readable memory, read-only memory (ROM, Read-Only Memory) ), Random Access Memory (RAM, Random Access Memory), electrical carrier signal, telecommunications signal, and software distribution media, etc.
  • the content contained in the above-mentioned computer-readable storage medium can be appropriately added or deleted according to the requirements of the legislation and patent practice in the jurisdiction.
  • the computer-readable storage The medium does not include electrical carrier signals and telecommunication signals.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

提供一种增量包生成方法、装置及服务器。该方法包括:获取一个以上原始安装包;将每一个原始安装包均确定为待差分安装包;将待合成安装包与各个待差分安装包分别进行差分运算,得到本轮各个差分运算所分别对应的差分结果;基于预设的筛选条件对差分结果进行筛选,得到预设数量的目标差分结果;将与任意两个目标差分结果相关联的原始安装包进行拼接,得到一个以上拼接安装包;将待差分安装包更新为拼接安装包;返回执行将待合成安装包与各个待差分安装包分别进行差分运算的步骤及后续步骤,直至满足预设的停止条件。

Description

一种增量包生成方法、增量包生成装置及服务器 技术领域
本申请属于数据处理技术领域,尤其涉及一种增量包生成方法、增量包生成装置、服务器及计算机可读存储介质。
背景技术
当前,绝大部分服务器都仅对新旧版本的应用进行差分计算以生成应用的增量包。在客户端已下载了旧版本的应用的情况下,其可以从服务器下载上述增量包来合成新版本的应用;然而,在客户端还未下载旧版本的应用的情况下,其将只能对该新版本的应用进行全量下载。
发明内容
本申请提供一种增量包生成方法、增量包生成装置、服务器及计算机可读存储介质,可基于各种不同的应用生成增量包,使得客户端第一次下载新应用时,在符合要求的情况下可一定程度上减少客户端的流量消耗。
本申请的第一方面提供了一种增量包生成方法,包括:
获取一个以上原始安装包,其中,各个原始安装包所对应的应用程序分别属于不同的应用类别;
将每一个原始安装包均确定为待差分安装包;
将待合成安装包与各个待差分安装包分别进行差分运算,得到本轮各个差分运算所分别对应的差分结果;
基于预设的筛选条件对上述差分结果进行筛选,得到预设数量的目标差分结果;
将任意两个目标差分结果组成差分结果组;
针对任一差分结果组,将与上述差分结果组中的任一目标差分结果相关联的原始安装包均确定为上述差分结果组的待拼接安装包;
将上述差分结果组的所有待拼接安装包进行拼接,得到上述差分结果组的拼接安装包;
将上述待差分安装包更新为各个差分结果组的拼接安装包;
返回执行上述将待合成安装包与各个待差分安装包分别进行差分运算的步骤及后续步骤,直至满足预设的停止条件。
本申请的第二方面提供了一种增量包生成装置,包括:
第一获取单元,用于获取一个以上原始安装包,其中,各个原始安装包所对应的应用程序分别属于不同的应用类别;
第一确定单元,用于将每一个原始安装包均确定为待差分安装包;
差分单元,用于将待合成安装包与各个待差分安装包分别进行差分运算,得到本轮各 个差分运算所分别对应的差分结果;
筛选单元,用于基于预设的筛选条件对上述差分结果进行筛选,得到预设数量的目标差分结果;
组合单元,用于将任意两个目标差分结果组成差分结果组;
第二确定单元,用于针对任一差分结果组,将与上述差分结果组中的任一目标差分结果相关联的原始安装包均确定为上述差分结果组的待拼接安装包;
拼接单元,用于将上述差分结果组的所有待拼接安装包进行拼接,得到上述差分结果组的拼接安装包;
更新单元,用于将上述待差分安装包更新为各个差分结果组的拼接安装包;
其中,上述差分单元在上述更新单元之后再次被触发执行,直至满足预设的停止条件。
本申请的第三方面提供了一种服务器,上述服务器包括存储器、处理器以及存储在上述存储器中并可在上述处理器上运行的计算机程序,上述处理器执行上述计算机程序时实现如上第一方面的方法的步骤。
本申请的第四方面提供了一种计算机可读存储介质,上述计算机可读存储介质存储有计算机程序,上述计算机程序被处理器执行时实现如上第一方面的方法的步骤。
本申请的第五方面提供了一种计算机程序产品,上述计算机程序产品包括计算机程序,上述计算机程序被一个或多个处理器执行时实现如上述第一方面的方法的步骤。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本申请实施例提供的增量包生成方法的实现流程示意图;
图2是本申请实施例提供的增量包生成方法所进行的差分运算示意图;
图3是本申请实施例提供的增量包生成装置的结构框图;
图4是本申请实施例提供的服务器的示意图。
具体实施方式
以下描述中,为了说明而不是为了限定,提出了诸如特定系统结构、技术之类的具体细节,以便透彻理解本申请实施例。然而,本领域的技术人员应当清楚,在没有这些具体细节的其它实施例中也可以实现本申请。在其它情况中,省略对众所周知的系统、装置、电路以及方法的详细说明,以免不必要的细节妨碍本申请的描述。
为了说明本申请上述的技术方案,下面通过具体实施例来进行说明。
实施例1
下面对本申请实施例提供的一种增量包生成方法进行描述,请参阅图1,本申请实施例中的增量包生成方法应用于服务器,包括:
在步骤101中,获取一个以上原始安装包;
在本申请实施例中,服务器可以先获取得到一个以上原始安装包,具体地,各个原始安装包所对应的应用程序分别属于不同的应用类别。可选地,服务器可以预先划分一个以上应用类别,例如,可以划分有即时通讯应用类别、购物应用类别、摄影工具应用类别及游戏应用类别等;进一步地,考虑到游戏应用类别中,不同游戏应用可能有不同的开发引擎,因而,还可以再对游戏应用类别进行进一步细分,例如,再按照开发引擎划分有unity游戏应用类别、cocos游戏应用类别及laya游戏应用类别等,此处不对上述应用类别的划分作出限定。在划分得到多个应用类别后,基于划分所得到的应用类别对应用商城中的所有应用程序进行归类,需要注意的是,每一应用程序仅可以被归类至一类应用类别下,也即,对于一个应用程序来说,其无法同时归属于不同的两个应用类别。通过上述过程,可以得到一个以上应用类别,且每一应用类别下都包含有一个以上应用程序。随后,在每一应用类别下挑选出唯一一个应用程序,该应用程序的安装包即被确定为对应应用类别下的原始安装包。例如,应用类别1下包含有APP1、APP2、APP3及APP4这四个应用程序,可以在这四个应用程序中挑选出一个应用程序,例如APP2,并将该APP2的安装包APP2-apk确定为应用类别1的原始安装包。
可选地,为了满足大部分用户的需求,上述步骤101具体包括:
A1、获取应用商城中各个安装包的安装量;
其中,应用商城会对各个安装包的安装量进行统计;可选地,一般情况下认为移动终端下载安装包后通常就会自动进行安装操作,因而,此处也可以是直接获取应用商城中各个安装包的下载量,并将安装包的下载量作为安装包的安装量。可选地,为了避免出现下载量或安装量作假的情况,可以对一个移动终端多次下载同一安装包的情况进行筛除,也即,一个移动终端多次下载同一安装包时,该安装包的下载量(也即安装量)将仅计数一次。
A2、将每一个应用类别下安装量最高的安装包确定为原始安装包。
其中,越受用户欢迎的应用程序,其市场份额越大;也即,越受用户欢迎的应用程序,其安装包的安装量通常越高。基于此,可以基于各个安装包的安装量筛选出每一个应用类别下安装量最高的安装包,并将各个应用类别下安装量最高的安装包确定为原始安装包。当然,也可以通过其它方式确定原始安装包,例如,可以是获取应用商城中各个 安装包的评论量,并将每一个应用类别下评论量最高的安装包确定为原始安装包;或者,也可以是在每一个应用类别下随机确定一安装包作为原始安装包,此处不对上述原始安装包的确定方式作出限定。
在步骤102中,将每一个原始安装包均确定为待差分安装包;
在本申请实施例中,在准备第一轮的差分运算之前,先将各个原始安装包确定为待差分安装包。需要注意的是,每一轮差分运算过后,上述待差分安装包都会有所更新,也即,上述待差分安装包后续会被更新为其它安装包。
在步骤103中,将待合成安装包与各个待差分安装包分别进行差分运算,得到本轮各个差分运算所分别对应的差分结果;
在本申请实施例中,上述差分运算具体为找出进行差分运算的两个输入文件的差异,该差异即为差分结果,差分结果可结合任一输入文件还原得到另一个输入文件。例如,输入文件file1与输入文件file2进行差分,得到差分结果diff-file1-file2。则在已知输入文件file1与差分结果diff-file1-file2的情况下,可以还原得到输入文件file2;或者,也可以在已知输入文件file2与差分结果diff-file1-file2的情况下,还原得到输入文件file1。在上述步骤103中,上述待合成安装包指的是非原始安装包中的任一安装包,例如,应用类别1下包含有APP1、APP2、APP3及APP4这四个应用程序,其中APP2的安装包APP2-apk被确定为应用类别1的原始安装包,则APP1、APP3或APP4的安装包均可作为上述待合成安装包。需要注意的是,一轮中将会进行多次差分运算,例如,在第一轮差分运算时,假定有四个应用类别,则这四个应用类别所分别对应的原始安装包将作为待差分安装包,也即有四个待差分安装包;待合成安装包将与各个待差分安装包分别进行差分运算,共计进行四次差分运算,得到相应的四个差分结果;可以看出,本轮所得到的差分结果的数量会与待差分安装包的数量保持一致。
在步骤104中,基于预设的筛选条件对上述差分结果进行筛选,得到预设数量的目标差分结果;
在本申请实施例中,考虑到步骤103所得到的本轮的差分结果的数量可能会有很多个,为了减轻运算量,避免服务器的数据爆炸,在步骤104中,可以基于预设的筛选条件对上述差分结果进行筛选,得到预设数量的目标差分结果,其中,上述预设数量为研发人员所设定的一经验值,此处不对上述预设数量的具体取值作出限定。具体地,可以先基于预设的排序顺序对各个差分结果进行排序,然后将排序靠前的预设数量个差分结果确定为本轮的目标差分结果。考虑到差分结果的文件大小越小时,可认为参与差分的两个输入文件的差异越小,因而,上述预设的排序顺序可以是以差分结果的文件大小由小至大的顺序进行排序。当然,也可以通过其它排序顺序进行排序,此处不作限定。
在步骤105中,将任意两个目标差分结果组成差分结果组;
在本申请实施例中,任意两个目标差分结果均可组成一差分结果组,也即,从上述目标差分结果中取出两个目标差分结果进行组合。假定上述预设数量为N,则基于步骤105可以组成的差分结果组的数量有
Figure PCTCN2019119240-appb-000001
个。
在步骤106中,针对任一差分结果组,将与上述差分结果组中的任一目标差分结果相关联的原始安装包均确定为上述差分结果组的待拼接安装包;
在本申请实施例中,每一差分结果组都由两个目标差分结果所构成,其中,每一个目标差分结果都关联有一个以上原始安装包,基于此,只要一原始安装包与上述差分结果组中的任一目标差分结果相关联,则可以将该原始安装包确定为该差分结果组的待拼接安装包之一。例如,假设共有四个应用类别,分别为应用类别1、应用类别2、应用类别3及应用类别4,分别对应类别1-apk、类别2-apk、类别3-apk及类别4-apk这四个原始安装包,在与待合成安装包进行第一轮差分运算后,分别得到差分结果1、差分结果2、差分结果3及差分结果4;再假定筛选出的目标差分结果为差分结果1、差分结果2、差分结果3,则可以组成(差分结果1、差分结果2)、(差分结果1、差分结果3)及(差分结果2、差分结果3)这三组差分结果组,针对(差分结果1、差分结果2)这一差分结果组,可以发现与差分结果1相关的原始安装包为类别1-apk,与差分结果2相关的原始安装包为类别2-apk,则类别1-apk与类别2-apk这两个原始安装包将被确定为(差分结果1、差分结果2)这一差分结果组的待拼接安装包。
在步骤107中,将上述差分结果组的所有待拼接安装包进行拼接,得到上述差分结果组的拼接安装包;
在本申请实施例中,进行拼接具体指的是将两个文件按照顺序拼接在一起,成为一个文件。上述拼接顺序的不同会影响到后续所得到的差分结果的文件内容,但不会影响到后续所得到的差分结果的文件大小,基于此,可以预先约定一拼接顺序,例如,每次进行拼接时,都以待拼接安装包的文件大小由小至大的顺序进行拼接;当然,上述拼接顺序也可以是其它顺序,只要是事先约定好的即可,此处不作限定。则针对上述(差分结果1、差分结果2)这一差分结果组的待拼接安装包类别1-apk与类别2-apk,假定类别1-apk的文件大小小于类别2-apk的文件大小,则最终拼接得到的拼接安装包为类别1-apk-类别2-apk。
在步骤108中,将上述待差分安装包更新为各个差分结果组的拼接安装包;
在本申请实施例中,对上述待差分安装包进行更新,具体为更新成上述各个差分结果组的拼接安装包。则在上述步骤107所示出的例子中,类别1-apk-类别2-apk这个拼接安装包将作为新的待差分安装包之一参与到下一轮的差分运算中,也即,下一轮差分运算时 所做的差分运算之一即为对待合成安装包及类别1-apk-类别2-apk这个拼接安装包进行差分运算。
在步骤109中,检测是否满足预设的停止条件,若仍未满足预设的停止条件,则返回执行步骤103及后续步骤。
在本申请实施例中,在已满足预设的停止条件的情况下,可以停止进行差分运算,并将每一轮差分运算所得到的所有差分结果保存起来;而在还未满足预设的停止条件的情况下,需要继续进行差分运算,也即返回执行步骤103及后续步骤。可选地,可以在步骤102之后初始化差分轮次,该差分轮次的初始化值被设定为0;并在每次步骤103之后对上述差分轮次进行更新,具体为将差分轮次所记录的数值加1,以记录下当前已经进行了几轮差分运算。
基于上述差分轮次,在一种应用场景下,上述停止条件可以为:上述差分轮次达到预设的差分轮次阈值,则步骤109可具体表现为:检测上述差分轮次是否达到上述差分轮次阈值;若上述差分轮次未达到上述差分轮次阈值,则返回执行步骤103步骤及后续步骤;若上述差分轮次已达到上述差分轮次阈值,则保存每轮差分运算所得到的所有差分结果。
可选地,在另一种应用场景下,上述停止条件为与任一目标差分结果相关联的原始安装包的数量达到预设的数量阈值,则步骤109可具体表现为:检测与待检测目标差分结果相关联的原始安装包的数量是否达到上述数量阈值,其中,上述待检测目标差分结果为任一目标差分结果;若与上述待检测目标差分结果相关联的原始安装包的数量未达到上述数量阈值,则返回执行步骤103及后续步骤;若与上述待检测目标差分结果相关联的原始安装包的数量已达到上述数量阈值,则保存每轮差分运算所得到的所有差分结果。例如,假定设定上述数量阈值为2,则在步骤108所给出的例子中,假定对待合成安装包及类别1-apk-类别2-apk这个拼接安装包进行差分运算得到了差分结果5,且该差分结果5为目标差分结果,则需要先确定与该差分结果5相关联的原始安装包:由于差分结果5是通过待合成安装包及类别1-apk-类别2-apk这个拼接安装包进行差分运算所得,而类别1-apk-类别2-apk这个拼接安装包又是由原始安装包类别1-apk及类别2-apk所拼接得到的,因而,可以确定与该差分结果5相关联的原始安装包为类别1-apk及类别2-apk,从而可知与差分结果5相关联的原始安装包的数量已经达到上述数量阈值2,基于此,可以不再进行下一轮差分运算,并保存每一轮差分运算所得到的所有差分结果。
可选地,也可以在每一轮差分运算后就对差分结果进行记录,则在上述步骤103之后,上述增量包生成方法还包括:
B1、分别获取各个差分结果所关联的原始安装包集合,其中,上述原始安装包集合中包含一个以上原始安装包;
B2、将各个差分结果,以及各个差分结果所关联的原始安装包集合记录在预设的数据库中。
其中,上述数据库可以设定在上述服务器的本地,也可以设定在其它位置,此处不作限定。在记录得到了各个差分结果,以及各个差分结果所关联的原始安装包集合之后,每当接收到用户的客户端所发送的对待合成安装包的下载指令时,就可以从上述数据库中很快的查询到需要给客户端下发的差分结果。上述过程具体为:
C1、若接收到客户端基于上述待合成安装包所发送的下载指令,则解析上述下载指令,以获知上述客户端已安装的原始安装包;
其中,客户端在发送下载指令之前,会先对其文件系统进行遍历,以获知自身已安装的所有的原始安装包。可选地,考虑到上述原始安装包是服务器所设定的,可能客户端无法及时知道原始安装包有哪些,因而,也可以是客户端对其自身的文件系统进行遍历后,将其已安装的所有安装包都通过上述下载指令报告给服务器,服务器在解析得知客户端已安装的所有安装包后,通过与原始安装包进行比对,可以获知上述客户端已安装的原始安装包。
C2、在上述数据库中查找与上述客户端已安装的原始安装包匹配程度最高的原始安装包集合作为目标原始安装包集合;
其中,上述步骤C2可以通过如下方式实现:先检测上述数据库中是否存在候选原始安装包集合,其中,上述候选原始安装包集合中的每一个原始安装包均已被上述客户端安装,若检测发现仅存在一个候选原始安装包集合,则直接将该唯一的一个候选原始安装包集合确定为目标原始安装包集合;若检测发现存在两个以上候选原始安装包集合,则获取每一个候选原始安装包集合所包含的原始安装包的数量,并将包含的原始安装包的数量最多的候选原始安装包集合确定为目标原始安装包集合。
C3、向上述客户端发送与上述目标原始安装包集合相关联的差分结果,以使得上述客户端基于上述差分结果及上述客户端已安装的原始安装包合成上述待合成安装包。
其中,由于目标原始安装包集合中的所有原始安装包都是客户端已下载的原始安装包,因而,通过与上述目标原始安装包集合相关联的差分结果,客户端可还原得到上述待合成安装包。需要注意的是,若上述客户端没有安装任何原始安装包,则上述步骤C2中也就无法查找到任何相匹配的候选原始安装包集合,此时,服务器只能向客户端发送上述待合成安装包的全量包,也即,此时客户端仅能全量下载该待合成安装 包。
为了更好的说明本申请实施例的方案,下面结合附图2给出具体实例:
假定停止条件为差分轮次达到3轮,或者,任一目标差分结果相关联的原始安装包的数量达到3个,同时假定目标差分结果的预设数量为3。
假定共有四个应用类别,分别为应用类别1、应用类别2、应用类别3及应用类别4,分别对应类别1-apk、类别2-apk、类别3-apk及类别4-apk这四个原始安装包,这四个原始安装包为第一轮的待差分安装包;同时记待合成安装包为apk0。
第一轮差分运算后,分别得到差分结果1、差分结果2、差分结果3及差分结果4。
筛选出的目标差分结果为差分结果1、差分结果2、差分结果3,组成(差分结果1、差分结果2)、(差分结果1、差分结果3)及(差分结果2、差分结果3)这三组差分结果组。可得到(差分结果1、差分结果2)的拼接安装包为类别1-apk-类别2-apk,(差分结果1、差分结果3)的拼接安装包为类别1-apk-类别3-apk,(差分结果2、差分结果3)的拼接安装包为类别2-apk-类别3-apk。也即,上述类别1-apk-类别2-apk、类别1-apk-类别3-apk及类别2-apk-类别3-apk被更新为第二轮的待差分安装包。
在第二轮差分运算后,分别得到差分结果5、差分结果6及差分结果7。其中,差分结果5为类别1-apk-类别2-apk与apk0差分而得;差分结果6为类别1-apk-类别3-apk与apk0差分而得;差分结果7为类别2-apk-类别3-apk与apk0差分而得。
上述差分结果5、差分结果6、差分结果7均为目标差分结果,组成(差分结果5、差分结果6)、(差分结果5、差分结果7)及(差分结果6、差分结果7)这三组差分结果组。其中,由于与差分结果5相关联的原始安装包为类别1-apk及类别2-apk,与差分结果6相关联的原始安装包为类别1-apk及类别3-apk,与差分结果7相关联的原始安装包为类别2-apk及类别3-apk,因而,上述(差分结果5、差分结果6)、(差分结果5、差分结果7)及(差分结果6、差分结果7)的待拼接安装包均为类别1-apk、类别2-apk及类别3-apk,也即,这三组差分结果组所得到的拼接安装包相同,都是类别1-apk-类别2-apk-类别3-apk。也即,第二轮过后,只能得到一个拼接安装包,为类别1-apk-类别2-apk-类别3-apk,该拼接安装包(也即类别1-apk-类别2-apk-类别3-apk)被更新为第三轮的待差分安装包。
在第三轮差分运算后,得到本轮唯一一个差分结果,也即差分结果8。此时差分轮次已达到3轮,差分运算停止。
记录下每轮所得到的所有差分结果及各个差分结果相关联的原始安装包集合:
差分结果1-{类别1-apk}
差分结果2-{类别2-apk}
差分结果3-{类别3-apk}
差分结果4-{类别4-apk}
差分结果5-{类别1-apk,类别2-apk}
差分结果6-{类别1-apk,类别3-apk}
差分结果7-{类别2-apk,类别3-apk}
差分结果8-{类别1-apk,类别2-apk,类别3-apk}
假定客户端需要下载上述待合成apk0,则客户端将发送下载指令至服务器,服务器通过解析上述下载指令获知客户端已下载的原始安装包。
在第一种情况下,假定客户端存在已下载的原始安装包,例如,客户端已下载的原始安装包有类别1-apk及类别3-apk,则可以检测得知{类别1-apk}、{类别3-apk}及{类别1-apk,类别3-apk}均可作为候选原始安装包集合,然而,由于{类别1-apk,类别3-apk}所包含的原始安装包的数量最多,因而,最终将选定{类别1-apk,类别3-apk}为目标原始安装包集合,则服务器可以向客户端发送该目标原始安装包集合{类别1-apk,类别3-apk}所对应的差分结果6给客户端。由于客户端中已下载有1-apk及类别3-apk,其可以基于上述1-apk及类别3-apk及服务器所发送的差分结果6进行还原文件的还原,以此得到待合成安装包apk0。具体还原过程为:将客户端已安装的原始安装包:类别1-apk,类别3-apk按照约定的拼接顺序进行拼接,得到类别1-apk-类别3-apk;由于服务器在进行差分运算时,上述差分结果6为类别1-apk-类别3-apk与apk0差分而得,因而客户端可以基于拼接得到的类别1-apk-类别3-apk与差分结果6,还原得到待合成安装包apk0。
在第二种情况下,假定客户端没有下载任何一个原始安装包,则服务器将直接将上述待合成安装包apk0全量发送给客户端。
由上可见,通过本申请方案,在服务器中预先基于各个不同类别的应用的安装包生成了对各个其它安装包的差分文件作为增量包,这样一来,后续客户端第一次下载新应用时,在符合要求的情况可以不再需要对新应用的安装包进行全量下载,而是下载新应用的增量包,并结合本机已下载的其它应用的安装包即可实现新应用的安装包的合成,可一定程度上减少客户端的流量消耗。
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
实施例2
本申请实施例2提供了一种增量包生成装置,上述增量包生成装置可集成于服务器中, 如图3所示,本申请实施例中的增量包生成装置300包括:
第一获取单元301,用于获取一个以上原始安装包,其中,各个原始安装包所对应的应用程序分别属于不同的应用类别;
第一确定单元302,用于将每一个原始安装包均确定为待差分安装包;
差分单元303,用于将待合成安装包与各个待差分安装包分别进行差分运算,得到本轮各个差分运算所分别对应的差分结果;
筛选单元304,用于基于预设的筛选条件对上述差分结果进行筛选,得到预设数量的目标差分结果;
组合单元305,用于将任意两个目标差分结果组成差分结果组;
第二确定单元306,用于针对任一差分结果组,将与上述差分结果组中的任一目标差分结果相关联的原始安装包均确定为上述差分结果组的待拼接安装包;
拼接单元307,用于将上述差分结果组的所有待拼接安装包进行拼接,得到上述差分结果组的拼接安装包;
更新单元308,用于将上述待差分安装包更新为各个差分结果组的拼接安装包;
其中,上述差分单元303在上述更新单元308之后再次被触发执行,直至满足预设的停止条件。
可选地,上述增量包生成装置300还包括:
第二获取单元,用于分别获取各个差分结果所关联的原始安装包集合,其中,上述原始安装包集合中包含一个以上原始安装包;
记录单元,用于将各个差分结果,以及各个差分结果所关联的原始安装包集合记录在预设的数据库中。
可选地,上述增量包生成装置300还包括:
解析单元,用于若接收到客户端基于上述待合成安装包所发送的下载指令,则解析上述下载指令,以获知上述客户端已安装的原始安装包;
查找单元,用于在上述数据库中查找与上述客户端已安装的原始安装包匹配程度最高的原始安装包集合作为目标原始安装包集合;
发送单元,用于向上述客户端发送与上述目标原始安装包集合相关联的差分结果,以使得上述客户端基于上述差分结果及上述客户端已安装的原始安装包合成上述待合成安装包。
可选地,上述查找单元,包括:
候选原始安装包集合检测子单元,用于检测上述数据库中是否存在候选原始安装包集合,其中,上述候选原始安装包集合中的每一个原始安装包均已被上述客户端安 装;
原始安装包数量获取子单元,用于若存在一个以上候选原始安装包集合,则获取每一个候选原始安装包集合所包含的原始安装包的数量;
目标原始安装包集合确定子单元,用于将包含的原始安装包的数量最多的候选原始安装包集合确定为目标原始安装包集合。
可选地,上述筛选单元304,包括:
排序子单元,用于基于预设的排序顺序对各个差分结果进行排序;
目标差分结果确定子单元,用于将排序靠前的预设数量个差分结果确定为本轮的目标差分结果。
可选地,上述第一获取单元301,包括:
安装量获取子单元,用于获取应用商城中各个安装包的安装量;
原始安装包确定子单元,用于将每一个应用类别下安装量最高的安装包确定为原始安装包。
可选地,上述增量包生成装置300还包括:
差分轮次初始化单元,用于在上述第一确定单元302将每一个原始安装包均确定为待差分安装包之后,初始化差分轮次;
差分轮次更新单元,用于在上述更新单元308将待合成安装包与各个待差分安装包分别进行差分运算,得到本轮各个差分运算所分别对应的差分结果之后,更新上述差分轮次。
可选地,上述预设的停止条件为上述差分轮次达到预设的差分轮次阈值,则上述增量包生成装置300还包括:
第一检测单元,用于检测上述差分轮次是否达到上述差分轮次阈值;
第一保存单元,用于若上述差分轮次已达到上述差分轮次阈值,则保存每轮差分运算所得到的所有差分结果;
上述差分单元303,在上述差分轮次未达到上述差分轮次阈值时被触发。
可选地,上述预设的停止条件为与任一目标差分结果相关联的原始安装包的数量达到预设的数量阈值,则上述增量包生成装置300还包括:
第二检测单元,用于检测与待检测目标差分结果相关联的原始安装包的数量是否达到上述数量阈值,其中,上述待检测目标差分结果为任一目标差分结果;
第二保存单元,用于若与上述待检测目标差分结果相关联的原始安装包的数量已达到上述数量阈值,则保存每轮差分运算所得到的所有差分结果;
述差分单元303,在与上述待检测目标差分结果相关联的原始安装包的数量未达到 上述数量阈值时被触发。
由上可见,通过本申请方案,在服务器中预先基于各个不同类别的应用的安装包生成了对各个其它安装包的差分文件作为增量包,这样一来,后续客户端第一次下载新应用时,在符合要求的情况可以不再需要对新应用的安装包进行全量下载,而是下载新应用的增量包,并结合本机已下载的其它应用的安装包即可实现新应用的安装包的合成,可一定程度上减少客户端的流量消耗。
实施例3
本申请实施例3提供了一种服务器,请参阅图4,本申请实施例中的服务器包括:存储器401,一个或多个处理器402(图4中仅示出一个)及存储在存储器401上并可在处理器上运行的计算机程序。其中:存储器401用于存储软件程序以及模块,处理器402通过运行存储在存储器401的软件程序以及单元,从而执行各种功能应用以及数据处理,以获取上述预设事件对应的资源。具体地,处理器402通过运行存储在存储器401的上述计算机程序时实现以下步骤:
获取一个以上原始安装包,其中,各个原始安装包所对应的应用程序分别属于不同的应用类别;
将每一个原始安装包均确定为待差分安装包;
将待合成安装包与各个待差分安装包分别进行差分运算,得到本轮各个差分运算所分别对应的差分结果;
基于预设的筛选条件对上述差分结果进行筛选,得到预设数量的目标差分结果;
将任意两个目标差分结果组成差分结果组;
针对任一差分结果组,将与上述差分结果组中的任一目标差分结果相关联的原始安装包均确定为上述差分结果组的待拼接安装包;
将上述差分结果组的所有待拼接安装包进行拼接,得到上述差分结果组的拼接安装包;
将上述待差分安装包更新为各个差分结果组的拼接安装包;
返回执行上述将待合成安装包与各个待差分安装包分别进行差分运算的步骤及后续步骤,直至满足预设的停止条件。
在第一种可能的实施方式作为基础而提供的第二种可能的实施方式中,在上述将待合成安装包与各个待差分安装包分别进行差分运算,得到本轮各个差分运算所分别对应的差分结果之后,处理器402通过运行存储在存储器401的上述计算机程序时还实现以下步骤:
分别获取各个差分结果所关联的原始安装包集合,其中,上述原始安装包集合中包含一个以上原始安装包;
将各个差分结果,以及各个差分结果所关联的原始安装包集合记录在预设的数据库中。
在第二种可能的实施方式作为基础而提供的第三种可能的实施方式中,处理器402通过运行存储在存储器401的上述计算机程序时还实现以下步骤:
若接收到客户端基于上述待合成安装包所发送的下载指令,则解析上述下载指令,以获知上述客户端已安装的原始安装包;
在上述数据库中查找与上述客户端已安装的原始安装包匹配程度最高的原始安装包集合作为目标原始安装包集合;
向上述客户端发送与上述目标原始安装包集合相关联的差分结果,以使得上述客户端基于上述差分结果及上述客户端已安装的原始安装包合成上述待合成安装包。
在第三种可能的实施方式作为基础而提供的第四种可能的实施方式中,上述在上述数据库中查找与上述客户端已安装的原始安装包匹配程度最高的原始安装包集合作为目标原始安装包集合,包括:
检测上述数据库中是否存在候选原始安装包集合,其中,上述候选原始安装包集合中的每一个原始安装包均已被上述客户端安装;
若存在一个以上候选原始安装包集合,则获取每一个候选原始安装包集合所包含的原始安装包的数量;
将包含的原始安装包的数量最多的候选原始安装包集合确定为目标原始安装包集合。
在第一种可能的实施方式作为基础,或者第二种可能的实施方式作为基础,或者第三种可能的实施方式作为基础,或者第四种可能的实施方式作为基础而提供的第五种可能的实施方式中,上述基于预设的筛选条件对上述差分结果进行筛选,得到预设数量的目标差分结果,包括:
基于预设的排序顺序对各个差分结果进行排序;
将排序靠前的预设数量个差分结果确定为本轮的目标差分结果。
在第一种可能的实施方式作为基础,或者第二种可能的实施方式作为基础,或者第三种可能的实施方式作为基础,或者第四种可能的实施方式作为基础而提供的第六种可能的实施方式中,上述获取一个以上原始安装包,包括:
获取应用商城中各个安装包的安装量;
将每一个应用类别下安装量最高的安装包确定为原始安装包。
在第一种可能的实施方式作为基础,或者第二种可能的实施方式作为基础,或者第三种可能的实施方式作为基础,或者第四种可能的实施方式作为基础而提供的第七种可能的实施方式中,在上述将每一个原始安装包均确定为待差分安装包之后,处理器402通过运行存储在存储器401的上述计算机程序时还实现以下步骤:
初始化差分轮次;
相应地,在上述将待合成安装包与各个待差分安装包分别进行差分运算,得到本轮各个差分运算所分别对应的差分结果之后,处理器402通过运行存储在存储器401的上述计算机程序时还实现以下步骤:
更新上述差分轮次。
在第七种可能的实施方式作为基础而提供的第八种可能的实施方式中,上述预设的停止条件为上述差分轮次达到预设的差分轮次阈值,则上述返回执行上述将待合成安装包与各个待差分安装包分别进行差分运算的步骤及后续步骤,直至满足预设的停止条件,包括:
检测上述差分轮次是否达到上述差分轮次阈值;
若上述差分轮次未达到上述差分轮次阈值,则返回执行上述将待合成安装包与各个待差分安装包分别进行差分运算的步骤及后续步骤;
若上述差分轮次已达到上述差分轮次阈值,则保存每轮差分运算所得到的所有差分结果。
在第一种可能的实施方式作为基础,或者第二种可能的实施方式作为基础,或者第三种可能的实施方式作为基础,或者第四种可能的实施方式作为基础而提供的第九种可能的实施方式中,上述预设的停止条件为与任一目标差分结果相关联的原始安装包的数量达到预设的数量阈值,则上述返回执行上述将待合成安装包与各个待差分安装包分别进行差分运算的步骤及后续步骤,直至满足预设的停止条件,包括:
检测与待检测目标差分结果相关联的原始安装包的数量是否达到上述数量阈值,其中,上述待检测目标差分结果为任一目标差分结果;
若与上述待检测目标差分结果相关联的原始安装包的数量未达到上述数量阈值,则返回执行上述将待合成安装包与各个待差分安装包分别进行差分运算的步骤及后续步骤;
若与上述待检测目标差分结果相关联的原始安装包的数量已达到上述数量阈值,则保存每轮差分运算所得到的所有差分结果。
进一步,如图4所示,上述服务器还可包括:一个或多个输入设备403(图4中仅示出一个)和一个或多个输出设备404(图4中仅示出一个)。存储器401、处理器402、输入设备403和输出设备404通过总线405连接。
应当理解,在本申请实施例中,所称处理器402可以是中央处理单元(Central Processing Unit,CPU),该处理器还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
输入设备403可以包括键盘、触控板、指纹采传感器(用于采集用户的指纹信息和指纹的方向信息)、麦克风等,输出设备404可以包括显示器、扬声器等。
存储器401可以包括只读存储器和随机存取存储器,并向处理器402提供指令和数据。存储器401的一部分或全部还可以包括非易失性随机存取存储器。例如,存储器401还可以存储设备类型的信息。
由上可见,通过本申请方案,在服务器中预先基于各个不同类别的应用的安装包生成了对各个其它安装包的差分文件作为增量包,这样一来,后续客户端第一次下载新应用时,在符合要求的情况可以不再需要对新应用的安装包进行全量下载,而是下载新应用的增量包,并结合本机已下载的其它应用的安装包即可实现新应用的安装包的合成,可一定程度上减少客户端的流量消耗。
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将上述装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。实施例中的各功能单元、模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中,上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。另外,各功能单元、模块的具体名称也只是为了便于相互区分,并不用于限制本申请的保护范围。上述系统中单元、模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述或记载的部分,可以参见其它实施例的相关描述。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及 算法步骤,能够以电子硬件、或者外部设备软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
在本申请所提供的实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的系统实施例仅仅是示意性的,例如,上述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通讯连接可以是通过一些接口,装置或单元的间接耦合或通讯连接,可以是电性,机械或其它的形式。
上述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
上述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读存储介质中。基于这样的理解,本申请实现上述实施例方法中的全部或部分流程,也可以通过计算机程序来指令相关的硬件来完成,上述的计算机程序可存储于一计算机可读存储介质中,该计算机程序在被处理器执行时,可实现上述各个方法实施例的步骤。其中,上述计算机程序包括计算机程序代码,上述计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。上述计算机可读存储介质可以包括:能够携带上述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机可读存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、电载波信号、电信信号以及软件分发介质等。需要说明的是,上述计算机可读存储介质包含的内容可以根据司法管辖区内立法和专利实践的要求进行适当的增减,例如在某些司法管辖区,根据立法和专利实践,计算机可读存储介质不包括是电载波信号和电信信号。
以上所述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。

Claims (20)

  1. 一种增量包生成方法,其特征在于,包括:
    获取一个以上原始安装包,其中,各个原始安装包所对应的应用程序分别属于不同的应用类别;
    将每一个原始安装包均确定为待差分安装包;
    将待合成安装包与各个待差分安装包分别进行差分运算,得到本轮各个差分运算所分别对应的差分结果;
    基于预设的筛选条件对所述差分结果进行筛选,得到预设数量的目标差分结果;
    将任意两个目标差分结果组成差分结果组;
    针对任一差分结果组,将与所述差分结果组中的任一目标差分结果相关联的原始安装包均确定为所述差分结果组的待拼接安装包;
    将所述差分结果组的所有待拼接安装包进行拼接,得到所述差分结果组的拼接安装包;
    将所述待差分安装包更新为各个差分结果组的拼接安装包;
    返回执行所述将待合成安装包与各个待差分安装包分别进行差分运算的步骤及后续步骤,直至满足预设的停止条件。
  2. 如权利要求1所述的增量包生成方法,其特征在于,在所述将待合成安装包与各个待差分安装包分别进行差分运算,得到本轮各个差分运算所分别对应的差分结果之后,所述增量包生成方法还包括:
    分别获取各个差分结果所关联的原始安装包集合,其中,所述原始安装包集合中包含一个以上原始安装包;
    将各个差分结果,以及各个差分结果所关联的原始安装包集合记录在预设的数据库中。
  3. 如权利要求2所述的增量包生成方法,其特征在于,所述增量包生成方法还包括:
    若接收到客户端基于所述待合成安装包所发送的下载指令,则解析所述下载指令,以获知所述客户端已安装的原始安装包;
    在所述数据库中查找与所述客户端已安装的原始安装包匹配程度最高的原始安装包集合作为目标原始安装包集合;
    向所述客户端发送与所述目标原始安装包集合相关联的差分结果,以使得所述客户端基于所述差分结果及所述客户端已安装的原始安装包合成所述待合成安装包。
  4. 如权利要求3所述的增量包生成方法,其特征在于,所述在所述数据库中查 找与所述客户端已安装的原始安装包匹配程度最高的原始安装包集合作为目标原始安装包集合,包括:
    检测所述数据库中是否存在候选原始安装包集合,其中,所述候选原始安装包集合中的每一个原始安装包均已被所述客户端安装;
    若存在一个以上候选原始安装包集合,则获取每一个候选原始安装包集合所包含的原始安装包的数量;
    将包含的原始安装包的数量最多的候选原始安装包集合确定为目标原始安装包集合。
  5. 如权利要求1至4任一项所述的增量包生成方法,其特征在于,所述基于预设的筛选条件对所述差分结果进行筛选,得到预设数量的目标差分结果,包括:
    基于预设的排序顺序对各个差分结果进行排序;
    将排序靠前的预设数量个差分结果确定为本轮的目标差分结果。
  6. 如权利要求1至4任一项所述的增量包生成方法,其特征在于,所述获取一个以上原始安装包,包括:
    获取应用商城中各个安装包的安装量;
    将每一个应用类别下安装量最高的安装包确定为原始安装包。
  7. 如权利要求1至4任一项所述的增量包生成方法,其特征在于,在所述将每一个原始安装包均确定为待差分安装包之后,所述增量包生成方法还包括:
    初始化差分轮次;
    相应地,在所述将待合成安装包与各个待差分安装包分别进行差分运算,得到本轮各个差分运算所分别对应的差分结果之后,所述增量包生成方法还包括:
    更新所述差分轮次。
  8. 如权利要求7所述的增量包生成方法,其特征在于,所述预设的停止条件为所述差分轮次达到预设的差分轮次阈值,则所述返回执行所述将待合成安装包与各个待差分安装包分别进行差分运算的步骤及后续步骤,直至满足预设的停止条件,包括:
    检测所述差分轮次是否达到所述差分轮次阈值;
    若所述差分轮次未达到所述差分轮次阈值,则返回执行所述将待合成安装包与各个待差分安装包分别进行差分运算的步骤及后续步骤;
    若所述差分轮次已达到所述差分轮次阈值,则保存每轮差分运算所得到的所有差分结果。
  9. 如权利要求1至4任一项所述的增量包生成方法,其特征在于,所述预设的停止条件为与任一目标差分结果相关联的原始安装包的数量达到预设的数量阈值,则 所述返回执行所述将待合成安装包与各个待差分安装包分别进行差分运算的步骤及后续步骤,直至满足预设的停止条件,包括:
    检测与待检测目标差分结果相关联的原始安装包的数量是否达到所述数量阈值,其中,所述待检测目标差分结果为任一目标差分结果;
    若与所述待检测目标差分结果相关联的原始安装包的数量未达到所述数量阈值,则返回执行所述将待合成安装包与各个待差分安装包分别进行差分运算的步骤及后续步骤;
    若与所述待检测目标差分结果相关联的原始安装包的数量已达到所述数量阈值,则保存每轮差分运算所得到的所有差分结果。
  10. 一种增量包生成装置,其特征在于,包括:
    第一获取单元,用于获取一个以上原始安装包,其中,各个原始安装包所对应的应用程序分别属于不同的应用类别;
    第一确定单元,用于将每一个原始安装包均确定为待差分安装包;
    差分单元,用于将待合成安装包与各个待差分安装包分别进行差分运算,得到本轮各个差分运算所分别对应的差分结果;
    筛选单元,用于基于预设的筛选条件对所述差分结果进行筛选,得到预设数量的目标差分结果;
    组合单元,用于将任意两个目标差分结果组成差分结果组;
    第二确定单元,用于针对任一差分结果组,将与所述差分结果组中的任一目标差分结果相关联的原始安装包均确定为所述差分结果组的待拼接安装包;
    拼接单元,用于将所述差分结果组的所有待拼接安装包进行拼接,得到所述差分结果组的拼接安装包;
    更新单元,用于将所述待差分安装包更新为各个差分结果组的拼接安装包;
    其中,所述差分单元在所述更新单元之后再次被触发执行,直至满足预设的停止条件。
  11. 一种服务器,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现如下步骤:
    获取一个以上原始安装包,其中,各个原始安装包所对应的应用程序分别属于不同的应用类别;
    将每一个原始安装包均确定为待差分安装包;
    将待合成安装包与各个待差分安装包分别进行差分运算,得到本轮各个差分运算 所分别对应的差分结果;
    基于预设的筛选条件对所述差分结果进行筛选,得到预设数量的目标差分结果;
    将任意两个目标差分结果组成差分结果组;
    针对任一差分结果组,将与所述差分结果组中的任一目标差分结果相关联的原始安装包均确定为所述差分结果组的待拼接安装包;
    将所述差分结果组的所有待拼接安装包进行拼接,得到所述差分结果组的拼接安装包;
    将所述待差分安装包更新为各个差分结果组的拼接安装包;
    返回执行所述将待合成安装包与各个待差分安装包分别进行差分运算的步骤及后续步骤,直至满足预设的停止条件。
  12. 如权利要求11所述的服务器,其特征在于,在所述将待合成安装包与各个待差分安装包分别进行差分运算,得到本轮各个差分运算所分别对应的差分结果之后,所述处理器执行所述计算机程序时还实现以下步骤:
    分别获取各个差分结果所关联的原始安装包集合,其中,所述原始安装包集合中包含一个以上原始安装包;
    将各个差分结果,以及各个差分结果所关联的原始安装包集合记录在预设的数据库中。
  13. 如权利要求12所述的服务器,其特征在于,所述处理器执行所述计算机程序时还实现以下步骤:
    若接收到客户端基于所述待合成安装包所发送的下载指令,则解析所述下载指令,以获知所述客户端已安装的原始安装包;
    在所述数据库中查找与所述客户端已安装的原始安装包匹配程度最高的原始安装包集合作为目标原始安装包集合;
    向所述客户端发送与所述目标原始安装包集合相关联的差分结果,以使得所述客户端基于所述差分结果及所述客户端已安装的原始安装包合成所述待合成安装包。
  14. 如权利要求13所述的服务器,其特征在于,所述处理器执行所述计算机程序时,所述在所述数据库中查找与所述客户端已安装的原始安装包匹配程度最高的原始安装包集合作为目标原始安装包集合,包括:
    检测所述数据库中是否存在候选原始安装包集合,其中,所述候选原始安装包集合中的每一个原始安装包均已被所述客户端安装;
    若存在一个以上候选原始安装包集合,则获取每一个候选原始安装包集合所包含的原始安装包的数量;
    将包含的原始安装包的数量最多的候选原始安装包集合确定为目标原始安装包集合。
  15. 如权利要求11至14任一项所述的服务器,其特征在于,所述处理器执行所述计算机程序时,所述基于预设的筛选条件对所述差分结果进行筛选,得到预设数量的目标差分结果,包括:
    基于预设的排序顺序对各个差分结果进行排序;
    将排序靠前的预设数量个差分结果确定为本轮的目标差分结果。
  16. 如权利要求11至14任一项所述的服务器,其特征在于,所述处理器执行所述计算机程序时,所述获取一个以上原始安装包,包括:
    获取应用商城中各个安装包的安装量;
    将每一个应用类别下安装量最高的安装包确定为原始安装包。
  17. 如权利要求11至14任一项所述的服务器,其特征在于,在所述将每一个原始安装包均确定为待差分安装包之后,所述处理器执行所述计算机程序时还实现以下步骤:
    初始化差分轮次;
    相应地,在所述将待合成安装包与各个待差分安装包分别进行差分运算,得到本轮各个差分运算所分别对应的差分结果之后,所述处理器执行所述计算机程序时还实现以下步骤:
    更新所述差分轮次。
  18. 如权利要求11至14任一项所述的服务器,其特征在于,所述处理器执行所述计算机程序时,所述预设的停止条件为所述差分轮次达到预设的差分轮次阈值,则所述返回执行所述将待合成安装包与各个待差分安装包分别进行差分运算的步骤及后续步骤,直至满足预设的停止条件,包括:
    检测所述差分轮次是否达到所述差分轮次阈值;
    若所述差分轮次未达到所述差分轮次阈值,则返回执行所述将待合成安装包与各个待差分安装包分别进行差分运算的步骤及后续步骤;
    若所述差分轮次已达到所述差分轮次阈值,则保存每轮差分运算所得到的所有差分结果。
  19. 如权利要求11至14任一项所述的服务器,其特征在于,所述处理器执行所述计算机程序时,所述预设的停止条件为与任一目标差分结果相关联的原始安装包的数量达到预设的数量阈值,则所述返回执行所述将待合成安装包与各个待差分安装包分别进行差分运算的步骤及后续步骤,直至满足预设的停止条件,包括:
    检测与待检测目标差分结果相关联的原始安装包的数量是否达到所述数量阈值, 其中,所述待检测目标差分结果为任一目标差分结果;
    若与所述待检测目标差分结果相关联的原始安装包的数量未达到所述数量阈值,则返回执行所述将待合成安装包与各个待差分安装包分别进行差分运算的步骤及后续步骤;
    若与所述待检测目标差分结果相关联的原始安装包的数量已达到所述数量阈值,则保存每轮差分运算所得到的所有差分结果。
  20. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1至9任一项所述方法的步骤。
PCT/CN2019/119240 2019-11-18 2019-11-18 一种增量包生成方法、增量包生成装置及服务器 WO2021097621A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201980100488.6A CN114402288A (zh) 2019-11-18 2019-11-18 一种增量包生成方法、增量包生成装置及服务器
PCT/CN2019/119240 WO2021097621A1 (zh) 2019-11-18 2019-11-18 一种增量包生成方法、增量包生成装置及服务器

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/119240 WO2021097621A1 (zh) 2019-11-18 2019-11-18 一种增量包生成方法、增量包生成装置及服务器

Publications (1)

Publication Number Publication Date
WO2021097621A1 true WO2021097621A1 (zh) 2021-05-27

Family

ID=75981109

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/119240 WO2021097621A1 (zh) 2019-11-18 2019-11-18 一种增量包生成方法、增量包生成装置及服务器

Country Status (2)

Country Link
CN (1) CN114402288A (zh)
WO (1) WO2021097621A1 (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104090806A (zh) * 2014-07-18 2014-10-08 百度在线网络技术(北京)有限公司 升级包、升级请求的处理方法及装置
US20160048383A1 (en) * 2014-08-13 2016-02-18 Microsoft Technology Licensing, Llc Isv update delivery
CN108089879A (zh) * 2016-11-21 2018-05-29 广州市动景计算机科技有限公司 增量更新方法、设备及可编程设备
CN108710501A (zh) * 2018-04-28 2018-10-26 维沃移动通信有限公司 一种更新应用的方法及终端

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104090806A (zh) * 2014-07-18 2014-10-08 百度在线网络技术(北京)有限公司 升级包、升级请求的处理方法及装置
US20160048383A1 (en) * 2014-08-13 2016-02-18 Microsoft Technology Licensing, Llc Isv update delivery
CN108089879A (zh) * 2016-11-21 2018-05-29 广州市动景计算机科技有限公司 增量更新方法、设备及可编程设备
CN108710501A (zh) * 2018-04-28 2018-10-26 维沃移动通信有限公司 一种更新应用的方法及终端

Also Published As

Publication number Publication date
CN114402288A (zh) 2022-04-26

Similar Documents

Publication Publication Date Title
US10768919B2 (en) Package installation on a host file system using a container
JP2020182214A (ja) ブロックチェーンおよびオフチェーン装置の連携のための検証システムおよび方法
CN107341220A (zh) 一种多源数据融合方法和装置
CN111198976B (zh) 云上资产关联分析系统、方法、电子设备及介质
CN110516173B (zh) 一种非法网站识别方法、装置、设备及介质
CN106569860A (zh) 一种应用管理方法及终端
CN109167784A (zh) 区块链上数据处理方法及系统
CN106126256A (zh) 一种驱动管理方法、装置及系统
CN112329954A (zh) 物品召回方法、装置、终端设备及存储介质
CN114064712A (zh) 数据访问方法、装置、电子设备及计算机可读存储介质
CN111930346B (zh) 人工智能信息的处理方法、装置、电子设备和存储介质
CN114139161A (zh) 一种批量检测漏洞的方法、装置、电子设备及介质
CN111523921B (zh) 漏斗分析方法、分析设备、电子设备及可读存储介质
US20130007023A1 (en) System and Method for Consolidating Search Engine Results
CN112632619A (zh) 跨链存证方法、装置、终端设备及存储介质
WO2021097621A1 (zh) 一种增量包生成方法、增量包生成装置及服务器
CN115098297B (zh) 一种云原生存储数据卷的一致性快照生成方法和系统
CN114157662B (zh) 一种云平台参数适配方法、装置、终端设备及储存介质
CN110362294A (zh) 开发任务执行方法、装置、电子设备及存储介质
CN111428117A (zh) 应用程序的数据获取方法和装置
CN112817782B (zh) 一种数据采集上报方法、装置、电子设备和存储介质
CN115617748A (zh) 物料清单信息解析方法、装置、设备及存储介质
CN111611056A (zh) 数据处理方法、装置、计算机设备及存储介质
US20210165772A1 (en) Discovering and merging entity record fragments of a same entity across multiple entity stores for improved named entity disambiguation
CN111222739A (zh) 核电站的任务分配方法及核电站的任务分配系统

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19953525

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 281022)

122 Ep: pct application non-entry in european phase

Ref document number: 19953525

Country of ref document: EP

Kind code of ref document: A1