TWI811862B - Virtualization environment creation method and electronic device - Google Patents

Virtualization environment creation method and electronic device Download PDF

Info

Publication number
TWI811862B
TWI811862B TW110143653A TW110143653A TWI811862B TW I811862 B TWI811862 B TW I811862B TW 110143653 A TW110143653 A TW 110143653A TW 110143653 A TW110143653 A TW 110143653A TW I811862 B TWI811862 B TW I811862B
Authority
TW
Taiwan
Prior art keywords
virtual environment
hardware device
target virtual
target
inference model
Prior art date
Application number
TW110143653A
Other languages
Chinese (zh)
Other versions
TW202321907A (en
Inventor
陳冠儒
Original Assignee
宏碁股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 宏碁股份有限公司 filed Critical 宏碁股份有限公司
Priority to TW110143653A priority Critical patent/TWI811862B/en
Publication of TW202321907A publication Critical patent/TW202321907A/en
Application granted granted Critical
Publication of TWI811862B publication Critical patent/TWI811862B/en

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)
  • Electrophonic Musical Instruments (AREA)

Abstract

A virtualization environment creation method and an electronic device are disclosed. The method includes: training an inference model according to a training data set which includes information of first hardware equipment in at least one first virtualization environment; detecting a virtualization environment creation instruction; and executing the inference model according to the training data set to create a target virtualization environment and pre-building at least one second hardware equipment into the target virtualization environment.

Description

虛擬環境建立方法與電子裝置Virtual environment establishment method and electronic device

本發明是有關於一種電腦技術,且特別是有關於一種虛擬環境建立方法與電子裝置。The present invention relates to a computer technology, and in particular to a virtual environment establishment method and electronic device.

隨著筆記型電腦等具運算功能的電子裝置的資料運算能力不斷提升,許多類型的電子裝置出廠時即附帶有虛擬環境(亦稱為虛擬機器(Virtualization machine, VM))的建立與執行功能。例如,微軟視窗化作業系統10(Windows 10)預設搭載用於Linux的視窗化子系統(Windows Subsystem for Linux, WSL)。WSL可運行於Windows 10的視窗化介面中,允許使用者在視窗化介面中操作Linux系統。但是,虛擬環境的建立需要設定許多資訊,例如使用者需要手動選擇要將主機裝置中哪些類型的硬體設備加入至虛擬環境中。此外,在虛擬環境建立後,也不允許使用者中途加入新的硬體設備至虛擬環境中。這些與硬體設備相關的操作限制往往在使用者操作虛擬環境時對使用者造成相當大的困擾。As the data computing capabilities of electronic devices with computing functions such as notebook computers continue to improve, many types of electronic devices are shipped from the factory with the creation and execution function of a virtual environment (also known as a virtual machine (Virtualization machine, VM)). For example, Microsoft's Windows 10 operating system (Windows 10) is equipped with the Windows Subsystem for Linux (Windows Subsystem for Linux, WSL) by default. WSL can run in the windowed interface of Windows 10, allowing users to operate Linux systems in the windowed interface. However, the creation of a virtual environment requires setting a lot of information. For example, users need to manually select which types of hardware devices in the host device are to be added to the virtual environment. In addition, after the virtual environment is created, users are not allowed to add new hardware devices to the virtual environment midway. These operational limitations related to hardware devices often cause considerable trouble to users when operating virtual environments.

有鑑於此,本發明提供一種虛擬環境建立方法與電子裝置,可有效提高虛擬環境的建立效率。In view of this, the present invention provides a method and an electronic device for establishing a virtual environment, which can effectively improve the efficiency of establishing a virtual environment.

本發明的實施例提供一種虛擬環境建立方法,其用於電子裝置。所述虛擬環境建立方法包括:根據訓練資料集訓練推理模型,其中所述訓練資料集包括至少一虛擬環境中的第一硬體設備之資訊;偵測虛擬環境建置指令;以及根據所述虛擬環境建置指令運行所述推理模型,以建立目標虛擬環境並將至少一第二硬體設備內建於所述目標虛擬環境中。Embodiments of the present invention provide a method for establishing a virtual environment, which is used in electronic devices. The virtual environment establishment method includes: training an inference model according to a training data set, wherein the training data set includes information on at least one first hardware device in the virtual environment; detecting a virtual environment construction instruction; and according to the virtual environment The environment building instruction runs the inference model to create a target virtual environment and build at least one second hardware device in the target virtual environment.

本發明的實施例另提供一種電子裝置,其包括儲存電路與處理器。所述儲存電路用以儲存推理模型與訓練資料集,其中所述訓練資料集包括至少一虛擬環境中的第一硬體設備之資訊。所述處理器耦接至所述儲存電路。所述處理器用以:根據所述訓練資料集訓練所述推理模型;偵測虛擬環境建置指令;以及根據所述虛擬環境建置指令運行所述推理模型,以建立目標虛擬環境並將至少一第二硬體設備內建於所述目標虛擬環境中。An embodiment of the present invention further provides an electronic device, which includes a storage circuit and a processor. The storage circuit is used to store an inference model and a training data set, wherein the training data set includes information on at least one first hardware device in the virtual environment. The processor is coupled to the storage circuit. The processor is used to: train the inference model according to the training data set; detect a virtual environment establishment instruction; and run the inference model according to the virtual environment establishment instruction to establish a target virtual environment and at least one The second hardware device is built into the target virtual environment.

基於上述,推理模型可根據訓練資料集進行訓練。特別是,訓練資料集可包括虛擬環境中的第一硬體設備之資訊。在偵測到虛擬環境建置指令後,所述推理模型可根據所述虛擬環境建置指令運行,以建立目標虛擬環境並將第二硬體設備內建於所述目標虛擬環境中。藉此,可有效提高虛擬環境的建立效率。Based on the above, the inference model can be trained based on the training data set. In particular, the training data set may include information about the first hardware device in the virtual environment. After detecting the virtual environment establishment instruction, the inference model may be run according to the virtual environment establishment instruction to establish a target virtual environment and build the second hardware device into the target virtual environment. This can effectively improve the efficiency of creating a virtual environment.

圖1是根據本發明的實施例所繪示的電子裝置的示意圖。請參照圖1,電子裝置10可包括智慧型手機、平板電腦、筆記型電腦、桌上型電腦、工業電腦或伺服器等各式具有資料處理功能的電子裝置。FIG. 1 is a schematic diagram of an electronic device according to an embodiment of the present invention. Referring to FIG. 1 , the electronic device 10 may include various electronic devices with data processing functions such as smartphones, tablet computers, notebook computers, desktop computers, industrial computers or servers.

電子裝置10包括處理器11、儲存電路12及輸入/輸出(I/O)介面13。處理器11用以負責電子裝置10的整體或部分運作。例如,處理器11可包括中央處理單元(Central Processing Unit, CPU)、圖形處理器(graphics processing unit, GPU)、或是其他可程式化之一般用途或特殊用途的微處理器、數位訊號處理器(Digital Signal Processor, DSP)、可程式化控制器、特殊應用積體電路(Application Specific Integrated Circuits, ASIC)、可程式化邏輯裝置(Programmable Logic Device, PLD)或其他類似裝置或這些裝置的組合。The electronic device 10 includes a processor 11 , a storage circuit 12 and an input/output (I/O) interface 13 . The processor 11 is responsible for all or part of the operation of the electronic device 10 . For example, the processor 11 may include a central processing unit (CPU), a graphics processing unit (GPU), or other programmable general-purpose or special-purpose microprocessors or digital signal processors. (Digital Signal Processor, DSP), programmable controller, Application Specific Integrated Circuits (ASIC), Programmable Logic Device (PLD) or other similar devices or a combination of these devices.

儲存電路12用以儲存資料。例如,儲存電路12可包括揮發性儲存電路與非揮發性儲存電路。揮發性儲存電路用以揮發性地儲存資料。例如,揮發性儲存電路可包括隨機存取記憶體(Random Access Memory, RAM)或類似的揮發性儲存媒體。非揮發性儲存電路用以非揮發性地儲存資料。例如,非揮發性儲存電路可包括唯讀記憶體(Read Only Memory, ROM)、固態硬碟(solid state disk, SSD)、傳統硬碟(Hard disk drive, HDD)或類似的非揮發性儲存媒體。The storage circuit 12 is used to store data. For example, storage circuit 12 may include volatile storage circuits and non-volatile storage circuits. Volatile storage circuits are used to store data volatilely. For example, the volatile storage circuit may include random access memory (RAM) or similar volatile storage media. Non-volatile storage circuits are used to store data in a non-volatile manner. For example, the non-volatile storage circuit may include a read-only memory (ROM), a solid state disk (SSD), a traditional hard disk drive (HDD) or similar non-volatile storage media. .

輸入/輸出介面13可包括攝影鏡頭、通訊電路(例如網路介面卡)、滑鼠、鍵盤、觸控板、螢幕、揚聲器及/或麥克風等各式訊號的輸出/輸出裝置。本發明不限制輸入/輸出介面13的裝置類型。The input/output interface 13 may include various signal input/output devices such as a camera lens, a communication circuit (such as a network interface card), a mouse, a keyboard, a touch pad, a screen, a speaker, and/or a microphone. The present invention does not limit the device type of the input/output interface 13.

在一實施例中,儲存電路12可用以儲存訓練資料集101與推理模型102。訓練資料集101可用以訓練推理模型102。推理模型102可包括深度學習(deep learning)模型或神經網路(Neural Network)模型等各式可經由訓練來自主執行特定功能的人工智慧模型。In one embodiment, the storage circuit 12 can be used to store the training data set 101 and the inference model 102. Training data set 101 may be used to train inference model 102. The inference model 102 may include a deep learning (deep learning) model or a neural network (Neural Network) model and other various artificial intelligence models that can be trained to autonomously perform specific functions.

在一實施例中,訓練資料集101可包括至少一個虛擬環境中的硬體設備(亦稱為第一硬體設備)之資訊。例如,所述資訊可包括第一硬體設備的裝置類型等可用以描述第一硬體設備之資訊。此外,第一硬體設備是指應用於所述至少一虛擬環境中的硬體設備。例如,第一硬體設備可包括電子裝置10或其他電子裝置中的任意硬體設備。In one embodiment, the training data set 101 may include information on at least one hardware device (also referred to as the first hardware device) in the virtual environment. For example, the information may include the device type of the first hardware device and other information that can be used to describe the first hardware device. In addition, the first hardware device refers to a hardware device used in the at least one virtual environment. For example, the first hardware device may include any hardware device in the electronic device 10 or other electronic devices.

在一實施例中,訓練資料集101還可包括裝置識別資訊及用以運行虛擬環境的程式之資訊的至少其中之一。例如,裝置識別資訊可包括特定電子裝置(例如電子裝置10或者其他電子裝置)的主機板序號或媒體存取控制位址(Media Access Control address, MAC address)等可用以識別特定電子裝置的資訊。此外,用以運行虛擬環境的程式之資訊則可包括用以運行虛擬環境的程式之程式名稱等可用以描述可用以運行虛擬環境的程式之資訊。In one embodiment, the training data set 101 may further include at least one of device identification information and information used to run a program in the virtual environment. For example, the device identification information may include information such as a motherboard serial number or a Media Access Control address (MAC address) of a specific electronic device (such as the electronic device 10 or other electronic devices) that can be used to identify the specific electronic device. In addition, the information about the program used to run the virtual environment may include the program name of the program used to run the virtual environment and other information that may be used to describe the program used to run the virtual environment.

圖2是根據本發明的實施例所繪示的根據訓練資料集訓練推理模型的示意圖。請參照圖2,訓練資料集101可包括訓練資料21與22。訓練資料21包括與某一個虛擬環境(亦稱為第一虛擬環境)有關的硬體資訊211、識別資訊212及程式資訊213。硬體資訊211可包括應用於第一虛擬環境中的硬體裝置之描述資訊(例如裝置類型)。識別資訊212可包括運行第一虛擬環境的電子裝置的識別資訊(例如主機板序號)。程式資訊213可包括用以運行第一虛擬環境的程式之描述資訊(例如程式名稱)。FIG. 2 is a schematic diagram of training an inference model based on a training data set according to an embodiment of the present invention. Referring to FIG. 2 , the training data set 101 may include training data 21 and 22 . The training data 21 includes hardware information 211, identification information 212 and program information 213 related to a certain virtual environment (also called the first virtual environment). The hardware information 211 may include description information (eg, device type) applied to the hardware device in the first virtual environment. The identification information 212 may include identification information (eg, motherboard serial number) of the electronic device running the first virtual environment. The program information 213 may include description information (eg, program name) used to run the program in the first virtual environment.

訓練資料22包括與另一個虛擬環境(亦稱為第二虛擬環境)有關的硬體資訊221、識別資訊222及程式資訊223。硬體資訊221可包括應用於第二虛擬環境中的硬體裝置之描述資訊(例如裝置類型)。識別資訊222可包括運行第二虛擬環境的電子裝置的識別資訊(例如主機板序號)。程式資訊223可包括用以運行第二虛擬環境的程式之描述資訊(例如程式名稱)。依此類推,與更多虛擬環境有關的訓練資料亦可包含於訓練資料集101中。The training data 22 includes hardware information 221, identification information 222 and program information 223 related to another virtual environment (also called a second virtual environment). The hardware information 221 may include description information (eg, device type) applied to the hardware device in the second virtual environment. The identification information 222 may include identification information (eg, motherboard serial number) of the electronic device running the second virtual environment. The program information 223 may include description information (eg, program name) of the program used to run the second virtual environment. By analogy, training data related to more virtual environments may also be included in the training data set 101 .

在一實施例中,處理器11可根據訓練資料集101來訓練推理模型102。例如,在訓練推理模型102的過程中,訓練資料集101中的各項資訊可以被送至推理模型102中,以調整推理模型102的決策邏輯。In an embodiment, the processor 11 can train the inference model 102 according to the training data set 101 . For example, during the process of training the inference model 102, various information in the training data set 101 can be sent to the inference model 102 to adjust the decision logic of the inference model 102.

請回到圖1,在訓練推理模型102後,處理器11可偵測虛擬環境建置指令。例如,處理器11可經由輸入/輸出介面13偵測使用者操作並根據使用者操作獲得虛擬環境建置指令。此虛擬環境建置指令可指示建立一個虛擬環境(亦稱為目標虛擬環境)。以微軟視窗化作業系統10(Windows 10)為例,目標虛擬環境可基於WSL建立。或者,以Chrome作業系統為例,目標虛擬環境可基於Crostini建立。Please return to Figure 1. After training the inference model 102, the processor 11 can detect the virtual environment establishment instruction. For example, the processor 11 can detect user operations through the input/output interface 13 and obtain virtual environment construction instructions according to the user operations. This virtual environment creation command instructs the creation of a virtual environment (also called a target virtual environment). Taking Microsoft Windows 10 as an example, the target virtual environment can be established based on WSL. Or, taking the Chrome operating system as an example, the target virtual environment can be established based on Crostini.

在一實施例中,處理器11可根據此虛擬環境建置指令運行推理模型102,以建立所述目標虛擬環境並將至少一硬體設備(亦稱為第二硬體設備)內建於目標虛擬環境中。或者,在一實施例中,處理器11可運行推理模型102,以篩選出適合內建於目標虛擬環境中的硬體設備(即第二硬體設備)。在將第二硬體設備內建於或加入至目標虛擬環境後,第二硬體設備即可於所建立的目標虛擬環境中使用。In one embodiment, the processor 11 can run the inference model 102 according to the virtual environment establishment instruction to establish the target virtual environment and build at least one hardware device (also referred to as a second hardware device) in the target. in a virtual environment. Alternatively, in one embodiment, the processor 11 can run the inference model 102 to select hardware devices (ie, second hardware devices) suitable for being built into the target virtual environment. After the second hardware device is built into or added to the target virtual environment, the second hardware device can be used in the created target virtual environment.

在一實施例中,處理器11可根據虛擬環境建置指令,取得對應於目標電子裝置的裝置識別資訊。所述目標電子裝置是指用以運行目標虛擬環境的電子裝置。例如,目標電子裝置可以是電子裝置10或者其他的電子裝置。處理器11可將此裝置識別資訊輸入至推理模型102。然後,處理器11可根據推理模型102的輸出決定第二硬體設備。In one embodiment, the processor 11 may obtain device identification information corresponding to the target electronic device according to the virtual environment construction instruction. The target electronic device refers to an electronic device used to run the target virtual environment. For example, the target electronic device may be the electronic device 10 or other electronic devices. Processor 11 may input this device identification information to inference model 102 . Then, the processor 11 may determine the second hardware device according to the output of the inference model 102 .

圖3是根據本發明的實施例所繪示的決定第二硬體設備的示意圖。請參照圖3,處理器11可根據虛擬環境建置指令,取得識別資訊31。識別資訊31可包括目標電子裝置的裝置識別資訊(例如主機板序號)。處理器11可將識別資訊31輸入至推理模型102。推理模型102可根據識別資訊31輸出硬體資訊32。硬體資訊32可反映推理模型102預測適合內建於目標虛擬環境中的硬體設備(即第二硬體設備)。例如,硬體資訊32可包括第二硬體設備的描述資訊(例如裝置類型)。處理器11可根據硬體資訊32決定第二硬體設備。例如,第二硬體設備可包括目標電子裝置中的至少部分硬體設備。FIG. 3 is a schematic diagram of determining a second hardware device according to an embodiment of the present invention. Referring to FIG. 3 , the processor 11 can obtain the identification information 31 according to the virtual environment establishment instruction. The identification information 31 may include device identification information (such as a motherboard serial number) of the target electronic device. The processor 11 may input the identification information 31 to the inference model 102 . The inference model 102 can output hardware information 32 according to the identification information 31 . The hardware information 32 may reflect the hardware device predicted by the inference model 102 to be suitable for being built into the target virtual environment (ie, the second hardware device). For example, the hardware information 32 may include description information (eg, device type) of the second hardware device. The processor 11 can determine the second hardware device according to the hardware information 32 . For example, the second hardware device may include at least part of the hardware device in the target electronic device.

在一實施例中,處理器11可自動將第二硬體設備加入至所建立的建立目標虛擬環境中。藉此,在建立目標虛擬環境的過程中,使用者甚至可以完全不需要手動選擇欲加入至目標虛擬環境中的硬體設備。In one embodiment, the processor 11 can automatically add the second hardware device to the created target virtual environment. Thereby, in the process of establishing the target virtual environment, the user does not even need to manually select the hardware devices to be added to the target virtual environment.

在一實施例中,處理器11可根據第二硬體設備提供一個設備清單。此設備清單可記載第二硬體設備的描述資訊(例如裝置類型)。在建立目標虛擬環境的過程中,處理器11可根據使用者操作決定是否直接將第二硬體設備加入至所建立的目標虛擬環境中,或者需要對第二硬體設備進行刪減或補充。在一實施例中,處理器11可將使用者調整後的第二硬體設備加入至目標虛擬環境中。In one embodiment, the processor 11 may provide a device list based on the second hardware device. This device list may record descriptive information (such as device type) of the second hardware device. During the process of establishing the target virtual environment, the processor 11 may decide whether to directly add the second hardware device to the established target virtual environment based on user operations, or whether to delete or supplement the second hardware device. In one embodiment, the processor 11 can add the second hardware device adjusted by the user to the target virtual environment.

在一實施例中,在建立目標虛擬環境後,在運行目標虛擬環境之期間,處理器11可偵測與至少一硬體設備(亦稱為第三硬體設備)有關的至少一中斷封包。例如,處理器11可經由目標電子裝置的作業系統偵測所述中斷封包。所述中斷封包可反映第三硬體設備在當前的操作行為中發生異常。響應於所述中斷封包,處理器11可判斷第三硬體設備是否正常運作於目標虛擬環境中。響應於第三硬體設備未正常運作於目標虛擬環境中,處理器11可根據第三硬體設備之資訊(例如裝置類型)重新訓練推理模型102,以對推理模型102進行優化。此外,若第三硬體設備正常運作於目標虛擬環境中,則處理器11可不更動推理模型102。In one embodiment, after establishing the target virtual environment, the processor 11 may detect at least one interrupt packet related to at least one hardware device (also referred to as a third hardware device) during running of the target virtual environment. For example, the processor 11 may detect the interrupt packet through the operating system of the target electronic device. The interrupt packet may reflect that an abnormality occurs in the current operation behavior of the third hardware device. In response to the interrupt packet, the processor 11 may determine whether the third hardware device is operating normally in the target virtual environment. In response to the third hardware device not operating normally in the target virtual environment, the processor 11 may retrain the inference model 102 according to the information of the third hardware device (eg, device type) to optimize the inference model 102 . In addition, if the third hardware device operates normally in the target virtual environment, the processor 11 may not change the inference model 102.

在一實施例中,響應於所述中斷封包,處理器11可判斷第三硬體設備是否未配置於目標虛擬環境中、第三硬體設備是否在目標虛擬環境中出現異常及/或第三硬體設備的驅動程式是否在目標虛擬環境中出現異常。響應於第三硬體設備未配置於目標虛擬環境中、第三硬體設備在目標虛擬環境中出現異常及/或第三硬體設備的驅動程式在目標虛擬環境中出現異常,處理器11可判定第三硬體設備未正常運作於目標虛擬環境中。In one embodiment, in response to the interrupt packet, the processor 11 may determine whether the third hardware device is not configured in the target virtual environment, whether the third hardware device is abnormal in the target virtual environment, and/or whether the third hardware device is abnormal in the target virtual environment. Whether the driver of the hardware device is abnormal in the target virtual environment. In response to the third hardware device not being configured in the target virtual environment, the third hardware device being abnormal in the target virtual environment, and/or the driver of the third hardware device being abnormal in the target virtual environment, the processor 11 may It is determined that the third hardware device does not operate normally in the target virtual environment.

在一實施例中,一旦偵測到與第三硬體設備有關的中斷封包,處理器11可判斷第三硬體設備是否正常運作於目標虛擬環境中。若第三硬體設備未正常運作於目標虛擬環境中,處理器11可執行後續對推理模型102的優化。In one embodiment, once an interrupt packet related to the third hardware device is detected, the processor 11 may determine whether the third hardware device is operating normally in the target virtual environment. If the third hardware device does not operate normally in the target virtual environment, the processor 11 can perform subsequent optimization of the inference model 102 .

在一實施例中,在偵測到與第三硬體設備有關的中斷封包後,處理器11可判斷與第三硬體設備有關的中斷封包的出現頻率是否高於預設值。響應於與第三硬體設備有關的中斷封包的出現頻率高於預設值(例如與第三硬體設備有關的中斷封包在一段時間內出現的次數高於預設數目),處理器11可執行上述判斷第三硬體設備是否正常運作於目標虛擬環境中之操作。然而,若與第三硬體設備有關的中斷封包的出現頻率未高於預設值(例如與第三硬體設備有關的中斷封包在一段時間內出現的次數不高於預設數目),則處理器11可暫不執行上述判斷第三硬體設備是否正常運作於目標虛擬環境中之操作。In one embodiment, after detecting an interrupt packet related to the third hardware device, the processor 11 may determine whether the occurrence frequency of the interrupt packet related to the third hardware device is higher than a preset value. In response to the occurrence frequency of interrupt packets related to the third hardware device being higher than a preset value (for example, the number of occurrences of interrupt packets related to the third hardware device being higher than a preset number within a period of time), the processor 11 may Perform the above-mentioned operation of determining whether the third hardware device is operating normally in the target virtual environment. However, if the occurrence frequency of interrupt packets related to the third hardware device is not higher than the preset value (for example, the number of occurrences of interrupt packets related to the third hardware device within a period of time is not higher than the preset number), then The processor 11 may temporarily not perform the above-mentioned operation of determining whether the third hardware device is operating normally in the target virtual environment.

在一實施例中,在根據第三硬體設備之資訊(例如裝置類型)重新訓練推理模型102的過程中,處理器11可將第三硬體設備之資訊加入至訓練資料集101的重新訓練清單中,並使用重新訓練清單中的資料來重新訓練推理模型102。In one embodiment, during the process of retraining the inference model 102 based on the information of the third hardware device (eg, device type), the processor 11 may add the information of the third hardware device to the retraining of the training data set 101 in the manifest, and retrain the inference model 102 using the data in the retraining manifest.

以圖2為例,處理器11可將對應於目標虛擬環境的訓練資料21加入至重新訓練清單中。藉此,在重新訓練清單的訓練資料21中,硬體資訊211可包括第三硬體設備之描述資訊(例如裝置類型),識別資訊212可包括目標電子裝置的識別資訊(例如主機板序號),且程式資訊213可包括用以運行目標虛擬環境的程式之描述資訊(例如程式名稱)。處理器11可根據訓練資料21來重新訓練推理模型102,以對推理模型102進行優化。Taking FIG. 2 as an example, the processor 11 can add the training data 21 corresponding to the target virtual environment to the retraining list. Thus, in the training data 21 of the retraining list, the hardware information 211 may include the description information of the third hardware device (such as the device type), and the identification information 212 may include the identification information of the target electronic device (such as the motherboard serial number). , and the program information 213 may include description information (such as program name) used to run the program in the target virtual environment. The processor 11 can retrain the inference model 102 according to the training data 21 to optimize the inference model 102.

圖4是根據本發明的實施例所繪示的虛擬環境建立方法的流程圖。請參照圖4,在步驟S401中,根據訓練資料集訓練推理模型,其中訓練資料集包括至少一虛擬環境中的第一硬體設備之資訊。在步驟S402中,偵測虛擬環境建置指令。在步驟S403中,根據所述虛擬環境建置指令運行所述推理模型,以建立目標虛擬環境並將至少一第二硬體設備內建於所述目標虛擬環境中。FIG. 4 is a flow chart of a method for establishing a virtual environment according to an embodiment of the present invention. Referring to FIG. 4 , in step S401 , an inference model is trained based on a training data set, where the training data set includes information on at least one first hardware device in the virtual environment. In step S402, a virtual environment establishment instruction is detected. In step S403, the inference model is run according to the virtual environment construction instruction to establish a target virtual environment and build at least one second hardware device in the target virtual environment.

圖5是根據本發明的實施例所繪示的虛擬環境建立方法的流程圖。請參照圖5,在步驟S501中,在運行目標虛擬環境之期間,經由電子裝置的作業系統偵測與至少一第三硬體設備有關的至少一中斷封包。在步驟S502中,判斷第三硬體設備是否正常運作於目標虛擬環境中。若第三硬體設備未正常運作於目標虛擬環境中,在步驟S503中,根據第三硬體設備之資訊重新訓練推理模型。此外,若第三硬體設備正常運作於目標虛擬環境中,則可回到步驟S501中且暫不更動推理模型。FIG. 5 is a flow chart of a method for establishing a virtual environment according to an embodiment of the present invention. Referring to FIG. 5 , in step S501 , during running of the target virtual environment, at least one interrupt packet related to at least a third hardware device is detected via the operating system of the electronic device. In step S502, it is determined whether the third hardware device is operating normally in the target virtual environment. If the third hardware device does not operate normally in the target virtual environment, in step S503, the inference model is retrained based on the information of the third hardware device. In addition, if the third hardware device operates normally in the target virtual environment, step S501 can be returned without changing the inference model temporarily.

然而,圖4與圖5中各步驟已詳細說明如上,在此便不再贅述。值得注意的是,圖4與圖5中各步驟可以實作為多個程式碼或是電路,本發明不加以限制。此外,圖4與圖5的方法可以搭配以上範例實施例使用,也可以單獨使用,本發明不加以限制。However, each step in Figure 4 and Figure 5 has been described in detail above, and will not be described again here. It is worth noting that each step in Figure 4 and Figure 5 can be implemented as multiple program codes or circuits, and the present invention is not limited thereto. In addition, the methods of FIG. 4 and FIG. 5 can be used in conjunction with the above exemplary embodiments or can be used alone, and are not limited by the present invention.

綜上所述,本發明所提出的實施例可根據訓練資料集中的與特定虛擬環境有關的資訊來訓練推理模型,以將一或多個使用者的操作習慣反映至推理模型中。經訓練的推理模型可用以預測適合內建於目標虛擬環境中的硬體設備並且在建立目標虛擬環境的同時將此些硬體設備預先加入至目標虛擬環境中。藉此,目標虛擬環境中內建的硬體設備可根據設定特定電子裝置的使用者的操作習慣而進行自動化設定,有效提高虛擬環境的建立效率。此外,在建立目標虛擬環境後,也可以根據目標虛擬環境運行過程中偵測到的中斷封包來動態對推理模型進行優化。In summary, the embodiments proposed by the present invention can train an inference model based on the information related to a specific virtual environment in the training data set, so as to reflect the operating habits of one or more users into the inference model. The trained inference model can be used to predict hardware devices suitable to be built into the target virtual environment and pre-add these hardware devices to the target virtual environment while establishing the target virtual environment. Thereby, the built-in hardware equipment in the target virtual environment can be automatically set according to the operating habits of the user who sets the specific electronic device, effectively improving the efficiency of creating the virtual environment. In addition, after the target virtual environment is established, the inference model can also be dynamically optimized based on interrupt packets detected during the operation of the target virtual environment.

雖然本發明已以實施例揭露如上,然其並非用以限定本發明,任何所屬技術領域中具有通常知識者,在不脫離本發明的精神和範圍內,當可作些許的更動與潤飾,故本發明的保護範圍當視後附的申請專利範圍所界定者為準。Although the present invention has been disclosed above through embodiments, they are not intended to limit the present invention. Anyone with ordinary knowledge in the technical field may make some modifications and modifications without departing from the spirit and scope of the present invention. Therefore, The protection scope of the present invention shall be determined by the appended patent application scope.

10: 電子裝置 11: 處理器 12: 儲存電路 13: 輸入/輸出(I/O)介面 101: 訓練資料集 102: 推理模型 21, 22: 訓練資料 211, 221, 32: 硬體資訊 212, 222, 31: 識別資訊 213, 223: 程式資訊 S401~S403, S501~S503: 步驟 10: Electronic devices 11: Processor 12: Storage circuit 13: Input/output (I/O) interface 101: Training data set 102: Inference Model 21, 22: Training materials 211, 221, 32: Hardware information 212, 222, 31: Identification information 213, 223: Program information S401~S403, S501~S503: steps

圖1是根據本發明的實施例所繪示的電子裝置的示意圖。 圖2是根據本發明的實施例所繪示的根據訓練資料集訓練推理模型的示意圖。 圖3是根據本發明的實施例所繪示的決定第二硬體設備的示意圖。 圖4是根據本發明的實施例所繪示的虛擬環境建立方法的流程圖。 圖5是根據本發明的實施例所繪示的虛擬環境建立方法的流程圖。 FIG. 1 is a schematic diagram of an electronic device according to an embodiment of the present invention. FIG. 2 is a schematic diagram of training an inference model based on a training data set according to an embodiment of the present invention. FIG. 3 is a schematic diagram of determining a second hardware device according to an embodiment of the present invention. FIG. 4 is a flow chart of a method for establishing a virtual environment according to an embodiment of the present invention. FIG. 5 is a flow chart of a method for establishing a virtual environment according to an embodiment of the present invention.

S401~S403: 步驟S401~S403: steps

Claims (8)

一種虛擬環境建立方法,用於一電子裝置,該虛擬環境建立方法包括:根據訓練資料集訓練推理模型,其中該訓練資料集包括至少一虛擬環境中的第一硬體設備之資訊及對應於目標電子裝置的裝置識別資訊,且該目標電子裝置用以運行目標虛擬環境;偵測虛擬環境建置指令;根據該虛擬環境建置指令運行該推理模型,以建立該目標虛擬環境並將至少一第二硬體設備內建於該目標虛擬環境中;在運行該目標虛擬環境之期間,偵測與至少一第三硬體設備有關的至少一中斷封包;響應於該至少一中斷封包,判斷該至少一第三硬體設備是否正常運作於該目標虛擬環境中;以及響應於該至少一第三硬體設備未正常運作於該目標虛擬環境中,根據該至少一第三硬體設備之資訊重新訓練該推理模型。 A virtual environment creation method for an electronic device. The virtual environment creation method includes: training an inference model according to a training data set, wherein the training data set includes at least one information of a first hardware device in the virtual environment and a target corresponding to the first hardware device in the virtual environment. Device identification information of the electronic device, and the target electronic device is used to run the target virtual environment; detects a virtual environment construction instruction; runs the inference model according to the virtual environment construction instruction to establish the target virtual environment and at least a first Two hardware devices are built into the target virtual environment; during running of the target virtual environment, detect at least one interrupt packet related to at least a third hardware device; in response to the at least one interrupt packet, determine that the at least one Whether a third hardware device operates normally in the target virtual environment; and in response to the at least one third hardware device not operating normally in the target virtual environment, retraining based on the information of the at least one third hardware device This inference model. 如請求項1所述的虛擬環境建立方法,其中該訓練資料集更包括用以運行該至少一虛擬環境的程式之資訊。 The virtual environment creation method of claim 1, wherein the training data set further includes information for running a program of the at least one virtual environment. 如請求項1所述的虛擬環境建立方法,其中根據該虛擬環境建置指令運行該推理模型,以建立該目標虛擬環境並將該至少一第二硬體設備內建於該目標虛擬環境中的步驟包括:根據該虛擬環境建置指令,取得該裝置識別資訊;將該裝置識別資訊輸入至該推理模型;以及 根據該推理模型的輸出決定該至少一第二硬體設備。 The method of establishing a virtual environment as claimed in claim 1, wherein the inference model is run according to the virtual environment establishment instruction to establish the target virtual environment and build the at least one second hardware device in the target virtual environment. The steps include: obtaining the device identification information according to the virtual environment construction instruction; inputting the device identification information into the inference model; and The at least one second hardware device is determined according to the output of the inference model. 如請求項1所述的虛擬環境建立方法,更包括:響應於該至少一第三硬體設備未配置於該目標虛擬環境中、該至少一第三硬體設備在該目標虛擬環境中出現異常或該至少一第三硬體設備的驅動程式在該目標虛擬環境中出現異常,判定該至少一第三硬體設備未正常運作於該目標虛擬環境中。 The virtual environment establishment method according to claim 1, further comprising: in response to the at least one third hardware device not being configured in the target virtual environment and the at least one third hardware device experiencing an abnormality in the target virtual environment. Or the driver of the at least one third hardware device has an abnormality in the target virtual environment, and it is determined that the at least one third hardware device does not operate normally in the target virtual environment. 一種電子裝置,包括:儲存電路,用以儲存推理模型與訓練資料集,其中該訓練資料集包括至少一虛擬環境中的第一硬體設備之資訊及對應於目標電子裝置的裝置識別資訊,且該目標電子裝置用以運行目標虛擬環境;以及處理器,耦接至該儲存電路,其中該處理器用以:根據該訓練資料集訓練該推理模型;偵測虛擬環境建置指令;根據該虛擬環境建置指令運行該推理模型,以建立該目標虛擬環境並將至少一第二硬體設備內建於該目標虛擬環境中;在運行該目標虛擬環境之期間,偵測與至少一第三硬體設備有關的至少一中斷封包;響應於該至少一中斷封包,判斷該至少一第三硬體設備是否正常運作於該目標虛擬環境中;以及響應於該至少一第三硬體設備未正常運作於該目標虛擬 環境中,根據該至少一第三硬體設備之資訊重新訓練該推理模型。 An electronic device includes: a storage circuit for storing an inference model and a training data set, wherein the training data set includes at least one information of a first hardware device in a virtual environment and device identification information corresponding to a target electronic device, and The target electronic device is used to run the target virtual environment; and a processor is coupled to the storage circuit, wherein the processor is used to: train the inference model according to the training data set; detect virtual environment construction instructions; and according to the virtual environment The build instruction runs the inference model to create the target virtual environment and build at least one second hardware device in the target virtual environment; during running of the target virtual environment, detect and detect at least one third hardware device at least one interrupt packet related to the device; in response to the at least one interrupt packet, determining whether the at least one third hardware device is operating normally in the target virtual environment; and in response to the at least one third hardware device not operating normally in the target virtual environment. The target is virtual In the environment, the inference model is retrained based on the information of the at least one third hardware device. 如請求項5所述的電子裝置,其中該訓練資料集更包括用以運行該至少一虛擬環境的程式之資訊。 The electronic device of claim 5, wherein the training data set further includes information for running a program of the at least one virtual environment. 如請求項5所述的電子裝置,其中該處理器根據該虛擬環境建置指令運行該推理模型,以建立該目標虛擬環境並將該至少一第二硬體設備內建於該目標虛擬環境中的操作包括:根據該虛擬環境建置指令,取得該裝置識別資訊;將該裝置識別資訊輸入至該推理模型;以及根據該推理模型的輸出決定該至少一第二硬體設備。 The electronic device of claim 5, wherein the processor runs the inference model according to the virtual environment establishment instruction to establish the target virtual environment and build the at least one second hardware device in the target virtual environment. The operations include: obtaining the device identification information according to the virtual environment construction instruction; inputting the device identification information into the inference model; and determining the at least one second hardware device according to the output of the inference model. 如請求項5所述的電子裝置,其中該處理器更用以:響應於該至少一第三硬體設備未配置於該目標虛擬環境中、該至少一第三硬體設備在該目標虛擬環境中出現異常或該至少一第三硬體設備的驅動程式在該目標虛擬環境中出現異常,判定該至少一第三硬體設備未正常運作於該目標虛擬環境中。 The electronic device of claim 5, wherein the processor is further configured to: in response to the at least one third hardware device not being configured in the target virtual environment, the at least one third hardware device being in the target virtual environment. An exception occurs in the system or the driver of the at least one third hardware device appears abnormal in the target virtual environment, and it is determined that the at least one third hardware device does not operate normally in the target virtual environment.
TW110143653A 2021-11-24 2021-11-24 Virtualization environment creation method and electronic device TWI811862B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW110143653A TWI811862B (en) 2021-11-24 2021-11-24 Virtualization environment creation method and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW110143653A TWI811862B (en) 2021-11-24 2021-11-24 Virtualization environment creation method and electronic device

Publications (2)

Publication Number Publication Date
TW202321907A TW202321907A (en) 2023-06-01
TWI811862B true TWI811862B (en) 2023-08-11

Family

ID=87803746

Family Applications (1)

Application Number Title Priority Date Filing Date
TW110143653A TWI811862B (en) 2021-11-24 2021-11-24 Virtualization environment creation method and electronic device

Country Status (1)

Country Link
TW (1) TWI811862B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109791504A (en) * 2016-09-21 2019-05-21 埃森哲环球解决方案有限公司 For the dynamic BTS configuration of application container
TW201928707A (en) * 2017-12-08 2019-07-16 美商雷網科技有限公司 Automatically deployed information technology (IT) system and method
US20200410628A1 (en) * 2019-06-28 2020-12-31 Intel Corporation Apparatus and method for provisioning virtualized multi-tile graphics processing hardware
TW202121169A (en) * 2016-12-31 2021-06-01 美商英特爾股份有限公司 Systems, methods, and apparatuses for heterogeneous computing
US20210165673A1 (en) * 2019-12-02 2021-06-03 Microsoft Technology Licensing, Llc Enabling shared graphics and compute hardware acceleration in a virtual environment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109791504A (en) * 2016-09-21 2019-05-21 埃森哲环球解决方案有限公司 For the dynamic BTS configuration of application container
TW202121169A (en) * 2016-12-31 2021-06-01 美商英特爾股份有限公司 Systems, methods, and apparatuses for heterogeneous computing
TW201928707A (en) * 2017-12-08 2019-07-16 美商雷網科技有限公司 Automatically deployed information technology (IT) system and method
US20200410628A1 (en) * 2019-06-28 2020-12-31 Intel Corporation Apparatus and method for provisioning virtualized multi-tile graphics processing hardware
US20210165673A1 (en) * 2019-12-02 2021-06-03 Microsoft Technology Licensing, Llc Enabling shared graphics and compute hardware acceleration in a virtual environment

Also Published As

Publication number Publication date
TW202321907A (en) 2023-06-01

Similar Documents

Publication Publication Date Title
EP3255527B1 (en) Remote keyboard-video-mouse technologies
US11226919B1 (en) Communication link recovery
US8335935B2 (en) Power management based on automatic workload detection
JP6864718B2 (en) Hybrid power supply system and method
US10705865B2 (en) Disk resize of a virtual machine
US20140359365A1 (en) Integrated Configuration Management and Monitoring for Computer Systems
TWI811862B (en) Virtualization environment creation method and electronic device
TWI553490B (en) Method and system for remote system configuration management and non-transitory computer-readable storage medium
EP3859528A2 (en) Method and apparatus for handling memory failure, electronic device and storage medium
KR102091409B1 (en) Electronic apparatus and control method thereof
US9588918B2 (en) Storage control devices and method therefor to invoke address thereof
JP6683655B2 (en) Detection device and detection method
US20220237570A1 (en) Method and System for Determining Computer Fan Usage and Maintenance
US20170102987A1 (en) Device expected state monitoring and remediation
CN106775941A (en) A kind of virtual machine kernel completeness protection method and device
JP5478372B2 (en) Guest OS control system
WO2018135298A1 (en) Information processing device and management program
US11803459B2 (en) Latency tolerance reporting value determinations
US11836314B1 (en) Sensitivity adjustment for a touchpad of an information handling system
JP7325695B1 (en) DATA PROCESSING DEVICE, DATA PROCESSING METHOD AND DATA PROCESSING PROGRAM
US11853187B1 (en) System and method for remote management of data processing systems
TWI844216B (en) Windows arrangement system, windows arrangement method and windows arrangement program
WO2022113355A1 (en) System monitoring device, system monitoring method, and computer-readable recording medium
TWI701595B (en) Memory performance optimization method and motherboard using the same
KR20220051546A (en) Electronic apparatus and control method thereof