System updating method and related product

By generating virtual software packages on terminal devices and installing them using preset system update programs, the problem of low efficiency in incremental updates is solved, achieving fast and efficient system updates compatible with traditional tools.

CN121070418APending Publication Date: 2025-12-05UNIONTECH SOFTWARE TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202511148952.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-15
Publication Date
2025-12-05

AI Technical Summary

Technical Problem

Existing technologies cannot simultaneously achieve incremental updates and compatibility with traditional .deb package management tools, resulting in low operating system update efficiency, and existing system update programs cannot perform incremental updates efficiently.

Method used

The server sends the latest software information list to the terminal device. The terminal device determines the set of software identifiers to be updated based on the local software information, downloads the incremental update file from the incremental update file repository, generates a virtual software package, and installs it using the pre-installed preset system update program.

Benefits of technology

It enables rapid system updates, reduces the amount of data downloaded and resource consumption, improves update speed, is compatible with traditional system update programs, and reduces time and resource costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121070418A_ABST
    Figure CN121070418A_ABST
Patent Text Reader

Abstract

The invention provides a system updating method and a related product. The system updating method comprises the following steps: sending a latest software information list to terminal equipment through a server, and then determining a to-be-updated software identifier set by the terminal equipment according to a current software information list and the latest software information list of locally installed software of the terminal equipment; then, the terminal equipment determines an incremental update file address set of the to-be-updated software, and downloads all incremental update files of the to-be-updated software from an incremental update file warehouse stored in the server according to the incremental update file address set of the to-be-updated software; then, the terminal equipment generates a virtual software package of the to-be-updated software based on all the current files and the incremental updating file of the to-be-updated software; and the terminal equipment uses the installed preset system updating program to install the virtual software package of the to-be-updated software so as to update the to-be-updated software. Therefore, rapid system updating can be realized based on the installed preset system updating program.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present disclosure relate to the technical field of computer operating system update, and in particular to a system update method and related products. BACKGROUND

[0002] With the increasing complexity of operating systems, the traditional package management method based on APT (Advanced Package Tool) and RPM gradually exposes problems such as dependency hell, inconsistent system upgrades, package conflicts, and uninstallation residues. In enterprise-level applications, container deployment, embedded terminals, and other scenarios, the controllability, consistency, and rollback of the operating system become particularly important, and therefore "immutability" and "atomic upgrade" have become the core goals of new system management mechanisms.

[0003] Fedora Silverblue implements read-only management of the root file system through OSTree technology, updates the operating system as a whole image, and ensures the consistency and rollback of the system state, but has problems such as large update granularity and poor compatibility with traditional operation and maintenance tools; Ubuntu Snap implements application isolation and automatic update through self-contained software packages and Overlay file systems, but has defects such as slow startup speed, large disk space occupation, and incompatibility with the traditional ecosystem.

[0004] Specifically, the prior art cannot simultaneously meet the needs of "incremental update" and "compatibility with traditional.deb package management tools": if incremental update is supported (such as Silverblue), the traditional package management tools need to be abandoned; if compatibility with traditional tools is supported (such as Snap), efficient incremental update cannot be achieved. Therefore, there is an urgent need for an operating system update scheme that takes into account the efficiency of incremental update and the compatibility of traditional tools. SUMMARY

[0005] Embodiments of the present disclosure provide a system update method, device, storage medium, terminal device, server, and computer program product.

[0006] In a first aspect, embodiments of the present disclosure provide a system update method applied to a terminal device, the method comprising:

[0007] In response to receiving a latest software information list sent by a server, the latest software information including software identifiers, latest version numbers, and feature values of each file in a latest version full software package, determining a set of software identifiers to be updated of each software to be updated according to a current software information list of locally installed software of the terminal device and the latest software information list;

[0008] For each of the to-be-updated software, the following incremental update operation is performed: based on the feature values of the files in the full software package of the latest version of the to-be-updated software and the feature values of the files of the to-be-updated software currently installed in the terminal device, a set of incremental update file addresses of the to-be-updated software is determined, and all incremental update files of the to-be-updated software are downloaded from the incremental update file warehouse stored in the server according to the set of incremental update file addresses of the to-be-updated software; based on all the current files and the incremental update files of the to-be-updated software, a virtual software package of the to-be-updated software is generated; and the virtual software package of the to-be-updated software is installed by using the installed preset system update program.

[0009] In some optional embodiments, the server stores a software package warehouse and an incremental update file warehouse, the software package warehouse stores full software packages of each version of software, and the incremental update file warehouse stores incremental update files between different versions of software.

[0010] In a second aspect, embodiments of the present disclosure provide a system update method, applied to a server, and the method comprises:

[0011] sending a latest software information list to the terminal device, the latest software information comprising software identification, a latest version number, and feature values of each file in a full software package of the latest version;

[0012] In response to receiving the set of incremental update file addresses of the to-be-updated software sent by the terminal device, all incremental update files of the to-be-updated software stored in the incremental update file warehouse are obtained and sent to the terminal device.

[0013] In some optional embodiments, the files in the incremental update file warehouse are stored by taking feature values as at least part of a path, and files with the same content have the same feature values.

[0014] In a third aspect, embodiments of the present disclosure provide a system update device, applied to a terminal device, and the device comprises:

[0015] An update software determination unit is configured to, in response to receiving a latest software information list sent by a server, the latest software information comprising software identification, a latest version number, and feature values of each file in a full software package of the latest version, determine a set of to-be-updated software identification of each to-be-updated software according to a current software information list of software installed locally in the terminal device and the latest software information list;

[0016] an incremental update unit configured to perform the following incremental update operation for each of the software to be updated: determining a set of incremental update file addresses of the software to be updated based on the feature values of the files in the full software package of the latest version of the software to be updated and the feature values of the files of the software to be updated currently installed in the terminal device, and downloading all incremental update files of the software to be updated from an incremental update file repository stored in the server according to the set of incremental update file addresses of the software to be updated; generating a virtual software package of the software to be updated based on all current files and incremental update files of the software to be updated; and installing the virtual software package of the software to be updated by using an installed preset system update program.

[0017] In some optional embodiments, the server stores a software package repository and an incremental update file repository, the software package repository stores full software packages of each version of software, and the incremental update file repository stores incremental update files between different versions of software.

[0018] In a fourth aspect, embodiments of the present disclosure provide a system update apparatus applied to a server, the apparatus comprising:

[0019] an information list sending unit configured to send a latest software information list to a terminal device, the latest software information comprising a software identifier, a latest version number, and a feature value of each file in a full software package of the latest version.

[0020] an update file sending unit configured to, in response to receiving a set of incremental update file addresses of the software to be updated sent by the terminal device, acquire all incremental update files of the software to be updated stored in an incremental update file repository and send the incremental update files to the terminal device.

[0021] In some optional embodiments, the files in the incremental update file repository are stored by using feature values as at least part of a path, and files with the same content have the same feature value.

[0022] In a fifth aspect, embodiments of the present disclosure provide a terminal device, comprising: one or more processors; a storage device having one or more programs stored thereon, when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation manner of the first aspect.

[0023] In a sixth aspect, embodiments of the present disclosure provide a server, comprising: one or more processors; a storage device having one or more programs stored thereon, when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation manner of the second aspect.

[0024] In a seventh aspect, an embodiment of the present disclosure provides a computer-readable storage medium having stored thereon a computer program, wherein the computer program, when executed by one or more processors, implements the method described in any implementation form of the first aspect and / or the method described in any implementation form of the second aspect.

[0025] In an eighth aspect, an embodiment of the present disclosure provides a computer program product comprising computer programs / instructions which, when executed by a processor, implement the method described in any implementation form of the first aspect and / or the method described in any implementation form of the second aspect.

[0026] In some existing terminal devices with Linux operating systems, a preset system update program has been installed, which can only install compressed software packages (for example,.deb packages) to the terminal device, and cannot install decompressed files of the software packages. Since the preset system update program has been written and it is complex to modify the program, currently, full software packages are mostly downloaded to implement software updates, but downloading full software packages results in large data download volume and slow download speed. In addition, even if incremental update files are downloaded, in order to implement system updates based on the incremental update files by the preset system update program, the incremental update files need to be combined with installed files that do not need to be updated, and then packaged into software packages (for example,.deb packages), and then the preset system update program installs the software packages. The packaging process needs to consume a large amount of CPU resources and disk resources, and the packaging process has high time cost and slow packaging speed.

[0027] In order to solve the problem that the preset system update program cannot be used to implement fast incremental updates in the above-mentioned operating system update process, embodiments of the present disclosure provide a system update method, device, storage medium, terminal device, server and computer program product. The server sends a latest software information list to the terminal device, the latest software information includes a software identifier, a latest version number and a feature value of each file in a latest version full software package, and then the terminal device determines a set of software identifiers of each software to be updated according to a current software information list of locally installed software of the terminal device and the latest software information list. Then, the terminal device determines a set of incremental update file addresses of the software to be updated, and downloads all incremental update files of the software to be updated from an incremental update file warehouse stored in the server according to the set of incremental update file addresses of the software to be updated. Then, the terminal device generates a virtual software package of the software to be updated based on all current files and incremental update files of the software to be updated, and installs the virtual software package of the software to be updated by using the installed preset system update program to update the software to be updated. Thus, fast system updates can be implemented based on the installed preset system update program. BRIEF DESCRIPTION OF DRAWINGS

[0028] Other features, objects, and advantages of the present disclosure will become more apparent from the following detailed description when read in conjunction with the accompanying drawings. The drawings are only for the purpose of illustrating specific embodiments of the application and are not to be construed as limiting the application. In the drawings:

[0029] Figure 1 is a system architecture diagram of one embodiment of a system updating system according to the present disclosure;

[0030] Figure 2A is a timing diagram of one embodiment of a system updating system according to the present disclosure;

[0031] Figure 2B is an exploded flowchart of one embodiment of step 203 according to the present disclosure;

[0032] Figure 3 shows one embodiment of a storage manner of storing an incremental update file in a server according to the present disclosure;

[0033] Figure 4 is a flowchart of one embodiment of a system updating method applied to a terminal device according to the present disclosure;

[0034] Figure 5 is a flowchart of one embodiment of a system updating method applied to a server according to the present disclosure;

[0035] Figure 6 is a structural schematic diagram of one embodiment of a system updating apparatus applied to a terminal device according to the present disclosure;

[0036] Figure 7 is a structural schematic diagram of one embodiment of a system updating apparatus applied to a server according to the present disclosure;

[0037] Figure 8 is a structural schematic diagram of a computer system of a terminal device or a server suitable for implementing embodiments of the present disclosure. DETAILED DESCRIPTION

[0038] The present disclosure will be further described below in conjunction with the drawings and embodiments. It can be understood that the specific embodiments described herein are only used to explain the related application, and are not a limitation on the application. In addition, it should be noted that only parts related to the application are shown in the drawings for ease of description.

[0039] It should be noted that the embodiments in the present disclosure and the features in the embodiments can be combined with each other without conflict. The present disclosure will be described in detail below with reference to the drawings and in conjunction with the embodiments.

[0040] Figure 1An exemplary update system architecture 100 of one embodiment to which the system update method of the present disclosure can be applied is shown.

[0041] As shown in Figure 1 The update system 100 can include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is a medium to provide a communication link between the terminal devices 101, 102, 103 and the server 105. The network 104 can include various connection types, such as wired, wireless communication links, or fiber optic cables, etc.

[0042] A user can use the terminal devices 101, 102, 103 to interact with the server 105 through the network 104 to receive or send messages, etc. The terminal devices 101, 102, 103 can be installed with a preset operating system (e.g., a Linux operating system) and various communication terminal device applications, such as audio / video conference applications, voice recognition applications, web browser applications, shopping applications, search applications, instant messaging tools, email terminal devices, social platform software, etc.

[0043] The terminal devices 101, 102, 103 can be hardware or software. When the terminal devices 101, 102, 103 are hardware, they can include, but are not limited to, smart phones, tablet computers, e-book readers, laptop computers, desktop computers, etc. When the terminal devices 101, 102, 103 are software, they can be installed in the above-listed electronic devices.

[0044] The server 105 can be a server that provides various services, such as a background server that provides system update support for an operating system installed on the terminal devices 101, 102, 103. The background server can analyze and process requests for incremental update file downloads, etc., and feed back the processing results (e.g., incremental update files) to the terminal devices.

[0045] It should be noted that the server 105 can be hardware or software. When the server 105 is hardware, it can be implemented as a distributed server cluster composed of multiple servers, or as a single server. When the server is software, it can be implemented as multiple software or software modules (e.g., for system update services), or as a single software or software module. No specific limitation is made herein.

[0046] It should be noted that the system update method for a terminal device provided by the present disclosure is generally executed by the terminal devices 101, 102, 103, and correspondingly, the system update apparatus for a terminal device is generally provided in the terminal devices 101, 102, 103.

[0047] It should be noted that the system updating method applied to the server provided by the present disclosure is generally executed by the server 105, and accordingly, the system updating apparatus applied to the server is generally arranged in the server 105.

[0048] It should be understood that Figure 1 The number of terminal devices, networks and servers in the above embodiment is only illustrative. According to the implementation needs, there can be any number of terminal devices, networks and servers.

[0049] With reference to Figure 2A FIG. 2 shows a timing 200 of one embodiment of the system updating system according to the present disclosure. The system updating system in the embodiment of the present disclosure can include a terminal device and a server. The timing 200 includes the following steps:

[0050] In step 201, the server sends a latest software information list to the terminal device.

[0051] Here, after publishing a new operating system, the server can generate a latest software information table of the software package whose version number has changed, and the latest software information list includes at least one latest software information. Each latest software information can include the software identification of the software whose version has changed, the latest version number, and the feature value of each file in the latest full version software package. The software identification is used to uniquely indicate the software. The latest version number is used to indicate the current latest version of the software. The files in the latest full version software package refer to the files after decompression of the latest full version software package, and the feature value of the file is used to uniquely indicate different files in the latest full version software package. As an example, the feature value of the file here can be a hash value, for example.

[0052] The terminal device can request a list of software packages to be updated from the software package repository (such as the APT repository) running in the server by running the `apt-get --print-uris` command, and obtain a manifest including information such as package name, version, download address, etc. For example, if it is detected that the "libc6" package needs to be updated from version 2.31 to 2.32, the package is added to the latest software information list.

[0053] In step 202, the terminal device determines a set of software identifiers of each software to be updated according to the current software information list of the locally installed software of the terminal device and the latest software information list.

[0054] In the embodiment, the terminal device stores the current software information list of each operating system software locally installed by the terminal device, and the current software information list includes at least one current software information of the currently installed software, and the current software information includes the software identification and the corresponding currently installed software version number.

[0055] To determine which software needs to be updated, the terminal device can determine, for each latest software information in the latest software information list received from the server, whether the latest version number in the latest software information is higher than the current installed software version number corresponding to the software identifier in the latest software information in the current software information list of the terminal device; if it is determined to be, it indicates that the software identifier in the latest software information is a software identifier to be updated. Finally, generate a set of software identifiers to be updated using all software identifiers confirmed to be software identifiers to be updated in the set of all latest software information lists.

[0056] Step 203, the terminal device performs an incremental update operation for each software to be updated.

[0057] Here, the incremental update operation can include the following steps 2031 to 2034 as shown in Figure 2B

[0058] Step 2031, based on the feature values of each file in the latest version full software package of the software to be updated and the feature values of each file in the currently installed software to be updated in the terminal device, determine the incremental update file address set of the software to be updated.

[0059] The latest software information list sent by the server in step 201 includes the feature values of each file in the latest version full software package of each version changed software, that is, the feature values of each file in the latest version full software package of the software to be updated.

[0060] Here, the terminal device can first determine the feature values of each file in the locally currently installed software to be updated.

[0061] Optionally, the feature value of each file can be the feature value calculated and stored in the terminal device locally after the last update of the software to be updated, and here the feature values of each file in the locally stored software to be updated can be obtained.

[0062] Optionally, the feature values of each file in the locally currently installed software to be updated can also be calculated in real time.

[0063] ​After obtaining the feature values of each file in the latest version full software package of the software to be updated and the feature values of each file of the software to be updated currently installed in the terminal device, the terminal device can determine, for each file in the latest version full software package of the software to be updated, whether there is a feature value identical to the feature value of the file among the feature values of each file of the software to be updated currently installed in the terminal device. If it is determined that there is not, it indicates that there is no identical file in the software to be updated currently installed in the terminal device locally, and the file needs to be updated. Therefore, the address of the incremental update file of the software to be updated can be generated based on the feature value of the file in the latest version full software package of the software to be updated. For example, the storage path of the incremental update file of the software to be updated stored in the server can be generated based on the software identifier of the software to be updated and the feature value of the file in the latest version full software package of the software to be updated according to a preset incremental update file storage path generation rule.

[0064] In some optional embodiments, the server can store a software package warehouse and an incremental update file warehouse. The software package warehouse can store full software packages of each version of software, and the incremental update file warehouse can store incremental update files between different versions of software. Here, the incremental update file can be a single file after decompression of a software package, rather than a compressed file. The incremental update file warehouse organizes files in a content addressing manner.

[0065] As an example, the software package warehouse can be an APT (Advanced Package Tool, a command line tool for managing.deb software packages in Debian and its derivative distributions such as Ubuntu, which provides functions such as installation, upgrade, and dependency management) based software package warehouse, and the incremental update file warehouse can be an OSTree (a Git-based version control tool for managing read-only root file system images of Linux operating systems, which stores file snapshots in a content addressing manner to realize atomic upgrade and rollback of systems) based file warehouse.

[0066] In some optional embodiments, the files in the incremental update file warehouse are stored by using feature values as at least part of the paths, and files with the same content have the same feature values. For example, the feature value can be a hash value.

[0067] In some optional embodiments, the software package warehouse (for example, an APT warehouse) and the incremental update file warehouse (for example, an OSTree warehouse) maintain data consistency through a synchronization mechanism, to ensure that the incremental update files in the incremental update file warehouse match the software packages to be updated in the software package warehouse.

[0068] As an example, please refer to Figure 3 , Figure 3The image illustrates one embodiment of how incremental update files are stored on a server. For example... Figure 3 As shown, the server stores an incremental update file repository, specifically an OSTree repository. It uses a hierarchical object storage model similar to Git to manage the filesystem trees, where refs, commits, and dirtree are the core object types. Their relationships and stored content can be illustrated by the following example:

[0069] refs (branch pointers) → commit (commit object) → dirtree (directory tree object) → file / subdirectory

[0070] refs: Symbolic references to a specific commit (similar to branches in Git). For example, ... Figure 3 The file “ / persistent / osroot / repo / heads / v23.0.0.20231128” shown can store the corresponding content, used to indicate the current target of the branch heads / v23.0.0.20231128. Figure 3 The commit button is located below the middle arrow.

[0071] `commit`: Records the metadata (time, parent commit, etc.) of a deployment and points to a root dirtree. For example... Figure 3 The commit shown points to the dirtree below.

[0072] dirtree: Describes the directory structure, including file content hashes, permissions, and dirtree references to subdirectories. For example... Figure 3 As shown, each .file represents a real file, and the filename of each real file is (e.g., ...). Figure 3 The green part in the middle shows the hash value of the file.

[0073] Step 2032: The terminal device downloads all incremental update files of the software to be updated from the incremental update file repository stored on the server according to the set of incremental update file addresses of the software to be updated.

[0074] Here, the terminal device can send the address of each incremental update file in the set of incremental update file addresses of the software to be updated to the server in order to request the download of the corresponding incremental update file. After receiving the above incremental update file addresses, the server can obtain all the incremental update files of the software to be updated stored in the incremental update file repository and send them to the terminal device.

[0075] It should be noted that the server stores an incremental update file warehouse, and the incremental update file of the software that has changed in each software version is stored in the incremental update file warehouse. Here, the incremental update file refers to an independent file after the software package is decompressed, and not a compressed file.

[0076] In step 2033, a virtual software package of the software to be updated is generated based on all current files of the software to be updated and the incremental update file.

[0077] Here, the virtual software package of the software to be updated can be generated by using the virtual file system interception technology of the Linux kernel. The virtual software package has the same format as a common Deb software package and can be installed by the DPKG (Debian Package, a core component of the Debian package management system, responsible for the installation, unpacking, configuration, and removal operations of.deb packages. APT is actually a packaging of DPKG, providing a more friendly dependency management) / APT tool.

[0078] Here, the virtual software package contains metadata consistent with the real.deb software package, and the metadata includes the package name, version, dependency relationship, and installation script.

[0079] Specifically, step 2033 can be performed as follows:

[0080] 1. Create a kernel module

[0081] First, a Linux kernel module needs to be created, which will be responsible for registering a new file system type, implementing file system mounting functions, and providing file operation interface interception capabilities. The kernel module defines initialization and exit functions through the module_init and module_exit macros, which is the standard structure of all kernel modules.

[0082] 2. Initialize the kernel module to register the virtual file system type, specifically including:

[0083] (1). Define a `file_system_type` structure, including: file system name (such as "myvfs"), mounting function pointer, and unmounting superblock function pointer.

[0084] (2). Call the register_filesystem() function to register this new file system type with the kernel.

[0085] (3). Create and mount an instance of this file system, usually using the kern_mount() function.

[0086] 3. Implement file system mounting

[0087] When the system mounts this virtual file system:

[0088] (1). The kernel invokes the registered mount function (e.g. `my_vfs_mount`).

[0089] (2). The mount function usually calls `mount_nodev()` to create a file system instance without an actual device.

[0090] (3). The super block needs to be filled during the mount process, which is done by the `my_vfs_fill_super` function.

[0091] 4. Fill super block and inode

[0092] In the `my_vfs_fill_super` function:

[0093] (1). Set the basic attributes of the super block, including: block size (usually set to the memory page size PAGE_SIZE), file system magic number (used for identification), and super block operation function set.

[0094] (2). Create the root inode (index node), including: use `iget_locked()` to get or create an inode, set the inode type (directory or file) and permissions, set the inode operation function set and file operation function set.

[0095] (3). Create the root directory entry (dentry): use `d_make_root()` to create the root directory entry, and associate the root directory entry to the super block.

[0096] 5. Intercept file read operations

[0097] The core interception logic is implemented in the file operation function set, including:

[0098] (1). Define the `file_operations` structure, where the most important is to implement the `.read` method

[0099] (2). In the custom read function (e.g. `my_vfs_read`): get the current read position offset (`*ppos`), determine which actual file should be read according to the offset, calculate the corresponding offset in the actual file (subtract the cumulative size of the previous file), and call the redirection function to read the actual file content.

[0100] 6. Redirect to the actual file

[0101] The workflow of redirection functions (such as `redirect_to_actual_file`) is as follows:

[0102] (1). Use `filp_open()` to open the actual file in kernel mode;

[0103] (2). Set the file position to the calculated offset;

[0104] (3). Temporarily switch the permission of kernel accessing user space memory (use `set_fs()` );

[0105] (4). Call `vfs_read()` to perform the actual read operation;

[0106] (5). Restore the original memory access permission;

[0107] (6). Use `filp_close()` to close the file;

[0108] (7). Return the read result

[0109] 7. File mapping management

[0110] To efficiently manage the offset mapping of files in the virtual package, it can be implemented as follows:

[0111] (1). A data structure (such as an array, linked list, or hash table) can be maintained to record the following information: the starting offset and ending offset of each file in the virtual package, the corresponding actual file path, and other metadata (such as file size, permissions, etc.).

[0112] (2). Parse the layout information of the virtual package and fill in this mapping table during module initialization (3). In the read operation, query this table to determine how to redirect the request8. User space interface

[0113] Although it is not necessary, some user space interfaces are usually provided:

[0114] (1). Export control interfaces through procfs or sysfs

[0115] (2). Allow dynamic addition / deletion of file mappings in the virtual package

[0116] (3). Provide statistical information and debugging interfaces

[0117] A specific complete workflow example is as follows:

[0118] 1. The user space program (such as the default system installer) opens "package.deb" in the virtual file system;

[0119] 2. The kernel routes the operation to the virtual file system module;

[0120] 3. The program calls read() to read the specified region of the file (e.g., 0-100 bytes);

[0121] 4. The kernel module intercepts the request, consults the mapping table, and discovers that the specified region (e.g., 0-100 bytes) corresponds to 0-100 bytes of the real file " / lib / filel.bin";

[0122] 5. The kernel module opens " / lib / filel.bin", reads the 0-100 bytes of content;

[0123] 6. The content is returned to the user space program;

[0124] 7. The user space program continues to read 100-600 bytes;

[0125] 8. The kernel module consults the mapping table and discovers that 100-600 bytes corresponds to 0-500 bytes of the real file " / usr / file2.dat";

[0126] 9. The module opens " / usr / file2.dat", reads the 0-500 bytes of content;

[0127] 10. The read content is returned to the user space program.

[0128] In this way, the user space program sees a continuous package file, while the content is actually dynamically assembled from multiple files by the kernel module.

[0129] In step 2034, the virtual software package of the to-be-updated software is installed by using the installed preset system update program.

[0130] Here, the installed preset system update program can be installed by using the virtual software package generated in step 2033 to update the to-be-updated software.

[0131] In some optional embodiments, the method flow 200 described above can further include: when the incremental update file warehouse is unavailable, supporting mixed update of the incremental update warehouse and the software package warehouse, and falling back to a full software package installation scheme, that is, downloading a complete real software package from the software package warehouse and installing.

[0132] In some optional embodiments, the method flow 200 described above further protects system files by using a superposition file system to avoid malicious applications from damaging system files.

[0133] The system updating method provided by the above-mentioned embodiments of the present disclosure determines which software is to be updated by the terminal device according to the latest software information list received from the server and the current software information list of the locally installed software. Then, the terminal device determines the storage address of the incremental update file according to the feature value of the file in the latest software and the feature value of the file in the locally installed software, and further downloads the incremental update file through the storage address of the incremental update file, without downloading the full software package, thereby reducing the amount of downloaded data. In addition, the virtual software package of the incremental update file is generated, and no real software package physically exists, thereby reducing the requirement for CPU computing resources and hard disk I / O, further reducing the time for generating the software package, and reducing the time cost of the incremental update as a whole, improving the updating speed, and the entire process is compatible with the installed preset system updating program, without the need to modify the installed preset system updating program, thereby reducing the cost of program modification and compatibility. Through the practice of the applicant, it is verified that the system updating method shown in the present disclosure can save 80% of the update traffic in monthly update, and can reduce 40% of the update traffic in annual update. Figure 2A

[0134] With reference to Figure 4 , a flowchart 400 of one embodiment of the system updating method according to the present disclosure is shown. The system updating method is applied to a terminal device, and includes the following steps:

[0135] In step 401, in response to receiving the latest software information list sent by the server, the set of to-be-updated software identifiers of each to-be-updated software is determined according to the current software information list of the locally installed software of the terminal device and the latest software information list.

[0136] In step 402, for each to-be-updated software, an incremental update operation is performed.

[0137] The method provided by the above-mentioned embodiments of the present disclosure realizes fast incremental update under the premise of compatibility with the existing preset system updating program by downloading the incremental update file on the terminal device and generating the virtual software package of the to-be-updated software.

[0138] With reference to Figure 5 , a flowchart 500 of one embodiment of the system updating method according to the present disclosure is shown. The system updating method is applied to a server, and includes the following steps:

[0139] In step 501, the latest software information list is sent to the terminal device.

[0140] In step 502, in response to receiving the set of incremental update file addresses of the to-be-updated software sent by the terminal device, all incremental update files of the to-be-updated software stored in the incremental update file warehouse are obtained and sent to the terminal device.​

[0141] In the embodiment, the specific operations of steps 501 and 502 and the technical effects caused by the operations are basically the same as those of steps 501 and 502 in the embodiment shown in Figure 2A The operations and effects of steps 201 and 2032 in the embodiment are basically the same as those of steps 201 and 2032 in the embodiment shown in FIG. 2, and thus are not described here.

[0142] In some optional embodiments, the server can store a software package repository and an incremental update file repository. The software package repository can store full software packages of each version of software, and the incremental update file repository can store incremental update files between different versions of software. Here, the incremental update file can be a single file after decompression of the software package, rather than a compressed file. The incremental update file repository organizes files in a content addressing manner.

[0143] As an example, the software package repository can be an APT (Advanced Package Tool, a command-line tool for managing.deb software packages in Debian and its derivative distributions such as Ubuntu) based software package repository, and the incremental update file repository can be an OSTree (a Git-based version control tool for managing read-only root file system images of Linux operating systems. File snapshots are stored in a content addressing manner to achieve atomic upgrade and rollback of the system) based file repository.

[0144] In some optional embodiments, the files in the incremental update file repository are stored by using feature values as at least part of the path, and files with the same content have the same feature value. For example, the feature value can be a hash value.

[0145] In some optional embodiments, the software package repository (for example, an APT repository) and the incremental update file repository (for example, an OSTree repository) maintain data consistency through a synchronization mechanism, ensuring that the incremental update files in the incremental update file repository match the software packages to be updated in the software package repository.

[0146] The system update method provided by the above embodiments of the present disclosure can reduce the update traffic between the server and the terminal device and improve the update speed of the terminal device by storing real software packages in the software package repository on the server, synchronizing incremental update files with changed feature values in the incremental update file repository, and responding to the request of the terminal device to download the incremental update file.

[0147] Further referring to Figure 6 As an implementation of the method shown in the above figures, the present disclosure provides an embodiment of a system update apparatus. The apparatus embodiment and the method embodiment are basically the same as the apparatus embodiment and the method embodiment shown in Figure 4The device can be applied in various terminal devices.

[0148] As shown in Figure 6 The system updating device 600 of the embodiment comprises an updating software determining unit 601 and an incremental updating unit 602. The updating software determining unit 601 is configured to, in response to receiving a latest software information list sent by a server, the latest software information comprising software identification, latest version number and feature value of each file in the latest version full software package, determine a set of software identification of each software to be updated according to a current software information list of software installed locally in a terminal device and the latest software information list. The incremental updating unit 602 is configured to, for each software to be updated, perform the following incremental updating operation: determining a set of incremental updating file addresses of the software to be updated based on the feature value of each file in the latest version full software package of the software to be updated and the feature value of each file of the software to be updated currently installed in the terminal device, and downloading all incremental updating files of the software to be updated from an incremental updating file warehouse stored in the server according to the set of incremental updating file addresses of the software to be updated; generating a virtual software package of the software to be updated based on all current files and incremental updating files of the software to be updated; and installing the virtual software package of the software to be updated by using an installed preset system updating program.

[0149] In the embodiment, the specific processing of the updating software determining unit 601 and the incremental updating unit 602 of the system updating device 600 and the technical effects brought by the specific processing can be respectively referred to the related description of steps 401 and 402 in the corresponding embodiment, which will not be repeated here. Figure 4 The related description of steps 401 and 402 in the corresponding embodiment, which will not be repeated here.

[0150] In some optional implementations, the server can store a software package warehouse and an incremental updating file warehouse. The software package warehouse can store full software packages of each version of software, and the incremental updating file warehouse can store incremental updating files between different versions of software.

[0151] It should be noted that the implementation details and technical effects of each unit in the system updating device provided by the embodiments of the disclosure can be referred to the description of other embodiments in the disclosure, which will not be repeated here.

[0152] Further referring to Figure 7 As an implementation of the method shown in the above figures, the disclosure provides an embodiment of a system updating device. The device embodiment corresponds to the method embodiment shown in Figure 5 The device can be applied in various electronic devices.

[0153] As shown in Figure 7As shown, the system updating apparatus 700 in this embodiment comprises an information list sending unit 701 and an update file sending unit 702. The information list sending unit 701 is configured to send a latest software information list to a terminal device, the latest software information comprising a software identifier, a latest version number, and a feature value of each file in a latest version full software package; the update file sending unit 702 is configured to, in response to receiving a set of incremental update file addresses of a software to be updated sent by the terminal device, acquire all incremental update files of the software to be updated stored in an incremental update file warehouse and send to the terminal device.

[0154] In this embodiment, the specific processing of the information list sending unit 701 and the update file sending unit 702 of the system updating apparatus 700 and the technical effects brought by the same can be respectively referred to Figure 5 The relevant description of steps 501 and 502 in the corresponding embodiment will not be repeated here.

[0155] In some optional implementations, the files in the incremental update file warehouse can be stored by taking the feature value as at least part of the path, and files with the same content have the same feature value.

[0156] It should be noted that the implementation details and technical effects of each unit in the system updating apparatus provided by the embodiments of the present disclosure can be referred to the description of other embodiments in the present disclosure, which will not be repeated here.

[0157] Reference will be made to Figure 8 which shows a structural schematic diagram of a computer system 800 suitable for implementing the terminal device or server of the embodiments of the present disclosure. Figure 8 The computer system 800 shown is merely an example and should not bring any limitation to the functions and use range of the embodiments of the present disclosure.

[0158] As Figure 8 shown, the computer system 800 can comprise a processing device (such as a central processing unit, a graphics processing unit, etc.) 801, which can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 802 or loaded from a storage device 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the electronic device 800 are also stored. The processing device 801, the ROM 802, and the RAM 803 are connected to each other through a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0159] Generally, the following devices can be connected to the I / O interface 805: input device(s) 806, including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, and the like; output device(s) 807, including, for example, a liquid crystal display (LCD), a speaker, a vibrator, and the like; storage device(s) 808, including, for example, a magnetic tape, a hard disk, and the like; and communication device(s) 809. The communication device(s) 809 can allow the computer system 800 to exchange data with other devices via wireless communication or wired communication. Although Figure 8 The computer system 800 is shown with various devices, but it is understood that not all of the devices shown need be present to practice or have the computer system 800. More or fewer devices can alternatively be present.

[0160] In particular, the processes described above with reference to the flowcharts can be implemented as a computer software program according to embodiments of the present disclosure. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a computer readable medium, the computer program containing program code for executing the methods illustrated by the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via the communication device 809, or installed from the storage device 808, or installed from the ROM 802. When the computer program is executed by the processing device 801, the above-described functions defined in the methods of embodiments of the present disclosure are performed.

[0161] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0162] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.

[0163] The aforementioned computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform the following functions: Figure 3 The illustrated embodiments and their alternative implementations demonstrate system update methods, and / or, as shown in the examples. Figure 4 The illustrated embodiments and their alternative implementations demonstrate a system update method.

[0164] Computer program code for carrying out operations of the present disclosure can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).

[0165] The computer program instructions can also be loaded onto a computer or other programmable information processing apparatus to cause a series of operations to be performed on the computer or other programmable information processing apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable information processing apparatus implement the functions / acts specified in the flowchart and / or block diagram block or blocks.

[0166] The units described in the embodiments of the present disclosure can be implemented by software, or by hardware, or combinations of them. In some cases, the names of the units do not constitute a limitation on the units themselves. For example, the incremental updating unit can also be described as "a unit that performs an incremental updating operation for each piece of software to be updated".

[0167] The above description is merely illustrative of the exemplary embodiments of the present disclosure and the principles of the technology involved. It should be understood by those skilled in the art that the disclosed scope of the present disclosure is not limited to the technical solutions formed by the specific combinations of the above technical features, and should also cover other technical solutions formed by any combinations of the above technical features or equivalent features thereof without departing from the above disclosed concept. For example, the above technical features can be replaced with the technical features disclosed in the present disclosure (but not limited to) having similar functions to form technical solutions.

Claims

1. A system updating method, the method comprising: in response to receiving a latest software information list sent by a server, the latest software information comprising software identification, latest version number, and feature value of each file in a latest version full software package, determining a set of software identification of each software to be updated according to a current software information list of software installed locally by a terminal device and the latest software information list; for each software to be updated, performing the following incremental updating operation: determining a set of incremental updating file addresses of the software to be updated based on the feature value of each file in the latest version full software package of the software to be updated and the feature value of each file of the software to be updated currently installed in the terminal device, and downloading all incremental updating files of the software to be updated from an incremental updating file repository stored in the server according to the set of incremental updating file addresses of the software to be updated; generating a virtual software package of the software to be updated based on all current files and incremental updating files of the software to be updated; and installing the virtual software package of the software to be updated by using an installed preset system updating program.

2. The method of claim 1, wherein, The server stores a software package repository and an incremental updating file repository, the software package repository stores full software packages of each version of software, and the incremental updating file repository stores incremental updating files between different versions of software. 3.A system updating method applied to a server, the method comprising: sending a latest software information list to a terminal device, the latest software information comprising software identification, latest version number, and feature value of each file in a latest version full software package; in response to receiving a set of incremental updating file addresses of software to be updated sent by the terminal device, obtaining all incremental updating files of the software to be updated stored in an incremental updating file repository and sending the incremental updating files to the terminal device.

4. The method of claim 3, wherein, Files in the incremental updating file repository are stored by using feature value as at least part of a path, and files with same content have same feature value. 5.A system updating apparatus applied to a terminal device, comprising: an updating software determining unit configured to, in response to receiving a latest software information list sent by a server, the latest software information comprising software identification, latest version number, and feature value of each file in a latest version full software package, determine a set of software identification of each software to be updated according to a current software information list of software installed locally by a terminal device and the latest software information list; an incremental update unit configured to, for each of the to-be-updated software, perform the following incremental update operation: determining a set of incremental update file addresses of the to-be-updated software based on feature values of files in a latest version full software package of the to-be-updated software and feature values of files of the to-be-updated software currently installed in the terminal device, and downloading all incremental update files of the to-be-updated software from an incremental update file repository stored in the server according to the set of incremental update file addresses of the to-be-updated software; generating a virtual software package of the to-be-updated software based on all current files and incremental update files of the to-be-updated software; and installing the virtual software package of the to-be-updated software by using an installed preset system update program.

6. A system update apparatus applied to a server, comprising: an information list sending unit configured to send a latest software information list to a terminal device, the latest software information including a software identifier, a latest version number, and feature values of each file in a latest version full software package; an update file sending unit configured to, in response to receiving a set of incremental update file addresses of to-be-updated software sent by the terminal device, acquire all incremental update files of the to-be-updated software stored in an incremental update file repository and send to the terminal device.

7. A terminal device, comprising: one or more processors; a storage device having one or more programs stored thereon, when the one or more programs are executed by the one or more processors, the one or more processors implement the method of any one of claims 1-2.

8. A server, comprising: one or more processors; a storage device having one or more programs stored thereon, when the one or more programs are executed by the one or more processors, the one or more processors implement the method of any one of claims 3-4.

9. A computer readable storage medium having stored thereon a computer program, wherein, The computer program is executed by one or more processors to implement the method of any one of claims 1-2 and / or claims 3-4.

10. A computer program product comprising computer programs / instructions which, when executed by a processor, implement the method of any one of claims 1-2 and / or claims 3-4.

Citation Information

Cited By

  • Software repository and client version synchronization method and system

    CN122086458A