Automated Inspection Method, Device and Computer Equipment Based on Distributed System

By introducing automated inspection methods based on distributed systems into traditional inspection systems, the problems of slow inspection speed, fixed indicator dimensions and single report results are solved, and a more efficient and stable inspection process and more comprehensive result reports are achieved.

CN119854302BActive Publication Date: 2025-06-13E SURFING VISION TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510323940.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-19
Publication Date
2025-06-13
Estimated Expiration
2045-03-19

AI Technical Summary

Technical Problem

Due to a single server architecture, traditional inspection systems cannot cope with the calculation pressure of a large number of equipment and multiple indicators, resulting in slow inspection speed and low efficiency, fixed inspection indicator dimensions, and single correlation of report results.

Method used

The automated patrol method based on a distributed system is adopted. By obtaining pre-set patrol tasks, the target node is determined based on the load information of each node, and the patrol task is performed on the target node to obtain automated patrol data. This method includes the process of acquiring inspection tasks, determining target nodes and performing inspection tasks, and allocating tasks through distributed systems to improve inspection efficiency and system stability.

Benefits of technology

Through the automated patrol method of distributed systems, the speed and efficiency of patrol are improved, the calculation pressure of a large number of equipment and multiple indicators can be better responded to, the stability and response speed of the system are enhanced, and a more comprehensive and multi-dimensional patrol result report is generated.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119854302B_ABST
    Figure CN119854302B_ABST
Patent Text Reader

Abstract

This application relates to an automated inspection method, device, and computer equipment based on a distributed system. The method includes: obtaining a pre-set inspection task; the inspection task includes: project information, metric information, and time information; determining a target node according to the load information of each node in the distributed system; the target node executes the inspection task to obtain automated inspection data. By pre-setting the inspection task, the time for manual configuration is reduced, and the efficiency and accuracy of the inspection are improved. By allocating the inspection task to a node with a lower load, the stability and response speed of the entire distributed system are improved, and the inspection efficiency is enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of operation and maintenance monitoring, and particularly to an automated inspection method, device, and computer equipment based on a distributed system. Background Art

[0002] With the development of the Internet, the number of people and devices accessing the Internet has grown rapidly. The increasing number of access devices has led to a rapid growth in Internet access. The rapidly growing traffic has placed increasing pressure on the stable operation of Internet system platforms. To ensure the stable operation of the system, inspecting the service status of the inspection system is one of the important means.

[0003] In related technologies, the inspection system usually has only one server. When there are many inspection tasks, due to the processing capacity limitation of the server itself, the inspection speed is slow and the inspection efficiency is low. Summary of the Invention

[0004] Based on this, it is necessary to provide an automated inspection method, device, and computer equipment based on a distributed system for the above technical problems.

[0005] In a first aspect, this application provides an automated inspection method based on a distributed system. The method includes: obtaining a pre-set inspection task; the inspection task includes: project information, metric information, and time information; determining a target node according to the load information of each node in the distributed system; the target node executes the inspection task to obtain automated inspection data.

[0006] In one embodiment, the method further includes: obtaining project information, metric information, and time information input by a user; the time information includes: inspection task execution time and metric data collection time; constructing the inspection task according to the project information, metric information, and time information and storing it.

[0007] In one embodiment, the determining a target node according to the load information of each node in the distributed system includes: obtaining the CPU usage rate of each node in the distributed system; using the node with the lowest CPU usage rate as the target node.

[0008] In one embodiment, the target node executes the inspection task to obtain automated inspection data includes: determining information of multiple servers to be inspected in the asset management system according to the project information of the inspection task; constructing multiple inspection threads according to the information of the multiple servers to be inspected and the inspection task; executing the multiple inspection threads to obtain automated inspection data.

[0009] In one embodiment, determining multiple servers to be inspected in the asset management system according to the item information of the inspection task includes: searching for multiple first servers to be inspected in the asset management system according to the item information of the inspection task; searching for associated items in the asset management system according to the item information of the inspection task; and searching for multiple second servers to be inspected in the asset management system according to the associated items.

[0010] In one embodiment, constructing multiple inspection threads according to the multiple servers to be inspected and the inspection task includes: dividing the multiple servers to be inspected into multiple item groups according to the item information corresponding to the multiple servers to be inspected; and constructing corresponding inspection threads based on the information of the servers to be inspected corresponding to each item group, the metric information corresponding to the inspection task, and the metric data collection time corresponding to the inspection task.

[0011] In one embodiment, the method further includes: constructing topology graph report data with the item corresponding to the inspection task as the root node and the associated items as the child nodes according to the automated inspection data; constructing an inspection result report according to the automated inspection data and the topology graph report data; and outputting and displaying the inspection result report.

[0012] In a second aspect, the present application provides an automated inspection device based on a distributed system. The device includes: an acquisition module for acquiring a pre-set inspection task, where the inspection task includes item information, metric information, and time information; a node determination module for determining a target node according to the load information of each node in the distributed system; and an inspection module for executing the inspection task on the target node to obtain automated inspection data.

[0013] In a third aspect, the present application provides a computer device including a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the method described above is implemented.

[0014] In a fourth aspect, the present application provides a computer-readable storage medium with a computer program stored thereon. When the computer program is executed by a processor, the method described above is implemented.

[0015] The above-mentioned automated inspection method, device, and computer equipment based on a distributed system obtain a pre-set inspection task, determine a target node according to the load information of each node in the distributed system, and execute the inspection task based on the target node to obtain automated inspection data. Among them, the inspection task includes project information, index information, and time information. By pre-setting the inspection task, the time for manual configuration is reduced, and the efficiency and accuracy of the inspection are improved. By allocating the inspection task to a node with a lower load, the stability and response speed of the entire distributed system are improved, and the inspection efficiency is increased. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 FIG. is a structural block diagram of an automated inspection system based on a distributed system in an embodiment;

[0017] Figure 2 FIG. is a schematic flowchart of an automated inspection method based on a distributed system in an embodiment;

[0018] Figure 3 FIG. is a schematic flowchart of an automated inspection method in an embodiment;

[0019] Figure 4 FIG. is a structural block diagram of a multi-dimensional distributed automated inspection system based on CMDB in a specific embodiment;

[0020] Figure 5 FIG. is a structural block diagram of an automated inspection device based on a distributed system in an embodiment;

[0021] Figure 6 FIG. is an internal structure diagram of a computer device in an embodiment. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0022] In order to make the objectives, technical solutions, and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0023] With the development of the Internet, the number of people and devices accessing the Internet has increased rapidly. The increasing number of access devices has brought a rapid increase in Internet access. The rapidly growing traffic has put increasing pressure on the stable operation of Internet system platforms. To ensure the stable operation of the system, inspecting the service status of the system is one of the important means. The traditional inspection system design is relatively simple and usually faces the following problems:

[0024] 1. Slow inspection speed: The traditional inspection system often adopts a single-server architecture and cannot cope with the computing pressure of inspecting many devices and various indicators, nor can it support dynamic expansion.

[0025] 2. Fixed inspection index dimensions: In traditional inspection systems, the inspection index dimensions are relatively fixed, and the inspection index dimensions can only be manually defined and maintained in advance.

[0026] 3. Single correlation of inspection report results: In traditional inspection systems, the inspection result report only has a single index result of a single server-related dimension, which cannot reflect the correlation between projects. The correlation between inspection results is poor, and potential problems in system projects cannot be detected in a timely and effective manner to avoid potential failures.

[0027] Based on the above, traditional inspection systems have problems such as slow inspection speed, fixed inspection index dimensions, and single inspection report results. Therefore, for these problems, a faster, more scalable, multi-dimensional, and more reliable inspection solution with a higher correlation of result reports is needed.

[0028] The embodiment of the present application provides an automated inspection system based on a distributed system, as Figure 1 shown, including a CMDB module, an inspection task definition module, an inspection task distributed computing module, and an inspection result report module.

[0029] The CMDB module is also the asset management system. The CMDB is used to store and manage asset information of all IT assets and their relationships with each other. For example, the CMDB records all hardware, software, network devices, documents, and any configuration items (CI, Configuration Items) related to IT services. This includes servers, storage devices, network devices, software licenses, business applications, etc. For servers, the number of each server, the number of CPU cores of the server, the disk memory size, the affiliated IP computer room, public network information, and bandwidth information are stored. And each server is added with the corresponding product and project labels of the server. By way of example, a company has multiple products, each product corresponds to multiple projects, and each project corresponds to the servers in use. The server is added with the corresponding product and project labels. And, the CMDB also stores the association relationships between each project.

[0030] The inspection task definition module consists of a front-end inspection task page and a back-end inspection task storage service, providing functions such as defining, saving, and retrieving inspection tasks. Users input inspection tasks on the front-end inspection task page, such as project information, metric information, and time information, to generate inspection tasks, which are then stored in the back-end inspection task storage service. Among them, the project information is the project to be inspected, and the metric information includes custom metrics for inspecting the corresponding project, such as CPU usage rate, memory usage rate, disk occupancy rate, system request volume, queries per second (qps), transactions per second (tps), and read / write latency of the server. The time information includes the execution time of the inspection task and the collection time of metric data. The execution time of the inspection task indicates the time when the inspection task needs to be executed. For example, if it is 8:00 am every day, the inspection task needs to be executed at 8:00 am every day. The collection time of metric data is the time period for collecting metric data. For example, if the inspection task is executed at 8:00 am every day, the collection time of metric data can be to obtain the metric data between 8:00 am today and 8:00 am the previous day. It can be understood that all information of the inspection task can be set according to actual usage requirements, and this embodiment does not make specific limitations.

[0031] The inspection task distributed computing module is a distributed system for completing inspection tasks. When the inspection task set in the inspection task definition module reaches the execution time of the inspection task, the inspection task distributed computing module obtains the inspection task and distributes it to the target node for calculation to generate inspection calculation results, that is, automated inspection data.

[0032] The inspection result report module is used to receive the inspection calculation results submitted by the inspection task distributed computing module and automatically generate report data.

[0033] In one embodiment, as Figure 2 shown, an automated inspection method based on a distributed system is provided. The method includes:

[0034] Step 201, obtain the pre-set inspection task.

[0035] Inspection tasks are pre-stored in the inspection task definition module. The inspection task includes project information, metric information, and time information. The time information includes the execution time of the inspection task and the collection time of metric data. When the current time reaches the execution time of the inspection task, the corresponding inspection task is obtained. The inspection task is used to inspect the metric information of the server corresponding to the project information. By pre-setting the inspection task, the automation and consistency of the inspection task can be ensured, the time for manual configuration can be reduced, and the efficiency and accuracy of the inspection can be improved.

[0036] Step 202, determine the target node according to the load information of each node in the distributed system.

[0037] A distributed system consists of multiple computer nodes, each node corresponding to a server. Each node can work independently, and multiple nodes cooperate with each other to complete the inspection task. After obtaining the inspection task, the load information of each node in the distributed system is first obtained. Among them, the load information includes the processing capacity, current workload, and resource occupancy of the node. For example, it can be information such as the CPU usage rate, memory usage, and disk I / O of the server corresponding to the node. After obtaining the load information of each node, the target node can be determined through the minimum load first algorithm or the load balancing algorithm. Among them, the target node is the node used to execute the current inspection task. For example, through the minimum load first algorithm, the node with the minimum load can be found and used as the target node. Through the load balancing algorithm, the optimal node for processing the inspection task can be found and used as the target node. By allocating the inspection task to a node with a lower load, it is possible to avoid overloading a certain node, thereby improving the stability and response speed of the entire distributed system. At the same time, the inspection efficiency is improved.

[0038] Step 203: The target node executes the inspection task to obtain automated inspection data.

[0039] After determining the target node, the inspection task is sent to the target node. The target node executes the inspection task based on the project information, metric information, and time information of the inspection task and the CMDB asset management system to obtain automated inspection data. Among them, the automated inspection data is the metric information of the server corresponding to the project information in the inspection task.

[0040] An automated inspection method based on a distributed system provided in this embodiment determines the target node according to the load information of each node in the distributed system by obtaining a pre-set inspection task. The inspection task is executed based on the target node to obtain automated inspection data. Among them, the inspection task includes: project information, metric information, and time information. By pre-setting the inspection task, the time for manual configuration is reduced, and the inspection efficiency and accuracy are improved. By allocating the inspection task to a node with a lower load, the stability and response speed of the entire distributed system are improved, and the inspection efficiency is improved.

[0041] In one of the embodiments, the method further includes pre-setting the inspection task in the inspection task definition module. Specifically, it includes the following steps:

[0042] Step 1: Obtain the project information, metric information, and time information input by the user.

[0043] When presetting the inspection tasks, the user inputs project information, metric information, and time information through the interactive interface provided by the front-end inspection task page. Among them, the project information is the detailed information of the project to be inspected, such as the project name, description, etc. The metric information includes the custom metrics for inspecting the corresponding project, and this metric is a measure for evaluating the system performance or status. For example, it includes metric data such as the CPU usage rate, memory usage rate, disk occupancy rate, system request volume, queries per second (qps), transactions per second (tps), and read / write latency of the server. The time information includes the inspection task execution time and the metric data collection time. Among them, the inspection task execution time represents the time when the inspection task needs to be executed, and the metric data collection time is the time period for collecting metric data. Through the inspection task information input by the user, the inspection task becomes more customized and can perform inspections according to specific requirements, thereby improving the pertinence and accuracy of the inspection.

[0044] Step 2: Construct and store the inspection task according to the project information, metric information, and time information.

[0045] After obtaining the project information, metric information, and time information, construct and store the inspection task based on the above information. The inspection task definition module creates a complete inspection task according to the project information, metric information, and time information provided by the user. This inspection task includes specific inspection steps, metrics to be detected during execution, expected execution time, etc. Then, store the inspection task in a database or other storage system for subsequent execution and management.

[0046] In this embodiment, by constructing the inspection task, the integrity and accuracy of the inspection task are ensured, enabling the inspection task to be executed as expected. By storing the inspection task, the inspection task can be scheduled and executed in a timely manner, and at the same time, it is convenient for querying and managing historical data, improving the traceability and reliability of the inspection.

[0047] In one of the embodiments, when determining the target node according to the load information of multiple nodes, it specifically includes the following steps:

[0048] Step 1: Obtain the CPU usage rate of each node in the distributed system.

[0049] A distributed system consists of multiple computer nodes. Each node can be a server, a virtual machine, or other computing resources. In this embodiment, it is described with each node corresponding to a server. Each node can work independently, and multiple nodes cooperate with each other to complete the inspection task. Before executing the inspection task, it is first necessary to obtain the CPU usage rate of each node in the distributed system. For example, the CPU usage rate of each node in the distributed system is obtained through a monitoring tool. By obtaining the CPU usage rate of each node, it can provide a data basis for the subsequent distribution of the inspection task, thereby further improving the inspection efficiency.

[0050] Step 2: Take the node with the lowest CPU usage rate as the target node.

[0051] The target node is the node in the distributed system used to execute the current inspection task. After obtaining the CPU usage rate of all nodes, compare all the CPU usage rates, find the node with the lowest CPU usage rate, and take it as the target node.

[0052] In this embodiment, by using the node with the lowest CPU usage rate to execute the current inspection task, the CPU resources can be effectively utilized, thereby improving the performance and stability of the entire distributed system and further improving the inspection efficiency.

[0053] In one embodiment, as Figure 3 shown, an automated inspection method is provided. The method includes:

[0054] Step 301: Determine multiple servers to be inspected information in the asset management system according to the project information of the inspection task.

[0055] According to the load conditions of each node, determine the target node. After determining the target node, distribute the current inspection task to the target node with relatively idle load for inspection calculation. After receiving the inspection task, the target node determines multiple servers to be inspected information in the asset management system according to the project information of the inspection task. Among them, the asset management system stores information such as the number of each server, the number of CPU cores of the server, the disk memory size, the affiliated IP computer room, the public network information, and the bandwidth information. Each server also corresponds to product and project tags. At the same time, the asset management system also stores the association relationships between various projects. The target node searches for servers with the same project tags in the asset management system according to the project information, and takes the information of the corresponding servers as the servers to be inspected information. Specifically, it includes the following steps:

[0056] Step 1: Search for multiple first servers to be inspected information in the asset management system according to the project information of the inspection task.

[0057] Each server in the asset management system corresponds to product and project tags. According to the project information of the inspection task, multiple server information with the same project tags is searched in the asset management system and used as the first server information to be inspected. For example, the project corresponding to the inspection task can be obtained first, and the tags of the corresponding project are searched in the asset management system to determine the server information with the corresponding project tags. The server information can be the server number, the number of CPU cores of the server, the disk memory size, the affiliated IP computer room, the public network information, and the bandwidth information, etc.

[0058] Step 2: Search for associated projects in the asset management system according to the project information of the inspection task.

[0059] The asset management system also stores the association relationships between each project. Among them, the associated project is another project associated with the project information of the inspection task, and can be queried through the association relationships between each project. For example, according to the project information of the inspection task, the associated associated projects are searched in the association relationships between each project.

[0060] Step 3: Search for multiple second server information to be inspected in the asset management system according to the associated projects.

[0061] After the associated projects are found, multiple server information with the same project tags is searched in the asset management system according to the associated projects and used as the second server information to be inspected. The search method is the same as that in Step 1 above, that is, searching based on the project tags, which will not be elaborated here. Finally, the first server information to be inspected corresponding to the project information of the inspection task and the second server information to be inspected corresponding to the associated projects are used as multiple server information to be inspected.

[0062] Through the above method, all the server information that needs to be inspected can be comprehensively determined, including the first server to be inspected directly related to the inspection task and the second server to be inspected indirectly related through the associated projects. It ensures the comprehensiveness and accuracy of the inspection. At the same time, it helps to reduce omissions and unnecessary repeated inspections, improving resource utilization and inspection efficiency.

[0063] Step 302: Construct multiple inspection threads according to the multiple server information to be inspected and the inspection task.

[0064] After determining the information of multiple servers to be inspected, they can be grouped according to the different projects to which they belong. One group is set for each project, and for each group, a corresponding inspection thread is constructed based on the metric information corresponding to the inspection task and the metric data collection time. When executing the inspection thread, the metric information corresponding to the server within the metric data collection time is obtained. By constructing multiple inspection threads, parallel processing can be achieved, accelerating the inspection speed and improving the efficiency. Each thread can be executed independently, thereby reducing the inspection time of the server. Among them, a thread is the smallest unit that the operating system can perform operation scheduling on and is the actual operating unit within a process. The inspection task is realized by executing multiple inspection threads. Specifically, it includes:

[0065] Step 1: Divide the multiple servers to be inspected into multiple project groups according to the project information corresponding to the multiple servers to be inspected.

[0066] After determining the information of multiple servers to be inspected, group the servers to be inspected according to the project to which each server to be inspected belongs. Determine the project label corresponding to each server to be inspected, and according to the project label, classify the servers to be inspected with the same project label into the same project group. Thus, multiple project groups corresponding to different projects are obtained.

[0067] Step 2: Based on the information of the servers to be inspected corresponding to each project group, the metric information corresponding to the inspection task, and the metric data collection time corresponding to the inspection task, construct the corresponding inspection thread.

[0068] After dividing the project groups, based on the information of the servers to be inspected corresponding to each project group, construct the corresponding inspection threads respectively according to the metric information corresponding to the inspection task and the metric data collection time. For example, for each project group, create the corresponding inspection thread according to its server information, inspection task metrics, and collection time. Configure specific inspection tasks for each inspection thread, including the servers to be checked, the metrics to be collected, and the collection time of the metric data.

[0069] By grouping the servers to be inspected and constructing the corresponding multiple inspection threads, parallel inspection of multiple servers is realized. The efficiency and resource utilization rate of the inspection are improved, and at the same time, the customization and pertinence of the inspection task are maintained. Through parallel processing, a large number of inspection tasks can be completed in a relatively short time, which is crucial for ensuring the stable operation of the system and promptly discovering potential problems.

[0070] Step 303: Execute multiple inspection threads to obtain automated inspection data.

[0071] After constructing multiple inspection threads, the multiple inspection threads are executed in parallel, and each inspection thread returns the data collected during its inspection, that is, the automated inspection data. Among them, the automated inspection data includes: the metric data of all servers to be inspected during the metric data collection time. Among them, the metric data includes: metric data such as CPU usage rate, memory usage rate, disk occupancy rate, system request volume, queries per second (qps), transactions per second (tps), and read / write latency.

[0072] In the above embodiment, the target node groups from different project dimensions according to the project information of the inspection task and the associated projects associated with the CMDB, creates an inspection thread task for querying the metric data of each dimension, and submits it to the thread pool. Each asynchronously executed inspection thread task in the thread pool obtains the CPU usage rate, memory usage rate, disk occupancy rate, system request volume, queries per second (qps), transactions per second (tps), and read / write latency and other metric data of all servers during the specified time period, that is, the metric data collection time, from the monitoring system. By executing the inspection threads and collecting data, the current running state of the server can be automatically obtained, providing a basis for subsequent monitoring, analysis, and maintenance. The degree of automation of the inspection is improved, manual intervention is reduced, and the maintainability of the system is enhanced.

[0073] In one of the embodiments, an inspection result report can also be generated based on the automated inspection data obtained from the inspection task, specifically including:

[0074] Step 1, according to the automated inspection data, with the project corresponding to the inspection task as the root node and the associated projects as the sub-nodes, construct the topology graph report data.

[0075] After the inspection task distributed computing module obtains the automated inspection data, it sends the automated inspection data to the inspection result report module. The automated inspection data includes the metric data of the servers of the project corresponding to the inspection task and the metric data of the servers of the associated projects. With the project corresponding to the inspection task as the root node and the associated projects as the sub-nodes, the metric data of the servers corresponding to each project is generated into topology graph report data. The root node is the starting point in the topology graph, and the sub-node is the node extending from the root node in the topology graph, representing the project associated with the root node. The topology graph report data is the report data that displays the relationship between projects in a graphical way.

[0076] Step 2, construct the inspection result report according to the automated inspection data and the topology graph report data.

[0077] After generating the topology report data, since the topology report data is graphical report data, the amount of metric data it can display is limited, and only important metric data can be displayed. Therefore, it is necessary to combine the topology report data with the original automated inspection data to construct an inspection result report to provide a more comprehensive display of metric data. For example, in the topology report data, only important metric data is displayed for each topology node. After clicking on a certain topology node, according to the automated inspection data, the metric data of all servers of that topology node is then displayed.

[0078] Step 3, output and display the inspection result report.

[0079] Visualize and display the inspection result report to the user through a display component. Exemplarily, the inspection result report can be displayed through a Web interface, a desktop application, or a report generation tool. The user can view the metric data of specific servers in the inspection result report through filtering, sorting, and filtering functions.

[0080] In the above embodiments, by using the distributed multi-thread dynamic expansion technology, it is possible to calculate the inspection task data of a large number of projects in real time and quickly generate an inspection result report. Automatically obtain multi-dimensional automated inspection data of inspection tasks based on CMDB, without the need for manual pre-definition and maintenance of numerous metric dimensions of inspection tasks, reducing manual repetitive operations and avoiding information errors and omissions caused by manual operations. Conduct a comprehensive inspection calculation based on multi-dimensional metric data such as the server number, public network information, and the association relationship between projects obtained from CMDB for inspection tasks, and generate a comprehensive inspection report based on the associated metric inspection data, improving the comprehensiveness and reliability of the inspection results.

[0081] To more clearly elaborate on the technical solution of the present application, the present application also provides a detailed embodiment. As Figure 4 shown, a multi-dimensional distributed automated inspection system based on CMDB is provided in detail, specifically including:

[0082] The CMDB module, that is, the CMDB asset management platform module. It is used to store asset information, such as server CPU core count, disk memory size, affiliated IP computer room, public network information, and bandwidth, etc. And add relevant tags such as products and projects to each server asset to form an asset information network.

[0083] The inspection task definition module is used to define and save inspection tasks. According to metric dimensions such as products, projects, and server resource utilization, customize inspection tasks for a specified time period. First, add an inspection task, then select products, projects, etc. saved in the CMDB module, set information such as the time range and execution period of the inspection, and save the inspection task.

[0084] The distributed computing module for inspection tasks regularly executes the inspection tasks saved in the inspection task definition module in the previous step and with the status of enabled for the regular inspection tasks, and queries the details of the inspection tasks. According to the load conditions of each node in the distributed computing module for inspection tasks, the inspection tasks are distributed to the nodes of the inspection task computing module with relatively idle loads. The inspection task computing node queries the internal network IPs, the affiliated computer rooms of the servers associated with the project, as well as the server IPs, computer rooms, public network IPs, bandwidth information, etc. of the dependent projects from the CMDB according to the project information defined in the inspection task. According to the projects in the inspection task definition and other projects associated from the CMDB, group them by different project dimensions, create thread tasks for querying the metric data of each dimension, and submit them to the thread pool for asynchronous execution. Using multi-threading technology, each thread asynchronously executes to obtain the metric data such as CPU usage rate, memory usage rate, disk occupancy rate, system request volume, queries per second (qps), transactions per second (tps), and read / write latency of all machines in this group of tasks for the specified time period from the monitoring system. Synchronize the results of the asynchronous execution of each thread, and submit the inspection calculation results of the metrics of each dimension of the project to the inspection result report module.

[0085] The inspection result report module receives the inspection results submitted by the distributed computing module for inspection tasks. Taking the project defined in the inspection task as the root node and the other dependent projects obtained from the CMDB as the sub-nodes, generate topology graph report data for the inspection results of the metrics of each dimension (CPU usage rate, memory usage rate, disk occupancy rate, system request volume, queries per second (qps), transactions per second (tps), read / write latency, etc.) of each project. Output the detailed inspection result report of the defined inspection tasks, and display the inspection results of the metrics of each project (CPU usage rate, memory usage rate, disk occupancy rate, system request volume, queries per second (qps), transactions per second (tps), read / write latency, etc.) in each dimension.

[0086] This embodiment provides a multi-dimensional distributed automated inspection system based on the CMDB asset management platform. The system uses a distributed architecture design, formulates customizable and dynamically adjustable metric dimensions based on the project-related information of the CMDB, and realizes the rapid processing of data calculations during the inspection of many project platform systems. Through this system and method, system operation and maintenance personnel only need to select project information, and can automatically specify the inspection dimensions based on the system service information associated with the project in real time according to the CMDB. Thus, there is no need to manually associate and define the numerous associated systems and services of the project, avoiding the omissions and errors in manually defining the inspection metric dimensions. This embodiment solves the problems existing in the traditional inspection system, such as slow inspection speed, fixed inspection metric dimensions, and single inspection report results. It provides a faster, more scalable, multi-dimensional, higher-correlation result report, and more reliable inspection solution.

[0087] In this embodiment, multi-dimensional data of inspection items are automatically obtained based on the CMDB, without the need for manual pre-definition and maintenance of numerous index dimensions of inspection items, reducing manual repetitive operations and avoiding information errors and omissions caused by manual operations. A distributed computing inspection task data backend cluster with dynamic expandability is used to calculate inspection tasks in real time and efficiently, obtain associated item index information from the CMDB, and submit the calculation results to the inspection result report module according to the relationship of item dependencies. The inspection result report takes the items defined in the inspection task as the root nodes and the other dependent items obtained from the CMDB as the sub-nodes, and generates topology report data for the inspection results of each dimension index (CPU usage rate, memory usage rate, disk occupancy rate, system request volume, queries per second (qps), transactions per second (tps), read / write latency, etc.) of each item.

[0088] It should be understood that although the steps in the flowcharts involved in the above-described embodiments are shown in sequence according to the arrows, these steps do not necessarily need to be executed in the order indicated by the arrows. Unless there is a clear indication in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-described embodiments may include multiple steps or multiple stages, and these steps or stages do not necessarily need to be executed at the same time, but can be executed at different times, and the execution order of these steps or stages does not necessarily need to be sequential, but can be executed alternately or alternately with at least a part of other steps or steps in other steps.

[0089] Based on the same inventive concept, an embodiment of the present application also provides an automated inspection device based on a distributed system for implementing the above-described automated inspection method based on a distributed system. The solution provided by this device to solve the problem is similar to the solution described in the above method. Therefore, the specific limitations in one or more embodiments of the automated inspection device based on a distributed system provided below can refer to the limitations on the automated inspection method based on a distributed system in the above text, and will not be repeated here.

[0090] In one embodiment, as Figure 5 shown, an automated inspection device based on a distributed system is provided, including: an acquisition module 100, a node determination module 200, and an inspection module 300, where:

[0091] The acquisition module 100 is used to acquire a pre-set inspection task; the inspection task includes: item information, index information, and time information.

[0092] The node determination module 200 is used to determine a target node according to the load information of each node in the distributed system.

[0093] The inspection module 300 is used for the target node to execute the inspection task to obtain automated inspection data.

[0094] The acquisition module 100 is further used to acquire project information, index information, and time information input by the user; the time information includes: the inspection task execution time and the index data collection time; according to the project information, index information, and time information, construct the inspection task and store it.

[0095] The node determination module 200 is further used to obtain the CPU usage rate of each node in the distributed system; use the node with the lowest CPU usage rate as the target node.

[0096] The inspection module 300 is further used to determine multiple to-be-inspected server information in the asset management system according to the project information of the inspection task; construct multiple inspection threads according to the multiple to-be-inspected server information and the inspection task; execute the multiple inspection threads to obtain automated inspection data.

[0097] The inspection module 300 is further used to find multiple first to-be-inspected server information in the asset management system according to the project information of the inspection task; find associated projects in the asset management system according to the project information of the inspection task; find multiple second to-be-inspected server information in the asset management system according to the associated projects.

[0098] The inspection module 300 is further used to divide the multiple to-be-inspected servers into multiple project groups according to the project information corresponding to the multiple to-be-inspected server information; construct corresponding inspection threads based on the to-be-inspected server information corresponding to each project group, the index information corresponding to the inspection task, and the index data collection time corresponding to the inspection task.

[0099] The inspection module 300 is further used to construct topology graph report data with the project corresponding to the inspection task as the root node and the associated projects as the sub-nodes according to the automated inspection data; construct an inspection result report according to the automated inspection data and the topology graph report data; output and display the inspection result report.

[0100] Each module in the above automated inspection device based on a distributed system can be implemented in whole or in part by software, hardware, and their combination. The above modules can be embedded in the processor in the computer device in hardware form or independent of the processor, or stored in the memory in the computer device in software form, so that the processor can call and execute the operations corresponding to the above modules.

[0101] In one embodiment, a computer device is provided. The computer device can be a server, and its internal structure diagram can be asFigure 6 As shown in the figure. The computer device includes a processor, a memory, and a network interface connected by a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store the data required to execute the automated inspection method based on the distributed system. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, it implements an automated inspection method based on the distributed system.

[0102] Those skilled in the art can understand that Figure 6 the structure shown in the figure is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.

[0103] In one embodiment, a computer device is provided, including a memory and a processor. A computer program is stored in the memory. When the processor executes the computer program, it implements any one of the automated inspection methods based on the distributed system in the above embodiments.

[0104] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by the processor, it implements any one of the automated inspection methods based on the distributed system in the above embodiments.

[0105] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memories. Non-volatile memories can include read-only memory (ROM), magnetic tapes, floppy disks, flash memories, optical memories, high-density embedded non-volatile memories, resistive random access memories (ReRAM), magnetoresistive random access memories (MRAM), ferroelectric random access memories (FRAM), phase change memories (PCM), graphene memories, etc. Volatile memories can include random access memory (RAM) or external cache memories, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in the present application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in the present application can be general-purpose processors, central processors, graphics processors, digital signal processors, programmable logics, data processing logics based on quantum computing, etc., without limitation.

[0106] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.

[0107] The above-described embodiments merely represent several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation on the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.

Claims

1. An automated inspection method based on a distributed system, characterized in that: The method comprises: Obtaining a pre-set inspection task; the inspection task includes: project information, indicator information and time information; Determine the target node based on the load information of each node in the distributed system; The target node executes the inspection task to obtain automated inspection data; The target node executes the inspection task to obtain the automated inspection data, including: determining multiple server information to be inspected in the asset management system according to the project information of the inspection task; constructing multiple inspection threads according to the multiple server information to be inspected and the inspection task; executing the multiple inspection threads to obtain the automated inspection data; Determining multiple server information to be inspected in the asset management system based on the project information of the inspection task includes: searching for multiple first server information to be inspected in the asset management system based on the project information of the inspection task; searching for related projects in the asset management system based on the project information of the inspection task; and searching for multiple second server information to be inspected in the asset management system based on the related projects.

2. The method according to claim 1, characterized in that The method further comprises: Obtaining project information, indicator information and time information input by the user; the time information includes: inspection task execution time and indicator data collection time; The inspection task is constructed and stored according to the project information, indicator information and time information.

3. The method according to claim 1, characterized in that Determining the target node according to the load information of each node in the distributed system includes: Get the CPU usage of each node in the distributed system; The node with the lowest CPU usage is taken as the target node.

4. The method according to claim 1, characterized in that: The constructing of multiple inspection threads according to the information of the multiple servers to be inspected and the inspection tasks includes: According to the project information corresponding to the information of the multiple servers to be inspected, the multiple servers to be inspected are divided into multiple project groups; Based on the server information to be inspected corresponding to each project group, the indicator information corresponding to the inspection task, and the indicator data collection time corresponding to the inspection task, a corresponding inspection thread is constructed.

5. The method according to claim 4, characterized in that The method further comprises: According to the automated inspection data, topology report data is constructed with the project corresponding to the inspection task as the root node and the associated project as the child node; Constructing an inspection result report based on the automated inspection data and topology report data; Output and display the inspection result report.

6. An automated inspection device based on a distributed system, characterized in that: The device comprises: The acquisition module is used to acquire a preset inspection task; the inspection task includes: project information, indicator information and time information; A node determination module is used to determine the target node according to the load information of each node in the distributed system; Inspection module, used for the target node to execute the inspection task and obtain automated inspection data; The target node executes the inspection task to obtain the automated inspection data, including: determining multiple server information to be inspected in the asset management system according to the project information of the inspection task; constructing multiple inspection threads according to the multiple server information to be inspected and the inspection task; executing the multiple inspection threads to obtain the automated inspection data; Determining multiple server information to be inspected in the asset management system based on the project information of the inspection task includes: searching for multiple first server information to be inspected in the asset management system based on the project information of the inspection task; searching for related projects in the asset management system based on the project information of the inspection task; and searching for multiple second server information to be inspected in the asset management system based on the related projects.

7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 5 is implemented.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Task scheduling method and device, equipment and medium

    CN119025236A

  • Equipment inspection management method and device, computer equipment and storage medium

    CN119625858A