CN108196896B - Operating system switching method and device - Google Patents

Operating system switching method and device Download PDF

Info

Publication number
CN108196896B
CN108196896B CN201810019373.1A CN201810019373A CN108196896B CN 108196896 B CN108196896 B CN 108196896B CN 201810019373 A CN201810019373 A CN 201810019373A CN 108196896 B CN108196896 B CN 108196896B
Authority
CN
China
Prior art keywords
vhd file
terminal device
differencing
target
operating system
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810019373.1A
Other languages
Chinese (zh)
Other versions
CN108196896A (en
Inventor
蒋涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New H3C Cloud Technologies Co Ltd
Original Assignee
New H3C Cloud Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by New H3C Cloud Technologies Co Ltd filed Critical New H3C Cloud Technologies Co Ltd
Priority to CN201810019373.1A priority Critical patent/CN108196896B/en
Publication of CN108196896A publication Critical patent/CN108196896A/en
Application granted granted Critical
Publication of CN108196896B publication Critical patent/CN108196896B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4406Loading of operating system
    • G06F9/441Multiboot arrangements, i.e. selecting an operating system to be loaded

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Stored Programmes (AREA)

Abstract

The application provides an operating system switching method and device, which are applied to terminal equipment. The terminal device is prestored with an operating system VHD file and at least one first differencing VHD file based on the operating system VHD file. The terminal equipment receives the selection instruction, and determines a target first difference VHD file corresponding to the selection instruction, wherein the target first difference VHD file comprises a target application program corresponding to the selection instruction; judging whether a second differential VHD file established on the basis of the target first differential VHD file exists in the terminal equipment; and if so, associating the second differencing VHD file with the starting configuration of the terminal equipment, starting the operating system from the second differencing VHD file when the terminal equipment is restarted, and saving data generated by the operation executed on the operating system in the second differencing VHD file. Therefore, the target application program can be restored only by deleting the second difference VHD file, and the method is very convenient and fast.

Description

Operating system switching method and device
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for switching an operating system.
Background
In the teaching process, more and more courses need to be matched with corresponding software for learning, and in order to achieve a better teaching effect, institutions such as schools and the like can generally provide terminals provided with corresponding software for teaching.
However, the operation performed by the user in the teaching process changes the software environment, thereby affecting the use of other users, and the existing method is to restore the software environment in a manual mode, so that the operation is very inconvenient and the efficiency is low.
Disclosure of Invention
In view of the above, an object of the present invention is to provide an os switching method and apparatus to improve the above problem.
In order to achieve the above purpose, the embodiment of the present application adopts the following technical solutions:
in a first aspect, an embodiment of the present application provides an operating system switching method, which is applied to a terminal device, where an operating system VHD file and at least one first differential VHD file created based on the operating system VHD file are prestored in the terminal device; the method comprises the following steps:
receiving a selection instruction, and determining a target first differencing VHD file corresponding to the selection instruction in the at least one first differencing VHD file, wherein the target first differencing VHD file comprises a target application program corresponding to the selection instruction;
judging whether a second differential VHD file established on the basis of the target first differential VHD file exists in the terminal equipment;
when a second differencing VHD file created based on the target first differencing VHD file exists in the terminal device, associating the second differencing VHD file with the boot configuration of the terminal device, enabling the terminal device to boot an operating system from the second differencing VHD file when rebooting, and saving data generated by operations performed on the operating system in the second differencing VHD file.
In a second aspect, an embodiment of the present application provides an operating system switching method, which is applied to a terminal device, where an operating system VHD file and at least one first differencing VHD file created based on the operating system VHD file are prestored in the terminal device; the method comprises the following steps:
receiving a selection instruction, and determining a target first differencing VHD file corresponding to the selection instruction in the at least one first differencing VHD file, wherein the target first differencing VHD file comprises a target application program corresponding to the selection instruction;
searching a second difference VHD file established on the basis of the target first difference VHD file in the terminal equipment, acquiring current user configuration information of the terminal equipment when the second difference VHD file is searched, and judging whether the searched second difference VHD file has the target second difference VHD file storing the user configuration information or not, wherein the user configuration information at least comprises terminal configuration information and/or user identity information;
and when the target second differencing VHD file exists in the searched second differencing VHD files, associating the target second differencing VHD file with the starting configuration of the terminal equipment, starting an operating system from the target second differencing VHD file when the terminal equipment is restarted, and storing data generated by the operation executed on the operating system in the target second differencing VHD file.
In a third aspect, an embodiment of the present application provides an operating system switching method, which is applied to a first terminal device and a second terminal device that are communicatively connected to each other, where at least one operating system VHD file is prestored in the first terminal device, and the method includes:
the method comprises the steps that a first terminal device receives a first selection instruction, determines a target operating system VHD file where an operating system corresponding to the first selection instruction is located, creates a first difference VHD file on the basis of the target operating system VHD file, and writes a preset application program into the first difference VHD file;
the first terminal device prestores the target operating system VHD file and the first difference VHD file to a specified second terminal device;
the second terminal equipment receives a second selection instruction, and determines a target first differential VHD file corresponding to the second selection instruction in prestored first differential VHD files, wherein the target first differential VHD file comprises a target application program corresponding to the second selection instruction;
the second terminal device judges whether a second differencing VHD file created based on the target first differencing VHD file exists, if so, associates the second differencing VHD file with the start configuration of the terminal device, so that the terminal device starts an operating system from the second differencing VHD file when restarting, and saves data generated by an operation executed on the operating system in the second differencing VHD file.
In a fourth aspect, an embodiment of the present application provides an operating system switching apparatus, which is applied to a terminal device, where an operating system VHD file and at least one first differencing VHD file created based on the operating system VHD file are prestored in the terminal device; the device comprises:
a receiving module, configured to receive a selection instruction, and determine a target first differencing VHD file corresponding to the selection instruction from among the at least one first differencing VHD file, where the target first differencing VHD file includes a target application program corresponding to the selection instruction;
a judging module, configured to judge whether a second differencing VHD file created based on the target first differencing VHD file exists in the terminal device;
a first switching module, configured to, when a second differencing VHD file created based on the target first differencing VHD file exists in the terminal device, associate the second differencing VHD file with a start-up configuration of the terminal device, cause the terminal device to start up an operating system from the second differencing VHD file upon restart, and save data resulting from an operation performed on the operating system in the second differencing VHD file.
In a fifth aspect, an embodiment of the present application provides a terminal device, where the terminal device includes:
a memory;
a processor; and
the operating system switching device provided by the embodiment of the application is stored in the memory and is controlled to execute by the processor.
In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed, implements the operating system switching method provided in the first aspect or the second aspect of the embodiment of the present application.
Compared with the prior art, the method has the following beneficial effects:
the embodiment of the application provides an operating system switching method and device and terminal equipment, wherein an operating system VHD file and at least one first difference VHD file based on the operating system VHD file are prestored in the terminal equipment. And the terminal equipment determines a target first difference VHD file corresponding to the selection instruction according to the received selection instruction. The target first differencing VHD file includes a target application corresponding to the selected instruction. The terminal device associates a second differencing VHD file created based on the target first differencing VHD file with a start-up configuration of the terminal device, causes the terminal device to start up an operating system from the second differencing VHD file upon restart, and saves data resulting from operations performed on the operating system in the second differencing VHD file. Therefore, the operation and modification of the target application program by the user are stored in the second difference VHD file, the first difference VHD file and the operation system VHD file of the target cannot be influenced, namely, the target application program can be restored only by deleting the second difference VHD file, and the method is very convenient and fast.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 is a schematic block diagram of a terminal device according to an embodiment of the present disclosure;
fig. 2 is a schematic view of an application scenario of the terminal device shown in fig. 1;
fig. 3 is a schematic flowchart of an operating system switching method according to an embodiment of the present disclosure;
fig. 4 is a schematic flowchart of another operating system switching method according to an embodiment of the present application;
fig. 5 is a functional block diagram of an operating system switching device according to an embodiment of the present disclosure.
Icon: 100-a terminal device; 110-a memory; 120-a processor; 200-operating system switching means; 210-a receiving module; 220-a judgment module; 230-a first switching module; 240-a second switching module; 250-restart module; 260-a connection module; 270-a third switching module; 280-reduction module.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
Referring to fig. 1, fig. 1 is a block schematic diagram of a terminal device 100 according to an embodiment of the present application, where the terminal device 100 may be a Personal Computer (PC), a server, or other similar devices. As shown in fig. 1, the terminal device 100 includes an operating system switching apparatus 200, a memory 110, and a processor 120.
The memory 110 and the processor 120 are electrically connected to each other directly or indirectly to achieve data transmission or interaction. For example, the components may be electrically connected to each other via one or more communication buses or signal lines. The memory 110 includes software functional modules stored in firmware or software (software), and the processor 120 implements corresponding functional applications or data processing by executing the executable modules in the memory 110. For example, the os switching device 200 is stored in the memory 110 and is controlled to be executed by the processor 120.
In addition, the memory 110 stores therein an operating system VHD file and a first differencing VHD file created based on the operating system VHD file. The vhd (virtual Hard disk) file is an abbreviation of microsoft virtual Hard disk file, which is a disk file format. Files in VHD format can be compressed into a single file to be placed on the file system of the host machine. In this embodiment, the operating system VHD file corresponds to a virtual hard disk on which an operating system is packaged. The terminal device 100 can directly start the virtual operating system from the operating system VHD file through the native vhdboot technology.
The first differencing VHD file refers to a differencing disk (also referred to as a "differencing disk") created using the operating system VHD file as a master disk (also referred to as a "parent disk"). In this embodiment, the first differencing VHD file includes a preset application.
When the system disk is restarted with the first differencing VHD file, the terminal device 100 loads the operating system in the master disk (operating system VHD file) of the first differencing VHD file and the data in the first differencing VHD file in sequence.
Therefore, in the case that the first differencing VHD file is created and is not modified, the operating system that is run by the terminal device 100 after the restart with the operating system VHD file as the system disk is consistent with the operating system that is run by the terminal device 100 after the restart with the first differencing VHD file as the system disk. However, when the terminal device 100 restarts using the first differencing VHD file as a system disk, data generated by operations performed on the operating system are all saved in the first differencing VHD file.
In practical applications, users may have different requirements for the operating system, and for this case, a plurality of operating system VHD files may be provided, each of which encapsulates a different operating system. The operating system may be an operating system of the professional version of Windows7 or a version thereof (e.g., Windows8, Windows10, etc.), and of course, the operating system may also be other operating systems capable of supporting VHD files, which is not limited in this embodiment.
In practical applications, there is an association relationship between the applications that the user needs to use, and when the user performs a corresponding operation on one of the applications, the user may affect the other applications, and it is uncertain which applications the user uses. Therefore, different applications can be stored in different first differencing VHD files to avoid interference between the applications.
Therefore, for a plurality of application programs that can run under the same operating system, a plurality of first differencing VHD files can be created using the operating system VHD file in which the operating system is packaged as a master disk, and the plurality of application programs can be stored in the plurality of first differencing VHD files, so that a plurality of first differencing VHD files corresponding to the plurality of application programs one to one can be obtained.
In one embodiment, the terminal device 100 may be a teaching terminal, which is used by a teacher when giving lessons or used by a learner when learning. The application program can be software which needs to be used together with different courses, for example, Office software which needs to be used for Office software teaching, Visual Studio software which needs to be used for programming courses, financial matching software which needs to be used for financial related courses, Photoshop software which needs to be used for multimedia courses, and the like. In this case, each of the first differencing VHD files actually corresponds to a different course, and thus, the first differencing VHD file can be named according to the course to which it corresponds, and thus, the user can search for the corresponding first differencing VHD file by the course name.
Further, when the terminal device 100 is a teaching terminal, a plurality of terminal devices 100 are generally available. For example, as shown in fig. 2, a plurality of terminal devices 100 for teaching in an electronic classroom, wherein the plurality of terminal devices 100 include a terminal device a for learners and at least one terminal device B for lecturers, and the terminal device B can be communicatively connected to the terminal device a through a network. At this time, the operating system VHD file and the first differencing VHD file based on the operating system VHD file may be prestored in the plurality of terminal apparatuses 100 by the following steps.
The method comprises the steps that a first terminal device receives a first selection instruction, determines a target operating system VHD file corresponding to the first selection instruction, creates a first difference VHD file based on the target operating system VHD file, and writes a preset application program into the first difference VHD file;
and the first terminal equipment prestores the target operating system VHD file and the first differencing VHD file to a specified second terminal equipment.
The creating of the first differencing VHD file based on the target operating system VHD file means that the target operating system VHD file is used as a master disk (or a parent disk) to create the first differencing VHD file, and the created first differencing VHD file is a differencing disk of the target operating system VHD file.
The first terminal device is a first terminal device 100 that creates the first differencing VHD file, and may be a terminal device a or a terminal device B shown in fig. 2; the second terminal device is the terminal device 100 that acquires and stores the target operating system VHD file and the first differencing VHD file provided by the first terminal device, and may be the terminal device a or the terminal device B shown in fig. 2. The first selection instruction refers to an instruction which is input by a user on the first terminal device and is used for selecting the operating system.
Optionally, the first terminal device may pre-store the target operating system VHD file and the first differencing VHD file to each second terminal device through the flash system.
In detail, after the first differencing VHD file is created on the first terminal device, the operating system of the first terminal device may be backed up, so as to obtain a system image file of the first terminal device, where the system image file includes the target operating system VHD file and the first differencing VHD file. Then, the obtained System image file is uploaded to a server of the System for flashing, each second terminal device enters a BIOS (Basic Input Output System) when being started, and the System image file is downloaded from the server of the System for flashing and installed, so that the target operating System VHD file and the first differential VHD file in the System image file can be obtained.
It should be understood that the structure shown in fig. 1 is only an illustration, and the terminal device 100 may further include more or fewer components than those shown in fig. 1, for example, the terminal device 100 may further include a display unit and a communication unit, where the display unit is used for establishing an interactive interface between the terminal device 100 and a user, or for displaying information to be displayed. The communication unit is used to establish a communication connection with an external terminal (e.g., other terminal device 100). Of course, the terminal device 100 may also have a different configuration from that shown in fig. 1. It should be noted that, the components shown in fig. 1 may be implemented by hardware, software or a combination thereof, and are not limited herein.
Please refer to fig. 3, which is a flowchart illustrating an os switching method according to an embodiment of the present application, where the os switching method is applied to the terminal device 100 shown in fig. 1. The specific steps of the method are described in detail below with reference to fig. 3.
Step S301, receiving a selection instruction, and determining a target first differencing VHD file corresponding to the selection instruction from the at least one first differencing VHD file, where the target first differencing VHD file includes a target application corresponding to the selection instruction.
The terminal device 100 stores an operating system VHD file and at least one first differencing VHD file created based on the operating system VHD file in advance. A target first differencing VHD file, meaning: the terminal device 100 pre-stores a first differencing VHD file corresponding to the received selection instruction in at least one first differencing VHD file.
When a plurality of first differencing VHD files are prestored in the terminal device 100, each first differencing VHD file includes a different application program. The target application program is an application program corresponding to the received selection instruction.
In one embodiment, the selection instruction may be a selection instruction input by the user on the terminal device 100 for selecting an application, where the selection instruction includes identification information of the application (i.e., the target application) selected by the user, such as an application name.
When the terminal device 100 is a teaching terminal, the application included in the different first differencing VHD file is an application necessary for a different course, that is, the different first differencing VHD file corresponds to a different course. Thus, each first differencing VHD file can be named according to its corresponding course. In this case, the selection instruction may be course information input by the user, so that the terminal device 100 may determine the corresponding first differencing VHD file according to the course information, i.e., the first differencing VHD file corresponding to the selection instruction.
In another embodiment, the selecting instruction may be a selecting instruction sent by other terminal devices 100.
For example, when the terminal device 100 is used by a learner in a teaching process, the terminal device 100 corresponds to the terminal device a shown in fig. 2, the selection instruction may be course information sent by the terminal device B, and based on the course information, the terminal device a may determine a target first variance VHD file corresponding to the course information from at least one first variance VHD file stored in advance. In detail, the terminal device a may find, from at least one first differencing VHD file stored in advance, a first differencing VHD file storing a course application (i.e., a target application) corresponding to the course information as the target first differencing VHD file.
Step S302, determining whether a second differencing VHD file created based on the target first differencing VHD file exists in the terminal device 100. If yes, go to step S303. If not, step S304 may be performed.
In the prior art, the operation is usually directly performed on the target application installed in the operating system, so that all the operations of the user are retained on the current target application, thereby affecting the use of other users. If the recovery is required, the recovery can be only realized manually, but the manual mode has low efficiency and is very easy to make mistakes.
Therefore, in the embodiment of the present application, a second differencing VHD file is created on the basis of a target first differencing VHD file including a target application, and the target application is used in an operating system corresponding to the created second differencing VHD file.
The second differencing VHD file is created using the target first differencing VHD file as a master, and when the terminal device 100 restarts using the second differencing VHD file as a system disk, an operating system is loaded from the target first differencing VHD file, and then data in the second differencing VHD file is loaded. In the case where the second differencing VHD file is created and not modified, no content is stored thereon, so the operating system launched from the second differencing VHD file at this time is consistent with the operating system launched from the target first differencing VHD file. However, after the operating system is started from the second differencing VHD file, all operations and modifications on the current operating system are retained in the second differencing VHD file without affecting the target first differencing VHD file.
Therefore, the restoration of the target first differencing VHD file can be achieved only by deleting the second differencing VHD file when it is no longer in use.
After determining the target first differencing VHD file, whether a second differencing VHD file to be used as a system boot disk needs to be created may be determined in different ways depending on application scenarios.
In one case, since the storage space of the terminal device 100 is limited, it is simultaneously available to only one user for each different application or for each different course. In this case, when the terminal device 100 receives a selection instruction, only one second differencing VHD file may be available for the target first differencing VHD file corresponding to the selection instruction. In this embodiment, a second differencing VHD file created based on the target first differencing VHD file needs to be used as a system boot disk.
Therefore, after determining the target first differencing VHD file corresponding to the received selecting instruction, the terminal device 100 may determine whether it is necessary to create a corresponding second differencing VHD file directly according to whether there is a second differencing VHD file created based on the target first differencing VHD file through step S302.
Step S303, associating the second differencing VHD file with the boot configuration of the terminal device 100, so that the terminal device 100 boots an operating system from the second differencing VHD file when rebooting, and saves data generated by an operation performed on the operating system in the second differencing VHD file.
When a second differencing VHD file created on the basis of the target first differencing VHD file (master) exists in the terminal device 100, the second differencing VHD file is directly associated with the boot configuration of the terminal device 100, that is, the second differencing VHD file is directly set as a system boot disk.
In detail, the Boot Configuration Data (BCD) of the terminal device 100 includes a system Boot list, and in a normal case, a system Boot item of a native operating system of the terminal device 100 is set in the system Boot list, and the system Boot item of the native operating system is usually a default Boot item. The native operating system refers to an operating system that is pre-installed on a physical disk of the terminal device 100.
In this embodiment, when the second differencing VHD file created using the target first differencing VHD file as the master exists in the terminal device 100, a system startup item may be newly created in the system startup list as a system startup item of the second differencing VHD file, and the system startup item may be set as a default startup item. Thus, after the terminal device 100 is restarted, the operating system corresponding to the second differencing VHD file can be entered. In detail, when the terminal device 100 is restarted, it is started with the operating system in the master of the second differencing VHD file, but data resulting from operations performed on the restarted operating system is stored in the second differencing VHD file. Accordingly, modifications and operations to the target application are stored in the second differencing VHD file.
Optionally, the operating system switching method may further include step S304.
Step S304 is to create a second differencing VHD file, and associate the created second differencing VHD with the start-up configuration of the terminal device 100.
Wherein the second differencing VHD file created with the target first differencing VHD file as a master is absent in the terminal device 100 in the following cases:
first, a user uses a target application on the terminal device 100 for the first time, and thus does not create a second differencing VHD file taking the target first differencing VHD file as a master;
secondly, the user performs a restore operation after using the target application program on the terminal device 100 last time, that is, the second differencing VHD file created by the user before and using the target first differencing VHD file as the master disk is already deleted.
When the two situations occur, the terminal device 100 creates a second differencing VHD file using the target first differencing VHD file as a master disk, and then sets the created second differencing VHD file as a system boot disk, so that the terminal device 100 runs an operating system corresponding to the second differencing VHD file after being restarted.
When the terminal device 100 is used by a user in a teaching process, the terminal device 100 needs to communicate with other terminal devices 100 (hereinafter referred to as "peer devices"), such as an application scenario shown in fig. 2, and a terminal device a and a terminal device B need to be connected to each other for communication. The terminal device 100 may communicate with a client in the peer device through the client, and the terminal device 100 may also communicate with a browser in the peer device through the browser. At this time, the terminal device 100 needs to obtain current user configuration information to notify the identity of the peer device, so as to establish a communication connection with the peer device. Correspondingly, the target application program further comprises the client or the browser.
The user configuration information at least may include terminal configuration information and/or user identity information, where the terminal configuration information refers to basic configuration information required for the terminal device 100 to communicate with the other terminal devices 100, and may include identification information (e.g., number information, identification code, etc.) of the terminal device 100, and the terminal configuration information may be determined according to an actual situation; the user identity information may include an identity (e.g., an identity number, a user name, etc.) of the user and password information corresponding to the identity.
In a specific embodiment, after the operating system corresponding to the second differencing VHD file is started, the user may re-input the user configuration information on a web page in the client or browser therein.
In another specific embodiment, before the step of associating the created second differencing VHD file with the start-up configuration of the terminal device 100 in step S304 is performed, the operating system switching method may further include the steps of:
acquiring current user configuration information of the terminal device 100, and writing the user configuration information into the created second differencing VHD file.
The user configuration information includes basic configuration information required for operating a corresponding client or browser and current user identity information, where the user identity information may specifically include a user name of a current user and a password corresponding to the user name. Alternatively, when in a one-to-many teaching scenario, for example, in the case of one lecturer with multiple learners, the multiple learners may be generally numbered by class or classroom, and accordingly, the user identity information may further include classroom numbers.
Alternatively, the user configuration information may be written to a preset location of the created second differencing VHD file, for example, a user _ data folder or the like. In this way, the terminal device 100 is convenient to acquire the user configuration information after starting the created second differencing VHD file as a system disk.
Through the above process, after the terminal device 100 starts up with the second differencing VHD file as the system disk, it is able to run the corresponding client (or browser) through the user configuration information stored in the second differencing VHD file, and further establish a communication connection with the client (or browser) of the peer device.
Regarding the manner of determining whether or not it is necessary to create the second differencing VHD file serving as the system-booted disk, in another case, when the storage space of the terminal device 100 is sufficient, it is available to a plurality of users at the same time for each different application or for each different course. In this case, when the terminal device 100 receives a selection instruction, the target first differencing VHD file corresponding to the selection instruction may have a plurality of second differencing VHD files. At this time, the plurality of second differencing VHD files need to be distinguished. In detail, the terminal device 100 may determine whether the corresponding second differencing VHD file needs to be created through step S402 shown in fig. 4, which is described in detail below.
Step S402, searching for a second differential VHD file created based on the target first differential VHD file in the terminal device 100, acquiring current user configuration information of the terminal device 100 when the second differential VHD file is found, and determining whether the target second differential VHD file storing the user configuration information exists in the searched second differential VHD file. If yes, go to step S403; if not, step S404 may be performed.
Wherein the target second differencing VHD file is one of the found second differencing VHD files, which means: and storing the second differencing VHD file of the user configuration information in a second differencing VHD file created by taking the target first differencing VHD file as a master disk.
Step S403, associating the target second differencing VHD file with the boot configuration of the terminal device 100, so that the terminal device 100 boots an operating system from the target second differencing VHD file when rebooting, and saves data generated by an operation performed on the operating system in the target second differencing VHD file.
When the target second differencing VHD file exists in the terminal device 100, the terminal device 100 sets the target second differencing VHD file as a system boot disk.
Further, in an actual application, the target second differencing VHD file may not exist in the terminal device 100, and at this time, step S404 shown in fig. 4 may be performed.
Step S404 of creating a second differencing VHD file based on the target first differencing VHD file, and storing the user configuration information in the created second differencing VHD file, thereby obtaining the target second differencing VHD file; associating the target second differencing VHD file with a start-up configuration of the terminal device 100.
In this way, each second differencing VHD file includes user configuration information of a corresponding user, and when a selection instruction is received, the identity of the current user can be determined according to the current user configuration information of the terminal device 100, and then the second differencing VHD file corresponding to the current user is determined to be used as a target second differencing VHD file, so that a plurality of users can be supported to use different target application programs on the terminal device 100 without interfering with each other.
Optionally, after associating the second differencing VHD file with the start-up configuration of the terminal device 100, that is, after performing any one of step S303, step S304, step S403, and step S404, the operating system switching method may further include the steps of:
restarting the terminal device 100;
after the terminal device 100 is restarted, the user configuration information stored in the current system disk is acquired, and a communication connection is established with an external terminal through the user configuration information.
Therefore, the lecturer can manage the client side (or the service on the browser) of the learner, and the course can be smoothly carried out.
Alternatively, when the user no longer uses the target application or after a lesson, it is often necessary to revert back to the native operating system. Therefore, after restarting the terminal device 100, the operating system switching method may further include the steps of:
the native operating system of the terminal device 100 is set as the default boot system.
The native os is an os installed on a physical disk of the terminal device 100, and each os started from the VHD file is actually an os installed on a VHD file in a physical disk of the terminal device 100 and belongs to a virtual os. In implementation, the system startup item of each VHD file in the system startup list of the terminal device 100 may be deleted, and then the system startup item of the native operating system may be set as a default startup item, so that the native operating system of the terminal device 100 is set as a default startup system.
Thus, after the user finishes using the target application program or takes a class, the user can directly restart the terminal device 100, and then return to the native operating system.
In order to facilitate the use of the user later, the operating system switching method may further include the steps of:
and after the native operating system is started, receiving a reduction instruction, and deleting a second difference VHD file corresponding to the reduction instruction.
The restore instruction refers to an instruction for deleting the second differencing VHD file, and the restore instruction may include the following two types:
first, when the terminal device 100 detects an operation of deleting a specified second differencing VHD file by a user, a deletion instruction (restore instruction) for deleting the specified second differencing VHD file may be generated.
Secondly, when the terminal device 100 is a terminal for teaching, when the terminal device 100 creates each second differencing VHD file, the attribute information of the course corresponding to the second differencing VHD file may be recorded, for example, the number of classes that need to be used for the course, and when the number of classes that need to be used for the course is multiple, the reduction needs to be performed. In this way, the terminal device 100 may determine whether the second differencing VHD file needs to be deleted according to the attribute of the course corresponding to each second differencing VHD file, and generate a restoring instruction corresponding to the second differencing VHD file when deletion is required.
Referring to fig. 5, an operating system switching apparatus 200 applied to the terminal device 100 shown in fig. 1 according to an embodiment of the present application is provided. The os switching device 200 includes a receiving module 210, a determining module 220, and a first switching module 230.
The receiving module 210 is configured to receive a selection instruction, and determine a target first differencing VHD file corresponding to the selection instruction from among the at least one first differencing VHD file, where the target first differencing VHD file includes a target application corresponding to the selection instruction.
In the present embodiment, the description of the receiving module 210 may refer to the detailed description of step S301 shown in fig. 3, that is, step S301 may be executed by the receiving module 210.
The determining module 220 is configured to determine whether a second differencing VHD file created based on the target first differencing VHD file exists in the terminal device 100.
In the present embodiment, the description of the determining module 220 may refer to the detailed description of step S302 shown in fig. 3, that is, step S302 may be executed by the determining module 220.
The first switching module 230 is configured to, when a second differencing VHD file created based on the target first differencing VHD file exists in the terminal device 100, associate the second differencing VHD file with the boot configuration of the terminal device 100, cause the terminal device 100 to boot an operating system from the second differencing VHD file upon reboot, and save data resulting from an operation performed on the operating system in the second differencing VHD file.
In the present embodiment, the description about the first switching module 230 may refer to the detailed description of step S303 shown in fig. 3, that is, step S303 may be performed by the first switching module 230.
Optionally, the operating system switching apparatus 200 may further include a second switching module 240.
The second switching module 240 is configured to create a second differencing VHD file when a second differencing VHD file created based on the target first differencing VHD file does not exist in the terminal device 100, and associate the created second differencing VHD file with the start-up configuration of the terminal device 100.
In this embodiment, the description of the second switching module 240 may specifically refer to the detailed description of step S304 shown in fig. 3, that is, step S304 may be performed by the second switching module 240.
Optionally, the second switching module 240 may be further configured to obtain current user configuration information of the terminal device 100 before associating the created second differencing VHD file with the start-up configuration of the terminal device 100, and write the user configuration information into the created second differencing VHD file.
Wherein the user configuration information at least includes terminal configuration information and/or user identity information.
Optionally, the os switching apparatus 200 may further include a restart module 250 and a connection module 260.
The restart module 250 serves to restart the terminal device 100 after the first switching module 230 or the second switching module 240 associates the second differencing VHD file with the start-up configuration of the terminal device 100.
The connection module 260 is configured to obtain the user configuration information stored in the current system disk after the terminal device 100 is restarted, and establish a communication connection with the external terminal through the user configuration information.
In this embodiment, for the description of the restart module 250 and the connection module 260, reference may be made to the detailed description of the relevant steps in the foregoing, and details are not repeated here.
Optionally, the operating system switching apparatus 200 may further include a third switching module 270.
The third switching module 270 is configured to set the native operating system of the terminal device 100 as a default boot system after the restart module 250 restarts the terminal device 100.
Optionally, the os switching apparatus 200 may further include a restoring module 280.
The restoring module 280 is configured to receive a restoring instruction after the native operating system is started, and delete the second differencing VHD file corresponding to the restoring instruction.
In the present embodiment, the detailed description of the third switching module 270 and the restoring module 280 can refer to the above-mentioned detailed description of the related steps.
The embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, where the computer program is used to implement the operating system switching method provided by the embodiment of the present application when executed.
In summary, the present embodiment provides an operating system switching method, an operating system switching apparatus, and a terminal device 100. The terminal device 100 determines, according to the received selection instruction, a target first differencing VHD file corresponding to the selection instruction, where the target first differencing VHD file includes a target application corresponding to the selection instruction. The terminal device 100 associates a second differencing VHD file created on the basis of the target first differencing VHD file with the start-up configuration of the terminal device 100, starts the operating system from the second differencing VHD file when the terminal device 100 is restarted, and saves data resulting from an operation performed on the operating system in the second differencing VHD file. Therefore, the operation and modification of the target application program by the user are stored in the second difference VHD file, the first difference VHD file and the operation system VHD file of the target cannot be influenced, namely, the target application program can be restored only by deleting the second difference VHD file, and the method is very convenient and fast.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus and method embodiments described above are illustrative only, as the flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, an electronic device, or the like) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (12)

1. An operating system switching method is applied to a terminal device, wherein an operating system VHD file and at least one first differencing VHD file created based on the operating system VHD file are prestored in the terminal device; the method comprises the following steps:
receiving a selection instruction, and determining a target first differencing VHD file corresponding to the selection instruction in the at least one first differencing VHD file, wherein the target first differencing VHD file comprises a target application program corresponding to the selection instruction;
judging whether a second differential VHD file established on the basis of the target first differential VHD file exists in the terminal equipment;
when a second differencing VHD file created based on the target first differencing VHD file exists in the terminal device, associating the second differencing VHD file with the boot configuration of the terminal device, enabling the terminal device to use the second differencing VHD file as a system disk when rebooting, loading an operating system from the target first differencing VHD file, loading data in the second differencing VHD file, and saving data generated by operations executed on the operating system in the second differencing VHD file.
2. The method of claim 1, further comprising:
when a second differencing VHD file created based on the target first differencing VHD file does not exist in the terminal device, creating a second differencing VHD file, and associating the created second differencing VHD file with the start-up configuration of the terminal device.
3. The method of claim 2, wherein prior to associating the created second differencing VHD file with the boot configuration of the terminal device, the method further comprises:
acquiring current user configuration information of the terminal equipment, and writing the user configuration information into the created second difference VHD file, wherein the user configuration information at least comprises terminal configuration information and/or user identity information;
after associating the second differencing VHD file with the start-up configuration of the terminal device, the method further comprises:
restarting the terminal equipment;
and after the terminal equipment is restarted, acquiring user configuration information stored in the current system disk, and establishing communication connection with an external terminal through the user configuration information.
4. The method of claim 3, wherein after restarting the terminal device, the method further comprises:
and setting a native operating system of the terminal equipment as a default starting system.
5. The method of claim 4, further comprising:
and after the native operating system is started, receiving a reduction instruction, and deleting a second difference VHD file corresponding to the reduction instruction.
6. An operating system switching method is applied to a terminal device, wherein an operating system VHD file and at least one first differencing VHD file created based on the operating system VHD file are prestored in the terminal device; the method comprises the following steps:
receiving a selection instruction, and determining a target first differencing VHD file corresponding to the selection instruction in the at least one first differencing VHD file, wherein the target first differencing VHD file comprises a target application program corresponding to the selection instruction;
searching a second difference VHD file created on the basis of the target first difference VHD file in the terminal equipment, acquiring current user configuration information of the terminal equipment when the second difference VHD file is searched, and judging whether the searched second difference VHD file has the target second difference VHD file storing the user configuration information or not, wherein the user configuration information at least comprises terminal configuration information and/or user identity information;
and when the target second differencing VHD file exists in the searched second differencing VHD file, associating the target second differencing VHD file with the starting configuration of the terminal equipment, so that the terminal equipment uses the target second differencing VHD file as a system disk when being restarted, loading an operating system from the target first differencing VHD file, loading data in the target second differencing VHD file, and storing data generated by operation executed on the operating system in the target second differencing VHD file.
7. An operating system switching method is applied to a first terminal device and a second terminal device which are in communication connection with each other, wherein at least one operating system VHD file is prestored in the first terminal device, and the method comprises the following steps:
the method comprises the steps that a first terminal device receives a first selection instruction, determines a target operating system VHD file corresponding to the first selection instruction, creates a first difference VHD file based on the target operating system VHD file, and writes a preset application program into the first difference VHD file;
the first terminal device prestores the target operating system VHD file and the first difference VHD file to a specified second terminal device;
the second terminal equipment receives a second selection instruction, and determines a target first differential VHD file corresponding to the second selection instruction in prestored first differential VHD files, wherein the target first differential VHD file comprises a target application program corresponding to the second selection instruction;
the second terminal device judges whether a second differential VHD file created based on the target first differential VHD file exists, if so, associates the second differential VHD file with the start-up configuration of the terminal device, enables the terminal device to use the second differential VHD file as a system disk when restarting, loads an operating system from the target first differential VHD file, loads data in the second differential VHD file, and saves data generated by an operation executed on the operating system in the second differential VHD file.
8. An operating system switching device is applied to a terminal device, wherein an operating system VHD file and at least one first differencing VHD file created based on the operating system VHD file are prestored in the terminal device; the device comprises:
a receiving module, configured to receive a selection instruction, and determine a target first differencing VHD file corresponding to the selection instruction from among the at least one first differencing VHD file, where the target first differencing VHD file includes a target application program corresponding to the selection instruction;
a judging module, configured to judge whether a second differencing VHD file created based on the target first differencing VHD file exists in the terminal device;
a first switching module, configured to, when a second differencing VHD file created based on the target first differencing VHD file exists in the terminal device, associate the second differencing VHD file with a boot configuration of the terminal device, make the terminal device use the second differencing VHD file as a system disk when rebooting, load an operating system from the target first differencing VHD file, load data in the second differencing VHD file, and save data generated by an operation performed on the operating system in the second differencing VHD file.
9. The apparatus of claim 8, further comprising:
a second switching module, configured to create a second differencing VHD file when a second differencing VHD file created based on the target first differencing VHD file does not exist in the terminal device, and associate the created second differencing VHD file with the start-up configuration of the terminal device.
10. The apparatus of claim 9,
the second switching module is further configured to, before associating the created second differencing VHD file with the start configuration of the terminal device, obtain current user configuration information of the terminal device, and write the user configuration information into the created second differencing VHD file, where the user configuration information at least includes terminal configuration information and/or user identity information;
the device further comprises:
a restart module for restarting the terminal device after the first or second handover module associates a second differencing VHD file with a start configuration of the terminal device;
and the connection module is used for acquiring the user configuration information stored in the current system disk after the terminal equipment is restarted, and establishing communication connection with an external terminal through the user configuration information.
11. The apparatus of claim 10, further comprising:
and the third switching module is used for setting the native operating system of the terminal equipment as a default starting system after the restarting module restarts the terminal equipment.
12. The apparatus of claim 11, further comprising:
and the restoration module is used for receiving a restoration instruction and deleting a second difference VHD file corresponding to the restoration instruction after the native operating system is started.
CN201810019373.1A 2018-01-09 2018-01-09 Operating system switching method and device Active CN108196896B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810019373.1A CN108196896B (en) 2018-01-09 2018-01-09 Operating system switching method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810019373.1A CN108196896B (en) 2018-01-09 2018-01-09 Operating system switching method and device

Publications (2)

Publication Number Publication Date
CN108196896A CN108196896A (en) 2018-06-22
CN108196896B true CN108196896B (en) 2021-07-06

Family

ID=62588898

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810019373.1A Active CN108196896B (en) 2018-01-09 2018-01-09 Operating system switching method and device

Country Status (1)

Country Link
CN (1) CN108196896B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102567142A (en) * 2010-12-15 2012-07-11 微软公司 System reset and system restore
CN102597983A (en) * 2009-10-30 2012-07-18 微软公司 Backup using metadata virtual hard drive and differential virtual hard drive
CN103729203A (en) * 2012-10-12 2014-04-16 英业达科技有限公司 System and method for reconstructing differencing virtual hard disk file to update operating systems
CN103810012A (en) * 2008-10-24 2014-05-21 思杰系统有限公司 Methods And Systems For Providing A Modifiable Machine Base Image With A Personalized Desktop Environment In A Combined Computing Environment
US20140181815A1 (en) * 2012-12-26 2014-06-26 Hon Hai Precision Industry Co., Ltd. Computing device and method for installing computer programs in virtual machines
CN104508630A (en) * 2012-07-26 2015-04-08 微软公司 System updates from cloud Blob storage using VHD differentials
CN106802840A (en) * 2017-01-19 2017-06-06 郑州云海信息技术有限公司 A kind of virtual machine backup, restoration methods and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120054743A1 (en) * 2010-08-31 2012-03-01 Yuji Fujiwara Information Processing Apparatus and Client Management Method

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103810012A (en) * 2008-10-24 2014-05-21 思杰系统有限公司 Methods And Systems For Providing A Modifiable Machine Base Image With A Personalized Desktop Environment In A Combined Computing Environment
CN102597983A (en) * 2009-10-30 2012-07-18 微软公司 Backup using metadata virtual hard drive and differential virtual hard drive
CN102567142A (en) * 2010-12-15 2012-07-11 微软公司 System reset and system restore
CN104508630A (en) * 2012-07-26 2015-04-08 微软公司 System updates from cloud Blob storage using VHD differentials
CN103729203A (en) * 2012-10-12 2014-04-16 英业达科技有限公司 System and method for reconstructing differencing virtual hard disk file to update operating systems
US20140181815A1 (en) * 2012-12-26 2014-06-26 Hon Hai Precision Industry Co., Ltd. Computing device and method for installing computer programs in virtual machines
CN106802840A (en) * 2017-01-19 2017-06-06 郑州云海信息技术有限公司 A kind of virtual machine backup, restoration methods and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"Virtual PC在计算机教学的应用";徐志良;《科技经济市场》;20090515(第5期);第151-152页 *

Also Published As

Publication number Publication date
CN108196896A (en) 2018-06-22

Similar Documents

Publication Publication Date Title
US10242045B2 (en) Filtering content using synchronization data
US8738883B2 (en) Snapshot creation from block lists
US20020174206A1 (en) Web-based file manipulating system
US9804832B2 (en) Method, apparatus, and communication device for updating firmware
US9864736B2 (en) Information processing apparatus, control method, and recording medium
JP7346606B2 (en) Screen sharing processing method, device, equipment and storage medium
US9384098B1 (en) Portable data archiving device
CN108241550B (en) Backup and restoration method for operating system
US9983791B2 (en) System management controller and method of configuration file backup and recovery
WO2007005087A2 (en) User customized portable desktop
WO2020063780A1 (en) Application layout restoration method and apparatus, device and storage medium
EP3113018A1 (en) Method and apparatus for running version file
US9965299B2 (en) Information processing apparatus, method for controlling the same, and storage medium
CN116048644B (en) System migration method, device and readable storage medium
CN111433747B (en) Virtual memory for loading operating systems
US8316361B2 (en) Method of enabling a user to update one or more low-level resources of a computer system in a user-friendly manner
CN103530144A (en) Method for generating virtual machine images from legacy system
CN109144657B (en) Method and device for sharing files across operating system platforms
CN108196896B (en) Operating system switching method and device
US10484571B2 (en) Multifunction device, reboot method, and non-transitory recording medium storing computer readable program
CN108509252B (en) Virtual machine starting device and method and host
WO2017096889A1 (en) Method and device for upgrading and downgrading system
CN108259613B (en) Disaster recovery data online synchronization device, method and computer readable storage medium
CN113051376A (en) Information processing apparatus, recording medium, and information processing method
Guide android

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant