Incremental upgrade method and device, storage medium, and computer program product
By calculating the unique logical signature of industrial software engineering to judge its changes, the problem of difficulty in accurately judging changes in the existing technology is solved, and more accurate and efficient incremental upgrades are achieved.
Patent Information
- Application Number
- CN202411117230.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2024-05-31
- Filing Date
- 2024-08-14
- Publication Date
- 2025-04-01
- Estimated Expiration
- 2044-08-14
AI Technical Summary
When existing industrial software is undergoing incremental upgrades, it is difficult to accurately determine which projects or modules have actually changed, resulting in some unnecessary upgrade operations.
By obtaining the compilation log of each project, computing the unique logical signature of its compilation process, and determining whether the project has changed based on this signature, thereby generating an incremental upgrade package.
It avoids unnecessary upgrade operations for projects or modules that originally did not need to be upgraded, and improves the accuracy and efficiency of upgrades.
Smart Images

Figure CN119127269B_ABST
Abstract
Description
[0001] Priority application
[0002] This application claims priority to the Chinese invention patent application [Application Number: 202410695526.X] filed on May 31, 2024, "[Invention Name: An incremental upgrade method and device, version management method and device, storage medium, program product]", which is incorporated by reference in its entirety. Technical Field
[0003] The present invention relates to the field of software upgrade technology, and in particular to an incremental upgrade method and device for industrial software, a computer-readable storage medium, and a computer program product. Background Art
[0004] At present, most industrial software is developed based on MSVC on the Windows platform. Due to the heavy historical burden, the large number of functional modules, and the serious coupling between modules, it is difficult to use the common method of increasing the module version number to perform incremental upgrades. And because of the high requirements of industrial software for stability, binary difference methods such as bsdiff need to merge and generate new binary files locally on the user, which has poor stability and is difficult to use in industrial software production environments. Therefore, most industrial software currently adopts the method of full package upgrade, which will cause problems such as large download traffic, time-consuming installation process, and poor upgrade stability in the Internet era where software requirements change more and more frequently. However, when the network bandwidth is slow or the client installation package itself is large in size, it takes more time to complete the download of the installation package, and it will also consume more network traffic, affecting the user's upgrade experience. In order to avoid the above problems, various incremental upgrade methods have been proposed in the prior art.
[0005] For example, a Chinese invention patent application with publication number CN105740016A discloses an incremental publishing method and device, and an upgrade method and device for an application, which is an incremental publishing method and device, and an upgrade method and device for an application. The incremental publishing method includes the following steps: obtaining a first version installation package of the application and a second version installation package; comparing the files in the first version installation package of the application and the files in the second version installation package to obtain a list of newly added files and changed files; performing differential calculation on the changed files to obtain first differential data; opening the first version installation package of the application in a binary stream mode, adding the changed files and the newly added files to the files in the first version installation package to obtain a third version installation package; performing differential calculation on the third version installation package and the second version installation package to obtain second differential data; packaging the list of newly added files and changed files, the first differential data, the second differential data, and the newly added files into an incremental upgrade package; and publishing the incremental upgrade package. There is no need to download the complete second version installation package, saving user upgrade traffic.
[0006] However, the above incremental upgrade method needs to rely on the version number to determine whether it is a new version, and then perform differential comparison on the files in different versions, and generate an incremental upgrade package based on the comparison results. The update of the version number is usually manually modified by the developer. Due to the large scale, numerous modules, and severe module coupling of traditional industrial software, it may be difficult for developers to evaluate which modules (i.e. projects) will be changed due to their modifications without architectural optimization and reconstruction. Moreover, the changed modules may involve multiple teams. It is a big challenge for developers to accurately increase the version number of each affected module.
[0007] For another example, the prior art CN114296771A discloses a method and device for incrementally upgrading an installation package based on file comparison, which obtains installation packages of various versions of the software; generates a hash value corresponding to each file in the installation package; establishes a corresponding relationship between the hash value and the version number of the installation package; compares the hash value corresponding to each file in the latest version of the installation package with the hash value corresponding to each file in the lower version of the installation package, and generates an incremental upgrade package for upgrading different versions to the latest version; receives an upgrade request for the software, obtains the corresponding incremental upgrade package according to the current version number of the software, and uses the incremental upgrade package to upgrade the software. Under the premise of ensuring that the client is fully upgraded, the traffic consumption is reduced and the time for downloading and installing the installation package is reduced.
[0008] The above-mentioned prior art calculates the corresponding hash value, i.e., physical md5, by calculating each binary file, and then compares the hash values of different versions. If different, an incremental upgrade package of the corresponding version number is generated, that is, it no longer relies on the version number to determine whether to perform incremental upgrades, but is based on the physical md5 of each binary file (including engineering or other files) to determine whether to perform incremental upgrades. However, the compiler will add a random factor each time it compiles, and even if the project does not undergo any substantial changes (e.g., the same code and engineering configuration), the physical md5 obtained after each compilation of the binary file is different. For example, the physical md5 of the project changes due to differences in compiling time and compiling machines. Therefore, each compilation will generate a new physical md5 for the project. If the physical md5 is used as the basis for incremental upgrades of the corresponding project or functional module, there may be no substantial changes in the project in fact, but because the physical md5 has changed, it is notified that incremental upgrades are required, thereby causing some projects that originally do not need to be upgraded to perform upgrade operations.
[0009] In view of this, there is an urgent need for a new incremental upgrade method and device that can avoid some unnecessary upgrades to a certain extent. Summary of the invention
[0010] The object of the present invention is to provide an incremental upgrade method and device, a computer-readable storage medium and a computer program product, which partially solve or alleviate the above-mentioned deficiencies in the prior art and can avoid upgrading some projects that originally do not need to be upgraded.
[0011] In order to solve the above-mentioned technical problems, the present invention specifically adopts the following technical solutions:
[0012] A first aspect of the present invention is to provide an incremental upgrade method, comprising the steps of:
[0013] S101, obtaining a compilation log of each project, and obtaining compilation materials involved in the compilation process of the project according to the compilation log;
[0014] S102, calculating a unique logical signature representing a compilation process of each project based on the compilation materials corresponding to the project;
[0015] S103, constructing a full package of the corresponding application based on the unique logical signature of each project, wherein the full package includes a first signature list file, wherein the first signature list file includes each project and its corresponding unique logical signature, and a second file and its corresponding physical signature;
[0016] S104, extracting the first signature list file in the full package, and performing a differential comparison between the first signature list file and the second signature list file in the historical full package, generating an incremental upgrade package, automatically updating the version number of the application, and issuing an upgrade notification;
[0017] The step S102 calculates a unique logical signature representing the compilation process of each project based on the compilation material corresponding to the project, specifically including:
[0018] S1021, calculating a comprehensive physical signature of each compiled material based on an information digest algorithm;
[0019] S1022, determining the unique logical signature based on the comprehensive physical signature of each compiled material.
[0020] In some embodiments, step S104 extracts the first signature list file in the full package and performs a differential comparison between the first signature list file and the second signature list file in the historical full package to generate an incremental upgrade package, specifically including:
[0021] Determine whether the project has changed based on the unique logical signatures corresponding to each project in the first signature list file and the second signature list file; if changed, obtain the changed project;
[0022] Determine whether the second file has changed based on the physical signature corresponding to the second file in the first signature list file and the second signature list file; if changed, obtain the changed second file;
[0023] The incremental upgrade package is generated according to the changed project and / or the second file.
[0024] In some embodiments, before step S101, the step of: encapsulating a logic signature analysis component; the logic signature analysis component is used to determine a unique logic signature corresponding to each project based on a comprehensive physical signature of each compiled material.
[0025] In some embodiments, each compiled material includes multiple compiled material files. Accordingly, calculating the comprehensive physical signature of each compiled material in step S1021 specifically includes:
[0026] Calculate the physical signature of each compiled material file based on the information digest algorithm;
[0027] A comprehensive physical signature corresponding to each compilation material is calculated based on the information digest algorithm and the physical signatures of all compilation material files corresponding to each compilation material.
[0028] In some embodiments, the step of determining the unique logical signature based on the comprehensive physical signature of each compiled material in step S1022 specifically includes:
[0029] A unique logical signature corresponding to the project is calculated based on the information digest algorithm and the comprehensive physical signature corresponding to each compiled material; or
[0030] The comprehensive physical signature corresponding to each compilation material is encoded according to a preset encoding rule to obtain a unique logical signature corresponding to the project; the encoding rule includes: according to the arrangement order of the compilation materials in the compilation log, the comprehensive physical signatures of each compilation material are connected in sequence.
[0031] A second aspect of the present invention is to provide an incremental upgrade device, comprising:
[0032] Compile log acquisition module, used to obtain the compilation log of each project;
[0033] A compilation material acquisition module, used for acquiring compilation materials involved in the compilation process of the project according to the compilation log;
[0034] A logic signature analysis module, used for calculating a unique logic signature representing a compilation process of each project based on the compilation material corresponding to the project;
[0035] A full package construction module, used to construct a full package of the corresponding application based on the unique logical signature of each project, the full package including a first signature list file, the first signature list file including each project and its corresponding unique logical signature, and a second file and its corresponding physical signature;
[0036] An incremental upgrade package acquisition module, used to extract the first signature list file in the full package, and perform a differential comparison between the first signature list file and the second signature list file in the historical full package to generate an incremental upgrade package, automatically update the version number of the application, and generate and publish an upgrade notification;
[0037] The logic signature analysis module specifically includes:
[0038] A first signature calculation unit, used for calculating a comprehensive physical signature of each compiled material based on an information digest algorithm;
[0039] The second signature calculation unit is used to determine the unique logical signature based on the comprehensive physical signature of each compiled material.
[0040] In some embodiments, each compilation material may include multiple compilation material files, and the first signature calculation unit specifically includes:
[0041] A first calculation subunit, configured to calculate a physical signature of each of the compiled material files based on an information digest algorithm;
[0042] The second calculation subunit is used to calculate the comprehensive physical signature corresponding to each compilation material based on the information summary algorithm and the physical signatures of all compilation material files corresponding to each compilation material.
[0043] In some embodiments, the second signature calculation unit is specifically used to calculate a unique logical signature corresponding to the project based on an information digest algorithm and a comprehensive physical signature corresponding to each compilation material; or, to encode the comprehensive physical signature corresponding to each compilation material according to a preset encoding rule to obtain a unique logical signature corresponding to the project; the encoding rule includes: according to the arrangement order of the compilation materials in the compilation log, the comprehensive physical signatures of each compilation material are sequentially connected into a string of digital codes.
[0044] In some embodiments, the incremental upgrade package acquisition module specifically includes:
[0045] A first file acquisition unit is used to determine whether the project has changed based on the unique logical signature corresponding to each project in the first signature list file and the second signature list file; and when it is determined that the unique logical signature corresponding to the corresponding project has changed, acquire the changed project;
[0046] A second file acquisition unit is configured to determine whether the second file has changed based on the physical signatures corresponding to the second file in the first signature list file and the second signature list file; and when it is determined that the second file has changed, acquire the changed second file;
[0047] The incremental upgrade package acquisition unit is used to generate the incremental upgrade package according to the changed project and / or the second file.
[0048] A third aspect of the present invention is to provide a computer-readable storage medium storing computer-readable instructions, which, when executed by a processor, implement the steps of the above-mentioned incremental upgrade method.
[0049] The fourth aspect of the present invention is to provide a computer program product, which includes computer execution instructions, which are stored in a computer-readable storage medium; at least one processor of an electronic device can read the computer execution instructions from the computer-readable storage medium, and the at least one processor executes the computer execution instructions so that the electronic device performs the incremental upgrade method as described above.
[0050] Beneficial effects:
[0051] In the prior art, the hash value of each file, i.e., the physical md5, is calculated, and the determination of whether to perform an incremental upgrade is made by comparing whether the physical md5 in different versions has changed. However, in the actual compilation process, each time the compiler compiles a project, even if the compilation materials have not changed, the physical md5 of the project will change due to the difference in compilation time and compilation machine, that is, regardless of whether the project has changed, a new physical md5 will be generated for the project each time it is compiled. Therefore, if this is used as the basis for incremental upgrades alone, some projects that originally did not need to be upgraded will be upgraded unnecessarily. The present application proposes a unique logical signature that characterizes the compilation process of each project, which is generated based on the compilation materials actually required in the compilation process (specifically, by parsing the compilation log of the compiler compilation project, the source code, project configuration and other compilation materials participating in the compilation process corresponding to each project are confirmed, and then the unique logical md5 is calculated). Therefore, only when any compilation material changes, that is, the project undergoes substantial changes (for example, the project configuration is modified, or the source code is modified), its unique logical signature will change. Accordingly, incremental upgrades are required at this time (in other words, ensuring that the logical md5 calculated for each compilation is the same when the source code and project configuration remain unchanged), thereby eliminating unnecessary upgrade operations.
[0052] Furthermore, in the present application, the version number corresponding to the application is generated only when the project is actually changed based on the unique logical signature of each project. Compared with the manual modification of the version number in the prior art, it is more efficient and has a higher accuracy.
[0053] The incremental upgrade method proposed in the present invention implements the incremental upgrade process of large-scale industrial software built on MSVC in a relatively general solution. It has strong reusability and high stability, solves the problems faced by traditional industrial software, and improves the efficiency and stability of software iterative updates. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. In all the drawings, similar elements or parts are generally identified by similar reference numerals. In the drawings, each element or part is not necessarily drawn according to the actual scale. Obviously, the drawings described below are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings without paying creative labor.
[0055] Figure 1 A flowchart of an incremental upgrade method according to an embodiment of the present invention;
[0056] Figure 2 A flowchart of an incremental upgrade method according to another embodiment of the present invention;
[0057] Figure 3 This is a functional module diagram of an incremental upgrade device according to an embodiment of the present invention;
[0058] Figure 4 This is a partial screenshot of the compilation log;
[0059] Figure 5 This is a schematic diagram of two full packages;
[0060] Figure 6 This is a comparison chart of the two versions of the full package;
[0061] Figure 7 Based on Figure 6 The diagram shows a differential packet obtained after input and output differential comparison of the two versions. DETAILED DESCRIPTION
[0062] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0063] Herein, suffixes such as "module", "component" or "unit" used to represent elements are only used to facilitate the description of the present invention, and have no specific meanings by themselves. Therefore, "module", "component" or "unit" can be used mixedly.
[0064] In this document, the terms "upper", "lower", "inner", "outer", "front", "back", "one end", "the other end" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the devices or elements referred to must have a specific orientation, be constructed and operate in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance.
[0065] In this document, unless otherwise clearly specified and limited, the terms "installed", "provided with", "connected", etc. should be understood in a broad sense. For example, "connected" can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection, a direct connection, or an indirect connection through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0066] Herein, "and / or" includes any and all combinations of one or more of the listed related items. Herein, "plurality" means two or more, that is, it includes two, three, four, five, etc.
[0067] "Incremental upgrade" or "incremental update": In this article, incremental upgrade means that when the software is updated or upgraded, only the parts that need to be updated are updated (for example, a certain project of the software has changed, or a new project has been added). Parts that do not need to be updated or have already been updated will not be updated repeatedly. Incremental upgrade is compared with full upgrade.
[0068] "Project": In this article, a project refers to a functional module in an application (or software), which is a product compiled by the compiler based on compilation materials consisting of compilation commands, link commands, external dependency libraries, resource dependencies, code files and other information items. It can also be called a dynamic library. Each application includes multiple projects (or multiple dynamic libraries). For example, CAD software includes hundreds of projects.
[0069] "Physical signature": In this article, a physical signature refers to a summary information value calculated based on the content of a file using a dedicated algorithm (the dedicated algorithm is a prior art, such as Message Digest Algorithm MD5, the fifth edition of the message digest algorithm, which will not be repeated here), usually represented by an md5 value, referred to as physical md5.
[0070] "Logical signature": In this article, a logical signature refers to a unique identifier that characterizes the compilation process of a project, and the compilation process uses a variety of compilation materials, including compilation commands, link commands, external dependency libraries, resource dependencies, code files and other information items. Once any of the compilation materials changes, it means that the compilation process of the project has changed. Accordingly, the project has actual or substantial changes, so the project in the corresponding application needs to be upgraded or updated. Preferably, the logical signature is a comprehensive physical signature based on each compilation material used in the compilation process, and a comprehensive information value is calculated based on the above-mentioned special algorithm, represented by md5, so it is also called logical md5. Among them, the compilation process refers to the process of the compiler using the above-mentioned compilation materials for compilation, and the compiler will generate a corresponding compilation log for each compilation.
[0071] The traditional incremental upgrade method usually relies on the project version number. If the project version number changes, it means that it needs to be upgraded. The version number is usually manually modified. For example, the software version number is the number used by engineers to identify software in different states during the product development process. It is the software's identity ID. Usually, a unique software version number is written into the software every time the software is integrated and released. At present, software integration can be automated using continuous integration tools (such as Jenkins), but the software version number update before integration needs to be manually updated in the code, which reduces the degree of automation of integration.
[0072] However, due to the large scale, numerous modules, and severe module coupling of traditional industrial software, it may be difficult for developers or engineers to evaluate which projects will be changed due to their modifications without architectural optimization and reconstruction. Moreover, the changed projects may involve multiple teams. It is a considerable challenge for developers to accurately increase the version number of each affected project.
[0073] In view of this, the present invention proposes a new incremental upgrade method, which generates a unique identifier that characterizes the compilation process of the project through the compilation materials required for the compilation process: a unique logical signature, that is, each compilation process of each project corresponds to a unique logical signature. Therefore, once the compilation process of the project (for example, any compilation material changes), changes, correspondingly, the unique logical signature of the project also changes, thereby characterizing that the project has actually changed. Therefore, the project in the corresponding application needs to be upgraded. Of course, if any compilation material has not changed, no matter how many times it is compiled, the physical signature changes, and the project uniquely corresponds to a unique logical signature. Therefore, there is no need to upgrade the project. The unique logical signature in the present invention is automatically generated during the compilation process of the compiler, which is more efficient than the traditional manual modification of the version number. On the other hand, since it is generated based on the compilation materials, only when the compilation materials change does it mean that the project has actually changed. In other words, when the compilation materials do not change, the unique logical md5 obtained by the compiler each time is the same. Therefore, it avoids the direct use of physical signatures, that is, physical md5 as the basis for incremental upgrades in the prior art, which leads to the upgrade of projects that do not need to be upgraded.
[0074] Example 1
[0075] See also Figure 1 The present invention provides an incremental upgrade method, which specifically comprises the steps of:
[0076] S101, obtaining a compilation log of each project, and obtaining compilation materials involved in the compilation process of the project according to the compilation log.
[0077] In some embodiments, each time the Msvc (Microsoft Visual C / C++) compiler compiles a project, it is mainly based on the compilation materials, such as the compilation command, link command, external dependency library, resource dependency, code file and other information items to compile, thereby obtaining a project (or dynamic library). In addition, after the compilation is successful, a compilation log of the compilation process will be generated.
[0078] Exemplarily, the CI server uses all MSVC to compile all projects. After the compilation is successful, a compilation log of the compilation process is generated in the compilation directory.
[0079] See also Figure 4, take the compilation process of Visual Studio under Windows as an example, the compilation of a project, analyze the intermediate log file of the compilation process: it contains the compilation command, link command, linked external dependencies, compiled source file path, etc. Based on these log information, extract all information items involved in the compilation process, such as compilation command, external dependency library, resource dependency, code file dependency, etc., calculate the comprehensive physical md5 for each information item or each compilation material, and then summarize these comprehensive physical md5 to generate a final logical md5.
[0080] In some embodiments, the compilation log records the address information (eg, link) of each compilation material, and thus the corresponding compilation material can be acquired according to the address information.
[0081] S102: Calculate a unique logic signature representing the compilation process of each project based on the compilation materials corresponding to each project.
[0082] In some embodiments, the step of calculating the unique logical signature of each project specifically includes the steps of: calculating the comprehensive physical MD5 value of each compiled material; then calculating a comprehensive MD5 value based on the comprehensive physical MD5 value of each compiled material, and using it as the unique logical MD5 of the project, that is, the unique logical signature.
[0083] Exemplarily, if the compilation materials required to compile a project include a first category of compilation materials t1, a second category of compilation materials t2, a third category of compilation materials t3,...; wherein the first category of compilation materials includes multiple compilation material files {t11, t12, t13,...}, the second category of compilation materials includes multiple compilation material files {t21, t22, t23,...}; the third category of compilation materials includes multiple compilation material files {t31, t32, t33,...}...
[0084] Use a dedicated algorithm (such as Message Digest Algorithm MD5, Message Digest Algorithm Version 5) to calculate the physical md5 of each compilation material file in the first category of compilation materials, and then calculate the comprehensive md5 of the first category of compilation material t1 based on the calculated multiple md5 inputs to the dedicated algorithm; and so on, get the comprehensive md5 of the second category of compilation material t2, the comprehensive md5 of the third category of compilation material t3, etc.; finally, input the dedicated algorithm based on all the comprehensive md5s to calculate, and finally get the logical md5 of the project. That is, calculate the comprehensive physical signature of each compilation material based on the message digest algorithm.
[0085] Specifically, for a project, by parsing its compilation log, each compilation material involved in its compilation process is obtained, and each compilation material may include multiple compilation material files. For example, a compilation command may include multiple compilation command files. Therefore, each compilation command file is used as the input of an existing dedicated algorithm (this is the prior art, i.e., the fifth edition of the message digest algorithm, which will not be repeated here) to calculate, and obtain the physical md5 of each compilation command file, and then the physical md5 of each compilation command file is used as the input of the existing dedicated algorithm to calculate, and the comprehensive physical md5 corresponding to the compilation command is obtained; accordingly, other compilation materials are calculated in the same way to obtain their respective corresponding comprehensive physical md5. For example, the comprehensive physical md5 of the link command is generated based on the physical md of each connection command file; the comprehensive physical md5 of the external dependency library is generated based on the physical md5 of each external dependency library; the comprehensive physical md5 of the resource dependency is generated based on the physical md5 of each resource dependency, and the comprehensive physical md5 of the code file is generated based on the physical md5 of each code file. Finally, a unique logical MD5 of the project is generated based on the comprehensive physical MD5 of each compiled material (that is, each comprehensive physical MD5 is input into the above-mentioned special algorithm for calculation).
[0086] Each time the compiler compiles a project, even if the compilation materials have not changed, the physical md5 of the project will change due to the difference in compilation time and compilation machine. Therefore, if only the physical md5 is used as the signature of the project, a new physical md5 will be generated for the project each time it is compiled. If this is used as the basis for upgrading the project, there may be a misjudgment, that is, the project has not actually changed in any substantial way, but it still needs to be upgraded, thereby performing unnecessary project upgrades. Therefore, in this embodiment, a unique logical signature that calculates and characterizes the compilation process of each project is proposed. Since it is generated based on the compilation materials actually required in the compilation process, as long as any compilation material changes, it means that the project has changed substantially (for example, the project configuration has been modified or the source code has been modified), and accordingly, its unique logical signature also changes. Compared with the above-mentioned physical md5 method, in this embodiment, judging whether to upgrade the corresponding project based on the logical md5 as a basis greatly avoids unnecessary project upgrades caused by being notified of upgrades for projects that have not actually changed.
[0087] Of course, in other embodiments, the comprehensive physical md5 of each of the above-mentioned compilation materials can also be directly encoded according to a specific encoding rule to obtain the final logical md5. For example, each comprehensive md5 is sequentially connected into a string of numbers. Preferably, the corresponding comprehensive physical md5 is sequentially connected into a string of digital codes according to the arrangement order of each compilation material in the compilation log.
[0088] S103, constructing a full package of the corresponding application based on the unique logical signature of each project, where the full package includes a first signature list file.
[0089] In some embodiments, after the CI (Continuous integration) server completes compilation and is ready for packaging, in addition to signing the compiled project (that is, calculating its unique logical signature), other files outside the compiled project (collectively referred to as second files in this article) must also be signed (usually physical md5), and then the logical signature of the project and the physical md5 of other files are integrated into the first signature list file to build a full package of the software.
[0090] See also Figure 5 , the two full packages have their own checklist (i.e. signature list file), which contains the unique logical md5 of all projects and the physical md5 of all files. All files here include projects and other files outside the projects, that is, each project in the signature list file corresponds to a unique logical md5 and a physical md5.
[0091] Among them, applicationRes.xml and version files have no compilation process, so they only have physical md5; while the other files (or other projects) are generated by compilation, including logical md5 and physical md5.
[0092] From the comparison, we can see that for the following three files (i.e. three projects), although the physical md5 changes (it changes every time you compile), the logical md5 does not change, so there is no need to update:
[0093] gccontainer.exe, plugin_wizard.dll, 3rdAdapter.dll.
[0094] However, the following four files (i.e. four projects) have their logic md5 changed and therefore need to be updated: example.exe, gcloader.dll, gcloud.grx, plugin_manager.dll.
[0095] Among them, the file without logical md5 (i.e. the second file) determines whether it needs to be updated based on the physical md5:
[0096] version needs to be updated; applicationRes.xml does not need to be updated.
[0097] S104, extract the first signature list file in the above full package, and perform differential comparison between it and the second signature list file of the historical full package, generate an incremental upgrade package, automatically update the version number of the application, and issue an upgrade notification.
[0098] In this embodiment, the differential comparison may be performed by the differential comparison commonly used in the art, that is, comparing the differences between the two, including the project with a changed unique logical signature, or a newly added project or a second file.
[0099] For example, see Figure 6 The logic of making a differential package (also known as an incremental upgrade package) is to compare the checkoutlist file contents of two versions (the current version and the previous historical version) (that is, compare the contents of the first signature list file and the second signature list file). If there is a logical md5, that is Figure 6 The third column indicates that the corresponding first file is generated by compilation, that is, the first file corresponding to the third column is actually a different project. The logical md5 is used first to determine whether the corresponding first file (or project) has changed. If it does not exist, Figure 6 If there is a logical md5 in the third column, it means that the corresponding second file is not generated by the compilation process, that is, it is not a project. It may be a text file, image resource, etc. The physical md5 change is the standard. Therefore, the second column of physical md5 is used to determine whether the corresponding second file has changed. That is, when generating an incremental upgrade package, it is preferred to compare the logical md5 to determine the changed first file (or project). If there is no logical md5, then compare the physical md5 to determine the changed second file (that is, the file outside the project), so as to obtain the corresponding incremental upgrade package based on the changed first file and / or second file. Of course, if a project is newly added, it will also be added to the incremental upgrade package.
[0100] See also Figure 7 ,based on Figure 6 The result of comparing the signature list file contents of the two versions is that the final differential package generated is A24.0.0.1.20240529112410. The files in the package are as follows Figure 7 shown.
[0101] Compared with the traditional method of manually modifying the version number for incremental upgrade, this embodiment introduces a new concept, namely the unique logical signature of the project, so that the incremental upgrade function no longer relies on the physical md5 of each project. It only needs to compare whether the unique logical signature of the project has changed (for example, the unique logical signature of the same project in the first signature list is different from the unique logical signature in the second signature list, or a certain project only appears in the first signature list, that is, the project is newly added), which can more accurately identify which projects need incremental upgrades. In addition, since there is no need to pay attention to the business logic of the application, it has strong versatility, which can enable some large-scale software with backward architectural design and poor modular isolation to support incremental upgrades well. And compared with the binary incremental update solution using the bsdiff algorithm, this solution has higher stability and is more suitable for the requirements of the industrial software field.
[0102] See also Figure 2 , which is described in detail below with reference to specific examples.
[0103] S201, encapsulate the "project logic signature analysis component". The function of this component is to calculate the unique logic signature of each project compilation output module to determine whether the module content has changed.
[0104] That is, a unique logical signature is calculated for each project, and then the unique logical signature is used to determine whether the project has changed.
[0105] Msvc (Microsoft Visual C / C++) compiler) compiles a project every time, even if the compile options and code files have not changed, the physical md5 of the generated module (i.e., project) will change due to the difference in compile time and compile machine. If this is used as the module (i.e., project) signature, all modules (i.e., all projects) will change every time they are compiled, and accurate incremental updates cannot be achieved. Therefore, a component that can calculate a unique logical signature for each project is needed.
[0106] S202, the CI server uses all MSVC to compile all projects. After the compilation is successful, a log of the compilation process will be generated in the compilation directory. This log directory needs to be located for the next step of analysis.
[0107] S203, the "project logic signature analysis component" obtains all the compilation commands, link commands, external dependency libraries, resource dependencies, code files and other information items of the project based on the compilation log, and derives the unique signature of the generated dynamic library (dynamic library is the product of compilation, also called project) through all the above information items, that is, the unique logical signature.
[0108] In this embodiment, the unique logical signature can ensure that when the project does not change (i.e., the compiled materials do not change), no matter when and where the compilation is performed, the compiled product, i.e., the unique logical signature of the project, is consistent, i.e., does not change. In other words, the unique logical signature will only change if the project changes.
[0109] S204, after the CI server has completed compilation and is ready to package, it is necessary to sign (usually physical md5) all files other than the compiled product (i.e., the project) generated in the above steps, integrate the unique logical signature of the project and the physical md5 of other files into the "signature list file" to build a full package of the software.
[0110] S205, after the test process, upload the full package to the upgrade service, extract the "first signature list file" in the full package, and perform a differential comparison with the second signature list file in the historical full package (for example, the full package of the previous version number), generate an incremental upgrade package from the historical version to the latest version, increase the software version number, obtain the latest version number, and notify the client to upgrade. Among them, the method for generating the software version number can adopt the existing automatic generation method, which will not be repeated here. However, unlike the prior art, in this embodiment, the software version number is automatically updated when the corresponding incremental upgrade package is obtained, and is not manually updated. Therefore, the update accuracy of the version number is higher.
[0111] Example 3
[0112] See also Figure 3 The present invention provides an incremental upgrade device, specifically, comprising:
[0113] Compile log acquisition module, used to obtain the compilation log of each project;
[0114] A compilation material acquisition module, used for acquiring compilation materials involved in the project compilation process according to the compilation log;
[0115] A logical signature analysis module is used to calculate a unique logical signature that characterizes the compilation process of each project based on the compilation materials corresponding to each project; specifically, it includes a first signature calculation unit, which is used to calculate the comprehensive physical signature of each compilation material based on the information digest algorithm; a second signature calculation unit, which is used to determine the unique logical signature based on the comprehensive physical signature of each compilation material; wherein the first signature calculation unit specifically includes: a first calculation subunit, which is used to calculate the physical signature of each of the compilation material files based on the information digest algorithm; a second calculation subunit, which is used to calculate the comprehensive physical signature corresponding to each compilation material based on the information digest algorithm and the physical signatures of all the compilation material files corresponding to each compilation material;
[0116] A full package construction module, used to construct a full package of the corresponding application based on the unique logical signature of each project, the full package including a first signature list file; the first signature list file includes each project and its corresponding unique logical signature, and a second file and its corresponding physical signature;
[0117] The incremental upgrade package acquisition module is used to extract the first signature list file in the minimum full package, and perform differential comparison between it and the second signature list file in the historical full package to generate an incremental upgrade package, automatically update the version number of the application, and generate and publish an upgrade notification to the client.
[0118] Specifically, the incremental upgrade package acquisition module specifically includes: a first file acquisition unit, used to determine whether the project has changed based on the unique logical signature corresponding to each project in the first signature list file and the second signature list file; and when it is determined that the unique logical signature corresponding to the corresponding project has changed, the changed project is acquired; a second file acquisition unit, used to determine whether the second file has changed based on the physical signature corresponding to the second file in the first signature list file and the second signature list file; and when it is determined that the second file has changed, the changed second file is acquired; an incremental upgrade package acquisition unit, used to generate the incremental upgrade package according to the changed project and / or the second file.
[0119] In other embodiments, the incremental upgrade package acquisition module may not automatically update the version number, but trigger a separate version management module to automatically update the version number. Of course, the version management module may also be integrated into the incremental upgrade package acquisition module as a unit, so that when the incremental upgrade package acquisition unit generates an incremental upgrade package, the version management module is triggered to automatically update the version number.
[0120] Example 4
[0121] The present invention also provides a version management method, which specifically comprises the steps of:
[0122] S301, obtaining a compilation log of each project, and obtaining compilation materials involved in the compilation process of the project according to the compilation log.
[0123] In some embodiments, Msvc (Microsoft Visual C / C++) compiler) compiles a project each time, mainly based on compilation materials, such as compilation commands, link commands, external dependency libraries, resource dependencies, code files and other information, to obtain a project (or dynamic library). In addition, a compilation log of the compilation process will be generated after the compilation is successful.
[0124] Exemplarily, the CI server uses all MSVC to compile all projects. After the compilation is successful, a compilation log of the compilation process is generated in the compilation directory.
[0125] See also Figure 4 , take the compilation process of Visual Studio under Windows as an example, the compilation of a project, analyze the intermediate log file of the compilation process: it contains the compilation command, link command, linked external dependencies, compiled source file path, etc. Based on these log information, extract all the information items involved in the compilation, such as compilation command, external dependency library, resource dependency, code file dependency, etc., calculate the physical md5 for each item, and then summarize these physical md5 to generate a final logical md5.
[0126] In some embodiments, the compilation log records the address information (eg, link) of each compilation material, and thus the corresponding compilation material can be acquired according to the address information.
[0127] S302: Calculate a unique logic signature for each project based on the compilation materials corresponding to each project.
[0128] In some embodiments, the step of calculating the unique logical signature of each project specifically includes the steps of: calculating the comprehensive physical MD5 value of each compiled material, that is, the comprehensive physical signature; then calculating a comprehensive MD5 value based on the comprehensive physical MD5 value of each compiled material, and using it as the unique logical MD5 of the project, that is, the unique logical signature.
[0129] Exemplarily, if the compilation materials required to compile a project include a first category of compilation materials t1, a second category of compilation materials t2, a third category of compilation materials t3,...; wherein the first category of compilation materials includes multiple compilation material files {t11, t12, t13,...}, the second category of compilation materials includes multiple compilation material files {t21, t22, t23,...}; the third category of compilation materials includes multiple compilation material files {t31, t32, t33,...}...
[0130] Calculate the physical md5 of each compilation material file in the first category of compilation materials respectively, and then input the special algorithm based on the calculated multiple md5s to obtain the comprehensive md5 of the first category of compilation material t1; and so on, obtain the comprehensive md5 of the second category of compilation material t2, the comprehensive md5 of the third category of compilation material t3...; finally, input the special algorithm based on all the comprehensive md5s for calculation, and finally obtain the unique logical md5 of the project.
[0131] Specifically, for a project, each compilation material may include multiple compilation material files. For example, a compilation command may include multiple compilation command files. Therefore, each compilation command file is used as an input of an existing special algorithm (such as Message Digest Algorithm MD5, message digest algorithm fifth edition, which is a prior art and will not be repeated here) to calculate, and obtain the physical md5 of each compilation command file. Then, the physical md5 of each compilation command file is used as an input of the existing special algorithm to calculate, and the comprehensive physical md5 corresponding to the compilation command is obtained; accordingly, other compilation materials are calculated in the same way to obtain their respective comprehensive physical md5s. For example, based on the physical md of each connection command file, the comprehensive physical md5 of the link command is generated; based on the physical md5 of each external dependency library, the comprehensive physical md5 of the external dependency library is generated; based on the physical md5 of each resource dependency, the comprehensive physical md5 of the resource dependency is generated; based on the physical md5 of each code file, the comprehensive physical md5 of the code file is generated. Finally, based on the comprehensive physical md5 of each compilation material, the logical md5 for the project is generated (that is, each comprehensive physical md5 is input into the above-mentioned special algorithm for calculation).
[0132] Each time the compiler compiles a project, even if the compilation materials have not changed, the physical md5 of the project will change due to the differences in compilation time and compilation machine. Therefore, if only the physical md5 is used as a signature, a new physical md5 will be generated for the project each time it is compiled. If this is used as the basis for upgrading the project, there may be a misjudgment, that is, the project has not actually undergone any substantial changes, but it still needs to be upgraded. Therefore, in this embodiment, a unique logical signature that calculates and characterizes the compilation process of each project is proposed. Since it is generated based on the compilation materials actually required in the compilation process, as long as any compilation material changes, it means that the project has undergone substantial changes, and accordingly, its unique logical signature also changes. Compared with the above-mentioned physical md5 method, the logical md5 in this embodiment is used as a basis to determine whether to upgrade the corresponding project, which greatly avoids unnecessary project upgrades caused by notifying upgrades of projects that have not actually changed.
[0133] Of course, in other embodiments, the above-mentioned comprehensive md5 of each category can also be directly encoded in a specific encoding form to obtain the final logical md5. For example, each comprehensive md5 is sequentially connected into a string of numbers. Preferably, the corresponding comprehensive physical md5 is sequentially connected into a string of digital codes according to the arrangement order of each compilation material in the compilation log.
[0134] S103, constructing a full package of the corresponding application based on the unique logical signature of each project, where the full package includes a first signature list file.
[0135] In some embodiments, after the CI (Continuous Integration) server completes compilation and is ready for packaging, it is necessary not only to sign the compiled project (i.e., the first file), but also to sign other files outside the project (i.e., the second file) (usually physical md5), and then integrate the unique logical signature of the project and the physical md5 of other files into the signature list file to build a full package of the software.
[0136] See also Figure 5 , two full packages, each with its own checklist (i.e. signature list file), which contains the unique logical md5 of all projects and the physical md5 of all files.
[0137] Among them, applicationRes.xml and version files have no compilation process, so they only have physical md5; the rest of the files (or projects) are compiled and contain unique logical md5 and physical md5.
[0138] From the comparison, we can see that for the following three first files (i.e. three projects), although the physical md5 changes (it changes every time you compile), the corresponding unique logical md5 does not change, so there is no need to update:
[0139] gccontainer.exe, plugin_wizard.dll, 3rdAdapter.dll.
[0140] However, the unique logic md5 of the following four first files (i.e., four projects) has changed, so they need to be updated: example.exe, gcloader.dll, gcloud.grx, plugin_manager.dll.
[0141] Among them, the second file without a unique logical md5 determines whether it needs to be updated based on the physical md5:
[0142] version needs to be updated; applicationRes.xml does not need to be updated.
[0143] S304, extract the first signature list file in the full package, and perform a differential comparison between it and the second signature list file in the historical full package, generate an incremental upgrade package from the historical version to the latest version, and automatically update the version number of the application.
[0144] In this embodiment, the differential comparison may be performed by the differential comparison commonly used in the art, that is, comparing the differences between the two, including the project with a changed unique logical signature, or a newly added project or a second file.
[0145] For example, see Figure 6 The logic of making a differential package (also known as an incremental upgrade package) is to compare the checkoutlist file contents of two versions (the current version and the previous historical version) (that is, compare the contents of the first signature list file and the second signature list file). If there is a logical md5, that is Figure 6 The third column indicates that the corresponding file is generated by compilation, that is, the first file corresponding to the third column is actually a different project. The logical md5 is used first to determine whether the corresponding file has changed. If it does not exist, Figure 6 If the third column has a logical md5, it means that the corresponding file is not generated by the compilation process, that is, it is not a project. It may be a text file, image resource, etc. The physical md5 change is the standard. Therefore, the second column of physical md5 is used to determine whether the corresponding file has changed. That is, when generating an incremental upgrade package, the logical md5 is compared first to determine the first file (or project) that has changed. If there is no logical md5, the physical md5 is compared to determine the second file (i.e., the file outside the project) that has changed, so as to obtain the corresponding incremental upgrade package based on the changed first file and / or second file. Of course, if a project is newly added, it will also be added to the incremental upgrade package.
[0146] See also Figure 7 ,based on Figure 6 The result of comparing the signature list file contents of the two versions is that the final differential package generated is A24.0.0.1.20240529112410. The files in the package are as follows Figure 7 shown.
[0147] Compared with the traditional method of manually modifying the version number for incremental upgrades, this embodiment introduces a new concept, namely the unique logical signature of the project, so that the incremental upgrade function no longer relies on the physical md5 of each project. It only needs to compare whether the logical signature of the project has changed, and it can more accurately identify which projects need incremental upgrades. In addition, since there is no need to pay attention to the business logic of the application, it has strong versatility, allowing some large-scale software with backward architectural design and poor modular isolation to support incremental upgrades well. And compared with the binary incremental update solution using the bsdiff algorithm, this solution is more stable and more suitable for the requirements of the industrial software field.
[0148] Accordingly, based on the above version management method, the present invention also provides a version management device, specifically, comprising:
[0149] Compile log acquisition module, used to obtain the compilation log of each project;
[0150] A compilation material acquisition module is used to acquire the compilation material corresponding to the project according to the compilation log;
[0151] A logical signature analysis module, used to calculate a unique logical signature for each project based on the compiled materials; specifically, the logical signature analysis module is used to calculate a physical signature for each compiled material file based on an information digest algorithm, and to calculate a comprehensive physical signature corresponding to each compiled material based on the information digest algorithm and the physical signatures of all compiled material files corresponding to each compiled material; and to determine the unique logical signature based on the comprehensive physical signature of each compiled material;
[0152] A full package building module, used to build a full package of the corresponding application based on the unique logical signature of each project, the full package including a first signature list file;
[0153] The version management module is used to extract the first signature list file in the full package, and perform differential comparison between it and the second signature list file in the historical full package, generate an incremental upgrade package from the historical version to the latest version, and automatically update the version number of the application.
[0154] Specifically, the version management module is specifically used to determine whether a project has changed based on the unique logical signatures corresponding to each project in the first signature list file and the second signature list file; and when it is determined that the unique logical signature corresponding to the corresponding project has changed, the changed project is obtained; and based on the physical signatures corresponding to the second file in the first signature list file and the second signature list file, determine whether the second file has changed; and when it is determined that the second file has changed, obtain the changed second file; an incremental upgrade package acquisition unit is used to generate an incremental upgrade package based on the changed project and / or second file.
[0155] In some embodiments, the version management module preferentially identifies the file category in the signature list file. If it is the first file (specifically, determine whether there is a unique logical signature in the signature list file, and if so, the corresponding file is the first file), then compare whether the unique logical signatures of the same first file in the first signature list file and the second signature list file are the same. If they are not the same, it means that the first file has changed, and the changed first file is obtained from the first signature list file; if they are the same, it means that the corresponding first file has changed; after all unique logical signatures are compared, compare the physical signatures of each second file. If they are different, it means that the corresponding second file has changed, and the changed second file is obtained from the first signature list file; finally, generate an incremental upgrade package based on the changed first file and / or second file, and automatically generate a new version number.
[0156] Of course, in other embodiments, the version management module may also perform the above judgment, and may not generate the incremental upgrade package. Instead, a separate incremental upgrade package module performs the above judgment and generates the incremental upgrade package, and then triggers the version management module to automatically generate a new version number.
[0157] The present invention also provides a computer-readable storage medium storing computer-readable instructions, which, when executed by a processor, implement the steps of the incremental upgrade method described in the above-mentioned embodiment 1 or the steps of the version number management method in embodiment 3.
[0158] The present invention also provides a computer program product, which includes computer execution instructions, which are stored in a computer-readable storage medium; at least one processor of an electronic device can read the computer execution instructions from the computer-readable storage medium, and the at least one processor executes the computer execution instructions so that the electronic device performs the steps of the incremental upgrade method in the above-mentioned Example 1 or the version number management method in Example 3.
[0159] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0160] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a computer terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0161] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation modes, which are merely illustrative rather than restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, all of which are within the protection of the present invention.
Claims
1. An incremental upgrade method, characterized in that: Includes steps: S101, obtaining a compilation log of each project, and obtaining compilation materials involved in the compilation process of the project according to the compilation log; the compilation materials include compilation commands, external dependency libraries, resource dependencies, link commands, and code file dependencies; S102, calculating a unique logical signature representing a compilation process of each project based on the compilation materials corresponding to the project; S103, constructing a full package of the corresponding application based on the unique logical signature of each project, wherein the full package includes a first signature list file, wherein the first signature list file includes each project and its corresponding unique logical signature, and a second file and its corresponding physical signature; The second file includes: other files other than the compiled project; S104, extracting the first signature list file in the full package, and performing a differential comparison between the first signature list file and the second signature list file in the historical full package, generating an incremental upgrade package, automatically updating the version number of the application, and issuing an upgrade notification; The step S102 calculates a unique logical signature representing the compilation process of each project based on the compilation material corresponding to the project, specifically including: S1021, calculating a comprehensive physical signature of each compiled material based on an information digest algorithm; S1022, determining the unique logical signature based on the comprehensive physical signature of each compiled material.
2. The incremental upgrade method according to claim 1, characterized in that: Step S104 extracts the first signature list file in the full package and performs a differential comparison between the first signature list file and the second signature list file in the historical full package to generate an incremental upgrade package, specifically including: Determine whether the project has changed based on the unique logical signatures corresponding to each project in the first signature list file and the second signature list file; if changed, obtain the changed project; Determine whether the second file has changed based on the physical signature corresponding to the second file in the first signature list file and the second signature list file; if changed, obtain the changed second file; The incremental upgrade package is generated according to the changed project and / or the second file.
3. The incremental upgrade method according to claim 1, characterized in that: The step before step S101 also includes the step of: encapsulating a logic signature analysis component; the logic signature analysis component is used to determine a unique logic signature corresponding to each project based on a comprehensive physical signature of each compiled material.
4. An incremental upgrade method according to any one of claims 1 to 3, characterized in that: Each compilation material includes a plurality of compilation material files. Accordingly, the comprehensive physical signature of each compilation material is calculated in step S1021, specifically including: Calculate the physical signature of each compiled material file based on the information digest algorithm; A comprehensive physical signature corresponding to each compilation material is calculated based on the information digest algorithm and the physical signatures of all compilation material files corresponding to each compilation material.
5. The incremental upgrade method according to claim 4, characterized in that: The step of determining the unique logical signature based on the comprehensive physical signature of each compiled material in step S1022 specifically includes: A unique logical signature corresponding to the project is calculated based on the information digest algorithm and the comprehensive physical signature corresponding to each compiled material; or The comprehensive physical signature corresponding to each compilation material is encoded according to a preset encoding rule to obtain a unique logical signature corresponding to the project; the encoding rule includes: according to the arrangement order of the compilation materials in the compilation log, the comprehensive physical signature of each compilation material is connected into a string of digital codes.
6. An incremental upgrade device, characterized in that: include: Compile log acquisition module, used to obtain the compilation log of each project; A compilation material acquisition module, used to acquire compilation materials involved in the compilation process of the project according to the compilation log; the compilation materials include compilation commands, external dependency libraries, resource dependencies, link commands, and code file dependencies; A logic signature analysis module, used for calculating a unique logic signature representing a compilation process of each project based on the compilation material corresponding to the project; A full package construction module, used to construct a full package of the corresponding application based on the unique logical signature of each project, the full package including a first signature list file, the first signature list file including each project and its corresponding unique logical signature, and a second file and its corresponding physical signature; The second file includes: other files other than the compiled project; An incremental upgrade package acquisition module, used to extract the first signature list file in the full package, and perform a differential comparison between the first signature list file and the second signature list file in the historical full package to generate an incremental upgrade package, automatically update the version number of the application, and generate and publish an upgrade notification; The logic signature analysis module specifically includes: A first signature calculation unit, used for calculating a comprehensive physical signature of each compiled material based on an information digest algorithm; The second signature calculation unit is used to determine the unique logical signature based on the comprehensive physical signature of each compiled material.
7. The incremental upgrade device according to claim 6, characterized in that: Each compilation material includes a plurality of compilation material files, and the first signature calculation unit specifically includes: A first calculation subunit, configured to calculate a physical signature of each of the compiled material files based on an information digest algorithm; The second calculation subunit is used to calculate the comprehensive physical signature corresponding to each compilation material based on the information summary algorithm and the physical signatures of all compilation material files corresponding to each compilation material.
8. The incremental upgrade device according to claim 6, characterized in that: The incremental upgrade package acquisition module specifically includes: A first file acquisition unit is used to determine whether the project has changed based on the unique logical signature corresponding to each project in the first signature list file and the second signature list file; and when it is determined that the unique logical signature corresponding to the corresponding project has changed, acquire the changed project; A second file acquisition unit is configured to determine whether the second file has changed based on the physical signatures corresponding to the second file in the first signature list file and the second signature list file; and when it is determined that the second file has changed, acquire the changed second file; The incremental upgrade package acquisition unit is used to generate the incremental upgrade package according to the changed project and / or the second file.
9. A computer program product, comprising computer execution instructions, which are stored in a computer-readable storage medium; at least one processor of an electronic device can read the computer execution instructions from the computer-readable storage medium, and the at least one processor executes the computer execution instructions so that the electronic device performs the incremental upgrade method as described in any one of claims 1 to 5.
10. A computer-readable storage medium, characterized in that: It stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the steps of the incremental upgrade method described in any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Increment issuance method and device, upgrade method and device of application program
CN105740016A
Installation package incremental upgrading method and device based on file comparison
CN114296771A
Software increment upgrading method, device and equipment and computer readable storage medium
CN112486555A
Application upgrading method and device, equipment and storage medium
CN117331596A