A system and method for restoring simultaneous interpretation across multiple operating systems in an educational computer lab, based on qcow2 snapshots and differential simultaneous interpretation.

By using a method based on qcow2 snapshots and differential simultaneous transmission, and employing the FastCDC algorithm and rate-aware scheduling, the problems of long switching times and redundant transmission in multi-operating system environments in educational computer labs were solved, achieving second-level switching and efficient and stable system deployment.

CN123123358APending Publication Date: 2026-11-17SHENZHEN THINPUTER TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611234562.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-14
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

Existing technologies suffer from problems such as long switching times, redundant data transmission, network bandwidth limitations, and insufficient compatibility with domestically developed operating systems when switching between multiple operating system environments in educational computer labs, making it difficult to meet the requirements for rapid deployment and stability.

Method used

The method adopts qcow2 snapshot and differential simultaneous transmission, which creates multiple snapshot restore points, uses the FastCDC algorithm for dynamic block division, and combines rate-aware weighted scheduling algorithm to optimize the transmission path, thereby achieving zero-copy data reuse and fast system switching.

Benefits of technology

It enables second-level switching between multiple operating system environments, reduces the amount of data transmitted over the network and the burden of disk writing, and improves the efficiency, stability, and large-scale deployment efficiency of course transitions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123123358A_ABST
    Figure CN123123358A_ABST
Patent Text Reader

Abstract

This invention relates to the field of data simultaneous interpretation technology, and discloses a multi-operating system and method for simultaneous interpretation and restoration in educational computer labs based on qcow2 snapshots and differential simultaneous interpretation. The method includes packaging the target operating system into a qcow2 format virtual disk file after installation and configuration; and creating multiple snapshots as restoration points for the system template based on the built-in snapshot function of qcow2, with each restoration point corresponding to a course or usage scenario. This invention deeply integrates the qcow2 built-in snapshot mechanism with content-defined segmented differential technology, enabling multi-operating system switching in educational computer labs to no longer rely on full data copying. Each restoration point only stores the difference data relative to the parent snapshot. During switching, only the snapshot pointer needs to be modified and the backing file chain needs to be rebuilt, without moving or copying large amounts of disk data, greatly improving the efficiency of course transitions and experimental environment preparation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data simultaneous interpretation technology, and in particular to a simultaneous interpretation and restoration system and method for multiple operating systems in educational computer labs based on qcow2 snapshots and differential simultaneous interpretation. Background Technology

[0002] In educational computer labs and multimedia classrooms, it is often necessary to quickly switch between different operating systems and software environments according to the course schedule. Traditional methods include using restore cards, multiple physical hard drives, installing a single system on each machine, or full network cloning. However, restore cards rely on specific hardware and have a limited number of restore points, multiple physical hard drive solutions are costly and difficult to maintain, and full network cloning requires transferring the complete disk image each time, which is time-consuming in scenarios with limited network bandwidth and multiple computer labs operating concurrently.

[0003] Currently, there are some technical solutions based on virtual disk snapshots and incremental transmission, but most of them use fixed block partitioning, which is not precise enough in identifying data changes between snapshots, resulting in a large amount of redundant transmission in incremental data. At the same time, when switching snapshots, a large amount of actual disk data often needs to be copied, resulting in long switching times and failing to meet the needs of rapid transitions between classes. In addition, most existing simultaneous interpretation systems only support the Windows platform and lack effective adaptation to domestically developed operating systems (such as UnionTech UOS and Kylin systems). Furthermore, the peer-to-peer transmission scheduling strategy does not fully consider the differences in node rates in a mixed network environment, which can easily lead to high-speed nodes being dragged down by low-speed nodes, making it difficult to balance efficiency and stability in large-scale deployments. Summary of the Invention

[0004] This invention provides a multi-operating system and method for simultaneous interpretation and restoration in educational computer labs based on qcow2 snapshots and differential simultaneous interpretation to solve the problem of rapid simultaneous interpretation deployment and second-level switching in multi-operating system environments.

[0005] To address the aforementioned technical problems, according to one aspect of the present invention, more specifically, a method for restoring multi-operating system simultaneous interpretation in educational computer labs based on qcow2 snapshots and differential simultaneous interpretation, the method supporting the creation of new snapshots, switching between different snapshots, and deleting useless snapshots at runtime, specifically including the following steps: Step S1: After the target operating system is installed and configured, package it into a virtual disk file in qcow2 format; Step S2: Based on the built-in snapshot function of qcow2 format, create multiple snapshots as restore points for the system template. Each restore point corresponds to a course or use case. The snapshots are linked through a backing file chain, and each snapshot only stores the difference data relative to the parent snapshot. Step S3: The content-defined chunking algorithm (FastCDC algorithm) is used to dynamically chunk the qcow2 file with snapshots to generate a seed file containing metadata of each data block; in the seed file, the metadata of each data block (Chunk) contains the snapshot version identifier to which the data block belongs; Step S4: The receiving end scans the existing qcow2 files locally, identifies reusable data blocks by using data block hash ratio (Chunk hash comparison), and achieves zero-copy reuse by using file system block cloning operations; Step S5: Distribute the missing data blocks through the P2P network and optimize the transmission path using a rate-aware weighted scheduling algorithm; Step S6: The terminal device loads the local qcow2 file through the bootloader, reconstructs the backing file chain corresponding to the target snapshot based on the snapshot version identifier in the seed file, provides a restore point selection interface, and starts the corresponding system environment.

[0006] Furthermore, in step S1, the target operating system includes Windows, Linux, and domestically developed operating systems, including Tongxin UOS, Kylin OS, and Zhongke Fangde OS.

[0007] Furthermore, in step S2, the restore point creation strategy includes time-triggered creation, event-triggered creation, and manual creation; the events include software installation completion, system configuration update, and the node before the course starts.

[0008] Furthermore, in step S3, the content definition chunking algorithm (FastCDC algorithm) adopts a sliding window strategy based on Gear hashing, with a minimum data block (Chunk) size of 16KB, an average data block (Chunk) size of 128KB, and a maximum data block (Chunk) size of 1MB; the seed file records the hash value, offset, size, and snapshot version information of each data block (Chunk).

[0009] Furthermore, in step S4, the block cloning operation includes the copy_file_range system call in Linux and the FSCTL_DUPLICATE_EXTENTS_TO_FILE operation in Windows, enabling cross-platform zero-copy data reuse.

[0010] Furthermore, in step S5, the weight calculation formula for the rate-aware weighted scheduling algorithm is as follows: ; In the above formula, Negotiate the network interface speed for the peer; For gigabit matching weighting, when the local speed is ≥1000 and the peer speed is ≥1000... ,otherwise ; This represents the number of pending requests for the peer. This represents the round-trip time of the peer.

[0011] Furthermore, in step S6, the restore point selection interface provides the restore point name, creation time, occupied space, and applicable course information, and supports displaying the inheritance relationship between snapshots in a list or tree structure. After the user selects the target restore point by keyboard or mouse, the terminal automatically loads the corresponding snapshot chain and starts the operating system.

[0012] Furthermore, switching between different snapshots requires a system restart. The switching process includes the following sub-steps: Step 1: Save the current system state to a temporary snapshot; Step 2: Load the target snapshot metadata; Step 3: Rebuild the virtual disk chain and update the boot configuration; during the switching process, the actual disk data is not copied, only the snapshot pointer of the qcow2 file is modified.

[0013] A multi-operating system simultaneous interpretation restoration system for educational computer labs based on qcow2 snapshots and differential simultaneous interpretation includes: The template encapsulation module is used to encapsulate the operating system into a qcow2 format virtual disk file; The snapshot management module is used to create, delete, and switch different restore points based on the built-in snapshot function of qcow2, so as to quickly prepare the computer environment. The seed generation module is used to generate seed files with snapshot qcow2 files using the content definition chunking algorithm (FastCDC algorithm); The incremental comparison module is used to scan local files and identify reusable data blocks; The differential simultaneous transmission module is used to distribute missing data blocks through a P2P network to achieve rate-aware scheduling. The terminal boot module is used to provide a restore point selection interface and load the corresponding system environment.

[0014] This invention provides a multi-operating system and method for simultaneous interpretation restoration in educational computer labs based on qcow2 snapshots and differential simultaneous interpretation. Compared with existing technologies, this method achieves the following advantages: 1. This invention deeply integrates the built-in snapshot mechanism of qcow2 with content-defined chunked differential technology, eliminating the need for full data copying when switching between multiple operating systems in educational computer labs. Each restore point only stores the difference data relative to the parent snapshot. During switching, only the snapshot pointer needs to be modified and the backing file chain needs to be rebuilt, without moving or copying large amounts of disk data. This reduces the system environment switching time to less than 30 seconds, greatly improving the efficiency of course transitions and experimental environment preparation.

[0015] 2. This invention utilizes chunk hash comparison to identify existing data blocks locally on the terminal and achieves zero-copy reuse through file system-level block cloning operations. This allows the receiving end to only download locally missing difference data blocks when receiving simultaneous transmission tasks. This mechanism significantly reduces the amount of data transmitted over the network and the disk write burden. Especially when multiple operating system images are deployed simultaneously in large-scale data centers, it effectively reduces the risk of network congestion and storage wear, and extends the lifespan of the terminal's solid-state drive.

[0016] 3. This invention introduces a rate-aware weighted scheduling algorithm. By comprehensively evaluating the network interface card negotiation rate, gigabit matching degree, number of pending requests, and round-trip latency of peer nodes, it dynamically selects the best data source nodes and prioritizes establishing transmission channels between high-speed nodes. This scheduling strategy effectively avoids the problem of high-speed nodes being dragged down by low-speed nodes in traditional random scheduling. This ensures that in a network environment with a mix of gigabit and 100 Mbps speeds, the overall distribution throughput can be stably maintained at a level close to gigabit line speed, guaranteeing the smooth completion of large-scale concurrent transmission tasks. Attached Figure Description

[0017] Figure 1 This is a flowchart of the multi-operating system simultaneous interpretation restoration method for educational computer labs based on qcow2 snapshots and differential simultaneous interpretation, according to the present invention. Figure 2 This is a block diagram of the overall system architecture of the present invention; Figure 3 This is a schematic diagram illustrating the relationship between the qcow2 snapshot chain and the restore point in this invention; Figure 4 This is a schematic diagram of the rate-sensing differential simultaneous transmission scheduling of the present invention. Detailed Implementation

[0018] To make the technical solution of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. Example

[0019] like Figure 1 As shown, according to one aspect of the present invention, a method for simultaneous interpretation / restoration of multiple operating systems in an educational computer lab based on qcow2 snapshots and differential simultaneous interpretation is provided, comprising the following steps S1 to S7.

[0020] Step S1: System Template Encapsulation Stage In this embodiment, after the target operating system is installed and configured in step S1, it is packaged into a virtual disk file in qcow2 format. Specifically, a virtual machine is created using the QEMU virtualization platform on a teacher's computer or a dedicated server, and the complete installation and basic software configuration of the target operating system are completed in the virtual machine. The target operating system includes Windows systems (such as Windows 10, Windows 11), Linux systems (such as Ubuntu, CentOS), and domestically developed operating systems such as UnionTech UOS, Kylin OS (such as Galaxy Kylin, NeoKylin), and Zhongke Fangde OS. During packaging, special optimizations are needed for the boot method and driver compatibility of domestically developed systems. Specifically, for UnionTech UOS and Kylin systems, UEFI boot mode needs to be enabled in the virtual machine configuration and the virtio driver needs to be loaded to ensure that the packaged qcow2 file can be started normally on terminal devices with different hardware configurations; for Zhongke Fangde OS, its dedicated kernel boot parameters also need to be configured. After packaging, the qemu-img tool is used to export the virtual machine's disk into a standard qcow2 format file as the base image template. This base image file contains complete disk data of the operating system, including the boot partition, system partition, and all installed software.

[0021] Step S2, Multiple Restore Point Creation Stage like Figure 3 As shown, step S2, based on the built-in snapshot function of the qcow2 format, creates multiple snapshots as restore points for the system template. Each restore point corresponds to a course or usage scenario. The qcow2 format supports snapshot creation via Copy-on-Write (COW) mechanism. Specifically, when a snapshot is created, the system generates a new blank qcow2 file as the currently active layer, whose backing file points to the parent image file. The parent image file is set to read-only, and all subsequent write operations occur only in the new qcow2 file. Unmodified data blocks are shared between snapshots, and each snapshot only stores the differences relative to the parent snapshot.

[0022] Restore point creation strategies include three methods: time-triggered creation, event-triggered creation, and manual creation. Time-triggered creation refers to automatically creating restore points according to a preset time period (such as every Monday at 2:00 AM); event-triggered creation refers to automatically creating restore points when a specific event occurs, including key milestones such as software installation completion, system configuration updates, and before the start of a course. For example, when a teacher completes the installation of Office software in the template system, the system automatically detects the software installation event and triggers the creation of a restore point; manual creation refers to administrators manually generating restore points by clicking the create button through the web interface of the centralized management platform.

[0023] In this embodiment, multiple restore points are created for the same base image template. For example: Snapshot 1 is an initial clean system (suitable for computer fundamentals courses), Snapshot 2 is an office software environment (with the Office suite installed, suitable for office automation and secretarial practice courses), Snapshot 3 is a programming development environment (with development tools such as VS Code, JDK, and Python installed, suitable for Java programming and Python data analysis courses), Snapshot 4 is an examination-specific environment (with the examination client installed and system configuration locked, suitable for final exams and certification exams), Snapshot 5 is a design software environment (with design tools such as Photoshop and CAD installed, suitable for design courses), and Snapshot 6 is a domestic operating system environment (based on UnionTech UOS or Kylin system, suitable for domestic operating system application courses).

[0024] Step S3: Content Definition and Segmentation Seed Generation Stage In this embodiment, step S3 uses the FastCDC (Fast Content-Defined Chunking) algorithm to dynamically chunk the snapshotted qcow2 file, generating a seed file containing chunk metadata. The FastCDC algorithm is a content-defined chunking algorithm that determines chunk boundaries by calculating the hash value of the data content, rather than relying on a fixed offset, thereby ensuring that the boundaries of unchanged data blocks remain stable when the data content undergoes local changes.

[0025] Specifically, the FastCDC algorithm employs a sliding window strategy based on Gear hashing. Starting from the beginning of the data stream, the algorithm scans the data stream byte by byte within a sliding window, calculating the Gear hash value for each byte. When the hash value meets a preset mask condition, the location is marked as a block boundary. To ensure reasonable block sizes, the algorithm sets constraints on minimum, average, and maximum chunk sizes: a minimum chunk size of 16KB, an average chunk size of 128KB, and a maximum chunk size of 1MB. When no block boundary meeting the conditions is found within the sliding window and the current block size is close to the maximum chunk size, a forced split is performed at that location. Through these parameter configurations, efficient identification of snapshot differences is ensured, enabling precise capture of small-scale data changes (such as software installations of several hundred MB) while avoiding excessive small blocks that could lead to metadata bloat.

[0026] The seed file records the hash value (using SHA-256 or a similar secure hash algorithm), offset (the starting position of the chunk in the qcow2 file), size (the actual number of bytes in the chunk), and snapshot version information (which snapshot version the chunk belongs to) for each chunk. The seed file is stored in a structured format (such as JSON or binary format) for easy parsing and indexing by the subsequent incremental comparison module. For qcow2 files containing multiple snapshots, the seed file organizes the chunk index according to snapshot versions, with the same data block sharing the same hash value identifier across different snapshot versions.

[0027] Step S4, Incremental Comparison and Local Reuse Phase In this embodiment, in step S4, the receiving end scans the existing qcow2 file locally, identifies reusable data blocks through Chunk hash comparison, and achieves zero-copy reuse by utilizing file system block cloning operations.

[0028] Specifically, when a student terminal needs to receive a system template and its snapshot, the terminal first scans the existing qcow2 files in local storage (possibly from simultaneous interpretation tasks in previous courses) and extracts the chunk hash indexes of these files. Then, it compares the local chunk hash indexes with the chunk hash list in the seed file. For chunks with matching hash values, it means that the data block already exists locally and does not need to be transmitted over the network.

[0029] For reusable data blocks, zero-copy reuse is achieved using file system block cloning operations. The block cloning operation employs different system calls depending on the operating system platform: on Linux systems, the `copy_file_range` system call is used, which allows cloning a specified range of data from the source file to a specified location in the target file at the kernel level, without copying the data to user space; on Windows systems, the `FSCTL_DUPLICATE_EXTENTS_TO_FILE` control code is used, which is based on the block cloning mechanism of the ReFS or NTFS file systems, achieving the same zero-copy data reuse. Through this cross-platform zero-copy data reuse mechanism, when a data block with the same hash value already exists locally at the receiving end, the data block is directly reused in the target qcow2 file without actually writing data, significantly reducing disk I / O and transfer time.

[0030] Step S5, Rate-Aware Differential Simultaneous Transmission Stage like Figure 4 As shown, step S5 distributes the missing data blocks through the P2P network and optimizes the transmission path using a rate-aware weighted scheduling algorithm.

[0031] Specifically, the differential simultaneous interpretation system consists of a Tracker server and multiple Peer nodes (including the teacher's computer and each student's terminal). The Tracker server maintains the online status, available data block list, and network performance information of all Peer nodes. When a terminal needs to download a missing data block, it requests a list of available data sources from the Tracker server. The Tracker returns a set of information on Peer nodes that possess the data block and are active online. The terminal then downloads different data blocks from multiple Peer nodes in parallel to fully utilize network bandwidth.

[0032] The core of the rate-aware weighted scheduling algorithm lies in calculating a scheduling weight score for each candidate data source peer, with the peer having the highest weight score being preferentially selected as the data source. The weight calculation formula is as follows: ; In the above formula, This is the network interface card negotiation rate for the peer, measured in Mbps. This value is obtained through the network interface information reported by the terminal. For gigabit matching weighting, when the local speed is ≥1000 and the peer speed is ≥1000... ,otherwise The purpose of this weighting factor is to prioritize the establishment of transmission channels between gigabit nodes, so as to avoid high-speed nodes being dragged down by low-speed nodes. This is the number of pending requests for the Peer, which is the number of data block requests that the Peer is currently queuing for processing. The larger this value is, the busier the Peer is, and its priority should be reduced. The round-trip latency of the peer, in milliseconds, is measured by Ping or a more refined TCP probing method; the peer with the highest weight score is preferentially selected as the data source.

[0033] For example, in an educational computer lab with 30 terminals (20 gigabit terminals and 10 100 Mbps terminals), gigabit terminal A needs to download Chunk X. Available data sources include: gigabit terminal B (Score = 1000 / 10 + 50 - 0 - 2 = 148 points), 100 Mbps terminal D (Score = 100 / 10 + 0 - 0 - 2 = 8 points), and the teacher's computer (Score = 1000 / 10 + 50 - 15×5 - 1 = 74 points). The algorithm selects gigabit terminal B with the highest score as the priority data source, thus avoiding the problem of gigabit terminals waiting for the slow transmission of 100 Mbps terminals. Real-world testing shows that in a gigabit / 100 Mbps hybrid network environment, the average transmission speed of gigabit terminals using traditional random scheduling is approximately 100 Mbps (due to the drag from 100 Mbps nodes), while the average transmission speed of gigabit terminals using rate-aware scheduling can reach over 900 Mbps, improving efficiency by approximately 9 times.

[0034] Step S6: Terminal Booting and Snapshot Selection Stage In this embodiment, in step S6, the terminal device loads the local qcow2 file through the bootloader, provides a restore point selection interface, and starts the corresponding system environment.

[0035] The bootloader offers three methods: PXE network boot, UEFI local boot, and USB external boot. PXE network boot is suitable for initial deployment of a new terminal or recovery scenarios when the system is completely damaged. The terminal obtains an IP address and boot file location via DHCP and loads the bootloader from the network. UEFI local boot is suitable for daily use scenarios after the terminal has completed its initial deployment. The bootloader is installed in the terminal's EFI system partition and loads automatically upon startup. USB external boot is suitable for maintenance scenarios, where the administrator uses a pre-made USB boot disk to boot the terminal into the restore point selection interface.

[0036] The restore point selection interface provides the restore point name, creation time, occupied space, and applicable course information. It supports displaying the inheritance relationship between snapshots in a list or tree structure. The tree structure can intuitively show the hierarchical relationship of the snapshot chain. For example, multiple branches can be branched out from the base image, such as office software environment and programming development environment. Each branch can also have more detailed sub-snapshots. After the user selects the target restore point via keyboard or mouse, the terminal automatically loads the corresponding snapshot chain and starts the operating system. Specifically, the bootloader parses the snapshot metadata of the qcow2 file, sets the selected snapshot as the current active layer, and its backing file chain points to the base image and all its intermediate parent snapshots. Then, it starts a virtual machine through QEMU or a similar virtualization component, mounts the qcow2 file as a virtual disk, and boots the operating system.

[0037] Step S7, Snapshot Management and Switching Phase In this embodiment, step S7 supports creating new snapshots, switching between different snapshots, and deleting useless snapshots at runtime, thereby enabling flexible management of system status.

[0038] Switching between snapshots requires a system restart. The switching process includes the following sub-steps: Step 1: Save the current system state to a temporary snapshot. When the user selects to switch snapshots, the system first solidifies all disk write operations of the current running state and creates a temporary snapshot to save the current progress and prevent data loss. Step 2: Load the target snapshot metadata. The bootloader reads the target snapshot's metadata information from the qcow2 file, including the snapshot's L1 table, L2 table, snapshot name, creation time, backing file reference, etc. Step 3: Rebuild the virtual disk chain, update the boot configuration, set the target snapshot as the new active layer, rebuild the complete backing file chain from the base image to the target snapshot, and update the disk parameters in the boot configuration file.

[0039] During the switchover process, actual disk data is not copied; only the snapshot pointer of the qcow2 file is modified (i.e., the active layer's pointer and the backing file chain relationship are changed), achieving a fast switchover within 30 seconds. For restore points that are no longer needed, they can be deleted via snapshot management. Deletion removes the snapshot's metadata file and optionally merges (commits) its difference data into the parent snapshot to free up storage space.

[0040] Thus, this embodiment provides a complete implementation plan for a multi-operating system simultaneous interpretation / restoration method in educational computer labs based on qcow2 snapshots and differential simultaneous interpretation. Example

[0041] like Figure 2As shown, according to another aspect of the present invention, a multi-operating system simultaneous interpretation and restoration system for educational computer labs based on qcow2 snapshots and differential simultaneous interpretation is provided, applied to the above-described method embodiments. The system includes the following modules: a template encapsulation module, a snapshot management module, a seed generation module, an incremental comparison module, a differential simultaneous interpretation module, a terminal bootstrapping module, and a centralized management module.

[0042] The template packaging module is used to package an operating system into a qcow2 format virtual disk file. Deployed on a teacher's computer or dedicated server, this module provides a graphical or command-line interface to guide administrators through the following operations: selecting the installation media (ISO file or CD), configuring virtual machine parameters (CPU core count, memory size, disk size, network configuration), performing operating system installation and software deployment, and finally exporting the virtual machine disk as a standard qcow2 format file. This module is specifically optimized for compatibility with domestically developed operating systems (including UnionTech UOS, Kylin OS, and Zhongke Fangde OS). During the virtual machine creation phase, it automatically identifies the boot method (UEFI or Legacy BIOS) of the domestically developed system and configures the corresponding firmware parameters. At the driver level, it pre-installs common virtualization drivers such as virtio and e1000, ensuring that the packaged qcow2 file can boot normally on terminal devices with different hardware configurations.

[0043] The snapshot management module is used to create, delete, and switch different restore points based on the built-in snapshot function of qcow2, achieving the goal of quickly preparing the computer environment. This module implements CRUD operations on qcow2 file snapshots by calling the command-line interface of underlying tools such as qemu-img. Specific functions include: 1. Create Snapshot: Creates a new snapshot for the currently active layer, generating a new qcow2 file as the child layer, while the parent layer is set to read-only; 2. Delete snapshot: Removes the specified snapshot file. You can choose to merge (commit) the difference data into the parent snapshot or discard it directly. 3. Switch Snapshot: Set the specified snapshot as the currently active layer and rebuild the backing file chain; 4. Snapshot List: Displays detailed information (name, creation time, size, inheritance relationship) of all snapshots in a list or tree structure.

[0044] The snapshot management module supports three creation strategies: time-triggered creation (automatically creating snapshots at preset intervals), event-triggered creation (automatically creating snapshots when events such as software installation or system updates are detected), and manual creation (manually triggered by the administrator through the interface). This module also provides a snapshot chain integrity verification function, automatically checking the integrity of the backing file chain before snapshot switching to prevent startup failures due to missing intermediate snapshots.

[0045] The seed generation module generates seed files containing snapshot qcow2 files using the FastCDC algorithm. This module implements the complete FastCDC content definition chunking algorithm, employing a sliding window strategy based on Gear hashing. The minimum chunk size is 16KB, the average chunk size is 128KB, and the maximum chunk size is 1MB. The module reads the data content of each snapshot version of the qcow2 file sequentially, calculates chunk boundaries using the sliding window, calculates the SHA-256 hash value for each chunk, and records the chunk's offset, size, and the snapshot version information it belongs to. Metadata from all chunks is aggregated into a seed file and stored in a structured format. The seed generation module also supports incremental updates. When a new snapshot is added to the base template, only the difference data from the new snapshot is re-chunked; existing chunk metadata remains unchanged, avoiding redundant calculations.

[0046] The incremental comparison module scans local files and identifies reusable data blocks. Deployed on each student terminal, this module first performs a local scan upon receiving a simultaneous interpretation task. It iterates through all existing qcow2 files in the terminal's local storage, extracts the chunk hash indices of these files, and constructs a local hash database. Then, it compares the local hash indices with the chunk hash list in the seed file, marking reusable chunks with matching hash values. For chunks marked as reusable, the incremental comparison module further calls the file system block cloning interface to achieve zero-copy reuse: on Linux systems, it calls the `copy_file_range` system call, and on Windows systems, it calls the `FSCTL_DUPLICATE_EXTENTS_TO_FILE` control code. Through this mechanism, the terminal only needs to download chunks that do not exist locally, significantly reducing network transmission volume.

[0047] The differential simultaneous interpretation module is used to distribute missing data blocks over a P2P network, enabling rate-aware scheduling. This module consists of two parts: a Tracker submodule and a Peer submodule. The Tracker submodule is deployed on the server side, maintaining the registration information, online status, available chunk list, and network performance parameters (NIC negotiation rate, number of pending requests, round-trip latency) of all Peer nodes. The Peer submodule is deployed on each terminal and the teacher's computer, responsible for reporting its own status to the Tracker, requesting missing chunks from other Peers, and responding to chunk requests from other Peers.

[0048] The core of the differential simultaneous interpretation module is the rate-aware weighted scheduling algorithm. When a peer needs to download a certain chunk, it requests a list of available data sources from the tracker. The tracker returns a set of peer node information that owns that chunk. The peer then calculates a scheduling weight score for each candidate source, using the following formula: ; in, The network card negotiation speed (Mbps) for the peer. This is a gigabit matching weighting term (50 when both local and peer speeds are ≥1000, otherwise 0). This represents the number of pending requests for the peer. This represents the round-trip latency (in milliseconds) for the peer. The peer with the highest weight score is prioritized as the data source. This scheduling mechanism ensures that gigabit nodes are interconnected first, avoiding high-speed nodes being dragged down by low-speed nodes. In a gigabit / megabit hybrid network environment, it can increase the effective throughput from the megabit level to near gigabit line speed (>900Mbps).

[0049] The terminal boot module provides a restore point selection interface and loads the corresponding system environment. Deployed on the terminal as a bootable bootloader, it supports three boot methods: PXE network boot (suitable for new terminal deployment and system recovery), UEFI local boot (suitable for daily use), and USB external boot (suitable for maintenance scenarios). After the bootloader starts, it scans the qcow2 file and its snapshot information in local storage, displaying all available restore points in a graphical interface. This interface provides detailed information such as restore point name, creation time, occupied space, applicable courses, etc., and displays the inheritance relationship between snapshots in a list or tree structure. After the user selects a target restore point via keyboard or mouse, the terminal boot module automatically parses the snapshot metadata of the qcow2 file, sets the selected snapshot as the current active layer, reconstructs the complete backing file chain, and then loads and starts the corresponding operating system through the virtualization component.

[0050] The centralized management module is used to manage templates, snapshots, distribution tasks, and terminal devices through a web interface. This module provides a unified web management console, which administrators can access remotely via a browser to perform the following management operations: 1. Template Management: Upload, download, and delete system templates; view basic template information and snapshot list. 2. Snapshot Management: Create new snapshots for specified templates, delete snapshots, switch default snapshots, and merge snapshots; 3. Task Management: Create simultaneous interpretation and distribution tasks (select target template / snapshot, select target terminal group, set distribution strategy), view task progress, pause / resume / cancel tasks; 4. Terminal Management: View the online status, hardware configuration (network card speed, disk capacity), currently running snapshot version, and historical operation records of all terminals; 5. System Settings: Configure the P2P network Tracker address, scheduling algorithm parameters (coefficients in the weight formula), snapshot creation strategy (time trigger interval, event trigger rules), etc.

[0051] The centralized management module also provides statistical reporting functions, which can generate system template distribution efficiency reports, snapshot usage frequency reports, terminal network performance reports, etc., to help administrators optimize data center operation and maintenance strategies.

[0052] The collaborative relationships between the modules of this system are as follows: Administrators create system templates and generate multiple restore points through the centralized management module (snapshot management module). The template encapsulation module exports the template as a qcow2 file, and the seed generation module performs CDC chunking on this file and generates a seed file. When the system needs to be distributed to student terminals, administrators create a distribution task through the centralized management module. Each terminal's incremental comparison module scans existing local data and compares it with the seed file to identify reusable data blocks. The differential simultaneous transmission module distributes missing data blocks through a P2P network (using a rate-aware weighted scheduling algorithm to optimize the transmission path). After distribution is complete, the terminal boot module provides a restore point selection interface, allowing users to select a target snapshot and start the corresponding operating system environment. The entire system forms a complete closed loop from template creation, snapshot management, differential distribution to terminal booting.

[0053] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention. Therefore, the scope of protection of this patent should be determined by the appended claims.

Claims

1. A method for restoring simultaneous interpretation of multiple operating systems in an educational computer lab based on qcow2 snapshots and differential simultaneous interpretation, characterized in that, The method supports creating new snapshots, switching between different snapshots, and deleting useless snapshots at runtime, and specifically includes the following steps: Step S1: After the target operating system is installed and configured, package it into a virtual disk file in qcow2 format; Step S2: Based on the built-in snapshot function of qcow2 format, create multiple snapshots as restore points for the system template. Each restore point corresponds to a course or use case. The snapshots are linked through a backing file chain, and each snapshot only stores the difference data relative to the parent snapshot. Step S3: The qcow2 file with snapshots is dynamically divided into blocks using a content-defined block partitioning algorithm to generate a seed file containing metadata for each data block; in the seed file, the metadata of each data block contains the snapshot version identifier to which the data block belongs. Step S4: The receiving end scans the existing qcow2 files locally, identifies reusable data blocks by comparing data block hashes, and achieves zero-copy reuse by using file system block cloning operations; Step S5: Distribute the missing data blocks through the P2P network and optimize the transmission path using a rate-aware weighted scheduling algorithm; Step S6: The terminal device loads the local qcow2 file through the bootloader, reconstructs the backing file chain corresponding to the target snapshot based on the snapshot version identifier in the seed file, provides a restore point selection interface, and starts the corresponding system environment.

2. The method for restoring simultaneous interpretation of multiple operating systems in an educational computer lab based on qcow2 snapshots and differential simultaneous interpretation as described in claim 1, characterized in that: In step S1, the target operating system includes Windows, Linux, and domestically developed operating systems, including Tongxin UOS, Kylin OS, and Zhongke Fangde OS.

3. The method for restoring multi-operating system simultaneous interpretation in educational computer labs based on qcow2 snapshots and differential simultaneous interpretation as described in claim 1, characterized in that: In step S2, the restore point creation strategies include time-triggered creation, event-triggered creation, and manual creation; The events include software installation completion, system configuration updates, and the start of the course.

4. The method for restoring simultaneous interpretation of multiple operating systems in an educational computer lab based on qcow2 snapshots and differential simultaneous interpretation as described in claim 1, characterized in that: In step S3, the content definition block algorithm adopts a sliding window strategy based on Gear hash, with a minimum data block size of 16KB, an average data block size of 128KB, and a maximum data block size of 1MB. The seed file records the hash value, offset, size, and snapshot version information of each data block.

5. The method for restoring simultaneous interpretation of multiple operating systems in an educational computer lab based on qcow2 snapshots and differential simultaneous interpretation as described in claim 1, characterized in that: In step S4, the block cloning operation includes the copy_file_range system call in Linux and the FSCTL_DUPLICATE_EXTENTS_TO_FILE operation in Windows.

6. The method for restoring multi-operating system simultaneous interpretation in educational computer labs based on qcow2 snapshots and differential simultaneous interpretation according to claim 1, characterized in that: In step S5, the weight calculation formula for the rate-aware weighted scheduling algorithm is as follows: ; In the above formula, Negotiate the network interface speed for the peer; For gigabit matching weighting, when the local speed is ≥1000 and the peer speed is ≥1000... ,otherwise ; This represents the number of pending requests for the peer. This represents the round-trip time of the peer.

7. The method for restoring multi-operating system simultaneous interpretation in educational computer labs based on qcow2 snapshots and differential simultaneous interpretation as described in claim 1, characterized in that: In step S6, the restore point selection interface provides the restore point name, creation time, occupied space, and applicable course information, and supports displaying the inheritance relationship between snapshots in a list or tree structure. After the user selects the target restore point by keyboard or mouse, the terminal automatically loads the corresponding snapshot chain and starts the operating system.

8. The method for restoring simultaneous interpretation of multiple operating systems in an educational computer lab based on qcow2 snapshots and differential simultaneous interpretation as described in claim 1, characterized in that: Switching between different snapshots requires a system restart. The switching process includes the following sub-steps: Step 1: Save the current system state to a temporary snapshot; Step 2: Load the target snapshot metadata; Step 3: Rebuild the virtual disk chain and update the boot configuration; During the switching process, the actual disk data is not copied; only the snapshot pointer of the qcow2 file is modified.

9. A multi-operating system simultaneous interpretation and restoration system for educational computer labs based on qcow2 snapshots and differential simultaneous interpretation, characterized in that, The method for restoring simultaneous interpretation of multiple operating systems in an educational computer lab based on qcow2 snapshots and differential simultaneous interpretation, as described in any one of claims 1-8, wherein the system comprises: The template encapsulation module is used to encapsulate the operating system into a qcow2 format virtual disk file; The snapshot management module is used to create, delete, and switch different restore points based on the built-in snapshot function of qcow2, so as to quickly prepare the computer environment. The seed generation module is used to generate seed files with snapshot qcow2 files using the content definition chunking algorithm; The incremental comparison module is used to scan local files and identify reusable data blocks; The differential simultaneous transmission module is used to distribute missing data blocks through a P2P network to achieve rate-aware scheduling. The terminal boot module is used to provide a restore point selection interface and load the corresponding system environment.