Application program upgrading method and electronic equipment
By extracting and compressing the upgraded system files of the version number and generating the target installation package, the problem of long upgrade time caused by the large application upgrade package is solved, and the upgrade efficiency and user experience are improved.
Patent Information
- Application Number
- CN202410830512.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-25
- Publication Date
- 2024-11-19
AI Technical Summary
In the prior art, the files in the application upgrade package are larger, resulting in a longer upgrade time and affecting the user experience.
By obtaining the initial version file and upgraded installation package, extracting the upgraded system files of the version number, performing compression processing to generate the target installation package, and sending it to the client to reduce the data transmission amount and improve upgrading efficiency.
It shortens the upgrade time of the application, improves the user experience, reduces the load on the client CPU, and reduces the risk of errors during the upgrade process.
Smart Images

Figure CN118981322A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of software upgrade, and in particular to an application upgrade method and an electronic device. Background Art
[0002] In the related art, an upgrade package is usually uploaded to a client via a web page to upgrade the client's application. However, due to the large number of folders and files in the upgrade package, the upgrade package is large, resulting in a longer application upgrade time, which affects the user experience. Summary of the invention
[0003] The embodiments of the present disclosure provide an application program upgrade method and an electronic device.
[0004] In a first aspect, an embodiment of the present disclosure provides a method for upgrading an application program, which is applied to a server, and the method includes:
[0005] Obtaining an initial version file and an upgrade installation package; the initial version file includes the names and corresponding version numbers of multiple system files in the application before the upgrade;
[0006] Based on the initial version file, extract the system file with the upgraded version number in the upgrade installation package as the target system file;
[0007] The target system files are compressed to generate a target installation package, and the target installation package is sent to the client.
[0008] In some embodiments, after obtaining the upgrade installation package, the method further includes:
[0009] Decompress the upgrade installation package to obtain the upgrade version file and the upgrade system file;
[0010] The upgraded version file includes the name of the upgraded system file and the corresponding version number; the upgraded system file is a plurality of system files in the application after the upgrade.
[0011] In some embodiments, each of the system files includes multiple levels of folders, and each level of the folders has a corresponding version number; based on the initial version file, extracting the system file with the upgraded version number in the upgrade installation package as the target system file includes:
[0012] Comparing the initial version file with the upgraded version file, and determining the name of the system file with the upgraded version number based on the version numbers corresponding to the multiple levels of folders in each of the system files;
[0013] Based on the name of the system file with the upgraded version number, the system file with the upgraded version number is searched out in the upgraded system file, and the system file with the upgraded version number is used as the target system file.
[0014] In some embodiments, the system files include program files, library files, resource files, and configuration files;
[0015] The program file includes multiple levels of program folders, and the i-1 level program folder includes at least one i-level program folder;
[0016] The library file includes multiple levels of library folders, and the j-1 level library folder includes at least one j level library folder;
[0017] The resource file includes a multi-level resource folder, and the m-1 level resource folder includes at least one m-level resource folder;
[0018] The configuration file includes multiple levels of configuration folders, and the n-1 level configuration folder includes at least one n-level configuration folder; wherein i, j, m and n are all greater than or equal to 1.
[0019] In some embodiments, the initial version file and the upgraded version file are compared, and based on the version numbers corresponding to the multiple levels of the folders in each of the system files, the name of the system file with the upgraded version number is determined, including:
[0020] In the initial version file and the upgraded version file, the multiple levels of program folders are compared level by level, and based on the version number of each level of program folder, the name of the program folder with the upgraded version number is determined; at the same time,
[0021] Compare the multiple levels of library folders level by level, and determine the name of the library folder with the upgraded version number based on the version number of each level of library folder; at the same time,
[0022] Compare the resource folders at multiple levels level by level, and determine the name of the resource folder with the upgraded version number based on the version number of the resource folder at each level; at the same time,
[0023] The multi-level configuration folders are compared level by level, and based on the version number of the configuration folder at each level, the name of the configuration folder with the upgraded version number is determined.
[0024] In some embodiments, sending the target installation package to the client includes:
[0025] The target installation package is sent to the client via a web page.
[0026] In some embodiments, the version number includes a Git repository version and a SVN repository version.
[0027] In a second aspect, an embodiment of the present disclosure provides a method for upgrading an application program, which is applied to a client, and the method includes:
[0028] Creating an initial version file based on the name of the system file in the application and the corresponding version number;
[0029] Sending the initial version file to the server, and receiving the target installation package fed back by the server;
[0030] The application is upgraded through the target installation package.
[0031] In some embodiments, upgrading the application program through the target installation package includes:
[0032] Decompressing the target installation package to obtain a target system file; the target system file is a plurality of system files with upgraded version numbers, each of which includes multiple levels of folders, and each level of folders has a corresponding version number;
[0033] The target system file is copied to the corresponding file directory in the application program to upgrade the application program.
[0034] In a third aspect, an embodiment of the present disclosure provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer-readable program that can be executed by the processor; when the processor executes the computer-readable program, it implements the steps in the application upgrade method described in the first and second aspects.
[0035] In the disclosed embodiment, the system files with upgraded version numbers in the upgrade installation package are obtained through the initial version files, and the system files with upgraded version numbers are compressed to generate the target installation package; that is, the target installation package only includes the system files with upgraded version numbers, so that the file size of the target installation package is smaller, thereby reducing the amount of data transmission, improving the upgrade efficiency of the application, and providing a better user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 A schematic diagram of a method for upgrading an application program provided in an embodiment of the present disclosure Figure 1 ;
[0037] Figure 2 A schematic diagram of a method for upgrading an application program provided in an embodiment of the present disclosure Figure 2 ;
[0038] Figure 3Another method for upgrading an application program provided in the present disclosure is shown in FIG. Figure 1 ;
[0039] Figure 4 Another method for upgrading an application program provided in the present disclosure is shown in FIG. Figure 2 ;
[0040] Figure 5 A flowchart of another method for upgrading an application program provided in an embodiment of the present disclosure;
[0041] Figure 6 A schematic diagram of the structure of the server provided in the embodiment of the present disclosure;
[0042] Figure 7 A schematic diagram of the structure of a client provided in an embodiment of the present disclosure;
[0043] Figure 8 A schematic diagram of a hardware entity of an electronic device in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0044] The following will be combined with the drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. It is understood that the specific embodiments described herein are only used to explain the relevant disclosure, rather than to limit the disclosure. It should also be noted that, for the convenience of description, only the parts related to the relevant disclosure are shown in the drawings.
[0045] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which the present disclosure belongs. The terms used herein are only for the purpose of describing the embodiments of the present disclosure and are not intended to limit the present disclosure.
[0046] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0047] It should be pointed out that the terms "first\second\third" involved in the embodiments of the present disclosure are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged in a specific order or sequence where permitted, so that the embodiments of the present disclosure described here can be implemented in an order other than that illustrated or described here.
[0048] In the related art, since the upgrade package compresses the complete program files, library files, resource files, configuration files, etc. of the product, and these files are stored in different folders, the upgrade package file is large (for example, about 200MB) and the number of folders and files is large; further, due to the limitations of CPU resources in the client (for example, an embedded device), after uploading the upgrade package to the client through a web page, the process of decompressing, restarting, and copying the directory files to the specified folder takes a long time (for example, 5-8 minutes), affecting the user experience.
[0049] Based on this, the embodiments of the present disclosure provide an application upgrade method and an electronic device. The embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.
[0050] In one embodiment of the present disclosure, see Figure 1 , which is an application upgrade method provided in an embodiment of the present disclosure. The method is applied to a server, and the application upgrade method includes: steps S110 to S130.
[0051] Step S110, obtaining an initial version file and an upgrade installation package; the initial version file includes the names and corresponding version numbers of multiple system files in the application before the upgrade.
[0052] Here, obtaining the initial version file includes: receiving an upgrade request from a client, the upgrade request including the initial version file; the initial version file records the names and corresponding version numbers of all system files in the application before the upgrade; the initial version file may be a text file, a configuration file, etc. Since the initial version file is a single file and is only used to record the names and corresponding version numbers of system files, the initial version file is relatively small, and thus will not affect the response time of the server.
[0053] Furthermore, the system files in the application before the upgrade are used as the initial system files; hierarchical device management can be implemented for different types of initial system files, and multiple levels of version numbers can be set for them. Specifically, the initial system files can be program files, library files, resource files, and configuration files. At the same time, each file (program files, library files, resource files, and configuration files) can be stored in a multi-level folder. For example, the library folder includes multiple first-level library folders, and the first-level library folder includes multiple second-level library folders, and so on. In this way, the initial version file records the version number of each level of folder.
[0054] It should be noted that each folder also includes files, and the initial version file also records the version number of each file. For example, the first-level library folder and the second-level folder both include multiple library files, and the initial version file also records the version number of each library file.
[0055] In some embodiments, the version number of the system file can be a Git repository version and / or an SVN repository version. Specifically, the version number of the Git repository is a 40-bit hexadecimal hash value, also known as a SHA-1 hash value; this hash value is calculated based on the code content using Git's hash algorithm, so each version has a unique version number; the version number of the SVN repository is an increasing integer, starting from 1. Whenever the repository accepts a commit, the file system enters a new state, which is called a version and is assigned a unique natural number. In other embodiments, the version number can also be of other types, which is not limited by the present disclosure.
[0056] In addition, the upgrade installation package is downloaded from the web page by the server; the upgrade installation package contains all system files in the upgraded application, that is, the upgrade installation package contains system files that have not been upgraded and system files that have been upgraded; for example, if only the library files are upgraded, then the upgrade installation package contains program files that have not been upgraded, library files that have been upgraded, resource files that have not been upgraded, and configuration files that have not been upgraded. Here, the version number corresponding to the system files that have not been upgraded has not changed, and the version number of the upgraded system files has changed (that is, the version number is higher than the version number before the upgrade).
[0057] In the embodiments of the present disclosure, the server may be a personal computer (PC), and the client may be an embedded device, such as a smart home, a medical device, etc.
[0058] Step S120: based on the initial version file, extract the system file with the upgraded version number in the upgrade installation package as the target system file.
[0059] Here, the system file name in the initial version file is searched in the upgrade installation package, the version numbers of each system file are compared to see if they are consistent, and the system files with inconsistent version numbers in the upgrade installation package are used as target system files; among which, the target system files are files that need to be replaced or updated when the application is updated.
[0060] Further, the target system file may be a folder and / or a file. For example, the target system file may be a primary library folder, or a library file in a primary library folder and a secondary library folder.
[0061] Step S130: compress the target system files to generate a target installation package, and send the target installation package to the client.
[0062] Here, since the target installation package only includes the target system files (i.e., the system files with changed version numbers), the file size of the target installation package is smaller. Therefore, when the target installation package is sent to the client, the amount of data transmission can be reduced, thereby improving the upgrade efficiency of the application and providing a better user experience.
[0063] Next, the application upgrade method is introduced in detail.
[0064] In some embodiments, after obtaining the upgrade installation package in step S110, the application upgrade method further includes: step S110a, decompressing the upgrade installation package to obtain an upgrade version file and an upgrade system file; wherein the upgrade version file includes the name of the upgrade system file and the corresponding version number.
[0065] Here, the upgraded version file records the name of the upgraded system file and the corresponding version number, wherein the upgraded version file is the same as the initial version file and can be a text file, a configuration file, and the like.
[0066] Furthermore, multiple system files (i.e., initial system files and upgraded system files) may include program files, library files, resource files and configuration files; program files include multi-level program folders, and the i-1-level program folder includes at least one i-level program folder; library files include multi-level library folders, and the j-1-level library folder includes at least one j-level library folder; resource files include multi-level resource folders, and the m-1-level resource folder includes at least one m-level resource folder; configuration files include multi-level configuration folders, and the n-1-level configuration folder includes at least one n-level configuration folder; wherein, i, j, m and n are all greater than or equal to 1.
[0067] For example, the program file includes three levels of program folders; specifically, the program file includes three first-level program folders, each of which includes a second-level program folder, and each of which includes a third-level program folder. In addition, each level of program folder may include a program file.
[0068] It should be noted that the difference between the initial system files and the upgraded system files is that compared with the initial system files, some upgraded system files (for example, folders, files) have been modified, added, or deleted. That is, the upgraded system files include system files that have not been upgraded and system files that have been upgraded.
[0069] In some embodiments, please refer to Figure 2 , step S120, based on the initial version file, extracting the system file with the upgraded version number in the upgrade installation package as the target system file, including: step S121 and step S122.
[0070] Step S121, compare the initial version file with the upgraded version file, and determine the name of the system file with the upgraded version number based on the version number corresponding to the multi-level folders in each system file.
[0071] Step S122, based on the name of the system file with the upgraded version number, searching for the system file with the upgraded version number in the upgraded system file, and taking the system file with the upgraded version number as the target system file.
[0072] During implementation, step S121 compares the initial version file and the upgraded version file, and determines the name of the system file with the upgraded version number based on the version numbers corresponding to the multi-level folders in each system file, including: in the initial version file and the upgraded version file, compares the multi-level program folders level by level, and determines the name of the program folder with the upgraded version number based on the version numbers of each level of program folders; at the same time, compares the multi-level library folders level by level, and determines the name of the library folder with the upgraded version number based on the version numbers of each level of library folders; at the same time, compares the multi-level resource folders level by level, and determines the name of the resource folder with the upgraded version number based on the version numbers of each level of resource folders; at the same time, compares the multi-level configuration folders level by level, and determines the name of the configuration folder with the upgraded version number based on the version numbers of each level of configuration folders.
[0073] For example, a multi-level program folder includes three first-level program folders A1, A2 and A3, the first-level program folder A1 includes three second-level program folders B1, the first-level program folder A2 includes two second-level program folders B2, the first-level program folder A3 includes two second-level program folders B3, and the second-level program folder B1 includes a third-level program folder C1. Compare the version numbers corresponding to the first-level program folder A1 in the initial version file and the upgraded version file. If the version numbers of the first-level program folder A1 are different, find the first-level program folder A1 in the upgraded system file and use the first-level program folder A1 as the target system file; if the version numbers of the first-level program folder A1 are the same, compare the version numbers of the second-level program folder B1, and so on. If the version numbers of the second-level program folder B1 are the same, continue to compare the version numbers of the third-level program folder C1. If the version numbers of the third-level program folder C1 are the same, it is determined that there is no upgrade in each level of program folder. In this way, the version numbers corresponding to the first-level program folders A2 and A3 in the initial version file and the upgraded version file are compared, so that the program files with inconsistent version numbers are determined as target system files. In addition, the level-by-level comparison method of multi-level library folders, multi-level resource folders and multi-level configuration folders is similar to that of multi-level program folders, which will not be repeated here.
[0074] In some embodiments, each level of folders may further include files, and the initial version files and the upgraded version files may further record the version number of each file. For example, the first-level program folder A1 and the second-level program folder B1 both include library files. Determining the name of the system file with an upgraded version number may also include: determining the version number of the file in each level of folders, and determining the file with the upgraded version number as the target system file.
[0075] Furthermore, when the initial system file is upgraded to the upgraded system file, the version number corresponding to the upgraded system file will change; here, the change in the version number includes not only the file with an increased version number, but also the version of the newly added file.
[0076] For example, in the initial version file, the third-level program folder C1 records program files a1, b1, c1, and d1; in the upgraded version file, the third-level program folder C1 records program files a2, b1, c1, and e1. After comparing the records of the initial version file and the upgraded version file, it can be seen that program file a1 is upgraded to program file a2, and its version number has changed (the version number has increased); program files b1 and c1 have not been upgraded, and their version numbers have not changed; program file e1 has been added to the upgraded system file, and program file d1 has been deleted. Therefore, the files with upgraded version numbers include program files a2 and e1. Find program files a2 and e1 in the third-level program folder C1, and use program files a2 and e1 as target system files.
[0077] It should be noted that in the disclosed embodiment, the system files deleted in the upgrade file (for example, the program file d1 in the above embodiment) can be recorded, so that when the application is updated, the program file d1 can be deleted. Alternatively, the upgraded third-level program folder C1 is directly determined as the target system file, so that when the application is updated, the third-level program folder C1 is directly replaced.
[0078] In the disclosed embodiment, since different types of files can implement hierarchical device management and they are set with multiple levels of version numbers, the multiple levels of version numbers can be compared in sequence to determine the lowest level folder or file with upgraded version number as the target system file, thereby reducing the data volume of the target system file.
[0079] In some embodiments, step S130, compressing the target system file to generate a target installation package, and sending the target installation package to the client, includes:
[0080] Specifically, the target system files are compressed to generate a target installation package, and the target installation package is sent to the client via a web page. For example, the program files a2 and e1 in the above embodiment, or the upgraded third-level program folder C1 are compressed to generate a target installation package. Compared with the upgraded system files, the target installation package has fewer files, so when the target installation package is sent to the client via a web page, the amount of data transmitted is less, the transmission speed is improved, and the user experience is better.
[0081] In one embodiment of the present disclosure, see Figure 3 , which is another application upgrade method provided in an embodiment of the present disclosure, and is applied to a client. The application upgrade method includes: steps S210 to S230.
[0082] Step S210: Create an initial version file based on the name of the system file in the application and the corresponding version number.
[0083] Here, the names and corresponding version numbers of all system files in the application before the upgrade are used to generate an initial version file. Please refer to the above embodiment for understanding the initial version file, which will not be repeated here.
[0084] Step S220, sending the initial version file to the server, and receiving the target installation package fed back by the server.
[0085] Specifically, an upgrade request is sent to the server, and the upgrade request includes the initial version file. In addition, the received installation target installation package only includes the target system files (ie, the system files with changed version numbers and the newly added system files).
[0086] In addition, the target system file can also record the deleted system files, so that the system files can be deleted when the program files are upgraded.
[0087] Step S230: Upgrade the application program through the target installation package.
[0088] In some embodiments, Figure 4 As shown, step S230 includes: step S231 and step S232.
[0089] Step S231, decompress the target installation package to obtain the target system files; the target system files are multiple system files with upgraded version numbers, each system file includes multiple folders, and each folder has a corresponding version number.
[0090] Step S232, copying the target system file to the corresponding file directory in the application program to upgrade the application program.
[0091] In the disclosed embodiment, since the application is upgraded through the target installation package, and the target installation package only includes the target system files, it is only necessary to replace or update the target system files instead of reinstalling the upgrade installation package of the entire application. This not only reduces the requirements on the client CPU and speeds up the download and installation of the target installation package, but also reduces the risk of introducing new errors during the upgrade process.
[0092] In one embodiment of the present disclosure, see Figure 5 , is another application upgrade method provided by the embodiment of the present disclosure, which is applied to the server and the client, such as Figure 5 As shown, the application upgrade method includes: steps S310 to S360.
[0093] Step S310: In the client, an initial version file is created based on the name of the system file in the application and the corresponding version number.
[0094] The initial version file includes the name of the system file in the application before the upgrade and the corresponding version number.
[0095] Step S320: the client sends the initial version file to the server.
[0096] Step S330: the server receives the initial version file and downloads the upgrade installation package.
[0097] Step S340: Based on the initial version file, the server extracts the system file with the upgraded version number from the upgrade installation package as the target system file.
[0098] Step S350: The server compresses the target system files to generate a target installation package, and sends the target installation package to the client.
[0099] Step S360: The client receives the target installation package fed back by the server, and upgrades the application program through the target installation package.
[0100] In this way, since the target installation package has fewer files than the upgrade installation package, the upgrade speed can be increased when upgrading the application through the target installation package; for example, the file size of the target installation package can be reduced to 1 / 10 of the upgrade installation package, and the upgrade speed can be increased by 1 / 5.
[0101] It should be noted that the application upgrade method provided in the embodiment of the present disclosure is similar to the application upgrade method in the above embodiment. For the technical features not fully disclosed in the embodiment of the present disclosure, please refer to the above embodiment for understanding, and no further details will be given here.
[0102] In addition, the present disclosure also provides a server, such as Figure 6 As shown, the server 10 includes:
[0103] The acquisition module 11 is configured to acquire an initial version file and an upgrade installation package; the initial version file includes the names and corresponding version numbers of multiple system files in the application before the upgrade;
[0104] The extraction module 12 is configured to extract the system file with the upgraded version number in the upgrade installation package as the target system file based on the initial version file;
[0105] The generating module 13 is configured to compress the target system files to generate a target installation package, and send the target installation package to the client.
[0106] In some embodiments, the server 10 also includes: a decompression module, which is configured to decompress the upgrade installation package to obtain an upgraded version file and an upgraded system file; wherein the upgraded version file includes the name of the upgraded system file and the corresponding version number; the upgraded system file is a plurality of system files in the upgraded application.
[0107] In some embodiments, each system file includes multiple levels of folders, and each level of folders has a corresponding version number; the extraction module 12 includes: a determination submodule, configured to compare the initial version file and the upgraded version file, and determine the name of the system file with the upgraded version number based on the version numbers corresponding to the multiple levels of folders in each system file; a search submodule, configured to search for the system file with the upgraded version number in the upgraded system file based on the name of the system file with the upgraded version number, and use the system file with the upgraded version number as the target system file.
[0108] In some embodiments, system files include program files, library files, resource files and configuration files; program files include multi-level program folders, and the i-1-level program folder includes at least one i-level program folder; library files include multi-level library folders, and the j-1-level library folder includes at least one j-level library folder; resource files include multi-level resource folders, and the m-1-level resource folder includes at least one m-level resource folder; configuration files include multi-level configuration folders, and the n-1-level configuration folder includes at least one n-level configuration folder; wherein i, j, m and n are all greater than or equal to 1.
[0109] In some embodiments, a sub-module is determined, and is specifically configured to compare the multi-level program folders level by level in the initial version file and the upgraded version file, and determine the name of the program folder with the upgraded version number based on the version number of each level of the program folder; at the same time, the multi-level library folders are compared level by level, and the name of the library folder with the upgraded version number is determined based on the version number of each level of the library folder; at the same time, the multi-level resource folders are compared level by level, and the name of the resource folder with the upgraded version number is determined based on the version number of each level of the resource folder; at the same time, the multi-level configuration folders are compared level by level, and the name of the configuration folder with the upgraded version number is determined based on the version number of each level of the configuration folder.
[0110] In some embodiments, the generating module 13 is specifically configured to send the target installation package to the client via a web page.
[0111] In some embodiments, the version number includes a Git repository version and a SVN repository version.
[0112] The present disclosure also provides a client, such as Figure 7 As shown, the client 20 includes:
[0113] An establishing module 21 is configured to establish an initial version file based on the name of the system file in the application and the corresponding version number;
[0114] The receiving module 22 is configured to send the initial version file to the server and receive the target installation package fed back by the server;
[0115] The upgrade module 23 is configured to upgrade the application program through the target installation package.
[0116] In some embodiments, the upgrade module 23 includes: a decompression sub-module, configured to decompress the target installation package to obtain the target system file; the target system file is a plurality of system files with upgraded version numbers, each system file includes multiple levels of folders, and each level of folders has a corresponding version number; an upgrade sub-module, configured to copy the target system file to the corresponding file directory in the application to upgrade the application.
[0117] In addition, the present disclosure provides an electronic device 800, such as Figure 8 As shown, the electronic device 800 includes a memory 801 and a processor 802. The memory 801 stores a computer-readable program that can be executed by the processor, and the processor 802 implements the application program upgrade method in any one of the above embodiments when executing the computer-readable program.
[0118] In the embodiment of the present disclosure, the memory 801 is configured to store instructions and applications executable by the processor 802, and can also cache data to be processed or processed by the processor 802 and various modules in the electronic device (for example, image data, audio data, voice communication data, and video communication data), which can be implemented through flash memory (FLASH) or random access memory (Random Access Memory, RAM).
[0119] The above description is only a preferred embodiment of the present disclosure and is not intended to limit the protection scope of the present disclosure.
[0120] It should be noted that in the present disclosure, the terms "include", "comprises" or any other variants 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 includes 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 "includes a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0121] The serial numbers of the above-mentioned embodiments of the present disclosure are only for description and do not represent the advantages or disadvantages of the embodiments.
[0122] The methods disclosed in several method embodiments provided in the present disclosure can be arbitrarily combined without conflict to obtain new method embodiments.
[0123] The features disclosed in several product embodiments provided in the present disclosure can be arbitrarily combined without conflict to obtain new product embodiments.
[0124] The features disclosed in several method or device embodiments provided in the present disclosure may be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.
[0125] The above is only a specific embodiment of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any person skilled in the art who is familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present disclosure, which should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.
Claims
1. A method for upgrading an application, applied to a server, characterized in that: The method comprises: Obtaining an initial version file and an upgrade installation package; the initial version file includes the names and corresponding version numbers of multiple system files in the application before the upgrade; Based on the initial version file, extract the system file with the upgraded version number in the upgrade installation package as the target system file; The target system files are compressed to generate a target installation package, and the target installation package is sent to the client.
2. The upgrading method according to claim 1, characterized in that: After obtaining the upgrade installation package, the method further includes: Decompress the upgrade installation package to obtain the upgrade version file and the upgrade system file; The upgraded version file includes the name of the upgraded system file and the corresponding version number; the upgraded system file is a plurality of system files in the application after the upgrade.
3. The upgrading method according to claim 2, characterized in that: Each of the system files includes multiple levels of folders, and each level of the folders has a corresponding version number; Based on the initial version file, extracting the system file with the upgraded version number in the upgrade installation package as the target system file includes: Comparing the initial version file with the upgraded version file, and determining the name of the system file with the upgraded version number based on the version numbers corresponding to the multiple levels of folders in each of the system files; Based on the name of the system file with the upgraded version number, the system file with the upgraded version number is searched out in the upgraded system file, and the system file with the upgraded version number is used as the target system file.
4. The upgrading method according to claim 3, characterized in that: The system files include program files, library files, resource files and configuration files; The program file includes multiple levels of program folders, and the i-1 level program folder includes at least one i-level program folder; The library file includes multiple levels of library folders, and the j-1 level library folder includes at least one j level library folder; The resource file includes a multi-level resource folder, and the m-1 level resource folder includes at least one m-level resource folder; The configuration file includes multiple levels of configuration folders, and the n-1 level configuration folder includes at least one n-level configuration folder; wherein i, j, m and n are all greater than or equal to 1.
5. The upgrading method according to claim 4, characterized in that: Comparing the initial version file with the upgraded version file, and determining the name of the system file with the upgraded version number based on the version numbers corresponding to the multiple levels of folders in each of the system files, includes: In the initial version file and the upgraded version file, the multiple levels of program folders are compared level by level, and based on the version number of each level of program folder, the name of the program folder with the upgraded version number is determined; at the same time, Compare the multiple levels of library folders level by level, and determine the name of the library folder with the upgraded version number based on the version number of each level of library folder; at the same time, Compare the resource folders at multiple levels level by level, and determine the name of the resource folder with the upgraded version number based on the version number of the resource folder at each level; at the same time, The multi-level configuration folders are compared level by level, and based on the version number of the configuration folder at each level, the name of the configuration folder with the upgraded version number is determined.
6. The upgrading method according to claim 1, characterized in that: Send the target installation package to the client, including: The target installation package is sent to the client via a web page.
7. The upgrading method according to any one of claims 1 to 6, characterized in that: The version numbers include Git repository version and SVN repository version.
8. A method for upgrading an application program, applied to a client, characterized in that: The method comprises: Based on the name of the system file in the application and the corresponding version number, an initial version file is created; Sending the initial version file to the server, and receiving the target installation package fed back by the server; The application is upgraded through the target installation package.
9. The upgrading method according to claim 8, characterized in that: Upgrading the application program through the target installation package includes: Decompressing the target installation package to obtain a target system file; the target system file is a plurality of system files with upgraded version numbers, each of which includes multiple levels of folders, and each level of folders has a corresponding version number; The target system file is copied to the corresponding file directory in the application program to upgrade the application program.
10. An electronic device, characterized in that: It comprises a memory and a processor, wherein the memory stores a computer-readable program that can be executed by the processor; when the processor executes the computer-readable program, the steps in the method for upgrading the application as described in any one of claims 1 to 7 or claim 8 or 9 are implemented.
Citation Information
Cited By
Linux-based special transformer acquisition terminal firmware optimization method
CN119556955A
