Operating system upgrade method and upgrade system
By backing up and configuring the system data and applications before the operating system upgrade, the problem that the application cannot run normally after the operating system upgrade is solved, and the user experience is improved.
Patent Information
- Application Number
- CN201910579233.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-06-28
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2039-06-28
AI Technical Summary
In the prior art, the application cannot run normally after the operating system is upgraded, resulting in poor user experience.
By obtaining a list of system data and applications that need to be retained before the upgrade, backup system data and applications to the temporary area, perform system upgrades, and complete application configuration based on the backup data.
It realizes the normal operation of applications after the operating system is upgraded, avoids the loss of user data and applications, and improves the user experience.
Smart Images

Figure CN112230947B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to an operating system upgrade method. Background Art
[0002] With the development of social science and technology, people deal with computers almost every day. As a carrier for computer equipment to interact with users, the operating system plays an extremely important role. Computer technology in contemporary society is in a stage of rapid development. In daily applications, in order to use the latest functions of applications in a timely manner, or to effectively defend against bad carriers such as Trojans, viruses, and junk software in a timely manner, it is often necessary to upgrade or update the operating system. Once the operating system is upgraded, the user's user data before the upgrade and the applications installed by the user should be guaranteed to be used normally.
[0003] In the existing system upgrade technology, one is to completely clear the data and applications in the old operating system to ensure that the applications in the upgraded or updated operating system will not conflict with the old version. The advantage of this solution is that it can ensure that the upgraded or updated operating system and applications can run normally and avoid the problem of mismatch between legacy data and applications. However, the user experience of this solution is poor, because after upgrading or updating the system, some of the user's previous convenient operations and marks are also cleared, and the user data and applications are completely deleted. The user needs to reconfigure the data and reinstall the required applications to adapt to the new system environment, which causes great inconvenience to the user. Another upgrade method uses a direct installation package method, and all user data and application data before the upgrade will be retained. The advantage of this solution is that all user data will not be lost, but it is only not lost, and the normal use of the application cannot be guaranteed. For example, if the version of the relevant library of the upgraded system is too high and inconsistent with the library version that the user's self-installed application depends on, it will cause the retained user application to be unavailable and the user experience is also poor. Summary of the invention
[0004] The purpose of the present invention is to provide an operating system upgrade method to solve the problem in the prior art that application programs cannot run normally after the system is upgraded.
[0005] In order to solve the above problems, the present application discloses an operating system upgrade method, comprising:
[0006] Get a list of the locations of system data that needs to be preserved before upgrading;
[0007] Get the list of applications installed by the user;
[0008] Backing up the system data to a temporary area according to the data location;
[0009] Backing up the application and link library according to the application list;
[0010] Perform system upgrades, restore the system data, and complete configuration of each application program based on the backed-up data.
[0011] In a preferred example, a list of locations of system data that need to be retained is confirmed based on locations defined by standard data and locations of dynamic data.
[0012] In a preferred embodiment, the step of backing up the application and the link library according to the application list includes:
[0013] Back up the relevant files of each application to the corresponding custom directory;
[0014] Parsing the relevant files of each application, parsing and obtaining the link library corresponding to the application, and saving the application and the link library to the custom directory;
[0015] Generate a packaging script from the executable file corresponding to the application link library;
[0016] Clear the related files and library directories of each application in the system.
[0017] In a preferred example, the step of parsing the relevant files of each application includes:
[0018] The custom directory includes a custom file directory and a custom library directory;
[0019] Determine the type of the related file:
[0020] If it is a common file, the file is directly backed up to the custom file directory;
[0021] If it is a link file, copy the file corresponding to the link and create a corresponding link in the custom file directory;
[0022] If it is an executable file, back up the dependent link library to the custom library directory, generate a corresponding encapsulation script, and export the link path to the custom library directory;
[0023] Modify the launcher file to point the executable program to the packaging script.
[0024] In a preferred example, the method further includes: overwriting all relevant files in the custom directory into the system, and executing the encapsulation script generated by the executable file.
[0025] In a preferred example, the custom directories corresponding to the various applications are created under the backup directory.
[0026] In a preferred example, the user's application list is obtained by means of diff.
[0027] In a preferred example, the step of completing the configuration of each application according to the packaging script includes: overwriting all relevant files in the custom directory into the system, and executing the packaging script generated by the executable file.
[0028] The present application also discloses an operating system upgrade system comprising:
[0029] A location list acquisition module configured to acquire a location list of system data that needs to be retained before upgrading;
[0030] An application list acquisition module configured to acquire a list of applications installed by a user;
[0031] A first backup module, configured to back up the system data to a temporary area according to the data location;
[0032] A second backup module, configured to back up the application according to the application list;
[0033] The upgrade module is configured to perform a system upgrade, restore the system data, and complete the configuration of each application program according to the backed-up data.
[0034] The present application also discloses an operating system upgrade device including:
[0035] a memory for storing computer executable instructions; and
[0036] A processor, coupled to the memory, is configured to implement the steps in the method described above when executing the computer executable instructions.
[0037] The present application also discloses a computer-readable storage medium in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, the steps in the method described above are implemented.
[0038] Compared with the prior art, the method of the present application has the following beneficial effects:
[0039] The present invention verifies different applications and user data. The method can verify whether user data and applications are completely backed up and migrated by executing programs and using the operating system, providing a systematic, complete and secure protection solution for operating system upgrades.
[0040] The specification of the present application records a large number of technical features, which are distributed in various technical solutions. If all possible combinations of technical features of the present application (i.e., technical solutions) are to be listed, the specification will be too long. In order to avoid this problem, the various technical features disclosed in the above-mentioned invention content of the present application, the various technical features disclosed in the various embodiments and examples below, and the various technical features disclosed in the accompanying drawings can be freely combined with each other to form various new technical solutions (these technical solutions should all be regarded as having been recorded in this specification), unless the combination of such technical features is technically infeasible. For example, in one example, feature A+B+C is disclosed, and in another example, feature A+B+D+E is disclosed, and features C and D are equivalent technical means that play the same role. Technically, only one can be used, and it is impossible to use them at the same time. Feature E can be combined with feature C technically. Then, the solution of A+B+C+D should not be regarded as having been recorded because it is technically infeasible, and the solution of A+B+C+E should be regarded as having been recorded. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 A flow chart of an operating system upgrade method in an embodiment of the present invention is shown.
[0042] Figure 2 A block diagram of an operating system upgrading device in an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0043] In the following description, many technical details are provided to help readers better understand the present application. However, those skilled in the art can understand that even without these technical details and various changes and modifications based on the following embodiments, the technical solutions claimed in the claims of the present application can be implemented.
[0044] In order to make the objectives, technical solutions and advantages of the present invention more clear, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.
[0045] refer to Figure 1 As shown, in one embodiment of the present application, a secure operating system upgrade method is disclosed. The operating system upgrade method described in this embodiment can be applied to computers that can run various types of operating systems, such as Linux operating system, XP operating system, VISTA operating system, WIN7 operating system, WIN8 operating system, WIN8.1 operating system and WIN10 operating system. The method includes:
[0046] In step 101, a location list of system data that needs to be retained before the upgrade is obtained. In one embodiment of the present application, the location list of data is confirmed based on the location defined by the standard data and the location of the dynamic data. For example, the traditional Linux operating system has a relatively clear location directory definition for user data, such as the user's home directory, etc. The configuration of dynamic data is pre-configured by overlaying the file system, and using the overlaid file system information storage method to obtain the location that does not belong to the traditional standard data definition, such as network configuration information under / etc / NetworkManager / , network connection data, and printing configuration data under / etc / cups, etc. The location information of the data list that needs to be retained is confirmed by combining the two.
[0047] In step 102, a list of applications installed by the user is obtained. In one embodiment, the list of applications installed by the user is obtained by diff, such as a picture viewer, QQ, WeChat, PDF reader, etc.
[0048] In step 103, the system data is backed up to a temporary area according to the data location.
[0049] In step 104, the application is backed up according to the application list.
[0050] Specifically, the step of backing up the application according to the application list includes:
[0051] First, back up the relevant files and library directories of each application to the corresponding custom directory. The custom directory corresponding to each application is created in the backup directory, for example, in the / opt directory. The custom directory includes a custom file directory and a custom library directory.
[0052] Next, the relevant files of each application are parsed, and the application link library is obtained by parsing, and the application link library is saved in the custom directory.
[0053] Among them, the step of parsing the relevant files of each application includes: analyzing the specific files installed to the system according to the software package of the target application, if it is a common file, directly backing up the file to the custom file directory; if it is a link file, copying the actual file corresponding to the link, and creating a corresponding link in the custom file directory; if it is an executable file ELF, backing up the link library displayed by ldd to the custom library directory, and generating a packaging script, exporting the link path of the custom library directory to LD_LIBRARY_PATH; modifying the Exec field value in the launcher file to point the executable program to the packaging script.
[0054] For example, taking the image viewer as an example, analyze the file list of this software package and save these file lists to the system reserved directory, where / usr / bin / eog is an executable file and the format is ELF, parse its dependent link library, back up the library file to the directory / opt / updateeog / eog, export the path to LD_LIBRARY_PATH, package the script file wrapper-eog, and modify the Exec field Exec=eog%U in the original launcher file to Exec=wrapper-eog%U.
[0055] Afterwards, parse the relevant files in the custom directory corresponding to each application and the postinst packaging script of the library directory. If a link file is created, extract the executable file corresponding to the application link library to generate a packaging script, which includes the executable file of the application and the file calling the system.
[0056] Clear the system basic library files in the backup library directory, such as libc library.
[0057] Extract the application package's postinst packaging script to the backup file directory.
[0058] In step 105, the system is upgraded, the system data is restored, and the configuration of each application is completed according to the backed-up data. All relevant files in the custom directory are overwritten into the system, and the postinst packaging script generated by the executable file is executed.
[0059] refer to Figure 2 As shown, the present application also discloses an operating system upgrade system including:
[0060] A location list acquisition module 201 is configured to acquire a location list of system data that needs to be retained before upgrading;
[0061] An application list acquisition module 202 is configured to acquire a list of applications installed by a user;
[0062] A first backup module 203, configured to back up the system data to a temporary area according to the data location;
[0063] The second backup module 204 is configured to back up the application according to the application list:
[0064] The upgrade module 205 is configured to perform a system upgrade, restore the system data, and complete the configuration of each application program according to the backed-up data.
[0065] It should be noted that those skilled in the art should understand that the implementation functions of each module shown in the implementation of the upgrade system of the above-mentioned operating system can be understood with reference to the relevant description of the aforementioned upgrade method. The functions of each module shown in the implementation of the upgrade system of the above-mentioned operating system can be realized by a program (executable instruction) running on a processor. If the upgrade system of the above-mentioned operating system of the present application embodiment is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiment of the present application embodiment is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read Only Memory), disk, CD and other various media that can store program codes. In this way, the embodiment of the present application is not limited to any specific combination of hardware and software.
[0066] Accordingly, the present application also provides a computer-readable storage medium in which computer executable instructions are stored, and when the computer executable instructions are executed by the processor, the various method embodiments of the present application are implemented. Computer-readable storage media include permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be a computer-readable instruction, a data structure, a module of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable storage media does not include temporary computer-readable media (transitory media).
[0067] In addition, the embodiment of the present application also provides an upgrade device for an operating system, which includes a memory for storing computer executable instructions, and a processor; the processor is used to implement the steps in the above-mentioned method implementation when executing the computer executable instructions in the memory. Among them, the processor can be a central processing unit (Central Processing Unit, referred to as "CPU"), or other general-purpose processors, digital signal processors (Digital Signal Processor, referred to as "DSP"), Application Specific Integrated Circuit (Application Specific Integrated Circuit, referred to as "ASIC"), etc. The aforementioned memory can be a read-only memory (read-only memory, referred to as "ROM"), a random access memory (random access memory, referred to as "RAM"), a flash memory (Flash), a hard disk or a solid-state hard disk, etc. The steps of the method disclosed in each embodiment of the present invention can be directly embodied as a hardware processor to be executed, or a combination of hardware and software modules in the processor can be executed.
[0068] It should be noted that in the application documents of this patent, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that the 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, the elements defined by the sentence "including one" do not exclude the existence of other identical elements in the process, method, article or device including the elements. In the application documents of this patent, if it is mentioned that an action is performed according to an element, it means that the action is performed at least according to the element, which includes two situations: performing the action only according to the element, and performing the action according to the element and other elements. Expressions such as multiple, multiple, and multiple include 2, 2 times, 2 kinds, and more than 2, more than 2 times, and more than 2 kinds.
[0069] All documents mentioned in this specification are considered to be included in the disclosure of this application as a whole, so that they can be used as a basis for modification when necessary. In addition, it should be understood that the above is only a preferred embodiment of this specification and is not intended to limit the scope of protection of this specification. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of one or more embodiments of this specification should be included in the scope of protection of one or more embodiments of this specification.
[0070] In some cases, the actions or steps described in the claims may be performed in a different order than in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or sequential order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
Claims
1. A method for upgrading an operating system, characterized in that: include: Get a list of the locations of system data that needs to be preserved before upgrading; Get the list of applications installed by the user; backing up the system data to a temporary area according to the data locations included in the location list; Determine the type of files related to each application: if it is a common file, directly back up the file to the custom file directory; If it is a link file, copy the file corresponding to the link and create a corresponding link in the custom file directory; If it is an executable file, parse and obtain the link library corresponding to the application, back up the dependent link library to the custom library directory, generate the corresponding packaging script, and export the link path to the custom library directory; Modify the launcher file to point the executable program to the encapsulated script; The custom directory includes the custom file directory and the custom library directory; Clear the related files and library directories of each application in the system; Perform system upgrade, restore the system data, overwrite all relevant files in the custom directory into the system, and execute the encapsulation script generated by the executable file.
2. The method according to claim 1, characterized in that Confirm the location list of system data that needs to be retained based on the location defined by standard data and the location of dynamic data.
3. The method according to claim 1, characterized in that The custom directories corresponding to the various application programs are created under the backup directory.
4. The method according to claim 1, characterized in that Get the user's application list through diff.
5. An operating system upgrade system, comprising: A location list acquisition module configured to acquire a location list of system data that needs to be retained before upgrading; An application list acquisition module configured to acquire a list of applications installed by a user; A first backup module, configured to back up the system data to a temporary area according to the data location included in the location list; The second backup module is configured to determine the type of the relevant files of each application: if it is a common file, the file is directly backed up to the custom file directory; If it is a link file, copy the file corresponding to the link and create a corresponding link in the custom file directory; If it is an executable file, parse and obtain the link library corresponding to the application, back up the dependent link library to the custom library directory, generate the corresponding packaging script, and export the link path to the custom library directory; Modify the launcher file to point the executable program to the encapsulated script; The custom directory includes the custom file directory and the custom library directory; Clear the related files and library directories of each application in the system; The upgrade module is configured to perform a system upgrade, restore the system data, overwrite all relevant files under the custom directory into the system, and execute the encapsulation script generated by the executable file.
6. An operating system upgrade device, comprising: A memory for storing computer executable instructions; and a processor, coupled to the memory, configured to implement the steps of the method according to any one of claims 1 to 4 when executing the computer executable instructions.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, the steps in the method according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Hardware driving and medium program upgrading method of automatic equipment
CN102521006A
Electronic device and updating method for operating system thereof
CN103186387A
A method and apparatus for retaining the current service for remote upgrading
CN109408075A
Method and system for backing up and restoring files stored in a single instance store
US6513051B1