Remote access method, device, electronic device and storage medium
By generating and storing the identifier of the target resource object, the problem of limited remote access is solved, efficient remote access and fine-grained permission control are achieved, meeting user needs and improving security.
Patent Information
- Application Number
- CN202310163724.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-16
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2043-02-16
AI Technical Summary
Existing remote access technology is limited by security policies, resulting in users being unable to access remote devices directly or to a limited extent, reducing the efficiency of remote access and failing to meet actual business needs.
By generating the target resource object, storing it in the target storage, and sending the target resource identifier to the terminal, and forwarding the second access request to the resource to be accessed based on the identifier, remote access to the resource to be accessed is realized, and fine-grained permission control and unification are supported. traffic access.
It improves the efficiency of remote access, meets users' business needs, and improves security through unified traffic access and a safe and controllable authentication system.
Smart Images

Figure CN116033010B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a remote access method, device, electronic device and storage medium. Background Art
[0002] With the in-depth development of network technology, more and more application scenarios have the need to access devices remotely. However, when remotely accessing remote devices, it is often restricted by access security policies. In many cases, users cannot directly access the corresponding devices remotely, or users are allowed to access devices in a limited manner, which often fails to meet the actual business needs of users, thereby greatly reducing the efficiency of remote access. Summary of the invention
[0003] The present disclosure provides a remote access method, device, electronic device and storage medium.
[0004] According to one aspect of the present disclosure, a remote access method is provided, the method comprising:
[0005] The receiving terminal sends a first access request, where the first access request carries resource information of a resource to be accessed;
[0006] Generate a target resource object, wherein the target resource object includes a target resource identifier identifying the target resource object and the resource information;
[0007] storing the target resource object in a target storage, and sending the target resource identifier to the terminal;
[0008] When a second access request including the target resource identifier is received from the terminal, the second access request is forwarded to the resource to be accessed based on the target resource identifier.
[0009] Optionally, the method further comprises:
[0010] Monitoring resource objects stored in the target storage;
[0011] In the case where it is monitored that the target resource object is stored in the target storage, determining the resource to be accessed according to the resource information in the target resource object;
[0012] The address information of the resource to be accessed is written into the target resource object.
[0013] Optionally, forwarding the second access request to the resource to be accessed based on the target resource identifier includes:
[0014] forwarding the second access request to an agent process of any node;
[0015] The proxy process determines the corresponding target node based on the target resource identifier, and forwards the second access request to the resource to be accessed of the target node.
[0016] Optionally, the method further comprises:
[0017] The target node performs user authentication on the second access request;
[0018] In the case where the user authentication is passed, determining whether the target resource identifier included in the second access request matches the information included in the target resource object stored in the target storage;
[0019] In a case where the information matches the information contained in the target resource object stored in the target storage, the step of forwarding the second access request to the target virtual machine of the target node is performed.
[0020] Optionally, the method further comprises:
[0021] When the target account corresponding to the terminal is in a logged-in state, determining whether the target account has access rights to the resource to be accessed;
[0022] In the case where the account has access rights to the resource to be accessed, the step of generating the target resource object is performed.
[0023] Optionally, the method further comprises:
[0024] In case of storing the target resource object in the target storage, setting the state of the target resource object to a waiting state;
[0025] When the address information of the resource to be accessed is written into the target resource object, the state of the target resource object is adjusted to a ready state.
[0026] Optionally, the resource to be accessed includes a virtual machine, a container, or a preset service on a node.
[0027] According to another aspect of the present disclosure, a remote access device is provided, characterized in that the device comprises:
[0028] An access request receiving module, configured to receive a first access request sent by a terminal, wherein the first access request carries resource information of a resource to be accessed;
[0029] An object generation module, used for generating a target resource object, wherein the target resource object includes a target resource identifier identifying the target resource object and the resource information;
[0030] A storage module, used for storing the target resource object in a target storage and sending the target resource identifier to the terminal;
[0031] The request forwarding module is used to forward the second access request containing the target resource identifier sent by the terminal to the resource to be accessed based on the target resource identifier.
[0032] Optionally, the device further comprises:
[0033] A monitoring module, used for monitoring resource objects stored in the target storage;
[0034] A resource determination module, configured to determine the resource to be accessed according to the resource information in the target resource object when monitoring that the target resource object is stored in the target storage;
[0035] The information writing module is used to write the address information of the resource to be accessed into the target resource object.
[0036] Optionally, the request forwarding module is specifically used to:
[0037] forwarding the second access request to an agent process of any node;
[0038] The proxy process determines the corresponding target node based on the target resource identifier, and forwards the second access request to the resource to be accessed of the target node.
[0039] Optionally, the device further comprises:
[0040] An authentication module, used for the target node to perform user authentication on the second access request;
[0041] The matching module is used to determine whether the target resource identifier included in the second access request matches the information included in the target resource object stored in the target storage when the user authentication is passed.
[0042] Optionally, the device further comprises:
[0043] The permission judgment module is used to judge whether the target account corresponding to the terminal has the access permission to the resource to be accessed when the target account corresponding to the terminal is in a logged-in state.
[0044] Optionally, the device further comprises:
[0045] A first state setting module, used to set the state of the target resource object to a waiting state when storing the target resource object in a target storage;
[0046] The second state setting module is used to adjust the state of the target resource object to a ready state when the address information of the resource to be accessed is written into the target resource object.
[0047] Optionally, the resource to be accessed includes a virtual machine, a container, or a preset service on a node.
[0048] According to a third aspect of the present disclosure, an electronic device is provided, which includes a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the program, the method described above is implemented.
[0049] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the above method of the present disclosure is implemented.
[0050] The remote access method, device, electronic device and storage medium provided by the embodiments of the present disclosure generate a target resource object when receiving a first access request sent by a terminal, store the target resource object in a target storage, and send the target resource identifier to the terminal. In this way, when a second access request including the target resource identifier is received from the terminal, the second access request can be forwarded to the resource to be accessed based on the target resource identifier, thereby realizing remote access to the resource to be accessed, which can meet the actual business needs of users and improve the efficiency of remote access to a great extent. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Further details, features and advantages of the present disclosure are disclosed in the following description of exemplary embodiments in conjunction with the accompanying drawings, in which:
[0052] Figure 1 A schematic diagram of a scenario provided for an exemplary embodiment of the present disclosure;
[0053] Figure 2 Another schematic diagram of a scenario provided for an exemplary embodiment of the present disclosure;
[0054] Figure 3 Another schematic diagram of a scenario provided for an exemplary embodiment of the present disclosure;
[0055] Figure 4 A flowchart of a remote access method provided for an exemplary embodiment of the present disclosure;
[0056] Figure 5 A schematic diagram of a remote access device provided for an exemplary embodiment of the present disclosure;
[0057] Figure 6 A structural block diagram of an electronic device provided for an exemplary embodiment of the present disclosure;
[0058] Figure 7 A structural block diagram of a computer system provided for an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION
[0059] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0060] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0061] The term "including" and its variations used in this document are open inclusions, that is, "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one other embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions of other terms will be given in the description below. It should be noted that the concepts of "first", "second", etc. mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0062] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0063] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0064] For Linux server operating systems, there are relatively mature remote access solutions, such as SSH. SSH is a common function for remote login systems. Users usually use SSH to transmit command line interfaces and remote execution. However, due to the internal security policies of enterprises, many internal enterprise networks cannot access the SSH port of machines inside IDC (Internet Data Center). For other systems, such as Linux desktop systems, Windows and macOS, only providing command line access can no longer meet business needs. The community has technical solutions such as VNC (Virtual Network Console) and RDP (Remote Desktop Protocol) for this scenario. They are all based on the TCP protocol and are also limited by the company's network security policy. At the same time, these remote access technologies also rely on the authentication scheme within the system, and the integration of different internal authentication schemes with the company's authentication system is relatively complex.
[0065] Therefore, in order to solve the problem of different remote access technologies, complex traffic access in different operating system scenarios, and solve the security problem of remote access, the embodiment of the present disclosure introduces a remote access controller to convert the 4-layer protocol into a 7-layer protocol, and at the same time, connects to the company's internal authentication system to achieve secure and controllable remote access. Through a unified traffic access solution, security is high and fine-grained permission access control can be achieved.
[0066] like Figure 1 As shown, Figure 1 A schematic diagram of a scenario of terminal remote access provided by an embodiment of the present disclosure. In the embodiment, each node is provided with an agent, which provides agent services. Figure 1 In the example, three nodes are used for explanation, namely node 1, node 2 and node 3. Node 1 provides agent and SSH service; node 2 provides agent and virtual machine 1 and virtual machine 2, and of course there can be other virtual machines; node 3 provides agent, container 1 and container 2, and of course there can be other containers. In the embodiment, the services provided by node 1, node 2 and node 3 can also be other, which is only an exemplary description here.
[0067] In the embodiment, when a user needs to access related resources on a node remotely, for example, the user needs to access the shell of virtual machine 2 on node 2. Then, the user can initiate a request to the controller 12 through the terminal 11 to apply for access to the shell of virtual machine 2 on node 2. The controller 12 will authenticate the request, first determine whether the user is a logged-in user, if not a logged-in user, the authentication fails, and the user is denied access. Secondly, the controller 12 will authenticate the request to ensure that the user has the authority to access the corresponding resources, that is, to ensure that the user has the authority to access the shell of virtual machine 2 in node 2. If there is no authority, an authentication failure result will be generated, and the user will be denied access.
[0068] After authentication and authorization are passed in the above manner, an Endpoint object will be generated. The Endpoint object contains a unique resource identifier, which can be represented by edp-1, and is used to identify the Endpoint object. At the same time, the Endpoint object also records the resources and user information required to be accessed. The resource to be accessed is the shell of virtual machine 2 on node 2. Example: uid = edp-1, res = shell of virtual machine 2 on node 2, use = user 1. Then the information including uid, res and use is written to the Endpoint object.
[0069] The controller 12 writes the generated Endpoint object into the persistent storage 13. At this time, the Endpoint object is in the Pending state, that is, the waiting state. At this time, the controller 12 sends an access resource identifier to the terminal, that is, the above-mentioned edp-1.
[0070] like Figure 2 As shown, Figure 2 A schematic diagram of a scenario in which a proxy provided in the present invention monitors Endpoint objects in storage. Figure 2In the example, after the proxy service on the node is started, it will collect service object information on the host, such as SSH, virtual machines, and containers. In addition, after the proxy service is started, it will also monitor the Endpoint object in the storage. The agent in each node will monitor whether the resources contained in the Endpoint object stored in the storage are resources on its own node. If an agent finds that the resources contained in the Endpoint object are resources managed by itself, the agent updates the status information of the Endpoint object, writes its own service address into the Endpoint object, and updates the Endpoint object status to Ready. In the embodiment, since the Endpoint object contains resources on Node 2, the proxy object in "Node 2" finds that the resources in the Endpoint object are resources managed by itself, the agent updates the status information of the Endpoint, writes its own service address into the Endpoint object, and updates the Endpoint object status to Ready, that is, ready state.
[0071] In the embodiment, the proxy provided on the node and the controller service 12 are both accessed through a 7-layer traffic access service. The proxy is deployed on each node, and the controller 12 is deployed in a centralized deployment manner. The controller 12 and the storage 13 can be deployed on different servers or on the same server. Node 1, node 2, and node 3 can be different servers.
[0072] Figure 3 A schematic diagram of a scenario provided in an embodiment of the present disclosure is shown in FIG. Figure 3 As shown, terminal 11 sends an access request containing a resource identifier edp-1, and the access request is forwarded to the process of an agent on any node through the 7-layer traffic access service, for example, to the agent process of the agent in node 3. The agent process on node 3 queries the information of the resource identifier edp-1 in the request and finds that the traffic should be forwarded to the proxy service of node 2. Therefore, the agent process in node 3 forwards the traffic, that is, the access request, to the agent in node 2. The agent in node 2 obtains edp-1 in the access request and finds that the service that the access request needs to access is in this node 2. At this time, the agent in node 2 will call the authentication service to authenticate the current user. By judging whether the current user is the same as the user information recorded in the Endpoint object, if it is not the same, it will refuse to provide service. After the authentication is completed, the agent in node 2 forwards the access request to the virtual machine 2 of node 2.
[0073] The disclosed embodiment performs traffic control through the 7-layer traffic access service and accesses the internal authentication service of the enterprise company, so that it does not rely on the internal authentication of the host machine / virtual machine. The agents of the nodes support high availability and support access to services such as ssh, vnc, rdp and spice of the host machine and virtual machine, as well as support access to the shell and log services of the container.
[0074] Based on the above embodiments, the present disclosure also provides a remote access method, such as Figure 4 As shown, the method may include the following steps:
[0075] In step S410, the receiving terminal sends a first access request.
[0076] The first access request carries resource information of the resource to be accessed.
[0077] Please refer to the above Figure 1 and Figure 1 In the corresponding embodiment, the resource information here may be the shell of the virtual machine 2 on the node 2, and of course may be other types, which are not limited here.
[0078] In step S420, a target resource object is generated.
[0079] The target resource object includes a target resource identifier for identifying the target resource object and resource information.
[0080] In the embodiment, the target resource object may be the aforementioned Endpoint object, and the target resource identifier may be represented by edp-1.
[0081] In step S430, the target resource object is stored in the target storage, and the target resource identifier is sent to the terminal.
[0082] In step S440, when a second access request including a target resource identifier sent by the terminal is received, the second access request is forwarded to the resource to be accessed based on the target resource identifier.
[0083] In an embodiment, the second access request may be forwarded to an agent process of any node, and the agent process determines the corresponding target node based on the target resource identifier and forwards the second access request to the resource to be accessed of the target node. Figure 3In the corresponding embodiment, the terminal 11 sends an access request including the resource identifier edp-1, and the access request is forwarded to the process of the agent on any node through the 7-layer traffic access service, for example, to the agent process of the agent in node 3. The agent process on node 3 queries the information of the resource identifier edp-1 in the request and finds that the traffic should be forwarded to the agent service of node 2. Therefore, the agent process in node 3 forwards the traffic, that is, the access request, to the agent of node 2.
[0084] In an embodiment, the target node may also perform user authentication on the second access request; if the user authentication is successful, determine whether the target resource identifier contained in the second access request matches the information contained in the target resource object stored in the target storage; if it matches the information contained in the target resource object stored in the target storage, forward the second access request to the target virtual machine of the target node.
[0085] In the embodiment, the proxy in node 2 obtains edp-1 in the access request and finds that the service to be accessed by the access request is in node 2. At this time, the proxy in node 2 will call the authentication service to authenticate the current user. After the authentication is completed, the proxy in node 2 forwards the access request to virtual machine 2 of node 2. In the embodiment, by judging whether the current user is the same as the user information recorded in the Endpoint object, if they are different, the service is refused.
[0086] In the embodiments provided by the present disclosure, the user can also be authenticated, first ensuring that the target account is already logged in, otherwise access is denied. When the target account corresponding to the terminal is logged in, it is determined whether the target account has access rights to the resource to be accessed; if the account has access rights to the resource to be accessed, the service is continued to be provided.
[0087] In the embodiment, a target resource identifier is sent to the terminal so that the terminal sends a second access request including the target resource identifier. When the second access request including the target resource identifier sent by the terminal is received, the second access request is forwarded to the resource to be accessed based on the target resource identifier.
[0088] The remote access method provided by the embodiment of the present disclosure generates a target resource object when receiving a first access request sent by a terminal, stores the target resource object in a target storage, and sends the target resource identifier to the terminal. In this way, when a second access request including the target resource identifier is received from the terminal, the second access request can be forwarded to the resource to be accessed based on the target resource identifier, thereby realizing remote access to the resource to be accessed, which can meet the actual business needs of users and improve the efficiency of remote access to a great extent.
[0089] Based on the above embodiment, in another embodiment provided by the present disclosure, the method may further include the following steps:
[0090] S450: monitor resource objects stored in the target storage.
[0091] S460: When it is monitored that the target resource object is stored in the target storage, determine the resource to be accessed according to the resource information in the target resource object.
[0092] S470, writing the address information of the resource to be accessed into the target resource object.
[0093] Please refer to the above Figure 2 And corresponding embodiments, the target storage in the embodiments can be the above Figure 2 In the storage 13. In the embodiment, the agent on each node monitors the resource objects stored in the storage 13. If a new resource object is found to be stored in the storage 13, for example, the target resource object is monitored to be stored in the storage 13, then the agent on each node determines that the target resource object, that is, the resource information contained in the Endpoint object is the resource managed by itself. If the agent on a node finds that the resource contained in the Endpoint object is the resource managed by itself, the agent updates the status information of the Endpoint object and writes its own service address into the Endpoint object.
[0094] In the embodiment provided by the present disclosure, when the target resource object is stored in the target storage, the state of the target resource object is set to a waiting state. When the address information of the resource to be accessed is written into the target resource object, the state of the target resource object is adjusted to a ready state. In the embodiment, the controller 12 writes the generated Endpoint object into the persistent storage 13, at which time the Endpoint object is in a Pending state, i.e., a waiting state. When the agent writes its own service address to the Endpoint object, the Endpoint object state is updated to Ready, i.e., a ready state. The resources to be accessed in the embodiment include virtual machines, containers, or preset services on nodes.
[0095] In the case of dividing each functional module according to each function, an embodiment of the present disclosure provides a remote access device, which may be a server or a chip applied to a server. Figure 5 A schematic block diagram of the functional modules of a remote access device provided by an exemplary embodiment of the present disclosure. Figure 5 As shown, the remote access device includes:
[0096] An access request receiving module 10, configured to receive a first access request sent by a terminal, wherein the first access request carries resource information of a resource to be accessed;
[0097] The object generation module 20 is used to generate a target resource object, wherein the target resource object includes a target resource identifier that identifies the target resource object and the resource information;
[0098] The storage module 30 is used to store the target resource object in a target storage and send the target resource identifier to the terminal;
[0099] The request forwarding module 40 is configured to, upon receiving a second access request including the target resource identifier sent by the terminal, forward the second access request to the resource to be accessed based on the target resource identifier.
[0100] In another embodiment provided by the present disclosure, the device further includes:
[0101] A monitoring module, used for monitoring resource objects stored in the target storage;
[0102] A resource determination module, configured to determine the resource to be accessed according to the resource information in the target resource object when monitoring that the target resource object is stored in the target storage;
[0103] The information writing module is used to write the address information of the resource to be accessed into the target resource object.
[0104] In another embodiment provided by the present disclosure, the request forwarding module is specifically used to:
[0105] forwarding the second access request to an agent process of any node;
[0106] The proxy process determines the corresponding target node based on the target resource identifier, and forwards the second access request to the resource to be accessed of the target node.
[0107] In another embodiment provided by the present disclosure, the device further includes:
[0108] An authentication module, used for the target node to perform user authentication on the second access request;
[0109] The matching module is used to determine whether the target resource identifier included in the second access request matches the information included in the target resource object stored in the target storage when the user authentication is passed.
[0110] In another embodiment provided by the present disclosure, the device further includes:
[0111] The permission judgment module is used to judge whether the target account corresponding to the terminal has the access permission to the resource to be accessed when the target account corresponding to the terminal is in a logged-in state.
[0112] In another embodiment provided by the present disclosure, the device further includes:
[0113] A first state setting module, used to set the state of the target resource object to a waiting state when storing the target resource object in a target storage;
[0114] The second state setting module is used to adjust the state of the target resource object to a ready state when the address information of the resource to be accessed is written into the target resource object.
[0115] In another embodiment provided by the present disclosure, the resource to be accessed includes a virtual machine, a container, or a preset service on a node.
[0116] For the description of the device, please refer to the above method embodiment, which will not be repeated here.
[0117] The remote access device provided by the embodiment of the present disclosure generates a target resource object when receiving a first access request sent by a terminal, stores the target resource object in a target storage, and sends the target resource identifier to the terminal. In this way, when a second access request including the target resource identifier is received from the terminal, the second access request can be forwarded to the resource to be accessed based on the target resource identifier, thereby realizing remote access to the resource to be accessed, which can meet the actual business needs of users and improve the efficiency of remote access to a great extent.
[0118] An embodiment of the present disclosure also provides an electronic device, comprising: at least one processor; and a memory for storing instructions executable by the at least one processor; wherein the at least one processor is configured to execute the instructions to implement the above method disclosed in the embodiment of the present disclosure.
[0119] Figure 6 The structure diagram of an electronic device provided by an exemplary embodiment of the present disclosure is shown in FIG. Figure 6 As shown, the electronic device 1800 includes at least one processor 1801 and a memory 1802 coupled to the processor 1801 , and the processor 1801 can execute corresponding steps in the above method disclosed in the embodiment of the present disclosure.
[0120] The processor 1801 may also be referred to as a central processing unit (CPU), which may be an integrated circuit chip having signal processing capabilities. Each step in the method disclosed in the embodiment of the present disclosure may be completed by an integrated logic circuit of hardware in the processor 1801 or by instructions in the form of software. The processor 1801 may be a general-purpose processor, a digital signal processor (DSP), an ASIC, a field-programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present disclosure may be directly embodied as being executed by a hardware decoding processor, or may be executed by a combination of hardware and software modules in a decoding processor. The software module may be located in a memory 1802, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, or other mature storage media in the art. The processor 1801 reads the information in the memory 1802 and completes the steps of the method in combination with its hardware.
[0121] In addition, when various operations / processes according to the present disclosure are implemented by software and / or firmware, they can be transmitted from a storage medium or a network to a computer system having a dedicated hardware structure, such as Figure 7 The computer system 1900 shown is installed with the programs constituting the software. When the various programs are installed, the computer system can perform various functions, including the functions described above. Figure 7 A structural block diagram of a computer system provided for an exemplary embodiment of the present disclosure.
[0122] Computer system 1900 is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic devices can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0123] like Figure 7As shown, the computer system 1900 includes a computing unit 1901, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 1902 or a computer program loaded from a storage unit 1908 to a random access memory (RAM) 1903. In the RAM 1903, various programs and data required for the operation of the computer system 1900 can also be stored. The computing unit 1901, the ROM 1902, and the RAM 1903 are connected to each other via a bus 1904. An input / output (I / O) interface 1905 is also connected to the bus 1904.
[0124] A plurality of components in the computer system 1900 are connected to the I / O interface 1905, including: an input unit 1906, an output unit 1907, a storage unit 1908, and a communication unit 1909. The input unit 1906 may be any type of device capable of inputting information to the computer system 1900, and the input unit 1906 may receive input digital or character information, and generate key signal inputs related to user settings and / or function control of the electronic device. The output unit 1907 may be any type of device capable of presenting information, and may include, but is not limited to, a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The storage unit 1908 may include, but is not limited to, a disk, an optical disk. The communication unit 1909 allows the computer system 1900 to exchange information / data with other devices over a network such as the Internet, and may include, but is not limited to, a modem, a network card, an infrared communication device, a wireless communication transceiver, and / or a chipset, such as a Bluetooth™ device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.
[0125] The computing unit 1901 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 1901 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 1901 performs the various methods and processes described above. For example, in some embodiments, the above methods disclosed in the embodiments of the present disclosure may be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a storage unit 1908. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 1900 via the ROM 1902 and / or the communication unit 1909. In some embodiments, the computing unit 1901 may be configured to perform the above methods disclosed in the embodiments of the present disclosure in any other appropriate manner (e.g., by means of firmware).
[0126] The embodiment of the present disclosure further provides a computer-readable storage medium, wherein when instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the above method disclosed in the embodiment of the present disclosure.
[0127] The computer-readable storage medium in the disclosed embodiments may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. The computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. More specifically, the computer-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0128] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0129] The embodiments of the present disclosure further provide a computer program product, including a computer program, wherein when the computer program is executed by a processor, the above method disclosed in the embodiments of the present disclosure is implemented.
[0130] In embodiments of the present disclosure, computer program codes for performing the operations of the present disclosure may be written in one or more programming languages or combinations thereof, including but not limited to object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code may be executed entirely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer.
[0131] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0132] The modules, components or units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the names of the modules, components or units do not, in some cases, limit the modules, components or units themselves.
[0133] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.
[0134] The above descriptions are only some embodiments of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, a technical solution formed by replacing the above features with the technical features with similar functions disclosed in the present disclosure (but not limited to).
[0135] Although some specific embodiments of the present disclosure have been described in detail by way of example, it should be understood by those skilled in the art that the above examples are for illustration only and are not intended to limit the scope of the present disclosure. It should be understood by those skilled in the art that the above embodiments may be modified without departing from the scope and spirit of the present disclosure. The scope of the present disclosure is defined by the appended claims.
Claims
1. A remote access method, characterized in that: The method comprises: The receiving terminal sends a first access request, where the first access request carries resource information of a resource to be accessed; Generate a target resource object, wherein the target resource object includes a target resource identifier identifying the target resource object and the resource information; The target resource object is stored in the target storage, and the target resource identifier is sent to the terminal; wherein the agent in each node, when monitoring that the target storage resource stored in the target storage is a resource on the local node, writes the service address of the local node into the target storage; When receiving a second access request including the target resource identifier sent by the terminal, forwarding the second access request to an agent process of any node; The proxy process determines the corresponding target node based on the target resource identifier, and forwards the second access request to the resource to be accessed of the target node.
2. The method according to claim 1, characterized in that The method further comprises: Monitoring resource objects stored in the target storage; In the case where it is monitored that the target resource object is stored in the target storage, determining the resource to be accessed according to the resource information in the target resource object; The address information of the resource to be accessed is written into the target resource object.
3. The method according to claim 1, characterized in that The method further comprises: The target node performs user authentication on the second access request; In the case where the user authentication is passed, determining whether the target resource identifier included in the second access request matches the information included in the target resource object stored in the target storage; In the case where the information matches the information contained in the target resource object stored in the target storage, the step of forwarding the second access request to the resource to be accessed of the target node is performed.
4. The method according to claim 1, characterized in that The method further comprises: When the target account corresponding to the terminal is in a logged-in state, determining whether the target account has access rights to the resource to be accessed; In the case where the account has access rights to the resource to be accessed, the step of generating the target resource object is performed.
5. The method according to claim 2, characterized in that: The method further comprises: In case of storing the target resource object in the target storage, setting the state of the target resource object to a waiting state; When the address information of the resource to be accessed is written into the target resource object, the state of the target resource object is adjusted to a ready state.
6. The method according to any one of claims 1 to 5, characterized in that: The resources to be accessed include virtual machines, containers or preset services on the node.
7. A remote access device, characterized in that: The device comprises: An access request receiving module, configured to receive a first access request sent by a terminal, wherein the first access request carries resource information of a resource to be accessed; An object generation module, used for generating a target resource object, wherein the target resource object includes a target resource identifier identifying the target resource object and the resource information; A storage module, used to store the target resource object in a target storage and send the target resource identifier to the terminal; wherein the agent in each node, when monitoring that the target storage resource stored in the target storage is a resource on the local node, writes the service address of the local node into the target storage; a request forwarding module, configured to forward the second access request including the target resource identifier sent by the terminal to an agent process of any node when the second access request is received; The proxy process determines the corresponding target node based on the target resource identifier, and forwards the second access request to the resource to be accessed of the target node.
8. An electronic device, characterized in that: include: at least one processor; a memory for storing the at least one processor-executable instruction; The at least one processor is configured to execute the instructions to implement the method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the method as claimed in any one of claims 1 to 6.
Citation Information
Patent Citations
Systems and methods for establishing a cloud bridge between virtual storage resources
CN102460393A
Flow scheduling method and device for Kubernetes cluster and electronic device
CN112153143A
Container protection connection method and device based on middleware deployment, equipment and medium
CN114296881A
Application access method and device, equipment and medium
CN114448895A
Cloud platform access method and device, equipment and storage medium
CN114499935A
