A device deployment method and system for streaming loading mode
By deploying the meta-operating system in the terminal cluster and using the streaming loading mode to achieve incremental mirror distribution and convergence, the problem of low intelligence and management difficulties in terminal cluster deployment in the existing technology is solved, and fast and efficient batch deployment and flexible user needs adaptation are achieved.
Patent Information
- Application Number
- CN202211640577.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-20
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2042-12-20
AI Technical Summary
The existing technology has defects in the batch deployment of terminal clusters with low intelligence, large labor and time overhead, difficulty in management, large hardware resource overhead, and inability to adapt to users' flexible and diversified needs in a timely manner.
Using a device deployment method for streaming loading mode, the software environment and device resource configuration of terminal devices are implemented by deploying a meta-operating system with operation management functions on each terminal node, and the data flow distribution and mirror fusion of incremental mirrors are synchronously updated and automatically deployed.
It realizes the rapid and efficient batch deployment of terminal clusters, reduces hardware resource overhead and maintenance difficulty, supports frequent user configuration updates, and improves user experience and system flexibility.
Smart Images

Figure CN116319326B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of terminal cluster deployment, and in particular to a device deployment method and system oriented to a streaming loading mode. Background Art
[0002] Batch deployment and management of terminal clusters may be involved in various scenarios, such as school computer room management, enterprise employee personal terminal management, institution equipment management, large-scale online examination venue layout, etc. However, in scenarios with a large number of terminals, manual deployment requires a lot of work such as hardware initialization, environment installation, and system configuration for the terminals. The degree of intelligence is low, a lot of manpower and time are required, and there are problems with subsequent management difficulties.
[0003] In order to solve the above problems, the existing technology usually uses a server-client architecture and uses virtualization technology to deploy the system image operating environment on the user side. The central server distributes and changes the system image in batches through network communication to achieve unified deployment and batch management. It has the advantages of being able to deploy a large number of terminals at one time, supporting a wide variety of system images, and user experience close to the actual machine. The above architecture specifically includes the following three categories:
[0004] 1. VDI (Virtual Desktop Infrastructure) virtual desktop architecture, which centralizes all storage and data operations on the server, runs the operating system environment by building different virtualized hardware units, and transmits the graphical desktop to the user terminal for operation, facilitating centralized management and resource allocation;
[0005] 2. IDV (Intelligent Desktop Virtualization) intelligent desktop virtualization architecture, which centralizes storage on the server and distributes data operations to each terminal node. It deploys a virtualized operation layer on each terminal node to build an operating system image operation environment, and accepts the system image managed by the server through a network link for loading and use, so as to achieve the effect of local offline data operations and rapid recovery after a single node failure;
[0006] 3. VOI (Virtual Operating System Infrastructure) virtual operating system architecture, which cancels the virtualized operating layer design on the terminal device to improve the problem that some heavily loaded application software cannot be used due to the addition of the virtualized operating layer, and reduce the requirements for hardware resources. This architecture centrally maintains the complete system image on the server side, transfers the complete system image to the local cache before running, does not rely on the local hard disk, and can achieve the effect of diskless boot.
[0007] However, the virtual desktop architecture (VDI) needs to rely entirely on real-time network transmission, and has high requirements for network bandwidth and network connection stability, so it cannot be applied to offline operations. At the same time, data computing operations are concentrated on the server, which requires the server's hardware configuration and computing power. Although the intelligent desktop virtual architecture (IDV) distributes user data operations to each terminal node, it still needs to rely on high-speed transmission broadband to distribute images. Image migration management will bring a huge load. At the same time, the virtualization operation layer in the architecture requires that the user terminal device needs to have a high hardware configuration to support the virtualization environment. The virtual operating system architecture (VOI) has not yet solved the overhead problem caused by the repeated migration management of large-volume system images. In addition, centralized and unified image management cannot save the personalized configuration changes of user terminals in a timely and effective manner. Once a batch of users need to synchronize and update to a specific system software configuration, it is necessary to make specific modifications required by the user on the central server side for the specific system image, and then distribute the complete system image to each terminal through network transmission to achieve the purpose of synchronized update. Among them, since the image editing process requires the deep participation of the administrator and the network transmission of the complete system image, it will increase the difficulty and cost of maintenance and management, and also make the configuration update must take a long period of time.
[0008] In summary, the above-mentioned system architectures can only realize a terminal usage environment available to users, thereby sacrificing a lot of performance experience and bringing a lot of hardware resource overhead and waste; in addition, for actual application scenarios, the usage methods required by users will be more complicated, such as custom configuration synchronization, key state rollback, temporary scene design changes, etc. The centralized server uniformly edits and generates system images that meet user requirements, and then transmits the complete and large-scale system image network to each user terminal device. This type of model is difficult to meet and adapt to the flexible and diverse changes in user needs in a timely manner. Summary of the invention
[0009] The technical problem to be solved by the present invention is: in response to the technical problems existing in the prior art, the present invention provides a device deployment method and system for a streaming loading mode, which has a simple implementation method, low complexity, high deployment efficiency and convenience, low hardware resource overhead, and strong flexibility, and can realize rapid and efficient deployment of batch terminals based on the streaming loading mode.
[0010] In order to solve the above technical problems, the technical solution proposed by the present invention is:
[0011] A device deployment method for a streaming loading mode, comprising the following steps:
[0012] Deploy a meta-operating system with operation management functions on each node in the target terminal network to implement the streaming loading mode. The operation management functions include processing business logic and image management functions. The meta-operating system provides operating systems and software operating environments with multiple versions, types and configuration information, and uses the system image mode to provide the required usage scenarios.
[0013] During use, the user's change editing operations on any terminal device in the target terminal network are distributed to other terminal nodes in the target terminal network in the form of incremental mirror data streams through the deployment unit of the meta-operating system, and mirror fusion is performed, thereby realizing the synchronous update and automatic deployment of the software environment and device resource configuration of each terminal device on all terminal devices in the entire network.
[0014] Furthermore, when the meta-operating system performs differential processing of the image, the function of creating a differential VHDX is achieved by taking the specified VHDX file as the parent file and creating a corresponding child file based on the parent file, and the child file inherits the specified settings in the parent file; when the meta-operating system performs breakpoint recovery, the differential sub-file of the VHDX file to be restored is created, and the operation changes are saved in the differential sub-file. When breakpoint recovery is required, the differential sub-file is deleted, and a new differential sub-file is recreated, and the new differential sub-file inherits the system configuration of the recovery breakpoint to achieve system recovery.
[0015] Furthermore, the steps of configuring and generating the operating system by the meta-operating system include:
[0016] Create an empty VHDX virtual disk file and assign the corresponding disk letter, disk capacity and disk mode;
[0017] Format the virtual disk file into a specified format, assign a corresponding name and drive letter, and mount it;
[0018] Import the content of the original system image ISO file into the virtual disk file to complete the system installation and generate a new system file.
[0019] Furthermore, when synchronization of other operating systems is required in the meta-operating system, the VHDX file on the terminal to be synchronized and the VHDX file on the current terminal are merged, wherein a parent VHDX file is maintained on the server side, and a child VHDX file of the same level is maintained for each terminal, and the inheritance order during the merging process is determined according to the parent VHDX file and each child VHDX file.
[0020] Furthermore, the core business processing module ImageTool in the meta-operating system includes:
[0021] Application module, configured to implement startup switching of processing modes, creation and generation of image files, fusion of image files, and system installation of virtual disk image files;
[0022] ImageTool tool module, configured to complete command execution, virtual machine management, establish connections between terminals, and generate JSON object information and store it in a specified storage space;
[0023] And the project construction module is configured to integrate the dependent packages required for the operation of the entire project and constitute the operating environment for independent execution of the project.
[0024] Furthermore, the Application module includes:
[0025] The BootOnce startup module is configured to complete the startup switching after the meta-operating system business processing mode work is completed;
[0026] CreateVHDX module, configured to complete the creation and generation of new image files and differential image files;
[0027] MergeVHDX module, configured to complete the merging function of the image file;
[0028] The ExportISOIntoVHDX module is used to complete the system installation function for a blank virtual disk image file.
[0029] Furthermore, the ImageTool tool module includes:
[0030] The DiskpartCLI module is configured to establish a connection with the virtual machine after splicing a required command string through a parameter setting function according to a specific command format of Diskpart, and generate a text file executable by the Diskpart program;
[0031] A VHDXCLI module configured to complete the specific execution process of the command;
[0032] A QemuCLI module is configured to complete Qemu virtual machine management tasks, wherein the Qemu virtual machine management tasks include starting a virtual machine, shutting down a virtual machine, and detecting a virtual machine status;
[0033] The SSHClient module is configured to establish a connection between the current terminal and the Qemu virtual machine or between the current terminal and the current terminal in a command manner;
[0034] The Commons module is configured to include a RetState module and a RetJson module, wherein the RetState module is configured to judge the status of the command execution result and save the judged information, and the RetJson module is configured to return a JSON object with specific operation information by splicing out a JSON text;
[0035] A Logger module, configured to write the JSON object information generated by the Commons module into a specified storage space;
[0036] The ConfigUitl module is configured to configure the configuration information required in the entire ImageTool project.
[0037] Furthermore, when receiving a request to change the usage scenario sent by the user, the meta-operating system switches to the business processing mode through the built-in system startup mode, and then executes the corresponding program code through the pre-set business logic, and changes the system image and startup environment partition files. After completion, it switches back to the user usage mode. The user usage mode is that after the boot partition is deployed, the meta-operating system sets a fixed VHDX file entry to enable the user to actually use the system.
[0038] Furthermore, the meta-operating system adopts a dual-mode switching mechanism. In the dual-mode switching mechanism, when the first system is started, a unified system boot entry is generated, the corresponding boot file is read and loaded to enter the boot manager, and then the boot item file is read to finally enter the VHDX system, and the VDDX virtual disk file to be started is renamed uniformly; when the second system is started, the boot program finds the corresponding boot file, then reads the configuration information in the boot sector, and reads the boot configuration information related to the first system to realize chain startup of the first system. After completing the business operation, the default startup configuration is modified so that the first system startup item is started by default next time, and the startup item selection process is skipped.
[0039] A device deployment system for a streaming loading mode includes a target terminal network, the target terminal network includes a plurality of nodes, each node in the target terminal network is deployed with a meta-operating system with an operation management function for implementing the streaming loading mode, the operation management function includes a function of processing business logic and image management, the meta-operating system provides operating systems and software operating environments of multiple versions, multiple types and multiple configuration information, and uses a system image mode to provide required usage scenarios;
[0040] During use, the deployment unit of the meta-operating system distributes the user's change editing operations on any terminal device in the target terminal network to other terminal nodes in the target terminal network in the form of incremental mirror data streams and performs mirror fusion, thereby realizing the synchronous update and automatic deployment of the software environment and device resource configuration of each terminal device on all terminal devices in the entire network.
[0041] Compared with the prior art, the advantages of the present invention are:
[0042] 1. The present invention adopts a streaming loading mode to perform batch deployment of terminal clusters. For a terminal network with a large number of nodes, a meta-operating system is deployed on each node. Then, during use, the changes and editing operations performed by the user on any terminal device are distributed to other terminal nodes in the form of incremental system images through network links in the form of data streams. At the same time, the images are automatically merged on the corresponding nodes, so that the software environment and device resource configuration of one device can be synchronously updated and automatically deployed on all terminal devices in the entire network without the need for users to additionally configure the operating system and built-in software environment.
[0043] 2. The present invention realizes batch deployment of terminal clusters by utilizing the streaming loading mode. It only needs to transmit and use incremental images, which can greatly reduce the pressure of network transmission and greatly shorten the update cycle, so that it can support frequent user configuration updates; and the entire deployment process does not require additional installation and redundant and complex configuration processes, which can greatly reduce the dependence of equipment maintenance and updates on manpower, and can also give full play to the capabilities of hardware resources, delegate management functions to each node, so that each terminal node has the ability to independently process business logic and image management, which can greatly reduce virtualization overhead, and at the same time can effectively improve the utilization rate of hardware resources, reduce the requirements for equipment performance, reduce unnecessary overhead, and greatly optimize the user experience in the actual process. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 It is a schematic diagram of the implementation flow of the device deployment method for the streaming loading mode in this embodiment.
[0045] Figure 2 It is a schematic diagram of the specific flow of the mirror editing process in this embodiment.
[0046] Figure 3 It is a schematic diagram of the hierarchical structure of the meta-operating system in this embodiment.
[0047] Figure 4 It is a schematic diagram of the operation structure of the meta-operating system in this embodiment.
[0048] Figure 5It is a schematic diagram of the structural principle of the ImageTool tool module in this embodiment.
[0049] Figure 6 It is a schematic diagram of the implementation process of dual-mode entry switching in this embodiment. DETAILED DESCRIPTION
[0050] The present invention is further described below in conjunction with the accompanying drawings and specific preferred embodiments, but the protection scope of the present invention is not limited thereby.
[0051] Considering that batch deployment of terminal operating environments requires initialization and adjustment of hardware resources and the construction of an operating system and software-related environments within the operating system, the above process must be able to fully utilize terminal hardware resources to achieve the best operating effect, and must be able to reduce the reliance on manpower for operations such as initialization configuration, setting environment variables, and software installation and uninstallation during software deployment. The present invention constructs a streaming loading mode to intelligently achieve rapid and efficient batch deployment of terminal operating environments.
[0052] like Figure 1 As shown, the steps of the device deployment method for the streaming loading mode in this embodiment include:
[0053] S01. Deploy a meta-operating system with operation management functions on each node in the target terminal network to implement the streaming loading mode. The operation management functions include processing business logic and image management functions. The meta-operating system provides operating systems and software operating environments with multiple versions, types and configuration information, and uses the system image mode to provide the required usage scenarios;
[0054] S02. During use, the user's edit operations on any terminal device in the target terminal network are distributed to other terminal nodes in the target terminal network in the form of incremental mirror data streams through the deployment unit of the meta-operating system, and mirror fusion is performed to achieve synchronous update and automatic deployment of the software environment and device resource configuration of each terminal device on all terminal devices in the entire network.
[0055] This embodiment adopts a streaming loading mode to perform batch deployment of terminal clusters. For example, for a terminal network with a large number of nodes, a meta-operating system is deployed on each node. Then, during use, any changes and edits made by the user to any terminal device are distributed to other terminal nodes in the form of incremental system images through network links in the form of data streams. At the same time, the images are automatically merged on the corresponding nodes, ultimately achieving the synchronization update and automatic deployment of the software environment and device resource configuration of a device on all terminal devices in the entire network without the need for users to additionally configure the operating system and built-in software environment.
[0056] This embodiment implements batch deployment of terminal clusters by utilizing the streaming loading mode. The transmission uses an incremental image of only a few MB in size, which can greatly reduce the pressure on network transmission and greatly shorten the update cycle, so that frequent user configuration updates can be supported. In addition, the entire deployment process does not require additional installation and redundant and complex configuration processes, which can greatly reduce the dependence of equipment maintenance and updates on manpower. At the same time, since the configuration is performed on the actual machine, the terminal can give full play to the capabilities of hardware resources, greatly reducing the pressure and load on providing additional support for the virtualization layer or remote interaction layer used by cloud desktops, etc., which can effectively improve the utilization rate of hardware resources, reduce the requirements for equipment performance, and reduce unnecessary expenses, greatly optimizing the user experience in the actual process.
[0057] In order to realize the streaming loading mode, this embodiment uses the meta-operating system as the core module of streaming loading. Based on the meta-operating system, it no longer focuses on the functional division of management and use between the server and the user, but defines a minimum deployment unit with complete operation management functions. On the one hand, it provides an operating system and software operating environment with multiple versions, multiple categories, and multiple customized information, and uses the system image mode to fully meet and adapt to various needs and usage scenarios of users in actual use, so that rich application directions such as incremental update of system configuration, system restoration, and optional switching of multiple systems can be realized; on the other hand, since each node does not belong to the meta-operating system, the functions of creating, editing, restoring system images and customizing user operating environments can be delegated to the edge, so that each terminal machine has the ability to independently process business logic and image management, thereby reducing the requirements for the central server's data processing capabilities and improving the user experience.
[0058] When the user changes the usage scenario, this embodiment only needs to change the system image used based on virtual disk technology, without the need for the central server to distribute the image through the network link every time. Specifically, if a request for changing the usage scenario issued by the user is received, the meta-operating system switches to the business processing mode through the built-in system startup mode, and then executes the relevant program code through the pre-set business logic and the built-in ImageTool business processing module to change the system image and the startup environment partition and other files. After completion, it switches back to the user usage mode for the user to perform the next operation. In the above manner, the user only needs to select the operating system and the scene switching that he needs, and the rest can be completed independently by the meta-operating system. The entire meta-operating system working process is basically imperceptible to the user, and since the work is completed locally at the terminal, it can not only realize the single-machine and single-type user configuration, but also reduce the overhead caused by the repeated transmission of the system image.
[0059] In order to flexibly support multiple systems, the meta-operating system of this embodiment uses virtual disk file VHD / VHDX technology to achieve the actual use effect of the operating system in terms of image usage. It can not only be directly deployed on the real machine, but also has a complete system structure, and there is almost no difference in actual use experience with the actual system. Each disk file is an independent system that can be mounted and used, thus providing convenience for system customization and changes. The meta-operating system in this embodiment specifically builds image processing logic for the following business needs: 1. Customization and generation of a brand new operating system; 2. Content synchronization of other operating systems; 3. Differential processing of operating system images; 4. Breakpoint recovery of the operating system. All the above operations on VHDX system image files are processed using the Diskpart tool.
[0060] For the above business requirement 1, i.e., customization and generation of the operating system, the specific steps of the meta-operating system in this embodiment for configuring and generating the operating system include:
[0061] First, create an empty VHDX virtual disk file and assign the corresponding disk letter, disk capacity, and disk mode;
[0062] Secondly, format the virtual disk file into a specified format (such as NTFS), assign a corresponding name and drive letter, and mount it. At this time, the system can recognize it as an independent hard disk partition.
[0063] Finally, import the contents of the original system image ISO file into the virtual disk file to complete the system installation and generate a new system file.
[0064] The mounted virtual disk file is empty. The traditional installation solution requires the use of an image deployment tool to install the system into the hard disk. This embodiment simplifies the installation process and only requires the content of the system image ISO file to be imported into the virtual disk file to complete the system installation and generate a brand new system file.
[0065] For business requirement 2, i.e., content synchronization of other operating systems, this embodiment utilizes the merging function of virtual disk files to merge the VHDX file on the terminal that needs to be synchronized with the VHDX file on the current terminal. At the same time, considering the logical inheritance relationship of VHDX files, a most basic father VHDX file is maintained on the server side, and a child VHDX file of the same level is maintained for each terminal. The inheritance order during the merging process is determined according to the father VHDX file and each child VHDX file to avoid errors in the inheritance order during the merging process.
[0066] For business requirement 3, i.e., differential processing of operating system images, this embodiment utilizes the creation of differential VHDX function of virtual disk files. The function of creating differential VHDX is realized by taking the specified VHDX file as the parent file and creating the corresponding child file based on the parent file. The child file inherits the specified settings in the parent file, so that data operations and usage changes can be performed on the child file without affecting the parent VHDX file. The child file is generated based on the parent file, and is not independently generated again in business 1. A short creation process can be executed by using different file operation writing mechanisms, and the child file can also completely inherit the relevant settings in the parent file.
[0067] For business requirement 4, that is, the meta-operating system performs breakpoint restoration, it is completed through the creation and regeneration process of the sub-VHDX file: create a differential sub-file of the VHDX file that needs to be restored at the breakpoint, save the operation changes on the differential sub-file, and when breakpoint recovery is required, delete the differential sub-file, and then recreate a new differential sub-file. The new differential sub-file inherits the system configuration of the recovery breakpoint to achieve system restoration.
[0068] Specifically, the child VHDX file is configured as the system to be used, and the system breakpoint that needs to be restored can be the oldest version of the local parent VHDX file, or a node in the child VHDX files that are continuously created through the chain structure. If a specific system state needs to be saved for future recovery, a differential sub-file of the VHDX is created, and when the child file is used in the future, all operation changes will only be saved on the differential sub-file. When recovery is needed, only the differential sub-file needs to be deleted and a new differential sub-file is created. Then the new differential sub-file will inherit the system configuration of the recovery breakpoint, and the saved results used for a period of time before will be lost with the deletion of the previous differential sub-file, so as to achieve the effect of system restoration.
[0069] The specific operation logic of this embodiment for the operation of the VHDX system image file is as follows: Figure 2As shown, in daily use, each terminal needs to maintain a ParentVHDX (parent VHDX) file, but it is generally not used directly for actual operation. Generally, the differential sub-file ChildVHDX created by the parent file is used. For this differential file, there are generally three usage modes, which need to be determined according to different usage scenarios: First, the terminal system needs to be updated synchronously. For example, other terminals need to be updated to the configuration of terminal A, then the differential sub-file of terminal A is transmitted to other terminals through the network link, and merged with the parent file of other terminals, and then a new differential sub-file is created for use; second, breakpoint restoration is required. For terminal A, if the current system status needs to be retained and set as a breakpoint, then a layer of sub-files is created on the basis of the existing differential sub-files. Only the second-level sub-files are used daily. Once restoration is required, the second-level sub-files are deleted, and then the first-level sub-files are regenerated or used; third, normal use, that is, the differential sub-files can be used directly.
[0070] Considering that the core of the operation is concentrated on the processing and editing of VHDX virtual disk files, in order to build a complete meta-operating system business processing mode, the meta-operating system of this embodiment adopts the following Figure 3 The hierarchy shown and Figure 4 The interactive structure shown in the figure, in which the ImageTool part is the core business processing software, which connects and interacts with the VM virtual machine or directly with the Linux system through SSH. The VM virtual machine is used as an environment simulation component. Through the Samba mode, a separate area is opened in the SSD to create a shared folder that interacts with the Linux system for the storage of VHDX and boot files. The UEFI layer is the level for hardware resource configuration and boot settings under the meta-operating system. This level mainly completes the design and deployment of the boot partition, allowing the terminal machine to identify the startup items of the meta-operating system, and divides and switches the management mode and the use mode through the GRUB2 open source module; the management mode focuses on the entire business processing and is the process of using the Linux Kernel at the OS layer; the use mode is that after the boot partition is deployed, the meta-operating system sets a fixed VHDX file entry, and the user actually uses the specified system (such as the Windows system).
[0071] In the basic service layer, this embodiment specifically uses the Diskpart command. Considering that the command requires administrator privileges to run, it cannot be directly run in another system (such as Linux) through the relevant open source compatibility layer, and further uses a built-in virtual machine to complete the construction of the command environment. In a specific application embodiment, the meta-operating system can be built using an open source Linux system, and the virtual machine can use the Qemu virtual machine with good effect and stability, as well as the KVM module to accelerate hardware simulation.
[0072] In this embodiment, the meta-operating system adopts a system environment (specifically, Linux), and the virtual machine adopts another system (such as Windows system). The file systems between different systems may not support each other. In this case, a network shared folder technology such as Samba is used. By partitioning the disk and creating a folder, the folder is set as a shared folder that can be found and used on the network. Both systems can read and write to it, so that the VHDX file can be modified directly in the folder. Furthermore, a lightweight SSH network interaction method is used to quickly establish a network connection and remotely execute terminal commands. For example, in a Linux system, the effect of the Qemu virtual machine can be controlled by Shell commands without explicit operations, so that each editing operation does not need to be operated through an explicit interface.
[0073] like Figure 5 As shown, the core business processing module ImageTool in the meta-operating system of this embodiment specifically includes:
[0074] Application module, configured to implement startup switching of processing modes, creation and generation of image files, fusion of image files, and system installation of virtual disk image files;
[0075] ImageTool tool module, configured to complete command execution, virtual machine management, establish connections between terminals, and generate JSON object information and store it in a specified storage space;
[0076] And the project construction module, specifically the JAR compilation module, is configured to integrate the dependency packages required for the entire project to run and form an operating environment for independent execution of the project.
[0077] In this embodiment, the Application module specifically includes:
[0078] The BootOnce startup module is configured to complete the startup switching after the meta-operating system business processing mode work is completed;
[0079] CreateVHDX module, configured to complete the creation and generation of new image files and differential image files;
[0080] MergeVHDX module, configured to complete the merging function of the image file;
[0081] The ExportISOIntoVHDX module is used to complete the system installation function for a blank virtual disk image file.
[0082] In this embodiment, the ImageTool tool module includes:
[0083] The DiskpartCLI module is configured to establish a connection with the virtual machine after splicing a required command string through a parameter setting function according to a specific command format of Diskpart, and to generate a text file executable by the Diskpart program through a Powershell command line terminal;
[0084] The VHDXCLI module is configured to complete the specific execution process of the command, which mainly includes establishing an SSH connection with the virtual machine, opening a Shell terminal, calling the exec execution function to execute the command, processing the Shell terminal operation results, closing the Shell terminal, closing the SSH connection, etc. It also includes disk mounting, partition statistics, thread detection, regular processing, etc. The specific functions include: creating an empty VHDX file, reading the content of a Windows ISO image file, importing the content of an image file (such as Windows ISO) into a VHDX file for installation, creating a differential VHDX file, fusing the original VHDX file with the differential VHDX file, and adding VHDX to the system startup item, etc.
[0085] QemuCLI module, configured to complete Qemu virtual machine management work, the Qemu virtual machine management work includes starting the virtual machine, shutting down the virtual machine and detecting the virtual machine status, wherein the virtual machine status detection function can detect the running status of the virtual machine by establishing an SSH connection between the local machine and the local machine, by analyzing the terminal output command results, the running status of the daemon process, the port monitoring status, and separately connecting to the Qemu virtual machine through SSH and reporting the returned results;
[0086] SSHClient module is configured to establish a connection between the current terminal and the Qemu virtual machine or between the current terminal and the current terminal in the form of commands. Its functions mainly include connection establishment, command transmission, result capture and return, connection closing, etc.
[0087] The Commons module is configured to include a RetState module and a RetJson module, wherein the RetState module is configured to judge the status of the command execution result and save the information after the judgment. Specifically, the command execution result status is judged by capturing the text display of the terminal Shell after the command is executed, and the saved information of success or failure is printed after the judgment, which is specific to the result of the code execution, the time point of the code execution, the specific execution location of the code including the number of lines and class information, etc., so that developers and managers can specifically view the code execution status and troubleshoot; the RetJson module is configured to splice out JSON text according to fixed specifications, and return a JSON object with specific running information to facilitate transmission and standardized identification.
[0088] The Logger module is configured to write the JSON object information generated by the Commons module to a specified storage space (such as a local disk) for later maintenance, as well as to facilitate querying historical results and offline viewing by managers.
[0089] The ConfigUitl module is configured to configure the configuration information required for the entire ImageTool project, including the composition of dependent libraries, the IP addresses, user names, passwords of the Qemu virtual machine and the local machine, the specific paths of the Samba folders under each system, and the verification mode and port configuration of the SSH connection, etc., to facilitate unified changes and project maintenance.
[0090] The core operation module ImageTool can be specifically constructed by JAVA language, and the specific configuration of each module can be adjusted according to actual needs.
[0091] In the usage scenario, it is usually not desirable for users to modify the meta-operating system using unexpected, unmanaged commands and unexpected operations outside the set management mode, which will not only cause changes in the user's usage environment, but may also cause the entire meta-operating system to crash. The configuration of this embodiment allows users to enter the management mode only through the exposed management mode entrance in actual use. After entering the entrance, the user's operation is locked, allowing the user to use the business processing functions of the meta-operating system within a safe and permitted range, complete the operating system version selection, breakpoint recovery and other functions, and then access and read the VHDX file through the use mode entrance, that is, use the real system.
[0092] In this embodiment, the meta-operating system adopts a dual-mode switching mechanism to achieve effective isolation between business processing and user usage status. Specifically, in the dual-mode switching mechanism, when the first system is started, a unified system boot entry is generated, the corresponding boot file is read and loaded to enter the boot manager, and then the boot item file is read to finally enter the VHDX system, and the VDDX virtual disk file to be started is renamed uniformly; when the second system is started, the boot program finds the corresponding boot file, and then reads the configuration information in the boot sector, as well as the boot configuration information related to the first system, to achieve chain startup of the first system. After completing the business operation, the default startup configuration is modified so that the first system startup item is started by default next time, and the startup item selection process is skipped.
[0093] Take the dual-mode switching mechanism of Linux and Windows as an example, as shown in the attached Figure 6As shown in the figure, the specific startup process of a terminal is as follows: after the BIOS power-on self-test, the bootx64.efi file in the ESP sector is automatically searched as the system entry. Due to the existence of multiple systems, the source of bootx64.efi is determined. If it comes from bootmgfw.efi, it means that the Windows system needs to be booted, and the BCD file will be read to determine the system entry, and winload.efi will be read and loaded; if it comes from grubx64.efi, it means that the Linux system needs to be chain-loaded, the grub.cfg configuration file will be read and the OS entry menu will be displayed. Different system kernels are selected through the menu. Each system kernel will be stored in the grub.cfg configuration file through indexes and configuration information. Due to the difference in boot modes, the Linux system boot and the Windows system boot are combined. In this embodiment, the GRUB2 multi-system boot technology is first used to generate a unified system boot entry. For the Windows system boot process, the system reads the bootx64.efi boot file in the MBR sector, then loads the bootmgrfw.efi file to enter the Boot Manager boot manager, and then reads the BCD boot item file to finally enter the VHDX system; for the VHDX virtual disk file, the BCDEdit command is traditionally used to create the Device and OSDevice file configurations in the BCD file to enable the VHDX file to be booted. In this embodiment, the VDDX virtual disk files to be started are uniformly renamed as Entry.vhdx, so that the BCD file can be modified only once. If different VHDX virtual disk files need to be started, only the file to be started needs to be renamed. This function is also integrated into the ImageTool module. For the boot process of the Linux system, the boot program finds the grubx64.efi boot file, then reads the configuration information in the grub.cfg in the boot sector, generates an explicit selection interface for the configuration information, completes the selection of the boot item, and automatically finds the bootx64.efi file and reads the Windows-related boot configuration information according to the customized configuration text in grub.cfg, so as to achieve the effect of chain-starting the Windows system. At the same time, in this grub.cfg configuration file, by adding the modification logic of the boot sequence and using the BOOT ONCE boot mechanism, the specific implementation is: after booting, if you want to perform business operations, then select the management mode entry, enter the customized Linux kernel, and effectively isolate the user from possible misoperations by adding a dominance interface.After completing the business operation, modify the default startup configuration so that the Windows startup item is started by default next time, and skip the startup item selection process, so that even after the user restarts due to a fault or turns the computer on and off by himself, it can automatically start from the Windows boot entry.
[0094] Through the above steps of this embodiment, a set of business processing logic for handling flexible user needs can be formed, which can provide a complete dual-mode meta-operating system to achieve decentralization of management functions and high utilization of local hardware device resources, as well as change the interaction process between the server and the user. It can not only reduce the overhead of network link transmission, greatly simplify the process of batch deployment of terminals, save manpower and time, but also meet the basic needs of users and various needs such as scene switching, so as to better adapt to customer needs in actual applications, so that both unified management and a certain degree of personalized configuration can be achieved.
[0095] The device deployment system of the streaming loading mode in this embodiment includes a target terminal network, the target terminal network includes multiple nodes,
[0096] Each node in the target terminal network is deployed with a meta-operating system for implementing a streaming loading mode. The meta-operating system defines a deployment unit with operation management functions including processing business logic and image management. The meta-operating system provides operating systems and software operating environments with multiple versions, types and configuration information, and uses the system image mode to provide the required usage scenarios.
[0097] During use, the deployment unit of the meta-operating system distributes the user's changes and editing operations on any terminal device in the target terminal network to other terminal nodes in the target terminal network in the form of incremental mirror data streams and performs mirror fusion, thereby realizing the synchronous update and automatic deployment of the software environment and device resource configuration of each terminal device on all terminal devices in the entire network.
[0098] The device deployment system for streaming loading mode in this embodiment is consistent with the principles of the device deployment method for streaming loading mode in the above-mentioned embodiment, and will not be described in detail here.
[0099] The above is only a preferred embodiment of the present invention, and does not limit the present invention in any form. Although the present invention has been disclosed as a preferred embodiment, it is not intended to limit the present invention. Therefore, any simple modification, equivalent change and modification made to the above embodiment according to the technical essence of the present invention without departing from the content of the technical solution of the present invention shall fall within the scope of protection of the technical solution of the present invention.
Claims
1. A device deployment method for streaming loading mode, used for batch deployment and management of terminal clusters, characterized in that the steps include: Deploy a meta-operating system with operation management functions on each node in the target terminal network to implement the streaming loading mode. The operation management functions include processing business logic and image management functions. The meta-operating system provides operating systems and software operating environments with multiple versions, types and configuration information, and uses the system image mode to provide the required usage scenarios. The meta-operating system uses virtual disk files to realize the real use of the operating system when the image is used. During use, the meta-operating system distributes the user's edited changes to any terminal device in the target terminal network in the form of incremental image data streams to other terminal nodes in the target terminal network and automatically performs image fusion on the corresponding nodes, that is, the transmission uses incremental images to achieve synchronous update and automatic deployment of the software environment and device resource configuration of each terminal device on all terminal devices in the entire network; The core business processing module ImageTool in the meta-operating system includes: The Application module is configured to implement startup switching of processing modes, creation and generation of image files, fusion of image files, and system installation of virtual disk image files; ImageTool tool module, configured to complete command execution, virtual machine management, establish connections between terminals, and generate JSON object information and store it in a specified storage space; And the project construction module is configured to integrate the dependent packages required for the operation of the entire project and constitute the operating environment for independent execution of the project.
2. The device deployment method for streaming loading mode according to claim 1, characterized in that: When the meta-operating system performs differential processing of the image, the function of creating a differential VHDX is realized by taking the specified VHDX file as the parent file and creating a corresponding child file based on the parent file, and the child file inherits the specified settings in the parent file; when the meta-operating system performs breakpoint recovery, the differential sub-file of the VHDX file to be restored is created, and the operation changes are saved in the differential sub-file. When breakpoint recovery is required, the differential sub-file is deleted, and a new differential sub-file is recreated, and the new differential sub-file inherits the system configuration of the recovery breakpoint to realize system recovery.
3. The device deployment method for streaming loading mode according to claim 1, characterized in that: The steps of configuring and generating the operating system by the meta-operating system include: Create an empty VHDX virtual disk file and assign the corresponding disk letter, disk capacity and disk mode; Format the virtual disk file into a specified format, assign a corresponding name and drive letter, and mount it; Import the content of the original system image ISO file into the virtual disk file to complete the system installation and generate a new system file.
4. The device deployment method for streaming loading mode according to claim 1, characterized in that: When synchronization of other operating systems is required in the meta-operating system, the VHDX file on the terminal to be synchronized and the VHDX file on the current terminal are merged, wherein a parent VHDX file is maintained on the server side, and a child VHDX file of the same level is maintained for each terminal, and the inheritance order in the merging process is determined according to the parent VHDX file and each child VHDX file.
5. The device deployment method for streaming loading mode according to claim 1, characterized in that: The Application module includes: The BootOnce startup module is configured to complete the startup switching after the meta-operating system business processing mode work is completed; CreateVHDX module, configured to complete the creation and generation of new image files and differential image files; MergeVHDX module, configured to complete the merging function of the image file; The ExportISOIntoVHDX module is used to complete the system installation function for a blank virtual disk image file.
6. The device deployment method for streaming loading mode according to claim 1, characterized in that: The ImageTool tool module includes: The DiskpartCLI module is configured to establish a connection with the virtual machine after splicing a required command string through a parameter setting function according to a specific command format of Diskpart, and generate a text file executable by the Diskpart program; A VHDXCLI module configured to complete the specific execution process of the command; A QemuCLI module is configured to complete Qemu virtual machine management tasks, including starting a virtual machine, shutting down a virtual machine, and detecting a virtual machine status; The SSHClient module is configured to establish a connection between the current terminal and the Qemu virtual machine or between the current terminal and the current terminal in a command manner; The Commons module is configured to include a RetState module and a RetJson module, wherein the RetState module is configured to judge the status of the command execution result and save the judged information, and the RetJson module is configured to return a JSON object with specific operation information by splicing out a JSON text; A Logger module, configured to write the JSON object information generated by the Commons module into a specified storage space; The ConfigUitl module is configured to configure the configuration information required in the entire ImageTool project.
7. The device deployment method for streaming loading mode according to any one of claims 1 to 6, characterized in that: When receiving a request to change the usage scenario sent by the user, the meta-operating system switches to the business processing mode through the built-in system startup mode, and then executes the corresponding program code through the pre-set business logic, and changes the system image and startup environment partition files. After completion, it switches back to the user usage mode. The user usage mode is that after the boot partition is deployed, the meta-operating system sets a fixed VHDX file entry to enable the user to actually use the system.
8. The device deployment method for streaming loading mode according to any one of claims 1 to 6, characterized in that: The meta-operating system adopts a dual-mode switching mechanism. In the dual-mode switching mechanism, when the first system is started, a unified system boot entry is generated, the corresponding boot file is read and then loaded to enter the boot manager, and then the boot item file is read to finally enter the VHDX system, and the VDDX virtual disk file to be started is renamed uniformly; when the second system is started, the boot program finds the corresponding boot file, then reads the configuration information in the boot sector, and reads the boot configuration information related to the first system to realize the chain startup of the first system. After completing the business operation, the default startup configuration is modified so that the first system startup item is started by default next time, and the startup item selection process is skipped.
9. A device deployment system for streaming loading mode, used for batch deployment and management of terminal clusters, the system comprising a target terminal network, the target terminal network comprising a plurality of nodes, characterized in that: Each node in the target terminal network is deployed with a meta-operating system with operation management functions for realizing the streaming loading mode. The operation management functions include processing business logic and image management functions. The meta-operating system provides operating systems and software operating environments with multiple versions, types and configuration information, and uses the system image mode to provide the required usage scenarios. The meta-operating system uses virtual disk files to realize the real use of the operating system when the image is used. During use, the deployment unit of the meta-operating system distributes the user's edited changes to any terminal device in the target terminal network in the form of an incremental image data stream to other terminal nodes in the target terminal network and automatically performs image fusion on the corresponding nodes, that is, the transmission uses an incremental image to achieve synchronous update and automatic deployment of the software environment and device resource configuration of each terminal device on all terminal devices in the entire network; The core business processing module ImageTool in the meta-operating system includes: The Application module is configured to implement startup switching of processing modes, creation and generation of image files, fusion of image files, and system installation of virtual disk image files; ImageTool tool module, configured to complete command execution, virtual machine management, establish connections between terminals, and generate JSON object information and store it in a specified storage space; And the project construction module is configured to integrate the dependent packages required for the operation of the entire project and constitute the operating environment for independent execution of the project.
Citation Information
Patent Citations
Client-side virtualization framework
CN102447723A
Method for constructing wide area network virtual platform
CN103491144A
Cross-platform instant granular recovery for virtual machine backups
US10061660B1