A computer startup method and system for multiple operating systems
By collecting multi-dimensional environmental information during the pre-boot phase and combining it with machine learning to select the target operating system, and by establishing a closed-loop mechanism by combining hardware initialization and sensor feedback, the instability caused by abnormal hardware status during the boot of multiple operating systems is solved, and adaptive intelligence and efficient boot are achieved.
Patent Information
- Application Number
- CN202611608530.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-16
- Publication Date
- 2026-11-27
AI Technical Summary
Existing multi-operating system boot schemes lack dynamic linkage between operating system selection decisions and hardware initialization processes, leading to boot failures or instability when hardware states are abnormal. Furthermore, users need to manually select the operating system, making it difficult to adapt to complex and ever-changing usage scenarios.
During the pre-boot phase, multi-dimensional environmental information is collected, and the usage scenario is identified through machine learning algorithms and the target operating system is automatically selected. A closed-loop mechanism is established by combining hardware initialization and sensor feedback to dynamically optimize hardware parameters to ensure stable boot.
It achieves adaptive intelligence and stability improvement in multi-operating system booting, reduces user intervention, improves hardware compatibility and boot efficiency, and has self-sensing and self-diagnostic capabilities.
Smart Images

Figure CN123178018A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer operating system boot technology, specifically to a computer boot method and system with multiple operating systems. Background Technology
[0002] With the continuous development of computer technology, it is increasingly common to install multiple operating systems on the same computer to meet the needs of different usage scenarios. Existing multi-operating system boot technologies mainly include the following implementation methods: First, a multi-operating system boot manager (such as GRUB) reads a pre-set boot device identifier and boots from the corresponding boot device, or boots from a new boot device identifier rewritten according to the Basic Input / Output System (PIOS). Second, during the computer boot process, the BIOS program reads the default boot device and default operating system, directly guiding the computer into that default operating system. Third, UEFI firmware traverses boot variables in non-volatile random access memory during the pre-boot phase, enumerating and parsing the device paths and descriptions of all available operating systems, allowing users to select them through a graphical interface. Of these solutions, the first two rely on a pre-set fixed boot identifier or default operating system; if the user needs to switch to another operating system, they must manually select the boot option during the computer boot process using input devices such as a keyboard. While the third method provides a graphical selection interface and improves the interactive experience, it still essentially requires active user participation in the selection process. Some technologies have attempted to automatically determine the target operating system by collecting biometric information such as fingerprints and faces, thereby reducing manual operations by users. However, such solutions rely on a single dimension of verification information, and the decision-making basis is relatively limited, making it difficult to adapt to complex and ever-changing usage scenarios.
[0003] Furthermore, existing boot schemes generally suffer from a technical flaw in the multi-operating system computer boot process: the operating system selection decision and the hardware initialization process are independent and lack dynamic linkage. Specifically, in the traditional boot process, after the multi-operating system boot manager or BIOS / UEFI firmware determines the operating system to be booted, it performs hardware initialization operations according to preset fixed configuration parameters and then directly boots and loads the operating system. In this process, the configuration of hardware initialization parameters relies entirely on pre-stored static settings and cannot be adjusted in real time according to the actual physical state changes that occur during hardware initialization. When the actual operating state of the hardware deviates from the preset parameters due to factors such as aging, temperature changes, and power supply fluctuations, hardware initialization performed according to fixed parameters may cause the hardware to operate in an unstable state, leading to problems such as operating system boot failure and system instability. Although existing technologies provide means to monitor and adjust the hardware status after the operating system boots, these are all remedial measures during the operating system runtime phase and fail to establish a real-time perception and dynamic optimization mechanism for the hardware status during the boot phase before the operating system loads. Therefore, how to organically integrate the operating system selection decision and hardware initialization process during the startup phase, so that the computer can adaptively determine the target operating system according to the current usage scenario, and at the same time perceive the physical state of the hardware in real time and dynamically optimize the initialization parameters during the hardware initialization process, so as to improve the intelligence, stability and hardware compatibility of multi-operating system startup, has become a technical problem that urgently needs to be solved in this field. Summary of the Invention
[0004] To address the problems of the prior art, this invention provides a computer boot method and system with multiple operating systems.
[0005] To solve the above-mentioned technical problems, the present invention is achieved through the following technical solution: Firstly, a method for booting a computer with multiple operating systems, comprising the following steps: Step S1: In response to the computer's startup command, collect environmental information in the pre-boot environment. The environmental information includes at least one of time information, location information, network environment information, peripheral access information, biometric information, and sensor data. Step S2: Based on the environmental information, determine the target operating system according to intelligent decision-making rules. The intelligent decision-making rules include: inputting the environmental information into a scene recognition model trained based on a machine learning algorithm to obtain the predicted scene type, and determining a first candidate operating system according to a preset correspondence between the scene type and the operating system; and matching the currently collected environmental information with historical startup data for similarity, selecting the operating system corresponding to the historical startup record with the highest similarity as a second candidate operating system; and determining the target operating system from the first candidate operating system and the second candidate operating system according to a preset fusion strategy. Step S3: Generate a first hardware initialization instruction according to the preset configuration parameters of the target operating system, execute the first hardware initialization instruction, and perform a pre-initialization operation on the target hardware component. The pre-initialization operation causes a physical state change in the target hardware component. Step S4: During the pre-initialization operation, the real-time physical feedback signal of the target hardware component is collected by the sensing element, and the real-time physical feedback signal is used as a correction factor to input the intelligent decision-making step to generate a second hardware initialization instruction. The second hardware initialization instruction is executed to dynamically correct the initialization parameters of the target hardware component. Step S5: Obtain the boot information of the target operating system, and boot and load the target operating system based on the corrected hardware state; Step S6: Record the environment information and the operating system identifier of this startup, and update the historical startup data.
[0006] In one specific embodiment of the first aspect, the target hardware component includes at least one of a voltage regulation module of a central processing unit, a clock generation circuit of a memory module, a power management chip of a solid-state drive, and a power supply controller for a peripheral interface; the physical state change includes at least one of the output voltage ripple change of the voltage regulation module, the electromagnetic radiation intensity change of the clock generation circuit, the instantaneous power consumption fluctuation of the power management chip, and the bus level offset of the power supply controller; the sensing element is at least one of a Hall effect sensor, an electromagnetic induction coil, a current sensing resistor, a voltage divider sampling circuit, and an optocoupler, and the sensing element is disposed around the target hardware component or integrated inside the target hardware component.
[0007] In one specific implementation of the first aspect, generating the second hardware initialization instruction in step S4 specifically includes: when the real-time physical feedback signal indicates that the pre-initialization operation causes the signal integrity of the target hardware component to be between a second threshold and a first threshold, performing boot loading with the current pre-initialization parameters; when the real-time physical feedback signal indicates that the pre-initialization operation causes the signal integrity of the target hardware component to drop below the first threshold, the second hardware initialization instruction includes parameters for reducing the operating frequency of the target hardware component and enabling hardware error correction codes; after completing the parameter correction of the target hardware component according to the second hardware initialization instruction, re-acquiring the secondary feedback signal of the corrected target hardware component; when the secondary feedback signal indicates that the signal integrity has recovered to above the second threshold, generating an accelerated boot instruction, the accelerated boot instruction being used to skip subsequent hardware self-test steps; when the secondary feedback signal indicates that the signal integrity is between the second threshold and the first threshold, not generating an accelerated boot instruction, and performing boot loading with the corrected parameters.
[0008] In one specific implementation of the first aspect, the first threshold is a signal bit error rate of 1×10⁻⁶. -9 The second threshold is the signal bit error rate 1×10⁻⁶. -12 The reduction in operating frequency is 10% to 30% of the current frequency.
[0009] In one specific implementation of the first aspect, after determining the target operating system in step S2 and before step S3, the method further includes: generating and displaying a graphical selection interface, wherein the graphical selection interface contains identification information of the target operating system and identification information of alternative operating systems, and wherein a countdown control is provided in the graphical selection interface, the countdown control having a timing range of 5 to 30 seconds; if no user selection operation is detected within the timing range of the countdown control, the target operating system is automatically used as the final operating system to be launched; if a user selection operation is detected within the timing range of the countdown control, the operating system selected by the user replaces the target operating system as the final operating system to be launched.
[0010] In one specific implementation of the first aspect, after the target operating system is booted in step S5, a boot failure handling process is further included: monitoring the boot status of the target operating system; if the boot failure of the target operating system is detected, selecting a backup operating system according to a preset backup strategy, wherein the backup strategy is to select the operating system with the highest boot success rate in the historical boot data, or to select the alternative operating system selected by the user in the graphical selection interface; obtaining the boot information of the backup operating system and booting the backup operating system; and recording a boot failure log, wherein the boot failure log includes the reason for failure, environmental information at the time of failure, and real-time physical feedback signals of the target hardware components.
[0011] In one specific implementation of the first aspect, the pre-boot environment is a Unified Extensible Firmware Interface (UEMI) pre-boot environment or a Basic Input / Output System (BIOS) boot environment; the collection of the environment information is performed by the computer's BIOS or UEMI firmware calling the underlying hardware interface; the historical boot data is stored in the computer's non-volatile random access memory (NRAM) or the storage unit of the baseboard management controller.
[0012] In one specific embodiment of the first aspect, the method further includes a remote management step performed by a baseboard management controller: the baseboard management controller receives a remote management instruction from a remote management terminal, the remote management instruction containing identification information or boot policy information of a specified operating system; the baseboard management controller sends a boot order setting command to the computer's basic input / output system or unified extensible firmware interface according to the remote management instruction, so as to adjust the boot order list; the baseboard management controller uses the specified operating system or the operating system determined according to the boot policy information as the target operating system, overriding the target operating system determined in step S2; the baseboard management controller records a remote management operation log.
[0013] In one specific implementation of the first aspect, the training process of the scene recognition model in step S2 includes: collecting environmental information samples from multiple historical startup scenarios, labeling each environmental information sample with a corresponding scene type label, wherein the scene type includes at least one of office scene, home scene, game scene, and development scene; dividing the labeled environmental information samples into a training set and a validation set, and training the model using a support vector machine, random forest, or deep neural network algorithm; during the model training process, using the collection time, collection location, network identifier, and peripheral type of the environmental information samples as input features, and the scene type label as the output target, iteratively optimizing the model parameters until the validation set accuracy is not less than 95%.
[0014] Secondly, a multi-operating system computer boot system includes: An environmental information acquisition module is used to acquire at least one type of environmental information in a pre-boot environment of a computer, wherein the environmental information includes at least one of time information, location information, network environment information, peripheral access information, biometric information, and sensor data. The intelligent decision-making module is used to determine the target operating system based on the environmental information and intelligent decision-making rules. The intelligent decision-making module includes a scene recognition subunit and a history matching subunit. The scene recognition subunit has a built-in scene recognition model trained based on machine learning algorithms, which is used to obtain the predicted scene type and determine the corresponding target operating system based on the environmental information. The history matching subunit is used to perform similarity matching between the currently collected environmental information and historical startup data and select the operating system corresponding to the historical startup record with the highest similarity as the target operating system. The hardware feedback adjustment module is used to generate and execute a first hardware initialization instruction based on the preset configuration parameters of the target operating system to perform a pre-initialization operation on the target hardware component. During the execution of the pre-initialization operation, the module collects the real-time physical feedback signal of the target hardware component through a sensing element, inputs the real-time physical feedback signal as a correction factor into the intelligent decision module, generates a second hardware initialization instruction, and executes it to dynamically correct the initialization parameters of the target hardware component. The boot execution module is used to obtain the boot information of the target operating system and boot the target operating system based on the corrected hardware state. The data recording module is used to record the environment information and the operating system identifier of this startup, and update the historical startup data; The baseboard management controller is communicatively connected to the intelligent decision-making module and the boot execution module, and is used to receive remote management instructions and adjust the boot order list or overwrite the target operating system according to the remote management instructions.
[0015] The beneficial effects of this invention are as follows: 1. This invention achieves adaptive intelligent startup of multiple operating systems by constructing an environmental information collection and dual-path intelligent decision-making mechanism. Specifically, during the pre-startup phase, this invention collects multi-dimensional environmental information such as time, location, network, and peripherals. It uses a scene recognition model to perform pattern recognition on the current usage scenario and combines this with historical startup data for similarity matching, employing a fusion strategy to comprehensively determine the target operating system. This mechanism enables the computer to automatically adapt to the most suitable operating system based on the current usage scenario, without manual user intervention, fundamentally overcoming the efficiency shortcomings of traditional multi-system startup methods that rely on fixed defaults or manual selection. As usage time accumulates, the historical startup database continuously expands, and the scene recognition model can be continuously optimized through incremental training, enabling the accuracy of startup decisions to adaptively improve with changes in user habits, forming a virtuous cycle of learning and evolution.
[0016] 2. This invention significantly improves the stability and hardware compatibility of multi-system startup by establishing a physical feedback closed loop between software decision-making and hardware initialization. Specifically, after determining the target operating system, this invention does not directly load the system kernel. Instead, it first performs pre-initialization operations on the target hardware components according to the preset configuration parameters of the operating system. Physical feedback signals such as voltage ripple, electromagnetic radiation, and power consumption fluctuations are collected in real time by sensors placed around the hardware components to quantitatively evaluate the hardware signal integrity. When a decrease in signal integrity is detected, the system automatically generates correction instructions, dynamically reduces the hardware operating frequency, and enables an error correction mechanism to eliminate potential interference from abnormal hardware states on the startup process. After correction, the correction effect is verified through secondary feedback signals, and subsequent redundant self-check steps are selectively skipped based on the verification results, ensuring both startup reliability and startup efficiency. This deeply integrated software and hardware closed-loop mechanism enables the multi-system startup process to have self-sensing, self-diagnostic, and self-repair capabilities regarding the physical state of the hardware, effectively overcoming the hardware compatibility defects caused by the independent startup decision-making and hardware initialization and lack of dynamic optimization in traditional solutions. Attached Figure Description
[0017] Figure 1 This is a schematic diagram of the overall process of the present invention.
[0018] Figure 2 This is a schematic diagram of the intelligent decision-making dual-path fusion process of the present invention.
[0019] Figure 3 This is a schematic diagram of the hardware pre-initialization and physical feedback correction process of the present invention. Detailed Implementation
[0020] The technical solutions of the present invention will be clearly and completely described below with reference to the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.
[0021] like Figures 1 to 3 This illustrates a computer boot method and system with multiple operating systems.
[0022] I. This invention provides a method for booting a computer with multiple operating systems, comprising six core steps: environmental information acquisition, intelligent decision-making, hardware pre-initialization and physical feedback correction, boot loading, and data recording. This method achieves adaptive and highly stable booting of multiple operating systems by constructing a complete closed loop of "environmental perception → intelligent decision-making → hardware pre-tuning → physical feedback → parameter correction → boot loading."
[0023] II. The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Those skilled in the art should understand that the following description is only a preferred embodiment of the present invention and does not constitute a limitation on the scope of protection of the present invention.
[0024] In this invention, the sensing element is a general term for any element or circuit structure capable of acquiring physical state signals of hardware components. Its specific implementation includes any one or more combinations of Hall effect sensors, electromagnetic induction coils, current sensing resistors, voltage divider sampling circuits, and optocouplers. The specific selection depends on the type of the target hardware component and the type of physical state signal being acquired.
[0025] First implementation method: Environmental information collection In this embodiment, in response to a computer's boot command (e.g., a user pressing the power button or receiving a remote wake-up signal), the computer's BIOS or UEFI firmware begins executing the Power-On Self-Test (POST) process. During the POST process's DXE (Driver Execution Environment) phase or BDS (Boot Device Selection) phase, an environment information acquisition process is initiated.
[0026] The specific implementation of step S1: The computer uses its BIOS or UEFI firmware to access underlying hardware interfaces and collect at least one type of environmental information during the pre-boot environment. This environmental information includes, but is not limited to, the following types: (1) Time information collection: The computer reads the current time (accurate to the second), day of the week, and date through a real-time clock (RTC) chip. RTC chips typically use I / O... 2The BIOS connects to the Southbridge chip via either the C or SPI bus, and obtains the above information by reading the time register in the CMOS memory. The time information is collected once every time the computer starts up, with an accuracy of ±1 second.
[0027] (2) Location information collection: For computers equipped with a Global Positioning System (GPS) module (such as laptops and tablets), the BIOS communicates with the GPS module via UART or USB interface to obtain the current geographic coordinates (longitude and latitude). For computers without a GPS module, location can be determined by analyzing the BSSID (Basic Service Set Identifier) of the currently accessed WiFi network and combining it with a pre-stored WiFi location database. The location information acquisition accuracy is 10 to 50 meters in urban environments.
[0028] (3) Network environment information collection: The BIOS / UEFI firmware uses its Network Stack function to scan for available WiFi networks, obtaining the SSID (Service Set Identifier), BSSID, signal strength (RSSI, dBm), and encryption type for each network. For wired networks, it obtains network connectivity by detecting the link status of the Ethernet controller. The network scan timeout is set to 3 to 10 seconds; if the timeout occurs, the collection of this type of information is skipped.
[0029] (4) Collection of peripheral access information: The BIOS / UEFI firmware enumerates currently connected external devices by traversing the devices on buses such as PCIe, USB, and SATA. Specifically, it identifies the device type by calling the Vendor ID and Device ID registers in the PCIe configuration space, and obtains the type and identifier of the USB device through the USB descriptor. Peripheral types include, but are not limited to: keyboards, mice, monitors, printers, scanners, external storage devices, audio devices, etc.
[0030] (5) Biometric information collection: For computers equipped with fingerprint scanners or cameras, the BIOS reads biometric information through the corresponding driver interface. Fingerprint features are collected using capacitive or optical fingerprint sensors, generating fingerprint template data (typically 256 to 512 bytes of feature point data). Facial features are captured by a camera, capturing images of the user's face and extracting facial feature point data (typically 128 to 512-dimensional feature vectors).
[0031] (6) Sensor data acquisition: The computer reads various sensor data through an embedded controller (EC) or a sensor hub, including but not limited to: ambient light intensity (via an ambient light sensor, measured in Lux) and acceleration (via an accelerometer, measured in m / s²). 2 Sound intensity (through the microphone, in dB).
[0032] Storage format of collected data: The collected environmental information is stored in a predetermined address range in the computer's system memory, or in non-volatile random access memory (NVRAM), according to a predetermined format. Each environmental information record contains an information type identifier (2 bytes), an information length (2 bytes), and an information content (variable length). For example, the type identifier for time information is 0x0001, the type identifier for location information is 0x0002, the type identifier for network environment information is 0x0003, and so on.
[0033] Second implementation method: Intelligent decision-making In this embodiment, the target operating system is determined based on the environmental information collected in step S1, according to intelligent decision-making rules. The intelligent decision-making rules provide two parallel and combinable decision paths: a scene recognition model matching path and a historical data similarity matching path.
[0034] Path 1: Scene recognition model matching (steps S21-S23) (1) Construction of scene recognition model: The scene recognition model is pre-trained based on machine learning algorithms. The training process is as follows: First, a large number of environmental information samples from historical startup scenarios were collected. Each sample contains a complete environmental information vector collected during a single computer startup. ,in For time features (such as time period coding: 0-23 hours). Characteristics of the week (1-7). For location features (latitude and longitude or location area encoding). This is a network identification feature (the hash value of the WiFi SSID). Peripheral type characteristics (a set of peripheral type codes). For sensor data characteristics, etc.
[0035] Then, the corresponding scene type labels were manually labeled for each environmental information sample. {Office Scenario, Home Scenario, Gaming Scenario, Development Scenario}. For example, if a computer is in the office, connected to company Wi-Fi, at 9:00 AM on a weekday, and has an external keyboard, mouse, and monitor connected, it would be labeled as an "Office Scenario".
[0036] The labeled environmental information samples were divided into training and validation sets in a 7:3 ratio. A deep neural network (DNN) algorithm was used for model training. The network structure consisted of: an input layer (number of nodes equal to the dimension of the environmental information features, typically 64 to 128), three hidden layers (number of nodes 128, 64, and 32 respectively, with ReLU activation function), and an output layer (number of nodes equal to the number of scene types, typically 4, with Softmax activation function).
[0037] During model training, the collection time, location, network identifier, and peripheral type of environmental information samples are used as input features, and the scene type label is used as the output target. A cross-entropy loss function and the Adam optimizer (learning rate set to 0.001, batch size set to 32) are employed to iteratively optimize the model parameters until the validation set accuracy is no less than 95%. After training, the model parameters (weight matrix and bias vector) are stored in a reserved partition on the computer's NVRAM or solid-state drive.
[0038] (2) Calling the scene recognition model: During the computer startup process, the BIOS / UEFI firmware will use the environmental information vector collected in step S1. Input a scene recognition model. After forward propagation, the model outputs the probability distribution of each scene type. The sum of all probability values is 1.
[0039] Select the scene type with the highest probability value as the predicted scene type:
[0040] Based on the preset correspondence between scenario types and operating systems, the operating system corresponding to the predicted scenario type is determined as the target operating system. For example, the preset correspondence is: office scenario corresponds to Windows 10 Professional, home scenario corresponds to Windows 10 Home, gaming scenario corresponds to Windows 11 (with high-performance game drivers configured), and development scenario corresponds to Ubuntu Linux.
[0041] Path 2: Historical data similarity matching (steps) ) (1) Storage structure of historical startup data: Historical boot data is stored in the computer's non-volatile random access memory (NVRAM) or in the memory cells of the baseboard management controller (BMC). Each historical boot record contains the following fields: ; The historical startup data stores a maximum of 1,000 most recent records, and any excess records are discarded according to the first-in, first-out (FIFO) principle.
[0042] (2) Similarity matching algorithm: The currently collected environmental information vector Environmental information vectors of each record in the historical startup data Similarity is calculated using a weighted Euclidean distance metric.
[0043] in, For the first The weighting coefficients for each environmental information feature are determined by the following principle: features with a greater impact on the operating system selection (such as network identifiers and peripheral types) are assigned higher weights (0.15-0.20), while features with a smaller impact (such as sensor data) are assigned lower weights (0.05-0.10), with the sum of all weights being 1.
[0044] Similarity With distance Inversely proportional:
[0045] Select the historical startup record with the highest similarity The corresponding operating system is used as the target operating system.
[0046] (3) Dual-path fusion strategy (optional): When the scene recognition model matching path and the historical data similarity matching path each indicate the target operating system, the following fusion strategy can be used to determine the final target operating system: If the target operating system given by the two paths is the same, then the operating system is taken as the target operating system; If the target operating systems given by the two paths are inconsistent, the maximum output probability of the scene recognition model is compared with the maximum similarity of historical matches, and the result of the path with higher confidence is selected as the target operating system. Specifically, if If the scene recognition model is correct, then the result of the scene recognition model will be used; otherwise, the result of the historical matching will be used.
[0047] The confidence threshold in the fusion strategy is set to 0.7. This value is determined based on the conventional requirement in statistics that the confidence level should not be lower than 70%, to ensure that the decision results are statistically significant.
[0048] Third implementation method: Hardware pre-initialization and physical feedback correction This implementation method is one of the core innovations of the present invention. By introducing a real-time perception and feedback correction mechanism for the physical state of the hardware, a closed-loop linkage between software decision-making and hardware initialization is achieved.
[0049] Step S3: Generation and execution of the first hardware initialization instruction After determining the target operating system in step S2, the preset configuration parameters of that target operating system are obtained. These preset configuration parameters are pre-stored in the computer's NVRAM and correspond one-to-one with each operating system identifier. The preset configuration parameters include, but are not limited to: The operating frequency (MHz) of the central processing unit (CPU), the output voltage (V) of the voltage regulator module (VRM), the operating frequency (MHz) and timing parameters (CAS latency, RAS-to-CAS latency, etc.) of the memory module, the power management status (active mode / power saving mode) of the solid-state drive (SSD), and the power supply status (enabled / disabled) of the peripheral interface.
[0050] Based on the aforementioned preset configuration parameters, a first hardware initialization instruction is generated. The format of the first hardware initialization instruction is: instruction header (4 bytes, identifying instruction type 0xA1A2A3A4) + target hardware component identifier (2 bytes) + parameter length (2 bytes) + parameter content (variable length).
[0051] The first hardware initialization instruction is executed to pre-initialize the target hardware components. The target hardware components include at least one of the following: a voltage regulation module of the central processing unit, a clock generation circuit of the memory module, a power management chip of the solid-state drive, and a power supply controller for the peripheral interface.
[0052] The specific execution method of the pre-initialization operation is as follows: For the CPU voltage regulation module: a voltage setting command is sent to the VRM chip via PMBus (Power Management Bus) or SVID (Serial Voltage Identification) protocol to adjust the output voltage to the preset value corresponding to the target operating system. The voltage adjustment step is 10mV, and the adjustment range is 0.8V to 1.4V.
[0053] For the memory clock generation circuit: a frequency setting command is sent to the clock generator chip via SMBus (System Management Bus) to adjust the memory operating frequency to a preset value. The frequency adjustment step is 100MHz, and the adjustment range is 2133MHz to 6400MHz.
[0054] For SSD power management chips: the power management state can be switched to a preset mode (active mode or power saving mode) through the Set Features command of the NVMe protocol.
[0055] For peripheral interface power supply controllers: via GPIO (General Purpose Input / Output) pins or I... 2 The C bus controls the enable pin of the power supply controller, enabling or disabling power supply to the corresponding peripheral interface.
[0056] The aforementioned pre-initialization operations will cause physical state changes in the target hardware components, including: changes in the output voltage ripple of the voltage regulation module (the peak-to-peak ripple typically changes from 10mV to 30mV), changes in the electromagnetic radiation intensity of the clock generation circuit (the radiation intensity typically changes from -60dBm to -40dBm), fluctuations in the instantaneous power consumption of the power management chip (the power consumption typically changes from 1W to 5W), and bus level offsets of the power supply controller (the level typically changes from 0V to 0.3V or from 3.3V to 3.0V).
[0057] Step S4: Acquisition and correction of real-time physical feedback signals During the pre-initialization operation (i.e., within 1 to 100 milliseconds after the execution of the first hardware initialization instruction), real-time physical feedback signals of the target hardware components are acquired through sensing elements.
[0058] The sensing element is at least one of a Hall effect sensor, an electromagnetic induction coil, a current sensing resistor, a voltage divider sampling circuit, and an optocoupler. The sensing element is disposed around the target hardware component (e.g., attached to the surface of the VRM power inductor, or surrounding the memory clock signal line) or integrated inside the target hardware component (e.g., a temperature sensor and a current sensor integrated inside the CPU).
[0059] The specific deployment methods and sampling parameters of each sensing element are as follows: Hall effect sensor (used to detect magnetic field strength caused by current change): attached to the power inductor surface of the CPU voltage regulation module, with a sensitivity of 10mV / G (millivolts / gauss), a sampling frequency of 1MHz, and converts analog signals into 12-bit digital signals through ADC (analog-to-digital converter).
[0060] Electromagnetic induction coil (used to detect electromagnetic radiation from high-frequency clock signals): It is wrapped around the leads of the clock generation circuit of the memory module. The coil has 5 to 10 turns and a sampling frequency of 100kHz. The radiation intensity value is obtained through spectrum analysis or peak detection.
[0061] Current sensing resistor (used to detect power supply circuit current): connected in series in the power supply circuit of the solid-state drive, with a resistance value of 1mΩ to 10mΩ. The voltage drop across the resistor is detected by a differential amplifier, and then converted into a 12-bit digital signal by an ADC to calculate the instantaneous power consumption.
[0062] Voltage divider sampling circuit (used to detect bus level): It consists of a high-precision resistor divider network (division ratio 100:1) and an operational amplifier. The sampling frequency is 10kHz, and the output signal is converted into a 12-bit digital signal by an ADC.
[0063] The real-time physical feedback signal is a sequence of digital signals output by the aforementioned sensing elements. Taking current detection as an example, the acquired signal is a time series. ,in The number of sampling points (typically 100 to 1000 points) and the sampling time window are 1 to 10 milliseconds.
[0064] The real-time physical feedback signal is used as a correction factor input into the intelligent decision-making step to generate the second hardware initialization instruction. Specifically: When the real-time physical feedback signal indicates that the pre-initialization operation causes the signal integrity of the target hardware component to drop below the first threshold, the second hardware initialization instruction includes parameters to reduce the operating frequency of the target hardware component and enable hardware error correction codes.
[0065] The quantitative metric for signal integrity is the bit error rate (BER). The bit error rate is calculated as follows: before and after the pre-initialization operation, a known test data sequence (e.g., a pseudo-random binary sequence PRBS-31) is sent through the data bus of the target hardware component. The sent data and received data are compared, and the proportion of erroneous bits to the total number of transmitted bits is counted.
[0066] The first threshold is the signal bit error rate. When the bit error rate calculated from the real-time physical feedback signal is higher than... (For example, due to excessive voltage ripple causing a data transmission error rate of 100%) The signal integrity is determined to have decreased to below the first threshold.
[0067] At this point, the second hardware initialization instruction includes the following parameters: Reduce the operating frequency of the target hardware components by 10% to 30% of the current frequency; Enable hardware error correction codes (for memory, enable ECC check; for data transfer, enable CRC check).
[0068] For example, if the current memory operating frequency is 3200MHz, it can be reduced to 2240MHz to 2880MHz (a reduction of 10% to 30%). After the frequency is reduced, the timing margin for signal transmission increases, and the bit error rate decreases accordingly.
[0069] After the parameters of the target hardware component are corrected according to the second hardware initialization instruction, the secondary feedback signal of the corrected target hardware component is re-acquired. The acquisition method of the secondary feedback signal is the same as that of the real-time physical feedback signal, and it is executed within 1 to 10 milliseconds after the correction is completed.
[0070] When the secondary feedback signal indicates that the signal integrity has recovered to above the second threshold, an accelerated boot command is generated. The second threshold is the signal bit error rate. When the bit error rate calculated from the secondary feedback signal is lower than... At that time, it was determined that the signal integrity had been restored to an acceptable level.
[0071] The accelerated boot command is used to skip subsequent redundant hardware self-test steps. Specifically, in the BIOS / UEFI POST process, several hardware self-test items that are normally required to be performed (such as memory integrity tests, hard drive self-tests, etc.) can be skipped, and the system can directly enter the operating system boot stage. After skipping the self-test steps, the boot time can be reduced by 20% to 40%.
[0072] Handling of repair failures: If, after parameter correction is completed according to the second hardware initialization instruction, the secondary feedback signal still indicates that the signal integrity is lower than the second threshold (i.e., the bit error rate is still higher than the second threshold), then the signal integrity is lower than the second threshold. If ), then the following processing will be performed: (1) Further reduce the operating frequency of the target hardware component by 5% each time until the signal integrity is restored to above the second threshold or the frequency drops to below 50% of the initial frequency; (2) If the signal integrity cannot be restored even if the frequency drops to less than 50% of the initial frequency, it is determined that the target operating system cannot be stably started under the current hardware conditions. The target operating system is switched to the alternative operating system, and steps S3 and S4 are executed again.
[0073] It should be noted that, based on the comparison relationship between the bit error rate and the first and second thresholds, the signal integrity state corresponding to the real-time physical feedback signal includes three processing scenarios: Scenario 1, good signal integrity: When the bit error rate calculated by the real-time physical feedback signal is lower than the second threshold, it is determined that the pre-initialization operation has not caused signal degradation, no correction operation is required, the boot loading in step S5 is executed directly, and the accelerated boot instruction is generated to skip the subsequent hardware self-test steps.
[0074] Scenario 2, Signal Integrity Critical: When the bit error rate calculated by the real-time physical feedback signal is between the first threshold and the second threshold, it is determined that the pre-initialization operation has caused slight signal degradation but has not reached the level that requires correction. The boot loading is performed with the current pre-initialization parameters, the accelerated boot instruction is not generated, and all hardware self-test steps are executed normally. At the same time, this status information is recorded to the historical startup data for subsequent model optimization.
[0075] Scenario 3, Severe Signal Integrity Insufficiency: When the bit error rate calculated by the real-time physical feedback signal is higher than the first threshold, the second hardware initialization instruction is generated to perform standard correction, reducing the current frequency by 10% to 30% and enabling the hardware error correction code; after correction, the secondary feedback signal is re-acquired. If the bit error rate is lower than the second threshold, the accelerated boot instruction is generated; if the bit error rate is between the first threshold and the second threshold, the accelerated boot instruction is not generated, and boot loading is performed with the corrected parameters; if the bit error rate is still higher than the first threshold, the frequency is further reduced until the condition is met or the alternative operating system is switched.
[0076] Fourth implementation method: Graphical interactive interface In this embodiment, after determining the target operating system in step S2 and before step S3, a graphical selection interface is generated and displayed.
[0077] The generation of the graphical selection interface is driven by the GraphicsOutput Protocol (GOP) in the BIOS / UEFI firmware. The interface contains identification information of the target operating system (operating system name and icon) and identification information of alternative operating systems (names and icons of all other detected bootable operating systems).
[0078] The graphical selection interface includes a countdown timer control with a timer range of 5 to 30 seconds (default value is 10 seconds). The countdown timer displays the remaining time as numbers or a progress bar.
[0079] The interface interaction logic is as follows: If no user selection is detected within the countdown control's timeout range (i.e., the user does not select any operating system via keyboard, mouse, or touchscreen), the target operating system determined in step S2 will be automatically used as the final operating system to be launched. If a user selection is detected within the countdown control's timer range (the user selects an operating system by clicking or pressing a key), the user-selected operating system will replace the original target operating system as the final operating system to be launched.
[0080] The operating system information selected by the user is recorded in NVRAM as part of the historical boot data and used for subsequent training of the intelligent decision-making model.
[0081] The countdown control's timing range is set to 5 to 30 seconds, with a default value of 10 seconds. The lower limit of 5 seconds ensures that users have enough reaction time to make a selection, while the upper limit of 30 seconds avoids waiting too long and affecting startup efficiency.
[0082] Fifth implementation method: Pre-configuration of startup parameters In this embodiment, before the target operating system is booted in step S5, a boot parameter pre-configuration step is performed.
[0083] Obtain the pre-configured boot parameters corresponding to the target operating system. The pre-configured boot parameters include at least one of the following: memory allocation strategy, device driver loading strategy, and peripheral initialization strategy.
[0084] (1) Memory allocation strategy: Pre-allocate memory space for each operating system. The memory allocation policy includes the lower and upper limits of the memory capacity allocated to the target operating system.
[0085] The minimum memory capacity is 20% of the computer's total memory capacity. For example, for a computer with a total memory capacity of 16GB, the target operating system can obtain at least 3.2GB of memory space; The maximum memory capacity is 80% of the computer's total memory capacity. For example, for a computer with a total memory capacity of 16GB, the target operating system can obtain a maximum of 12.8GB of memory space.
[0086] Memory allocation is achieved through the BIOS / UEFI memory mapping function, which marks memory regions with specified address ranges as "Reserved" before the operating system is loaded, ensuring that memory spaces between different operating systems are isolated from each other.
[0087] The minimum memory capacity is set to 20% of the computer's total memory capacity to ensure the minimum operating requirements of the target operating system. This value is determined based on statistics of the minimum memory requirements of mainstream operating systems. The maximum memory capacity is set to 80% to reserve at least 20% of the memory space for use by other systems or firmware.
[0088] (2) Device driver loading strategy: Based on the target operating system type and preset configuration, the system determines which device drivers to load during the startup phase. For example, for operating systems designed for gaming, high-performance graphics card and audio drivers are preloaded; for operating systems designed for office use, network and printer drivers are preloaded.
[0089] (3) Peripheral initialization strategy: Depending on the target operating system type and preset configuration, determine which peripheral interfaces to enable or disable. For example, for an operating system suitable for a development scenario, enable all USB and serial interfaces; for an operating system suitable for a home scenario, disable unnecessary debugging interfaces to improve security.
[0090] Sixth implementation method: Fault tolerance for boot loading and startup failures Step S5: Bootloader Obtain the boot information of the target operating system and boot the target operating system based on the corrected hardware state.
[0091] The boot information is obtained by the BIOS / UEFI firmware searching for the corresponding EFI boot file or Master Boot Record (MBR) in the storage medium based on the identifier of the target operating system.
[0092] Once the boot file is located, the BIOS / UEFI firmware loads the boot file into a predetermined address in the system memory, transfers control to the boot file, and the boot file continues the operating system loading process.
[0093] Startup failure handling process: After the target operating system boots, its boot status is monitored. This is done by setting a boot watchdog timer with a timeout of 30 to 120 seconds (default is 60 seconds). If the target operating system successfully boots and sends a boot success signal to the BIOS / UEFI firmware before the watchdog timer expires, the boot is considered successful; otherwise, the boot is considered a failure.
[0094] If the target operating system fails to boot, a backup operating system is selected according to the preset backup strategy: Backup Strategy 1: Select the operating system with the highest boot success rate from historical boot data. Calculate the boot success rate (number of successful attempts / total number of attempts) for each operating system from historical boot data, and select the operating system with the highest success rate as the backup operating system. Alternative Strategy 2: Select the alternative operating system chosen by the user in the graphical selection interface (if the user has made a selection within the countdown period).
[0095] Obtain the boot information of the backup operating system and boot from it.
[0096] A boot failure log is recorded, which includes: the cause of failure (such as corrupted boot files, hardware initialization failure, timeout, etc.), environmental information at the time of failure (environmental information collected in step S1), and real-time physical feedback signals of the target hardware components (signal data collected in step S4). The boot failure log is stored in the storage unit of NVRAM or BMC for subsequent fault analysis and model optimization.
[0097] The watchdog timer's timeout is determined based on statistics of the average boot time of mainstream operating systems on solid-state drives, with a margin of 2 to 4 times.
[0098] Seventh implementation method: Remote management In this embodiment, remote management functionality is achieved through a Baseboard Management Controller (BMC).
[0099] The baseboard management controller communicates with the computer's BIOS / UEFI firmware via an LPC (Low Pin Count) bus, an SPI (Serial Peripheral Interface) bus, or a PCIe bus.
[0100] The remote management process is as follows: Step R1: The baseboard management controller receives remote management commands from a remote management terminal (such as a management server or administrator computer). These commands are transmitted over a network (such as a LAN or WAN) and encapsulated using the IPMI (Intelligent Platform Management Interface) or Redfish protocol. The remote management commands contain identification information for the specified operating system (such as the operating system name or ID) or startup policy information (such as "Enter maintenance mode on next startup").
[0101] Step R2: The baseboard management controller sends a boot order setting command to the computer's BIOS / UEFI firmware according to the remote management instructions. The boot order setting command contains a modified boot order list, which moves the boot item corresponding to the specified operating system to the first position.
[0102] Step R3: The baseboard management controller will use the specified operating system or the operating system determined according to the boot strategy information as the target operating system, overriding the target operating system determined by the intelligent decision in step S2.
[0103] Step R4: The baseboard management controller records the remote management operation log, including information such as operation time, operator identity, instruction content, and execution result.
[0104] The remote management function allows administrators to remotely adjust the boot order and target operating system of multiple systems without directly touching the computer, making it particularly suitable for server clusters and data center scenarios.
[0105] Eighth Implementation Method: Data Recording and Model Update Step S6: Data Recording Record the environment information for this startup (the complete environment information vector collected in step S1) and the identifier of the operating system that is started (the operating system that is actually started in the end, which may be determined by intelligent decision-making, selected by the user, or specified by remote management).
[0106] The above information is appended to the historical boot database as a new boot record. The boot result (success / failure) and boot time (milliseconds from step S1 to operating system readiness) are also recorded.
[0107] Online model updates (optional): At predetermined intervals (e.g., every 100 new records or every 30 days), the scene recognition model is incrementally trained or fine-tuned using accumulated historical startup data, enabling the model to adapt to changes in user habits. During incremental training, a small learning rate (e.g., 1 / 10 of the initial learning rate) is used to perform a limited number of iterative optimizations based on the existing model parameters.
[0108] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A method for booting a computer with multiple operating systems, characterized in that, Includes the following steps: Step S1: In response to the computer's startup command, collect environmental information in the pre-boot environment. The environmental information includes at least one of time information, location information, network environment information, peripheral access information, biometric information, and sensor data. Step S2: Based on the environmental information, determine the target operating system according to intelligent decision-making rules. The intelligent decision-making rules include: inputting the environmental information into a scene recognition model trained based on a machine learning algorithm to obtain the predicted scene type, and determining a first candidate operating system according to a preset correspondence between the scene type and the operating system; and matching the currently collected environmental information with historical startup data for similarity, selecting the operating system corresponding to the historical startup record with the highest similarity as a second candidate operating system; and determining the target operating system from the first candidate operating system and the second candidate operating system according to a preset fusion strategy. Step S3: Generate a first hardware initialization instruction according to the preset configuration parameters of the target operating system, execute the first hardware initialization instruction, and perform a pre-initialization operation on the target hardware component. The pre-initialization operation causes a physical state change in the target hardware component. Step S4: During the pre-initialization operation, the real-time physical feedback signal of the target hardware component is collected by the sensing element, and the real-time physical feedback signal is used as a correction factor to input the intelligent decision-making step to generate a second hardware initialization instruction. The second hardware initialization instruction is executed to dynamically correct the initialization parameters of the target hardware component. Step S5: Obtain the boot information of the target operating system, and boot and load the target operating system based on the corrected hardware state; Step S6: Record the environment information and the operating system identifier of this startup, and update the historical startup data.
2. The computer boot method for multiple operating systems according to claim 1, characterized in that, The target hardware component includes at least one of the following: a voltage regulation module of a central processing unit, a clock generation circuit of a memory module, a power management chip of a solid-state drive, and a power supply controller for a peripheral interface; the physical state change includes at least one of the following: output voltage ripple change of the voltage regulation module, electromagnetic radiation intensity change of the clock generation circuit, instantaneous power consumption fluctuation of the power management chip, and bus level offset of the power supply controller; the sensing element is at least one of the following: a Hall effect sensor, an electromagnetic induction coil, a current sensing resistor, a voltage divider sampling circuit, and an optocoupler, and the sensing element is disposed around the target hardware component or integrated inside the target hardware component.
3. The computer boot method for multiple operating systems according to claim 1, characterized in that, The generation of the second hardware initialization instruction in step S4 specifically includes: when the real-time physical feedback signal indicates that the pre-initialization operation causes the signal integrity of the target hardware component to be between a second threshold and a first threshold, boot loading is performed with the current pre-initialization parameters; when the real-time physical feedback signal indicates that the pre-initialization operation causes the signal integrity of the target hardware component to drop below the first threshold, the second hardware initialization instruction includes parameters for reducing the operating frequency of the target hardware component and enabling hardware error correction codes; after the parameters of the target hardware component are corrected according to the second hardware initialization instruction, the secondary feedback signal of the corrected target hardware component is re-acquired; when the secondary feedback signal indicates that the signal integrity has recovered to above the second threshold, an accelerated boot instruction is generated, which is used to skip the subsequent hardware self-test steps; when the secondary feedback signal indicates that the signal integrity is between the second threshold and the first threshold, no accelerated boot instruction is generated, and boot loading is performed with the corrected parameters.
4. The computer boot method for multiple operating systems according to claim 3, characterized in that, The first threshold is the signal bit error rate 1×10 -9 The second threshold is the signal bit error rate 1×10⁻⁶. -12 The reduction in operating frequency is 10% to 30% of the current frequency.
5. The computer boot method for multiple operating systems according to claim 1, characterized in that, After determining the target operating system in step S2 and before step S3, the method further includes: generating and displaying a graphical selection interface, which contains the identification information of the target operating system and the identification information of alternative operating systems. The graphical selection interface is equipped with a countdown control, the countdown control having a timing range of 5 to 30 seconds. If no user selection operation is detected within the timing range of the countdown control, the target operating system is automatically used as the final operating system to be launched. If a user selection operation is detected within the timing range of the countdown control, the operating system selected by the user replaces the target operating system as the final operating system to be launched.
6. The computer boot method for multiple operating systems according to claim 1, characterized in that, After the target operating system is loaded and started in step S5, the process also includes a startup failure handling procedure: monitoring the startup status of the target operating system; if the startup failure of the target operating system is detected, a backup operating system is selected according to a preset backup strategy. The backup strategy is to select the operating system with the highest startup success rate in the historical startup data, or to select the alternative operating system selected by the user in the graphical selection interface; obtaining the boot information of the backup operating system and loading the backup operating system to start. Record a startup failure log, which includes the reason for the failure, environmental information at the time of the failure, and real-time physical feedback signals of the target hardware component.
7. The computer boot method for multiple operating systems according to claim 1, characterized in that, The pre-boot environment is a unified extensible firmware interface pre-boot environment or a basic input / output system boot environment; the collection of the environment information is performed by the computer's basic input / output system or unified extensible firmware interface firmware calling the underlying hardware interface; the historical boot data is stored in the computer's non-volatile random access memory or the storage unit of the baseboard management controller.
8. The computer boot method for multiple operating systems according to claim 1, characterized in that, The method further includes a remote management step performed by a baseboard management controller: the baseboard management controller receives a remote management instruction from a remote management terminal, the remote management instruction containing identification information or startup policy information of a specified operating system; The baseboard management controller sends a boot order setting command to the computer's basic input / output system or unified extensible firmware interface according to the remote management instruction, so as to adjust the boot order list; The baseboard management controller uses the specified operating system or the operating system determined according to the boot strategy information as the target operating system, overriding the target operating system determined in step S2; The baseboard management controller records remote management operation logs.
9. The computer boot method for multiple operating systems according to claim 1, characterized in that, The training process of the scene recognition model in step S2 includes: collecting environmental information samples from multiple historical startup scenarios, labeling each environmental information sample with a corresponding scene type label, wherein the scene type includes at least one of office scene, home scene, game scene, and development scene; dividing the labeled environmental information samples into training set and validation set, and using support vector machine, random forest, or deep neural network algorithm for model training; during the model training process, using the collection time, collection location, network identifier, and peripheral type of the environmental information samples as input features, and the scene type label as output target, iteratively optimizing the model parameters until the validation set accuracy is not less than 95%.
10. A computer boot system with multiple operating systems, characterized in that, include: An environmental information acquisition module is used to acquire at least one type of environmental information in a pre-boot environment of a computer, wherein the environmental information includes at least one of time information, location information, network environment information, peripheral access information, biometric information, and sensor data. The intelligent decision-making module is used to determine the target operating system based on the environmental information and intelligent decision-making rules. The intelligent decision-making module includes a scene recognition subunit and a history matching subunit. The scene recognition subunit has a built-in scene recognition model trained based on machine learning algorithms, which is used to obtain the predicted scene type and determine the corresponding target operating system based on the environmental information. The history matching subunit is used to perform similarity matching between the currently collected environmental information and historical startup data and select the operating system corresponding to the historical startup record with the highest similarity as the target operating system. The hardware feedback adjustment module is used to generate and execute a first hardware initialization instruction based on the preset configuration parameters of the target operating system to perform a pre-initialization operation on the target hardware component. During the execution of the pre-initialization operation, the module collects the real-time physical feedback signal of the target hardware component through a sensing element, inputs the real-time physical feedback signal as a correction factor into the intelligent decision module, generates a second hardware initialization instruction, and executes it to dynamically correct the initialization parameters of the target hardware component. The boot execution module is used to obtain the boot information of the target operating system and boot the target operating system based on the corrected hardware state. The data recording module is used to record the environment information and the operating system identifier of this startup, and update the historical startup data; The baseboard management controller is communicatively connected to the intelligent decision-making module and the boot execution module, and is used to receive remote management instructions and adjust the boot order list or overwrite the target operating system according to the remote management instructions.
