A method, system, device and readable storage medium for detecting bare machine resources

Through the combination of encrypted configuration logic mirroring and detection middleware, fast survival state detection of bare metal resources is achieved, solving the problems of delay and pressure in traditional methods, and improving detection efficiency and application.

CN113687836BActive Publication Date: 2025-05-27JINAN INSPUR DATA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110868329.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-30
Publication Date
2025-05-27
Estimated Expiration
2041-07-30

AI Technical Summary

Technical Problem

The prior art has problems of delay and pressure to call cloud platform interfaces in network survival state detection of bare metal resources, and cannot meet the fast and low-pressure detection needs.

Method used

By deploying the mechanism of encrypted configuration logic mirroring, the encrypted bare metal data is passed into the bare metal system, the encrypted bare metal data is packaged into a heartbeat message and reported to the detection middleware, data interaction is carried out in conjunction with the UDP protocol, and bare metal data instance initialization and survival list maintenance are carried out through the detection structure model.

Benefits of technology

It realizes the rapid and direct management of the survival data state of bare metal resources, reduces the pressure on cloud platform interface calls, and improves application and scalability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113687836B_ABST
    Figure CN113687836B_ABST
Patent Text Reader

Abstract

A bare machine resource detection method, system, device and readable storage medium proposed by the present invention. The method includes: by deploying a mechanism for encrypting and configuring logical images, enabling the cloud platform to transfer the encrypted unique ID of the bare machine and corresponding extended information into the bare machine system; packing the encrypted unique ID of the bare machine and corresponding extended information into a heartbeat message by the detection Agent and reporting it to the detection middleware; using the detection middleware to perform decoding and parsing operations on the heartbeat message uploaded by the detection Agent, and initializing the bare machine data instance according to the detection structure model; using the detection middleware to interact with the storage service unit through a driver, and maintaining a bare machine resource survival list according to the initialized bare machine data; providing a cache service for obtaining the bare machine resource survival list. The present invention can quickly and directly manage the survival data status of the resources to be detected, and at the same time will not generate the pressure caused by interface calls to the cloud platform, improving the applicability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of cloud computing, and more particularly to a method, system, device and readable storage medium for detecting bare machine resources. Background Art

[0002] With the rapid development of the cloud computing field, the construction of bare machines that possess the performance of physical servers and cloud elasticity is quietly emerging in the cloud computing field. Among them, the demand for detecting the network survival status of bare machine resources is increasing. On the one hand, it is required to detect the bare machine data resources as fast as possible; on the other hand, it is required that the cloud platform is not under too much pressure during the acquisition process.

[0003] The biggest difference between a bare machine and a virtual machine in cloud computing is that a bare machine is an independent physical server. Usually in a cloud computing environment, the order of magnitude of bare machines is much less than that of cloud hosts, and it is mainly applied to high-performance special business scenarios. In the cloud computing field, to obtain the survival status of bare machine resources, it is usually obtained through the computing-related interfaces of the cloud platform or through active collection and upload by an agent.

[0004] In the traditional cloud computing field, bare machine resource information is usually obtained by calling the authentication module and computing module interfaces of the cloud platform to obtain a resource list. However, this way of obtaining resources requires a large number of calls to multiple computing module interfaces. The computing module interfaces in the cloud platform are core business interfaces, and excessive calls will cause too much pressure on the server. In the traditional acquisition field, for the acquisition of server performance data, most are to deploy an Agent independently and actively upload the data to a time series database. This way can collect detailed performance information such as CPU, memory, disk, and network, but there is a large delay for the demand of resource detection. In addition, after the entity physical server is started, it does not store the unique ID in the cloud platform by default. Therefore, although simple Agent reporting can only meet the requirements of performance information collection, it cannot obtain the unique ID flag and cannot meet the requirements of resource detection; for the bare machines in the cloud platform, more is to obtain the heartbeat information of the unique resources. It can be seen that the existing bare machine resource detection methods cannot meet the actual needs of resource detection. Summary of the Invention

[0005] Aiming at the above problems, the purpose of the present invention is to provide a method, system, device and readable storage medium for detecting bare machine resources, which can quickly and directly manage the survival data status of the resources to be detected, and at the same time will not cause pressure on the cloud platform due to interface calls, improving the applicability.

[0006] To achieve the above object, the present invention is realized through the following technical solutions: A method for detecting bare machine resources, including the following steps:

[0007] S1: Based on the mechanism of deploying the encrypted configuration logic image, the cloud platform transfers the encrypted bare - metal data into the bare - metal system;

[0008] S2: The probing Agent packs the encrypted bare - metal data into heartbeat messages and reports them to the probing middleware;

[0009] S3: The probing middleware decodes and parses the heartbeat messages uploaded by the probing Agent through data interaction with the probing Agent based on the User Datagram Protocol (UDP), and initializes the bare - metal data instance based on the probing structure model;

[0010] S4: The probing middleware interacts with the storage service unit through a driver and maintains the bare - metal resource survival list according to the initialized bare - metal data;

[0011] S5: The storage service unit provides a caching service to external services, and the external services read the bare - metal survival list from the caching service.

[0012] Furthermore, the specific steps of step S1 are as follows:

[0013] The probing Agent program is packaged into the image through a customized image;

[0014] When the bare - metal system is deployed, the encrypted unique ID of the bare - metal, the address of the probing middleware, and the token information are injected into the configuration file of the probing Agent through the configuration driver (ConfigDriver).

[0015] Furthermore, the specific steps of step S2 are as follows:

[0016] After the bare - metal system starts, the probing Agent reads the configuration file, packs the encrypted unique ID of the bare - metal and the corresponding extended information into heartbeat data packets, and performs a timed loop push in a service - accompanied manner; among them, the status of the network card used by the probing Agent is verified before each push, and the push is performed after passing the verification.

[0017] Furthermore, the specific steps of step S3 are as follows:

[0018] The probing middleware receives the heartbeat data packets uploaded by the probing Agent through the UDP communication protocol;

[0019] The probing middleware performs a unique ID decoding operation and a request IP parsing operation on the heartbeat data packets uploaded by the probing Agent, and initializes the data instance according to the IP information, the current timestamp, the bare - metal ID, and other extended information based on the probing structure model.

[0020] Furthermore, the probing structure model includes:

[0021] Bare machine ID item, timestamp item, IP address item, and additional information item;

[0022] The bare machine ID item is used to store the IP address generated by the decoding and parsing operation;

[0023] The timestamp item is used to store the current timestamp generated by the decoding and parsing operation;

[0024] The IP address item is used to store the IP address generated by the decoding and parsing operation;

[0025] The additional information item adopts an open key-value pair serialized data structure and is used to store the CPU usage rate, memory usage rate, and system disk utilization rate in other extended information.

[0026] Furthermore, step S4 further includes:

[0027] The storage service unit stores the bare machine ID and other extended information in the form of key-value pairs.

[0028] Furthermore, step S5 further includes:

[0029] The storage service unit adopts a resource unique comparison mechanism to maintain the current resource list and the historical resource list; if there are differences between the resources sent by the detection middleware and the current resource list, the information of the non-existent resources will be automatically migrated to the historical resource library, and the historical resource list will be updated.

[0030] Correspondingly, the present invention also discloses a bare machine resource detection system, including:

[0031] The deployment unit is used to deploy the mechanism of the encrypted configuration logic mirror, so that the cloud platform transfers the encrypted bare machine data into the bare machine system;

[0032] The detection Agent is used to package the encrypted bare machine data into heartbeat messages and report them to the detection middleware;

[0033] The detection middleware is used to perform decoding and parsing operations on the heartbeat messages uploaded by the detection Agent through data interaction with the detection Agent, and initialize the bare machine data instance according to the detection structure model; it is also used to interact with the storage service unit through the driver and maintain the bare machine resource survival list according to the initialized bare machine data;

[0034] The storage service unit is used to provide cache services for the bare machine resource survival list to external services.

[0035] Furthermore, the deployment unit is specifically used for:

[0036] Packaging the detection Agent program into the image through a customized image;

[0037] When deploying a bare-metal system, the encryption unique ID of the bare metal, the address of the detection middleware, and the token information are injected into the configuration file of the image detection Agent through ConfigDriver.

[0038] Furthermore, the detection Agent is specifically used for:

[0039] After the bare-metal system starts up, it reads the configuration file, packs the encryption unique ID of the bare metal and the corresponding extended information into a heartbeat data packet, and sends the heartbeat data packet to the detection middleware through a service-accompanying timed loop push. Before each sending, a network card status check is performed to reduce the invalid operation of continuously attempting to send packets when the network card status used by the detection Agent is not working.

[0040] Furthermore, the detection middleware is specifically used for:

[0041] As a UDP server, it receives the data from the Agent through the communication protocol, performs a unique ID decoding operation, requests an IP resolution operation, and assembles the data according to the current timestamp;

[0042] Performs a local recording function of specified historical data according to the storage period;

[0043] Maintains a list of live bare-metal resources, and instantiates the bare-metal resource data according to the detection structure model;

[0044] The detection middleware and the storage service unit have a readable and writable relationship and have a unique writable function.

[0045] Furthermore, the storage service unit is specifically used for:

[0046] Provides a caching service for other external services to obtain the current list of live bare-metal resources, has a unique resource comparison mechanism, and is responsible for maintaining the current list of live resources and the historical resource record list.

[0047] Correspondingly, the present invention discloses a bare-metal resource detection device, including:

[0048] A memory for storing a bare-metal resource detection program;

[0049] A processor for implementing the steps of the bare-metal resource detection method as described in any one of the above when executing the bare-metal resource detection program.

[0050] Correspondingly, the present invention discloses a readable storage medium, on which a bare-metal resource detection program is stored, and when the bare-metal resource detection program is executed by a processor, the steps of the bare-metal resource detection method as described in any one of the above are implemented.

[0051] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0052] 1. The present invention defines a detection structure model for realizing bare - metal network liveness detection. As a centralized unified instantiated structure model, it is convenient for unified maintenance and display. The detection structure model includes a bare - metal ID, a timestamp, an IP address, and additional information. The additional information structure is an open key - value pair serialized data, which may include CPU usage rate, memory usage rate, and system disk utilization rate. Among them, the unique ID encoding, timestamp, and IP address are structural representations of the uniqueness of resources in the network. The other additional information can be used as an extended slot for resource performance information, facilitating customized installation according to requirements. The abstracted structure is convenient for extension and maintenance.

[0053] 2. The present invention deploys a mechanism for encrypting and configuring logical images to transfer the encrypted unique ID to the bare - metal system. Specifically, the method of encrypting first and then injecting is adopted. The customized image has already packaged the detection Agent program into the base image. When the bare - metal system is deployed, the computing module of the cloud platform will inject the encrypted unique ID of the bare - metal, the address of the detection middleware, and token information into the configuration file of the image detection Agent through the ConfigDriver. After the system starts running, the detection Agent can read the configuration file to obtain the encrypted unique ID of the bare - metal and perform service - accompanied timed loop push. Before each data transmission, the network card status will be verified to prevent invalid reporting when the network card communication is abnormal.

[0054] 3. The present invention realizes the management of the liveness data of detected resources through an active direct - connection heartbeat sending mechanism. There is UDP - protocol data interaction between the detection middleware and the detection Agent. The detection middleware mainly decodes the unique ID of the heartbeat information received from the detection Agent and then instantiates and assembles the data into a model structure. It has the function of locally recording specified historical data according to the storage period. The detection middleware is responsible for maintaining the liveness list of bare - metal resources and has the function of writing uniquely to the storage service, improving the security of operations. The storage service serves as a cache service for other external services to obtain the current liveness list of bare - metal resources. It has a resource uniqueness comparison mechanism and is responsible for maintaining the current resource liveness list and the historical resource record list.

[0055] 4. The present invention solves the detection delay problem caused by using an agent to obtain performance information and judge resource liveness in traditional monitoring, and the problem of excessive pressure on the cloud platform when only using the cloud - platform interface to obtain information. It realizes a data model structure design for detecting the network liveness status of bare - metal resources, a method for the cloud platform to transfer the encrypted unique ID to the internal of the bare - metal system, and an active direct - connection heartbeat sending mechanism. It can manage the liveness data status of detected resources more simply, more quickly, more directly, and more conveniently, and at the same time will not cause pressure on the cloud platform due to interface calls, improving the applicability.

[0056] Thus, compared with the prior art, the present invention has prominent substantive features and remarkable progress, and the beneficial effects of its implementation are also obvious. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained according to the provided drawings.

[0058] Attached Figure 1 is the flowchart of the method of the present invention;

[0059] Attached Figure 2 is the system structure diagram of the present invention.

[0060] In the figure, 1 is the deployment unit; 2 is the detection Agent; 3 is the detection middleware; 4 is the storage service unit. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0061] In order to enable those skilled in the art to better understand the solution of the present invention, the following will further describe the present invention in detail with reference to the drawings and specific embodiments. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of them. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present invention.

[0062] Embodiment 1:

[0063] As Figure 1 shown, this embodiment provides a method for detecting bare machine resources, including the following steps:

[0064] S1: By deploying the mechanism of encrypting and configuring the logical image, the cloud platform transfers the encrypted bare machine data into the bare machine system.

[0065] This step is specifically: Pack the detection Agent program into the image through a customized image; when deploying the bare machine system, inject the encrypted unique ID of the bare machine, the address of the detection middleware, and the token information into the configuration file of the detection Agent through ConfigDriver.

[0066] This step designs a method for the cloud platform to transfer the encrypted unique ID into the bare-metal system. It is mainly a way to encrypt and configure the bare-metal image. Among them, encryption mainly means that the unique ID information is the data to be encrypted and serialized, which is generated and encrypted by the cloud platform and directly used by the detection Agent. Among them, configuring the bare-metal image mainly means that the configuration file required by the detection Agent is injected into the system image during the deployment and installation of the bare-metal system. The basic system image needs to package the executable program of the detection Agent in advance. During system deployment, it will trigger secondary image encapsulation, and inject the encrypted ID configuration generated by the cloud platform and other access authentication information (middleware address and access token) into the system image. Usually, the ConfigDriver scheme is used for injection. In this way, after the system deployment is completed and started, the monitoring Agent reads the encrypted and serialized unique ID configuration item of the configuration file, and actively reports it and other information, ensuring that the data packet is small enough.

[0067] S2: The detection Agent packs the encrypted bare-metal data into a heartbeat message and reports it to the detection middleware.

[0068] Specifically, in this step: after the bare-metal system starts, the detection Agent reads the configuration file, packs the encrypted unique ID of the bare-metal and other extended information into a heartbeat data packet, and performs a service-accompanying timed loop push; among them, the network card status is verified before each push, and the push is performed after the verification passes.

[0069] S3: The detection middleware uses the UDP-based communication protocol with the detection Agent to perform data interaction, decodes and parses the heartbeat message uploaded by the detection Agent, and initializes the bare-metal data instance according to the detection structure model.

[0070] First, the detection middleware receives the heartbeat information including the unique encoding information uploaded by the detection Agent through the UDP communication protocol. Then, the detection middleware performs a unique ID decoding operation and an IP resolution operation on the heartbeat message uploaded by the detection Agent, and initializes the data instance according to the detection structure model with the IP information, the current timestamp, the encrypted unique ID of the bare-metal sent by the detection Agent, and other extended information.

[0071] Among them, the detection structure model is a pre-defined structure model for implementing bare-metal network survival detection and serving as a centralized unified instantiation. It includes: bare-metal ID, timestamp, IP address, and additional information; the additional information adopts an open key-value pair serialization data structure, including CPU usage rate, memory usage rate, system disk utilization rate, etc. The key names must be readable, and the specific serialization metrics can be customized by the detection Agent according to specific requirements. In this way, a monitoring information structure for bare-metal resources is abstracted, which facilitates centralized and unified management of data collection information and has greater flexibility, usability, and scalability.

[0072] S4: Use the detection middleware to interact with the storage service unit through the driver, and maintain the bare-metal resource survival list according to the bare-metal data initialized by the instance. This step also includes: the storage service unit stores the encrypted unique ID of the bare metal and the corresponding extended information in the form of key-value pairs.

[0073] S5: Provide a caching service for the bare-metal resource survival list to external services through the storage service unit. The storage service unit adopts a resource unique comparison mechanism to maintain the current resource list and the historical resource list; if there are differences between the resources sent by the detection middleware and the current resource list, the information of the non-existent resources is automatically migrated to the historical resource library, and the historical resource list is updated.

[0074] The above steps S2 - S5 implement an active direct - connection heartbeat sending mechanism for bare - metal resource detection. It includes a detection middleware, a detection Agent (deployed on bare - metal nodes), and a storage service. The detection Agent will finally send the encrypted bare - metal ID and other extended information to the cache service. When sending data each time, the detection Agent will read the network card status for network card status verification, and only after passing the verification will it push the heartbeat data. The detection Agent and the detection middleware interact through a communication protocol. The detection middleware is mainly responsible for decrypting the encrypted unique ID code uploaded by the detection Agent according to the agreement and maintaining a list of bare - metal resource IDs. The detection middleware has a detection structure model of bare - metal resources for data instance initialization, resolves the IP of the client sending data, and initializes data instances based on the detection structure model with IP information, the current timestamp, the unique ID sent simultaneously with the Agent, and extended fields, forming a data instance structure with readability, clarity, and analyzability. The detection middleware has the function of locally caching historical resource data and can save the data uploaded by each Agent for a default period. The detection middleware and the storage database interact through a driver. The storage service mainly serves as a cache read - out effect and stores the unique encoded ID of the detection Agent and other data in a key - value pair manner. The storage service does not maintain historical detection data records, is responsible for maintaining the current resource list and historical resource list of the current latest bare - metal ID and its information, and has a resource uniqueness comparison mechanism. Once the resources sent by the detection middleware are different from the current resource list, it will automatically migrate the information of the non - existent resources to the historical resource library, facilitating quick read - access by other modules. In this way, other front - end services can quickly read the current latest status of the bare - metal resource list from the cache service. Without storing too much other historical data, they can clearly obtain the current network survival status of the latest bare - metal resources.

[0075] This embodiment provides a method for detecting bare - metal resources. By designing a data model structure for bare - metal data collection and a method for the cloud platform to transmit encrypted unique IDs to the internal bare - metal system, using an active direct - connection heartbeat sending mechanism, it reduces the call volume of cloud - platform interfaces, reduces the pressure on the server, has better applicability and scalability, and facilitates the detection of bare - metal resources.

[0076] Embodiment Two:

[0077] Based on Embodiment One, this embodiment also provides a method for detecting bare - metal resources, including:

[0078] 1. The detection Agent actively reports heartbeat information. First, the customized image has already packaged the detection Agent program into the image. Second, when deploying the bare-metal system, the encryption unique ID of the bare metal, the address of the detection middleware, and the token information are injected into the configuration file of the image detection Agent through the ConfigDriver. After the system starts, the detection Agent can read the configuration file, package the encryption unique ID of the bare metal and other extended information into a heartbeat data packet, and perform a timed loop push in a service-attended manner. Before each transmission, a network card status check is performed to reduce invalid operations of continuously attempting to send packets when the network card status is unavailable.

[0079] 2. The detection middleware and the detection Agent perform data interaction based on the UDP communication protocol. Among them, the detection Agent is the UDP client, mainly providing the unique encoding information. The detection middleware is the UDP server, which can receive the data from the Agent through the communication protocol, perform the unique ID decoding operation, request the IP parsing operation, and assemble the data according to the current timestamp. It has the function of locally recording the specified historical data according to the storage period.

[0080] 3. The detection middleware is responsible for maintaining the list of live bare-metal resources, instantiating the bare-metal resource data according to the model structure. The model instance includes the bare-metal ID, timestamp, IP address, additional information, and other information structures are open key-value pair serialized data, which can include customized information such as CPU usage, memory usage, and system disk utilization.

[0081] 4. The detection middleware and the storage service have a readable and writable relationship and have a unique writable function. Other services can only read the storage service. The storage service provides a caching service, maintains the current network live resource list and the historical resource list, and does not have the function of storing the historical heartbeat records of the same resource. It simply and conveniently provides the function for external services to obtain the current list of live bare-metal resources.

[0082] Embodiment 3:

[0083] Based on Embodiment 1, as Figure 2 shown, the present invention also discloses a bare-metal resource detection system, including: a deployment unit 1, a detection Agent 2, a detection middleware 3, and a storage service unit 4.

[0084] The deployment unit 1 is used to deploy the mechanism of the encrypted configuration logic image, so that the cloud platform transfers the encrypted bare-metal data into the bare-metal system. The deployment unit 1 is specifically used for: packaging the detection Agent program into the image through a customized image; injecting the encryption unique ID of the bare metal, the address of the detection middleware, and the token information into the configuration file of the image detection Agent through the ConfigDriver when deploying the bare-metal system.

[0085] The detection Agent 2 is used to package the encrypted bare-metal data into heartbeat messages and report them to the detection middleware. Specifically, the detection Agent 2 is used to: after the bare-metal system starts, read the configuration file, package the encrypted unique ID and other extended information of the bare metal into a heartbeat data packet, and send the heartbeat data packet to the detection middleware through a service-accompanying timed loop push. Before each sending, a network card status check will be performed to reduce invalid operations of continuously attempting to send packets when the network card status is not connected.

[0086] The detection middleware 3 is used to perform data interaction with the detection Agent based on the UDP communication protocol, decode and analyze the heartbeat messages uploaded by the detection Agent, and initialize the bare-metal data instance according to the detection structure model; it is also used to interact with the storage service unit through a driver and maintain the bare-metal resource survival list according to the initialized bare-metal data. Specifically, the detection middleware 3 is used to: receive the Agent's data through the communication protocol as a UDP server and perform a unique ID decoding operation, request an IP parsing operation, and assemble the data according to the current timestamp; perform a local recording function of specified historical data according to the storage period; maintain the bare-metal resource survival list and instantiate the bare-metal resource data according to the detection structure model; the detection middleware and the storage service unit have a readable and writable relationship and have a unique writable function.

[0087] The storage service unit 4 is used to provide a caching service for the bare-metal resource survival list to external services. Specifically, the storage service unit 4 is used to: provide a caching service for other external services to obtain the current bare-metal resource survival list, have a resource unique comparison mechanism, and be responsible for maintaining the current resource survival list and the historical resource record list.

[0088] Embodiment 4:

[0089] This embodiment discloses a bare-metal resource detection device, including a processor and a memory; wherein, when the processor executes the bare-metal resource detection program saved in the memory, the following steps are implemented:

[0090] 1. By deploying the mechanism of encrypting and configuring the logical image, the cloud platform transfers the encrypted unique ID and corresponding extended information of the bare metal into the bare-metal system.

[0091] 2. The detection Agent packages the encrypted unique ID and corresponding extended information of the bare metal into heartbeat messages and reports them to the detection middleware.

[0092] 3. The detection middleware uses the UDP-based communication protocol to interact with the detection Agent, decodes and analyzes the heartbeat messages uploaded by the detection Agent, and initializes the bare-metal data instance according to the detection structure model.

[0093] 4. Use the detection middleware to interact with the storage service unit through the driver, and maintain the bare metal resource survival list according to the bare metal data initialized by the instance.

[0094] 5. Provide a caching service for obtaining the bare metal resource survival list to external services through the storage service unit.

[0095] Furthermore, the bare metal resource detection device in this embodiment may further include:

[0096] An input interface, which is used to obtain the bare metal resource detection program imported from the outside world, save the obtained bare metal resource detection program to the memory, and can also be used to obtain various instructions and parameters transmitted by external terminal devices and transmit them to the processor, so that the processor can use the above various instructions and parameters to perform corresponding processing. In this embodiment, the input interface may specifically include, but is not limited to, a USB interface, a serial interface, a voice input interface, a fingerprint input interface, a hard disk reading interface, etc.

[0097] An output interface, which is used to output various data generated by the processor to the terminal device connected thereto, so that other terminal devices connected to the output interface can obtain various data generated by the processor. In this embodiment, the output interface may specifically include, but is not limited to, a USB interface, a serial interface, etc.

[0098] A communication unit, which is used to establish a remote communication connection between the bare metal resource detection device and an external server, so that the bare metal resource detection device can mount the image file to the external server. In this embodiment, the communication unit may specifically include, but is not limited to, a remote communication unit based on wireless communication technology or wired communication technology.

[0099] A keyboard, which is used to obtain various parameter data or instructions input by the user by tapping the keycaps in real time.

[0100] A display, which is used to display the relevant information of the server power supply line short circuit location process in real time.

[0101] A mouse, which can be used to assist the user in inputting data and simplify the user's operations.

[0102] Embodiment Five:

[0103] This embodiment also discloses a readable storage medium. The readable storage medium mentioned here includes a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable hard disk, a CD-ROM, or any other form of storage medium well-known in the technical field. The readable storage medium stores a bare metal resource detection program, and when the bare metal resource detection program is executed by a processor, the following steps are implemented:

[0104] 1. By deploying a mechanism for encrypting and configuring logical images, the cloud platform transfers the encryption unique ID of the bare machine and the corresponding extended information into the bare machine system.

[0105] 2. The probing Agent packs the encryption unique ID of the bare machine and the corresponding extended information into a heartbeat message and reports it to the probing middleware.

[0106] 3. The probing middleware uses the UDP-based communication protocol with the probing Agent to perform data interaction, decodes and parses the heartbeat message uploaded by the probing Agent, and initializes the bare machine data instance according to the probing structure model.

[0107] 4. The probing middleware interacts with the storage service unit through a driver and maintains a list of live bare machine resources based on the initialized bare machine data.

[0108] 5. The storage service unit provides a caching service for external services to obtain the list of live bare machine resources.

[0109] In summary, the present invention can quickly and directly manage the live data status of resources that need to be probed, and at the same time, it does not generate pressure on the cloud platform caused by interface calls, improving the applicability.

[0110] In the present specification, the various embodiments are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other. For the methods disclosed in the embodiments, since they correspond to the systems disclosed in the embodiments, the description is relatively simple. For the relevant parts, reference can be made to the description in the method part.

[0111] Those skilled in the art can further realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the components and steps of the examples have been generally described according to their functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.

[0112] In several embodiments provided by the present invention, it should be understood that the disclosed systems, systems and methods can be implemented in other ways. For example, the system embodiments described above are merely illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces. The indirect couplings or communication connections of the systems or units can be in electrical, mechanical or other forms.

[0113] The units described as separate components may or may not be physically separated. The components shown as units may or may not be physical units, that is, they may be located in one place, or they may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0114] In addition, in each embodiment of the present invention, the various functional modules can be integrated in a processing unit, or each module can exist physically alone, or two or more modules can be integrated in a unit.

[0115] Similarly, in each embodiment of the present invention, the various processing units can be integrated in a functional module, or each processing unit can exist physically, or two or more processing units can be integrated in a functional module.

[0116] The steps of the methods or algorithms described in combination with the embodiments disclosed herein can be directly implemented by hardware, software modules executed by a processor, or a combination of both. The software module can be placed in a random access memory (RAM), memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium well-known in the technical field.

[0117] Finally, it should also be noted that in this text, 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 actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising the said element.

[0118] The above has introduced in detail the bare machine resource detection method, system, device and readable storage medium provided by the present invention. Specific examples are used in this text to elaborate on the principle and implementation manner of the present invention. The description of the above embodiments is only used to help understand the method and its core idea of the present invention. It should be pointed out that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the protection scope of the claims of the present invention.

Claims

1. A bare - machine resource detection method, characterized in that, it includes the following steps: Based on the mechanism of deploying an encrypted configuration - based logical image, the cloud platform transfers encrypted bare - machine data into the bare - machine system; The detection Agent packs the encrypted bare - machine data into heartbeat messages and reports them to the detection middleware; after the bare - machine system starts, the detection Agent reads the configuration file, packs the encrypted unique ID of the bare - machine and the corresponding extended information into heartbeat data packets, and performs timed loop pushing; The detection middleware decodes and parses the heartbeat messages uploaded by the detection Agent through data interaction with the detection Agent, and initializes the bare - machine data instance based on the detection structure model; The detection middleware interacts with the storage service unit and maintains a bare - machine resource survival list according to the initialized bare - machine data; The storage service unit provides a caching service to external services, and the external services read the bare - machine resource survival list from the caching service; The mechanism of deploying an encrypted configuration - based logical image, by which the cloud platform transfers encrypted bare - machine data into the bare - machine system, specifically is: The detection Agent program is packed into the image through a customized image; When the bare - machine system is deployed, the encrypted unique ID of the bare - machine, the address of the detection middleware, and the token information are injected into the configuration file of the detection Agent through a configuration driver; The detection middleware decodes and parses the heartbeat messages uploaded by the detection Agent through data interaction with the detection Agent, and initializes the bare - machine data instance based on the detection structure model, specifically is: The detection middleware receives the heartbeat data packets uploaded by the detection Agent through the User Datagram Protocol; The detection middleware performs a unique ID decoding operation and a request IP address parsing operation on the heartbeat data packets uploaded by the detection Agent, and initializes the data instance according to the detection structure model with the generated IP address, the current timestamp, the bare - machine ID, and other extended information; The detection structure model includes: A bare - machine ID item, a timestamp item, an IP address item, and an additional information item; The bare - machine ID item is used to store the IP address generated by the decoding and parsing operation; The timestamp item is used to store the current timestamp generated by the decoding and parsing operation; The IP address item is used to store the IP address generated by the decoding and parsing operation; The additional information item adopts an open key - value pair serialized data structure and is used to store the CPU usage rate, memory usage rate, and system disk utilization rate in other extended information.

2. The bare - machine resource detection method according to claim 1, characterized in that, the detection Agent packs the encrypted bare - machine data into heartbeat messages and reports them to the detection middleware, specifically is: Before each push, the status of the network card used by the detection Agent is verified, and the push is performed after the verification passes.

3. The bare - machine resource detection method according to claim 1, characterized in that, the detection middleware interacts with the storage service unit and maintains a bare - machine resource survival list according to the initialized bare - machine data, and further includes: The storage service unit stores the bare - machine ID and other extended information in the form of key - value pairs.

4. The bare - machine resource detection method according to claim 3, It is characterized in that: The cache service is provided to an external service by the storage service unit, and the external service reads the bare machine resource survival list from the cache service, and further includes: The storage service unit adopts a resource unique comparison mechanism to maintain the current resource list and the historical resource list; If there are differences between the resources sent by the detection middleware and the current resource list, the information of the non-existent resources is automatically migrated to the historical resource library, and the historical resource list is updated.

5. A bare machine resource detection system It is characterized in that It includes: A deployment unit, used to deploy the mechanism of encrypting and configuring the logical image, so that the cloud platform transfers the encrypted bare machine data into the bare machine system; A detection Agent, used to package the encrypted bare machine data into a heartbeat message and report it to the detection middleware; the detection Agent is also used to, after the bare machine system starts, read the configuration file to package the encrypted unique ID of the bare machine and the corresponding extended information into a heartbeat data packet, and perform timed loop push; A detection middleware, used to perform decoding and parsing operations on the heartbeat message uploaded by the detection Agent through data interaction with the detection Agent, and initialize the bare machine data instance according to the detection structure model; It is also used to interact with the storage service unit through a driver, and maintain the bare machine resource survival list according to the initialized bare machine data; A storage service unit, used to provide a cache service for the bare machine resource survival list to an external service; The deployment unit is specifically used for: Packaging the detection Agent program into the image through a customized image; Injecting the encrypted unique ID of the bare machine, the address of the detection middleware and the token information into the configuration file of the detection Agent through the configuration driver during the deployment of the bare machine system; The detection middleware is specifically used for: Receiving the heartbeat data packet uploaded by the detection Agent through the User Datagram Protocol; Performing a unique ID decoding operation on the heartbeat data packet uploaded by the detection Agent, requesting an IP address resolution operation, and initializing the data instance according to the detection structure model with the generated IP address, the current timestamp, the bare machine ID and other extended information; The detection structure model includes: A bare machine ID item, a timestamp item, an IP address item and an additional information item; The bare machine ID item is used to store the IP address generated by the decoding and parsing operation; The timestamp item is used to store the current timestamp generated by the decoding and parsing operation; The IP address item is used to store the IP address generated by the decoding and parsing operation; The additional information item adopts an open key-value pair serialized data structure and is used to store the CPU usage rate, memory usage rate and system disk utilization rate in other extended information.

6. A bare machine resource detection device It is characterized in that It includes: A memory, used to store the bare machine resource detection program; A processor, used to implement the steps of the bare machine resource detection method described in any one of claims 1 to 4 when executing the bare machine resource detection program.

7. A readable storage medium It is characterized in that: The readable storage medium stores a bare machine resource detection program, and when the bare machine resource detection program is executed by a processor, it implements the steps of the bare machine resource detection method described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • IP address configuration method, cloud server, cloud platform and readable storage medium

    CN108347472A

  • Naked machine data acquisition method, device and equipment and readable storage medium

    CN111880996A