Resource inspection method and device, electronic equipment and storage medium

Through automated resource inspection paths and event triggering mechanisms, the problems of resource inspection in the existing technology are solved, which are time-consuming, labor-intensive, incomplete coverage and in-depth detection, achieving more efficient and comprehensive resource inspections, and improving system stability and user experience.

CN119759680APending Publication Date: 2025-04-04BEIJING TEAMSUN TECH
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411644690.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-18
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

The existing resource inspection mechanism has problems such as manual time-consuming and labor-intensive, lack of unified standards, incomplete coverage and in-depth inspections, resulting in poor inspection results and it is difficult to fully play the preventive role.

Method used

Provide a resource inspection method, which generates inspection reports and exports by determining the resource inspection path, including the inspection sequence and inspection indicators between the resources to be inspected, automating the inspection process, triggering inspections regularly or events.

Benefits of technology

It improves the degree of automation and coverage of inspections, ensures that all key resources are fully covered and in-depth inspections, and improves the overall management level and business continuity of system resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119759680A_ABST
    Figure CN119759680A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a resource inspection method and device, electronic equipment and a storage medium, and the method comprises the steps: determining a resource inspection path which comprises an inspection sequence of to-be-inspected resources and inspection indexes under inspection items of the to-be-inspected resources; according to the determined resource routing inspection path, routing inspection is carried out on the corresponding resources; and generating and exporting an inspection report according to the resource inspection result. According to the technical scheme provided by the embodiment of the invention, the automation degree and coverage range of inspection can be improved, and the overall management level of system resources is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a resource inspection method, device, electronic equipment and storage medium. Background Art

[0002] At present, in computer systems, there are many key resources such as databases, middleware, application software resources, host storage and networks. The health status of these resources directly affects the stability of the system and business continuity. Regular inspections of these resources can not only help identify and eliminate hidden dangers in advance, significantly reduce the probability of system failures, and ensure the smooth operation of the business, but also ensure the best use of resources by continuously monitoring various performance indicators, thereby improving the overall performance of the system and user experience.

[0003] Resource inspection is crucial to the stable operation of the system, but the existing inspection mechanism often has some shortcomings. First, manual inspection is time-consuming and labor-intensive, and it is easy for important problems to be missed due to human negligence. Secondly, there is a lack of unified inspection standards and specifications. Different personnel may have different focuses and omissions when performing inspections, resulting in inconsistent inspection results. In addition, existing inspection tools may not cover all key resources, or the detection of certain complex problems is not in-depth enough to fully reflect the health status of the system. These problems have greatly reduced the effectiveness of inspections and made it difficult to fully play their due preventive role. Summary of the invention

[0004] In view of this, an embodiment of the present invention provides a resource inspection method, device, electronic device and storage medium to improve the automation and coverage of the inspection and enhance the overall management level of system resources.

[0005] In a first aspect, an embodiment of the present invention provides a resource inspection method, including:

[0006] Determine a resource inspection path, wherein the path includes an inspection sequence between resources to be inspected and inspection indicators under inspection items of the resources to be inspected;

[0007] Inspect the corresponding resources according to the determined resource inspection path;

[0008] Generate and export inspection reports based on resource inspection results.

[0009] Furthermore, the method further comprises:

[0010] Regularly trigger inspections of all system resources;

[0011] When an inspection trigger event is detected, and the time interval between the occurrence time and the next scheduled inspection is greater than the set time threshold, an inspection of the target class resources associated with the event is triggered.

[0012] Furthermore, when an inspection triggering event is detected, and the time interval between the occurrence time and the next scheduled inspection is greater than the set time threshold, an inspection of the target class resources associated with the event is triggered, including:

[0013] When an alarm of a set type is detected on the device where the resource is located, and the time interval between the alarm occurrence time and the next scheduled inspection is greater than the maximum time taken for a single successful completion of a scheduled inspection task in the historical records, an inspection of all system resources is triggered;

[0014] When it is detected that an operation and maintenance operation has been performed on a resource, and the time interval between the completion of the operation and the next scheduled inspection is greater than the maximum time taken for a single successful completion of a scheduled inspection task in the historical records, an inspection of the target class resources associated with the operation and maintenance operation is triggered.

[0015] Furthermore, the method further comprises:

[0016] Identify resource operation and maintenance operations, and capture the operated resources as the first target type resources associated with the operation and maintenance operations;

[0017] Starting from the first type of target resources, traverse the pre-built resource dependency graph and determine all other affected resources as the second type of target resources associated with the operation and maintenance operation.

[0018] Furthermore, an inspection report is generated based on the resource inspection results, including:

[0019] Based on the inspection indicators in the resource inspection results, determine the number of sub-tables in the pre-created inspection report;

[0020] Get the display style configuration of the subtable;

[0021] Generate sub-tables in the inspection report based on the number of sub-tables, display style configuration, and data structuring degree of resource inspection results to record resource inspection results.

[0022] In a second aspect, an embodiment of the present invention provides a resource inspection device, including:

[0023] A path determination unit, used to determine a resource inspection path, wherein the path includes an inspection sequence between resources to be inspected and inspection indicators under inspection items of the resources to be inspected;

[0024] The inspection execution unit is used to inspect the corresponding resources according to the determined resource inspection path;

[0025] The result output unit is used to generate and export inspection reports based on resource inspection results.

[0026] Furthermore, the device also includes a patrol trigger unit, which includes:

[0027] The scheduled inspection trigger subunit is used to trigger the inspection of all system resources at a scheduled time;

[0028] The event inspection trigger subunit is used to trigger the inspection of the target class resources associated with the event when the inspection trigger event is detected and the time interval between the occurrence time and the next scheduled inspection is greater than the set time threshold.

[0029] Furthermore, the event inspection triggering subunit is specifically used for:

[0030] When an alarm of a set type is detected on the device where the resource is located, and the time interval between the alarm occurrence time and the next scheduled inspection is greater than the maximum time taken for a single successful completion of a scheduled inspection task in the historical records, an inspection of all system resources is triggered;

[0031] When it is detected that an operation and maintenance operation has been performed on a resource, and the time interval between the completion of the operation and the next scheduled inspection is greater than the maximum time taken for a single successful completion of a scheduled inspection task in the historical records, an inspection of the target class resources associated with the operation and maintenance operation is triggered.

[0032] Furthermore, the event inspection triggering subunit is also used for:

[0033] Identify resource operation and maintenance operations, and capture the operated resources as the first target type resources associated with the operation and maintenance operations;

[0034] Starting from the first type of target resources, traverse the pre-built resource dependency graph and determine all other affected resources as the second type of target resources associated with the operation and maintenance operation.

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

[0036] Based on the inspection indicators in the resource inspection results, determine the number of sub-tables in the pre-created inspection report;

[0037] Get the display style configuration of the subtable;

[0038] Generate sub-tables in the inspection report based on the number of sub-tables, display style configuration, and data structuring degree of resource inspection results to record resource inspection results.

[0039] In a third aspect, an embodiment of the present invention provides an electronic device, comprising: a housing, a processor, a memory, a circuit board and a power supply circuit, wherein the circuit board is arranged inside a space enclosed by the housing, and the processor and the memory are arranged on the circuit board; the power supply circuit is used to supply power to various circuits or devices of the above-mentioned electronic device; the memory is used to store executable program code; the processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to execute the resource inspection method described in the first aspect above.

[0040] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more central processing units to implement the resource inspection method described in the first aspect above. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0042] Figure 1 A flowchart of a resource inspection method provided in Embodiment 1 of the present invention;

[0043] Figure 2 A flowchart of a resource inspection method provided in Embodiment 2 of the present invention;

[0044] Figure 3 A flowchart of a resource inspection method provided in Embodiment 3 of the present invention;

[0045] Figure 4 A schematic diagram of the structure of a resource inspection device provided in Embodiment 4 of the present invention;

[0046] Figure 5 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0047] The embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0048] It should be clear that 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 ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0049] Embodiment 1

[0050] This embodiment provides a resource inspection method, which can be executed by a resource inspection device. Figure 1 , the method includes the following steps 101-103.

[0051] Step 101: Determine a resource inspection path, wherein the path includes an inspection sequence between resources to be inspected and inspection indicators under inspection items of the resources to be inspected.

[0052] In this embodiment, the computer system resources can be pre-divided into multiple categories according to the set resource division method, and the inspection items and inspection indicators under the inspection items of each resource can be set. Specifically, the computer system resources can be divided into the following categories according to the purpose of the resources:

[0053] (1) Infrastructure resources: basic hardware and software that support system operation, including computing resources (servers, workstations), storage resources (disk arrays, NAS, SAN), and network resources (routers, switches, firewalls);

[0054] (2) Application resources: resources that support specific applications and services, including: Web applications (Web servers, application servers), databases (database management systems, caches); middleware (message queues, transaction management);

[0055] (3) Security resources: Resources used to protect system security, including: identity authentication (LDAP, Active Directory), encryption (SSL / TLS certificates), intrusion detection (IDS, IPS), and log management (SIEM system).

[0056] Alternatively, computer system resources are classified by their physical and logical attributes, including:

[0057] (1) Physical resources: resources directly related to hardware, including computing resources (CPU, GPU, FPGA), storage resources (hard disk, SSD, tape drive), network resources (network card, router, switch), input and output devices (keyboard, mouse, monitor, printer);

[0058] (2) Logical resources: resources related to software and abstract concepts, including computing resources (processes, threads, virtual machines), storage resources (file systems, databases, caches), network resources (IP addresses, ports, domain names), and service resources (Web services, database services, message queues).

[0059] Of course, those skilled in the art should understand that computer system resources may also be divided in other ways, and this embodiment does not specifically limit this.

[0060] For each resource of the computer system, a group of inspection items and one or more inspection indicators under each inspection item in the group may be pre-set by a person skilled in the art. The indicator is a specific measurement or checkpoint used to quantify the inspection item. For example, a group of inspection items of a computing resource and the inspection indicators under each inspection item in the group may specifically include:

[0061] Inspection item 1: CPU utilization. The corresponding inspection indicators include: average CPU utilization, peak CPU utilization, idle CPU utilization, and CPU utilization per core.

[0062] Inspection item 2: CPU load. The corresponding inspection indicators include: 1-minute average load, 5-minute average load, and 15-minute average load.

[0063] Inspection item 3: CPU process. The corresponding inspection indicators include: the number of currently running processes, the number of currently blocked processes, and the number of currently waiting processes.

[0064] Preferably, multiple general inspection indicators can be set for multiple resources of the computer system according to specific needs and resource characteristics. These indicators can be reused in different resource types, such as: utilization (measurement of resource usage), load (measurement of resource load), error rate (measurement of resource error conditions), delay (measurement of resource response time), etc.

[0065] After detecting that a manual or automatic inspection of some or all resources in the computer system has been triggered, these resources are used as the specific objects of this inspection, and the corresponding resource path to be inspected is determined. The path specifically includes the following two aspects: the inspection order between the resources to be inspected, and the inspection indicators under the inspection items of the resources to be inspected. In this embodiment, the inspection order of each resource of the computer system can be regularly ranked based on the importance of the resource, the previous inspection results, the status of the resource, etc., which may specifically include:

[0066] Get the importance and historical inspection results of each resource;

[0067] Monitor the current status of resources in real time, and record load, anomalies, and alarms;

[0068] According to the preset scoring criteria and calculation formula, the total score of each resource is calculated based on the real-time monitoring results of the acquisition results;

[0069] Resources are sorted from high to low based on their total scores, and resources with high scores are inspected first.

[0070] Among them, the importance of resources can be determined based on the criticality of the resources in the business and the scope of their impact on other resources. The more critical the resources are in the business and the larger the scope of their impact, the higher their importance. The historical inspection results of resources can provide historical data to help identify which resources are more prone to problems. Resources can be scored based on the frequency and severity of past failures. Resources with frequent historical failures and recent serious problems will be given a higher priority and inspected first. The current status of resources can reflect their current health status and help determine which resources need immediate attention. For example, resources with high load, abnormal status, and alarm status should be inspected first.

[0071] After each inspection is triggered, the inspection order between the resources to be inspected is directly obtained from the inspection order ranking of each resource of the computer system calculated the most recently. In addition, it is also possible to choose not to pre-calculate the inspection order ranking, but to determine the inspection order of the resources to be inspected in real time after each inspection is triggered. This embodiment does not make specific limitations on this.

[0072] Step 102: Inspect the corresponding resources according to the determined resource inspection path.

[0073] When performing resource inspections, a series of rigorous and systematic steps must be followed to ensure effective monitoring and management of resources. The following is a detailed description of the inspection execution process.

[0074] First, enter the initialization phase of the inspection environment. This phase includes two core tasks: tool preparation and data collection environment construction. In terms of tool preparation, it is necessary to ensure that all necessary inspection tools and scripts, such as Prometheus and Grafana monitoring tools, ELK Stack log management tools, and Nmap network scanning tools, have been properly prepared and are in a usable state. At the same time, for subsequent data processing and analysis, it is also necessary to build a complete data collection environment, including database establishment and log file configuration.

[0075] Next, the actual operation phase of inspecting resources is entered. In this phase, the resource inspection path determined in step 101 needs to be read from the configuration file or database. The path lists in detail the inspection sequence of the resources to be inspected and the corresponding inspection items and inspection indicators. Then, the inspection process for each resource is started one by one according to the established inspection sequence.

[0076] When performing specific inspection items, you first need to establish a connection with the resource to be inspected to ensure that you can successfully access and read its relevant information. Then, according to the preset inspection items and inspection indicators, use appropriate commands or tools to collect data. For example, use the top or ps command to obtain CPU utilization, use the free-m command to view memory usage, use the df-h command to understand disk usage, and use the iftop or nethogs command to monitor network bandwidth. The collected data must be recorded in a log file or database in a timely manner for subsequent analysis and processing.

[0077] After completing data collection, the inspection result generation phase begins. First, the collected data needs to be parsed, and the status of each resource is judged to be normal or not based on the preset inspection indicator threshold. Finally, based on the parsing situation, the inspection result is generated, which may include the inspection result and abnormal situation description of each inspection indicator under each inspection item for each resource to be inspected.

[0078] Through the strict implementation of the above operations, the systematic, efficient and accurate inspection process can be ensured, providing strong guarantee for the stable operation of resources.

[0079] Step 103: Generate and export an inspection report based on the resource inspection results.

[0080] In this step, the sorted inspection result data can be filled into the corresponding report cells one by one according to the pre-designed report structure. In order to improve efficiency and accuracy, you can choose to use programming languages ​​(such as Python) or data processing tools (such as Power BI, Tableau) to realize automatic report generation, thereby saving time and reducing the possibility of human error. In the report preparation process, in order to more effectively convey key information or warn of abnormal data, the report format can be adjusted, including adjusting details such as fonts, colors, and styles. Once the report editing work is completed, you can select the appropriate report export format according to actual needs, such as PDF, Excel, or Word, and use the "Export" or "Save As" function of the selected tool to generate the final report file.

[0081] The technical solution provided in this embodiment has the following beneficial effects:

[0082] Automatic inspection route determination and execution: reduces manual intervention and improves inspection efficiency and accuracy;

[0083] Standardized inspection process: ensure that all inspection tasks are carried out according to unified standards and specifications, avoiding human differences;

[0084] Comprehensive coverage of key resources: Supports multiple resource types to ensure that all key resources are covered and tested in depth.

[0085] Embodiment 2

[0086] This embodiment provides a resource inspection method. Based on the above embodiment 1, the method adds an inspection triggering step and can still be executed by the resource inspection device. Figure 2 , the method includes the following steps 201-204.

[0087] Step 201: Trigger inspection of resources to be inspected.

[0088] In this step, the resources to be inspected may be part or all of the resources on the system, which may be determined according to the triggering mode of the inspection, wherein the triggering mode may be a timing trigger or an event trigger.

[0089] Preferably, two triggering modes are used to start the resource inspection task. On the one hand, the inspection of all system resources is triggered regularly; on the other hand, when the inspection triggering event is detected and the time interval between the occurrence time and the next scheduled inspection is greater than the set time threshold, the inspection of the target class resources associated with the event is triggered. Among them, the inspection triggering event may include alarms and resource operation and maintenance operations.

[0090] When the inspection trigger event is an alarm, the associated target class resources can be all system resources. When an alarm of the set type is detected on the device where the resource is located, and the time interval between the alarm occurrence time and the next scheduled inspection is greater than the maximum time taken for a single successful completion of a scheduled inspection task in the historical records, an inspection of all system resources is triggered. The set type of alarm is a predefined alarm type that requires special attention, such as high CPU utilization, insufficient disk space, network connection interruption, etc. The time interval between the alarm occurrence time and the next scheduled inspection time refers to the length of time from the time the alarm is detected to the start time of the next scheduled inspection. The system records the time it takes for each scheduled inspection task to be completed successfully from the start. Among these records, there is a longest time taken, which is the maximum time taken for a single successful completion of a scheduled inspection task.

[0091] When the inspection trigger event is a resource operation, the associated target class resource is related to the operation. When it is detected that an operation has been performed on a resource, and the time interval between the completion of the operation and the next scheduled inspection is greater than the maximum time taken for a single successful completion of a scheduled inspection task in the historical records, an inspection of the target class resource associated with the operation is triggered. The determination of the target class resource associated with the operation may include:

[0092] Identify resource operation and maintenance operations, and capture the operated resources as the first target category resources associated with the operation and maintenance operations; starting from the first category of target resources, traverse the pre-built resource dependency graph to determine all other affected resources as the second target category resources associated with the operation and maintenance operations.

[0093] In the specific implementation process, it is first necessary to clarify which operations belong to operation and maintenance operations. Usually, operation and maintenance operations include but are not limited to the following: version upgrade, space expansion, configuration modification, etc. These operations can usually be captured and recorded through monitoring systems, logging or other monitoring tools. When an operation and maintenance operation is detected, it is necessary to capture relevant information of the operation, including but not limited to:

[0094] Operation type: version upgrade, space expansion, configuration modification, etc.

[0095] Operation object: which resource (such as database, middleware, application server, etc.) is being operated on;

[0096] Operation time: record the time when the operation starts and ends;

[0097] Operator: records the person or script that performed the operation;

[0098] Operation details: specific operation steps and parameters;

[0099] Then, based on the captured operation information, determine the target class resources associated with the operation and maintenance operation, including:

[0100] (1) Directly related resources - first target category resources

[0101] Directly associated resources are resources that are directly operated on, for example:

[0102] Version upgrade: directly related resources are upgraded databases, application servers, etc.

[0103] Space expansion: The directly associated resource is the storage device being expanded;

[0104] Modify configuration: The directly associated resource is the application server or middleware whose configuration is modified;

[0105] (2) Indirectly related resources - second target category resources

[0106] Indirectly related resources are other resources that are affected by direct operations, such as:

[0107] Version upgrade: In addition to the database being upgraded, all applications and middleware that depend on the database also need to be considered;

[0108] Space expansion: In addition to the storage device being expanded, all applications and services that rely on the storage device must also be considered;

[0109] Modifying the configuration: In addition to modifying the application server configuration, you also need to consider all clients and servers that use the configuration.

[0110] In this embodiment, a resource dependency graph can be pre-constructed to display the dependency relationships between resources. For example, which applications does the database depend on, which middleware does the application depend on, etc. In the graph, each resource can be represented as a node, and the dependency relationships between resources are represented as edges or arrows connecting these nodes. Furthermore, based on the resource dependency graph, the affected paths can be identified, and all other affected resources can be found along these paths. For example, if a database is upgraded, then all applications that depend on the database need to be inspected.

[0111] Step 202: Determine a resource inspection path, wherein the path includes an inspection sequence between resources to be inspected and inspection indicators under inspection items of the resources to be inspected.

[0112] This step is the same as step 101 in the first embodiment and will not be described again.

[0113] Step 203: inspect the corresponding resources according to the determined resource inspection path.

[0114] This step is the same as step 102 in the first embodiment and will not be described again.

[0115] Step 204: Generate and export an inspection report based on the resource inspection results.

[0116] This step is the same as step 103 in the first embodiment and will not be described again.

[0117] In the technical solution provided by this embodiment, the timed trigger inspection mechanism ensures the periodic inspection of system resources, can timely discover and deal with potential problems, and improve the stability and reliability of the system. At the same time, the flexibility of triggering inspections according to specific events (such as alarms or operation and maintenance operations) enables the system to respond quickly at critical moments and conduct targeted inspections on key resources, thereby improving the efficiency and response speed of resource management. In addition, it is also possible to intelligently select the scope and target of inspections according to different types of alarms or operation and maintenance operations, thereby achieving accurate management of different types of resources, helping to improve the pertinence and effectiveness of inspections, and reducing the possibility of missed inspections and false detections. This inspection strategy that is dynamically adjusted according to the characteristics of the event enables the entire system to better adapt to changes and maintain efficient resource management.

[0118] Embodiment 3

[0119] Based on the above-mentioned embodiment 1, this embodiment further optimizes the step of "generating and exporting inspection reports according to resource inspection results", and the method can still be executed by the resource inspection device. Figure 3 , a resource inspection method includes the following steps 301-306.

[0120] Step 301: Determine a resource inspection path, wherein the path includes an inspection sequence between resources to be inspected and inspection indicators under inspection items of the resources to be inspected.

[0121] This step is the same as step 101 in the first embodiment and will not be described again.

[0122] Step 302: inspect the corresponding resources according to the determined resource inspection path.

[0123] This step is the same as step 102 in the first embodiment and will not be described again.

[0124] Step 303: Based on the inspection indicators in the resource inspection result, determine the number of sub-tables in the pre-created inspection report.

[0125] In this step, an inspection report can be created in advance. In the initial state, the number of sub-tables in the table can be 0 and the content can be empty. After the inspection is completed, all inspection indicators used in the resource inspection process triggered this time or multiple target inspection indicators specified by the user from all the inspection indicators are collected. Then, the collected inspection indicators are classified according to different dimensions (such as resource type, importance level, performance indicators, etc.). Furthermore, according to the number and nature of each type of inspection indicator, the number of sub-tables to be generated under each category is determined. For example, if there are 5 different inspection indicators under a certain category, you can choose to create a sub-table for these indicators, or display them separately to form multiple sub-tables. Preferably, when the inspection indicators of each resource to be inspected belong to general inspection indicators, each general inspection indicator can uniquely correspond to a sub-table in the inspection report.

[0126] Step 304: Get the display style configuration of the sub-table.

[0127] In this step, the display style configuration of the subtable can be obtained by reading a pre-created configuration file. The display style of the subtable set by the user according to his own needs can also be dynamically obtained through human-computer interaction. Among them, the display style of the subtable may include: basic display elements (subtable title, subtable field, data row, etc.), other display characteristics (font size, color, border, field attributes, operation rights, etc.). Typically, the display style includes:

[0128] Row style: single-row display or multi-row display; ① In single-row display, no matter the inspection result of an inspection indicator under an inspection item of a resource is one piece of data or multiple pieces of data, the result is displayed in one row; ② In multi-row display, if the inspection result of an inspection indicator under an inspection item of a resource is multiple pieces of data, each piece of data is displayed in a separate row;

[0129] Column style: The style of the columns corresponding to the resources, inspection items, inspection indicators, and inspection results of interest.

[0130] Step 305: Generate a sub-table in the inspection report to record the resource inspection result according to the number of sub-tables, display style configuration and data structuring degree of the resource inspection result.

[0131] In this step, you can generate an inspection report by performing the following operations:

[0132] ⑴ Collect inspection result data and remove invalid data;

[0133] (2) Analyze the degree of structuring of inspection result data;

[0134] For fully structured data, it can be directly read for subsequent sub-table filling without additional parsing;

[0135] For semi-structured data, read the structured element data and format the unstructured element data;

[0136] For unstructured data, natural language processing, text analysis and other technologies can be used to convert it into a structured format;

[0137] ⑶ Design the template of the sub-table according to the number of sub-tables and display style configuration;

[0138] (4) Extract the data related to the sub-table from the structured data, fill it into the sub-table template, and generate the sub-table;

[0139] ⑸ Combine the generated sub-tables into a complete inspection report and export it.

[0140] Each sub-table can be named according to the corresponding inspection indicator type, and the overall inspection report can be the instance name of the inspection task triggered this time. Of course, the structured conversion operation of the inspection result data is not necessary in all cases, depending on the format of the original data, the requirements of the report design, and the purpose of subsequent analysis or processing. For example, when the display style of the inspection report row is "multi-line display":

[0141] The inspection result corresponding to the inspection indicator is formatted data: the column corresponding to the inspection indicator in the report file is the formatted key. There may be multiple keys, and the value information corresponding to the key is the inspection result of the resource to be inspected;

[0142] The inspection result corresponding to the inspection indicator is unformatted data: the column corresponding to the inspection indicator in the report file is the inspection indicator name, and the RAW result information returned by the script that executes the inspection task is the inspection result of the resource to be inspected;

[0143] When the display style of the report row is "Single-line display": the corresponding column of the inspection indicator in the report file is the inspection indicator name, and the RAW result information returned by the script that executes the inspection task is the inspection result of the resource to be inspected.

[0144] Step 306: Export the generated inspection report including the sub-table.

[0145] In the technical solution provided by this embodiment, the number of sub-tables is automatically determined, which can ensure comprehensive coverage of all inspection indicators, avoid information omissions, and make the report logic clear and organized. Each sub-table focuses on a category or a group of closely related indicators, making the report content more organized and easy to understand. At the same time, this method enhances the flexibility of the report. The system can dynamically adjust the number of sub-tables to meet different needs, and has strong scalability and can automatically include new indicators without manual adjustment.

[0146] Embodiment 3

[0147] This embodiment provides a resource inspection device, which can be implemented by software and / or hardware, and is used to execute the resource inspection method described in the embodiment of the present invention. Figure 4 , the device specifically includes the following units:

[0148] A path determination unit 401 is used to determine a resource inspection path, wherein the path includes an inspection sequence between resources to be inspected and inspection indicators under inspection items of the resources to be inspected;

[0149] The inspection execution unit 402 is used to inspect the corresponding resources according to the determined resource inspection path;

[0150] The result output unit 403 is used to generate and export an inspection report according to the resource inspection result.

[0151] Furthermore, the resource inspection device in this embodiment further includes an inspection triggering unit 400, which includes:

[0152] The scheduled inspection trigger subunit 4001 is used to trigger the inspection of all system resources at a scheduled time;

[0153] The event inspection trigger subunit 4002 is used to trigger the inspection of the target class resources associated with the event when the inspection trigger event is detected and the time interval between the occurrence time and the next scheduled inspection is greater than the set time threshold.

[0154] Exemplarily, the event inspection trigger subunit 4002 is specifically used for:

[0155] When an alarm of a set type is detected on the device where the resource is located, and the time interval between the alarm occurrence time and the next scheduled inspection is greater than the maximum time taken for a single successful completion of a scheduled inspection task in the historical records, an inspection of all system resources is triggered;

[0156] When it is detected that an operation and maintenance operation has been performed on a resource, and the time interval between the completion of the operation and the next scheduled inspection is greater than the maximum time taken for a single successful completion of a scheduled inspection task in the historical records, an inspection of the target class resources associated with the operation and maintenance operation is triggered.

[0157] Furthermore, the event inspection trigger subunit 4002 is also used for:

[0158] Identify resource operation and maintenance operations, and capture the operated resources as the first target type resources associated with the operation and maintenance operations;

[0159] Starting from the first type of target resources, traverse the pre-built resource dependency graph and determine all other affected resources as the second type of target resources associated with the operation and maintenance operation.

[0160] Exemplarily, the result output unit 403 is specifically used for:

[0161] Based on the inspection indicators in the resource inspection results, determine the number of sub-tables in the pre-created inspection report;

[0162] Get the display style configuration of the subtable;

[0163] Generate sub-tables in the inspection report based on the number of sub-tables, display style configuration, and data structuring degree of resource inspection results to record resource inspection results.

[0164] The resource inspection device provided in this embodiment belongs to the same inventive concept as the aforementioned method embodiment. For technical details not described in this embodiment, reference can be made to the relevant description in the aforementioned method embodiment, and will not be repeated here.

[0165] Figure 5 FIG. 1 is a schematic diagram of the structure of an embodiment of an electronic device of the present invention, which can implement the process of the first embodiment, the second embodiment or the third embodiment of the present invention. Figure 5As shown, the above-mentioned electronic device may include: a shell 51, a processor 52, a memory 53, a circuit board 54 and a power supply circuit 55, wherein the circuit board 54 is arranged inside the space enclosed by the shell 51, and the processor 52 and the memory 53 are arranged on the circuit board 54; the power supply circuit 55 is used to supply power to various circuits or devices of the above-mentioned electronic device; the memory 53 is used to store executable program codes; the processor 52 runs the program corresponding to the executable program code by reading the executable program code stored in the memory 53, so as to execute the resource inspection method described in any of the above-mentioned embodiments.

[0166] The specific execution process of the above steps by the processor 52 and the steps further executed by the processor 52 by running the executable program code can be found in the description of the method embodiment of the present invention, which will not be repeated here.

[0167] The electronic device can be an electronic device with data processing capabilities that exists in various forms, such as a server that provides computing services. Its structure is similar to a general computer architecture, but because it needs to provide highly reliable services, it has higher requirements in terms of processing power, stability, reliability, security, scalability, manageability, etc.

[0168] Furthermore, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more central processing units to implement the resource inspection method described in the above embodiment.

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

[0170] In the embodiments of the present invention, the term "and / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent three situations: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship.

[0171] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.

[0172] In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0173] For the convenience of description, the above device is described by dividing the functions into various units / modules. Of course, when implementing the present invention, the functions of each unit / module can be implemented in the same or multiple software and / or hardware.

[0174] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.

[0175] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims

1. A resource inspection method, characterized in that: The method comprises: Determine a resource inspection path, wherein the path includes an inspection sequence between resources to be inspected and inspection indicators under inspection items of the resources to be inspected; Inspect the corresponding resources according to the determined resource inspection path; Generate and export inspection reports based on resource inspection results.

2. The method according to claim 1, characterized in that: The method further comprises: Regularly trigger inspections of all system resources; When an inspection trigger event is detected, and the time interval between the occurrence time and the next scheduled inspection is greater than the set time threshold, an inspection of the target class resources associated with the event is triggered.

3. The method according to claim 2, characterized in that When an inspection trigger event is detected and the time interval between the occurrence and the next scheduled inspection is greater than the set time threshold, the inspection of the target class resources associated with the event is triggered, including: When an alarm of a set type is detected on the device where the resource is located, and the time interval between the alarm occurrence time and the next scheduled inspection is greater than the maximum time taken for a single successful completion of a scheduled inspection task in the historical records, an inspection of all system resources is triggered; When it is detected that an operation and maintenance operation has been performed on a resource, and the time interval between the completion of the operation and the next scheduled inspection is greater than the maximum time taken for a single successful completion of a scheduled inspection task in the historical records, an inspection of the target class resources associated with the operation and maintenance operation is triggered.

4. The method according to claim 3, characterized in that The method further comprises: Identify resource operation and maintenance operations, and capture the operated resources as the first target type resources associated with the operation and maintenance operations; Starting from the first type of target resources, traverse the pre-built resource dependency graph and determine all other affected resources as the second type of target resources associated with the operation and maintenance operation.

5. The method according to any one of claims 1 to 4, characterized in that Generate inspection reports based on resource inspection results, including: Based on the inspection indicators in the resource inspection results, determine the number of sub-tables in the pre-created inspection report; Get the display style configuration of the subtable; Generate sub-tables in the inspection report based on the number of sub-tables, display style configuration, and data structuring degree of resource inspection results to record resource inspection results.

6. A resource inspection device, characterized in that: The device comprises: A path determination unit, used to determine a resource inspection path, wherein the path includes an inspection sequence between resources to be inspected and inspection indicators under inspection items of the resources to be inspected; The inspection execution unit is used to inspect the corresponding resources according to the determined resource inspection path; The result output unit is used to generate and export inspection reports based on resource inspection results.

7. The device according to claim 6, characterized in that The device also includes a patrol trigger unit, which includes: The scheduled inspection trigger subunit is used to trigger the inspection of all system resources at a scheduled time; The event inspection trigger subunit is used to trigger the inspection of the target class resources associated with the event when the inspection trigger event is detected and the time interval between the occurrence time and the next scheduled inspection is greater than the set time threshold.

8. The device according to claim 7, characterized in that The event inspection trigger subunit is specifically used for: When an alarm of a set type is detected on the device where the resource is located, and the time interval between the alarm occurrence time and the next scheduled inspection is greater than the maximum time taken for a single successful completion of a scheduled inspection task in the historical records, an inspection of all system resources is triggered; When it is detected that an operation and maintenance operation has been performed on a resource, and the time interval between the completion of the operation and the next scheduled inspection is greater than the maximum time taken for a single successful completion of a scheduled inspection task in the historical records, an inspection of the target class resources associated with the operation and maintenance operation is triggered.

9. The device according to claim 8, characterized in that The event inspection triggering subunit is further used for: Identify resource operation and maintenance operations, and capture the operated resources as the first target type resources associated with the operation and maintenance operations; Starting from the first type of target resources, traverse the pre-built resource dependency graph and determine all other affected resources as the second type of target resources associated with the operation and maintenance operation.

10. The device according to any one of claims 6 to 9, characterized in that: The result output unit is specifically used for: Based on the inspection indicators in the resource inspection results, determine the number of sub-tables in the pre-created inspection report; Get the display style configuration of the subtable; Generate sub-tables in the inspection report based on the number of sub-tables, display style configuration, and data structuring degree of resource inspection results to record resource inspection results.

11. An electronic device, characterized in that: The electronic device includes: a shell, a processor, a memory, a circuit board and a power supply circuit, wherein the circuit board is placed inside the space enclosed by the shell, and the processor and the memory are arranged on the circuit board; the power supply circuit is used to supply power to various circuits or devices of the above-mentioned electronic device; the memory is used to store executable program code; the processor runs the program corresponding to the executable program code by reading the executable program code stored in the memory, so as to execute the resource inspection method described in any of the above claims 1-5.

12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more central processing units to implement the resource inspection method described in any one of claims 1-5 above.

Citation Information

Patent Citations

  • Method and system for automatic inspection of information system

    CN108830389A

  • Inspection method and device and computer readable storage medium

    CN109698763A

  • Report generation method, device and equipment and readable storage medium

    CN114637805A

  • Service resource automatic inspection system and method, terminal and storage medium

    CN116884107A