Identification method and device of bastion host for receiving and managing equipment, and electronic equipment

By obtaining and matching the identification information of managed devices in the bastion host, the problem of wasting authorization resources caused by multiple address information pointing to the same device is solved, and the unique identification of the device and cost reduction are achieved.

CN118869288APending Publication Date: 2024-10-29CHINA ELECTRONICS CLOUD DIGITAL INTELLIGENCE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410901839.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-05
Publication Date
2024-10-29

AI Technical Summary

Technical Problem

When the bastion host operates and maintains managed devices, multiple address information may point to the same device, resulting in a waste of authorized resources and increased operation and maintenance costs.

Method used

By obtaining the identification information of the device to be managed and matching it with the device identification information in the device information list stored in the bastion host, if there is no matching identification information, the device is allowed to occupy the remaining authorized resources to avoid address information-based Repeat authorization.

Benefits of technology

It achieves unique identification of managed devices, avoids waste of authorization resources, and reduces operation and maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118869288A_ABST
    Figure CN118869288A_ABST
Patent Text Reader

Abstract

The invention provides an identification method and device of a bastion host for a nano-management device and an electronic device, and relates to the technical field of data management, the method comprises the following steps: obtaining identification information of a to-be-processed nano-management device, the identification information being used for uniquely identifying the to-be-processed nano-management device; matching the identification information of the to-be-processed nano-management equipment with equipment identification information in an equipment information list stored in the bastion host, wherein the equipment information list stores the identification information of the nano-management equipment occupying authorized resources of the bastion host; and if the equipment identification information matched with the identification information of the to-be-processed nano-management equipment does not exist in the equipment information list, allowing the to-be-processed nano-management equipment to occupy one authorized resource in the residual authorized resources of the bastion host. The method and the device are used for solving the problem of waste of authorization resources of the bastion host and reducing the operation and maintenance cost of the nano-management equipment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data management technology, and in particular to a method, device and electronic device for a bastion host to identify managed devices. Background Art

[0002] Bastion hosts are commonly used to manage and control managed devices, access internal network devices from the external network, and maintain and monitor related operation records. In actual use, the bastion host can perform operations such as maintenance on managed devices through three different address information, namely, Internet Communication Protocol Version 4 (IPv4), Internet Communication Protocol Version 6 (IPv6), and IP address. Therefore, there may be three different address information pointing to the same managed device in the bastion host.

[0003] Currently, since one address information requires one authorized resource of the bastion host, multiple address information requires multiple authorized resources of the bastion host, and a managed device may have multiple address information, a managed device may consume multiple authorized resources of the bastion host, resulting in a waste of the bastion host's authorized resources and an increase in the operation and maintenance costs of the managed devices.

[0004] Therefore, how to avoid the waste of bastion host authorization resources and reduce the operation and maintenance costs of managed devices is an urgent problem that needs to be solved. Summary of the invention

[0005] In order to avoid the waste of authorized resources of the bastion host and reduce the operation and maintenance costs of managed devices, the present application provides a method, device and electronic device for the bastion host to identify managed devices.

[0006] In a first aspect, the present application provides a method for a bastion host to identify a managed device, including:

[0007] Obtain identification information of the managed device to be processed, where the identification information is used to uniquely identify the managed device to be processed;

[0008] Matching the identification information of the managed device to be processed with the device identification information in the device information list stored in the bastion host, wherein the device information list stores the identification information of the managed device occupying the authorized resources of the bastion host;

[0009] If there is no device identification information matching the identification information of the to-be-processed managed device in the device information list, the to-be-processed managed device is allowed to occupy one of the remaining authorized resources of the bastion host.

[0010] In some embodiments, after allowing the to-be-processed managed device to occupy one of the remaining authorized resources of the bastion server, the method further includes:

[0011] The identification information of the managed device to be processed is stored in the device information list to indicate that the managed device to be processed has occupied an authorized resource of the bastion host.

[0012] In some embodiments, the device information list stores address information of the managed device, and the address information includes: at least one of an ipv4 address, an ipv6 address, and an IP address;

[0013] Before obtaining the identification information of the to-be-processed managed device, the method further includes:

[0014] Acquire the address information of the managed device to be processed, and match the address information of the managed device to be processed with the address information in the device information list;

[0015] If there is no address information matching the address information of the managed device to be processed in the device information list, the identification information of the managed device to be processed is obtained.

[0016] In some embodiments, the method further comprises:

[0017] If there is device identification information in the device information list that matches the identification information of the device to be managed, the address information of the device to be managed is stored in the address list corresponding to the identification information of the device to be managed in the device information list, and the device to be managed is not allowed to occupy the remaining authorized resources of the bastion host.

[0018] In some embodiments, the obtaining identification information of the to-be-processed managed device includes:

[0019] Performing a connectivity test on the managed device to be processed, wherein the connectivity test is used to test whether the bastion host can be connected to the managed device to be processed;

[0020] In the connectivity test process for the managed device to be processed, identification information of the managed device to be processed is obtained by executing a test script, wherein the test script includes a connectivity test script language and a managed device information acquisition language.

[0021] In some embodiments, the step of obtaining the identification information of the to-be-processed managed device by executing a test script includes:

[0022] Execute the connectivity test script language in the test script to test the connectivity of the managed device to be processed;

[0023] If the connectivity test of the managed device to be processed passes, the managed device information acquisition language in the test script is executed to obtain the identification information of the managed device to be processed.

[0024] In some embodiments, executing the connectivity test script language in the test script to test the connectivity of the managed device to be processed includes:

[0025] Accessing the managed device to be processed by using the account information of the managed device to be processed by executing the connectivity test script language in the test script;

[0026] If the managed device to be processed can be accessed successfully, it is determined that the connectivity test of the managed device to be processed has passed.

[0027] In a second aspect, the present application provides a bastion host identification device for a managed device, including:

[0028] An acquisition module, used to acquire identification information of a to-be-processed managed device, where the identification information is used to uniquely identify the to-be-processed managed device;

[0029] An identification module, used to match the identification information of the managed device to be processed with the device identification information in the device information list stored in the bastion host, wherein the device information list stores the identification information of the managed device occupying the authorized resources of the bastion host;

[0030] The authorization module is used to allow the to-be-processed managed device to occupy one of the remaining authorized resources of the bastion host if there is no device identification information matching the identification information of the to-be-processed managed device in the device information list.

[0031] In some embodiments, the device also includes: a storage module, which is used to store the identification information of the device to be processed into the device information list after allowing the device to be processed to occupy one of the remaining authorized resources of the bastion host, so as to indicate that the device to be processed to be managed has occupied an authorized resource of the bastion host.

[0032] In some embodiments, the device information list stores address information of the managed device, and the address information includes: at least one of an ipv4 address, an ipv6 address, and an IP address;

[0033] Before obtaining the identification information of the managed device to be processed, the identification module is used to obtain the address information of the managed device to be processed, and match the address information of the managed device to be processed with the address information in the device information list;

[0034] If there is no address information matching the address information of the managed device to be processed in the device information list, the identification information of the managed device to be processed is obtained.

[0035] In some embodiments, the storage module is also used to store the address information of the device to be managed in the device information list corresponding to the identification information of the device to be managed, if there is device identification information matching the identification information of the device to be managed in the device information list, and does not allow the device to be managed to occupy the remaining authorized resources of the bastion host.

[0036] In some embodiments, the acquisition module is specifically used to perform a connectivity test on the to-be-processed managed device, and the connectivity test is used to test whether the bastion host can be connected to the to-be-processed managed device;

[0037] In the connectivity test process for the managed device to be processed, identification information of the managed device to be processed is obtained by executing a test script, wherein the test script includes a connectivity test script language and a managed device information acquisition language.

[0038] In some embodiments, the acquisition module is specifically used to execute the connectivity test script language in the test script to test the connectivity of the managed device to be processed;

[0039] If the connectivity test of the managed device to be processed passes, the managed device information acquisition language in the test script is executed to obtain the identification information of the managed device to be processed.

[0040] In some embodiments, the acquisition module is specifically used to access the managed device to be processed by executing the connectivity test script language in the test script using the account information of the managed device to be processed;

[0041] If the managed device to be processed can be accessed successfully, it is determined that the connectivity test of the managed device to be processed has passed.

[0042] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a memory and a processor, the memory being used to store a computer program, the processor being used to execute the method for a bastion host to identify a managed device as described in the first aspect or any optional implementation scheme of the first aspect when calling the computer program.

[0043] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method for the bastion host to identify a managed device as described in the first aspect or any optional implementation method of the first aspect is implemented.

[0044] Compared with the prior art, the technical solution provided by the embodiments of the present application has the following advantages:

[0045] The method for identifying a managed device by a bastion host provided in an embodiment of the present application includes: obtaining identification information of a managed device to be processed, the identification information being used to uniquely identify the managed device to be processed; matching the identification information of the managed device to be processed with the device identification information in the device information list stored in the bastion host, the device information list storing the identification information of the managed device occupying the authorized resources of the bastion host; if there is no device identification information matching the identification information of the managed device to be processed in the device information list, then allowing the managed device to be processed to occupy one of the remaining authorized resources of the bastion host. In an embodiment of the present application, the identification information of the managed device to be processed is obtained, and by matching it with the device identification information in the device information list, it is determined whether the managed device to be processed is a device that has been managed in the device information list. Since the identification information uniquely identifies the managed device, the managed device can be uniquely identified, thereby avoiding the problem of one managed device consuming multiple authorized resources of the bastion host due to multiple address information pointing to the same managed device in the method for identifying the managed device based on the traditional address information, thereby avoiding the waste of authorized resources without the bastion host, and reducing the operation and maintenance cost of the managed device. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0047] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0048] Figure 1 A flowchart of the steps of a method for a bastion host to identify a managed device provided in one embodiment of the present application;

[0049] Figure 2 A flowchart of the steps of a method for a bastion host to identify a managed device provided in another embodiment of the present application;

[0050] Figure 3 A schematic diagram of a device information list provided for an embodiment of the present application;

[0051] Figure 4 A structural block diagram of a device for identifying a managed device by a bastion host provided in one embodiment of the present application;

[0052] Figure 5 A structural block diagram of a device for identifying a managed device by a bastion host provided in another embodiment of the present application;

[0053] Figure 6 An internal structure diagram of an electronic device provided for one embodiment of the present application. DETAILED DESCRIPTION

[0054] In order to make the purpose, implementation mode and advantages of the present application clearer, the exemplary implementation mode of the present application will be clearly and completely described below in conjunction with the drawings in the exemplary embodiments of the present application. Obviously, the described exemplary embodiments are only part of the embodiments of the present application, rather than all the embodiments.

[0055] Based on the exemplary embodiments described in this application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the claims attached to this application. In addition, although the disclosure in this application is introduced according to one or several exemplary examples, it should be understood that each aspect of these disclosures can also constitute a complete implementation method separately. It should be noted that the brief description of the terms in this application is only for the convenience of understanding the implementation methods described below, and is not intended to limit the implementation methods of this application. Unless otherwise specified, these terms should be understood according to their common and usual meanings.

[0056] First, the application scenario of the embodiment of the present application is described exemplarily. The method for identifying managed devices by the bastion host provided in the embodiment of the present application can be applied to the scenario where the bastion host performs operation and maintenance operations on the managed devices. The bastion host performs operation and maintenance monitoring on the managed devices by accessing the intranet devices from the external network. At present, the bastion host can operate and maintain managed devices through IP addresses, ipv4, ipv6 and other addresses, and one access address requires the use of an authorized resource of the bastion host, so that a managed device may use multiple authorized resources of the bastion host. The number of authorized resources of the bastion host is fixed, resulting in a waste of the authorized resources of the bastion host. The authorized resources of the bastion host need to be purchased, which increases the operation and maintenance costs.

[0057] Based on this, an embodiment of the present application provides a method for a bastion host to identify managed devices, which uniquely identifies the managed devices to avoid wasting the bastion host's authorized resources and save operation and maintenance costs.

[0058] The following will illustrate and explain the method for the bastion host to identify managed devices provided by this application through specific exemplary embodiments.

[0059] Figure 1 A flowchart of a method for identifying a managed device by a bastion host provided in an embodiment of the present application is provided. Figure 1 As shown, the method for the bastion host to identify the managed device provided in this embodiment includes the following steps S11 to S13.

[0060] S11. Obtain identification information of the device to be managed.

[0061] Among them, the identification information is used to uniquely identify the device to be managed. For example, the identification information can be the serial number of the device to be managed, or it can be other information that can uniquely identify the device to be managed. The embodiment of the present application does not make specific limitations. The device to be managed is an asset device to be included in the bastion host authorization, such as a virtual machine, a Windows host, etc.

[0062] In some embodiments, the Ansible module of the bastion host can be used to perform connectivity tests on the managed devices to obtain identification information of the managed devices.

[0063] Exemplarily, a connectivity test is performed on the managed device to be processed. During the connectivity test on the managed device to be processed, identification information of the managed device to be processed is obtained by executing a test script, wherein the connectivity test is used to test whether the bastion host can connect to the managed device to be processed, and the test script includes a connectivity test script language and a managed device information acquisition language, that is, a connectivity test module and a managed device information acquisition module are integrated in the test script, and gather_facts in the Ansible module can be used to obtain device information from the managed device to be processed.

[0064] Among them, the obtaining of identification information of the to-be-processed managed device by executing the test script includes: executing the connectivity test script language in the test script to test the connectivity of the to-be-processed managed device; if the connectivity test of the to-be-processed managed device passes, executing the managed device information obtaining language in the test script to obtain the identification information of the to-be-processed managed device.

[0065] If the connectivity test of the managed device to be processed fails, the managed device information acquisition language step in the test script will no longer be executed, and the managed device to be processed will no longer be identified.

[0066] Exemplarily, executing the connectivity test script language in the test script to test the connectivity of the device to be managed includes: accessing the device to be managed using the account information of the device to be managed by executing the connectivity test script language in the test script; if the device to be managed can be successfully accessed, determining that the connectivity test of the device to be managed has passed.

[0067] That is, the bastion host executes the test script and uses the account and password of the device to be managed to log in to the device to be managed. If the login is successful and the device to be managed can be accessed, it is determined that the connectivity test of the device to be managed has passed; if the device to be managed cannot be accessed successfully, it is determined that the connectivity test of the device to be managed has not passed. If the connectivity test of the device to be managed passes, it means that the connection between the bastion host and the device to be managed has been established, and the bastion host can enter the device to be managed to detect activity.

[0068] S12. Match the identification information of the device to be managed with the device identification information in the device information list stored in the bastion host.

[0069] Among them, the device information list stores the identification information of the managed devices occupying the authorized resources of the bastion host, and the identification information is used to uniquely identify the corresponding managed device.

[0070] The authorized resources of the bastion host can be understood as the authorized number of the bastion host. The authorized number of the bastion host is determined by purchase. For example, if the authorized resources of the bastion host are 10, the managed devices can only occupy 10 authorized numbers of the bastion host.

[0071] The bastion host stores a device information list, which stores the identification information of the managed devices that have been identified and the address information corresponding to the identification information. The identification information of each managed device stored in the device information list occupies one authorized resource of the bastion host. For example, assuming that the identification information of 6 managed devices is stored in the device information list, if the serial numbers of 6 managed devices are stored in the device information list, it means that the 6 authorized resources of the bastion host have been occupied.

[0072] By matching the identification information of the managed device to be processed with the device identification information in the device information list stored in the bastion host, it can be determined whether the managed device to be processed has occupied the authorized resources of the bastion host. If there is device identification information matching the identification information of the managed device to be processed in the device information list, it is determined that the managed device to be processed has occupied an authorized resource of the bastion host, and no new authorized resources are allocated to the managed device to be processed. In some embodiments, the address information of the managed device to be processed is stored in the address list corresponding to the device identification information of the managed device in the device information list.

[0073] In the embodiment of the present application, the identification information of the device to be processed is matched with the device identification information in the device information list to determine whether the device to be processed has been stored in the device information list, rather than judging whether the device to be processed has been stored in the device information list based on the address information of the device to be processed. This avoids identifying the same managed device with different address information as different devices.

[0074] S13. If the device identification information that matches the identification information of the device to be managed does not exist in the device information list, the device to be managed is allowed to occupy one of the remaining authorized resources of the bastion host.

[0075] Among them, the remaining authorized resources of the bastion host can be understood as the remaining authorization number of the bastion host. When the authorized resources of the bastion host are 10, if the identification information of 6 managed devices has been stored in the device information list, it means that the 6 authorized resources of the bastion host have been occupied, and the remaining authorized resources of the bastion host are 4. If there is no device identification information matching the identification information of the to-be-managed device in the device information list, it is determined that the to-be-managed device is a new device, and the bastion host allows the to-be-managed device to occupy one of the remaining 4 authorized resources of the bastion host.

[0076] Furthermore, the identification information of the managed device to be processed is stored in the device information list to indicate that the managed device to be processed has occupied an authorized resource of the bastion host.

[0077] The embodiment of the present application provides a method for a bastion host to identify a managed device, including: obtaining identification information of a managed device to be processed, the identification information being used to uniquely identify the managed device to be processed; matching the identification information of the managed device to be processed with the device identification information in the device information list stored in the bastion host, the device information list storing the identification information of the managed device occupying the authorized resources of the bastion host; if there is no device identification information matching the identification information of the managed device to be processed in the device information list, then allowing the managed device to be processed to occupy one of the remaining authorized resources of the bastion host. In the embodiment of the present application, the identification information of the managed device to be processed is obtained, and by matching with the device identification information in the device information list, it is determined whether the managed device to be processed is a device that has been managed in the device information list. Since the identification information uniquely identifies the managed device, the managed device can be uniquely identified, avoiding the problem of one managed device consuming multiple authorized resources of the bastion host due to multiple address information pointing to the same managed device in the method of identifying the managed device based on the traditional address information, avoiding the waste of the authorized resources of the bastion host, and reducing the operation and maintenance cost of the managed device.

[0078] In some embodiments, the address information of the managed device stored in the device information list includes: an ipv4 address, an ipv6 address, and at least one of an IP address.

[0079] That is, for a managed device, the above three different address information may exist, and the ipv4 address, ipv6 address, and IP address may point to the same managed device.

[0080] Figure 2 A flowchart of a method for a bastion host to identify a managed device is provided in another embodiment of the present application. Figure 1 In the embodiment shown, before step S11, the following steps S21 to S22 are also included, referring to Figure 2 The explanations of the terms that are the same as or corresponding to the above embodiments are not repeated here, and the details can be found in the explanations and descriptions of the above embodiments.

[0081] S21. Obtain address information of the managed device to be processed, and match the address information of the managed device to be processed with the address information in the device information list.

[0082] That is, in the embodiment of the present application, the address information of the device to be processed is first matched with the address information in the device information list. If the same address information exists in the device information list, it means that the device to be processed has been stored in the device information list. The address information can be directly stored in the address list corresponding to the identification information of the device to be processed in the device information list.

[0083] S22. If the device information list does not contain address information that matches the address information of the managed device to be processed, obtain identification information of the managed device to be processed.

[0084] Then, the steps S11 to S12 in the above-mentioned embodiment are performed, which will not be described in detail here. If there is no device identification information matching the identification information of the managed device to be processed in the device information list, the following step S23 is performed; if there is device identification information matching the identification information of the managed device to be processed in the device information list, the following step S24 is performed.

[0085] S23. Allow the managed device to be processed to occupy one of the remaining authorized resources of the bastion host, and store the identification information and corresponding address information of the managed device to the corresponding position of the device information list.

[0086] S24. Store the address information of the managed device to be processed into the address list corresponding to the identification information of the managed device to be processed in the device information list, and do not allow the managed device to occupy the remaining authorized resources of the bastion host.

[0087] Based on the method for identifying managed devices by the bastion host provided in the embodiment of the present application, different address information of managed devices can be attributed to the address list corresponding to the corresponding identification information, thereby realizing multi-address integration of managed devices. Figure 3As shown, taking the identification information of the managed device as the serial number of the managed device as an example, wherein the connectivity "yes" indicates that the managed device has passed the connectivity test, and through the method for identifying the managed device by the bastion host provided in the embodiment of the present application, the three address information "ipv4", "ipv6", and "private network ip" pointing to the same managed device can be included in the address list corresponding to the identification information of the managed device.

[0088] Exemplarily, the address information of the managed device to be processed is matched with the address information in the device information list. If any one of the address information of "ipv4", "ipv6" and "private network ip" can be matched, such as the address information of "private network ip" is matched, and the serial number of the corresponding managed device is "A", then it is considered that the managed device to be processed already exists in the device information list and has occupied an authorized resource of the bastion host, and the managed device to be processed will not be stored again. For the next managed device to be processed, matching is performed again based on the above method. If there is no address information matching the ipv4 address of the managed device to be processed in the address information of the device information list, but there is a matching serial number "A" in the device information list, then the ipv4 address is directly stored in the "ipv4" address list corresponding to the serial number "A" in the device information list, and the serial number "A" is not stored again. For the device to be processed with serial number "B", matching is performed again based on the above method. If the address information in the device information list does not contain address information matching the address of the device to be processed, and there is no matching serial number "B" in the device information list, then the serial number "B" is stored in the identification information list of the device information list, and the corresponding address information is stored in the address list corresponding to the serial number "B".

[0089] Based on the method for the bastion host to identify managed devices provided in the embodiment of the present application, even if there are multiple different types of address information in the bastion host pointing to the same managed device, the same managed device pointed to by the multiple different types of address information will not be identified as different managed devices, thereby avoiding waste of the bastion host's authorized resources and reducing the operation and maintenance costs of the managed devices.

[0090] Based on the same inventive concept, as an implementation of the above method, an embodiment of the present application also provides an identification device for the bastion host to the managed device provided by the above embodiment. The device embodiment corresponds to the above method embodiment. For ease of reading, the present device embodiment will no longer repeat the details of the above method embodiment one by one, but it should be clear that the identification device for the bastion host to the managed device in this embodiment can correspond to the implementation of all the contents in the above method embodiment.

[0091] Figure 4A schematic diagram of the structure of the apparatus for identifying a managed device provided by a bastion host in an embodiment of the present application, such as Figure 4 As shown, the bastion host identification device 400 provided in this embodiment includes:

[0092] An acquisition module 410 is used to acquire identification information of a to-be-processed managed device, where the identification information is used to uniquely identify the to-be-processed managed device;

[0093] An identification module 420, configured to match the identification information of the managed device to be processed with the device identification information in the device information list stored in the bastion host, wherein the device information list stores the identification information of the managed device occupying the authorized resources of the bastion host;

[0094] The authorization module 430 is used to allow the managed device to occupy one of the remaining authorized resources of the bastion host if there is no device identification information matching the identification information of the managed device to be processed in the device information list.

[0095] Reference Figure 5 As shown, Figure 5 A schematic diagram of a structure of a bastion host identification device for a managed device provided in another embodiment of the present application, Figure 4 Based on the device shown, it also includes:

[0096] The storage module 510 is used to store the identification information of the to-be-processed managed device in the device information list after allowing the to-be-processed managed device to occupy one of the remaining authorized resources of the bastion host, so as to indicate that the to-be-processed managed device has occupied an authorized resource of the bastion host.

[0097] In some embodiments, the device information list stores address information of managed devices, and the address information includes: an ipv4 address, an ipv6 address, and at least one of an IP address; before obtaining the identification information of the managed device to be processed, the identification module 420 is used to obtain the address information of the managed device to be processed, and match the address information of the managed device to be processed with the address information in the device information list; if there is no address information in the device information list that matches the address information of the managed device to be processed, the identification information of the managed device to be processed is obtained.

[0098] In some embodiments, the storage module 510 is also used to store the address information of the device to be managed in the device information list corresponding to the identification information of the device to be managed, if there is device identification information matching the identification information of the device to be managed in the device information list, and does not allow the device to be managed to occupy the remaining authorized resources of the bastion host.

[0099] In some embodiments, the acquisition module 410 is specifically used to perform a connectivity test on the managed device to be processed, and the connectivity test is used to test whether the bastion host can connect to the managed device to be processed; during the connectivity test on the managed device to be processed, the identification information of the managed device to be processed is obtained by executing a test script, and the test script includes a connectivity test script language and a managed device information acquisition language.

[0100] In some embodiments, the acquisition module 410 is specifically used to execute the connectivity test script language in the test script to test the connectivity of the managed device to be processed; if the connectivity test of the managed device to be processed passes, the managed device information acquisition language in the test script is executed to obtain the identification information of the managed device to be processed.

[0101] In some embodiments, the acquisition module 410 is specifically used to access the managed device to be processed by executing the connectivity test script language in the test script using the account information of the managed device to be processed; if the managed device to be processed can be successfully accessed, it is determined that the connectivity test of the managed device to be processed has passed.

[0102] The bastion host's identification device for managed devices provided in the embodiment of this year's application obtains the identification information of the managed device to be processed when executing the bastion host's identification method for managed devices, and determines whether the managed device to be processed is a device that has been managed in the device information list by matching it with the device identification information in the device information list. Since the identification information uniquely identifies the managed device, the managed device can be uniquely identified, thereby avoiding the problem of one managed device consuming multiple authorized resources of the bastion host due to multiple address information pointing to the same managed device in the traditional method of identifying managed devices based on address information, thereby avoiding the waste of bastion host-free authorized resources and reducing the operation and maintenance costs of managed devices.

[0103] The bastion host's identification device for managed devices provided in this embodiment can execute the bastion host's identification method for managed devices provided in the above method embodiment. Its implementation principle and technical effect are similar and will not be repeated here. Each module in the above bastion host's identification device for managed devices can be implemented in whole or in part through software, hardware and a combination thereof. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0104] In one embodiment, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of any one of the methods for identifying a managed device by a bastion host described in the above method embodiments are implemented.

[0105] For example, Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 6 As shown, the electronic device provided in this embodiment includes: a memory 61 and a processor 62, the memory 61 is used to store computer programs; the processor 62 is used to execute the steps of the method for identifying the managed device provided by the bastion host in the above method embodiment when calling the computer program, and its implementation principle and technical effect are similar, which will not be repeated here. Those skilled in the art can understand that Figure 6 The structure shown in the figure is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the electronic device to which the scheme of the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0106] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of any one of the methods for identifying a managed device by a bastion host described in the above method embodiments are implemented.

[0107] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in various forms, such as static random access memory (SRAM) and dynamic random access memory (DRAM).

[0108] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0109] The above description is only a specific implementation of the present application, so that those skilled in the art can understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for identifying a managed device by a bastion host, characterized in that: include: Obtain identification information of the managed device to be processed, where the identification information is used to uniquely identify the managed device to be processed; Matching the identification information of the managed device to be processed with the device identification information in the device information list stored in the bastion host, wherein the device information list stores the identification information of the managed device occupying the authorized resources of the bastion host; If there is no device identification information matching the identification information of the to-be-processed managed device in the device information list, the to-be-processed managed device is allowed to occupy one of the remaining authorized resources of the bastion host.

2. The method according to claim 1, characterized in that After allowing the to-be-processed managed device to occupy one of the remaining authorized resources of the bastion host, the method further includes: The identification information of the managed device to be processed is stored in the device information list to indicate that the managed device to be processed has occupied an authorized resource of the bastion host.

3. The method according to claim 1, characterized in that The device information list stores address information of the managed device, wherein the address information includes at least one of an ipv4 address, an ipv6 address, and an IP address; Before obtaining the identification information of the to-be-processed managed device, the method further includes: Acquire the address information of the managed device to be processed, and match the address information of the managed device to be processed with the address information in the device information list; If there is no address information matching the address information of the managed device to be processed in the device information list, the identification information of the managed device to be processed is obtained.

4. The method according to claim 3, characterized in that The method further comprises: If there is device identification information in the device information list that matches the identification information of the device to be managed, the address information of the device to be managed is stored in the address list corresponding to the identification information of the device to be managed in the device information list, and the device to be managed is not allowed to occupy the remaining authorized resources of the bastion host.

5. The method according to any one of claims 1 to 4, characterized in that: The obtaining of identification information of the to-be-processed managed device includes: Performing a connectivity test on the managed device to be processed, wherein the connectivity test is used to test whether the bastion host can be connected to the managed device to be processed; In the connectivity test process for the managed device to be processed, identification information of the managed device to be processed is obtained by executing a test script, wherein the test script includes a connectivity test script language and a managed device information acquisition language.

6. The method according to claim 5, characterized in that The obtaining the identification information of the to-be-processed managed device by executing the test script includes: Execute the connectivity test script language in the test script to test the connectivity of the managed device to be processed; If the connectivity test of the managed device to be processed passes, the managed device information acquisition language in the test script is executed to obtain the identification information of the managed device to be processed.

7. The method according to claim 6, characterized in that The executing the connectivity test script language in the test script to test the connectivity of the to-be-processed managed device includes: Accessing the managed device to be processed by using the account information of the managed device to be processed by executing the connectivity test script language in the test script; If the managed device to be processed can be accessed successfully, it is determined that the connectivity test of the managed device to be processed has passed.

8. A bastion host identification device for managed devices, characterized in that: include: An acquisition module, used to acquire identification information of a to-be-processed managed device, where the identification information is used to uniquely identify the to-be-processed managed device; An identification module, used to match the identification information of the managed device to be processed with the device identification information in the device information list stored in the bastion host, wherein the device information list stores the identification information of the managed device occupying the authorized resources of the bastion host; The authorization module is used to allow the to-be-processed managed device to occupy one of the remaining authorized resources of the bastion host if there is no device identification information matching the identification information of the to-be-processed managed device in the device information list.

9. An electronic device, comprising: A memory and a processor, wherein the memory stores a computer program, and wherein the processor implements the method for a bastion host to identify a managed device as described in any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, the method for the bastion host to identify the managed device according to any one of claims 1 to 7 is implemented.