Server information processing system, method, electronic device, and storage medium

By building a rule base and listening to Trap messages, collection instructions are generated, enabling timely updates of server asset information. This solves the problem of untimely asset information updates in existing technologies and improves the real-time performance and accuracy of asset information.

CN118353757BActive Publication Date: 2025-11-21JINAN INSPUR DATA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410486781.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-19
Publication Date
2025-11-21
Estimated Expiration
2044-04-19

AI Technical Summary

Technical Problem

The existing technology lacks the function of subscribing to and pushing asset information changes, resulting in untimely updates of server asset information. Furthermore, the existing monitoring method requires modification and updates to the BMC system, which is costly.

Method used

A rule base is built, which contains the correspondence between object identifiers of Trap messages and asset information categories. Server messages are monitored through Trap listeners to generate collection instructions. Message processors and collectors are used to realize the timely collection and updating of asset information, and data parsers perform persistence operations.

Benefits of technology

This enables timely detection and updating of server asset information without modifying the server's BMC system, improving the real-time nature and accuracy of asset information and reducing resource waste.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118353757B_ABST
    Figure CN118353757B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a server information processing system and method, electronic equipment and storage medium, and belongs to the technical field of computers, aiming to realize timely updating of asset information at low cost. The system comprises a rule base, a Trap listener, a message processor, a collector and a data parser. The Trap listener is configured to extract address information of a server and an object identifier of a Trap message from the Trap message when the Trap message sent by the server is detected, and generate a message object. The message processor is configured to determine a target category of target asset information that has changed and a target number of a server where the target asset information is located according to the message object and the rule base, and generate a collection instruction for the target asset information of the target category in the server corresponding to the target number. The collector is configured to collect the target asset information according to the collection instruction. The data parser is configured to perform a persistent operation on the target asset information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and in particular to a server information processing system, method, electronic device, and storage medium. Background Technology

[0002] Users manage data center server equipment and its components through asset information management functions, making the accuracy of asset information for each server device crucial. However, the monitoring methods provided by related technologies lack the function of subscribing to and pushing asset information changes. To implement this function, the server's BMC (Baseboard Management Controller) system needs to be modified and updated, which is costly. Summary of the Invention

[0003] To overcome the problems existing in related technologies, this disclosure provides a server information processing system, method, electronic device, and storage medium. The technical solution of this disclosure is as follows:

[0004] According to a first aspect of the present disclosure, a server information processing system is provided, the server information processing system including a rule base, a Trap listener, a message processor, a collector, and a data parser; the rule base includes: a correspondence between the object identifier of each Trap message and the category of the asset information that generates the change corresponding to the Trap message;

[0005] The Trap listener is used to extract the server's address information and the object identifier of the Trap message from the Trap message when it detects a Trap message sent by the server, and to generate a message object based on the server's address information and the object identifier of the Trap message.

[0006] The message processor is configured to determine the target category of the target asset information that has changed and the target number of the server where the target asset information is located, based on the message object and the rule base, and generate a collection instruction for the target asset information of the target category in the server corresponding to the target number, based on the target category and the target number.

[0007] The collector is used to collect the target asset information according to the collection instruction, and report the target asset information to the data parser;

[0008] The data parser is used to perform persistence operations on the target asset information.

[0009] Optionally, the message processor is specifically used for:

[0010] Receive the message object sent by the Trap listener and initialize the context object of the message processor;

[0011] Based on the server address information contained in the message object, the object identifier of the Trap message included in the message object, and the rule base, the message object is filtered to obtain the target number of the server and the target category of the target asset information corresponding to the filtered message object;

[0012] The context object is updated based on the target category and the target number to obtain the updated context object;

[0013] Query the server ID and asset information category of each server in the buffer queue. If the target ID and target category are not included in the buffer queue, store the updated context object into the buffer queue.

[0014] Periodically retrieve each context object from the buffer queue, and group and merge each context object according to the server number to obtain the number of each server to be collected and a list of categories of asset information that has changed in each server to be collected.

[0015] Based on the number of each server to be collected and the list of asset information categories that have changed in each server to be collected, asset information collection parameters are constructed.

[0016] Based on the asset information collection parameters, a collection command is generated for the asset information that has changed in each of the servers to be collected.

[0017] Optionally, the step of filtering the message object based on the server address information contained in the message object, the object identifier of the Trap message included in the message object, and the rule base to obtain the target number of the server and the target category of the target asset information corresponding to the filtered message object includes:

[0018] Based on the address information of the server contained in the message object, query whether the target number of the server corresponding to the address information exists;

[0019] If the target number exists, based on the object identifier of the Trap message included in the message object, query whether there is a target correspondence relationship of the object identifier of the Trap message in the rule base;

[0020] If a target correspondence exists for the object identifier of the Trap message in the rule base, the target category of the target asset information that will be changed corresponding to the object identifier of the Trap message is determined according to the target correspondence.

[0021] If the target number does not exist and / or the target correspondence does not exist in the rule base, the message object is filtered out.

[0022] Optionally, the collector is specifically used for:

[0023] Based on the acquisition command, an acquisition task is constructed;

[0024] The collection task is submitted to a thread pool, and the thread pool is used to asynchronously collect the target asset information.

[0025] The collected target asset information is reported to the data parser.

[0026] Optionally, the data parser is specifically used for:

[0027] Determine the target number of the server corresponding to the target asset information, and determine whether the server corresponding to the target number exists;

[0028] If the server corresponding to the target number exists, the target category for obtaining the target asset information is determined.

[0029] Based on the target category of the target asset information, determine the parsing plugin corresponding to the target category, and submit the target asset information to the parsing plugin;

[0030] Obtain the target data parsed by the parsing plugin, query the data records, and compare the target data with the data records;

[0031] If no identical change record for the target data is recorded in the data record, the asset information of the server is updated according to the target data, and the change record of the asset information of the server is recorded.

[0032] Optionally, the data parser is specifically used for:

[0033] If the same change record for the target data is recorded in the data record, the target data is deleted.

[0034] Optionally, the rule base generation step includes at least one or more of the following:

[0035] The rule base is generated based on the management information base of each of the servers;

[0036] The rule base is generated based on the correspondence between the object identifier of the Trap message input by the user and the category of the asset information that caused the change corresponding to the Trap message;

[0037] The rule base is generated based on the template files imported in batches.

[0038] According to a second aspect of the present disclosure, a server information processing method is provided, applied to a server information processing system, the method comprising:

[0039] Upon detecting a Trap message sent by the server, the server's address information and the object identifier of the Trap message are extracted from the Trap message, and a message object is generated based on the server's address information and the object identifier of the Trap message.

[0040] Based on the message object and the rule base, the target category of the target asset information that caused the change and the target number of the server where the target asset information is located are determined. Based on the target category and the target number, a collection instruction for the target asset information of the target category in the server corresponding to the target number is generated. The rule base includes: the correspondence between the object identifier of each Trap message and the category of the asset information that caused the change corresponding to the Trap message.

[0041] According to the acquisition instruction, the target asset information is acquired and the target asset information is reported to the data parser;

[0042] The target asset information is persisted.

[0043] According to a third aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to execute the instructions to implement the server information processing method as described in the second aspect.

[0044] According to a fourth aspect of the present disclosure, a non-volatile readable storage medium is provided, which, when instructions in the non-volatile readable storage medium are executed by a processor of an electronic device, enables the electronic device to perform the server information processing method as described in the second aspect.

[0045] In this embodiment, a rule base is pre-built, which includes the correspondence between the object identifier of each Trap message and the category of the asset information that has changed corresponding to the Trap message. A Trap listener can listen to Trap messages sent by the server, extract the server's address information and the object identifier of the Trap message from the Trap message, and generate a message object based on the server's address information and the object identifier of the Trap message. A message processor can generate a collection instruction for the target asset information based on the message object, and then the collector collects the target asset information according to the collection instruction, thereby enabling the data parser to persist the target asset information. In this way, by listening to Trap messages, timely collection and updating of the changed asset information of the server can be achieved without modifying or updating the server's BMC system, thus ensuring the real-time nature and accuracy of the asset information. Attached Figure Description

[0046] To more clearly illustrate the technical solutions of the embodiments of this disclosure, the accompanying drawings used in the description of the embodiments of this disclosure will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0047] Figure 1 This illustrates a method for updating asset information using relevant technologies;

[0048] Figure 2 This is a schematic diagram illustrating the workflow of a server information processing system according to an embodiment of the present disclosure.

[0049] Figure 3 This is a schematic diagram illustrating the steps of a server information processing method according to an embodiment of the present disclosure;

[0050] Figure 4 This is a schematic flowchart illustrating a server information processing method according to an embodiment of this disclosure.

[0051] Figure 5 This is a schematic diagram of an electronic device shown in an embodiment of this disclosure. Detailed Implementation

[0052] To enable those skilled in the art to better understand the technical solutions of this disclosure, the technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings.

[0053] First, some of the nouns or terms that appear in the description of the embodiments of this disclosure are to be interpreted as follows.

[0054] Trap messages are notification messages proactively sent by network devices to the network management system to report important events or status changes. When server device asset information changes (such as component status changes, hot-swapping of components like hard drives or power supplies, configuration changes, etc.), the server typically sends corresponding Trap messages; that is, some Trap messages sent by the server are related to changes in server asset information. Trap messages are generally transmitted via SNMP (Simple Network Management Protocol), an asynchronous communication mechanism that allows devices to send Trap messages to the network management system at any time without prior querying. This notification mechanism enables the management system to promptly obtain changes in device status, thereby better monitoring and managing network devices.

[0055] SNMP is a protocol for network management and monitoring. It allows network management systems to collect device information, monitor network performance, and manage network devices, defining standard methods for managing and monitoring network devices. SNMP primarily consists of a management system, management agents, and a Management Information Base (MIB). The management system, usually referred to as the administrator, monitors and manages network devices, collects device information, and configures device parameters. The management agent, usually referred to as the device, runs on the network device, is responsible for collecting and storing its own information, and responding to requests from the management system. The MIB is a collection of network device information stored in a database, containing definitions of data variables that can be accessed by the management system. SNMP supports the Trap message mechanism, enabling network devices to send event notification messages to the management system, allowing administrators to be notified promptly when specific events occur.

[0056] MIB (Multi-Instrument Blockchain): A database in a network management system that stores management information, defining objects, attributes, and related information used for network management. MIB contains a series of OIDs (Object Identifiers) describing the parameters, status, and configuration information of network devices. These objects can be information from various network devices such as routers, switches, firewalls, and servers. Through MIB, the network management system can acquire and manage data from network devices, including device configuration, performance, and status. MIB is organized in a hierarchical structure, ensuring that each object has a unique object identifier and can be accessed and managed using standard management protocols (such as SNMP).

[0057] BMC: A microprocessor independent of the server's main processor, responsible for monitoring the server's basic status, managing hardware resources, and performing remote management functions. A BMC system typically includes a management chip, sensors, a power controller, and remote connectivity capabilities, allowing system administrators to remotely monitor, manage, and maintain the server.

[0058] With the development of the internet and big data, the number of data center servers has increased dramatically, making asset information management increasingly important in unified monitoring and management. However, current monitoring methods provided by various vendors lack the function of subscribing to and pushing asset information change information. This requires all vendors to modify and update their server BMC systems to support this function, which is costly. Currently, server asset information maintenance in server monitoring and management often relies on scheduled tasks or manual execution by maintenance personnel to actively collect and update all server asset information. However, this active collection method often has a significant lag when server asset information changes (such as changes in component status, hot-swapping of hard drives or power supplies, etc.), causing the unified monitoring platform to fail to update the corresponding changes in a timely manner. Since server asset information changes are usually partial and infrequent under normal circumstances, reducing the frequency of asset information collection tasks would increase the load on the unified monitoring platform and waste resources.

[0059] Figure 1 This paper illustrates methods for updating asset information in related technologies, including two methods: one is a timed data collection task, and the other relies on manual user-triggered asset data collection and updates. A buffer stores unique identifiers of resources that have been collected; each identifier is automatically cleared after a fixed period. The analyzer uses a double-ended blocking queue to store queues for manually triggered and timed data collection tasks, analyzing and filtering resources that have undergone data collection within a specified time when the collector retrieves data from the queue. The rate limiter uses a token passing algorithm with an adjustable token generation rate to control the collector's collection rate, ensuring a smooth collection process. The collector first obtains a token from the rate limiter, then retrieves the data parameters to be collected from the analyzer's task queue, utilizing multi-threading to execute asset data collection. The collected data is reported to the data processor; the data processor receives the reported asset data and places it into a queue of data to be processed, further utilizing multi-threading for parallel analysis and processing. A feedback controller monitors the data processor's queue of data to be processed, determining whether the data processor is congested or idle, and thus controlling the rate limiter's generation rate to achieve feedback control of the rate limiter.

[0060] However, the asset information update methods of related technologies cannot detect and synchronize changes in asset information of server equipment in a timely manner, and asset data synchronization often has a large time delay, resulting in inconsistencies between the monitoring platform and the asset information of server equipment, which is not conducive to accurate asset inventory.

[0061] To address the aforementioned technical problems, this disclosure proposes a server information processing system and method. This system and method are based on SNMP Trap event-driven processing. SNMP Trap is a common monitoring and management method for servers, used for alarm management. When server equipment assets change (such as changes in component status, hot-swapping of components like hard drives or power supplies, configuration changes, etc.), the server typically sends corresponding Trap messages. That is, some Trap alarm messages sent by the server are correlated with changes in server asset information. Based on this, this disclosure proposes constructing a rule base based on the MIB libraries of various server manufacturers. This rule base contains each TrapOID and its corresponding asset information category (such as system information, CPU, memory, hard drive, etc.) to be collected and updated. The device listens to and parses the Trap messages sent by the server, then uses the constructed rule base to perform filtering and merging operations to process the data before executing the corresponding asset information collection and update.

[0062] Figure 2 This is a schematic diagram of the workflow of a server information processing system according to an embodiment of the present disclosure. The server information processing system includes a rule base, a Trap listener, a message processor, a collector, and a data parser.

[0063] A rule base can be pre-built, and during the server's asset message update process, the pre-built rule base can be directly queried. The rule base includes: the correspondence between the object identifiers of each Trap message and the categories of the asset information that has changed corresponding to the Trap message. The rule base generation steps include at least one or more of the following: generating the rule base based on the management information databases of each server; generating the rule base based on the correspondence between the object identifiers of the Trap messages input by the user and the categories of the asset information that has changed corresponding to the Trap messages; generating the rule base based on batch-imported template files.

[0064] A rule base can be built based on the server MIB library, maintaining the correspondence between each Trap OID and the corresponding category of changed asset information. Since server MIB libraries may differ between vendors, a rule base can be built for each vendor's servers. The rule base to be collected is determined based on the vendor of the server corresponding to the received Trap message. Users can manually enter the correspondence between the object identifier of each Trap message and the corresponding category of changed asset information through a web page (a document or application interface accessed via an internet browser). Users can also batch import the correspondence between the object identifier of each Trap message and the corresponding category of changed asset information through an Excel template file. It is understood that the above three methods of generating a rule base can be used in combination.

[0065] The Trap listener is used to extract the server's address information and the object identifier of the Trap message from the Trap message when it hears the Trap message sent by the server, and generate a message object based on the server's address information and the object identifier of the Trap message.

[0066] The message processor is configured to determine the target category of the target asset information that has changed and the target number of the server where the target asset information is located, based on the message object and the rule base, and generate a collection instruction for the target asset information of the target category in the server corresponding to the target number, based on the target category and the target number.

[0067] The collector is used to collect the target asset information according to the collection instruction and report the target asset information to the data parser.

[0068] The data parser is used to perform persistence operations on the target asset information.

[0069] After starting up, the Trap listener listens on port 162 in real time to receive Trap messages sent by various servers. Port 162 is often referred to as the SNMP port. SNMP messages can be transmitted on this port to collect device status information, configuration information, and performance data.

[0070] Upon receiving a Trap message, the Trap listener extracts the address information of the server that sent the message and the object identifier of the Trap message from the packet. The server address information is the server's IP address (Internet Protocol Address). Based on the server's address information and the object identifier of the Trap message, the Trap listener generates a message object, which includes the server's address information and the Trap message's object identifier. The Trap listener then pushes the message object to the message handler for processing. The message object embodies the interaction pattern between objects, triggering specific behaviors of objects by sending messages. When sending a message, the message receiver and the method to be executed are usually specified. The receiver will call the corresponding method to complete the requested operation after receiving the message.

[0071] After receiving the message object pushed by the Trap listener, the message processor filters, groups, and merges the message object according to the message object and the rule base, and then issues the corresponding server asset information collection instructions.

[0072] Optionally, the message processor may: receive the message object sent by the Trap listener and initialize the context object of the message processor; filter the message object according to the server address information contained in the message object, the object identifier of the Trap message included in the message object, and the rule base, to obtain the target number of the server and the target category of the target asset information corresponding to the filtered message object; update the context object according to the target category and the target number to obtain the updated context object; query the number of each server and the category of asset information in the buffer queue, and if the target number and the target category are not included in the buffer queue, store the updated context object in the buffer queue; periodically retrieve each context object from the buffer queue and group and merge each context object according to the server number to obtain the number of each server to be collected and the list of categories of asset information that have changed in each server to be collected; construct asset information collection parameters according to the number of each server to be collected and the list of categories of asset information that have changed in each server to be collected; and generate collection commands for the asset information that has changed in each server to be collected according to the asset information collection parameters.

[0073] After receiving the message object sent by the Trap listener, the message handler initializes its context object based on the message object. Initializing the context object can include setting necessary initial states and properties, ensuring the context object is in the correct state when used, and helping to avoid undefined behavior in later stages. Initializing the context object also avoids repeatedly setting its initial state in different places, improving code reusability.

[0074] The message object includes the server's address information and the object identifier of the Trap message. Based on the server's address information and the object identifier of the Trap message included in the message object, it is determined whether the message object targets a server managed by the monitoring platform, and whether the message object has corresponding rule information, thus obtaining the filtered message object. Furthermore, the target number of the server and the target category of the target asset information corresponding to the filtered message object are obtained. The filtered message object is the message object corresponding to the asset information of the server managed by the monitoring platform. Specifically, the existence of corresponding rule information for the message object is determined through the rule base.

[0075] Optionally, the step of filtering the message object based on the server address information contained in the message object, the object identifier of the Trap message included in the message object, and the rule base to obtain the target number of the server and the target category of the target asset information corresponding to the filtered message object may include: querying whether the target number of the server corresponding to the address information exists based on the server address information contained in the message object; if the target number exists, querying whether the target correspondence of the object identifier of the Trap message exists in the rule base based on the object identifier of the Trap message included in the message object; if the target correspondence of the object identifier of the Trap message exists in the rule base, determining the target category of the target asset information corresponding to the object identifier of the Trap message that has changed based on the target correspondence; and filtering out the message object if the target number does not exist and / or the target correspondence does not exist in the rule base.

[0076] Optionally, an address information filter can be set up to filter servers based on their address information. The server's address information is input into the address information filter, which then queries the server ID. If the server ID does not exist on the monitoring platform, there is no need to update the server's asset information, and the process terminates. If the server ID exists on the monitoring platform, further filtering of the message objects will be performed subsequently.

[0077] Optionally, a server ID list can be pre-defined, where each ID corresponds to a server managed by the monitoring platform. The target ID of a server is determined using its address information and searched in the server ID list. If the target ID is not found in the list, the monitoring platform does not manage that server; therefore, there is no need to update the server's asset information, and the process can be terminated. If the target ID is found in the list, the monitoring platform manages that server, and further filtering of message objects is performed subsequently.

[0078] After performing the first step of filtering the message object based on the server's address information, the server number corresponding to the server address information that passed the first step of filtering is updated in the context object, and then the next step is performed.

[0079] When the monitoring platform manages the server, it queries the rule base to see if a target correspondence containing the object identifier of the Trap message exists, based on the object identifier of the Trap message included in the message object. If a target correspondence containing the object identifier of the Trap message exists in the rule base, the target category of the target asset information corresponding to the object identifier of the Trap message that has undergone change can be determined based on the correspondence.

[0080] Optionally, an object identifier filter can be set up to filter message objects based on the object identifier of the Trap message. The object identifier of the Trap message is input into the object identifier filter, which queries the rule base for the Trap message's object identifier. If the object identifier of the Trap message does not exist in the rule base, execution terminates. If the object identifier of the Trap message exists in the rule base, subsequent processing is performed.

[0081] After performing the second-step filtering of message objects based on the object identifier of the Trap message, the target category of the asset information corresponding to the object identifier of the Trap message that passed the second-step filtering is updated in the context object, and then the next operation is performed.

[0082] It is understood that the terms such as target number, target asset information, and target category used in the embodiments of this disclosure are merely for distinguishing purposes and should not be construed as limiting the scope of this disclosure.

[0083] By filtering message objects, it can be determined that the asset information corresponding to the message object is asset information managed by the monitoring platform, thereby avoiding unnecessary work on asset information not managed by the monitoring platform and saving resources. The context object is updated according to the target category and the target number to obtain the updated context object. Based on the updated context object, it is beneficial to compare it with other context objects in the buffer queue later.

[0084] During the filtering process of message objects, the target ID of the server and the target category of the target asset information corresponding to the filtered message object can be obtained. The message processor has a built-in buffer queue, which includes various context objects. Each context object includes a pair of server IDs and asset information categories. The buffer queue is queried to determine whether there is a context object in the buffer queue that is the same as the newly generated context object. If it exists, the execution terminates; otherwise, the updated context object is stored in the buffer queue.

[0085] If a context object identical to the newly generated context object exists in the buffer queue, it's highly likely that the asset information update is being performed repeatedly, thus eliminating the need to store the context object in the buffer queue again. Furthermore, since a context object represents asset information for a specific category on a server, updating asset information based on a context object will update the information for all assets within that category, again eliminating the need to store the context object in the buffer queue.

[0086] The message handler can have a built-in timer that triggers execution at fixed intervals to periodically retrieve the current length of the buffer queue and extract each context object from it. The fixed interval for the timer can be set according to actual needs; this disclosure does not impose any restrictions on it.

[0087] After retrieving each message object from the buffer queue, the context objects are grouped and merged according to their server IDs to obtain the IDs of each server to be collected and a list of asset information categories that have changed in each server. This allows for the identification of the asset information categories to be collected from each server, enabling rapid collection of asset information from a single server.

[0088] Based on the server numbers to be collected and the list of asset information categories that have changed in each server, asset information collection parameters are constructed. The asset information collection parameters may include at least one or more of the following: server number, server address information, model, manufacturer, list of changed asset information categories, protocol, etc.

[0089] Based on the asset information collection parameters, a collection command is generated for the changed asset information on each of the servers to be collected, and the collection command is issued by calling the collection interface of the collector. The collection command includes the asset information collection parameters.

[0090] The collector receives a collection command from the message processor and executes the collection operation according to the collection command. Optionally, the collector constructs a collection task according to the collection command; submits the collection task to a thread pool, and uses the thread pool to asynchronously execute the collection of the target asset information; and reports the collected target asset information to the data parser.

[0091] The data collector constructs various data collection tasks based on the asset information collection parameters included in the collection command. Each task is then submitted to the collector's built-in thread pool, where multiple threads asynchronously execute the collection of asset information for each category from the respective servers. After the asset information collection is complete, the collected asset information is reported to the data parser.

[0092] After receiving the collected asset information, the data parser performs parsing and persistence operations on the asset information. Optionally, it can determine the target number of the server corresponding to the target asset information, and determine whether the server corresponding to the target number exists; if the server corresponding to the target number exists, it obtains the target category of the target asset information; based on the target category of the target asset information, it determines the parsing plugin corresponding to the target category, and submits the target asset information to the parsing plugin; it obtains the target data parsed by the parsing plugin, queries data records, and compares the target data with the data records; if no identical change record for the target data is recorded in the data records, it updates the asset information of the server based on the target data, and records the change record of the asset information of the server. If identical change record for the target data is recorded in the data records, it deletes the target data.

[0093] The data parser pre-verifies the collected asset information. Based on the server ID corresponding to the asset information, it determines whether the server exists. The method for determining server existence can refer to the first step of filtering message objects based on server address information described earlier. If the server ID exists, proceed to the next step. If it does not exist, execution terminates. The asset information category is obtained, and the corresponding parsing plugin is searched for by category. After finding the parsing plugin, the asset information is submitted to it. The parsing plugin parses the asset information to obtain the target data. Existing data records are queried and compared with the target data obtained from parsing the newly collected asset information. If no identical change record for the target data is recorded in the data records, the asset information of the server is updated according to the target data, and the change record for the server's asset information is recorded. If an identical change record for the target data is recorded in the data records, the target data is directly deleted to avoid duplicate operations.

[0094] By employing the technical solution disclosed in this embodiment, a rule base is pre-built. The rule base includes the correspondence between the object identifiers of each Trap message and the categories of asset information that have changed corresponding to the Trap message. A Trap listener can listen to Trap messages sent by the server, extract the server's address information and the object identifier of the Trap message from the Trap message, and generate a message object based on the server's address information and the object identifier of the Trap message. A message processor can generate a collection instruction for the target asset information based on the message object, and then the collector collects the target asset information according to the collection instruction, thereby enabling the data parser to perform persistence operations on the target asset information. In this way, by listening to Trap messages, timely collection and updating of the changed asset information of the server can be achieved without modifying or updating the server's BMC system, thus ensuring the real-time nature and accuracy of the asset information.

[0095] Based on the MIB libraries of various vendors' servers, a rule base was built, establishing a correspondence between Trap OIDs and asset update categories. By listening to and parsing server Trap messages, the system can promptly detect the category of changes in server asset information without modifying the BMCs of various vendors' servers. This allows for the collection and data processing of the corresponding asset information, enhancing the real-time performance and accuracy of server asset information on the monitoring platform and facilitating more accurate asset inventory and management.

[0096] The technical solution disclosed in this embodiment is based on the characteristic that server Trap message generation is often accompanied by changes in server device information. It utilizes the MIB libraries of various vendors to construct a rule base that maps Trap OIDs to different categories of server device information changes. Through the combined processing of Trap listeners and message processors, it can promptly detect changes in server device information and the categories of those changes. The message processor uses a built-in buffer queue and timer to filter and group messages, avoiding the problem of repeated and frequent data collection caused by short-term message concurrency. It can promptly issue asset information collection commands for the corresponding server category to the collector, and the collector and data parser complete data synchronization and persistence. Through the cooperation of the rule base, Trap listeners, message processors, collectors, and data parsers, real-time detection of server device information changes and timely synchronization of changed information are achieved without updating or modifying the BMCs of various vendors' servers.

[0097] Figure 3 This is a schematic diagram illustrating the steps of a server information processing method according to an embodiment of this disclosure. The server information processing method is applied to a server information processing system, which includes a rule base, a Trap listener, a message processor, a collector, and a data parser. The rule base includes the correspondence between the object identifier of each Trap message and the category of the asset information that caused the change corresponding to the Trap message. Figure 3 As shown, the server information processing method includes steps S11 to S17.

[0098] In step S11, when a Trap message sent by the server is detected, the server's address information and the object identifier of the Trap message are extracted from the Trap message, and a message object is generated based on the server's address information and the object identifier of the Trap message.

[0099] In step S12, based on the message object and the rule base, the target category of the target asset information that caused the change and the target number of the server where the target asset information is located are determined, and based on the target category and the target number, a collection instruction for the target asset information of the target category in the server corresponding to the target number is generated.

[0100] In step S13, the target asset information is collected according to the collection instruction, and the target asset information is reported to the data parser.

[0101] In step S14, the target asset information is persisted.

[0102] Optionally, step S11 can be executed by the Trap listener in the server information processing system, step S12 can be executed by the message processor in the server information processing system, step S13 can be executed by the collector in the server information processing system, and step S14 can be executed by the data parser in the server information processing system. The specific implementation methods for the above steps can be found in the preceding text.

[0103] Optionally, the step of determining the target category of the changed target asset information and the target number of the server where the target asset information is located based on the message object and the rule base, and generating a collection instruction for the target asset information of the target category in the server corresponding to the target number based on the target category and the target number, includes:

[0104] Receive the message object sent by the Trap listener and initialize the context object of the message processor;

[0105] Based on the server address information contained in the message object, the object identifier of the Trap message included in the message object, and the rule base, the message object is filtered to obtain the target number of the server and the target category of the target asset information corresponding to the filtered message object;

[0106] The context object is updated based on the target category and the target number to obtain the updated context object;

[0107] Query the server ID and asset information category of each server in the buffer queue. If the target ID and target category are not included in the buffer queue, store the updated context object into the buffer queue.

[0108] Periodically retrieve each context object from the buffer queue, and group and merge each context object according to the server number to obtain the number of each server to be collected and a list of categories of asset information that has changed in each server to be collected.

[0109] Based on the number of each server to be collected and the list of asset information categories that have changed in each server to be collected, asset information collection parameters are constructed.

[0110] Based on the asset information collection parameters, a collection command is generated for the asset information that has changed in each of the servers to be collected.

[0111] Optionally, the step of filtering the message object based on the server address information contained in the message object, the object identifier of the Trap message included in the message object, and the rule base to obtain the target number of the server and the target category of the target asset information corresponding to the filtered message object includes:

[0112] Based on the address information of the server contained in the message object, query whether the target number of the server corresponding to the address information exists;

[0113] If the target number exists, based on the object identifier of the Trap message included in the message object, query whether there is a target correspondence relationship of the object identifier of the Trap message in the rule base;

[0114] If a target correspondence exists for the object identifier of the Trap message in the rule base, the target category of the target asset information that will be changed corresponding to the object identifier of the Trap message is determined according to the target correspondence.

[0115] If the target number does not exist and / or the target correspondence does not exist in the rule base, the message object is filtered out.

[0116] Optionally, the step of collecting the target asset information according to the collection instruction and reporting the target asset information to the data parser includes:

[0117] Based on the acquisition command, an acquisition task is constructed;

[0118] The collection task is submitted to a thread pool, and the thread pool is used to asynchronously collect the target asset information.

[0119] The collected target asset information is reported to the data parser.

[0120] Optionally, the persistence operation on the target asset information includes:

[0121] Determine the target number of the server corresponding to the target asset information, and determine whether the server corresponding to the target number exists;

[0122] If the server corresponding to the target number exists, the target category for obtaining the target asset information is determined.

[0123] Based on the target category of the target asset information, determine the parsing plugin corresponding to the target category, and submit the target asset information to the parsing plugin;

[0124] Obtain the target data parsed by the parsing plugin, query the data records, and compare the target data with the data records;

[0125] If no identical change record for the target data is recorded in the data record, the asset information of the server is updated according to the target data, and the change record of the asset information of the server is recorded.

[0126] Optionally, the persistence operation on the target asset information includes:

[0127] If the same change record for the target data is recorded in the data record, the target data is deleted.

[0128] Optionally, the rule base generation step includes at least one or more of the following:

[0129] The rule base is generated based on the management information base of each of the servers;

[0130] The rule base is generated based on the correspondence between the object identifier of the Trap message input by the user and the category of the asset information that caused the change corresponding to the Trap message;

[0131] The rule base is generated based on the template files imported in batches.

[0132] Figure 4This is a flowchart illustrating a server information processing method according to an embodiment of this disclosure. A Trap listener listens for Trap messages sent by the server and preprocesses them, extracting the server's address information and the object identifier of the Trap message. Based on these information, a message object is constructed and sent to the message processor. The message processor constructs a context object, filtering by address information to determine if the server exists. If the server does not exist, execution terminates; if it does, the server's ID is updated in the context object. The message processor also filters by OID to determine if the OID exists in the rule base. If it does not exist, execution terminates; if it does, the category of the asset information corresponding to the OID is updated in the context object. Data deduplication is performed based on whether the context object exists in the buffer queue. If the context object exists in the buffer queue, execution terminates; otherwise, it is stored in the buffer queue. The message processor's built-in timer periodically extracts each context object from the buffer queue, groups and merges the data from each context object, constructs asset information collection parameters, and issues collection commands. The collector executes the collection task according to the collection command and reports the collected asset information to the data parser. The data parser performs data parsing and persistence operations on the collected asset information.

[0133] By employing the technical solution disclosed in this embodiment, a rule base is pre-built. The rule base includes the correspondence between the object identifiers of each Trap message and the categories of asset information that have changed corresponding to the Trap message. A Trap listener can listen to Trap messages sent by the server, extract the server's address information and the object identifier of the Trap message from the Trap message, and generate a message object based on the server's address information and the object identifier of the Trap message. A message processor can generate a collection instruction for the target asset information based on the message object, and then the collector collects the target asset information according to the collection instruction, thereby enabling the data parser to perform persistence operations on the target asset information. In this way, by listening to Trap messages, timely collection and updating of the changed asset information of the server can be achieved without modifying or updating the server's BMC system, thus ensuring the real-time nature and accuracy of the asset information.

[0134] It should be noted that, in the embodiments of this disclosure, for the sake of simplicity, the technical solutions are described as a series of actions. However, those skilled in the art should understand that the embodiments of this disclosure are not limited to the described order of actions, because according to the embodiments of this disclosure, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily essential to the embodiments of this disclosure.

[0135] This disclosure also provides an electronic device, with reference to... Figure 5 , Figure 5 This is a schematic diagram of an electronic device illustrated in an embodiment of this disclosure. For example... Figure 5 As shown, the electronic device 100 includes a memory 110 and a processor 120. The memory 110 and the processor 120 are connected via a bus for communication. The memory 110 stores a computer program that can run on the processor 120 to implement the steps in the server information processing method disclosed in this embodiment.

[0136] This disclosure also provides a non-volatile readable storage medium that, when the instructions in the non-volatile readable storage medium are executed by a processor of an electronic device, enables the electronic device to perform the steps in the server information processing method disclosed in this disclosure.

[0137] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0138] Those skilled in the art will understand that the embodiments disclosed herein can be provided as methods, apparatus, or computer program products. Therefore, the embodiments disclosed herein can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the embodiments disclosed herein can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0139] This disclosure describes embodiments of methods, apparatus, electronic devices, and computer program products according to embodiments of this disclosure with reference to flowchart illustrations and / or block diagrams. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0140] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0141] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0142] Although some embodiments of the present disclosure have been described, those skilled in the art, upon learning the basic inventive concept, can make further changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the present disclosure.

[0143] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.

[0144] The above provides a detailed description of a server information processing system, method, electronic device, and storage medium provided by this disclosure. Specific examples have been used to illustrate the principles and implementation methods of this disclosure. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this disclosure. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this disclosure. Therefore, the content of this specification should not be construed as a limitation of this disclosure.

Claims

1. A server information processing system, characterized in that, The server information processing system includes a rule base, a Trap listener, a message processor, a collector, and a data parser; the rule base includes: the correspondence between the object identifier of each Trap message and the category of the asset information that caused the change corresponding to the Trap message; The Trap listener is used to extract the server's address information and the object identifier of the Trap message from the Trap message when it detects a Trap message sent by the server, and to generate a message object based on the server's address information and the object identifier of the Trap message. The message processor is configured to determine the target category of the target asset information that has changed and the target number of the server where the target asset information is located, based on the message object and the rule base, and generate a collection instruction for the target asset information of the target category in the server corresponding to the target number, based on the target category and the target number. The collector is used to collect the target asset information according to the collection instruction, and report the target asset information to the data parser; The data parser is used to perform persistence operations on the target asset information.

2. The system according to claim 1, characterized in that, The message processor is specifically used for: Receive the message object sent by the Trap listener and initialize the context object of the message processor; Based on the server address information contained in the message object, the object identifier of the Trap message included in the message object, and the rule base, the message object is filtered to obtain the target number of the server and the target category of the target asset information corresponding to the filtered message object; The context object is updated based on the target category and the target number to obtain the updated context object; Query the server ID and asset information category of each server in the buffer queue. If the target ID and target category are not included in the buffer queue, store the updated context object into the buffer queue. Periodically retrieve each context object from the buffer queue, and group and merge each context object according to the server number to obtain the number of each server to be collected and a list of categories of asset information that has changed in each server to be collected. Based on the number of each server to be collected and the list of asset information categories that have changed in each server to be collected, asset information collection parameters are constructed. Based on the asset information collection parameters, a collection instruction is generated for the asset information that has changed in each of the servers to be collected.

3. The system according to claim 2, characterized in that, The step of filtering the message object based on the server address information contained in the message object, the object identifier of the Trap message included in the message object, and the rule base to obtain the target number of the server and the target category of the target asset information corresponding to the filtered message object includes: Based on the address information of the server contained in the message object, query whether the target number of the server corresponding to the address information exists; If the target number exists, based on the object identifier of the Tra p message included in the message object, query whether there is a target correspondence relationship of the object identifier of the Tra p message in the rule base; If a target correspondence exists for the object identifier of the Trap message in the rule base, the target category of the target asset information that will be changed, corresponding to the object identifier of the Trap message, is determined according to the target correspondence. If the target number does not exist and / or the target correspondence does not exist in the rule base, the message object is filtered out.

4. The system according to claim 1, characterized in that, The collector is specifically used for: Based on the acquisition instructions, an acquisition task is constructed; The collection task is submitted to a thread pool, and the thread pool is used to asynchronously collect the target asset information. The collected target asset information is reported to the data parser.

5. The system according to claim 1, characterized in that, The data parser is specifically used for: Determine the target number of the server corresponding to the target asset information, and determine whether the server corresponding to the target number exists; If the server corresponding to the target number exists, the target category for obtaining the target asset information is determined. Based on the target category of the target asset information, determine the parsing plugin corresponding to the target category, and submit the target asset information to the parsing plugin; Obtain the target data parsed by the parsing plugin, query the data records, and compare the target data with the data records; If no identical change record for the target data is recorded in the data record, the asset information of the server is updated according to the target data, and the change record of the asset information of the server is recorded.

6. The system according to claim 5, characterized in that, The data parser is specifically used for: If the same change record for the target data is recorded in the data record, the target data is deleted.

7. The system according to any one of claims 1-6, characterized in that, The rule base generation steps include at least one or more of the following: The rule base is generated based on the management information base of each of the servers; The rule base is generated based on the correspondence between the object identifier of the Tra p message input by the user and the category of the asset information that caused the change corresponding to the Tra p message; The rule base is generated based on the template files imported in batches.

8. A server information processing method, characterized in that, The method, applied to a server information processing system, includes: Upon receiving a Trap message from the server, the server's address information and the object identifier of the Trap message are extracted from the Trap message, and a message object is generated based on the server's address information and the object identifier of the Trap message. Based on the message object and the rule base, the target category of the target asset information that caused the change and the target number of the server where the target asset information is located are determined. Based on the target category and the target number, a collection instruction for the target asset information of the target category in the server corresponding to the target number is generated. The rule base includes: the correspondence between the object identifier of each Trap message and the category of the asset information that caused the change corresponding to the Trap message. According to the acquisition instruction, the target asset information is acquired and reported to the data parser; The target asset information is persisted.

9. An electronic device, characterized in that, include: processor; A memory for storing processor-executable instructions; wherein the processor is configured to execute the instructions to implement the server information processing method as described in claim 8.

10. A non-volatile readable storage medium, wherein when instructions in the non-volatile readable storage medium are executed by a processor of an electronic device, the electronic device is able to perform the server information processing method as described in claim 8.

Citation Information

Patent Citations

  • Asset safety assessment method and system based on intelligence analysis

    CN111866027A

  • Asset information updating method and device, equipment and medium

    CN112261175A