Client application update method and client
By setting up static and version directories for the game client and using file hash value as file name to establish a file name mapping relationship table, the problem of repeated download of resource files and wasted storage space during game client update is solved, and resources are realized File reuse and version rollback, support grayscale updates.
Patent Information
- Application Number
- CN202011274889.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-13
- Publication Date
- 2025-01-17
- Estimated Expiration
- 2040-11-13
AI Technical Summary
During the update process, the game client has problems such as repeated download of resource files and wasted storage space. In particular, overwriting updates will cause failure to fall back and errors are prone to during the update process.
By setting up static directories and version directories for client applications, the resource files that do not need to be updated are stored in the static directory, and the files that need to be updated are stored in the version directory, and the file hash value is used as the file name to establish a file name mapping relationship. Tables support multiple versions of resource files coexist, avoiding repeated download and update interruptions.
It realizes resource files reuse and version rollback, supports game grayscale updates, and avoids waste of storage space and interruptions in the update process caused by overlay updates.
Smart Images

Figure CN112256316B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to application update technology, and more particularly to a client application update method and a client. Background Art
[0002] In-game updates, also known as in-game updates, refer to the process of downloading incremental update packages through the network after the game client is started, and then updating the local game version. Game force updates, also known as game force updates, refer to the process of users receiving prompts after the game client is started and jumping to the app store to download the complete installation package of the new version of the game for update. Compared with force updates, in-game updates have better speed and user experience.
[0003] During the startup phase, the game client will first communicate with the vmsapi interface to check for version updates, then communicate with the user account and region management module (global server) to perform login verification and obtain the partition list, and finally communicate with the corresponding game server (game server) according to the region selected by the user to play the game.
[0004] For game updates, the client only stores one copy of the resource. When the update is performed, the overwriting update is adopted, and the original game will no longer exist and cannot be rolled back to the original game state. Alternatively, the client stores one copy of the resource for each version. When the update is performed, the old version is retained and the incremental update is performed at the same time, which will cause a large amount of storage space on the client to be occupied; resources that have not changed after the update cannot be reused, resulting in a waste of storage space. Summary of the invention
[0005] In view of this, an embodiment of the present application provides a client application update method and a client.
[0006] According to a first aspect of the present application, a method for updating a client application is provided, comprising:
[0007] Sending a local version of the first application to the server side through the first port;
[0008] receiving, through the first port, update information that the first application is updated to a first version; the first version is higher than the local version;
[0009] Downloading an update package of the first application updated to the first version based on the update information;
[0010] Decompressing the update package in a writable directory of the first application, and copying the local version of the file name mapping relationship table in the resource database to generate the first version of the file name mapping relationship table;
[0011] Writing the updated or newly added file entry after the update package is updated into the file name mapping relationship table of the first version, and updating the storage location of the updated or newly added file entry in the file name mapping relationship table of the first version to the actual storage location of the decompression;
[0012] The version value of the first application in the configuration database is set to the first version.
[0013] As an implementation mode, the method further includes:
[0014] Setting a static directory and a version directory for the running files of the first application;
[0015] The running files that do not need to be updated are stored in the static directory;
[0016] The running files that need to be updated are stored in the version directory; wherein the file names of the running files that need to be updated use the hash values of the running files as the file names.
[0017] As an implementation mode, the method further includes:
[0018] Setting the resource database in a version directory;
[0019] A mapping relationship between the original file name of the resource and the renamed file name is established for the first application in the resource database.
[0020] As an implementation manner, the file name mapping relationship table includes at least one of the following:
[0021] File type, file name, file size after installation or update, file hash value, file storage path after installation or update, and file storage location.
[0022] As an implementation mode, the method further includes:
[0023] When the update package is started for the first time after installation, the version information of the first application is obtained in the configuration database, and the file name mapping relationship table corresponding to the searched version information is called in the resource database based on the version information, the path information of the file is obtained based on the called file name mapping relationship table, and the corresponding file is loaded based on the path information.
[0024] As an implementation mode, the method further includes:
[0025] receiving the unupdated information of the first application through the first port, obtaining the user account and the address of the zone and service management module, initiating a service request to the user account and the zone and service management module, and obtaining a partition list;
[0026] In response to the partition selection instruction, a communication link is established with the service server for communication according to the port address corresponding to the selected partition.
[0027] According to a second aspect of the present application, a client is provided, including:
[0028] A sending unit, configured to send a local version of the first application to the server side through the first port;
[0029] A receiving unit, configured to receive, through the first port, update information that the first application is updated to a first version; the first version is higher than the local version;
[0030] A downloading unit, configured to download an update package for updating the first application to the first version based on the update information;
[0031] A loading unit, configured to decompress the update package in a writable directory of the first application, and copy the local version of the file name mapping relationship table in the resource database to generate the first version of the file name mapping relationship table;
[0032] an updating unit, configured to write the updated or newly added file entry after the update package is updated into the file name mapping relationship table of the first version, and update the storage location of the updated or newly added file entry in the file name mapping relationship table of the first version to the actual storage location of the decompression;
[0033] A configuration unit is used to set the version value of the first application in the configuration database to the first version.
[0034] As an implementation method, the client further includes:
[0035] A setting unit, configured to set a static directory and a version directory for the running files of the first application;
[0036] A storage unit, used for storing the running files that do not need to be updated in the static directory;
[0037] The running files that need to be updated are stored in the version directory; wherein the file names of the running files that need to be updated use the hash values of the running files as the file names.
[0038] As an implementation method, the client further includes:
[0039] A setting unit is used to set the resource database in the version directory; and to establish a mapping relationship between the original file name of the resource and the renamed file name for the first application in the resource database.
[0040] As an implementation method, the client further includes:
[0041] A calling unit is used to obtain version information of the first application in the configuration database when the update package is first started after installation, call the file name mapping relationship table corresponding to the searched version information in the resource database based on the version information, obtain the path information of the file based on the called file name mapping relationship table, and load the corresponding file based on the path information.
[0042] The client application update method and client provided by the embodiment of the present application, by setting a static directory and a version directory for the resource files in the client application, the resource files that do not need to be updated are stored in the static directory, and the running files that need to be updated are stored in the version directory. For the files that need to be updated, the hash value of the file is used as its file name. After each update, it is necessary to establish a file name mapping relationship table of the corresponding version after the update, and store the related files of different versions in the corresponding file name mapping relationship table. In this way, the embodiment of the present application supports the coexistence of multiple versions of resource files of the application, avoiding repeated downloads during version rollback. When the version is rolled back, it can be used to implement grayscale updates of the game, and reuse unchanged resource files at the same time. The application update of the embodiment of the present application is not an overwrite update, which avoids interruptions or errors in the update process that affect the client. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 A schematic diagram of a client application update method flow provided in an embodiment of the present application;
[0044] Figure 2 A schematic diagram of the client application update process;
[0045] Figure 3 Update another flow diagram for the client application;
[0046] Figure 4 A schematic diagram of the structure of the client provided in an embodiment of the present application. DETAILED DESCRIPTION
[0047] The technical solution of the embodiment of the present application supports the coexistence of resource files of multiple versions of the application to avoid repeated downloads when the version is rolled back. Version rollback can be used to implement grayscale updates of games. At the same time, resource files that have not changed are reused. The technical solution of the embodiment of the present application is not an overlay update, which avoids interruptions or errors in the update process that affect the client. The essence of the technical solution of the embodiment of the present application is explained in detail below with examples. The embodiment of the present application is explained using games as an example. It should be noted that any application can be upgraded by the method of the embodiment of the present application, and the embodiment of the present application is not limited to the update of game applications.
[0048] Figure 1 A schematic diagram of a client application update method flow provided in an embodiment of the present application, such as Figure 1As shown, the client application update method of the embodiment of the present application includes the following processing steps:
[0049] Step 101: Send a local version of a first application to a server side through a first port.
[0050] In the embodiment of the present application, the first port may be a vmsapi interface, which is a port for communicating with a network server to obtain information related to the application version. The client may send a relevant request message to the vmsapi to check for version updates. The vmsapi returns a response message to determine whether the current local version is consistent with the version on the server side. If the current version is lower than the version on the server side, the update file download address is returned, otherwise the global server address is returned for the client to initiate related services, such as starting a game.
[0051] Step 102: receiving update information of the first application being updated to a first version through the first port; the first version is higher than the local version.
[0052] In the embodiment of the present application, when it is determined that the application version of the client is lower than the version on the server side, update-related information is received through the first port, mainly download information of the update data packet, etc.
[0053] Step 103: Download an update package for updating the first application to the first version based on the update information.
[0054] Based on the download address of the update data packet returned by the first port, the corresponding address is addressed to download the data packet.
[0055] Step 104: decompress the update package in the writable directory of the first application, and copy the local version of the file name mapping relationship table in the resource database to generate the first version of the file name mapping relationship table.
[0056] In an embodiment of the present application, the updateable resource file also includes file storage location information, which indicates that the file does not exist, is read-only, or is writable, etc. For example, a value of 0 indicates that the file does not exist, a value of 1 indicates that the file is read-only, and a value of 2 indicates that the file is writable.
[0057] Step 105: write the updated or newly added file entry after the update package is updated into the file name mapping relationship table of the first version, and update the storage location of the updated or newly added file entry in the file name mapping relationship table of the first version to the actual storage location of the decompression.
[0058] In the embodiment of the present application, the storage location of the updated or newly added file entry is a writable directory.
[0059] Step 106: Set the version value of the first application in the configuration database to the first version.
[0060] After the files in the update package of the application are updated, the application of the embodiment of the present application is updated from the current version to the first version.
[0061] In the embodiment of the present application, the current version and the first version may be a continuous version difference or a discontinuous version difference, such as the current version is version 1 and the first version is version 3.
[0062] In the embodiment of the present application, a static directory and a version directory may be set for the running files of the first application;
[0063] The running files that do not need to be updated are stored in the static directory;
[0064] The running files that need to be updated are stored in the version directory; wherein the file names of the running files that need to be updated use the hash values of the running files as the file names.
[0065] In the embodiment of the present application, the resource database is set in a version directory;
[0066] A mapping relationship between the original file name of the resource and the renamed file name is established for the first application in the resource database. The file name mapping relationship table includes at least one of the following:
[0067] File type, file name, file size after installation or update, file hash value, file storage path after installation or update, and file storage location.
[0068] In an embodiment of the present application, when the update package is started for the first time after installation, version information of the first application is obtained in the configuration database, and the file name mapping relationship table corresponding to the searched version information is called in the resource database based on the version information, and the path information of the file is obtained based on the called file name mapping relationship table, and the corresponding file is loaded based on the path information.
[0069] Figure 2 A schematic diagram of the client application update process is shown below. Figure 2 As shown in the figure, the version number of an application in the client is A, and the online version number is A. The client application update process includes the following steps:
[0070] Step 1: The client sends a request to vmsapi to check for version updates.
[0071] Step 2: vmsapi returns a message indicating that there is no update content to download, and the return value includes the global server address.
[0072] Step 3: The client sends a request to the global server to obtain a list of partitions.
[0073] Step 4. The global server returns a list of partitions.
[0074] Step 5: The user selects a partition, and the client initiates communication with the game server based on the IP and port in the partition list.
[0075] Step 6: The game server accepts the connection request and sends a response.
[0076] Figure 3 Update another flow diagram for the client application, such as Figure 3 As shown, the version number of a certain application in the client is A, and the online version number is B, and version B is higher than version A.
[0077] Step 1: The client sends a request to vmsapi to check for version updates.
[0078] Step 2: vmsapi returns a message to prompt the client to update. The return value includes the update package download link and the global server address.
[0079] Step 3: The client initiates a download request to the CDN.
[0080] Step 4: The client downloads the 7z update package from the CDN, completing the client version update, and the client version number becomes B.
[0081] Step 5. Restart the client and send a request to vmsapi again to check for version updates.
[0082] Step 6: vmsapi returns a message indicating that there is no update content to download, and the return value includes the global server address.
[0083] Step 7: The client sends a request to the global server to obtain the partition list.
[0084] Step 8. The global server returns the partition list.
[0085] Step 9. The user selects a partition, and the client initiates communication with the game server based on the IP and port in the partition list.
[0086] Step 10: The game server accepts the connection request and sends a response.
[0087] In the embodiment of the present application, taking the game client as an example, the files in the game application include the following files: configuration files (config), script files (script), game resource files (asset), etc. Most of these files can be updated in subsequent versions of the game, but there are also files that will not be updated, such as fonts. Therefore, the embodiment of the present application divides the above files into two categories from the perspective of whether they will be updated: those that will be updated: such as scripts, numerical configurations, etc.; those that will not be updated: such as fonts, etc.
[0088] In the embodiment of the present application, for the files in the resource directory (i.e., the Resources directory corresponding to iOS and the asset directory corresponding to Android) in the development environment, they are stored in the following manner:
[0089]
[0090]
[0091] When these files are stored in the installation package (such as IPA) of electronic devices such as mobile phones, the storage method will become the following (other irrelevant files are omitted in the embodiment of this application):
[0092]
[0093]
[0094] In the embodiment of the present application, the resource file storage rules in the application are as follows:
[0095] Set up a static directory. In the static directory, files that do not need to be updated are stored. Their storage method is the same as the development environment and has not changed.
[0096] Set the release directory, and all other files that can be updated are renamed and stored in the release directory. In the release directory, the file name is determined by the hash value of the file. The hash operation here can be md5, etc. You can set up a resource database according to different versions of the application to store resource files separately by version to facilitate the application to roll back to the previous version. In the release directory, the file is determined by the file content, such as determined by md5. For example, for two files a.png and b.png, if their contents are the same, then after renaming, they will have the same name. That is, a and b should be the same characters.
[0097] In the embodiment of the present application, in the resource database, i.e., the sqlite database named reslib, a mapping relationship is established between the original file name of the resource and the renamed file name after the application is updated. The mapping relationship of the file name in reslib is divided into tables according to the version number. For example, if the version of the installation package is 100, then reslib will have a table named version_100, and the table content is shown in Table 1 below:
[0098]
[0099] Table 1
[0100] In Table 1, the fields are described as follows:
[0101] type: file type, possible values are config / script / asset, etc.
[0102] filename: file name, the relative path of the resource file in the Resources directory;
[0103] size: the size of the file after processing;
[0104] md5: md5 of the file after processing;
[0105] url: the path where the processed file is stored;
[0106] location: file storage location, possible values are 0: file does not exist, 1: read-only path, 2: writable path;
[0107] In the read-only directory, the content structure is exactly the same as that in the installation package.
[0108] After the client is started for the first time, the writable directory structure of the application is as follows:
[0109]
[0110] Because when the game is updated later, the updated files and their file mapping relationships will be added to reslib, and the read-only directory cannot be modified, so the resource database (reslib) is copied from the read-only directory to the writable directory.
[0111] A new setting database is created in the writable directory, which contains a table called app_setting in key-value format. The key named currentVersion is set to 100, indicating that the current client version number is 100.
[0112] After the client is started, the process of loading files, taking loading script / main.lua as an example, includes the following loading steps:
[0113] 1. Read the currentVersion in the app_setting table and find out that the version number is 100.
[0114] 2. Then go to reslib to find the file mapping table of version_100.
[0115] 3. According to the record in the table where filename is script / main.lua, we know that the actual path of the file is 372 / 1ccbf2921a72959a97de5572ea4e7e5b000174.lua, and location is 1, indicating that the file is in a read-only directory.
[0116] In the embodiment of the present application, the client will only read the currentVersion from the DB once during the startup phase and after the internal update is completed, and will not read the DB every time a resource is loaded.
[0117] After startup, the game client calls vmsapi to check for version updates and sends the client version number to vmsapi. The return value given by vmsapi is as follows:
[0118]
[0119] The package array in the response value is the 7z file that needs to be downloaded for this update. For example, the files that need to be updated from version 100 to version 101. In this example, only script / main.lua has changed, and the changes are very small, so there is only one 7z file. If there are many updates, there may be multiple 7z files in the package array.
[0120] The URL in the package is concatenated with the resource_url_root prefix to get the complete download address of the 7z update package: http: / / dzmasset.playcrab.com / 8f975959e35dea3173e6e29e3d8fb608.7z .
[0121] The contents of the 7z update package are as follows:
[0122]
[0123] All changed files will be renamed using the same rules as in the installation package and then stored in the release directory. Since only script / main.lua has changed from version 100 to version 101, there is only one file in the release directory after the update package is unzipped.
[0124] update.sql contains the SQL statement used to update the version_101 table in reslib. The content is as follows:
[0125] replace into version_101
[0126] ("type", "filename", "size", "md5", "url", "location")
[0127] values
[0128] ('script','script / main.lua','15533','c4c15149aae1278e63f405cd94a0ba94',
[0129] ′173 / c4c15149aae1278e63f405cd94a0ba94003CAD.1ua′, 0)
[0130] After the client downloads the 7z file, it will be decompressed to a writable directory. The status of the writable directory after update is as follows:
[0131]
[0132] Among them, version_100 in reslib will be copied to version_101, and update.sql will be executed to update the location of all entries with location = 0 in version_101 to 2.
[0133] After correctly setting the location of the new version file, the version_101 table in reslib is shown in Table 2:
[0134]
[0135] Table 2
[0136] The currentVersion in the app_setting table in the setting database is updated to 101. The client then restarts Lua, and the process of updating the client from version 100 to version 101 is finally completed.
[0137] In the embodiment of the present application, the update logic of the client is as follows:
[0138] 1. The client starts, and the current version number is 100.
[0139] 2. Call the vmsapi interface and learn from the interface response that the new version number is 101, and obtain the CDN download address of the update package in 7z format.
[0140] 3. Download the 7z update package from CDN.
[0141] 4. Unzip the 7z update package in the application's writable directory (Documents directory).
[0142] 5. Copy version_100 in reslib to version_101.
[0143] 6. Execute update.sql to write the changed or newly added file entries to the version_101 table.
[0144] 7. Set the location value of all file entries with location = 0 in version_101 (i.e., files newly added or changed in this update) to 1 (1 represents the Documents directory of the application on iOS).
[0145] 8. Set the currentVersion value in the app_setting table in the setting database to 101.
[0146] 10. Restart the client.
[0147] The technical solution of the embodiment of the present application can be used by almost all applications for update. When the application is a game, unless the underlying code is changed, all game update content can be updated internally through this solution. Many game publishers require the implementation of grayscale updates of games, that is, some players update first. Through this technical solution, grayscale updates and version rollback solutions after grayscale updates can be implemented.
[0148] Figure 4 A schematic diagram of the structure of the client provided in the embodiment of the present application is shown in FIG. Figure 4 As shown, the client of the embodiment of the present application includes:
[0149] The sending unit 40 is used to send the local version of the first application to the server side through the first port;
[0150] The receiving unit 41 is configured to receive update information that the first application is updated to a first version through the first port; the first version is higher than the local version;
[0151] A downloading unit 42, configured to download an update package of the first application updated to the first version based on the update information;
[0152] The loading unit 43 is used to decompress the update package in the writable directory of the first application, and copy the local version of the file name mapping relationship table in the resource database to generate the first version of the file name mapping relationship table;
[0153] An updating unit 44 is used to write the updated or newly added file entry after the update package is updated into the file name mapping relationship table of the first version, and update the storage location of the updated or newly added file entry in the file name mapping relationship table of the first version to the actual storage location of the decompression;
[0154] The configuration unit 45 is configured to set the version value of the first application in the configuration database to the first version.
[0155] As an implementation method, the client further includes:
[0156] Set the unit ( Figure 4 (not shown) for setting a static directory and a version directory for the running files of the first application;
[0157] Storage Unit( Figure 4 ), for storing the running files that do not need to be updated in the static directory;
[0158] The running files that need to be updated are stored in the version directory; wherein the file names of the running files that need to be updated use the hash values of the running files as the file names.
[0159] As an implementation method, the client further includes:
[0160] Set the unit ( Figure 4 (not shown) for setting the resource database in the version directory; establishing a mapping relationship between the original file name of the resource and the renamed file name for the first application in the resource database.
[0161] As an implementation method, the client further includes:
[0162] Calling unit ( Figure 4 ), which is used to obtain the version information of the first application in the configuration database when the update package is started for the first time after installation, call the file name mapping relationship table corresponding to the searched version information in the resource database based on the version information, obtain the path information of the file based on the called file name mapping relationship table, and load the corresponding file based on the path information.
[0163] In an exemplary embodiment, the above-mentioned processing unit of the client can be implemented by one or more central processing units (CPU), graphics processing units (GPU), baseband processors (BP), application-specific integrated circuits (ASIC), DSPs, programmable logic devices (PLD), complex programmable logic devices (CPLD), field programmable gate arrays (FPGA), general-purpose processors, controllers, microcontrollers (MCU), microprocessors, or other electronic components, and can also be implemented in combination with one or more radio frequency (RF) antennas to execute the steps of the network data collection method of the aforementioned embodiments.
[0164] In the disclosed embodiment, Figure 4 The specific manner in which each module and unit in the client performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0165] It should be understood that "one embodiment" or "an embodiment" mentioned throughout the specification means that specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present invention. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present invention, the size of the serial number of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention. The serial numbers of the above-mentioned embodiments of the present invention are only for description and do not represent the advantages and disadvantages of the embodiments.
[0166] 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.
[0167] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored, or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0168] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0169] In addition, all functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately used as a unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0170] The above is only an embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A client application update method, characterized in that: The method comprises: Sending a local version of the first application to the server side through the first port; receiving, through the first port, update information that the first application is updated to a first version; the first version is higher than the local version; Downloading an update package of the first application updated to the first version based on the update information; Decompressing the update package in a writable directory of the first application, and copying the local version of the file name mapping relationship table in the resource database to generate the first version of the file name mapping relationship table; Writing the updated or newly added file entry after the update package is updated into the file name mapping relationship table of the first version, and updating the storage location of the updated or newly added file entry in the file name mapping relationship table of the first version to the actual storage location of the decompression; Setting the version value of the first application in the configuration database to the first version, Also includes: Setting a static directory and a version directory for the running files of the first application; The running files that do not need to be updated are stored in the static directory; The running file that needs to be updated is stored in the version directory; wherein the file name of the running file that needs to be updated uses the hash value of the running file as the file name; Setting the resource database in a version directory; A mapping relationship between the original file name of the resource and the renamed file name is established for the first application in the resource database.
2. The method according to claim 1, characterized in that The file name mapping table includes at least one of the following: File type, file name, file size after installation or update, file hash value, file storage path after installation or update, and file storage location.
3. The method according to claim 1, characterized in that The method further comprises: When the update package is started for the first time after installation, the version information of the first application is obtained in the configuration database, and the file name mapping relationship table corresponding to the searched version information is called in the resource database based on the version information, the path information of the file is obtained based on the called file name mapping relationship table, and the corresponding file is loaded based on the path information.
4. The method according to claim 3, characterized in that The method further comprises: receiving the unupdated information of the first application through the first port, obtaining the user account and the address of the zone and service management module, initiating a service request to the user account and the zone and service management module, and obtaining a partition list; In response to the partition selection instruction, a communication link is established with the service server for communication according to the port address corresponding to the selected partition.
5. A client, characterized in that: The client comprises: A sending unit, configured to send a local version of the first application to the server side through the first port; A receiving unit, configured to receive, through the first port, update information that the first application is updated to a first version; the first version is higher than the local version; A downloading unit, configured to download an update package for updating the first application to the first version based on the update information; A loading unit, configured to decompress the update package in a writable directory of the first application, and copy the local version of the file name mapping relationship table in the resource database to generate the first version of the file name mapping relationship table; an updating unit, configured to write the updated or newly added file entry after the update package is updated into the file name mapping relationship table of the first version, and update the storage location of the updated or newly added file entry in the file name mapping relationship table of the first version to the actual storage location of the decompression; a configuration unit, configured to set a version value of the first application in a configuration database to the first version; A setting unit, configured to set a static directory and a version directory for the running files of the first application, and to set the resource database in the version directory; and to establish a mapping relationship between the original file name of the resource and the renamed file name for the first application in the resource database; A storage unit, used for storing the running files that do not need to be updated in the static directory; The running files that need to be updated are stored in the version directory; wherein the file names of the running files that need to be updated use the hash values of the running files as the file names.
6. The client according to claim 5, characterized in that: The client also includes: A calling unit is used to obtain version information of the first application in the configuration database when the update package is first started after installation, call the file name mapping relationship table corresponding to the searched version information in the resource database based on the version information, obtain the path information of the file based on the called file name mapping relationship table, and load the corresponding file based on the path information.
Citation Information
Patent Citations
Application updating method and application updating device
CN106708537A
Distributed file system and file updating method and device
CN110334072A
Resource file configuration method and device, refrigerator and readable storage medium
CN110968343A