Movatterモバイル変換


[0]ホーム

URL:


CN107678832A - A kind of information processing method and device - Google Patents

A kind of information processing method and device
Download PDF

Info

Publication number
CN107678832A
CN107678832ACN201710911388.4ACN201710911388ACN107678832ACN 107678832 ACN107678832 ACN 107678832ACN 201710911388 ACN201710911388 ACN 201710911388ACN 107678832 ACN107678832 ACN 107678832A
Authority
CN
China
Prior art keywords
attribute
virtual machine
value
state
record
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN201710911388.4A
Other languages
Chinese (zh)
Inventor
陈皎
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information Technology Co Ltd
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 Zhengzhou Yunhai Information Technology Co LtdfiledCriticalZhengzhou Yunhai Information Technology Co Ltd
Priority to CN201710911388.4ApriorityCriticalpatent/CN107678832A/en
Publication of CN107678832ApublicationCriticalpatent/CN107678832A/en
Pendinglegal-statusCriticalCurrent

Links

Classifications

Landscapes

Abstract

The invention discloses a kind of information processing method and device, including:Detect the state that virtual machine enters in the life cycle of the virtual machine;The value of the attribute of virtual machine in this condition is obtained using the corresponding mode of the classification of the attribute with the virtual machine;Record the value of the attribute of the virtual machine in this condition got.From the embodiment of the present invention, by recording virtual machine properties value of each state in life cycle, facilitate user and check that virtual machine in the properties value of different conditions, is easy to user comprehensively to understand the attribute of virtual machine from record.

Description

Translated fromChinese
一种信息处理方法及装置An information processing method and device

技术领域technical field

本发明涉及云计算技术,尤指一种信息处理方法及装置。The invention relates to cloud computing technology, in particular to an information processing method and device.

背景技术Background technique

随着云计算技术的不断成熟,云计算逐步成为业界的发展热点,被广泛地应用到政府、高校、商业等多个领域中。由于虚拟机是云计算的重要组成部分,因此对虚拟机的监控变得十分必要。在相关技术中,通过生成虚拟机的日志来记录虚拟机在生命周期中各状态下的情况。但是,相关技术中的方案会有如下缺点:在日志中记录虚拟机的哪些属性发生了变化,但并未记录变化的属性的值,例如,当虚拟机的内存从1G变化了2G时,将虚拟机的内存变化记录到日志中,并未记录变化后的内存的值,导致了用户并不能从日志中获知属性的具体情况,也降低了用户体验。With the continuous maturity of cloud computing technology, cloud computing has gradually become a development hotspot in the industry, and is widely used in many fields such as government, universities, and commerce. Since the virtual machine is an important part of cloud computing, the monitoring of the virtual machine becomes very necessary. In the related technology, a log of the virtual machine is generated to record the status of the virtual machine in each state in the life cycle. However, the solutions in the related art have the following disadvantages: record which attributes of the virtual machine have changed in the log, but do not record the value of the changed attribute, for example, when the memory of the virtual machine changes from 1G to 2G, the The memory change of the virtual machine is recorded in the log, but the value of the changed memory is not recorded. As a result, the user cannot know the specific situation of the attribute from the log, and also reduces the user experience.

发明内容Contents of the invention

为了解决上述技术问题,本发明提供了一种信息处理方法及装置,能够记录虚拟机在生命周期中各状态下属性的值,提升用户体验。In order to solve the above technical problems, the present invention provides an information processing method and device capable of recording attribute values in various states of a virtual machine in a life cycle and improving user experience.

为了达到本发明目的,本发明提供了一种信息处理方法,包括:In order to achieve the purpose of the present invention, the present invention provides an information processing method, comprising:

检测到虚拟机进入该虚拟机的生命周期中的一状态;detecting that the virtual machine enters a state in the life cycle of the virtual machine;

使用与该虚拟机的属性的类别对应的方式获取在所述状态下虚拟机的属性的值;Obtaining the value of the attribute of the virtual machine in the state in a manner corresponding to the category of the attribute of the virtual machine;

记录获取到的在所述状态下虚拟机的属性的值。Record the acquired value of the attribute of the virtual machine in the state.

进一步地,所述获取在所述状态下虚拟机的属性的值之前,还包括:Further, before acquiring the value of the attribute of the virtual machine in the state, it also includes:

在预先设置的状态与属性的对应关系中,查找与所述状态对应的属性,以获取所述虚拟机的该查找出的属性的值。In the preset correspondence relationship between the state and the attribute, the attribute corresponding to the state is searched, so as to acquire the value of the found attribute of the virtual machine.

进一步地,所述记录获取到的在所述状态下虚拟机的属性的值之后,还包括:Further, after the record obtains the value of the attribute of the virtual machine in the state, it also includes:

显示所述记录的属性的值。Displays the value of the property of the record.

进一步地,所述记录获取到的在所述状态下虚拟机的属性的值之前,还包括:Further, before the value of the attribute of the virtual machine obtained in the state, the record also includes:

以所述虚拟机进入所述生命周期中的第一个状态时的时间为起点,生成所述生命周期的时间轴;Taking the time when the virtual machine enters the first state in the life cycle as a starting point, generate a time axis of the life cycle;

所述显示所述记录的属性的值,包括:The values of the properties of the record that are displayed include:

根据所述虚拟机进入所述状态时的时间,将所述记录的属性的值显示在生成的时间轴上与该时间对应的位置。According to the time when the virtual machine enters the state, the value of the recorded attribute is displayed at a position corresponding to the time on the generated time axis.

进一步地,所述使用与该虚拟机的属性的类别对应的方式获取在所述状态下虚拟机的属性的值,包括:Further, the acquiring the value of the attribute of the virtual machine in the state in a manner corresponding to the attribute category of the virtual machine includes:

若所述虚拟机的属性是预先设置的第一类别中的属性,则从预先设置的数据库中获取该属性的值;If the attribute of the virtual machine is an attribute in the preset first category, the value of the attribute is obtained from a preset database;

若所述虚拟机的属性是预先设置的第二类别中的属性,则当更新该属性的值时,查询最近一次记录的该属性在更新前的值,接收来自用户输入的该属性在更新后的值;当添加该属性的值时,接收来自用户输入的为该属性添加的值。If the attribute of the virtual machine is an attribute in the preset second category, then when updating the value of the attribute, query the last recorded value of the attribute before the update, and receive input from the user after the update of the attribute The value of the property; when adding a value for the property, receives input from the user to add the value for the property.

本发明提供一种信息处理装置,包括:The present invention provides an information processing device, including:

检测模块,用于检测到虚拟机进入该虚拟机的生命周期中的一状态;A detection module, configured to detect that the virtual machine enters a state in the life cycle of the virtual machine;

获取模块,用于使用与该虚拟机的属性的类别对应的方式获取在所述状态下虚拟机的属性的值;An acquisition module, configured to acquire the value of the attribute of the virtual machine in the state in a manner corresponding to the category of the attribute of the virtual machine;

记录模块,用于记录获取到的在所述状态下虚拟机的属性的值。The recording module is configured to record the acquired value of the attribute of the virtual machine in the state.

进一步地,还包括:Further, it also includes:

确定模块,用于在预先设置的状态与属性的对应关系中,查找与所述状态对应的属性,以获取所述虚拟机的该查找出的属性的值。The determination module is configured to search for the attribute corresponding to the state in the preset correspondence between the state and the attribute, so as to acquire the value of the found attribute of the virtual machine.

进一步地,还包括:Further, it also includes:

显示模块,用于显示所述记录的属性的值。A display module, configured to display the value of the attribute of the record.

进一步地,还包括:Further, it also includes:

生成模块,用于以所述虚拟机进入所述生命周期中的第一个状态时的时间为起点,生成所述生命周期的时间轴;A generating module, configured to generate a time axis of the life cycle starting from the time when the virtual machine enters the first state in the life cycle;

所述显示模块具体用于,The display module is specifically used for,

根据所述虚拟机进入所述状态时的时间,将所述记录的属性的值显示在生成的时间轴上与该时间对应的位置。According to the time when the virtual machine enters the state, the value of the recorded attribute is displayed at a position corresponding to the time on the generated time axis.

进一步地,所述获取模块包括:Further, the acquisition module includes:

第一获取单元,用于若所述虚拟机的属性是预先设置的第一类别中的属性,则从预先设置的数据库中获取该属性的值;A first acquiring unit, configured to acquire the value of the attribute from a preset database if the attribute of the virtual machine is an attribute in a preset first category;

第二获取单元,用于若所述虚拟机的属性是预先设置的第二类别中的属性,则当更新该属性的值时,查询最近一次记录的该属性在更新前的值,接收来自用户输入的该属性在更新后的值;当添加该属性的值时,接收来自用户输入的为该属性添加的值。The second obtaining unit is used to query the last recorded value of the attribute before updating if the attribute of the virtual machine is an attribute in the preset second category, when updating the value of the attribute, and receive information from the user The updated value of the input attribute; when adding the value of the attribute, it receives the added value of the attribute from the user input.

本发明实施例至少包括检测到虚拟机进入该虚拟机的生命周期中的一状态;使用与该虚拟机的属性的类别对应的方式获取在所述状态下虚拟机的属性的值;记录获取到的在所述状态下虚拟机的属性的值。从本发明实施例可见,通过记录虚拟机在生命周期中各状态下属性的值,方便了用户从记录中查看虚拟机在不同状态下属性的值,便于用户全面地了解虚拟机的属性。The embodiment of the present invention at least includes detecting that the virtual machine enters a state in the life cycle of the virtual machine; obtaining the value of the attribute of the virtual machine in the state in a manner corresponding to the type of the attribute of the virtual machine; recording the obtained The value of the attribute of the virtual machine in the state. It can be seen from the embodiment of the present invention that by recording the attribute values of the virtual machine in each state in the life cycle, it is convenient for the user to view the attribute values of the virtual machine in different states from the records, and it is convenient for the user to fully understand the attributes of the virtual machine.

本发明的其它特征和优点将在随后的说明书中阐述,并且,部分地从说明书中变得显而易见,或者通过实施本发明而了解。本发明的目的和其他优点可通过在说明书、权利要求书以及附图中所特别指出的结构来实现和获得。Additional features and advantages of the invention will be set forth in the description which follows, and in part will be apparent from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention may be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.

附图说明Description of drawings

附图用来提供对本发明技术方案的进一步理解,并且构成说明书的一部分,与本申请的实施例一起用于解释本发明的技术方案,并不构成对本发明技术方案的限制。The accompanying drawings are used to provide a further understanding of the technical solution of the present invention, and constitute a part of the description, and are used together with the embodiments of the application to explain the technical solution of the present invention, and do not constitute a limitation to the technical solution of the present invention.

图1为本发明实施例提供的一种信息处理方法的流程示意图;FIG. 1 is a schematic flowchart of an information processing method provided by an embodiment of the present invention;

图2为本发明实施例提供的一种信息处理装置的结构示意图;FIG. 2 is a schematic structural diagram of an information processing device provided by an embodiment of the present invention;

图3为本发明实施例提供的另一种信息处理装置的结构示意图。FIG. 3 is a schematic structural diagram of another information processing device provided by an embodiment of the present invention.

具体实施方式detailed description

为使本发明的目的、技术方案和优点更加清楚明白,下文中将结合附图对本发明的实施例进行详细说明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互任意组合。In order to make the purpose, technical solution and advantages of the present invention more clear, the embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings. It should be noted that, in the case of no conflict, the embodiments in the present application and the features in the embodiments can be combined arbitrarily with each other.

在附图的流程图示出的步骤可以在诸如一组计算机可执行指令的计算机系统中执行。并且,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。The steps shown in the flowcharts of the figures may be performed in a computer system, such as a set of computer-executable instructions. Also, although a logical order is shown in the flowcharts, in some cases the steps shown or described may be performed in an order different from that shown or described herein.

本发明实施例提供一种信息处理方法,如图1所示,该信息处理方法包括:An embodiment of the present invention provides an information processing method. As shown in FIG. 1, the information processing method includes:

步骤101、检测到虚拟机进入该虚拟机的生命周期中的一状态。Step 101. Detect that the virtual machine enters a state in the life cycle of the virtual machine.

虚拟机的生命周期中的状态包括以下之一或任意组合:创建状态、开机状态、关机状态、运行状态、挂起状态、迁移状态、销毁状态。进一步地,检测到虚拟机进入该虚拟机的生命周期中的一状态包括:判断用于使虚拟机进入该状态的入口是否被触发;若用于使虚拟机进入该状态的入口被触发,则检测到虚拟机进入该状态。具体地,在用户界面上显示使虚拟机进入各状态的入口,例如,在用户界面上显示以下的选项:创建、开机、关机、运行、挂起、迁移、销毁,当用户点击任一选项时,检测到虚拟机进入到该选项对应的状态。除此之外,当虚拟机在开机结束后,检测到虚拟机进入到运行状态。The states in the life cycle of the virtual machine include one or any combination of the following: creation state, power-on state, power-off state, running state, suspend state, migration state, and destruction state. Further, detecting that the virtual machine enters a state in the life cycle of the virtual machine includes: judging whether an entry for causing the virtual machine to enter the state is triggered; if the entry for causing the virtual machine to enter the state is triggered, then A virtual machine was detected entering this state. Specifically, the user interface is displayed on the entry of the virtual machine into each state, for example, the following options are displayed on the user interface: create, start, shut down, run, suspend, migrate, destroy, when the user clicks on any option , it is detected that the virtual machine has entered the state corresponding to this option. In addition, after the virtual machine is powered on, it is detected that the virtual machine enters a running state.

步骤102、使用与该虚拟机的属性的类别对应的方式获取在所述状态下虚拟机的属性的值。Step 102. Obtain the value of the attribute of the virtual machine in the state in a manner corresponding to the type of the attribute of the virtual machine.

虚拟机的属性为:虚拟机进入的状态的名称、虚拟机进入到该状态时的时间、操控虚拟机进入到该状态的用户、虚拟机所属的用户、运行虚拟机的主机、虚拟机的中央处理器(Central Processing Unit,CPU)核数、内存大小、硬盘个数、每个硬盘的大小、网卡个数或者网卡的互联网协议(Internet Protocol,IP)地址。当虚拟机的属性为虚拟机进入的状态的名称时,该属性的值为创建状态、开机状态、关机状态、运行状态、挂起状态、迁移状态或者销毁状态;当虚拟机的属性为操控虚拟机进入到该状态的用户时,该属性的值为该用户的身份证明(identification,ID);当虚拟机的属性为虚拟机所属的用户,该属性的值为该用户的ID;当虚拟机的属性为运行虚拟机的主机,该属性的值为该主机的编号;当虚拟机的属性为虚拟机的中央处理器核数、内存大小、硬盘个数、每个硬盘的大小或者网卡个数,该属性的值为具体的数值;当虚拟机的属性为网卡的互联网协议地址,该属性的值为具体的互联网协议地址。The attributes of the virtual machine are: the name of the state that the virtual machine enters, the time when the virtual machine enters this state, the user who manipulates the virtual machine to enter this state, the user to which the virtual machine belongs, the host running the virtual machine, the central location of the virtual machine The number of processor (Central Processing Unit, CPU) cores, memory size, number of hard disks, size of each hard disk, number of network cards or Internet Protocol (IP) addresses of network cards. When the attribute of the virtual machine is the name of the state that the virtual machine enters, the value of this attribute is the creation state, power-on state, power-off state, running state, suspend state, migration state or destruction state; When the machine enters the user in this state, the value of this attribute is the user's identification (identification, ID); when the attribute of the virtual machine is the user to which the virtual machine belongs, the value of this attribute is the ID of the user; when the virtual machine The attribute of the virtual machine is the host running the virtual machine, and the value of this attribute is the number of the host; when the attribute of the virtual machine is the number of CPU cores, memory size, number of hard disks, size of each hard disk or number of network cards of the virtual machine , the value of this attribute is a specific value; when the attribute of the virtual machine is the IP address of the network card, the value of this attribute is a specific IP address.

步骤103、记录获取到的在状态下虚拟机的属性的值。Step 103, record the acquired value of the attribute of the virtual machine in the state.

具体地,将获取到的在状态下虚拟机的属性的值记录在预先设置的文件中,相比于相关技术中的将虚拟机的属性变化情况记录到不同的日志中,避免了用户在不同日志中查找虚拟机的属性变化情况,方便了用户查找虚拟机的属性的值。Specifically, the acquired attribute values of the virtual machine in the state are recorded in a preset file, compared with the related art of recording the attribute changes of the virtual machine into different logs, avoiding the need for users to Find the change of the attribute of the virtual machine in the log, which is convenient for the user to find the value of the attribute of the virtual machine.

进一步地,在图1对应实施例的基础上,步骤102之前,还包括:Further, on the basis of the corresponding embodiment in FIG. 1, before step 102, it also includes:

在预先设置的状态与属性的对应关系中,查找与所述状态对应的属性,以获取所述虚拟机的该查找出的属性的值。In the preset correspondence relationship between the state and the attribute, the attribute corresponding to the state is searched, so as to acquire the value of the found attribute of the virtual machine.

预先设置不同的状态与属性的对应关系,当虚拟机进入一状态时,根据该对应关系查找与该状态对应的属性,也就是说查找出将要获取哪些属性的值。例如,创建状态对应的属性包括:虚拟机进入到创建状态时的时间、操控虚拟机进入到创建状态的用户、虚拟机所属的用户、运行虚拟机的主机的编号、运行虚拟机的主机的名称、虚拟机的中央处理器核数、内存大小、硬盘个数、每个硬盘的大小、网卡个数、每个网卡的互联网协议地址。开机状态对应的属性包括:虚拟机进入到开机状态时的时间、操控虚拟机进入到开机状态的用户、虚拟机所属的用户、运行虚拟机的主机的编号、运行虚拟机的主机的名称。将创建状态对应的属性与开机状态对应的属性比较可以看出,开机状态对应的属性中不包括中央处理器核数、内存大小、硬盘个数、每个硬盘的大小、网卡个数、每个网卡的互联网协议地址。由于在开机状态下虚拟机的中央处理器核数、内存大小、硬盘个数、每个硬盘的大小、网卡个数、每个网卡的互联网协议地址不会发生改变,也就是说记录这些虚拟机的属性并没有作用,反而会干扰用户从显示的虚拟机的属性中提取出有效的信息,因此,在不同的状态下,记录不同的属性,方便了用户从显示的虚拟机的属性中提取出有效的信息。The corresponding relationship between different states and attributes is set in advance, and when the virtual machine enters a state, the attribute corresponding to the state is searched according to the corresponding relationship, that is, the values of the attributes to be obtained are found out. For example, the attributes corresponding to the creation state include: the time when the virtual machine enters the creation state, the user who manipulates the virtual machine to enter the creation state, the user to which the virtual machine belongs, the number of the host running the virtual machine, and the name of the host running the virtual machine , The number of cores of the central processing unit of the virtual machine, the size of memory, the number of hard disks, the size of each hard disk, the number of network cards, and the Internet protocol address of each network card. The attributes corresponding to the power-on state include: the time when the virtual machine enters the power-on state, the user who controls the virtual machine to enter the power-on state, the user to which the virtual machine belongs, the number of the host running the virtual machine, and the name of the host running the virtual machine. Comparing the attributes corresponding to the creation state with those corresponding to the power-on state, it can be seen that the attributes corresponding to the power-on state do not include the number of CPU cores, memory size, number of hard disks, size of each hard disk, number of network cards, each The Internet Protocol address of the network card. Since the number of CPU cores, memory size, number of hard disks, size of each hard disk, number of network cards, and Internet Protocol address of each network card of the virtual machine will not change when the virtual machine is turned on, that is to say, record these virtual machine The properties of the virtual machine have no effect, but will interfere with the user to extract effective information from the displayed virtual machine properties. Therefore, in different states, record different properties, which is convenient for the user to extract from the displayed virtual machine properties valid information.

进一步地,在图1对应实施例的基础上,步骤103之后,还包括:Further, on the basis of the embodiment corresponding to FIG. 1, after step 103, it also includes:

显示记录的属性的值。Displays the value of the recorded property.

具体地,在用户界面上显示查看虚拟机的属性的选项,当该选项被用户选择时,将记录的属性的值显示在该用户界面上。相比于相关技术中的将虚拟机的属性变化情况记录到日志中,避免了用户对虚拟机的日志进行分析来分析出属性的变化情况,不仅方便了用户对不同状态下的虚拟机进行管理,还避免了对用户的技术水平有较高的要求。另外,在该用户界面上还可以显示搜索窗口,用户可以在该搜索窗口中输入需要搜索的状态,将虚拟机在该状态下的属性的值显示在该显示界面上,也就是说,当用户在该搜索窗口中输入状态时,只显示虚拟机在该状态下的属性的值,满足了用户的查找需求。Specifically, an option to view the attributes of the virtual machine is displayed on the user interface, and when the option is selected by the user, the value of the recorded attribute is displayed on the user interface. Compared with recording the attribute changes of the virtual machine in the log in the related technology, it avoids the user from analyzing the log of the virtual machine to analyze the change of the attribute, and not only facilitates the user to manage the virtual machines in different states , It also avoids high requirements on the user's technical level. In addition, a search window can also be displayed on the user interface, and the user can input the state to be searched in the search window, and the value of the attribute of the virtual machine in this state will be displayed on the display interface, that is, when the user When entering a state in the search window, only the value of the attribute of the virtual machine in this state is displayed, which meets the search requirement of the user.

进一步地,在图1对应实施例的基础上,步骤103之前,还包括:Further, on the basis of the corresponding embodiment in FIG. 1, before step 103, it also includes:

以虚拟机进入生命周期中的第一个状态时的时间为起点,生成生命周期的时间轴。The time axis of the life cycle is generated starting from the time when the virtual machine enters the first state in the life cycle.

显示记录的属性的值,包括:Displays the values of recorded properties, including:

根据虚拟机进入所述状态时的时间,将记录的属性的值显示在生成的时间轴上与该时间对应的位置。According to the time when the virtual machine enters the state, the value of the recorded attribute is displayed at a position corresponding to the time on the generated time axis.

按照虚拟机进入各状态时的时间,将记录的属性的值显示在时间轴上,更加直观地显示出虚拟机在各状态下属性的具体情况,方便了用户查看不同状态下的虚拟机的属性的值。进一步地,用户可以选择隐藏时间轴上的虚拟机在某个状态下属性的值,在隐藏虚拟机在某个状态下的属性的值之后,还可以根据用户的操作显示该隐藏的属性的值。According to the time when the virtual machine enters each state, the value of the recorded attribute is displayed on the time axis, which more intuitively shows the specific situation of the attribute of the virtual machine in each state, and facilitates the user to view the attributes of the virtual machine in different states value. Further, the user can choose to hide the value of the attribute of the virtual machine in a certain state on the timeline, and after hiding the value of the attribute of the virtual machine in a certain state, the value of the hidden attribute can also be displayed according to the user's operation .

进一步地,在图1对应实施例的基础上,步骤102包括:Further, on the basis of the embodiment corresponding to FIG. 1, step 102 includes:

若虚拟机的属性是预先设置的第一类别中的属性,则从预先设置的数据库中获取该属性的值;若虚拟机的属性是预先设置的第二类别中的属性,则当更新该属性的值时,查询最近一次记录的该属性在更新前的值,接收来自用户输入的该属性在更新后的值;当添加该属性的值时,接收来自用户输入的为该属性添加的值。If the attribute of the virtual machine is an attribute in the preset first category, the value of the attribute is obtained from the preset database; if the attribute of the virtual machine is an attribute in the preset second category, when the attribute is updated When adding the value of the attribute, query the last recorded value of the attribute before the update, and receive the updated value of the attribute from the user input; when adding the value of the attribute, receive the value added for the attribute from the user input.

预先设置两种类别的属性,第一类别的属性包括:虚拟机进入的状态的名称、虚拟机进入到该状态时的时间、操控虚拟机进入到该状态的用户、虚拟机所属的用户、运行虚拟机的主机,也就是说第一类别的属性的值是预先设置在数据库中的。第二类别的属性包括:虚拟机的中央处理器核数、内存大小、硬盘个数、每个硬盘的大小、网卡个数和每个网卡的互联网协议地址,也就是说第二类别的属性的值可以随着用户的使用需求而发生变化的,用户可以根据自己的需求改变第二类别的属性的值。Two types of attributes are preset. The attributes of the first category include: the name of the state that the virtual machine enters, the time when the virtual machine enters this state, the user who manipulates the virtual machine to enter this state, the user to which the virtual machine belongs, the running The host of the virtual machine, that is to say, the value of the attribute of the first category is preset in the database. The attributes of the second category include: the number of CPU cores, memory size, number of hard disks, the size of each hard disk, the number of network cards, and the Internet protocol address of each network card of the virtual machine, that is to say, the attributes of the second category The value can change according to the user's use requirement, and the user can change the value of the attribute of the second category according to his own requirement.

对于第二类型的属性,例如,当虚拟机的内存的值从1G更新为2G,在更新前已经记录过内存的值,因此查询即可得到内存在更新前的值是1G,内存在更新后的值是用户输入的,在记录时,记录内存在更新前的值和更新后的值,方便了用户了解内存的变化情况。如果在虚拟机中安装网卡,在安装网卡前,虚拟机的网卡个数的值和网卡的IP地址的值是空的,在安装网卡后,增加虚拟机的网卡的个数和网卡的IP地址。从以上看出,对于第二类型的属性,获取发生变化的属性的值,从而记录发生变化的属性的值,方便了用户查看虚拟机在各状态下的属性变化情况。特别是在虚拟机的属性的数量非常多的情况下,例如,虚拟机的第二类型的属性的数量大于10个,将发生变化的属性的值显示出来,进一步地方便了用户从记录的属性的值中提取有效的信息。For the second type of attribute, for example, when the value of the memory of the virtual machine is updated from 1G to 2G, the value of the memory has been recorded before the update, so the query can get the value of the memory before the update is 1G, and the value of the memory after the update The value of is input by the user. When recording, there are the value before update and the value after update in the record memory, which is convenient for the user to understand the change of memory. If you install a network card in a virtual machine, before installing the network card, the value of the number of network cards in the virtual machine and the value of the IP address of the network card are empty. After installing the network card, increase the number of network cards in the virtual machine and the IP address of the network card . It can be seen from the above that, for the second type of attribute, the value of the changed attribute is obtained, so as to record the value of the changed attribute, which facilitates the user to view the change of the attribute of the virtual machine in each state. Especially when the number of attributes of the virtual machine is very large, for example, if the number of the second type of attributes of the virtual machine is greater than 10, the value of the changed attribute will be displayed, which further facilitates the user from the recorded attribute Extract valid information from the value of .

本发明实施例所提供的信息处理方法,检测到虚拟机进入该虚拟机的生命周期中的一状态;使用与该虚拟机的属性的类别对应的方式获取在所述状态下虚拟机的属性的值;记录获取到的在所述状态下虚拟机的属性的值。从本发明实施例可见,通过记录虚拟机在生命周期中各状态下属性的值,方便了用户从记录中查看虚拟机在不同状态下属性的值,便于用户全面地了解虚拟机的属性。The information processing method provided by the embodiment of the present invention detects that the virtual machine enters a state in the life cycle of the virtual machine; uses a method corresponding to the type of the attribute of the virtual machine to obtain the attribute of the virtual machine in the state Value; records the obtained value of the attribute of the virtual machine in the state. It can be seen from the embodiment of the present invention that by recording the attribute values of the virtual machine in each state in the life cycle, it is convenient for the user to view the attribute values of the virtual machine in different states from the records, and it is convenient for the user to fully understand the attributes of the virtual machine.

本发明实施例提供一种信息处理装置,如图2所示,该信息处理装置2包括:An embodiment of the present invention provides an information processing device. As shown in FIG. 2, the information processing device 2 includes:

检测模块21,用于检测到虚拟机进入该虚拟机的生命周期中的一状态。The detection module 21 is configured to detect that the virtual machine enters a state in the life cycle of the virtual machine.

获取模块22,用于使用与该虚拟机的属性的类别对应的方式获取在所述状态下虚拟机的属性的值。The acquiring module 22 is configured to acquire the value of the attribute of the virtual machine in the state in a manner corresponding to the category of the attribute of the virtual machine.

记录模块23,用于记录获取到的在所述状态下虚拟机的属性的值。The recording module 23 is configured to record the acquired value of the attribute of the virtual machine in the state.

进一步地,在图2对应实施例的基础上,本发明提供另一种信息处理装置,如图3所示,该信息处理装置2还包括:Further, on the basis of the embodiment corresponding to FIG. 2 , the present invention provides another information processing device. As shown in FIG. 3 , the information processing device 2 further includes:

确定模块24,用于在预先设置的状态与属性的对应关系中,查找与所述状态对应的属性,以获取所述虚拟机的该查找出的属性的值。The determining module 24 is configured to search for an attribute corresponding to the state in the preset correspondence between states and attributes, so as to obtain the value of the found attribute of the virtual machine.

进一步地,如图3所示,信息处理装置2还包括:Further, as shown in Figure 3, the information processing device 2 also includes:

显示模块25,用于显示所述记录的属性的值。The display module 25 is configured to display the value of the attribute of the record.

进一步地,如图3所示,信息处理装置2还包括:Further, as shown in Figure 3, the information processing device 2 also includes:

生成模块26,用于以所述虚拟机进入所述生命周期中的第一个状态时的时间为起点,生成所述生命周期的时间轴。The generating module 26 is configured to generate the time axis of the life cycle starting from the time when the virtual machine enters the first state in the life cycle.

进一步地,显示模块25具体用于,Further, the display module 25 is specifically used for,

根据所述虚拟机进入所述状态时的时间,将所述记录的属性的值显示在生成的时间轴上与该时间对应的位置。According to the time when the virtual machine enters the state, the value of the recorded attribute is displayed at a position corresponding to the time on the generated time axis.

进一步地,如图3所示,获取模块22包括:Further, as shown in Figure 3, the acquisition module 22 includes:

第一获取单元221,用于若所述虚拟机的属性是预先设置的第一类别中的属性,则从预先设置的数据库中获取该属性的值。The first acquiring unit 221 is configured to acquire a value of the attribute from a preset database if the attribute of the virtual machine is an attribute in a preset first category.

第二获取单元222,用于若所述虚拟机的属性是预先设置的第二类别中的属性,则当更新该属性的值时,查询最近一次记录的该属性在更新前的值,接收来自用户输入的该属性在更新后的值;当添加该属性的值时,接收来自用户输入的为该属性添加的值。The second acquiring unit 222 is configured to, if the attribute of the virtual machine is an attribute in the preset second category, when updating the value of the attribute, query the last recorded value of the attribute before the update, and receive information from The updated value of the attribute entered by the user; when adding the value of the attribute, receive the value added for the attribute from the user input.

在实际应用中,检测模块21、获取模块22、记录模块23、确定模块24、显示模块25和生成模块26均可由信息处理装置2中的CPU、微处理器(Micro Processor Unit,MPU)、数字信号处理器(Digital Signal Processor,DSP)或现场可编程门阵列(Field ProgrammableGate Array,FPGA)等实现。In practical applications, the detection module 21, the acquisition module 22, the recording module 23, the determination module 24, the display module 25 and the generation module 26 can all be controlled by the CPU in the information processing device 2, a microprocessor (Micro Processor Unit, MPU), digital Signal processor (Digital Signal Processor, DSP) or Field Programmable Gate Array (Field Programmable Gate Array, FPGA) and other implementations.

本发明实施例所提供的信息处理装置,检测到虚拟机进入该虚拟机的生命周期中的一状态;使用与该虚拟机的属性的类别对应的方式获取在所述状态下虚拟机的属性的值;记录获取到的在所述状态下虚拟机的属性的值。从本发明实施例可见,通过记录虚拟机在生命周期中各状态下属性的值,方便了用户从记录中查看虚拟机在不同状态下属性的值,便于用户全面地了解虚拟机的属性。The information processing device provided by the embodiment of the present invention detects that the virtual machine enters a state in the life cycle of the virtual machine; uses a method corresponding to the type of the attribute of the virtual machine to obtain the attribute of the virtual machine in the state Value; records the obtained value of the attribute of the virtual machine in the state. It can be seen from the embodiment of the present invention that by recording the attribute values of the virtual machine in each state in the life cycle, it is convenient for the user to view the attribute values of the virtual machine in different states from the records, and it is convenient for the user to fully understand the attributes of the virtual machine.

本发明实施例提供又一种信息处理装置,该信息处理装置包括存储器、处理器以及存储在存储器上并可在处理器上运行的计算机程序,处理器执行计算机程序时实现的步骤包括:An embodiment of the present invention provides yet another information processing device, the information processing device includes a memory, a processor, and a computer program stored in the memory and operable on the processor, and the steps implemented when the processor executes the computer program include:

检测到虚拟机进入该虚拟机的生命周期中的一状态;detecting that the virtual machine enters a state in the life cycle of the virtual machine;

使用与该虚拟机的属性的类别对应的方式获取在所述状态下虚拟机的属性的值;Obtaining the value of the attribute of the virtual machine in the state in a manner corresponding to the category of the attribute of the virtual machine;

记录获取到的在所述状态下虚拟机的属性的值。Record the acquired value of the attribute of the virtual machine in the state.

进一步地,上述处理器执行计算机程序时实现的步骤还包括:Further, the steps implemented when the above-mentioned processor executes the computer program also include:

在预先设置的状态与属性的对应关系中,查找与所述状态对应的属性,以获取所述虚拟机的该查找出的属性的值。In the preset correspondence relationship between the state and the attribute, the attribute corresponding to the state is searched, so as to acquire the value of the found attribute of the virtual machine.

进一步地,上述处理器执行计算机程序时实现的步骤还包括:Further, the steps implemented when the above-mentioned processor executes the computer program also include:

显示所述记录的属性的值。Displays the value of the property of the record.

进一步地,上述处理器执行计算机程序时实现的步骤还包括:Further, the steps implemented when the above-mentioned processor executes the computer program also include:

以所述虚拟机进入所述生命周期中的第一个状态时的时间为起点,生成所述生命周期的时间轴;Taking the time when the virtual machine enters the first state in the life cycle as a starting point, generate a time axis of the life cycle;

进一步地,上述处理器执行计算机程序时实现的步骤具体包括:Further, the steps implemented when the above-mentioned processor executes the computer program specifically include:

根据所述虚拟机进入所述状态时的时间,将所述记录的属性的值显示在生成的时间轴上与该时间对应的位置。According to the time when the virtual machine enters the state, the value of the recorded attribute is displayed at a position corresponding to the time on the generated time axis.

进一步地,上述处理器执行计算机程序时实现的步骤具体包括:Further, the steps implemented when the above-mentioned processor executes the computer program specifically include:

若所述虚拟机的属性是预先设置的第一类别中的属性,则从预先设置的数据库中获取该属性的值;If the attribute of the virtual machine is an attribute in the preset first category, the value of the attribute is obtained from a preset database;

若所述虚拟机的属性是预先设置的第二类别中的属性,则当更新该属性的值时,查询最近一次记录的该属性在更新前的值,接收来自用户输入的该属性在更新后的值;当添加该属性的值时,接收来自用户输入的为该属性添加的值。If the attribute of the virtual machine is an attribute in the preset second category, then when updating the value of the attribute, query the last recorded value of the attribute before the update, and receive input from the user after the update of the attribute The value of the property; when adding a value for the property, receives input from the user to add the value for the property.

虽然本发明所揭露的实施方式如上,但所述的内容仅为便于理解本发明而采用的实施方式,并非用以限定本发明。任何本发明所属领域内的技术人员,在不脱离本发明所揭露的精神和范围的前提下,可以在实施的形式及细节上进行任何的修改与变化,但本发明的专利保护范围,仍须以所附的权利要求书所界定的范围为准。Although the embodiments disclosed in the present invention are as above, the described content is only an embodiment adopted for understanding the present invention, and is not intended to limit the present invention. Anyone skilled in the field of the present invention can make any modifications and changes in the form and details of the implementation without departing from the spirit and scope disclosed by the present invention, but the patent protection scope of the present invention must still be The scope defined by the appended claims shall prevail.

Claims (10)

CN201710911388.4A2017-09-292017-09-29A kind of information processing method and devicePendingCN107678832A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201710911388.4ACN107678832A (en)2017-09-292017-09-29A kind of information processing method and device

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201710911388.4ACN107678832A (en)2017-09-292017-09-29A kind of information processing method and device

Publications (1)

Publication NumberPublication Date
CN107678832Atrue CN107678832A (en)2018-02-09

Family

ID=61138400

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201710911388.4APendingCN107678832A (en)2017-09-292017-09-29A kind of information processing method and device

Country Status (1)

CountryLink
CN (1)CN107678832A (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN106648837A (en)*2016-12-302017-05-10携程旅游网络技术(上海)有限公司Virtual machine life cycle management system and virtual machine life cycle management method
CN106844013A (en)*2017-02-272017-06-13郑州云海信息技术有限公司A kind of virtual machine console

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN106648837A (en)*2016-12-302017-05-10携程旅游网络技术(上海)有限公司Virtual machine life cycle management system and virtual machine life cycle management method
CN106844013A (en)*2017-02-272017-06-13郑州云海信息技术有限公司A kind of virtual machine console

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
尹文开: "云平台中虚拟机生命周期管理的研究与实现", 《中国优秀硕士学位论文全文数据库信息科技辑》*

Similar Documents

PublicationPublication DateTitle
CN106383852B (en)Journal obtaining method and device based on Docker container
CN104252410B (en)The method and apparatus that a kind of control in the page is tested
US11940982B2 (en)Systems and methods for locating application specific data
EP3899753B1 (en)Entity extraction rules harvesting and performance
US10114731B2 (en)Including kernel object information in a user dump
CN104133870B (en)A kind of webpage similarity calculating method and device
CN110287696A (en) A detection method, device and equipment for reverse shell process
CN102291257B (en)Network-based terminal resource management method
WO2013135019A1 (en)Mobile device interface layout method and device
CN114490692A (en) Data verification method, device, equipment and storage medium
CN111797345A (en)Application page display method and device, computer equipment and storage medium
CN112052150A (en) Page loading time detection method, device, storage medium and device
CN107735785A (en) automatic information retrieval
CN106911554A (en)A kind of historical information methods of exhibiting and device
US11301520B2 (en)Artificial intelligence content detection system
CN102929732A (en)Method and device for calling file by application program and client-side equipment
CN103324407A (en)Information processing apparatus and information processing method
CN105260323A (en)Processing method and apparatus for virtual data storage
CN110704776B (en) Account type identification method, device and electronic device
US9773033B2 (en)Storing and retrieving volumes in a database by volume attributes
CN107678832A (en)A kind of information processing method and device
CN114610577A (en) A locking method, apparatus, device and medium for a target resource
CN116361251A (en)Log processing method, log processing device, computer program and computer readable storage medium
CN114296735A (en) A binary file parsing method, device and computer-readable storage medium
JP6340990B2 (en) Message display method, message display device, and message display program

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
RJ01Rejection of invention patent application after publication
RJ01Rejection of invention patent application after publication

Application publication date:20180209


[8]ページ先頭

©2009-2025 Movatter.jp