A method for converting a local operating system into a cloud desktop image template

By identifying and migrating local operating system and software data, the problem of low software migration efficiency in existing technologies is solved, enabling efficient and secure creation of cloud desktop image templates.

CN116126356BActive Publication Date: 2026-03-10XIAN LEIFENG ELECTRONIC TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-23
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

Existing technology cannot efficiently migrate software installed by users on non-system drives (such as D drive, E drive) to cloud desktop image templates, resulting in some software becoming unusable and requiring reinstallation, thus affecting efficiency.

Method used

It employs operating system identification, software list identification, and virus program and file identification modules. By identifying the installation mode and software location of the local operating system, it creates a cloud desktop image template, identifies and migrates operating system and software data, establishes a data mapping table, and removes virus information.

Benefits of technology

It enables efficient and complete migration of local operating systems and software to cloud desktop image templates, avoiding reinstallation and providing a secure and stable cloud desktop environment.

✦ Generated by Eureka AI based on patent content.
Patent Text Reader

Abstract

This invention discloses a method for converting a local operating system into a cloud desktop image template. The method includes an operating system identification module, a software list identification module, a virus and file identification module, and a cloud desktop image management module. It can identify the local computer's installation mode, system disk partitions, data disk partitions, software installation partitions, and multiple system coexistence. This data is then converted into a standard cloud desktop image, achieving efficient and complete migration of the user's local system to the cloud desktop image without requiring the user to perform cumbersome operations such as reinstalling software. Simultaneously, a data mapping table for the local operating system is established, removing hidden virus information from the operating system and providing the user with a safe and stable cloud desktop image template.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of wireless communication technology, specifically relating to a method for converting a local operating system into a cloud desktop image template. Background Technology

[0002] With the widespread application of cloud desktops, the informatization process of various industries has been accelerated, making things more convenient for users. At the same time, users have also raised higher requirements.

[0003] Currently, there are two ways to create cloud desktop image templates. One is to start from scratch and reinstall the user's various office, educational, and specialized software. The other is to use tools to convert the user's operating system to a common virtual disk format. Neither method can meet the high demands of customers. First, the first method is time-consuming, and there are complex issues such as the need for manufacturer guidance to install specialized software, severely impacting efficiency. The second method offers some improvement in efficiency, but it has a drawback: the tools can only convert files from the system drive (C drive), not files from other drives. However, in practice, users typically install software on other drives, such as D and E drives, which can cause some software to become unusable, requiring further time for reinstallation. Summary of the Invention

[0004] This invention proposes a method for converting a local operating system into a cloud desktop image template, in order to solve the problem that in practical applications, users are accustomed to installing software on other drives, such as D drive, E drive, etc., which leads to some software being unusable and requiring time to reinstall.

[0005] To achieve the above objectives, the present invention provides the following technical solution: a method for converting a local operating system into a cloud desktop image template, employing an operating system identification module, a software list identification module, a virus program and file identification module, and a cloud desktop image management module; specifically, it follows these steps:

[0006] Step 1: First, obtain the computer's Basic Input / Output System (BIOS) mode by calling the operating system API interface. There are currently two modes: legacy and EFI mode. If the current system is in legacy mode, perform legacy mode operating system identification and proceed to Step 2; if the current system is in EFI mode, perform EFI mode operating system identification and proceed to Step 3.

[0007] Step 2: Read the first priority boot disk of the computer where the local system is located, obtain the first 512 bytes of the first sector of the first boot disk, analyze the bootloader in the sector information, and find the corresponding boot program; the content of the first 512 bytes of the current system's first sector loads ntldr or bootmgr to boot Windows series operating systems, and then proceed to step 2.1 for multi-system analysis; the content of the first 512 bytes of the first sector loads grldr, grub.exe, core.img, which are common open-source bootloaders; then analyze the open-source bootloader, the corresponding configuration file, and further find the booted operating system, and perform multi-boot system analysis in step 2.2;

[0008] Step 2.1: When the bootloader's boot entry is ntldr, the boot.ini file is read. If one boot record is recorded, it indicates a single local operating system; if multiple records are recorded, it indicates the existence of multiple operating systems. When the bootloader's boot entry is bootmgr, the BCD's boot information is read. If one boot record is recorded, it indicates a single local operating system; if multiple records are recorded, it indicates the existence of multiple operating systems. After the operating system is identified, the operating system data is extracted, and then, in step 4, the cloud desktop image is converted.

[0009] Step 2.2: Analyze the boot entries in the menu.lst and grub.cfg files, and analyze the hard drive location of the booting operating system through similar data such as hd0,1 or hd0,msdos1; when there is 1 boot entry, it indicates that the boot is a single system, and when there are multiple boot entries, it indicates that multiple systems are booted; after the operating system is identified, the operating system data is extracted, and then the cloud desktop image is converted in step 4;

[0010] Step 3: In EFI mode, read the first partition of the local hard drive, which is a FAT file system; read all boot files in the \EFI\ directory under the root directory; after all operating systems are identified, extract the operating system data, and then proceed to Step 4 to convert the cloud desktop image.

[0011] Step 4: Convert the cloud desktop image. After identifying the operating system in Step 2 and its sub-items, as well as Step 3, the cloud desktop image management module is called to convert the identified local operating system into a cloud desktop image. When there is only one operating system, the virus-free operating system file is migrated. When there are multiple operating systems, each operating system creates a partition on the virtual disk to store its own virus-free operating system file. Finally, the bootloader's boot entries are modified to support one or more operating systems.

[0012] Step 5: After the operating system migration is completed, user software migration is performed. The software list identification module is called to first read the software installation list and find the software installation path. Then, the cloud desktop image management module is called to migrate the software marked as not being in the same partition as the operating system to the cloud desktop image template. First, a partition identical to the original software installation is created, the data is copied and migrated, and then the registry information is updated to complete the migration of the entire user software list, thus achieving the goal of complete software migration.

[0013] Compared with the prior art, the beneficial effects of the present invention are:

[0014] This invention provides a method for converting a local operating system into a cloud desktop image template. It can identify the local computer's installation mode, system disk partitions, data disk partitions, software installation partitions, and the coexistence of multiple systems. This data is then converted into a standard cloud desktop image, achieving efficient and complete migration of the user's local system to the cloud desktop image without requiring the user to perform cumbersome operations such as reinstalling software. Simultaneously, a data mapping table for the local operating system is established, and hidden virus information within the operating system is removed, providing the user with a secure and stable cloud desktop image template. Detailed Implementation

[0015] The present invention will now be described in detail with reference to specific embodiments.

[0016] This invention provides a method for converting a local operating system into a cloud desktop image template, employing an operating system identification module, a software list identification module, a virus program and file identification module, and a cloud desktop image management module; specifically, it follows these steps:

[0017] Step 1: First, obtain the computer's Basic Input / Output System (BIOS) mode by calling the operating system API interface. There are currently two modes: legacy and EFI mode. If the current system is in legacy mode, perform legacy mode operating system identification and proceed to Step 2; if the current system is in EFI mode, perform EFI mode operating system identification and proceed to Step 3.

[0018] Step 2: Read the first priority boot disk of the computer where the local system is located, obtain the first 512 bytes of the first sector of the first boot disk, analyze the bootloader in the sector information, and find the corresponding boot program; the content of the first 512 bytes of the current system's first sector loads ntldr or bootmgr to boot Windows series operating systems, and then proceed to step 2.1 for multi-system analysis; the content of the first 512 bytes of the first sector loads grldr, grub.exe, core.img, which are common open-source bootloaders; then analyze the open-source bootloader, the corresponding configuration file, and further find the booted operating system, and perform multi-boot system analysis in step 2.2;

[0019] Step 2.1: When the bootloader's boot entry is ntldr, the boot.ini file is read. If one boot record is recorded, it indicates a single local operating system; if multiple records are recorded, it indicates the existence of multiple operating systems. When the bootloader's boot entry is bootmgr, the BCD's boot information is read. If one boot record is recorded, it indicates a single local operating system; if multiple records are recorded, it indicates the existence of multiple operating systems. After the operating system is identified, the operating system data is extracted, and then, in step 4, the cloud desktop image is converted.

[0020] Step 2.2: Analyze the boot entries in the menu.lst and grub.cfg files, and analyze the hard drive location of the booting operating system through similar data such as hd0,1 or hd0,msdos1; when there is 1 boot entry, it indicates that the boot is a single system, and when there are multiple boot entries, it indicates that multiple systems are booted; after the operating system is identified, the operating system data is extracted, and then the cloud desktop image is converted in step 4;

[0021] Step 3: In EFI mode, read the first partition of the local hard drive, which is a FAT file system; read all boot files in the \EFI\ directory under the root directory. If bootmgfw.efi or bootmgr.efi exists in the boot directory, it indicates that Windows bootloader is present; read the BCD boot information. If there is one boot record, it indicates a single local operating system; if there are multiple records, it indicates that multiple operating systems exist; if grubbootloader exists, read the grub.cfg configuration file and analyze data such as hd0 and msdos1 to determine the hard drive location of the booted operating system; if there is one boot entry, it indicates a single system boot; if there are multiple boot entries, it indicates that multiple systems are booted; after all operating systems are identified, extract the operating system data and proceed to step 4 to convert the cloud desktop image.

[0022] Step 4: Convert the cloud desktop image. After identifying the operating system in Step 2 and its sub-items, as well as Step 3, the cloud desktop image management module is invoked to convert the identified local operating system into a cloud desktop image. The cloud desktop image management module receives the identified local operating system data, including bootloader data, and performs cloud desktop image template conversion. First, a virtual disk of the user-specified size is created, with virtual disk formats including qcow2, VHD, and vhdx. Then, the bootloader data and configuration files are migrated, previously using sector copying and file copying. After the bootloader migration is complete, the local operating system migration begins. First, the virus program and file identification module is invoked for virus processing. After the virus is removed, the operating system migration begins. When there is only one operating system, the virus-removed operating system files are migrated. When there are multiple operating systems, each operating system creates a partition on the virtual disk to store its independent virus-removed operating system files. Finally, the bootloader's boot entries are modified to support one or more operating systems.

[0023] Step 5: After the operating system migration is complete, user software migration is performed. The software list identification module is invoked to first read the software installation list and locate the software installation path. If the software and the operating system are installed on the same partition, no action is taken; if the software and the operating system are not installed on the same partition, the software installation partition, as well as the software storage path and file list, are recorded. Finally, the registry of the corresponding operating system is checked, and entries that are different from those of the Century software are deleted. Then, the cloud desktop image management module is invoked to migrate the software marked as not being on the same partition as the operating system to the cloud desktop image template. First, a partition identical to the original software installation is created, the data is copied and migrated, and then the registry information is updated to complete the migration of the entire user software list, achieving the goal of complete software migration.

[0024] After completing the above steps, the local operating system will be converted into a cloud desktop image template. After conversion, users will no longer need to reinstall the operating system or software. Users can use it whenever they want, saving a lot of time, and the user's complete software environment will be preserved.

[0025] Further, in step 2, the configuration files are menu.lst and grub.cfg, respectively. The files are analyzed to contain data such as hd0,1 or hd0,msdos1. The number after hd0 is variable, with 0 representing the first hard drive, 1 representing the second hard drive, and so on in sequence. The number after hd0 represents the partition, and the partition number is indicated by a number.

[0026] Furthermore, in step 4, the virus program and file identification module performs virus processing. The virus program and file identification module contains a virus database. It compares the operating system files with the virus database. If they match the records in the virus database, the corresponding files are marked for deletion and then deleted.

[0027] Finally, it should be noted that the above-described embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of protection described in the claims.

Claims

1. A method of converting a local operating system into a cloud desktop image template, the method comprising: Adopt operating system identification module, software list identification module, virus program and file identification module, cloud desktop mirror management module; Specifically according to the following steps: ​ Step 1, first, by calling operating system API interface, the computer basic input output system BIOS mode is obtained, there are two modes, legacy, EFI mode respectively; The current system is in legacy mode, then the legacy mode operating system recognition is carried out, and step 2 is carried out;The current system is in efi mode, then the efi mode operating system recognition is carried out, and step 3 is carried out; Step 2, read the first priority of the local system in the computer hard disk, get the first sector of the first sector of the first sector, analyze the boot loader in the sector information, and find the corresponding starting program;If the content of the first sector of the current system is 512 bytes, load ntldr or bootmgr, it is the boot of windows series operating system, then go to step 2.1 for multi system analysis;If the content of the first sector of the current system is 512 bytes, load grldr, or grub.exe, or core.img, it is a common open source bootloader director;Then analyze the configuration file corresponding to the open source bootloader, and then further find the booting operating system, and carry out multi boot system analysis in step 2.2; Step 2.1, when the bootloader boot item is ntldr, read the boot.ini file, if a startup record is recorded, it indicates that it is a single local operating system, if there are multiple records, it indicates that there are multiple operating systems;When the boot item of bootloader is bootmgr, read the boot information of BCD, if a startup record is recorded, it indicates that it is a single local operating system, if there are multiple records, it indicates that there are multiple operating systems;After the operating system recognition is completed, the operating system data extraction is carried out, and the cloud desktop mirror conversion is carried out through step 4; Step 2.2, analyze the startup item in menu.lst, grub.cfg file, and analyze the hard disk location of the starting operating system through hd0,1, or hd0,msdos1 similar data;When the starting boot item is 1, it indicates that the starting boot is single system, when the starting boot is multiple, it indicates that multiple systems are booted;After the operating system recognition is completed, the operating system data extraction is carried out, and the cloud desktop mirror conversion is carried out through step 4; Step 3, read the first partition of the local hard disk, and it is a fat format file system;Read all the startup files in the \EFI\ directory under the root directory, when all the operating system recognition is completed, then the operating system data extraction is carried out, and the cloud desktop mirror conversion is carried out through step 4; Step 4, convert cloud desktop mirror, after step 2 and its subitems and step 3 complete the operating system recognition, then call the cloud desktop mirror management module to convert the recognized local operating system into cloud desktop mirror. When there is one operating system, the operating system file after virus detection is migrated; when there are multiple operating systems, each operating system builds a partition on the virtual disk to store the independent operating system, and finally the boot entry of the bootloader is modified to support single or multiple operating systems; Step 5, after the migration of the operating system is completed, the user software migration is performed, the software list identification module is called, the software installation list is first read, and the software installation path is then found, and then the cloud desktop image management module is called to migrate the software marked as not in the same area as the operating system to the cloud desktop image template, first create the same partition as the original software installation, copy and migrate the data, and then update the registry information, complete the migration of the entire user software list, and achieve the goal of complete software migration.

2. The method of claim 1, wherein, In step 2, the configuration files are menu.lst and grub.cfg, and the files contain hd0,1 or hd0,msdos1 data, wherein the number after hd is variable, 0 represents the first hard disk, 1 represents the second hard disk, and the comma represents the partition.

3. The method of claim 1, wherein, In step 3, when the bootmgfw.efi or bootmgr.efi file exists in the startup directory, the windows bootlader is started; the BCD boot information is read, if a startup record is recorded, it indicates a single local operating system, and if multiple records exist, it indicates multiple operating systems; when the grub bootlader exists, the grub.cfg configuration file is read, and the hard disk position of the started operating system is analyzed by analyzing the hd0,msdos1 data; when the startup boot entry is one, it indicates that the single system is started, and when the startup boot entry is multiple, it indicates that multiple systems are started.

4. The method of claim 1, wherein, In step 4, the cloud desktop image management module receives the identified local operating system data, including the bootlader data, and performs cloud desktop image template conversion, first, a virtual disk of a user-specified size is created, and the virtual disk format includes qcow2, VHD, and vhdx; then the bootlader data is migrated, and the bootlader configuration file is migrated, the migration mode is sector copy and file copy; after the bootloader migration is completed, the local operating system migration is started, first, the virus program and file identification module are called for virus processing, after the virus detection is completed, the operating system migration is started.

5. The method of claim 4, wherein, The virus program and file identification module perform virus processing, and the virus program and file identification module include a virus database, compare the operating system file with the virus database, if it is consistent with the record in the virus database, mark and delete the corresponding file.

6. The method of claim 1, wherein, In step 5, if the software and the operating system are installed in the same partition, no processing is performed; if the software and the operating system are not installed in the same partition, the installation partition of the software is recorded, and the path and file list where the software is stored are recorded; finally, the registry corresponding to the operating system is checked, and items different from the registry of the software are deleted.

Citation Information

Patent Citations

  • A manufacturing method of a desktop operating system startup disk

    CN109901845A

  • Operating system starting method and computing device

    CN112988252A