A Closed-Loop Inspection Method and System for IT Equipment
By employing technologies such as dynamic hardware fingerprint decryption, structured knowledge base, and high-risk command interception, the problems of credential leakage and high missed detection rates in IT equipment inspection have been solved, achieving secure compliance and lightweight deployment, and reducing the missed detection rate.
Patent Information
- Application Number
- CN202611337359.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-31
- Publication Date
- 2026-11-17
AI Technical Summary
Existing IT equipment inspection solutions have issues such as the risk of credential leakage, high rate of missed inspections, inability to adapt to isolated network environments, and failure to meet the compliance requirements for sensitive data.
By employing hardware fingerprint dynamic decryption, structured local knowledge base matching, high-risk command interception, encrypted data collection, and compensatory data collection, we can achieve secure risk control and lightweight deployment, thereby reducing the false negative rate.
By dynamically decrypting keys to protect credentials, generating appropriate inspection scripts, intercepting high-risk operations, monitoring and compensating for data collection, reducing the missed detection rate, and meeting security and compliance requirements.
Smart Images

Figure CN123122843A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of automated operation and maintenance technology, and more specifically, to a closed-loop inspection method and system for IT equipment. Background Technology
[0002] In the field of information technology, enterprise-level data centers typically deploy a large number of heterogeneous IT devices, including servers, network equipment, and storage devices. To ensure the stable operation of these devices, maintenance personnel need to conduct regular inspections to collect data on system performance status, hardware health indicators, and service availability. However, in traditional inspection processes, device access credentials are often stored in plaintext in script files or central databases, posing a security risk of being obtained and misused by unauthorized personnel. Furthermore, due to the large scale of data center equipment and the complex network environment, network jitter and protocol compatibility issues often lead to some devices not being successfully collected during inspections, resulting in missed inspections and affecting the integrity of maintenance decisions.
[0003] To address the aforementioned technical challenges, two main technical solutions are employed: one is a commercial integrated operation and maintenance platform solution, deployed independently using a B / S architecture, relying on database clusters and cloud service capabilities. Inspection tasks are distributed via a centralized server, scripts and device access credentials are centrally stored in a central database, and inspection data is transmitted back to the platform for analysis via the network. The other is an open-source script-based inspection solution, which uses Shell or Python scripts to write fixed inspection logic and execute inspection commands in batches, relying on manual triggering and report compilation. Both solutions attempt to improve inspection efficiency and reduce labor costs through centralized management or script automation.
[0004] However, the aforementioned technical solutions still have the following drawbacks: Commercial integrated operation and maintenance platform solutions rely on independent servers and database clusters, resulting in long deployment cycles and inability to adapt to isolated network environments. Furthermore, centralized storage of credentials in a central database poses a risk of leakage, and the return of inspection data to the central platform fails to meet compliance requirements regarding the prevention of sensitive data leakage. Open-source script-based inspection solutions, on the other hand, store device account passwords in plaintext within the scripts. During batch execution, they lack a high-risk command interception mechanism, easily leading to device misoperation or downtime. Moreover, the lack of a unified mechanism for reconciling missed inspections and self-healing results in a persistently high missed inspection rate. These issues make it difficult for existing inspection solutions to simultaneously meet the comprehensive requirements of security risk control, lightweight deployment, low missed inspection rate, and localized compliance. Summary of the Invention
[0005] The purpose of this application is to provide a closed-loop inspection method and system for IT equipment, which aims to achieve the effects of security risk control and lightweight deployment by using dynamic hardware fingerprint decryption, local knowledge base matching, high-risk command interception, encrypted collection and compensation collection, thereby reducing the missed detection rate.
[0006] This application provides a closed-loop inspection method for IT equipment, including: Receive inspection tasks and verify the inspection tasks and operation permissions. After the verification is successful, activate the inspection task. The inspection task includes a list of target IT devices and the device attributes of the target IT devices. Extract the hardware fingerprint of the local operation and maintenance terminal, and generate a dynamic decryption key based on the hardware fingerprint; The device access credentials corresponding to the target IT device are decrypted using a dynamic decryption key, and the device access credentials are stored in temporary memory. Based on the device attributes of the target IT equipment and the structured local knowledge base, an inspection script is generated, and the inspection script is verified for high-risk operations through a high-risk command feature library to intercept operations that hit high-risk commands. If the high-risk operation verification is passed, the target IT device is connected via an encrypted channel and the inspection script is executed to obtain structured inspection data. Monitor the inspection and data collection status of target IT equipment, mark abnormal equipment based on the inspection and data collection status, and perform compensatory data collection processing on abnormal equipment to obtain complete inspection data; An inspection report is generated based on complete inspection data, and the structured local knowledge base is updated based on the complete inspection data.
[0007] Preferably, the inspection task and operation permission are verified, including: Perform structural integrity verification on the inspection task to confirm whether the data structure of the inspection task conforms to the preset specifications. The operator token is compared with the locally stored whitelist of active tokens to verify the operator's identity and permissions. After identity verification is successful, an authorization query request is generated based on the operator token and the target IT device list, and the authorization query request is authenticated and verified using an external authentication server.
[0008] Preferably, the hardware fingerprint of the local operation and maintenance terminal is extracted, and a dynamic decryption key is generated based on the hardware fingerprint, including: A hardware fingerprint is generated based on the CPU serial number and hard disk serial number of the maintenance terminal; The hardware fingerprint is calculated using a hash algorithm to obtain the first hash value, and a dynamic decryption key is generated based on the first hash value using a key derivation function. The closed-loop inspection method for IT equipment also includes: After the inspection task is completed, perform a full zero overwrite operation on the device access credentials stored in the temporary memory and release the temporary memory.
[0009] Preferably, the structured local knowledge base includes a metadata index library and a script fragment library; Based on the target IT equipment's device attributes and a structured local knowledge base, an inspection script is generated, including: Based on the device attributes of the target IT device, obtain the device manufacturer, device model, and operating system type of the target IT device; Retrieve the script fragment identifier corresponding to the target IT device from the metadata index based on the device manufacturer, device model, and operating system type; The script fragment corresponding to the target IT device is obtained from the script fragment library based on the script fragment identifier, and the script fragments are assembled to obtain the inspection script.
[0010] Preferably, the inspection script is verified for high-risk operations using a high-risk command feature library, including: The inspection script is parsed using an abstract syntax tree to obtain action nodes and parameter nodes; The action node is matched with the destructive command rules in the high-risk command feature library. If a match is found, the inspection script is determined to be a high-risk operation and is intercepted. Perform a regular expression scan on the parameter node to detect whether the parameter node contains at least one of the following: wildcard forced deletion, recursive formatting, or kernel reboot parameters; If the action node is not hit and the parameter node scan is not detected, the high-risk operation verification of the inspection script is deemed to have passed.
[0011] Preferably, an encrypted channel is used to connect to the target IT device and execute the inspection script to obtain structured inspection data, including: Based on the device type of the target IT device, establish an encrypted channel corresponding to the target IT device. The encrypted channel includes SSH channel, BMC / IPMI channel, HTTPS channel and REST API channel. Based on the preset concurrency limit, the target IT devices are grouped and connected concurrently using a non-blocking I / O thread pool; Send instructions from the inspection script in the encrypted channel and receive the returned unstructured text data; Using preset regular expression extraction rules, key fields are extracted from unstructured text data, and the key fields are encapsulated into structured inspection data in a preset format.
[0012] Preferably, the monitoring of the inspection and data collection status of the target IT equipment, and the marking of abnormal data collection equipment based on the inspection and data collection status, includes: An execution status tracking table is established based on the target IT equipment list. The execution status tracking table is indexed by the network address of the target IT equipment and stores the communication connection status, heartbeat response status, inspection data integrity, and execution progress of the inspection script of the target IT equipment. Monitor the heartbeat response status, communication connection status, and inspection data integrity of the target IT equipment; If the target IT device experiences a heartbeat response timeout, communication connection anomaly, or lacks preset key data during inspection, the target IT device will be marked as a data collection anomaly device.
[0013] Preferably, the abnormal data acquisition equipment is subjected to compensatory data acquisition processing to obtain complete inspection data, including: Get the current number of compensated data collection attempts for the abnormal data collection device; The compensation collection waiting time is determined based on the current number of compensation collections, and an encrypted channel is re-established with the abnormal collection device after the compensation collection waiting time ends. If the encrypted channel is successfully re-established, determine the incomplete scripts in the inspection scripts corresponding to the abnormal acquisition devices based on the execution status tracking table; Execute the incomplete script to obtain supplementary data, and generate complete inspection data based on the supplementary data and the structured inspection data corresponding to the abnormal acquisition equipment; The compensation collection waiting time increases exponentially with the current number of compensation collections, and the compensation collection process terminates after reaching the preset maximum number of compensation collections.
[0014] Preferably, an inspection report is generated based on complete inspection data, and the structured local knowledge base is updated according to the complete inspection data, including: An inspection report is generated based on complete inspection data, and the complete inspection data is synchronously updated to the local asset ledger. The inspection report includes asset information, operating indicators, and suggestions for handling anomalies. Extract the newly added script fragments and their corresponding exception handling solutions from the complete inspection data, and store the newly added script fragments and exception handling solutions in a structured local knowledge base.
[0015] This application also provides an IT equipment closed-loop inspection system for performing an IT equipment closed-loop inspection method, including: The task access module is configured to receive inspection tasks, verify the inspection tasks and operation permissions, and activate the inspection tasks after the verification is successful. The inspection tasks include a list of target IT devices and the device attributes of the target IT devices. The security encryption module is configured to: extract the hardware fingerprint of the local operation and maintenance terminal, generate a dynamic decryption key based on the hardware fingerprint; and use the dynamic decryption key to decrypt the device access credential corresponding to the target IT device, and store the device access credential in temporary memory; The script generation module is configured to generate inspection scripts based on the device attributes of the target IT device and a structured local knowledge base, and to perform high-risk operation verification on the inspection scripts through a high-risk command feature library in order to intercept operations that hit high-risk commands. The script execution module is configured to: connect to the target IT device via an encrypted channel and execute the inspection script to obtain structured inspection data when the high-risk operation verification passes. The missed detection self-healing module is configured to: monitor the inspection and collection status of the target IT equipment, mark the abnormal collection equipment according to the inspection and collection status, and perform compensation collection processing on the abnormal collection equipment to obtain complete inspection data; The closed-loop processing module is configured to generate an inspection report based on complete inspection data and update the structured local knowledge base based on the complete inspection data.
[0016] Compared with the prior art, the beneficial effects of this application are as follows: This application employs a dynamic decryption mechanism based on hardware fingerprints for device access credentials. Decryption keys are generated only temporarily when an inspection task is activated, and the decrypted credentials are stored only in temporary memory and immediately deleted after the task is completed. This fundamentally avoids the risk of leakage caused by plaintext credential storage and meets the compliance requirements for local storage of sensitive data. For heterogeneous IT devices from different manufacturers and models, adaptive inspection scripts are dynamically generated based on a structured local knowledge base, eliminating the need for manually writing fixed logic and significantly reducing operation and maintenance configuration costs. Furthermore, the inspection scripts are pre-verified and intercepted using a high-risk command signature database, effectively preventing production safety accidents caused by misoperation. This application does not rely on a central server and database cluster, and can be directly deployed on local operation and maintenance terminals. It is compatible with isolated network environments, and its deployment is lightweight and highly flexible. In addition, by tracking the inspection and collection status throughout the process and combining it with an exponential backoff mechanism to compensate for abnormal collection from devices, it can significantly reduce the missed detection rate, ensure the integrity of inspection data, and ultimately update the local knowledge base through inspection data to form a closed-loop optimization, continuously improving the adaptability and accuracy of inspections. It can simultaneously meet the comprehensive requirements of enterprise data centers for security risk control, lightweight deployment, low missed detection rate, and compliance. Attached Figure Description
[0017] Figure 1 A flowchart illustrating the steps of the closed-loop inspection method for IT equipment provided in this application; Figure 2 The overall architecture diagram provided for this application; Figure 3 A flowchart of the end-to-end security closed-loop inspection service provided in this application; Figure 4 This is a structural example diagram of the closed-loop inspection system for IT equipment provided in this application. Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0019] The following is combined Figure 1 and Figure 2 The present invention will now be described in further detail.
[0020] This application provides a closed-loop inspection method for IT equipment, including the following steps.
[0021] Step S1: Receive the inspection task and verify the inspection task and operation permissions. Activate the inspection task after the verification is successful.
[0022] Step S2: Extract the hardware fingerprint of the local operation and maintenance terminal, and generate a dynamic decryption key based on the hardware fingerprint.
[0023] Step S3: Decrypt the device access credential corresponding to the target IT device using the dynamic decryption key, and store the device access credential in temporary memory.
[0024] Step S4: Generate an inspection script based on the device attributes and structured local knowledge base of the target IT device, and perform high-risk operation verification on the inspection script through a high-risk command feature database to intercept operations that hit high-risk commands.
[0025] Step S5: If the high-risk operation verification passes, connect to the target IT device using an encrypted channel and execute the inspection script to obtain structured inspection data.
[0026] Step S6: Monitor the inspection and data collection status of the target IT equipment, mark the abnormal collection equipment according to the inspection and data collection status, and perform compensation collection processing on the abnormal collection equipment to obtain complete inspection data.
[0027] Step S7: Generate an inspection report based on the complete inspection data, and update the structured local knowledge base according to the complete inspection data.
[0028] The IT equipment closed-loop inspection method provided in this application embodiment is executed by an inspection plugin deployed on a local operation and maintenance terminal, and its processing constitutes a complete closed loop. Before the inspection begins, the inspection plugin first receives the inspection task, verifies the inspection task itself and its required operation permissions, and only activates the inspection task after the verification is passed. The inspection task carries a list of target IT equipment and the equipment attributes of each target IT equipment.
[0029] Subsequently, the hardware fingerprint of the local maintenance terminal is extracted, and a dynamic decryption key bound to the terminal is generated accordingly. This dynamic decryption key is used to decrypt the device access credentials corresponding to the target IT device. The decrypted credentials reside only in temporary memory and are not stored on the hard drive. Then, based on the device attributes of the target IT device, an inspection script matching the device is generated from the structured local knowledge base. The generated inspection script is then verified for high-risk operations using a high-risk command feature library, and operations that hit high-risk commands are intercepted.
[0030] After the high-risk operation verification is passed, the target IT device is connected through an encrypted channel and the inspection script is executed to collect structured inspection data. At the same time, the inspection collection status of each target IT device is monitored, and devices with abnormal collection are marked as abnormal collection devices. Compensation collection processing is performed on these abnormal collection devices to finally obtain complete inspection data.
[0031] Finally, an inspection report is generated based on the complete inspection data, and the structured local knowledge base is updated in reverse based on the complete inspection data, so that inspection experience can be accumulated. This solution integrates voucher encryption, operational risk control, self-healing of missed inspections, and knowledge accumulation into the same closed loop, with each link interconnected.
[0032] Specifically, the local maintenance terminal refers to the terminal device used by maintenance personnel who deploy the inspection plugin. The inspection plugin refers to the program that runs on the local maintenance terminal in a plug-in form, which carries the closed-loop inspection process of this application in a lightweight manner. The target IT equipment refers to IT equipment such as servers, network devices, and storage devices included in the inspection scope.
[0033] In step S1, the inspection task is encapsulated into a standardized JSON structure upon access. The inspection task includes a list of target IT devices and their device attributes. Specifically, the inspection task may include: a globally unique task identifier (TaskID, generated based on the UUIDv4 algorithm) to uniquely identify this inspection task; a target heterogeneous device array TargetList, where each node contains device attributes such as device network address (DeviceIP), operating system type (OSType), device vendor (DeviceVendor), and communication port (Port); a task request timeout threshold (TimeoutLimit, with millisecond precision); and a ThreadPoolSize parameter specifying the size of the concurrent thread pool. This JSON structure is a concrete example of a data structure conforming to a preset specification, which can be defined by a schema maintained by a local JSON schema validation engine.
[0034] During the verification of inspection tasks and operation permissions, the inspection task is first checked for structural integrity to verify whether its data structure conforms to preset specifications. Next, the operator token is compared with a locally stored whitelist of active tokens to verify the operator's identity. After successful identity verification, a permission query request is generated based on the operator token and the target IT device list, and this request is authenticated and verified using an external authentication server.
[0035] Specifically, the verification process includes three levels of verification. The first is structural integrity verification: the issued task structure is verified using a local JSON Schema verification engine to check if its fields are complete, types are valid, and nesting relationships conform to preset specifications, thereby intercepting incomplete instructions or malicious injection. The second is identity verification: the operator token in the request header is extracted and compared with a locally stored whitelist of active tokens to determine if the operator is an active authorized operator. The active token whitelist is the locally pre-stored whitelist of active tokens. The third is authentication verification: after successful identity verification, the operator token and the hash digest of the target device list (TargetList) are sent to the enterprise's unified authentication center (such as LDAP or OAuth2 unified authentication center) via an HTTPS secure channel. After verification, the authentication center returns a timestamp with a short validity period and a JWT signature authorization code.
[0036] In this embodiment, a pre-set public key is used to verify the signature validity of the authorization code. Only after successful verification can the inspection task scheduling thread be activated. The above authentication verification is performed by an external authentication server, where LDAP / OAuth2 Unified Authentication Center is one implementation of the external authentication server, JWT (JSON Web Token) is a signature-based token format, and public key verification is used to confirm that the authorization code was indeed issued by the authentication center and has not been tampered with.
[0037] Through the aforementioned three-level verification, unauthorized operators, incomplete or maliciously constructed tasks can be excluded before task execution, ensuring that subsequent processes are initiated only under legitimate authorization. This helps reduce the risk of unauthorized inspections and malicious injections from the source. In one implementation, if any step of the structural integrity verification, identity verification, or authentication verification fails, the inspection task is refused activation, the reason for failure is recorded, and it is not proceeded to subsequent processing.
[0038] In step S2, a hardware fingerprint is generated based on the CPU serial number and hard disk serial number of the maintenance terminal; a first hash value is calculated on the hardware fingerprint using a hash algorithm, and a dynamic decryption key is generated based on the first hash value using a key derivation function; after the task is completed, a zero-overwrite operation is performed on the device access credentials stored in the temporary memory and the temporary memory is released.
[0039] For example, in a Windows host environment, the system's underlying WMI (Windows Management Instrumentation) interface is called to obtain the motherboard CPU's native serial number and the hard drive's native serial number; in a Linux environment, physical characteristic information is extracted through low-level commands. Both the CPU serial number and the hard drive serial number are inherent attribute information written to the terminal at the factory, and their combination constitutes a hardware fingerprint.
[0040] The extracted CPU serial number string and hard disk serial number string are concatenated according to a special delimiter rule to obtain a combined seed string, which represents the specific form in which the hardware fingerprint participates in the calculation. This seed string is input into the SM3 national cryptographic hash algorithm, and after multiple rounds of compression function operations, a fixed-length 256-bit (32-byte) strong hash value is output, which is the first hash value. Then, a dynamic decryption key is derived from the first hash value using the Key Derivation Function (KDF). In this embodiment, this dynamic decryption key is the 32-byte session decryption key used by the subsequent AES algorithm.
[0041] In step S3, the device access credential corresponding to the target IT device is decrypted using the dynamic decryption key. For example, the scheduler reads the local encrypted credential library file, uses the 32-byte dynamic decryption key in memory, and combines it with AES-256-GCM mode to decrypt the device access credential of the target IT device. The decrypted device access credential (i.e., plaintext password) is allocated to the operating system's memory-secure isolation lock area, i.e., stored in temporary memory, and is never written to a file. After establishing the device communication connection and completing login authentication, the system calls the memset() function to perform a full-zero overwrite operation on the device access credential stored in the temporary memory, completely destroying any trace of the plaintext and releasing the temporary memory.
[0042] Through the above implementation methods, the entire lifecycle of device access credentials—from encrypted storage, memory decryption, use to destruction—is never written to disk in plaintext, reducing the risk of unauthorized personnel obtaining and abusing the credentials. In one implementation, if the dynamic decryption key does not match the ciphertext in the local encrypted credential repository (e.g., the inspection plugin has been migrated to another terminal, resulting in inconsistent hardware fingerprints), decryption fails. This indicates an abnormal terminal environment and terminates subsequent processes, thereby binding the credential to a specific maintenance terminal.
[0043] In step S4, an inspection script is generated based on the target IT device's device attributes and a structured local knowledge base. The structured local knowledge base uses a lightweight plain text structure, does not rely on a vector database engine, and its physical layer consists of two core XML files: a metadata index library and a script fragment library. When a new device is entered, various independent inspection instructions (such as querying memory, querying ports, etc.) are encapsulated in the script fragment library using XML tags. A mapping tree from "device manufacturer + operating system type" to "script fragment identifier set" is established in the metadata index library. The script fragment identifier is used to uniquely identify a reusable script fragment.
[0044] During the process of generating the inspection script, the device manufacturer, device model, and operating system type of the target IT device are obtained based on the device attributes of the target IT device. Then, the script fragment identifier corresponding to the target IT device is retrieved from the metadata index based on the device manufacturer, device model, and operating system type. Finally, the script fragment corresponding to the target IT device is obtained from the script fragment library based on the script fragment identifier, and the script fragments are assembled to obtain the inspection script.
[0045] In this way, by dividing the structured local knowledge base into two layers, namely the metadata index and the script fragment library, decoupled retrieval is achieved, which involves looking up the identifier by device attribute and retrieving the fragment by identifier. Script fragments from different devices can be reused. When adding a new device, there is no need to write the entire script. Instead, the mapping relationship can be registered in the metadata index and the missing script fragments can be supplemented.
[0046] Furthermore, the inspection scripts are validated for high-risk operations using a high-risk command signature database to intercept operations that trigger high-risk commands. This high-risk operation validation is implemented through the high-risk command signature database, a blacklist of hundreds of regular expressions with system-level destructive semantics stored in a tree-structured manner.
[0047] During the high-risk verification process, the inspection script is parsed using an abstract syntax tree to obtain action nodes and parameter nodes. The action nodes are then matched against destructive command rules in the high-risk command signature database. If a match is found, the inspection script is determined to be a high-risk operation and is intercepted. A regular expression scan is performed on the parameter nodes to check if they contain at least one of the following: wildcard forced deletion, recursive formatting, or kernel reboot parameters. If neither the action node nor the parameter node scan detects a match, the high-risk operation verification of the inspection script is considered successful.
[0048] Specifically, the above verification process is divided into two levels: action node matching and parameter node scanning. The first level is Abstract Syntax Tree (AST) parsing and matching: The risk control engine does not perform simple string searches, but first sends the assembled Shell / Python script to be checked into the AST parser, which converts it into a code syntax tree node structure, accurately separating the underlying function call nodes (i.e., action nodes) and external parameter nodes; then, it extracts the core execution actions (such as rm, format, drop, etc.), and matches the action nodes with the destructive command rules in the high-risk command feature library. If a match is found, the script is determined to be a high-risk operation and is intercepted.
[0049] The second level is parameter node regular expression scanning: if the action node is not matched, the parameter node is scanned with regular expressions to detect whether the parameter node contains at least one of the following: wildcard forced deletion, recursive formatting, or kernel reboot parameters. Among them, wildcard forced deletion (such as -rf / ), recursive formatting (such as mkfs), and kernel reboot parameters (such as reboot) are used.
[0050] The high-risk operation verification of the inspection script is deemed to have passed only if the action node is not matched and the parameter node scan is not detected. If the characteristics of a dangerous node are matched, the task issuance is immediately blocked and the process is suspended until multiple senior administrators jointly confirm the action using their private key digital signatures. In other words, the release of high-risk instructions requires manual multi-signature approval.
[0051] Through the aforementioned dual verification, system-level destructive instructions can be identified and intercepted before script execution, which helps to avoid equipment malfunctions or system crashes caused by the accidental execution of high-risk commands. In one implementation, the intercepted high-risk operations and approval results are recorded as a basis for subsequent auditing and accountability.
[0052] In step S5, an encrypted channel is established for the target IT device based on its device type. Then, according to a preset concurrency level, concurrent connections to the target IT device are established in groups using a non-blocking I / O thread pool. Instructions from the inspection script are sent through the encrypted channel, and returned unstructured text data is received. Using preset regular expression extraction rules, key fields are extracted from the unstructured text data, and these key fields are encapsulated into structured inspection data in a preset format.
[0053] In this embodiment of the application, the encrypted channels include SSH channels, BMC / IPMI channels, HTTPS channels, and REST API channels.
[0054] For example, for Linux / Unix operating system layer data, an SSH encrypted tunnel communication port is instantiated, thus establishing an SSH channel. For the physical server's underlying out-of-band state, a BMC / IPMI protocol communication channel is instantiated, thus establishing a BMC / IPMI channel. For storage devices and network devices, an HTTPS / REST-API interface call channel is instantiated, thus establishing an HTTPS channel and a REST API channel. These channels are all example forms of encrypted channels, and data transmission between the communicating parties is completed within the encrypted tunnel.
[0055] For connection scheduling, the scheduling engine adopts a canary batch concurrency strategy, grouping the target IT device list and establishing a concurrent thread pool through an asynchronous non-blocking I / O (NIO) framework according to a preset concurrency number, thus enabling concurrent connections to the devices in groups. The preset concurrency number can be specified by the ThreadPoolSize parameter in the inspection task. The non-blocking I / O thread pool allows a single thread to maintain connections and read / write operations for multiple devices simultaneously, thereby improving concurrent data collection capabilities without increasing the number of threads.
[0056] Taking the SSH data collection process as an example, the data collection and structuring process is explained as follows: The scheduling engine issues specific commands (such as `top -b -n 1`, which executes a system status snapshot command in batch mode), waits for the device console to return the raw, unstructured console text stream output, and obtains unstructured text data. The engine immediately sends this text data to the built-in regular expression cleaner and text parser to remove useless welcome messages and table formatting characters, forcibly extracts core values (performs data cleaning and type casting), and extracts key fields according to preset regular expression extraction rules. Finally, it encapsulates the data into standard JSON key-value pairs and returns them to the upper-layer logic, thus obtaining the pre-formatted structured inspection data.
[0057] For example, key fields such as CPU system-mode to user-mode consumption ratio and memory usage can be extracted from the output of the "top" command and assembled into a structured indicator object.
[0058] For example, the structured inspection data generated during the above collection process includes three categories: first, system performance data, including CPU system / user mode consumption ratio, memory paging rate, disk IOPS (input / output times per second), and network card transmit / receive bit rate; second, hardware health data, including real-time fan RPM speed, RAID card battery voltage status, and disk SMART physical health indicators; and third, service survival data, including the number of surviving core daemon process PIDs and the corresponding port listening status.
[0059] By establishing corresponding encrypted channels according to device type and using a non-blocking I / O thread pool for concurrent acquisition, it is possible to improve acquisition efficiency while adapting to heterogeneous device protocols. Moreover, the entire acquisition process is carried out within the encrypted tunnel, which helps to ensure data transmission security.
[0060] In step S6, an execution status tracking table is established based on the target IT device list. This table, indexed by the network address of the target IT device, stores the communication connection status, heartbeat response status, inspection data integrity, and inspection script execution progress of the target IT device. The heartbeat response status, communication connection status, and inspection data integrity of the target IT device are monitored. If a target IT device experiences a heartbeat response timeout, communication connection anomaly, or missing preset key data in the inspection data, the target IT device is marked as a data collection anomaly device.
[0061] Furthermore, the current number of compensation acquisitions for the abnormal acquisition device is obtained; a compensation acquisition waiting time is determined based on the current number of compensation acquisitions, and an encrypted channel is re-established with the abnormal acquisition device after the compensation acquisition waiting time expires. If the encrypted channel is successfully re-established, the incomplete scripts in the inspection scripts corresponding to the abnormal acquisition device are determined according to the execution status tracking table. The incomplete scripts are executed to obtain supplementary acquisition data, and complete inspection data is generated based on the supplementary acquisition data and the structured inspection data corresponding to the abnormal acquisition device. The compensation acquisition waiting time increases exponentially with the current number of compensation acquisitions, and the compensation acquisition process terminates after reaching the preset maximum number of compensation acquisitions.
[0062] Specifically, in the data collection and status monitoring phase, at the start of the task, an execution status tracking table is built in memory with the target device's network address (IP) as the primary key. The table uses the target IT device's network address as an index to store the communication connection status, heartbeat response status, inspection data integrity, and inspection script execution progress of each device, and monitors the heartbeat response status, communication connection status, and inspection data integrity of each target IT device in real time.
[0063] For example, situations that identify a device as having abnormal data collection include: not receiving a heartbeat ACK receipt for more than 30 seconds after establishing a TCP / IP connection, or the socket throwing a timeout exception (i.e., heartbeat response timeout, communication connection abnormality); and although the connection is normal, the returned final data body is missing the key closure tag of the preset SOP (i.e., the inspection data is missing the preset key data). Once any of the above situations are met, the system will mark the target IT device as an abnormal data collection device and automatically transfer the device to the self-healing retry buffer queue.
[0064] During the compensation acquisition process, the scheduler retrieves the abnormal acquisition device from the retry buffer queue, reads its current compensation acquisition count, determines the waiting time for this compensation acquisition based on the count, and re-establishes the encrypted channel with the abnormal acquisition device after the waiting time expires.
[0065] In this embodiment, the compensation collection waiting time increases exponentially with the number of compensation collections, following an exponential backoff method. For example, the specific parameters of the exponential backoff method are as follows: the base interval is set to 3 seconds, and the backoff coefficient is 2, that is, reconnection is initiated after waiting for 3 seconds, 6 seconds, 12 seconds, 24 seconds, and 48 seconds respectively, and finally marked as failed after reaching the maximum limit of 5 times. The waiting time sequence is the forced waiting time before the next reconnection. The exponential backoff algorithm can effectively avoid the continuous storm-like reconnection congestion caused by network jitter.
[0066] After successfully re-establishing the encrypted channel, the incomplete script in the inspection script corresponding to the abnormal acquisition device is determined based on the execution status tracking table. To reduce the resource consumption of repeated acquisition, the engine retrieves the line number identifier (i.e., breakpoint pointer) of the last successfully executed instruction on the device from the breakpoint line number to the end of the file in the original inspection script, sends the supplementary acquisition fragment to the target device, and executes the incomplete script to obtain supplementary acquisition data. Subsequently, the supplementary acquisition data is concatenated with the previously obtained structured inspection data of the device in memory to generate complete inspection data, ultimately achieving closed-loop reconciliation of all data. In one implementation, the timeout threshold for breakpoint supplementary acquisition is set to 10 seconds. If supplementary acquisition data is not received after exceeding this threshold, the retry process is initiated again.
[0067] In this way, the self-healing system, which combines the aforementioned list reconciliation, heartbeat monitoring, exponential backoff retries, and breakpoint re-collection, can automatically compensate for collection failures caused by network jitter and protocol compatibility issues, thereby reducing the risk of equipment missed detections and data gaps. In one implementation, devices marked as having abnormal collection capabilities that still fail after reaching the maximum number of compensated collection attempts have their failure status and reasons recorded and highlighted as an anomaly in the inspection report, facilitating manual follow-up by maintenance personnel.
[0068] In step S7, an inspection report is generated based on the complete inspection data, and the complete inspection data is synchronously updated to the local asset ledger. The inspection report includes asset information, operational indicators, and anomaly handling suggestions. Newly added script fragments and their corresponding anomaly handling solutions are extracted from the complete inspection data and stored in a structured local knowledge base.
[0069] Specifically, an inspection report is generated based on complete inspection data, and the complete inspection data is synchronously updated to the local asset ledger. In this embodiment, the unique serial number (SN) of the device is used as the key in the asset ledger to update the asset ledger throughout its entire lifecycle. The inspection report includes asset information, operational indicators, and anomaly handling suggestions. Asset information includes device serial number, manufacturer and model, network location, etc. Operational indicators include the aforementioned system performance, hardware health, and service availability data. Anomaly handling suggestions include prompts for handling abnormal devices and indicators. The generated report can be output in an encrypted and anonymized format to avoid leakage of sensitive information.
[0070] Furthermore, new script fragments and their corresponding exception handling solutions are extracted from the complete inspection data. These new script fragments are stored in the script fragment library of a structured local knowledge base, and the correspondence between exception handling solutions and script fragments is registered in the database. The new script fragments and exception handling solutions are then stored in the structured local knowledge base. Through this mechanism, the new experiences gained in this inspection can be reused in subsequent inspections, allowing the knowledge base to continuously evolve with each inspection.
[0071] Furthermore, this embodiment also provides an implementation method for tamper-proof audit logs, used to record the entire operation trajectory. This application draws on the anti-tampering concept of chain hashing in cryptography: when a core risk control action occurs (such as operator login, hardware serial number extraction, triggering high-risk interception, or device triggering a missed detection retry), the system immediately constructs a log block. Subsequently, it reads the complete SHA-256 hash value of the previous log file body in the local log library, uses it as a salt, directly injects it into the end of the currently generated action information, merges them, and uses them as a new object to be signed. A new hash value is calculated for the merged string as a whole, and this hash value is also fixed into the current log structure and appended to the disk.
[0072] Since the hash signature of any current log block depends on the hash state of all previous logs, any attempt by anyone to modify, delete, or forge a historical audit log entry will break the entire hash chain, causing the verification engine to report an error. This prevents subsequent tampering and repudiation. This tamper-proof audit log further enhances the auditability of the entire process.
[0073] like Figure 3As shown, the IT equipment closed-loop inspection method of this application constitutes a complete business closed loop during operation. The operation and maintenance terminal submits the inspection task and equipment list; the security risk control layer performs identity and permission verification; after the verification is passed, the hardware fingerprint is extracted to generate a dynamic key, and the device login credentials are decrypted from the local file (the credentials only reside in memory); then, the local knowledge base is requested to match the device inspection script. When the knowledge base has the corresponding script, the existing script is returned; when the knowledge base does not have the corresponding script, a standardized inspection script is dynamically generated; after the script is generated, it is submitted for security verification, including syntax and high-risk command regular expression analysis and interception; after the verification is passed, the inspection task is distributed, the core collection engine establishes an encrypted communication connection and executes the collection command, and the target IT equipment returns the underlying operation data; the core collection engine performs threshold verification and anomaly marking in combination with the preset SOP; in the case of missing or omitted devices, the anti-missed inspection reconciliation is triggered, and then the retry and breakpoint supplementary collection mechanism is triggered; after the collection is completed, the new script and anomaly handling experience are accumulated in the local knowledge base, a standard dual-format encrypted report is generated, and finally the memory credentials are cleared and an anti-tampering audit log is generated.
[0074] In other embodiments, the hardware fingerprint binding factor of this application can be replaced. For example, in addition to the CPU serial number and hard disk serial number, one or more of the terminal MAC address, motherboard serial number, or dynamic token can be used to generate a hardware fingerprint, thereby generating a dynamic key based on the inherent attribute information of the terminal.
[0075] In other implementations, the physical storage format of the structured local knowledge base can be replaced. For example, a local SQLite database or a JSON configuration table can be used instead of the two core XML files mentioned above, as long as it remains a lightweight local structure storage that does not rely on large model vector calculations, thus enabling the function of retrieving and assembling inspection scripts based on device attributes.
[0076] In other implementations, the waiting strategy for compensation collection can be replaced. For example, under the premise of satisfying the closed loop of end-to-end reconciliation and breakpoint replenishment collection, fixed-interval retry can be used instead of the aforementioned exponential backoff retry. In this case, the waiting time for compensation collection does not increase with the number of compensation collections; exponential backoff is just one specific strategy described in this application.
[0077] like Figure 4 As shown, this application also provides an IT equipment closed-loop inspection system for executing an IT equipment closed-loop inspection method, including a task access module 401, a task access module 402, a script generation module 403, a script execution module 404, a missed detection self-healing module 405, and a closed-loop processing module 406.
[0078] The task access module 401 is configured to: receive inspection tasks, verify the inspection tasks and operation permissions, and activate the inspection tasks after successful verification. The inspection tasks include a list of target IT devices and the device attributes of the target IT devices. The security encryption module 402 is configured to: extract the hardware fingerprint of the local operation and maintenance terminal, generate a dynamic decryption key based on the hardware fingerprint, and use the dynamic decryption key to decrypt the device access credentials corresponding to the target IT devices, storing the device access credentials in temporary memory.
[0079] The script generation module 403 is configured to generate an inspection script based on the target IT device's device attributes and a structured local knowledge base, and to perform high-risk operation verification on the inspection script using a high-risk command feature library to intercept operations that hit high-risk commands. The script execution module 404 is configured to connect to the target IT device via an encrypted channel and execute the inspection script if the high-risk operation verification passes, obtaining structured inspection data. The omission self-healing module 405 is configured to monitor the inspection collection status of the target IT device, mark abnormal collection devices based on the inspection collection status, and perform compensatory collection processing on the abnormal collection devices to obtain complete inspection data. The closed-loop processing module 406 is configured to generate an inspection report based on the complete inspection data and update the structured local knowledge base based on the complete inspection data.
[0080] This application discloses a closed-loop inspection method and system for IT equipment, executed by an inspection plugin deployed on a local maintenance terminal. The method includes: receiving an inspection task and performing permission verification; after activating the task, extracting the terminal hardware fingerprint to dynamically generate a decryption key; decrypting the device access credential and storing it only in temporary memory, which is then destroyed upon task completion; generating an inspection script from a structured local knowledge base based on device attributes; intercepting high-risk commands through a high-risk command feature library verification; using an encrypted channel to connect to the device and execute the script to obtain structured data; monitoring and collecting data to mark abnormal devices and performing compensatory data collection processing to obtain complete data; and finally generating an inspection report and updating the knowledge base. This method achieves security risk control and lightweight deployment through dynamic hardware fingerprint decryption, local knowledge base matching, high-risk command interception, encrypted data collection, and compensatory data collection, thereby reducing the missed detection rate.
[0081] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A closed-loop inspection method for IT equipment, characterized in that, The inspection is executed by the inspection plugin deployed on the local operations and maintenance terminal, including: Receive inspection tasks and verify the inspection tasks and operation permissions. After the verification is successful, activate the inspection tasks. The inspection tasks include a list of target IT devices and the device attributes of the target IT devices. Extract the hardware fingerprint of the local operation and maintenance terminal, and generate a dynamic decryption key based on the hardware fingerprint; The device access credential corresponding to the target IT device is decrypted using the dynamic decryption key, and the device access credential is stored in temporary memory; Based on the device attributes and structured local knowledge base of the target IT device, an inspection script is generated, and the inspection script is verified for high-risk operations through a high-risk command feature library to intercept operations that hit high-risk commands. If the high-risk operation verification passes, the target IT device is connected via an encrypted channel and the inspection script is executed to obtain structured inspection data. Monitor the inspection and data collection status of the target IT equipment, mark abnormal collection equipment according to the inspection and data collection status, and perform compensatory data collection processing on the abnormal collection equipment to obtain complete inspection data; An inspection report is generated based on the complete inspection data, and the structured local knowledge base is updated according to the complete inspection data.
2. The closed-loop inspection method for IT equipment according to claim 1, characterized in that, The verification of the inspection task and operation permissions includes: The inspection task is subjected to structural integrity verification to confirm whether the data structure of the inspection task conforms to the preset specifications. The operator token is compared with the locally stored whitelist of active tokens to verify the identity of the operation permission; After the identity verification is successful, an authorization query request is generated based on the operator token and the target IT device list, and the authorization query request is authenticated and verified using an external authentication server.
3. The closed-loop inspection method for IT equipment according to claim 1, characterized in that, The step of extracting the hardware fingerprint of the local operation and maintenance terminal and generating a dynamic decryption key based on the hardware fingerprint includes: The hardware fingerprint is generated based on the CPU serial number and hard disk serial number of the maintenance terminal; The hardware fingerprint is calculated using a hash algorithm to obtain a first hash value, and the dynamic decryption key is generated based on the first hash value using a key derivation function. The closed-loop inspection method for IT equipment also includes: After the inspection task is completed, the device access credentials stored in the temporary memory are overwritten with all zeros, and the temporary memory is released.
4. The closed-loop inspection method for IT equipment according to claim 1, characterized in that, The structured local knowledge base includes a metadata index library and a script fragment library; The step of generating an inspection script based on the device attributes of the target IT device and a structured local knowledge base includes: Based on the device attributes of the target IT device, obtain the device manufacturer, device model, and operating system type of the target IT device; The script fragment identifier corresponding to the target IT device is retrieved from the metadata index based on the device manufacturer, device model, and operating system type. The script fragment corresponding to the target IT device is obtained from the script fragment library according to the script fragment identifier, and the script fragment is assembled to obtain the inspection script.
5. The closed-loop inspection method for IT equipment according to claim 1, characterized in that, The step of verifying the inspection script for high-risk operations using a high-risk command feature database includes: The inspection script is parsed using an abstract syntax tree to obtain action nodes and parameter nodes; The action node is matched with the destructive instruction rules in the high-risk command feature library. If a match is found, the inspection script is determined to be a high-risk operation and is intercepted. Perform a regular expression scan on the parameter node to detect whether the parameter node contains at least one of the wildcard forced deletion, recursive formatting, or kernel reboot parameters. If the action node is not hit and the parameter node scan is not detected, the high-risk operation of the inspection script is deemed to have passed the verification.
6. The closed-loop inspection method for IT equipment according to claim 1, characterized in that, The process of connecting to the target IT device via an encrypted channel and executing the inspection script to obtain structured inspection data includes: Based on the device type of the target IT device, an encrypted channel corresponding to the target IT device is established. The encrypted channel includes an SSH channel, a BMC / IPMI channel, an HTTPS channel, and a REST API channel. According to the preset concurrency limit, the target IT devices are grouped and connected concurrently through a non-blocking I / O thread pool; Send the instructions in the inspection script in the encrypted channel and receive the returned unstructured text data; Using preset regular expression extraction rules, key fields are extracted from the unstructured text data, and the key fields are encapsulated into the structured inspection data in a preset format.
7. The closed-loop inspection method for IT equipment according to claim 1, characterized in that, The monitoring of the target IT equipment's inspection and data collection status, and the marking of abnormal data collection devices based on the inspection and data collection status, includes: An execution status tracking table is established based on the target IT equipment list. The execution status tracking table is indexed by the network address of the target IT equipment and stores the communication connection status, heartbeat response status, inspection data integrity, and execution progress of the inspection script of the target IT equipment. Monitor the heartbeat response status, communication connection status, and inspection data integrity of the target IT equipment; If the target IT device experiences a heartbeat response timeout, communication connection anomaly, or a lack of preset key data in the inspection data, the target IT device will be marked as the abnormal data collection device.
8. The closed-loop inspection method for IT equipment according to claim 7, characterized in that, The process of compensating for the abnormal data acquisition equipment to obtain complete inspection data includes: Obtain the current compensation collection count of the abnormal collection device; The compensation collection waiting time is determined based on the current number of compensation collections, and an encrypted channel is re-established with the abnormal collection device after the compensation collection waiting time has expired. If the encrypted channel is successfully re-established, the incomplete script in the inspection script corresponding to the abnormal acquisition device is determined according to the execution status tracking table; Execute the incomplete script to obtain supplementary data, and generate the complete inspection data based on the supplementary data and the structured inspection data corresponding to the abnormal acquisition device; The compensation collection waiting time increases exponentially with the current number of compensation collections, and the compensation collection process terminates after reaching a preset maximum number of compensation collections.
9. The closed-loop inspection method for IT equipment according to claim 1, characterized in that, The process of generating an inspection report based on the complete inspection data and updating the structured local knowledge base based on the complete inspection data includes: An inspection report is generated based on the complete inspection data, and the complete inspection data is synchronously updated to the local asset ledger. The inspection report includes asset information, operating indicators, and suggestions for handling anomalies. Extract the newly added script fragments and their corresponding exception handling schemes from the complete inspection data, and store the newly added script fragments and the exception handling schemes in the structured local knowledge base.
10. An IT equipment closed-loop inspection system, used to execute the IT equipment closed-loop inspection method as described in any one of claims 1-9, characterized in that, include: The task access module is configured to: receive inspection tasks, verify the inspection tasks and operation permissions, and activate the inspection tasks after the verification is passed. The inspection tasks include a list of target IT devices and the device attributes of the target IT devices. The security encryption module is configured to: extract the hardware fingerprint of the local operation and maintenance terminal, generate a dynamic decryption key based on the hardware fingerprint; and use the dynamic decryption key to decrypt the device access credential corresponding to the target IT device, and store the device access credential in temporary memory; The script generation module is configured to: generate an inspection script based on the device attributes and structured local knowledge base of the target IT device, and perform high-risk operation verification on the inspection script through a high-risk command feature library to intercept operations that hit high-risk commands; The script execution module is configured to: if the high-risk operation verification passes, connect to the target IT device via an encrypted channel and execute the inspection script to obtain structured inspection data; The missed detection self-healing module is configured to: monitor the inspection and collection status of the target IT equipment, mark abnormal collection equipment according to the inspection and collection status, and perform compensatory collection processing on the abnormal collection equipment to obtain complete inspection data; The closed-loop processing module is configured to generate an inspection report based on the complete inspection data and update the structured local knowledge base according to the complete inspection data.
