Method and device for accessing virtual electronic device, electronic device, and storage medium

By receiving client access requests, the virtualization process is encoded and replaced, which solves the problem of virtualization process tampering, ensures the security of cloud mobile phones, and overcomes the insufficient protection of the existing technology.

CN115474197BActive Publication Date: 2024-12-03CHINA MOBILE CHENGDU INFORMATION & TELECOMM TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110565758.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-05-24
Publication Date
2024-12-03
Estimated Expiration
2041-05-24

AI Technical Summary

Technical Problem

The existing technology cannot effectively determine whether the virtualization process has been tampered with, and cannot prevent the contaminated virtualization process from running outside-controlled instructions, resulting in cloud mobile phone information security and data security risks.

Method used

By receiving the client's access request, the first process is encoded and the preset encoding value is obtained. If the encoding value is different from the preset encoding value, the first process is replaced with the preset process to ensure the security of accessing the virtual electronic device.

Benefits of technology

Establish a mapping relationship between preset processes and preset coded values, judge and correct tampering of actual processes, ensure the security of access to virtual machines, and overcome the defect that existing technology can only protect the network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115474197B_ABST
    Figure CN115474197B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a method for accessing a virtual electronic device, which is deployed in a server, and the method includes: receiving an access request from a client for a target virtual electronic device; the access request is used to call a first process of the target virtual electronic device; encoding the first process to obtain a first encoding value; obtaining a preset encoding value of the target virtual electronic device; if the first encoding value is different from the preset encoding value, replacing the first process with a preset process corresponding to the preset encoding value, and accessing the virtual electronic device based on the preset process. The embodiment of the present application also provides a device, equipment, and storage medium for accessing a virtual electronic device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network technology, and in particular to a method and device for accessing a virtual electronic device, an electronic device, and a storage medium. Background Art

[0002] Cloud phone is a smart phone cloud platform based on cloud computing and mobile Internet. The cloud platform can provide smart phone users with diversified and comprehensive virtual phone functions and services, and fully support the display, download and management services of various mobile applications. Generally speaking, the condition for smart phone users to access the cloud phone functions through the client is that the client calls the virtualization process of the cloud phone (mainly including peripheral mapping, virtual machine proxy and other processes) normally. However, in actual use, these virtualization processes are often subject to malicious attacks by Trojans and viruses. Therefore, these virtualization processes need to be protected to ensure that the client can access the cloud phone functions normally.

[0003] When the client connects to the virtualization process of the cloud phone, the existing technology mainly uses a security firewall to prevent the client from accessing the cloud phone through an abnormal network and then running instructions beyond the original security control; and uses a non-plaintext transmission method through a secure encrypted channel to protect the transmission instruction information from being tampered with. The disadvantage is that the security firewall cannot determine whether the virtualization process has been tampered with, and thus cannot prevent the contaminated virtualization process from running instructions outside the control; the secure encryption channel method cannot prevent the contaminated virtualization process in the cloud phone from attacking the protection port, causing the cloud phone to be out of control and causing information security or data security risks. Summary of the invention

[0004] In view of this, embodiments of the present application provide a method, apparatus, device, and storage medium for accessing a virtual electronic device.

[0005] The present invention provides a method for accessing a virtual electronic device, the method comprising:

[0006] Receiving an access request from a client to a target virtual electronic device; the access request is used to call a first process of the target virtual electronic device;

[0007] Performing encoding processing on the first process to obtain a first encoding value;

[0008] Obtaining a preset code value of the target virtual electronic device;

[0009] If the first coding value is different from the preset coding value, the first process is replaced by a preset process corresponding to the preset coding value, and the virtual electronic device is accessed based on the preset process.

[0010] On the basis of the above embodiments, the embodiment of the present application further provides a device for accessing a virtual electronic device, the device comprising: a receiving module, an encoding module, an acquisition module and a replacement module, wherein:

[0011] The receiving module is used to receive an access request from a client to a target virtual electronic device; the access request is used to call a first process of the target virtual electronic device;

[0012] The encoding module is used to perform encoding processing on the first process to obtain a first encoding value;

[0013] The acquisition module is used to acquire the preset code value of the target virtual electronic device;

[0014] The replacement module is used to replace the first process with a preset process corresponding to the preset code value if the first code value is different from the preset code value, and access the virtual electronic device based on the preset process.

[0015] Based on the above embodiments, an embodiment of the present application further provides an electronic device, the electronic device comprising a processor and a memory for storing a computer program that can be run on the processor;

[0016] Wherein, when the processor is used to run the computer program, the steps of the method described in the above embodiment are executed.

[0017] On the basis of the above embodiments, an embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored, and the computer program is executed by a processor to implement the steps of the method described in the above embodiments.

[0018] The method for accessing a virtual electronic device provided in an embodiment of the present application is by receiving an access request from a client for a target virtual electronic device; the access request is used to call a first process of the target virtual electronic device; the first process is encoded to obtain a first encoding value; the preset encoding value of the target virtual electronic device is obtained; if the first encoding value is different from the preset encoding value, the first process is replaced with a preset process corresponding to the preset encoding value, and the virtual electronic device is accessed based on the preset process. In this way, by establishing a mapping relationship between the preset process and the preset encoding value, it is determined whether the actual process has been tampered with, and when the actual process has been tampered with, the actual process is corrected based on the preset process, thereby ensuring security when accessing the virtual machine and overcoming the defect that the prior art can only protect the network. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 A schematic diagram of a process for accessing a virtual electronic device for related technologies;

[0020] Figure 2 A flowchart of a method for accessing a virtual electronic device provided in an embodiment of the present application;

[0021] Figure 3 A schematic diagram of a process of creating a HashMap in a method for accessing a virtual electronic device provided in an embodiment of the present application;

[0022] Figure 4 A schematic diagram of a process of updating a HashMap in a method for accessing a virtual electronic device provided in an embodiment of the present application;

[0023] Figure 5 Another flowchart of updating a HashMap in a method for accessing a virtual electronic device provided in an embodiment of the present application;

[0024] Figure 6 A schematic diagram of a flow chart of a signal flow in a method for accessing a virtual electronic device provided in an embodiment of the present application;

[0025] Figure 7 A flowchart of another method for accessing a virtual electronic device provided in an embodiment of the present application;

[0026] Figure 8 A schematic diagram of a flow chart of a scheduled task in another method for accessing a virtual electronic device provided in an embodiment of the present application;

[0027] Fig. 9 A schematic diagram of the structure of a device for accessing a virtual electronic device provided in an embodiment of the present application;

[0028] Fig.10 A physical schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0029] In order to enable a more detailed understanding of the features and technical contents of the embodiments of the present application, the implementation of the embodiments of the present application is described in detail below in conjunction with the accompanying drawings. The attached drawings are for reference only and are not used to limit the embodiments of the present application.

[0030] Unless otherwise defined, all technical and scientific terms used in the embodiments of the present application have the same meaning as those commonly understood by those skilled in the art of the present application. The terms used in the embodiments of the present application are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.

[0031] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish different objects rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or devices.

[0032] In addition, the term "and / or" in the embodiments of the present application is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0033] The use scenario of the embodiment of the present application is a virtual machine pool environment, which can be used to provide virtual machine (virtualized mobile phone) services to users. The virtual machine service can be realized by starting a virtual machine in the virtual machine pool environment and adding a virtualization key process that can be called by the client. The virtualization key process is the process information exposed by the virtual machine to the external network, which can be a peripheral mapping or a virtual machine proxy process. The process plays a vital role as a bridge connecting the external network and the virtual machine.

[0034] Generally speaking, a process is composed of a set of executable internal programs and monitored network ports. When using virtual machine services, users call the key processes of the virtual machine through the client, and the called key process determines the running call instructions inside the virtual machine according to the access request. The virtual machine accesses the virtual machine service by executing the running call instructions. The specific implementation process is as follows: Figure 1 shown.

[0035] Related technologies usually use security firewalls to protect the entire access process, but because the security firewall cannot determine whether the key process has been tampered with, it cannot prevent the contaminated key process from running uncontrolled run call instructions.

[0036] In order to solve the above problems in the related art, the present application embodiment provides a method for accessing a virtual electronic device, such as Figure 2 As shown, the virtual electronic device is deployed in a server, and the method may include the following steps:

[0037] S201, receiving an access request from a client for a target virtual electronic device; the access request is used to call a first process of the target virtual electronic device.

[0038] Here, the target virtual electronic device may be a virtual machine that the user wishes to access. Correspondingly, the client's access request to the target virtual electronic device may be a specific function that the client wishes to access on the virtual machine, such as running an application on the virtual machine. Specifically, the access request is used to call the first process of the target virtual electronic device. The user sends an access request to the virtual machine that he wishes to access, and the virtual machine, based on the access request, calls the first process of the target virtual electronic device to generate and execute a run call instruction corresponding to the access request, thereby achieving the purpose of accessing the virtual machine service.

[0039] It should be noted that different virtual machines have corresponding universally unique identifiers (UUIDs). The client determines which virtual machine to send the access request to by determining the UUID in the access request. The access request can be a request code. The first process of the target virtual electronic device parses the request code, determines the function that the user expects to execute, and then generates and executes the run call instruction corresponding to the access request, thereby achieving the purpose of accessing the virtual machine.

[0040] Furthermore, the first process may be a process actually called by the virtual machine. Since the process actually called by the virtual machine may be attacked and tampered with during use, the process actually called by the virtual machine may be different from the preset process that the user expects to call. Therefore, it is necessary to determine whether the first process is the preset process corresponding to the virtual machine to ensure that the client can access the virtual machine as needed.

[0041] S202: Encode the first process to obtain a first encoding value.

[0042] Here, in order to determine whether the first process is a preset process corresponding to the virtual machine, and then ensure that the client can access the virtual machine as needed, it is necessary to encode the first process. Encoding the first process can be to perform a hash calculation on the first process to obtain a corresponding hash value as the first encoding value. Specifically, in order to ensure that the process actually called by the access request is the preset process corresponding to the virtual machine, it is achieved by determining whether the first encoding value obtained after encoding the first process is the same as the preset encoding value. Here, the role of performing a hash calculation on the first process is to ensure the integrity of the file before and after transmission, to check whether there is an error in the file during transmission, and more importantly, to determine whether the file has been maliciously tampered with during transmission.

[0043] It should be noted that the encoding process for the first process may adopt any other method for determining whether the file has been maliciously tampered with during the transmission process, such as determining the MD5 code, feature extraction, and the like.

[0044] S203: Obtain a preset code value of the target virtual electronic device.

[0045] Here, since there is a corresponding relationship between the code value and the process, if the process is tampered with, the code value determined according to the process will also change. On the contrary, if the code value is different from the preset code value, it means that the file has been tampered with during the transmission process. In this way, by judging whether the code value is the same as the preset code value, it can be determined whether the process has been tampered with, and then the process can be corrected when it is tampered with, and the preset process corresponding to the preset code value is replaced to ensure the security of the virtual machine operation.

[0046] S204: If the first coding value is different from the preset coding value, the first process is replaced with a preset process corresponding to the preset coding value, and the virtual electronic device is accessed based on the preset process.

[0047] Here, after determining that the first code value is different from the preset code value, it can be determined that the process actually called by the virtual electronic device has been tampered with. Therefore, it is necessary to correct the tampered process. Specifically, first determine the preset process by the preset code value, then replace and correct the tampered first process, and access the virtual electronic device based on the corrected preset process.

[0048] It can be seen that the method for accessing a virtual electronic device provided by the embodiment of the present application is to receive an access request from a client to a target virtual electronic device; the access request is used to call a first process of the target virtual electronic device; encode the first process to obtain a first encoding value; obtain a preset encoding value of the target virtual electronic device; if the first encoding value is different from the preset encoding value, the first process is replaced with a preset process corresponding to the preset encoding value, and the virtual electronic device is accessed based on the preset process. In this way, by establishing a mapping relationship between the preset process and the preset encoding value, it is determined whether the actual process has been tampered with, and when the actual process has been tampered with, the actual process is corrected based on the preset process, thereby ensuring security when accessing the virtual machine and overcoming the defect that the prior art can only protect the network.

[0049] Based on the above embodiment, obtaining the preset code value of the target virtual electronic device in S203 can be achieved by the following steps:

[0050] S2031, obtaining a mapping relationship table; the mapping relationship table is used to represent the mapping relationship between the preset process of the virtual electronic device and the preset code value;

[0051] S2032: Obtain a preset code value corresponding to the target virtual electronic device from the mapping relationship table.

[0052] Here, a mapping relationship table for characterizing the mapping relationship between the preset process of the virtual electronic device and the preset coding value is pre-stored in the virtual machine. The mapping relationship table can be a mapping relationship between the hash value obtained after hashing the virtualization key process, the listening port information corresponding to the virtualization key process and the UUID information of the virtual machine when creating a virtual machine through virtualization resources. The above values ​​are respectively stored as key-value pairs of hash maps (HashMap) in the server of virtualization resources. In specific use, the preset coding value is determined by searching the key-value pairs of the HashMap stored in the server.

[0053] It should be noted that the mapping relationship table stores the mapping relationships of all virtual electronic devices deployed on the server. Each UUID uniquely corresponds to a preset process, a hash value, and a listening port information. After the UUID is determined, the preset process, hash value, and listening port information are also determined. After the mapping relationship table is determined, the preset coding value corresponding to the target virtual electronic device can be obtained from the mapping relationship table according to the UUID that is expected to be accessed.

[0054] Based on the above embodiment, before obtaining the mapping relationship table in S2031, the following steps may also be included:

[0055] S2031a, respectively encoding multiple preset processes of multiple virtual electronic devices deployed in the server to obtain multiple preset encoding values; the multiple preset encoding values ​​correspond to the multiple preset processes one by one;

[0056] S2031b, determining a mapping relationship between a plurality of preset processes and a plurality of preset coding values, and obtaining a plurality of mapping relationships;

[0057] S2031d. Perform timestamp encryption processing on multiple mapping relationships to obtain a mapping relationship table containing encrypted timestamp information.

[0058] Here, before obtaining the mapping relationship table, it is necessary to perform hash calculations on the virtualization key processes corresponding to all virtual machines deployed in the virtualization resource server when creating a virtual machine through virtualization resources to obtain multiple hash values. Then bind the multiple hash values ​​obtained with the listening port information corresponding to the multiple virtualization key processes and the UUID of the virtual machine to determine the mapping relationship between the multiple preset processes and the multiple preset coding values ​​to obtain multiple mapping relationships. Then, store the multiple mapping relationships as key-value pairs of HashMap in the server of the virtualization resource. In addition, in order to make the HashMap stored in the server solid and trustworthy, the stored HashMap key-value pairs need to be tamper-proof encrypted. Specifically, tamper-proof encryption can be achieved by applying for a trusted timestamp from the National Time Service Center. The specific implementation process is as follows. Figure 3 shown.

[0059] Based on the above embodiment, before performing timestamp encryption processing on multiple mapping relationships in S2031d to obtain a mapping relationship table containing encrypted timestamp information, the method further includes:

[0060] S2031c, performing update processing on the multiple mapping relationships to obtain multiple updated mapping relationships; the update processing includes: changing and / or deleting at least one mapping relationship among the multiple mapping relationships.

[0061] Specifically, when the virtualization key process of the virtual machine changes, it is necessary to update the multiple mapping relationships determined according to the virtualization key process to obtain the updated multiple mapping relationships. Here, the updated virtualization key process is also hashed, and the hash value and listening port information of the hash calculation are updated to the key-value pair information of the virtual machine in the HashMap stored in the server. Then, the trusted timestamp is applied to the National Time Service Center through the updated HashMap to realize tamper-proof encryption. The specific implementation process is as follows: Figure 4 shown.

[0062] Furthermore, when the virtual machine is no longer in use and needs to be recycled, the key-value pair information corresponding to the virtual machine in the HashMap stored in the server is deleted. At the same time, the updated HashMap is applied to the National Time Service Center for a trusted timestamp to implement tamper-proof encryption. The specific implementation process is as follows: Figure 5 shown.

[0063] Based on the above embodiment, obtaining the preset code value of the target virtual electronic device from the mapping relationship table in S2032 can be achieved by the following steps:

[0064] S2032a, obtaining the current timestamp information of the mapping relationship table;

[0065] S2032b. If the encrypted timestamp information is the same as the current timestamp information, a preset coding value is obtained from the mapping relationship table.

[0066] Specifically, to obtain the preset code value of the target virtual electronic device from the mapping table, the current timestamp information of the mapping table may be first obtained, and then the current timestamp information is compared with the encrypted timestamp information, and if they are the same, the preset code value is obtained from the mapping table.

[0067] It should be noted that the above-mentioned comparison timestamp information can be verified by verifying the trusted timestamp of the stored HashMap to the National Time Service Center. If the returned result is not trusted and consistent, it means that the HashMap has been tampered with. The HashMap is discarded and the above-mentioned steps of generating the mapping relationship table are performed again.

[0068] Based on the above embodiment, the method may further include the following steps:

[0069] S205: If the first coding value is the same as the preset coding value, use the first process as the preset process, and access the virtual electronic device based on the preset process.

[0070] Here, after determining that the first coding value is the same as the preset coding value, it can be determined that the process actually called by the virtual electronic device has not been tampered with, and the first process is the same as the preset process. Therefore, the first process can be used as the preset process and the virtual electronic device can be accessed based on the preset process.

[0071] Based on the above embodiment, accessing the virtual electronic device based on the preset process in S205 can be achieved by the following steps:

[0072] S2051, obtaining first port information of a first process and preset port information of a preset process;

[0073] S2052: If the first port information is the same as the preset port information, allowing the client to access the virtual electronic device based on the preset process;

[0074] S2053: If the first port information is different from the preset port information, denying the client from accessing the virtual electronic device based on the preset process.

[0075] Here, on the premise of determining that the process is correct, it is necessary to further determine whether the listening port information pointed to by the process has been tampered with. Specifically, first obtain the first port information of the first process and the preset port information of the preset process. Because when creating a virtual machine through virtualization resources, the multiple hash values ​​obtained have been bound to the listening port information corresponding to multiple virtualization key processes and the UUID of the virtual machine. In this way, the listening port information corresponding to the process can be directly determined according to the process, and the first port information determined according to the first process and the preset port information determined according to the preset process are compared to determine whether the port has been tampered with. If the first port information is the same as the preset port information, it means that the port information has not been tampered with. At this time, the client is allowed to access the virtual electronic device based on the preset process. If the first port information is different from the preset port information, it means that the port information has been tampered with. At this time, the client is denied access to the virtual electronic device based on the preset process. The specific implementation process is as follows. Figure 6 shown.

[0076] It can be seen that the method for accessing a virtual electronic device provided by the embodiment of the present application is to receive an access request from a client for a target virtual electronic device; the access request is used to call a first process of the target virtual electronic device; encode the first process to obtain a first code value; obtain a preset code value of the target virtual electronic device; if the first code value is different from the preset code value, the first process is replaced with a preset process corresponding to the preset code value, and the virtual electronic device is accessed based on the preset process. In this way, by establishing a mapping relationship between the preset process and the preset code value, it is determined whether the actual process has been tampered with, and when the actual process has been tampered with, the actual process is corrected based on the preset process, thereby ensuring the security when accessing the virtual machine, and overcoming the defect that the prior art can only protect the network. At the same time, an active protection mechanism is provided, which adds a security risk solution beyond the passive protection mechanism, and it is relatively easy to expand and add new protection objects as needed in the later stage.

[0077] Based on the above embodiments, the present application also provides a method for accessing a virtual electronic device, such as Figure 7 As shown, the method includes:

[0078] S701, respectively encoding multiple preset processes of multiple virtual electronic devices deployed in a server to obtain multiple preset encoding values; the multiple preset encoding values ​​correspond to the multiple preset processes one by one;

[0079] S702, determining a mapping relationship between a plurality of preset processes and a plurality of preset coding values, and obtaining a plurality of mapping relationships;

[0080] Here, first of all, when creating a virtual machine through virtualization resources, it is necessary to perform hash calculations on the virtualization key processes corresponding to all virtual machines deployed in the virtualization resource server to obtain multiple hash values. Then, the obtained multiple hash values ​​are bound to the listening port information corresponding to the multiple virtualization key processes and the UUID of the virtual machine to determine the mapping relationship between the multiple preset processes and the multiple preset coding values ​​to obtain multiple mapping relationships. Then, the multiple mapping relationships are respectively stored as key-value pairs of (hash mapping) HashMap in the server of the virtualization resource.

[0081] S703, performing update processing on the multiple mapping relationships to obtain multiple updated mapping relationships;

[0082] S704, performing timestamp encryption processing on multiple mapping relationships to obtain a mapping relationship table containing encrypted timestamp information;

[0083] Specifically, when the virtualization key process of the virtual machine changes, it is necessary to update the multiple mapping relationships determined according to the virtualization key process to obtain the updated multiple mapping relationships. Here, the updated virtualization key process is also hashed, and the hash value and listening port information of the hash calculation are updated to the key-value pair information of the virtual machine in the HashMap stored in the server. Then, a trusted timestamp is applied to the National Time Service Center through the updated HashMap to achieve tamper-proof encryption.

[0084] Furthermore, when the virtual machine is no longer in use and needs to be recycled, the key-value pair information corresponding to the virtual machine in the HashMap stored in the server is deleted. Then, a trusted timestamp is applied to the National Time Service Center through the updated HashMap to achieve tamper-proof encryption.

[0085] In addition, in order to make the Hashmap stored in the server solid and reliable, the stored key-value pairs need to be tamper-proof encrypted. Specifically, tamper-proof encryption can be achieved by applying for a trusted timestamp from the National Time Service Center.

[0086] S705, obtaining the current timestamp information of the mapping relationship table;

[0087] S706: If the encrypted timestamp information is the same as the current timestamp information, a preset coding value is obtained from the mapping relationship table.

[0088] Specifically, to obtain the preset code value of the target virtual electronic device from the mapping table, the current timestamp information of the mapping table may be first obtained, and then the current timestamp information is compared with the encrypted timestamp information, and if they are the same, the preset code value is obtained from the mapping table.

[0089] It should be noted that the above-mentioned timestamp information can be verified by verifying the trusted timestamp of the stored HashMap to the National Time Service Center. If the returned result is not credible, it means that the HashMap has been tampered with, and the HashMap is discarded and the above-mentioned steps of generating the mapping table are repeated. If the returned result is credible, it means that the HashMap stored in the server is authentic and valid.

[0090] S707. Create a scheduled task, traverse the mapping relationship table, determine whether the preset coding value stored in the mapping relationship table is the same as the obtained coding value, if different, replace the process obtained by the scheduled task with the preset process corresponding to the preset coding value; determine whether the preset port information stored in the mapping relationship table is the same as the obtained port information, if different, replace the port information obtained by the scheduled task with the preset port information.

[0091] Here, after confirming that the HashMap stored in the server is real and valid. Get the key-value pairs of all UUIDs one by one. After obtaining the UUID of the virtual machine, hash the virtualization key process of the virtual machine to obtain the hash value, and obtain the actual listening port information. Compare the obtained information with the HashMap stored in the server. If the comparison values ​​are different, replace the virtualization key process in the virtual machine; if the comparison values ​​are the same, but different from the stored listening port information, change the listening port of the process back to the stored listening port. After completing the above operations, traverse through the next UUID until this task is completed. The specific implementation process is as follows. Figure 8 shown.

[0092] By establishing a scheduled task, you can self-check the information stored in the HashMap and determine the HashMap in time. p Whether it has been tampered with. Actively protect the access security of the virtual machine by monitoring whether the key processes of the virtual machine have been tampered with and whether the port number has been changed.

[0093] It can be seen that the method for accessing a virtual electronic device provided by the embodiment of the present application is to receive an access request from a client for a target virtual electronic device; the access request is used to call a first process of the target virtual electronic device; encode the first process to obtain a first code value; obtain a preset code value of the target virtual electronic device; if the first code value is different from the preset code value, the first process is replaced with a preset process corresponding to the preset code value, and the virtual electronic device is accessed based on the preset process. In this way, by establishing a mapping relationship between the preset process and the preset code value, it is determined whether the actual process has been tampered with, and when the actual process has been tampered with, the actual process is corrected based on the preset process, thereby ensuring the security when accessing the virtual machine, and overcoming the defect that the prior art can only protect the network. At the same time, an active protection mechanism is provided, which adds a security risk solution beyond the passive protection mechanism, and it is relatively easy to expand and add new protection objects as needed in the later stage.

[0094] Based on the above embodiments, the present application further provides a device 90 for accessing a virtual electronic device, such as Fig. 9 As shown, the device 90 may include: a receiving module 91, an encoding module 92, an acquisition module 93 and a replacement module 94, wherein:

[0095] The receiving module 91 is used to receive an access request from a client to a target virtual electronic device; the access request is used to call a first process of the target virtual electronic device;

[0096] The encoding module 92 is used to encode the first process to obtain a first encoding value;

[0097] An acquisition module 93 is used to acquire a preset code value of a target virtual electronic device;

[0098] The replacement module 94 is configured to replace the first process with a preset process corresponding to the preset code value if the first code value is different from the preset code value, and access the virtual electronic device based on the preset process.

[0099] Based on the above embodiment, the acquisition module 93 may include: a first acquisition module 934 and a second acquisition module 935;

[0100] The first acquisition module 934 is used to acquire a mapping relationship table; the mapping relationship table is used to represent the mapping relationship between the preset process of the virtual electronic device and the preset code value;

[0101] The second acquisition module 935 is used to acquire a preset code value corresponding to the target virtual electronic device from the mapping relationship table.

[0102] Based on the above embodiment, the device 90 may further include: a determination module 931 and an encryption module 933;

[0103] The determination module 931 is used to respectively encode multiple preset processes of multiple virtual electronic devices deployed in the server before obtaining the mapping relationship table to obtain multiple preset encoding values; the multiple preset encoding values ​​correspond to the multiple preset processes one by one; and determine the mapping relationship between the multiple preset processes and the multiple preset encoding values ​​to obtain multiple mapping relationships;

[0104] The encryption module 933 is used to perform timestamp encryption processing on multiple mapping relationships to obtain a mapping relationship table containing encrypted timestamp information.

[0105] Based on the above embodiment, the device 90 may further include: an updating module 932;

[0106] The update module 932 is used to update the multiple mapping relationships before performing timestamp encryption processing on the multiple mapping relationships to obtain a mapping relationship table containing encrypted timestamp information, so as to obtain multiple updated mapping relationships; the update processing includes: changing and / or deleting at least one mapping relationship among the multiple mapping relationships.

[0107] Based on the above embodiment, the second acquisition module 935 is specifically used to obtain the current timestamp information of the mapping relationship table; if the encrypted timestamp information is the same as the current timestamp information, a preset coding value is obtained from the mapping relationship table.

[0108] Based on the above embodiment, the device 90 may further include: an access module 95;

[0109] The access module 95 is configured to use the first process as the preset process and access the virtual electronic device based on the preset process if the first coding value is the same as the preset coding value.

[0110] Based on the above embodiment, the access module 95 is specifically used to obtain the first port information of the first process and the preset port information of the preset process; if the first port information is the same as the preset port information, the client is allowed to access the virtual electronic device based on the preset process; if the first port information is different from the preset port information, the client is denied access to the virtual electronic device based on the preset process.

[0111] The description of the above device embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the device embodiment of the present application, please refer to the description of the method embodiment of the present application for understanding.

[0112] Based on the above embodiments, the present application further provides an electronic device corresponding to a method for accessing a virtual electronic device; Fig.10 FIG. 1 is a schematic diagram of the hardware structure of the electronic device according to an embodiment of the present application. Fig.10 As shown, the electronic device includes a processor 101 and a memory 102 storing a computer program.

[0113] Wherein, when the processor 101 is configured to run the computer program, the aforementioned Figure 2 The method steps in the corresponding embodiments.

[0114] Of course, in practical applications, Fig.10 As shown, the various components in the electronic device are coupled together via a bus system 103. It is understood that the bus system 103 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 103 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, Fig.10 The various buses are collectively labeled bus system 103 .

[0115] It can be understood that the memory in this embodiment can be a volatile memory or a non-volatile memory, and can also include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disk, or a compact disc read-only memory (CD-ROM); the magnetic surface memory can be a disk memory or a tape memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Synchronous Static Random Access Memory (SSRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM), SyncLink Dynamic Random Access Memory (SLDRAM), and Direct Rambus Random Access Memory (DRRAM).The memories described in the embodiments of the present application are intended to include, but are not limited to, these and any other suitable types of memories.

[0116] The method disclosed in the above embodiment of the present application can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor or an instruction in the form of software. The above processor may be a general-purpose processor, a DSP, or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The processor can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor may be a microprocessor or any conventional processor, etc. In combination with the steps of the method disclosed in the embodiment of the present application, it can be directly embodied as a hardware decoding processor to execute, or it can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium, which is located in a memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.

[0117] The present application also provides a computer storage medium, specifically a computer-readable storage medium, on which computer instructions are stored. As a first implementation, when the computer storage medium is located in a terminal, the computer instructions are executed by a processor to implement any step of the above data processing method of the present application.

[0118] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0119] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the scheme of this embodiment.

[0120] In addition, all functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may be separately configured as a unit, or at least two units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0121] A person of ordinary skill in the art can understand that: all or part of the steps of implementing the above-mentioned method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium, which, when executed, executes the steps of the above-mentioned method embodiment; and the aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROM, RAM, disks or optical disks.

[0122] Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiment of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROM, RAM, magnetic disks or optical disks.

[0123] It should be noted that the technical solutions described in the embodiments of the present application can be combined arbitrarily without conflict.

[0124] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for accessing a virtual electronic device, wherein the virtual electronic device is deployed in a server, characterized in that: The method comprises: Receive an access request from a client for a target virtual electronic device; the access request is used to call a first process of the target virtual electronic device; wherein different virtual electronic devices correspond to universal unique identification code (UUID) information; the client determines the target virtual electronic device corresponding to the access request by determining the UUID information in the access request; Performing encoding processing on the first process to obtain a first encoding value; wherein the first encoding value is a hash value obtained by performing a hash calculation on the first process; Obtaining a preset code value of the target virtual electronic device; If the first coding value is different from the preset coding value, replacing the first process with a preset process corresponding to the preset coding value, and accessing the target virtual electronic device based on the preset process; Wherein, the obtaining of the preset coding value of the target virtual electronic device includes: Performing encoding processing on a plurality of preset processes of a plurality of virtual electronic devices deployed in the server respectively to obtain a plurality of preset encoding values; the plurality of preset encoding values ​​correspond one to one to the plurality of preset processes; Determine mapping relationships between the plurality of preset processes and the plurality of preset coding values ​​to obtain a plurality of mapping relationships; Performing timestamp encryption processing on the multiple mapping relationships to obtain a mapping relationship table containing encrypted timestamp information; Obtain the mapping relationship table; wherein the virtual machine pre-stores a mapping relationship table for characterizing the mapping relationship between the preset process of the virtual electronic device and the preset coding value; the mapping relationship table is a mapping relationship between the hash value obtained after hashing the virtualization key process when creating the virtual machine through the virtualization resource, the listening port information corresponding to the virtualization key process and the UUID information of the virtual machine; each UUID information uniquely corresponds to a preset process, a hash value and a listening port information; Acquire a preset code value corresponding to the target virtual electronic device from the mapping relationship table according to the UUID information of the target virtual electronic device; Wherein, obtaining the preset coding value corresponding to the target virtual electronic device from the mapping relationship table includes: Obtaining the current timestamp information of the mapping relationship table; If the encrypted timestamp information is the same as the current timestamp information, the preset encoding value is obtained from the mapping relationship table.

2. The method according to claim 1, characterized in that Before performing timestamp encryption processing on the multiple mapping relationships to obtain the mapping relationship table containing the encrypted timestamp information, the method further includes: The multiple mapping relationships are updated to obtain the updated multiple mapping relationships; the update process includes: changing and / or deleting at least one mapping relationship among the multiple mapping relationships.

3. The method according to claim 1 or 2, characterized in that: The method further comprises: If the first coding value is the same as the preset coding value, the first process is used as the preset process, and the target virtual electronic device is accessed based on the preset process.

4. The method according to claim 3, characterized in that The accessing the target virtual electronic device based on the preset process includes: Acquire the first port information of the first process and the preset port information of the preset process; If the first port information is the same as the preset port information, allowing the client to access the target virtual electronic device based on the preset process; If the first port information is different from the preset port information, the client is denied access to the target virtual electronic device based on the preset process.

5. A device for accessing a virtual electronic device, wherein the virtual electronic device is deployed in a server, characterized in that: The device comprises: a receiving module, an encoding module, an acquisition module and a replacement module, wherein the acquisition module comprises a first acquisition module and a second acquisition module; wherein, The receiving module is used to receive an access request from a client to a target virtual electronic device; the access request is used to call a first process of the target virtual electronic device; wherein different virtual electronic devices correspond to universal unique identification code UUID information; the client determines the target virtual electronic device corresponding to the access request by determining the UUID information in the access request; The encoding module is used to encode the first process to obtain a first encoding value; wherein the first encoding value is a hash value obtained by performing a hash calculation on the first process; The acquisition module is used to acquire the preset code value of the target virtual electronic device; The replacement module is configured to replace the first process with a preset process corresponding to the preset code value if the first code value is different from the preset code value, and access the target virtual electronic device based on the preset process; A determination module, configured to respectively encode a plurality of preset processes of a plurality of virtual electronic devices deployed in the server to obtain a plurality of preset encoding values; the plurality of preset encoding values ​​correspond to the plurality of preset processes one by one; and determine a mapping relationship between the plurality of preset processes and the plurality of preset encoding values ​​to obtain a plurality of mapping relationships; An encryption module, used for performing timestamp encryption processing on the multiple mapping relationships to obtain a mapping relationship table containing encrypted timestamp information; The first acquisition module is used to obtain a mapping relationship table; wherein a mapping relationship table for characterizing the mapping relationship between a preset process of a virtual electronic device and a preset coding value is pre-stored in the virtual machine; the mapping relationship table is a mapping relationship between a hash value obtained after hashing a virtualization key process when creating the virtual machine through virtualization resources, the listening port information corresponding to the virtualization key process, and the universal unique identification code UUID information of the virtual machine; each UUID information uniquely corresponds to a preset process, a hash value, and a listening port information; The second acquisition module is used to acquire the preset code value corresponding to the target virtual electronic device from the mapping relationship table according to the UUID information of the target virtual electronic device; The second acquisition module is specifically used to acquire the current timestamp information of the mapping relationship table; if the encrypted timestamp information is the same as the current timestamp information, then acquire the preset coding value from the mapping relationship table.

6. An electronic device, characterized in that: The electronic device comprises a processor and a memory for storing a computer program capable of running on the processor; Wherein, when the processor is used to run the computer program, it executes the steps of the method described in any one of claims 1 to 4.

7. A computer-readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the steps of the method according to any one of claims 1 to 4.