Operating system switching method and device, electronic equipment, medium and program product

By adjusting the boot order and creating a shared storage space, the problems of cumbersome operating system switching and resource waste were solved, enabling convenient and efficient system switching and hardware sharing.

CN121807386APending Publication Date: 2026-04-07NEW H3C INTELLIGENCE TERMINAL CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-03
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

Existing operating system switching methods are cumbersome and lack inter-system compatibility, leading to resource waste and incompatibility of hardware.

Method used

By receiving system switching instructions in the terminal device, adjusting the boot order list, placing the target operating system's boot entry first, and starting the operating system after reboot, a shared configuration file for public storage space is created to reduce redundant settings.

Benefits of technology

It enables convenient operating system switching, reduces learning costs and resource waste, and improves the interoperability and hardware commonality between systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121807386A_ABST
    Figure CN121807386A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, and discloses an operating system switching method and device, electronic equipment, a medium and a program product, under the condition that a first operating system runs currently, a system switching instruction used for switching the operating system to a second operating system is received; obtaining a current booting sequence list, and adjusting a booting sequence according to the system switching instruction; and restarting the terminal equipment so as to start the second operating system according to the adjusted boot sequence. According to the operating system switching method provided by the invention, different operating systems can be switched, the problem that the operating systems need to be switched by entering a BIOS (Basic Input / Output System) is solved, the convenience is improved, and the learning cost is reduced. Besides, a plurality of operating systems are installed in the same terminal device and switched, so that switching of the operating systems is realized without using a mode of switching different input sources by a plurality of terminal devices, and waste of computing resources and energy is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and more specifically to operating system switching methods, devices, electronic devices, media, and program products. Background Technology

[0002] With the development of smart devices, more and more electronic devices, such as laptops and cloud-based products, can simultaneously install two operating systems. For example, two operating systems can be installed on a single hard drive, sharing all the device's hardware resources. They can also install two operating systems of the same type but different versions. However, in these technologies, switching between dual systems requires restarting the system and pressing the corresponding key to enter the boot menu in the BIOS (Basic Input Output System), and then selecting the corresponding system. Similarly, when installing two operating systems of the same type but different versions, a restart and selection of the desired system are also required to correctly boot into the user's desired system.

[0003] Such switching methods are cumbersome and lack interoperability between different systems, failing to reflect the overall characteristics of the device and requiring repetitive setup operations across different systems. Some related technologies allow installing two systems on different hardware, switching between dual systems by changing different input sources, with both systems constantly running. However, this solution cannot share hardware between different systems, and since both systems are always running, even when one is not in use, it wastes resources. Summary of the Invention

[0004] This invention provides an operating system switching method, device, electronic device, medium, and program product to solve the problems of cumbersome operation of switching methods in related technologies, lack of correlation between different systems, inability to reflect the overall attributes of the device, and waste of resources by switching different input sources when switching between dual systems.

[0005] In a first aspect, the present invention provides an operating system switching method, applied to a terminal device, wherein at least two operating systems are installed in the terminal device, including: While the first operating system is currently running, receive a system switching instruction to switch the operating system to the second operating system; Obtain the current boot order list; the boot order list includes boot entries corresponding to the operating system. According to the system switching instruction, the boot entry corresponding to the second operating system is adjusted to the first position in the boot order list; The terminal device is restarted to start the second operating system according to the adjusted boot order.

[0006] The operating system switching method provided in this embodiment allows switching between different systems, solving the problem of needing to enter the BIOS to switch in related technologies, thus improving convenience and reducing learning costs. Furthermore, since multiple operating systems are installed and switched on the same terminal device, there is no need for multiple terminal devices to switch operating systems using different input sources, reducing the waste of computing resources and energy, and solving the problem of not being able to share hardware between different systems in related technologies.

[0007] In some optional implementations, adjusting the boot entry corresponding to the second operating system to the first position in the boot order list according to the system switching instruction includes: The boot order list is parsed to obtain the boot descriptor corresponding to each boot item in the boot order list; Each boot descriptor is parsed to determine the description string corresponding to each boot entry; The target boot entry corresponding to the second operating system is determined based on the description string corresponding to each boot entry; Move the target guide to the first position in the guide order list.

[0008] In some optional implementations, adjusting the target guide item to the first position in the guide order list includes: Delete the target boot entry corresponding to the second operating system from the boot order list to obtain the intermediate order list; Add the target guide item to the first position in the intermediate order list to obtain the adjusted guide order list.

[0009] In some optional implementations, obtaining the current boot order list includes: The boot order management tool is used to obtain all the boot items in the boot order, resulting in a boot order list containing each boot item.

[0010] In some optional implementations, the method further includes: Create a shared storage space for the first operating system and the second operating system; Upon receiving a system switch command, a corresponding configuration file is generated based on the current configuration parameters of the terminal device and stored in the public storage space; the configuration file includes configuration parameters that need to remain consistent after switching operating systems; After the second operating system is started, the terminal device is configured with parameters according to the configuration file in the public storage space.

[0011] In some optional implementations, the method further includes: If the drive letter corresponding to the public storage space is not hidden or deleted, hide or delete the drive letter corresponding to the public storage space in the file manager.

[0012] In some optional implementations, configuring the terminal device with parameters according to the configuration file in the public storage space includes: If the drive letter corresponding to the public storage space is hidden or deleted, a drive letter is allocated and displayed for the public storage space; Configure the parameters according to the configuration file in the public storage space.

[0013] In some alternative implementations, before receiving the system switching command from the user, the method further includes: In response to a switching operation triggered by a preset key, a system switching interface is displayed in the graphical user interface; the system switching interface includes identifiers corresponding to each operating system. In response to the selection operation of the operating system in the system switching interface, the selected operating system is used as the second operating system, and the system switching instruction is generated.

[0014] In a second aspect, the present invention provides an operating system switching device, applied to a terminal device, wherein at least two operating systems are installed in the terminal device, the device comprising: The instruction receiving module is used to receive system switching instructions for switching the operating system to the second operating system when the first operating system is currently running. The list retrieval module is used to retrieve the current boot order list, which includes the boot entries corresponding to the operating system.

[0015] The list adjustment module is used to adjust the boot entry corresponding to the second operating system to the first position in the boot order list according to the system switching command.

[0016] A restart module is used to restart the terminal device to start the second operating system according to the adjusted boot order.

[0017] Thirdly, the present invention provides an electronic device, comprising: a memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the computer instructions to perform the operating system switching method of the first aspect or any corresponding embodiment described above.

[0018] Fourthly, the present invention provides a computer-readable storage medium storing computer instructions for causing a terminal device to execute the operating system switching method of the first aspect or any corresponding embodiment thereof.

[0019] Fifthly, the present invention provides a computer program product, including computer instructions, which are used to cause a terminal device to execute the operating system switching method of the first aspect or any corresponding embodiment thereof. Attached Figure Description

[0020] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0021] Figure 1 This is a schematic diagram of an application scenario according to an embodiment of the present invention; Figure 2 This is a flowchart illustrating the first type of operating system switching method according to an embodiment of the present invention; Figure 3 This is a schematic diagram of a second type of operating system switching method according to an embodiment of the present invention; Figure 4 This is a system switching flowchart under a Windows operating system according to an embodiment of the present invention; Figure 5 This is a flowchart illustrating the activation process of a configuration file according to an embodiment of the present invention; Figure 6 This is a structural block diagram of an operating system switching device according to an embodiment of the present invention; Figure 7 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present invention. Detailed Implementation

[0022] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0023] It is understood that before using the technical solutions disclosed in the various embodiments of the present invention, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in the present invention and their authorization should be obtained in accordance with relevant laws and regulations through appropriate means.

[0024] The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.

[0025] As an optional application scenario of this invention, such as Figure 1 As shown, application 101 is installed in terminal device 110, and user 130 can interact with application 101 through terminal device 110 and / or access device of terminal device 110.

[0026] For example, application 101 can be any application that provides system switching services. Figure 1 In the application scenario shown, if application 101 is active, the terminal device 110 can display the interface 102 of application 101. The interface 102 may include various pages that application 101 can provide, such as interactive pages.

[0027] Terminal device 110 may be a mobile terminal, a fixed terminal, or a portable terminal, etc., including but not limited to desktop computers, laptop computers, multimedia tablets, or any combination thereof, including accessories and peripherals of these devices or any combination thereof. In some embodiments, terminal device 110 may also support any type of interface.

[0028] It should be noted that, Figure 1 This is merely an example of an application scenario and does not limit the scope of protection of this invention.

[0029] The embodiments of the present invention will now be described with reference to the accompanying drawings. It should be understood that the pages shown in the drawings are merely examples, and various page designs are possible in practice. The various graphic elements on the page may have different arrangements and different visual representations, one or more elements may be omitted or replaced, and one or more other elements may also be present; no limitations are imposed in the embodiments of the present invention. Furthermore, the embodiments described below primarily pertain to the terminal device 110.

[0030] This invention provides an operating system switching method that directly displays a graphical user interface for switching operating systems to the user by listening for hotkeys in the operating system. This allows users to quickly switch operating systems without entering the BIOS, solving the problem of complex operating system switching processes in related technologies. Furthermore, storing common data in a shared storage space allows for the sharing of common attributes, resolving the issue of needing to perform repetitive setting operations across different systems.

[0031] According to an embodiment of the present invention, an embodiment of an operating system switching method is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0032] This embodiment provides an operating system switching method, which can be used in the aforementioned terminal devices, such as desktop computers, portable computers, tablet computers, etc. Figure 2 This is a flowchart of an operating system switching method according to an embodiment of the present invention, such as... Figure 2 As shown, the process includes the following steps: Step S201: If the first operating system is currently running, receive a system switching instruction for switching the operating system to the second operating system.

[0033] It is understood that the computer or other terminal device to which this embodiment is applied needs to have at least two operating systems installed; otherwise, switching between operating systems is not possible with a single operating system. For ease of description, the operating system currently running on the terminal device will be referred to as the first operating system, and the operating system targeted by the user for operating system switching will be referred to as the second operating system. If the current terminal device has three or more operating systems, the user can specify the target operating system, that is, the user can specify which specific operating system is the second operating system. The operating system can include Windows operating system and its various versions, such as Windows 8, Windows 11, Windows Server, etc., and can also include Android operating system and its various versions, as well as macOS operating system and its various versions. When an operating system switch is required, a system switch instruction needs to be generated to switch the current operating system to the corresponding second operating system (i.e., the target operating system), at which point the first operating system can receive the instruction.

[0034] Step S202: Obtain the current boot order list. The boot order list includes boot entries corresponding to the operating system.

[0035] Upon receiving a system switch command, the boot order can be adjusted accordingly. The boot order is the order in which available operating systems are checked during terminal device startup (e.g., the order of Windows, Android, or macOS). Normally, the terminal device will attempt to boot from the operating systems in the boot order sequentially until a usable one is found. Therefore, placing the second operating system first in the boot order ensures that the terminal device boots into the second operating system.

[0036] When adjusting the boot order, the current boot order list needs to be obtained first. For example, in Windows operating systems, this can be obtained by reading the BootOrder variable. This can be done by calling the UEFI runtime service function, specifically the GetFirmwareEnvironmentVariableExW function in Windows, and passing BootOrder as the variable name. The boot order list includes the boot entry corresponding to the operating system, and may also include the device names corresponding to each operating system, such as hard drive or USB flash drive names. Since modifying the BootOrder variable requires high system privileges, the operating system switching process in this embodiment needs to have the corresponding permissions, such as the SeSystemEnvironmentPrivilege permission that allows read and write operations on firmware environment variables.

[0037] Step S203: According to the system switching instruction, the boot entry corresponding to the second operating system is adjusted to the first position in the boot order list.

[0038] Upon receiving a system switch command, the boot order needs to be adjusted accordingly. In this embodiment, the boot order can be adjusted by modifying the boot order list. As mentioned earlier, boot items in the boot order list have priority, or the devices are attempted to boot sequentially according to the order in the boot order list. In this case, the boot entry corresponding to the second operating system is moved to the first position in the boot order, achieving the effect of entering the second operating system when the terminal device boots. Under the Android operating system, the priority of the boot entry corresponding to the second operating system can also be increased. For example, the command `sudoefibootmgr -o 000A,0002,0005` can be used to move the priority of boot entry number 000A to the first position, ensuring that the operating system corresponding to boot entry number 000A is booted first when the terminal device boots.

[0039] Step S204: Reboot the terminal device to start the second operating system according to the adjusted boot order.

[0040] Since the boot order settings are stored in the terminal device's firmware, such as UEFI (Unified Extensible Firmware Interface) firmware or BIOS firmware, and the boot order only takes effect when the terminal device starts up, after obtaining the adjusted boot order, a reboot can make the adjusted boot order take effect, thereby allowing the terminal device to automatically enter the second operating system without requiring the user to enter the BIOS to make adjustments.

[0041] The operating system switching method provided in this embodiment allows switching between different operating systems, solving the problem of needing to enter the BIOS to switch in related technologies, improving convenience and reducing learning costs. Furthermore, since multiple operating systems are installed and switched on the same terminal device, there is no need for multiple terminal devices to switch operating systems using different input sources, reducing the waste of computing resources and energy, and eliminating the problem of not being able to share hardware between different systems found in related technologies.

[0042] This embodiment provides an operating system switching method, which can be used in the aforementioned terminal devices, such as desktop computers, portable computers, tablet computers, etc. Figure 3 This is a flowchart of an operating system switching method according to an embodiment of the present invention, such as... Figure 3 As shown, the process includes the following steps: Step S301: If the first operating system is currently running, receive a system switching instruction for switching the operating system to the second operating system.

[0043] Please see details Figure 2 Step S201 of the illustrated embodiment will not be described again here.

[0044] Step S302: Obtain the current boot order list. The boot order list includes boot entries corresponding to the operating system.

[0045] Please see details Figure 2 Step S202 of the illustrated embodiment will not be described again here.

[0046] In some alternative implementations, step S302, “obtaining the current boot order list,” includes step a1.

[0047] Step a1: Obtain all boot items in the boot order using the boot order management tool to obtain a boot order list containing each boot item.

[0048] When obtaining the boot order list, you can use the boot order management tool built into the first operating system, such as the efibootmgr tool, to manage the boot entries in the UEFI firmware. For example, you can use the command `sudoefibootmgr` to list all boot entries (i.e., the boot order list), which will contain information about each boot entry. Boot entry information may include BootCurrent, BootOrder, etc., where BootCurrent is the boot entry number used for this boot (e.g., 0002), and BootOrder is the boot order list arranged by priority (e.g., 0002, 000A, 0003). Each boot entry has a boot entry description, such as Windows Boot Manager (Windows operating system) or Ubuntu (Linux operating system). For example, if the first operating system is an Android or Linux operating system (for simplicity, we will use Android as an example below), this step can be performed.

[0049] Step S303: According to the system switching instruction, the boot entry corresponding to the second operating system is adjusted to the first position in the boot order list.

[0050] Please see details Figure 2 Step S203 of the illustrated embodiment will not be described again here.

[0051] In some optional implementations, step S303, "according to the system switching instruction, adjusting the boot entry corresponding to the second operating system to the first position in the boot order list", includes steps S3031 to S3034.

[0052] Step S3031: Parse the boot order list to obtain the boot descriptor corresponding to each boot item in the boot order list.

[0053] Step S3032: Parse each boot descriptor to determine the description string corresponding to each boot item.

[0054] Step S3033: Determine the target boot entry corresponding to the second operating system based on the description string corresponding to each boot entry.

[0055] Step S3034: Adjust the target boot entry to the first position in the boot order list.

[0056] When modifying the boot order list under an operating system, the boot order list needs to be parsed first. As mentioned earlier, in Windows, the boot order list is stored in the `BootOrder` variable, where each two bytes constitute a Little-Endian format boot entry number. Parsing these boot entry numbers, for example by calling the `GetFirmwareEnvironmentVariableExW` function, allows you to obtain detailed data for each boot entry, i.e., the boot descriptor. However, the boot descriptor's structure is relatively complex and cannot be matched directly with the user's selected second operating system. Therefore, further parsing of the boot descriptor is necessary to determine the description string corresponding to each boot entry, such as Windows Boot Manager or Ubuntu.

[0057] After obtaining the description strings corresponding to each boot entry, the description strings corresponding to the boot entries can be matched with the target system identifier stored in the system switching instruction, such as Windows Boot Manager under the Windows operating system, to obtain the target boot entry corresponding to the second operating system. Then, the target boot entry is adjusted to the first position in the boot order list to update the boot order list.

[0058] In some alternative implementations, step S3034, "adjusting the target bootstrap to the first position in the bootstrap order list," includes steps b1 and b2.

[0059] Step b1: Delete the target boot entry corresponding to the second operating system from the boot order list to obtain the intermediate order list.

[0060] Step b2: Add the target guide item to the first position in the intermediate order list to obtain the adjusted guide order list.

[0061] During the adjustment of the boot order list, the target boot entry corresponding to the second operating system can be removed from the original boot order list. Then, the other boot entries in the original boot order list are arranged in order to obtain an intermediate order list. At this time, the intermediate order list does not include the target boot entry.

[0062] After obtaining the intermediate order list, insert the target boot entry into the first position of the intermediate order list, and shift the other boot entries to the next position in turn to obtain the adjusted boot order list. This adjusted boot order list can then be stored as the boot order list. For example, in the Windows operating system, the boot order list can be stored in the BootOrder variable. Figure 4This is a system switching flowchart under a Windows operating system according to this embodiment, such as... Figure 4 As shown, under the Windows operating system, the first step is to check if the process has the corresponding permissions. For example, you can check if the current terminal device firmware is in UEFI boot mode and if it is running with administrator privileges. If permissions are granted, the boot order can be obtained, i.e., the current boot order list can be retrieved. This can be done using the `GetFirmwareEnvironmentVariableExW` function, passing `BootOrder` as the variable name to obtain the boot order list. Then, the `GetFirmwareEnvironmentVariableExW` function is used again, passing `Boot1`, `Boot2` (i.e., the first and second boot items in the boot order list) as parameters to obtain boot item information, including the boot item sequence number and descriptor. At this point, it is necessary to determine the boot order based on the second operating system (e.g., ...). Figure 4 The process involves adjusting the boot order list for MegaOS, then using the service function SetFirmwareEnvironmentVariableExW to write the new boot order list into the BootOrder variable and setting the corresponding variable attributes (such as NON_VOLATILE). Once the boot order list is set and effective, the system can switch to the MegaOS operating system normally after rebooting.

[0063] In some optional implementations, the operating system switching method provided in this embodiment further includes steps c1 to c3.

[0064] Step c1: Create a shared storage space for the first and second operating systems.

[0065] Step c2: After receiving the system switch command, generate a corresponding configuration file based on the current configuration parameters of the terminal device and store it in the public storage space. The configuration file includes configuration parameters that need to be kept consistent after switching operating systems.

[0066] Step c3: After starting the second operating system, configure the terminal device parameters according to the configuration file in the public storage space.

[0067] In some cases, related technologies cannot retain public data after switching operating systems. For example, device names, software activation codes, screen mode data, current brightness values, current volume values, Wi-Fi hotspot names and passwords for the same device on different systems require reconfiguration after the operating system switch. In this embodiment, a public storage space can be created to store this public data. This data is retained after the system switch without requiring the reconfiguration of various parameters, improving the user experience. For example, a separate hard drive partition (e.g., a FAT32 partition) can be used as the public storage space, or a directory within that partition can also be used. Upon receiving the system switch command, a configuration file is generated based on the terminal device's current configuration parameters, such as screen mode data, current brightness values, current volume values, Wi-Fi hotspot names and passwords. In this embodiment, the configuration file can be a JSON (JavaScript Object Notation) file, an Excel file, or a text file. This file is used by the second operating system to configure various parameters of the terminal device based on this configuration file stored in the public storage space after the second operating system starts, ensuring that the device's configuration remains consistent after the operating system switch.

[0068] In some alternative implementations, the method further includes step c4.

[0069] Step c4: If the drive letter corresponding to the public storage space has not been hidden or deleted, hide or delete the drive letter corresponding to the public storage space in the file manager.

[0070] To prevent configuration files in the shared storage space from being modified manually and to avoid data synchronization issues when switching systems, the shared storage space needs to be hidden. If the drive letter corresponding to the shared storage space is not hidden or deleted, it can be hidden or deleted in the file manager. For example, if the primary operating system is Windows, the drive letter to be hidden can be identified by setting the NoDrives registry key. In this case, the shared storage space will be inaccessible in the file manager, but disk data can still be accessed through the drive letter. Alternatively, the shared partition drive letter can be deleted, for example, by automatically executing cmd or PowerShell commands.

[0071] In some alternative implementations, step c3, "configuring the terminal device according to the configuration file in the public storage space," includes steps c31 and c32.

[0072] Step c31: If the drive letter corresponding to the public storage space is hidden or deleted, allocate and display the drive letter for the public storage space.

[0073] Step c32: Configure parameters according to the configuration file in the public storage space.

[0074] For data security reasons, the drive letter corresponding to the public storage space may sometimes be hidden or deleted. In such cases, if you want to configure terminal device parameters based on the configuration files in the public storage space, you need to first assign and display a drive letter to the public storage space to ensure its readability and writability. For example, if the secondary operating system is Windows, you can automatically assign and display the corresponding drive letter by executing cmd or PowerShell commands. Once the public storage space has a corresponding drive letter, you can configure parameters according to the configuration files, such as screen mode data, current brightness value, current volume value, Wi-Fi hotspot name, and password.

[0075] Figure 5 This is a flowchart illustrating the activation process of a configuration file according to this embodiment, such as... Figure 5 As shown, the terminal device has two operating systems: Windows and Android. Currently, it's running Windows, meaning the primary system is Windows. Upon receiving the system switch command, on the Windows side, the drive letter needs to be hidden in the file explorer, and public data needs to be written to the public storage space in JSON format. The JSON file can be named HasGotoAndroid. Then, the drive letter is deleted using the Diskpart command. Switching the boot entry will then allow entry into the Android operating system. In the Android operating system, the JSON file in the public storage space is read with root privileges, and the terminal device parameters are set accordingly. After modifying parameters such as brightness and name, the corresponding JSON file in the public storage space is stored. This JSON file can be named HasGotoWindows.

[0076] After switching to the Windows operating system, the Windows operating system needs to check if there is a configuration file HasGotoWindows. If not, the system runs normally. If it does, the Diskpart command needs to be called to assign drive letters and read the parameters from the JSON file to apply to the parameter settings.

[0077] In some optional implementations, the operating system switching method provided in this embodiment further includes steps d1 and d2 before receiving a system switching command from a user: Step d1: In response to a switching operation triggered by a preset key, the system switching interface is displayed in the graphical user interface. The system switching interface includes icons corresponding to each operating system.

[0078] Step d2: In response to the operating system selection operation in the system switching interface, the selected operating system is used as the second operating system, and a system switching instruction is generated.

[0079] To enhance the user's graphical experience, a system switching interface can be opened via a preset key. This preset key can be a key combination, such as Ctrl+Alt+F1, or a specific key for switching systems. By using the Control Center application to listen for keyboard events, the system switching interface can pop up when the user presses the key combination or the specific key. For example, in Windows operating systems, this can be achieved by using the `windowsService` service as a persistent background process and listening for global keyboard events using `SetWindowsHookEx`. The system switching interface includes identifiers for each operating system, such as the operating system name or system descriptor. Users can select the operating system they want to switch to (i.e., the second operating system) in the system switching interface, at which point a corresponding system switching command can be generated based on the second operating system.

[0080] Step S304: Reboot the terminal device to start the second operating system according to the adjusted boot order.

[0081] Please see details Figure 2 Step S204 of the illustrated embodiment will not be described again here.

[0082] The operating system switching method provided in this embodiment allows switching between different systems, solving the problem of needing to enter the BIOS to switch in related technologies, improving convenience and reducing learning costs. It also enhances the correlation between different systems by sharing common data, reflecting the overall attributes of the device, and eliminating the need to readjust various parameters after system switching. Furthermore, since multiple operating systems are installed and switched on the same terminal device, there is no need for multiple terminal devices to switch operating systems using different input sources, reducing the waste of computing resources and energy, and solving the problem of not being able to share hardware between different systems in related technologies.

[0083] This embodiment also provides an operating system switching device for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0084] This embodiment provides an operating system switching device applied to a terminal device, wherein at least two operating systems are installed in the terminal device, such as... Figure 6 As shown, the device includes: The instruction receiving module 601 is used to receive a system switching instruction for switching the operating system to a second operating system when the first operating system is currently running.

[0085] The list acquisition module 602 is used to acquire the current boot order list, which includes the boot entries corresponding to the operating system.

[0086] The list adjustment module 603 is used to adjust the boot entry corresponding to the second operating system to the first position in the boot order list according to the system switching instruction.

[0087] Reboot module 604 is used to reboot the terminal device to boot the second operating system according to the adjusted boot order.

[0088] In some alternative implementations, the list adjustment module 603 includes: The first parsing unit is used to parse the boot order list to obtain the boot descriptor corresponding to each boot item in the boot order list.

[0089] The second parsing unit is used to parse each bootstrap descriptor and determine the description string corresponding to each bootstrap item.

[0090] The boot entry determination unit is used to determine the target boot entry corresponding to the second operating system based on the description string corresponding to each boot entry.

[0091] The list adjustment unit is used to move the target guide item to the first position in the guide order list.

[0092] In some optional implementations, the list adjustment unit includes: The boot entry deletion subunit is used to delete the target boot entry corresponding to the second operating system from the boot order list to obtain the intermediate order list.

[0093] The guide item adds a sub-unit, which is used to add the target guide item as the first item in the intermediate order list, thus obtaining the adjusted guide order list.

[0094] In some alternative implementations, the list retrieval module 602 includes: The boot item acquisition unit is used to obtain all boot items in the boot order through the boot order management tool, and obtain a boot order list containing each boot item.

[0095] In some alternative implementations, the operating system switching device further includes: The storage space creation module is used to create a shared storage space for both the first and second operating systems.

[0096] The configuration file generation module is used to generate a corresponding configuration file based on the current configuration parameters of the terminal device after receiving the system switch command, and store it in the public storage space. The configuration file includes configuration parameters that need to be kept consistent after switching operating systems.

[0097] The configuration file reading module is used to configure the terminal device parameters according to the configuration file in the public storage space after the second operating system is started.

[0098] In some alternative implementations, the operating system switching device further includes: The drive letter deletion module is used to hide or delete the drive letter corresponding to the public storage space in the file manager when the drive letter corresponding to the public storage space has not been hidden or deleted.

[0099] In some alternative implementations, the configuration file reading module includes: The drive letter allocation submodule is used to allocate and display drive letters for public storage space when the drive letters corresponding to the public storage space are hidden or deleted.

[0100] The parameter configuration submodule is used to configure parameters based on the configuration files in the public storage space.

[0101] In some alternative implementations, the operating system switching device further includes: The key monitoring module is used to respond to switching operations triggered by preset keys and display the system switching interface in the graphical user interface. The system switching interface includes the corresponding logos for each operating system.

[0102] The instruction generation module is used to respond to the operating system selection operation in the system switching interface, select the operating system as the second operating system, and generate a system switching instruction.

[0103] The operating system switching device provided in this embodiment of the invention can execute the operating system switching method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the method. Further functional descriptions of the various modules and units described above are the same as in the corresponding embodiments described above, and will not be repeated here.

[0104] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention.

[0105] The following is a detailed reference. Figure 7 This diagram illustrates a suitable structural schematic for implementing an electronic device according to embodiments of the present invention. The electronic device may include a processor (e.g., a central processing unit, graphics processor, etc.) 701, which can perform various appropriate actions and processes based on a program stored in read-only memory (ROM) 702 or a program loaded from memory 708 into random access memory (RAM) 703. The RAM 703 also stores various programs and data required for the operation of the electronic device. The processor 701, ROM 702, and RAM 703 are interconnected via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0106] Typically, the following devices can be connected to I / O interface 705: input devices 706 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 707 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; memory devices 708 including, for example, magnetic tapes, hard disks, etc.; and communication devices 709. Communication device 709 allows electronic devices to exchange data via wireless or wired communication with other devices. Although Figure 7 Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown, and more or fewer devices may be implemented or have instead.

[0107] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 709, or installed from a memory 708, or installed from a ROM 702. When the computer program is executed by the processor 701, it performs the functions defined in the operating system switching method of the embodiments of the present invention.

[0108] Figure 7The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments of the present invention.

[0109] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code. When the software or computer code is accessed and executed by the computer, processor, or hardware, the operating system switching method shown in the above embodiments is implemented.

[0110] A portion of this invention can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to the invention through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.

[0111] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.

Claims

1. An operating system switching method, characterized in that, Applied to a terminal device, wherein at least two operating systems are installed, the method includes: While the first operating system is currently running, receive a system switching instruction to switch the operating system to the second operating system; Obtain the current boot order list; the boot order list includes boot entries corresponding to the operating system. According to the system switching instruction, the boot entry corresponding to the second operating system is adjusted to the first position in the boot order list; The terminal device is restarted to start the second operating system according to the adjusted boot order.

2. The method according to claim 1, characterized in that, The step of adjusting the boot entry corresponding to the second operating system to the first position in the boot order list according to the system switching instruction includes: The boot order list is parsed to obtain the boot descriptor corresponding to each boot item in the boot order list; Each boot descriptor is parsed to determine the description string corresponding to each boot entry; The target boot entry corresponding to the second operating system is determined based on the description string corresponding to each boot entry; Move the target guide to the first position in the guide order list.

3. The method according to claim 2, characterized in that, The step of adjusting the target guide item to the first position in the guide order list includes: Delete the target boot entry corresponding to the second operating system from the boot order list to obtain the intermediate order list; Add the target guide item to the first position in the intermediate order list to obtain the adjusted guide order list.

4. The method according to claim 1, characterized in that, The step of obtaining the current boot order list includes: The boot order management tool is used to obtain all the boot items in the boot order, resulting in a boot order list containing each boot item.

5. The method according to claim 1, characterized in that, The method further includes: Create a shared storage space for the first operating system and the second operating system; Upon receiving a system switch command, a corresponding configuration file is generated based on the current configuration parameters of the terminal device and stored in the public storage space; the configuration file includes configuration parameters that need to remain consistent after switching operating systems; After the second operating system is started, the terminal device is configured with parameters according to the configuration file in the public storage space.

6. The method according to claim 5, characterized in that, The method further includes: If the drive letter corresponding to the public storage space is not hidden or deleted, hide or delete the drive letter corresponding to the public storage space in the file manager.

7. The method according to claim 5, characterized in that, The step of configuring the terminal device according to the configuration file in the public storage space includes: If the drive letter corresponding to the public storage space is hidden or deleted, a drive letter is allocated and displayed for the public storage space; Configure the parameters according to the configuration file in the public storage space.

8. The method according to claim 1, characterized in that, Before receiving the system switching command from the user, the method further includes: In response to a switching operation triggered by a preset key, a system switching interface is displayed in the graphical user interface; the system switching interface includes identifiers corresponding to each operating system. In response to the selection operation of the operating system in the system switching interface, the selected operating system is used as the second operating system, and the system switching instruction is generated.

9. An operating system switching device, characterized in that, Applied to a terminal device, wherein at least two operating systems are installed, the device includes: The instruction receiving module is used to receive system switching instructions for switching the operating system to the second operating system when the first operating system is currently running. The list retrieval module is used to retrieve the current boot order list; the boot order list includes boot entries corresponding to the operating system. The list adjustment module is used to adjust the boot item corresponding to the second operating system to the first position in the boot order list according to the system switching instruction; A restart module is used to restart the terminal device to start the second operating system according to the adjusted boot order.

10. An electronic device, characterized in that, include: A memory and a processor are communicatively connected, the memory stores computer instructions, and the processor executes the computer instructions to perform the operating system switching method of any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the terminal device to execute the operating system switching method according to any one of claims 1 to 8.

12. A computer program product, characterized in that, It includes computer instructions for causing a terminal device to execute the operating system switching method according to any one of claims 1 to 8.