Method and device for preventing malicious rollback of virtual machine and electronic equipment
1. A method for preventing malicious rollback of a virtual machine, comprising:
acquiring a virtual machine rollback command, wherein the virtual machine rollback command comprises a rollback target of the virtual machine;
acquiring current first state information of the virtual machine;
writing the first state information into a virtual machine state protection memory of the virtual machine, wherein the state information of the virtual machine before the virtual machine rollback command is obtained is stored in the virtual machine state protection memory;
responding to an abnormal message of the virtual machine state protection memory sent by a security processor, and determining that the current rollback operation is abnormal, wherein a first metric task runs on the security processor, when the first metric task is in a running state, the first metric task periodically calculates a first check value corresponding to the virtual machine state protection memory according to the first state information, compares the first check value with a first metric reference value stored in the first metric task, and determines whether the content stored in the virtual machine state protection memory is abnormal according to a comparison result.
2. The method of claim 1, further comprising:
before a virtual machine rollback command is acquired, sending a measurement task suspension request and authentication information of the first measurement task to the security processor, so that the security processor suspends the first measurement task according to the measurement task suspension request after determining that the authentication information is legal;
after the first state information is written into a virtual machine state protection memory of the virtual machine, generating a metric update value based on the first state information, and sending the metric update value and the authentication information to the security processor, so that the first metric task updates a first metric reference value in the first metric task by using the metric update value after determining that the authentication information is legal;
and in response to the first metric task updating the first metric reference value according to the metric updating value, determining that the current rollback operation is legal, and performing rollback operation on the virtual machine according to the rollback target.
3. The method of claim 1, further comprising:
before acquiring a virtual machine rollback command, acquiring a loading command of a Virtual Machine Monitor (VMM);
requesting the security processor to create a second metric task for the VMM;
requesting the security processor to start the second metric task, wherein when the second metric task is in a running state, the second metric task periodically calculates a second check value according to a memory corresponding to the VMM, compares the second check value with a second metric reference value stored in the second metric task, and determines whether the VMM is abnormal according to a comparison result;
and loading the VMM.
4. The method of claim 3, further comprising:
after loading the VMM, acquiring an unloading command of the VMM;
requesting to stop the second metrology task;
destroying the second measurement task;
the VMM is unloaded.
5. The method of claim 1, further comprising:
before the virtual machine rollback command is obtained, obtaining a virtual machine creating command, wherein the virtual machine creating command comprises virtual machine creating parameters;
creating the virtual machine according to the virtual machine creation parameters;
acquiring current second state information of the virtual machine;
writing the second state information into a virtual machine state protection memory of the virtual machine;
generating the first metric reference value based on the second state information;
sending the first metric reference value to the security processor;
requesting the security processor to create the first metrology task;
requesting the secure processor to initiate the first metrology task.
6. The method of claim 5, further comprising:
registering an exception callback function after requesting the security processor to create the first metrology task;
and triggering the exception callback function in response to receiving an exception message of the virtual machine state protection memory sent by the security processor.
7. The method of claim 2, further comprising:
requesting the secure processor to stop the first metrology task;
acquiring a virtual machine destruction command;
destroying the virtual machine according to the virtual machine destroying command;
requesting the security processor to destroy the first metrology task.
8. The method of claim 2, further comprising:
after the virtual machine is rolled back according to the rolling back target, the security processor is requested to start the first measurement task according to the authentication information, wherein the first measurement task is in a running state after being started.
9. The method according to any one of claims 1 to 8, wherein the authentication information comprises:
an authorization code generated by the security processor when creating the first metrology task, and context information of a creator of the first metrology task.
10. An apparatus for preventing malicious rollback of a virtual machine, comprising:
the virtual machine rollback control method comprises a first obtaining module, a second obtaining module and a third obtaining module, wherein the first obtaining module is configured to obtain a virtual machine rollback command, and the virtual machine rollback command comprises a rollback target of a virtual machine;
the second acquisition module is configured to acquire current first state information of the virtual machine;
a write module configured to write the first state information into a virtual machine state protection memory of the virtual machine, where the virtual machine state protection memory stores the state information of the virtual machine before the virtual machine rollback command is obtained;
the determining module is configured to determine that a current rollback operation is abnormal in response to receiving an abnormal message of the virtual machine state protection memory sent by a security processor, wherein a first metric task runs on the security processor, and when the first metric task is in a running state, the first metric task periodically calculates a first check value corresponding to the virtual machine state protection memory according to the state information, compares the first check value with a first metric reference value stored in the first metric task, and determines whether content stored in the virtual machine state protection memory is abnormal according to a comparison result.
11. The apparatus of claim 10, further comprising:
a first sending module, configured to send a measurement task suspension request and authentication information of the first measurement task to the security processor before obtaining a virtual machine rollback command, so that the security processor suspends the first measurement task according to the measurement task suspension request after determining that the authentication information is legal;
a first generating module configured to generate a metric update value based on the first state information after writing the first state information into a virtual machine state protection memory of the virtual machine, and send the metric update value and the authentication information to the security processor, so that the first metric task updates a first metric reference value in the first metric task using the metric update value after determining that the authentication information is legal;
and the rollback module is configured to respond to the first metric task to update the first metric reference value according to the metric update value, determine that the current rollback operation is legal, and perform rollback operation on the virtual machine according to the rollback target.
12. The apparatus of claim 10, further comprising:
a second obtaining module configured to obtain a load command of the virtual machine monitor VMM before obtaining the virtual machine rollback command;
a first request module configured to request the security processor to create a second metric task for the VMM;
a second request module configured to request the security processor to start the second metric task, where when the second metric task is in a running state, the second metric task periodically calculates a second check value according to a memory corresponding to the VMM, compares the second check value with a second metric reference value stored in the second metric task, and determines whether the VMM is abnormal according to a comparison result;
a load module configured to load the VMM.
13. The apparatus of claim 12, further comprising:
a third obtaining module configured to obtain an unload command of the VMM after the VMM is loaded;
a third request module configured to request stopping of the second metrology task;
a destruction module configured to destroy the second metrology task;
an offload module configured to offload the VMM.
14. The apparatus of claim 10, further comprising:
a fourth obtaining module, configured to obtain a virtual machine creation command before obtaining the virtual machine rollback command, where the virtual machine creation command includes a virtual machine creation parameter;
a creation module configured to create the virtual machine according to the virtual machine creation parameter;
a fifth obtaining module, configured to obtain current second state information of the virtual machine;
the saving module is configured to write the second state information into a virtual machine state protection memory of the virtual machine;
a second generating module configured to generate the first metric reference value based on the second state information;
a second sending module configured to send the first metric reference value to the security processor;
a fourth request module configured to request the security processor to create the first metrology task;
a fifth request module configured to request the security processor to initiate the first metrology task.
15. The apparatus of claim 14, further comprising:
a registration module configured to register an exception callback function after requesting the security processor to create the first metric task;
a triggering module configured to trigger the exception callback function in response to receiving an exception message of the virtual machine state protection memory sent by the security processor.
16. The apparatus of claim 11, further comprising:
a sixth request module configured to request the secure processor to stop the first metrology task;
a sixth obtaining module configured to obtain a virtual machine destruction command;
the destruction module is configured to destroy the virtual machine according to the virtual machine destruction command;
a seventh request module configured to request the security processor to destroy the first metrology task.
17. The apparatus of claim 11, further comprising:
an eighth requesting module, configured to, after performing a rollback operation on the virtual machine according to the rollback target, request the security processor to start the first metric task according to the authentication information, where the first metric task is in a running state after being started.
18. The apparatus according to any one of claims 10 to 17, wherein the authentication information comprises:
an authorization code generated by the security processor when creating the first metrology task, and context information of a creator of the first metrology task.
19. An electronic device, comprising:
a processor; and
a memory having stored thereon computer-executable instructions for implementing the method of preventing malicious rollback of a virtual machine as claimed in any one of claims 1-9 when executed by the processor.
Background
In recent years, cloud computing has received consistent attention from both the academic and industrial communities. With the increasing sophistication of cloud computing applications. The safety requirements are also increasing. Therefore, multiple protection technologies for cloud computing and virtual machine security are also provided. Such as the use of VTPM (virtualized Trusted Platform control Module) technology. The VTPM is based on a Trusted hardware basic TPM (Trusted Platform control Module), a Trusted virtual OS (Operation System) is constructed for each virtual machine by utilizing a Trusted protection scheme technology of the TPM, and the security and trust functions of the virtual machines are greatly improved through the technology.
The VTPM is a virtualization of the TPM, so that the TPM can be applied to virtualized environments such as cloud computing, and a trusted computing technology is allowed on a physical Machine having an infinite VM (Virtual Machine), and a secure storage and encryption function of the TPM can be used in the VM through a Virtual trusted platform module, which supports establishment of a trusted environment in the virtualized environment, so that a trusted service of the Virtual Machine becomes possible, but a secure state required by the trusted computing cannot be reversed, thereby preventing the Virtual Machine from rolling back. The cloud platform supports the characteristics of virtual machine snapshot and rollback but is contrary to trusted computing, for example, if a virtual machine rolls back from a safe state to an unsafe state, the safe state is inconsistent, and the virtual machine rollback is abnormal. Therefore, how to identify the abnormal rollback of the virtual machine in the trusted virtual machine environment to ensure the normal rollback of the virtual machine is a technical problem to be solved urgently at present.
Disclosure of Invention
In view of this, one or more embodiments of the present disclosure provide a method, an apparatus, and an electronic device for preventing a malicious rollback of a virtual machine, which can effectively identify an abnormal rollback operation of the virtual machine.
One or more embodiments of the present application provide a method for preventing a malicious rollback of a virtual machine, including: acquiring a virtual machine rollback command, wherein the virtual machine rollback command comprises a rollback target of the virtual machine; acquiring current first state information of the virtual machine; writing the first state information into a virtual machine state protection memory of the virtual machine, wherein the state information of the virtual machine before the virtual machine rollback command is obtained is stored in the virtual machine state protection memory; responding to an abnormal message of the virtual machine state protection memory sent by a security processor, and determining that the current rollback operation is abnormal, wherein a first metric task runs on the security processor, when the first metric task is in a running state, the first metric task periodically calculates a first check value corresponding to the virtual machine state protection memory according to the first state information, compares the first check value with a first metric reference value stored in the first metric task, and determines whether the content stored in the virtual machine state protection memory is abnormal according to a comparison result.
Optionally, the method further includes: before a virtual machine rollback command is acquired, sending a measurement task suspension request and authentication information of the first measurement task to the security processor, so that the security processor suspends the first measurement task according to the measurement task suspension request after determining that the authentication information is legal; after the first state information is written into a virtual machine state protection memory of the virtual machine, generating a metric update value based on the first state information, and sending the metric update value and the authentication information to the security processor, so that the first metric task updates a first metric reference value in the first metric task by using the metric update value after determining that the authentication information is legal; and in response to the first metric task updating the first metric reference value according to the metric updating value, determining that the current rollback operation is legal, and performing rollback operation on the virtual machine according to the rollback target.
Optionally, the method further includes: before acquiring a virtual machine rollback command, acquiring a loading command of a Virtual Machine Monitor (VMM); requesting the security processor to create a second metric task for the VMM, and requesting the security processor to start the second metric task; when the second metric task is in a running state, periodically calculating a second check value according to a memory corresponding to the VMM by the second metric task, comparing the second check value with a second metric reference value stored in the second metric task, and determining whether the VMM is abnormal or not according to a comparison result; and loading the VMM.
Optionally, the method further includes: after loading the VMM, acquiring an unloading command of the VMM; requesting to stop the second metrology task; destroying the second measurement task; the VMM is unloaded.
Optionally, the method further includes: before the virtual machine rollback command is obtained, obtaining a virtual machine creating command, wherein the virtual machine creating command comprises virtual machine creating parameters; creating the virtual machine according to the virtual machine creation parameters; acquiring current second state information of the virtual machine; writing the second state information into a virtual machine state protection memory of the virtual machine; generating the first metric reference value based on the second state information; sending the first metric reference value to the security processor; requesting the security processor to create the first metrology task; requesting the secure processor to initiate the first metrology task.
Optionally, the method further includes: and after the current second state information of the virtual machine is obtained, applying for the virtual machine to protect the memory by the state of the virtual machine.
Optionally, the method further includes: registering an exception callback function after requesting the security processor to create the first metrology task; and triggering the exception callback function in response to receiving an exception message of the virtual machine state protection memory sent by the security processor.
Optionally, the method further includes: requesting the secure processor to stop the first metrology task; acquiring a virtual machine destruction command; destroying the virtual machine according to the virtual machine destroying command; requesting the security processor to destroy the first metrology task.
Optionally, the method further includes: after the virtual machine is rolled back according to the rolling back target, the security processor is requested to start the first measurement task according to the authentication information, wherein the first measurement task is in a running state after being started.
Optionally, the authentication information includes: an authorization code generated by the security processor when creating the first metrology task, and context information of a creator of the first metrology task.
Optionally, the state information of the virtual machine at least includes one of the following: the virtual machine comprises a process number of the virtual machine, a virtual Address Space Identity (ASID), system time, operation User Identity (UID) information and virtualized trusted platform control module (VTPM) state information.
One or more embodiments of the present invention further provide an apparatus for preventing a malicious rollback of a virtual machine, including: the virtual machine rollback control method comprises a first obtaining module, a second obtaining module and a third obtaining module, wherein the first obtaining module is configured to obtain a virtual machine rollback command, and the virtual machine rollback command comprises a rollback target of a virtual machine; the second acquisition module is configured to acquire current first state information of the virtual machine; a write module configured to write the first state information into a virtual machine state protection memory of the virtual machine, where the virtual machine state protection memory stores the state information of the virtual machine before the virtual machine rollback command is obtained; the determining module is configured to determine that a current rollback operation is abnormal in response to receiving an abnormal message of the virtual machine state protection memory sent by a security processor, wherein a first metric task runs on the security processor, and when the first metric task is in a running state, the first metric task periodically calculates a first check value corresponding to the virtual machine state protection memory according to the state information, compares the first check value with a first metric reference value stored in the first metric task, and determines whether content stored in the virtual machine state protection memory is abnormal according to a comparison result.
Optionally, the apparatus further comprises: a first sending module, configured to send a measurement task suspension request and authentication information of the first measurement task to the security processor before obtaining a virtual machine rollback command, so that the security processor suspends the first measurement task according to the measurement task suspension request after determining that the authentication information is legal; a first generating module configured to generate a metric update value based on the first state information after writing the first state information into a virtual machine state protection memory of the virtual machine, and send the metric update value and the authentication information to the security processor, so that the first metric task updates a first metric reference value in the first metric task using the metric update value after determining that the authentication information is legal; and the rollback module is configured to respond to the first metric task to update the first metric reference value according to the metric update value, determine that the current rollback operation is legal, and perform rollback operation on the virtual machine according to the rollback target.
Optionally, the apparatus further comprises: a second obtaining module configured to obtain a load command of the virtual machine monitor VMM before obtaining the virtual machine rollback command; a first request module configured to request the security processor to create a second metric task for the VMM; a second request module, configured to request the security processor to start the second metric task, where the second metric task is in a running state, the second metric task periodically calculates a second check value according to a memory corresponding to the VMM, compares the second check value with a second metric reference value stored in the second metric task, and determines whether the VMM is abnormal according to a comparison result; a load module configured to load the VMM.
Optionally, the apparatus further comprises: a third obtaining module configured to obtain an unload command of the VMM after the VMM is loaded; a third request module configured to request stopping of the second metrology task; a destruction module configured to destroy the second metrology task; an offload module configured to offload the VMM.
Optionally, the apparatus further comprises: a fourth obtaining module, configured to obtain a virtual machine creation command before obtaining the virtual machine rollback command, where the virtual machine creation command includes a virtual machine creation parameter; a creation module configured to create the virtual machine according to the virtual machine creation parameter; a fifth obtaining module, configured to obtain current second state information of the virtual machine; the saving module is configured to write the second state information into a virtual machine state protection memory of the virtual machine; a second generating module configured to generate the first metric reference value based on the second state information; a second sending module configured to send the first metric reference value to the security processor; a fourth request module configured to request the security processor to create the first metrology task; a fifth request module configured to request the security processor to initiate the first metrology task.
Optionally, the apparatus further comprises: and the application module is configured to apply for the virtual machine state protection memory for the virtual machine after acquiring the current second state information of the virtual machine.
Optionally, the apparatus further comprises: a registration module configured to register an exception callback function after requesting the security processor to create the first metric task; and the triggering module is configured to receive an exception message of the virtual machine state protection memory sent by the security processor and trigger the exception callback function.
Optionally, the apparatus further comprises: a sixth request module configured to request the secure processor to stop the first metrology task; a sixth obtaining module configured to obtain a virtual machine destruction command; the destruction module is configured to destroy the virtual machine according to the virtual machine destruction command; a seventh request module configured to request the security processor to destroy the first metrology task.
Optionally, the apparatus further comprises: an eighth requesting module, configured to, after performing a rollback operation on the virtual machine according to the rollback target, request the security processor to start the first metric task according to the authentication information, where the first metric task is in a running state after being started.
Optionally, the authentication information includes: an authorization code generated by the security processor when creating the first metrology task, and context information of a creator of the first metrology task.
Optionally, the state information of the virtual machine at least includes one of the following: the virtual machine comprises a process number of the virtual machine, a virtual Address Space Identity (ASID), system time, operation User Identity (UID) information and virtualized trusted platform control module (VTPM) state information.
One or more embodiments of the present invention also provide an electronic device, including: a processor; and a memory having stored thereon computer-executable instructions that, when executed by the processor, are for implementing any of the above-described methods of preventing malicious rollback of a virtual machine.
One or more embodiments of the present invention also provide a computer-readable storage medium having stored thereon computer-executable instructions, which when executed by a processor, are used to implement any of the above-described methods for preventing malicious rollback of a virtual machine.
The method, the device and the electronic equipment for preventing the malicious rollback of the virtual machine provided by one or more embodiments of the application, after the rollback command of the virtual machine is acquired, the current first state information of the virtual machine is acquired, the first state information is written into a virtual machine state protection memory of the virtual machine, so that the first measurement task running on the safety processor periodically calculates a first check value corresponding to the virtual machine state protection memory based on the first state information, compares the check value with the first measurement value stored in the first measurement task, determining whether the content stored in the virtual machine state protection memory is abnormal according to the comparison result, determining that the current rollback operation is abnormal under the condition of acquiring the abnormal message of the virtual machine state protection memory sent by the security processor, therefore, abnormal rollback operation of the virtual machine can be effectively identified, and the safety of the virtual machine is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a schematic diagram of a hardware system shown in accordance with one or more embodiments of the present application;
FIG. 2 is a flow diagram illustrating a method of preventing malicious rollback of a virtual machine in accordance with one or more embodiments of the present application;
FIG. 3 is a flow diagram illustrating a method of preventing malicious rollback of a virtual machine in accordance with one or more embodiments of the present application;
FIG. 4 is a flow diagram illustrating a method of preventing malicious rollback of a virtual machine in accordance with one or more embodiments of the present application;
FIG. 5 is a block diagram illustrating a virtual machine system according to one or more embodiments of the present disclosure;
FIG. 6 is a flow diagram illustrating a process from loading a VMM to unloading a VMM according to one or more embodiments of the present application;
FIG. 7 is a flow diagram illustrating the creation of a virtual machine in accordance with one or more embodiments of the present application;
fig. 8 is a flow diagram illustrating destruction of a virtual machine according to one or more embodiments of the present application;
fig. 9 is a schematic structural diagram illustrating an apparatus for preventing a malicious rollback of a virtual machine according to one or more embodiments of the present application;
fig. 10 is a schematic structural diagram illustrating an apparatus for preventing a malicious rollback of a virtual machine according to one or more embodiments of the present application;
fig. 11 is a schematic structural diagram of an electronic device according to one or more embodiments of the present application.
Detailed Description
The embodiments of the present application will be described in detail below with reference to the accompanying drawings.
It should be understood that the embodiments described are only a few embodiments of the present application, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
One or more embodiments of the present application provide a method for preventing a malicious rollback of a virtual machine, which may be implemented based on the hardware system shown in fig. 1. As shown in fig. 1, the hardware system includes a Central Processing Unit (CPU), a memory, a virtual machine state protection memory, a secure processor, and a secure processor memory.
The running environment of the safety processor is isolated from the CPU, and the safety processor has a special memory resource which cannot be directly accessed by the CPU; a specific communication interface is arranged between the safety processor and the CPU, the CPU can send a command to the safety processor through the communication interface, and the safety processor returns a command processing result through the communication interface; the safety processor can access the memory of the safety processor and all the memories of the CPU, and the CPU can only access the memory of the safety processor but cannot access the memory of the safety processor. The virtual machine state protection memory block is used for storing state information of the virtual machine.
Fig. 2 is a flowchart illustrating a method for preventing malicious rollback of a virtual machine, which may be performed by a CPU in the hardware system shown in fig. 1, for example, according to one or more embodiments of the present application, as shown in fig. 2, the method including:
step 201: acquiring a virtual machine rollback command, wherein the virtual machine rollback command comprises a rollback target of the virtual machine;
the virtual machine rollback command is used for indicating that the virtual machine is rolled back from the current state to a certain state where the virtual machine is located before, and the state is a rollback target.
Step 202: acquiring current first state information of the virtual machine;
for example, the first state information may include at least one of:
the virtual machine includes a process number, an Address Space Identity (ASID) of the virtual machine, a system time, User Identity (UID) information of an operation User, and VTPM state information.
Step 203: writing the first state information into a virtual machine state protection memory of the virtual machine;
the state information of the virtual machine before the virtual machine rollback command is acquired is stored in the virtual machine state protection memory.
In one or more embodiments of the present application, a virtual machine state protection memory block may be applied to each virtual machine in advance to store state information of the virtual machine before rollback each time, and based on this, in step 203, the obtained first state information may be directly written into a virtual machine state protection memory allocated to the current virtual machine in advance, or after the virtual machine is created, a virtual machine state protection memory of the virtual machine may be applied. Each virtual machine state protection memory is only used for storing the state information of the corresponding virtual machine. The virtual machine state information written into the virtual machine state protection memory may include at least one of the first state information.
Step 204: and determining that the current rollback operation is abnormal in response to receiving an abnormal message of the virtual machine state protection memory sent by a security processor.
The method includes the steps that a first metric task runs on the safety processor, when the first metric task is in a running state, the first metric task periodically calculates a first check value corresponding to the virtual machine state protection memory according to the first state information, the first check value can be a hash value calculated according to data stored in the virtual machine state protection memory, the first check value is compared with a first metric reference value stored in the first metric task, whether the content stored in the virtual machine state protection memory is abnormal or not is determined according to a comparison result, for example, whether data stored in the virtual machine state protection memory is changed or not is determined according to the comparison result, and if the data stored in the virtual machine state protection memory is changed, the virtual machine state protection memory is determined to be abnormal.
In step 204, before it is determined that the current rollback operation is abnormal, the rollback operation on the virtual machine is completed according to the rollback command of the virtual machine, and when it is determined that the current rollback operation is abnormal, a rollback abnormal message may be sent, and an administrator may be notified to perform the processing in time; or, when the current rollback operation is determined to be abnormal, an abnormal callback function can be triggered, the rollback operation is stopped, and an administrator is informed that the virtual machine is abnormal currently.
Fig. 3 is a flowchart illustrating a method for preventing malicious rollback of a virtual machine according to one or more embodiments of the present application, where the method includes:
step 301: calling a virtual machine rollback command by a user;
step 302: writing the current virtual machine state information (namely first state information) into a virtual machine state protection memory;
step 303: a measurement task running on a safety processor detects that the content stored in a state protection memory of a virtual machine is abnormal, determines that the measurement is abnormal, and triggers an abnormal callback function;
step 304: receiving a message sent by a security processor that the content stored in the virtual machine state protection memory is abnormal, triggering an abnormal callback function, preventing the virtual machine from rolling back, and notifying an administrator of the abnormality;
step 305: the virtual machine roll back fails.
According to the method for preventing the malicious rollback of the virtual machine, after the rollback command of the virtual machine is obtained, obtaining the current first state information of the virtual machine, writing the first state information into the virtual machine state protection memory of the virtual machine, so that the first measurement task running on the safety processor periodically calculates a first check value corresponding to the virtual machine state protection memory based on the first state information, compares the check value with the first measurement value stored in the first measurement task, determining whether the content stored in the virtual machine state protection memory is abnormal according to the comparison result, under the condition of acquiring a message sent by a security processor and indicating that the content stored in a virtual machine state protection memory is abnormal, determining that the current rollback operation is abnormal, therefore, abnormal rollback operation of the virtual machine is effectively identified, and safety of the virtual machine is improved. In one or more embodiments of the present application, the method for preventing malicious rollback of a virtual machine may further include:
before a virtual machine rollback command is acquired, sending a measurement task suspension request and authentication information of the first measurement task to the security processor, so that the security processor suspends the first measurement task according to the measurement task suspension request after determining that the authentication information is legal;
in one or more embodiments of the present application, the first metric task may be, for example, a TDM (Trusted Dynamic Measurement) task, where the first metric task runs on a secure processor, and when the first metric task is in an activated state, a hash value (which is an example of the above-mentioned first check value) is periodically calculated according to data stored in a protected memory segment (such as the above-mentioned virtual machine state protection memory) that has been registered, and compared with a reference value that is pre-stored by the first metric task, such as the above-mentioned first metric reference value, to ensure that data in the protected memory is not tampered, and an exception handling warning may be triggered once the data is detected to be tampered. It should be noted that the memory registered in the TDM module (such as the virtual machine state protection memory) is a memory protected by the TDM module, and the TDM module can protect data in the memory.
For example, the CPU may invoke a metric task pause command to request the security processor to pause the first metric task, and after invoking the metric task pause command, the CPU sends authentication information corresponding to the first metric task to the security processor, and after verifying the authentication information and determining that the authentication information is legal, the security processor may pause the first metric task, where the authentication information corresponding to the first metric task may include, for example, an authorization code generated when the first metric task is created, such as a random authorization code, and context information of a creator of the metric task, where the context information may include, for example, a process number and/or a name of a drive module.
After the first state information is written into a virtual machine state protection memory of the virtual machine, generating a metric update value based on the first state information, and sending the metric update value and the authentication information to the security processor, so that the first metric task updates a first metric reference value in the first metric task by using the metric update value after determining that the authentication information is legal;
in one example, a metric update value may be calculated by the CPU based on at least one of the plurality of first state information, for example, a hash value calculated based on the at least one of the plurality of first state information may be used as the metric update value.
And in response to the first metric task updating the first metric reference value according to the metric updating value, determining that the current rollback operation is legal, and performing rollback operation on the virtual machine according to the rollback target.
Fig. 4 is a flowchart illustrating a method for preventing malicious rollback of a virtual machine according to one or more embodiments of the present application, where the method may include the following processes, as shown in fig. 4:
step 401: at the CPU end, a user calls a measurement task pause command to request to pause a measurement task;
in step 401, the user invokes a metrology task suspend command, and the CPU sends an authorization code and context information of the metrology task held by the user to the secure processor.
Step 402: the secure processor suspends the metric task;
in this step 402, the security processor verifies the authorization code and the context information of the received measurement task from the CPU, determines that the authorization code and the context information are verified to be legitimate if the authorization code and the context information are consistent with the authorization code and the context information corresponding to the measurement task stored in the security processor, suspends the measurement task, otherwise does not suspend the measurement task;
step 403: calling a virtual machine rollback command;
step 404: writing the current virtual machine state information into a virtual machine state protection memory;
step 405: calculating a measurement update value according to the current virtual machine state information;
in step 405, for example, a hash value may be calculated based on at least one of the above-mentioned virtual machine state information, and the calculated hash value may be used as a metric update value;
step 406: a user calls a measurement task updating interface;
in step 406, when the user calls the metrology task update interface, the CPU sends the authorization code and context information of the metrology task held by the user to the secure processor.
Step 407: the security processor updates the measurement task;
in step 407, the security processor verifies the authorization code and the context information of the measurement task sent by the CPU, and updates the measurement reference value in the measurement task by using the measurement update value after the verification is passed;
step 408: performing rollback operation on the virtual machine according to the selected rollback target;
step 409: a measurement task starting command is called;
in this step 409, when the metrology task start command is invoked, the CPU sends the authorization code and context information of the metrology task held by the user to the secure processor.
Step 410: the safety processor starts a measurement task;
in this step 410, the secure processor verifies the authorization code and the context information of the measurement task sent by the CPU, and starts the measurement task after the verification is passed.
Step 411: the rollback of the virtual machine is successful.
In this step, for example, a notification message that the rollback of the virtual machine is successful may be issued.
In one or more embodiments of the present application, before obtaining the virtual machine rollback command, the security processor is requested to suspend the first metrology task running thereon based on the suspension metrology task request and the authentication information of the first metrology task, so that the first metrology task stops periodically verifying the consistency of the data in the virtual machine state protection memory.
After the first state information of the virtual machine is written into the virtual machine state protection memory, a metric update value can be generated based on the first state information, and the metric update value and the authentication information of the first metric task are sent to the security processor.
After receiving the measurement update value, the security processor needs to update the measurement reference value in the first measurement task by using the measurement update value, so that authentication information needs to be authenticated first, after the authentication information is determined to be legal, the measurement update value is used for updating the measurement reference value in the first measurement task, the virtual machine rollback operation of the time is executed according to the rollback target, and if the authentication information is determined to be illegal, the measurement reference value in the measurement task is not updated, and the virtual machine rollback operation of the time is prevented. Because the authentication information corresponds to the current first metrology task, only the user with the first metrology task operation authority can acquire the authentication information, thereby ensuring that only the user with the first metrology task operation authority can perform legal rollback operation on the virtual machine.
In the execution process of the method, every time the first metrology task needs to be operated, the authentication information of the first metrology task needs to be authenticated on the basis of validity, so that the security of the virtual machine environment can be ensured through the authentication information.
Before the virtual machine is requested to roll back, if an illegal user intends to maliciously roll back the virtual machine, the authentication information of the first metric task cannot be obtained, so that the first metric task cannot be requested to suspend the first metric task to the security processor, because the first metric task can periodically check the consistency of data in the virtual machine state protection memory in a running state, in this case, when the first state information is written into the virtual machine state protection memory, the first metric task can detect an abnormality, at this time, if the update value is generated based on the first state information, the authentication information cannot be obtained, so that the first metric reference value cannot be updated, the operation of the virtual machine roll back cannot be executed, and therefore, the malicious roll back of the virtual machine can be effectively prevented, and the security of the virtual machine is improved.
Fig. 5 is a schematic structural diagram of a Virtual Machine system according to one or more embodiments of the present application, and as shown in fig. 5, a Virtual Machine is described by taking a Virtual Machine 0 and a Virtual Machine 1 as an example, a Virtual Machine is run in the Virtual Machine, a Virtual Machine Trusted Platform control Module (VTPM) runs on a secure processor, a central processing unit runs on a Trusted dynamic metric driver Module, a Virtual Machine Monitor (VMM) Module, and a Trusted Platform control driver Module, and a Virtual Machine Monitor Module on the central processing unit accesses and controls the Trusted dynamic metric Module on the secure processor through an interface provided by the Trusted dynamic metric Module in a unified manner, so as to implement metric protection on data in a Virtual Machine state protection memory. The trusted dynamic measurement module is a kernel module of the OS, is in a high privilege mode of the system, extracts an authorization code and context information of a measurement task creator in a process of processing a command sent by the trusted dynamic measurement module, and guarantees security of command interaction through authentication of the authorization code and the context information. The virtual machine monitor module can be responsible for functions of creating, executing, snapshotting, destroying and the like of the client, and can also be responsible for access of the TDM module driving interface and management work of the virtual machine state protection memory. The virtual machine monitor module is a drive module in the kernel, accords with the structure of the drive module in the kernel, and can dynamically protect the code segment and the read-only segment data of the virtual machine monitor module by the credible dynamic measurement module.
Based on the virtual machine system shown in fig. 5, the method for preventing malicious rollback of a virtual machine according to one or more embodiments of the present application may further include:
before acquiring a virtual machine rollback command, acquiring a loading command of a Virtual Machine Monitor (VMM);
requesting the security processor to create a second metric task for the VMM; requesting initiation of the second metrology task from the secure processor; when the second metric task is in a running state, periodically calculating a second check value according to a memory corresponding to the VMM by the second metric task, comparing the second check value with a second metric reference value stored in the second metric task, determining whether the VMM is abnormal according to a comparison result, and if the VMM is determined to be abnormal, sending a VMM abnormal message to a CPU;
and loading the VMM.
It should be noted that the VMM loading process shown in fig. 5 may be performed before the virtual machine is created, for example.
By adding the TDM module dynamic measurement protection to the virtual machine monitor, the virtual machine monitor can be dynamically protected from being tampered, the security of the virtual machine monitor is ensured, and meanwhile, the steps in the virtual machine rollback flow shown in fig. 3 can be ensured not to be skipped maliciously. The protection of the Virtual Machine monitor by the TDM module is described by taking the protection of a KVM (Kernel-based Virtual Machine) module in the VMM as an example, the KVM exists as a Kernel driver module, the task _ struct of the KVM module (a structure called process descriptor) may be obtained in the Linux kernel through a symbolic interface, the data structure contains the information of code segment, data segment, etc. of the whole KVM module, and after the information is obtained, the data section of the KVM module and the address section of the code segment may be converted from the virtual address section to the physical address section to obtain information about a memory (an example of the memory corresponding to the VMM) corresponding to the data section and the code segment of the KVM module, and after the conversion is successful, the interface of the TDM module may be invoked to create a task of the memory section corresponding to the KVM module, the protection of the address section and the code section of the KVM module by the TDM module can be realized.
The method for preventing the malicious rollback of the virtual machine, provided by one or more embodiments of the present application, may further include:
after loading the VMM, acquiring an unloading command of the VMM;
requesting to stop the second metrology task;
destroying the second measurement task;
the VMM is unloaded.
The process of loading a VMM module into an unloading VMM module is exemplarily described below with reference to fig. 6, and as shown in fig. 6, the process of loading the VMM module includes:
step 601: acquiring a loading command of a VMM module;
step 602: the TDM protection is started in the initial stage module _ init loaded by the VMM module, the TDM protection comprises a memory segment needing protection, and the memory segment can comprise a memory segment corresponding to the VMM module code segment and a read-only data segment address block. TDM protection also comprises measurement task creation, abnormal callback function registration and TDM measurement task starting, and dynamic protection of loaded VMM module can be realized through TDM;
step 603: loading a VMM module;
step 604: the loading of the VMM module under the TDM protection is successful.
The process of unloading the VMM module includes:
step 605: acquiring a VMM module unloading request;
step 606: stopping the TDM task in the removal stage module _ exit of the VMM module, and destroying the TDM task;
step 607: unloading the VMM module;
step 608: the VMM module is unloaded successfully.
The dynamic protection of the VMM module can be realized by starting the TDM protection when the VMM module is loaded, and the loaded VMM module is ensured to be in a credible state, so that the credible guarantee is provided for the use of the VMM module in the next step.
In one or more embodiments of the present application, the method for preventing malicious rollback of a virtual machine may further include: before the virtual machine rollback command is obtained, obtaining a virtual machine creating command, wherein the virtual machine creating command comprises virtual machine creating parameters;
for example, the user calls a virtual machine creation command, selects a virtual machine creation parameter, and the CPU generates a virtual machine creation command based on the parameter.
Creating the virtual machine according to the virtual machine creation parameters;
acquiring current second state information of the virtual machine;
the second status information may include, for example, at least one of:
the process number, ASID, system time, operational user identification, UID, and VTPM state information of the virtual machine.
It should be noted that, although the first status information and the second status information may include at least one of the plurality of types of status information, in the execution process of the method, it is necessary to ensure that the status information included in the first status information and the second status information are consistent, and here, consistent status information means that the number of information is consistent with the type of information.
Writing the obtained second state information into a virtual machine state protection memory of the virtual machine;
generating the first metric reference value based on the second state information;
for example, a hash value is calculated based on at least one of the above kinds of state information, and the calculated hash value is used as the first metric reference value.
Sending the first metric reference value to the security processor;
requesting the security processor to create the first metrology task;
for example, the CPU may invoke the metric task creation interface, so that the security processor creates the first metric task, the security processor may create the first metric task and generate the authorization code according to the information sent by the CPU, and then send the ID of the created first metric task and the authorization code to the CPU;
requesting the secure processor to initiate the first metrology task.
It should be noted that, in the process of creating the virtual machine, the process of creating the first metric task to request the security processor to start the first metric task is executed before requesting to suspend the first metric task, acquire the first state information, write the first state information into the virtual machine state protection memory, and update the first metric reference value.
For example, the CPU may call a start command of the first metric task, request the security processor to start the first metric task, and after the security processor obtains the start command of the first metric task, the first metric task may verify the authorization code and the context information, and start the first metric task after the verification passes.
In one or more embodiments of the present application, the method for preventing malicious rollback of a virtual machine may further include: and after the current second state information of the virtual machine is obtained, applying for the virtual machine to protect the memory by the state of the virtual machine. For example, when there are multiple virtual machines that need to apply for the virtual machine state protection memory, one virtual machine state protection memory block may be applied for each virtual machine. The virtual machine state protection memory block is used for storing state information of the virtual machine before each rollback of the virtual machine, the memory block can be dynamically protected by TDM, and information under the memory block is under the double protection of an authorization code and a context and belongs to a trusted state.
In one or more embodiments of the present application, the method for preventing malicious rollback of a virtual machine may further include:
registering an exception callback function after requesting the security processor to create the first metrology task; for example, the CPU may call an exception handler function register command to register an exception callback function.
And triggering the exception callback function in response to receiving an exception message of the virtual machine state protection memory sent by the security processor. For example, after sending the measurement suspending task request and the authentication information of the first measurement task to the security processor, if a message that the authentication information sent by the security processor is illegal is received, an abnormal callback function may be triggered, and the abnormal callback function is triggered, which may prevent the current operation; for another example, when the metric update value and the authentication information are sent to the security processor, if a message that the authentication information sent by the security processor is not legal is received, an abnormal callback function may be triggered, and the abnormal callback function may be triggered to prevent the operations of updating the first metric task update value and performing rollback according to the rollback target.
Fig. 7 is a flowchart illustrating a process of creating a virtual machine according to one or more embodiments of the present application, where the process of creating a virtual machine, as shown in fig. 7, includes the following steps:
step 701: a user calls a virtual machine creating command;
step 702: creating a virtual machine according to parameters selected by a user;
step 703: applying for the virtual machine state protection memory of the virtual machine;
step 704: writing the state information (which is an example of the second state information) of the current virtual machine into a virtual machine state protection memory;
step 705: calculating a virtual machine state protection memory reference value (which is an example of the measurement reference value);
in step 705, for example, a hash value may be calculated according to at least one of the state information of the current virtual machine, and the calculated hash value is used as a reference value of the virtual machine state protection memory;
step 706, call the measurement task to create the interface;
step 707, the secure processor creates a metrology task (which is an example of the first metrology task described above);
in step 707, the security processor creates a measurement task according to the information transmitted by the CPU, generates an authorization code of the measurement task, such as a random authorization code, and sends the ID of the measurement task and the authorization code of the measurement task to the CPU;
step 708, the secure processor sends the measurement task ID and the authorization code to the CPU;
step 709, CPU obtains measurement task ID and authorization code;
step 710: calling an abnormal callback function registration command, and registering an abnormal callback function;
step 711: a measurement task starting command is called;
in step 711, after the user invokes the measurement task start command, the CPU sends the authorization code and the context information of the measurement task held by the user to the security processor;
step 712: the security processor verifies the received authorization code and the context information, and starts a measurement task after the verification is passed;
step 713: the virtual machine is successfully created.
In this step 713, a prompt message that the virtual machine creation was successful may be issued, for example.
In one or more embodiments of the present application, the method for preventing malicious rollback of a virtual machine may further include: requesting the secure processor to stop the first metrology task; for example, the CPU may send an authorization code, context information, and a measurement task stop request of the first measurement task to the security processor, where after the security processor verifies the authorization code and the context information and confirms that the authorization code and the context information are legal, the security processor stops the first measurement task, and the first measurement task is in a non-running state after the first measurement task is stopped. Acquiring a virtual machine destruction command; destroying the virtual machine according to the virtual machine destroying command; for example, the CPU may send an authorization code, context information, and a measurement task destruction request of the first measurement task to the security processor, and the security processor destroys the first measurement task after the authorization code and the context information are verified by the security processor and the authorization code and the context information are confirmed to be legitimate.
It should be noted that the operation of destroying the first metrology task may be performed at any time after the first metrology task is created according to a received legal first metrology task destroy request.
Taking fig. 8 as an example, in one or more embodiments of the present application, a destruction processing flow of a virtual machine may include:
step 801: the CPU calls a measurement task stop command;
step 802: the safety processor stops the measurement task according to the measurement task stopping command;
step 803: calling a virtual machine destruction command;
step 804: the CPU destroys the virtual machine according to the selected target in the virtual machine destroying command;
step 805: the CPU calls a measurement task destroying interface;
step 806: and the safety processor destroys the measurement task, the virtual machine destroys and finishes the task.
In this embodiment, in the process of ending and destroying the first metric task, both the requester (who sends a request to the security processor to request the security processor to perform a corresponding operation on the first metric task) need to pass the double authentication of the authorization code and the context information of the first metric task, so that the security of the virtual machine operation command is further increased.
In one or more embodiments of the present application, the method for preventing malicious rollback of a virtual machine may further include:
after the virtual machine is rolled back according to the rolling back target, the security processor is requested to start the first measurement task according to the authentication information, wherein the first measurement task is in a running state after being started. Still taking the method shown in fig. 4 as an example, the CPU may invoke the metric task start command, send the authorization code and the context information to the secure processor, and the secure processor starts the first metric task to continue to protect the virtual machine after verifying the authorization code and the context information and determining that the authorization code and the context information are legal.
In one or more embodiments of the present application, a legitimate virtual machine rollback user has a right of the TDM module to measure the authorization code and the context information of the current virtual machine task, and thus has a right to update the measurement reference value in the measurement task. When a virtual machine rollback operation needs to be performed, for example, after the step of obtaining the virtual machine rollback command, the requester of the virtual machine rollback operation may first authorize the suspension of the metric task through the TDM module by using the authorization code and the context information. At this time, due to the authorization, it can be determined that the virtual machine at this time is in a secure and trusted environment, and the metric reference value stored in the metric task can be updated in the environment. For example, an update interface of the TDM module may be invoked to update the metric reference value. And after the update is finished, executing the rollback operation of the virtual machine, and requesting the security processor to restart the measurement task, wherein the process is a rollback process of the virtual machine in a security state. The whole process is in a safe and credible state, the authorization code and the context information are used for ensuring, even if an attacker knows the process, the task cannot be continuously executed because the attacker cannot acquire the authorization code or execute the wrong context information, and further the reference value cannot be updated. Even if the state information of the virtual machine stored in the state protection memory of the virtual machine is updated, the abnormal callback function is triggered to stop the rollback operation of the virtual machine due to the fact that the measurement reference value is not updated by the permission, and therefore the method for preventing the malicious rollback of the virtual machine according to one or more embodiments of the present application can ensure that the virtual machine performs the normal rollback operation in the safe state, and avoids the malicious rollback of the virtual machine.
Fig. 9 is a schematic structural diagram illustrating an apparatus for preventing a malicious rollback of a virtual machine according to one or more embodiments of the present application, where, as shown in fig. 9, the apparatus 90 includes:
a first obtaining module 91, configured to obtain a virtual machine rollback command, where the virtual machine rollback command includes a rollback target of the virtual machine;
a second obtaining module 92, configured to obtain current first state information of the virtual machine;
a writing module 93, configured to write the first state information into a virtual machine state protection memory of the virtual machine, where the virtual machine state protection memory stores the state information of the virtual machine before the virtual machine rollback command is obtained;
a determining module 94, configured to determine that a current rollback operation is abnormal in response to receiving an abnormal message of the virtual machine state protection memory sent by a security processor, where a first metric task runs on the security processor, and when the first metric task is in a running state, the first metric task periodically calculates a first check value corresponding to the virtual machine state protection memory according to the state information, compares the first check value with a first metric reference value stored in the first metric task, and determines whether content stored in the virtual machine state protection memory is abnormal according to a comparison result.
Fig. 10 is a schematic structural diagram illustrating an apparatus for preventing a malicious rollback of a virtual machine according to one or more embodiments of the present application, where as shown in fig. 10, the apparatus may further include, on the basis of the apparatus shown in fig. 9:
a first sending module 95, configured to send a suspended measurement task request and authentication information of the first measurement task to the secure processor before obtaining a virtual machine rollback command, so that the secure processor suspends the first measurement task according to the suspended measurement task request after determining that the authentication information is legal;
a first generating module 96 configured to generate a metric update value based on the first state information after writing the first state information into a virtual machine state protection memory of the virtual machine, and send the metric update value and the authentication information to the security processor, so that the first metric task updates a first metric reference value in the first metric task using the metric update value after determining that the authentication information is legal;
a rollback module 97 configured to, in response to the first metric task updating the first metric reference value according to the metric update value, determine that a current rollback operation is legal, and perform a rollback operation on the virtual machine according to the rollback target.
In one or more embodiments of the present application, the apparatus for preventing malicious rollback of a virtual machine may further include:
a third obtaining module configured to obtain a loading command of the VMM before obtaining the virtual machine rollback command;
a first request module configured to request the security processor to create a second metric task for the VMM;
a second request module configured to request the security processor to start the second metric task, where when the second metric task is in a running state, the second metric task periodically calculates a second check value according to a memory corresponding to the VMM, compares the second check value with a second metric reference value stored in the second metric task, and determines whether the VMM is abnormal according to a comparison result;
a load module configured to load the VMM.
In one or more embodiments of the present application, the apparatus for preventing a virtual machine from malicious rolling may further include:
a fourth obtaining module configured to obtain an unload command of the VMM after the VMM is loaded;
a third request module configured to request stopping of the second metrology task;
a destruction module configured to destroy the second metrology task;
an offload module configured to offload the VMM.
In one or more embodiments of the present application, the apparatus for preventing malicious rollback of a virtual machine may further include:
a fifth obtaining module, configured to obtain a virtual machine creation command before obtaining the virtual machine rollback command, where the virtual machine creation command includes a virtual machine creation parameter;
a creation module configured to create the virtual machine according to the virtual machine creation parameter;
a sixth obtaining module, configured to obtain current second state information of the virtual machine;
the saving module is configured to write the second state information into a virtual machine state protection memory of the virtual machine;
a second generating module configured to generate the first metric reference value based on the second state information;
a second sending module configured to send the first metric reference value to the security processor;
a fourth request module configured to request the security processor to create the first metrology task;
a fifth request module configured to request the security processor to initiate the first metrology task.
In one or more embodiments of the present application, the apparatus for preventing malicious rollback of a virtual machine may further include:
and the application module is configured to apply for the virtual machine state protection memory for the virtual machine after acquiring the current second state information of the virtual machine.
In one or more embodiments of the present application, the apparatus for preventing malicious rollback of a virtual machine may further include:
a registration module configured to register an exception callback function after requesting the security processor to create the first metric task;
and the triggering module is configured to receive an exception message of the virtual machine state protection memory sent by the security processor and trigger the exception callback function.
In one or more embodiments of the present application, the apparatus for preventing malicious rollback of a virtual machine may further include:
a sixth request module configured to request the secure processor to stop the first metrology task;
a seventh obtaining module configured to obtain a virtual machine destruction command;
the destruction module is configured to destroy the virtual machine according to the virtual machine destruction command;
a seventh request module configured to request the security processor to destroy the first metrology task.
In one or more embodiments of the present application, the apparatus for preventing malicious rollback of a virtual machine may further include:
an eighth requesting module, configured to, after performing a rollback operation on the virtual machine according to the rollback target, request the security processor to start the first metric task according to the authentication information, where the first metric task is in a running state after being started.
In one or more embodiments of the present application, the authentication information may include: an authorization code generated by the security processor when creating the first metrology task, and context information of a creator of the first metrology task.
In one or more embodiments of the present application, the state information of the virtual machine may include at least one of: the virtual machine comprises a process number of the virtual machine, a virtual Address Space Identity (ASID), system time, operation User Identity (UID) information and virtualized trusted platform control module (VTPM) state information.
One or more embodiments of the present application also provide an electronic device, including: a processor; and a memory having stored thereon computer-executable instructions for implementing a method of preventing malicious rollback of a virtual machine in one or more embodiments of the present application when executed by the processor.
One or more embodiments of the present application also provide a computer-readable storage medium having stored thereon computer-executable instructions for implementing a method for preventing malicious rollback of a virtual machine in one or more embodiments of the present application when executed by a processor.
Based on the electronic device of one or more embodiments of the present application, a more specific electronic device is proposed, as shown in fig. 11, the device may include: a processor 1010, a memory 1020, an input/output interface 1030, a communication interface 1040, and a bus 1050. Wherein the processor 1010, memory 1020, input/output interface 1030, and communication interface 1040 are communicatively coupled to each other within the device via bus 1050.
The processor 1010 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits, and is configured to execute related programs to implement the technical solutions provided in the embodiments of the present disclosure.
The Memory 1020 may be implemented in the form of a ROM (Read Only Memory), a RAM (Random Access Memory), a static storage device, a dynamic storage device, or the like. The memory 1020 may store an operating system and other application programs, and when the technical solution provided by the embodiments of the present specification is implemented by software or firmware, the relevant program codes are stored in the memory 1020 and called to be executed by the processor 1010.
The input/output interface 1030 is used for connecting an input/output module to input and output information. The i/o module may be configured as a component in a device (not shown) or may be external to the device to provide a corresponding function. The input devices may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output devices may include a display, a speaker, a vibrator, an indicator light, etc.
The communication interface 1040 is used for connecting a communication module (not shown in the drawings) to implement communication interaction between the present apparatus and other apparatuses. The communication module can realize communication in a wired mode (such as USB, network cable and the like) and also can realize communication in a wireless mode (such as mobile network, WIFI, Bluetooth and the like).
Bus 1050 includes a path that transfers information between various components of the device, such as processor 1010, memory 1020, input/output interface 1030, and communication interface 1040.
It should be noted that although the above-mentioned device only shows the processor 1010, the memory 1020, the input/output interface 1030, the communication interface 1040 and the bus 1050, in a specific implementation, the device may also include other components necessary for normal operation.
In addition, those skilled in the art will appreciate that the above-described apparatus may also include only those components necessary to implement the embodiments of the present description, and not necessarily all of the components shown in the figures. It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments.
In particular, as for the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
For convenience of description, the above devices are described separately in terms of functional division into various units/modules. Of course, the functionality of the units/modules may be implemented in one or more software and/or hardware implementations when the present application is implemented.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present application should be covered within the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
- 上一篇:石墨接头机器人自动装卡簧、装栓机
- 下一篇:应用误杀评估方法及相关设备