Equipment inspection management method and device, computer equipment and storage medium
By obtaining equipment identification information, matching inspection items and standards, and generating tree data structures, the problem of automatic inspection in the data center is solved, and the inspection efficiency is improved and system expansion is simplified.
Patent Information
- Application Number
- CN202411717475.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-03-14
AI Technical Summary
In data centers, automatic inspections are difficult to quickly and effectively adapt to equipment of a large number of different models, resulting in inefficient inspections.
By obtaining the identification information of the equipment, matching the target inspection item list and inspection standards, generating a tree data structure, determining the inspection items, and generating inspection tasks based on this information, performing inspection tasks, and determining the equipment status.
It improves the efficiency of equipment inspection, reduces dependence on the system background, and simplifies the process of adding new equipment types and inspection items.
Smart Images

Figure CN119625858A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of equipment detection, and in particular to an equipment inspection management method, device, computer equipment and storage medium. Background Art
[0002] To ensure the normal operation and safe production of equipment, equipment inspection is a basic function and necessary requirement of the data center management system; inspection usually includes manual inspection and automatic inspection; manual inspection relies on subjective judgment, has high safety risks, is prone to omissions, and has high labor costs. After the inspection is completed, the inspection results need to be summarized and unified, which is inefficient; automatic inspection uses a certain standard protocol to query whether the operating status of the equipment is normal or whether a certain indicator exceeds a specified threshold (such as whether the temperature exceeds a certain Celsius threshold and whether the CPU utilization exceeds a certain utilization threshold, etc.) to determine whether the equipment is normal. However, when there are a large number of devices of different models in the data center, the query commands supported by each device are different. How to quickly and effectively inspect the equipment in the data center has become an urgent problem to be solved. Summary of the invention
[0003] Based on this, it is necessary to provide an equipment inspection management method, device, computer equipment and storage medium that can quickly and effectively inspect the equipment in the data center in response to the above technical problems.
[0004] In a first aspect, a method for equipment inspection management is provided, the method comprising: obtaining identification information of a device to be inspected, the identification information comprising at least the device type and the device model; obtaining a target inspection item list that matches the identification information of the device to be inspected, and an inspection standard corresponding to the target inspection item list, the target inspection item list comprising at least the device type, the device model, and a first inspection item corresponding to the device model; obtaining a hierarchical division result corresponding to the device type, the device model, and the first inspection item corresponding to the device model, generating a target tree data structure based on the hierarchical division result, and determining a second inspection item in the target tree data structure, generating an inspection task based on the second inspection item and the inspection standard corresponding to the target inspection item list, and adding the inspection task to an inspection task table; executing the inspection task in the inspection task table, generating an execution result, and determining the status of the device to be inspected based on the execution result.
[0005] Optionally, before obtaining a target inspection item list that matches the identification information of the device to be inspected and an inspection standard corresponding to the target inspection item list, the method further includes: comparing the identification information of the device to be inspected with device identification information pre-stored in a database, the database including a plurality of first inspection items corresponding to device models and an inspection item list generated by the device identification information; in response to a successful comparison, determining that a target inspection item list that matches the identification information of the device to be inspected exists in the database; in response to a failed comparison, determining that a target inspection item list that matches the identification information of the device to be inspected does not exist in the database.
[0006] Optionally, when it is determined that there is no target inspection item list matching the identification information of the device to be inspected in the database, the method further includes: obtaining a first inspection item corresponding to the device model of the device to be inspected; hierarchically dividing the device type, device model, and the first inspection item corresponding to the device model of the device to be inspected to obtain a hierarchical division result including multiple levels, and defining the device type, device model, and the first inspection item corresponding to the device model of the device to be inspected as a third inspection item in the corresponding level; obtaining a unique code corresponding to the third inspection item, and mapping the name of the third inspection item of the target level with the unique code corresponding to the third inspection item according to the hierarchical division result to generate a first mapping relationship; in response to the existence of an association relationship between the third inspection items of different target levels, mapping the first mapping relationships corresponding to the different target levels with the association relationship to generate a second mapping relationship, and saving it in a mapping relationship table to generate the target inspection item list.
[0007] Optionally, after generating the target inspection item list, the method also includes: obtaining the execution method of the first inspection item and the preset passing standard of the execution result; defining the execution method of the first inspection item and the preset passing standard of the execution result as the inspection standard corresponding to the target inspection item list, and mapping them into the target inspection item list; saving the target inspection item list and its corresponding inspection standard into the database.
[0008] Optionally, obtaining the device type, the device model, and a hierarchical division result corresponding to the first inspection item corresponding to the device model, generating a target tree data structure based on the hierarchical division result, and determining a second inspection item in the target tree data structure, generating an inspection task based on the inspection standard corresponding to the second inspection item and the target inspection item list, and adding the inspection task to the inspection task table includes: in response to receiving the inspection task creation request, obtaining the device type, the device model, and a hierarchical division result corresponding to the first inspection item corresponding to the device model; The hierarchical division result is obtained, and based on the hierarchical division result, the node position of the initial tree data structure is determined; according to the node position of the initial tree data structure, the target tree data structure is recursively generated, and the second inspection item in the target tree data structure is determined; based on the second inspection item, the inspection standard corresponding to the target inspection item list, and the configured inspection task name, the number of inspection reports retained and the inspection report file format, an inspection task is generated, and an execution time node is set for the inspection task; the inspection tasks with multiple execution time nodes set are added to the inspection task table.
[0009] Optionally, executing the inspection task in the inspection task table and generating an execution result includes: obtaining the current time node, determining whether the current time node is a preset execution time node corresponding to the target inspection task; in response to the current time node being the preset execution time node, executing the target inspection task in the inspection task table and generating an execution result.
[0010] Optionally, determining the state of the device to be inspected according to the execution result includes: analyzing the execution result based on an inspection standard corresponding to a target inspection item list to determine the state of the device to be inspected.
[0011] In a second aspect, a device inspection management apparatus is provided, the apparatus comprising: a first acquisition module, used to acquire identification information of a device to be inspected, the identification information at least including the device type and the device model; a second acquisition module, used to acquire a target inspection item list matching the identification information of the device to be inspected, and an inspection standard corresponding to the target inspection item list, the target inspection item list at least including the device type, the device model, and a first inspection item corresponding to the device model; a construction module, used to acquire a hierarchical division result corresponding to the device type, the device model, and the first inspection item corresponding to the device model, generate a target tree data structure based on the hierarchical division result, determine a second inspection item in the target tree data structure, generate an inspection task based on the second inspection item and the inspection standard corresponding to the target inspection item list, and add the inspection task to an inspection task table; a task execution module, executing the inspection task in the inspection task table, generating an execution result, and determining the status of the device to be inspected according to the execution result. .
[0012] According to a third aspect, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program: obtaining identification information of a device to be inspected, wherein the identification information includes at least a device type and a device model; obtaining a target inspection item list that matches the identification information of the device to be inspected, and an inspection standard corresponding to the target inspection item list, wherein the target inspection item list includes at least a device type, a device model, and a first inspection item corresponding to the device model; obtaining a hierarchical division result corresponding to the device type, the device model, and the first inspection item corresponding to the device model, generating a target tree data structure based on the hierarchical division result, determining a second inspection item in the target tree data structure, generating an inspection task based on the second inspection item and the inspection standard corresponding to the target inspection item list, and adding the inspection task to an inspection task table; executing the inspection task in the inspection task table, generating an execution result, and determining the status of the device to be inspected based on the execution result.
[0013] In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented: obtaining identification information of a device to be inspected, the identification information including at least the device type and the device model; obtaining a target inspection item list that matches the identification information of the device to be inspected, and an inspection standard corresponding to the target inspection item list, the target inspection item list including at least the device type, the device model, and a first inspection item corresponding to the device model; obtaining a hierarchical division result corresponding to the device type, the device model, and the first inspection item corresponding to the device model, generating a target tree data structure based on the hierarchical division result, and determining a second inspection item in the target tree data structure, generating an inspection task based on the second inspection item and the inspection standard corresponding to the target inspection item list, and adding the inspection task to an inspection task table; executing the inspection task in the inspection task table, generating an execution result, and determining the status of the device to be inspected based on the execution result.
[0014] In a fifth aspect, a computer program product is provided, the computer program product comprising a computer program, and the computer program implements the following steps when executed by a processor: obtaining identification information of a device to be inspected, the identification information comprising at least a device type and a device model; obtaining a target inspection item list matching the identification information of the device to be inspected, and an inspection standard corresponding to the target inspection item list, the target inspection item list comprising at least a device type, a device model, and a first inspection item corresponding to the device model; obtaining a hierarchical division result corresponding to the device type, the device model, and the first inspection item corresponding to the device model, generating a target tree data structure based on the hierarchical division result, and determining a second inspection item in the target tree data structure, generating an inspection task based on the second inspection item and the inspection standard corresponding to the target inspection item list, and adding the inspection task to an inspection task table; executing the inspection task in the inspection task table, generating an execution result, and determining the status of the device to be inspected based on the execution result.
[0015] The above-mentioned equipment inspection management method, device, computer equipment and storage medium, the method includes: obtaining identification information of the equipment to be inspected, the identification information at least including the equipment type and equipment model; obtaining a target inspection item list matching the identification information of the equipment to be inspected, and inspection standards corresponding to the target inspection item list, the target inspection item list at least including the equipment type, equipment model, and a first inspection item corresponding to the equipment model; obtaining the hierarchical division result corresponding to the equipment type, the equipment model, and the first inspection item corresponding to the equipment model, and based on the hierarchical division result, The invention discloses a method for inspecting the equipment to be inspected, which is to generate a target tree data structure and determine a second inspection item in the target tree data structure; based on the inspection standard corresponding to the second inspection item and the target inspection item list, generate an inspection task and add the inspection task to the inspection task table; execute the inspection task in the inspection task table, generate an execution result, and determine the status of the equipment to be inspected based on the execution result; the present application solves the problem that when adapting to new equipment types, equipment models and inspection items in the automatic inspection method, it is necessary to re-encode in the system background to increase the sending process and the parsing process, thereby effectively improving the inspection efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 A schematic diagram of a process flow of a device inspection management method in one embodiment;
[0017] Figure 2 A schematic diagram of a process flow of a device inspection management method in one embodiment;
[0018] Figure 3 A schematic diagram of a process flow for creating an inspection task of a device inspection management method in an embodiment;
[0019] Figure 4 A schematic diagram of a process flow for creating inspection items of a device inspection management method in an embodiment;
[0020] Figure 5 It is a structural block diagram of a device inspection management device in one embodiment;
[0021] Figure 6 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0022] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0023] It should be understood that in the description of the present application, unless the context clearly requires otherwise, words such as "include", "comprises", and the like throughout the specification should be interpreted as including rather than being exclusive or exhaustive; that is, as including but not limited to.
[0024] It should also be understood that the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in the description of this application, unless otherwise specified, "plurality" means two or more.
[0025] It should be noted that the terms "S1", "S2", etc. are only used for the purpose of describing the steps, and do not specifically refer to the order or sequence, nor are they used to limit the present application. They are only for the convenience of describing the method of the present application, and cannot be understood as indicating the order of the steps. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in this field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection required by the present application.
[0026] Inspection is an important equipment management and safety assurance activity, which involves regular inspection of equipment, systems and environment, with the purpose of timely discovering and handling potential problems and faults to ensure smooth production processes and workplace safety. According to the background technology, the relevant technologies usually include manual inspection and automatic inspection, which specifically include the system executing fixed inspection commands in a certain order for the inspection equipment in the background, and analyzing the inspection results to see whether they are normal. If new inspection items need to be added, the sending content and return content analysis of the inspection items need to be re-adapted. However, due to the fixed inspection commands and inspection order, the scalability of the system is limited. When adding new equipment types and inspection items, it is necessary to re-adapt the inspection commands in the background. A new set of sending processes and parsing processes are written; the existing technology also includes inspecting the same type of equipment through inspection templates, the inspection templates include a collection of commands or interfaces, when inspecting the equipment, the equipment and the template are bound, and the commands and interfaces in the inspection templates are executed on the equipment in turn, and the results of the commands or interfaces are analyzed to determine whether the inspection items in the template are normal. Although the reuse of inspection templates greatly facilitates the inspection of equipment with the same inspection targets, it still does not solve the problem of rewriting the system's sending process and parsing process when adding new equipment types and inspection items. Therefore, when adding new equipment types and equipment inspection items, how to reduce the re-adaptation of the inspection system is an urgent problem to be solved.
[0027] In order to solve the above technical problems, the present application provides a device inspection management method, apparatus, equipment and storage medium. The device type is regarded as a special inspection item with different levels. The upper node is specified when adding, and the lower inspection item list is imported in batches. When adding inspection items, the upper node and related inspection standards need to be specified, and the device type and inspection items are saved in the inspection item table. When configuring the inspection task, the parent node of the inspection item saved in the database is used to recursively search the child nodes under each node to form an inspection tree for users to select, thereby improving the inspection efficiency.
[0028] In one embodiment, Figure 1 As shown, a device inspection management method is provided, comprising the following steps:
[0029] S1: Obtain identification information of the device to be inspected, where the identification information at least includes the device type and device model.
[0030] S2: Obtain a target inspection item list that matches the identification information of the device to be inspected, and an inspection standard corresponding to the target inspection item list, wherein the target inspection item list includes at least a device type, a device model, and a first inspection item corresponding to the device model.
[0031] It should be noted that the identification information may include the device type and device model, and may also include other information used to identify the device, such as the device ID; the target inspection item list can be obtained by matching from the database, and the database includes multiple inspection item lists generated by the first inspection items corresponding to the device model and the device identification information. The inspection item list generally includes the inspection item name, inspection item level (device type, device model, first inspection item), inspection item parent level, inspection item ID and inspection item parent ID and other information; the equipment to be inspected generally refers to the equipment added to the management system and needs to be inspected by the management system; the first inspection item is the sub-inspection item corresponding to the equipment model, which refers to inspection items such as equipment appearance inspection, component inspection and operating status inspection.
[0032] In some specific implementations, before obtaining a target inspection item list matching the identification information of the device to be inspected and an inspection standard corresponding to the target inspection item list, the method further includes:
[0033] Based on the identification information of the device to be inspected, detecting whether there is a target inspection item list matching the identification information of the device to be inspected in the database includes:
[0034] Obtain identification information of the device to be inspected, wherein the identification information here may include the device type and device model of the device to be inspected;
[0035] Compare the identification information of the device to be inspected with the device identification information pre-stored in the database, that is, compare the device type and device model of the device to be inspected with the device type and device model pre-stored in the database one by one;
[0036] In response to the comparison being successful, determining that there is a target inspection item list in the database that matches the identification information of the device to be inspected, wherein when both device types and device models are consistent, the comparison is determined to be successful, and at this time, the inspection item list corresponding to the identification information in the database is determined to be the target inspection item list;
[0037] In response to a comparison failure, it is determined that a target inspection item list that matches the identification information of the device to be inspected does not exist in the database, wherein when there is at least one information inconsistency between the device type and device model, such as an unsuccessful device type comparison and / or an unsuccessful device model comparison, the comparison is determined to have failed, and at this time it is necessary to create a target inspection item list that matches the identification information.
[0038] In the above implementation, the management system fills in the corresponding inspection item list by default for the supported device types and device models and saves it in the database. The inspection item list can be directly called later, thereby improving the inspection efficiency.
[0039] In some specific implementations, when it is determined that there is no target inspection item list matching the identification information of the device to be inspected in the database, the method further includes:
[0040] Obtaining identification information of the device to be inspected and a first inspection item corresponding to the device model, wherein the identification information includes at least the device type and the device model;
[0041] The device type, device model, and the first inspection item corresponding to the device model of the device to be inspected are hierarchically divided to obtain a hierarchical division result including multiple hierarchies, and the device type, device model, and the first inspection item corresponding to the device model of the device to be inspected are defined as the third inspection item in the corresponding hierarchies, wherein the hierarchical division is generally as follows: the parent level of the device type level is defined as the root node, the parent level of the device model level is defined as a specific device type, and the parent level of the first inspection item level is defined as a specific device model;
[0042] Obtain the unique code corresponding to the third inspection item, and according to the hierarchical division result, map the name of the third inspection item of the target level with the unique code corresponding to the third inspection item to generate a first mapping relationship, wherein the third inspection item includes the device type, the device model and the first inspection item corresponding to the device model, that is, the device type and the device model are regarded as special inspection items for subsequent inspections, and their unique code refers to the ID; based on this, when the management platform needs to adapt to a new device type (or device model), add an inspection item to the inspection item management page, enter the inspection item name (that is, the name of the device type or device model), and select the inspection item level as the device type or device model, and set the corresponding inspection item parent level; if the inspection item of the sub-level of the device type or device model is the same as the inspection item of the sub-level of other device types or device models, that is, support the same commands and execute the same inspection standards , when adding sub-inspection items at the device type and model level, you can select the above sub-inspection items from the list of all inspection items to be selected, or you can add new sub-inspection items on the page. After adding, save the content of the new device type (or device model) to the database inspection item list. If the sub-level inspection items of the device type or device model are the same as the sub-level inspection items of other device types or device models, you only need to indicate the IDs of these sub-inspection items when importing, and you can see the sub-inspection items contained in the new device type or device model after importing. For example, as shown in Table 1, when the third inspection item is a server, its inspection item ID is 1, and a first mapping relationship is generated based on the server and inspection item ID1. When the third inspection item is server model M5, its inspection item ID is 101, and a first mapping relationship is generated based on server model M5 and inspection item ID101. And so on, which will not be repeated here.
[0043] In response to the existence of an association relationship between the third inspection items of different target levels, the first mapping relationship corresponding to the different target levels with the association relationship is mapped to generate a second mapping relationship, and saved in the mapping relationship table to obtain the target inspection item list, wherein the association relationship between the third inspection items of different target levels refers to a certain level being the parent level or child level of another level, that is, the inspection item in a certain level is the parent node or child node of the inspection item in another level. Exemplarily, as shown in Table 1, the mapping relationship generated between the server and the inspection item ID1 and the mapping relationship generated between the server model M5 and the inspection item ID101 are mapped one by one to generate a second mapping relationship, and saved in the mapping relationship table, thereby generating a target inspection item list and saving it in the database. At the same time, when the target inspection item list is selected, it is displayed on the display page.
[0044] Specifically, Figure 4As shown, when creating a new third inspection item, it is necessary to configure the inspection item name, inspection item level (device type, device model, first inspection item) and inspection item parent level. The parent level of the device type level is the root node, the parent level of the device model level is a specific device type, and the parent level of the inspection item level is a specific device model, as shown in Table 1. When the database is saved, the parent level name of the inspection item and the corresponding inspection item parent ID are saved. When the execution command (or interface), execution return result and inspection standard of the inspection item are the same on multiple device models, its parent level can be multiple, that is, the inspection item can be shared by multiple device models.
[0045] Table 1: List of inspection items.
[0046]
[0047]
[0048] Furthermore, in order to reduce the tedious operation of adding inspection items on the system page, each device model has been configured with a preset inspection item list for the device model when the management system is started. The inspection item list is saved in the database, and the inspection item list also supports functions such as inspection item modification, inspection item deletion, inspection list viewing, and inspection item viewing details. That is, if the inspection item needs to be modified or deleted according to actual needs, the corresponding modification or deletion operation can be performed in the corresponding inspection item list. The management system also supports batch import of inspection items, and according to the inspection form file provided by the system, enter the content of multiple lines of inspection items, and then upload them to the management system. After the operation is successful, the inspection item list previously imported in batches can be viewed in the management system.
[0049] In some specific implementations, after generating the target inspection item list, the method further includes:
[0050] Obtain the execution method of the first inspection item and the preset passing standard of the execution result;
[0051] Defining the execution mode of the first inspection item and the preset passing standard of the execution result as the inspection standard corresponding to the target inspection item list, and mapping them into the target inspection item list;
[0052] The target inspection item list and its corresponding inspection criteria are saved in the database.
[0053] Specifically, when creating a new target inspection item list, if the current inspection item level is the first inspection item, you also need to select the execution method of the first inspection item. The execution methods generally include command and interface methods, and enter the corresponding command and interface content, select the parsing method of the returned content, which generally includes list and key value methods. Custom parsing methods are also supported. The custom parsing method requires manual configuration of information such as the return content format and character segmentation method on the page to facilitate parsing of fields and keywords; set the inspection pass or fail standard for the first inspection item on the page, select the level of inspection failure, including abnormal and alarm methods. If the level is alarm, you can set multiple thresholds to correspond to different warning levels, such as emergency, important and warning. If the level is abnormal, you need to set the abnormal judgment standard on the page, such as judging whether the input is abnormal according to the target field, and the logical relationship between the abnormal item (or normal item) and the standard, which can be set according to actual needs.
[0054] For example, if the status column is normal, the inspection standard field is status, the logical judgment selects ==, and the inspection standard content is normal; if the status column is not abnormal, the inspection standard field is status, the logical judgment selects !=, and the inspection standard content is abnormal; or if the status column is not offline or fault, the inspection standard field is status, the logical judgment selects not contain, and the inspection standard content enters offline or fault; when the selected level is alarm, it is necessary to enter which field is used to judge the alarm, and the logical relationship between the alarm threshold and the standard, such as according to the standard that the cpuUsage value is greater than 90% for important and greater than 80% for warning, that is, the inspection standard field is cpuUsage, the logical judgment selects >, the important standard content (threshold) of the inspection alarm is 90, and the warning standard content (threshold) of the inspection alarm is 80.
[0055] Furthermore, when configuring the inspection standard, it supports performing logical AND or NOT on the return contents of multiple fields of the command or interface to obtain the final expression. For example, standard 1 is: the inspection standard field is input as status, the logical judgment selects !=, and the inspection standard content is input as abnormal. Standard 2 is: the inspection standard field is input as runningStatus (running status), the logical judgment selects ==, and the inspection standard content is input as running (running). These two standards are logically ANDed in the background to obtain the final standard, that is, it is normal only when the above two standards are met at the same time. In the foreground, these two standards need to be connected through the "and" icon &&; if the standards are in an or relationship, the standards need to be connected through the "or" icon ||; if the standard corresponds to a field that is not equal to a certain value, the standard needs to be connected through the "not" icon! It is negated and supports configuration of inspection item content description, inspection item standard description, inspection abnormal result description format, inspection suggestion format and other information, so that users can view them on the page when the inspection item is executed; the inspection item content description and inspection item standard description are fixed values, that is, the display content of these two items is consistent each time the inspection item is executed; the inspection abnormal result description format and the inspection suggestion format use the fields in the returned content as placeholders when configuring, for example: the hard disk disk running status is status, the inspection suggestion format is please check the hard disk disk, and the location is the cabinet enclosure slot slot. During the execution of the inspection item, after the inspection item obtains the inspection abnormal result description format, the inspection abnormal result is described as: the hard disk 1 running status is offline; the hard disk 5 running status is faulty; the inspection suggestion is: please check hard disk 1, the location is cabinet 1 slot 1; please check hard disk 5, the location is cabinet 1 slot 5.
[0056] In the above implementation, when the target inspection item list does not exist in the database, before creating the inspection task, the inspection item list corresponding to the device to be inspected is created in advance and saved in the database, so that each device model is already configured with the preset inspection item list of the device model when the management system starts the inspection task, which can reduce the tedious operation of adding inspection items on the platform page.
[0057] S3: Obtain the device type, the device model, and the hierarchical division result corresponding to the first inspection item corresponding to the device model, generate a target tree data structure based on the hierarchical division result, and determine the second inspection item in the target tree data structure, generate an inspection task based on the inspection standard corresponding to the second inspection item and the target inspection item list, and add the inspection task to the inspection task table.
[0058] It should be noted that the inspection task at least includes the inspection task name, the maximum number of inspection reports to be retained, and the inspection report file format (WORD / EXCEL / PDF, etc.); the inspection task table may include multiple inspection tasks, and the inspection tasks in the inspection task table can be executed by multiple threads as needed.
[0059] In some specific implementations, the method for generating the inspection task includes:
[0060] In response to receiving the inspection task creation request, the device type, the device model, and the hierarchical division result corresponding to the first inspection item corresponding to the device model are obtained, and based on the hierarchical division result, the node position of the initial tree data structure is determined, wherein the node includes a root node, a parent node, and a child node, etc. If the hierarchy is divided into a parent hierarchy, then the corresponding node is the parent node, and the node position is determined by combining the hierarchy corresponding to each node and the connection relationship between each node and its parent node. If the root node is the first hierarchy, the device type is the second hierarchy, and the device type is connected to the root node, then the node position corresponding to the device type is a position in the second hierarchy that can be connected to the root node, and so on, which will not be repeated;
[0061] Recursively generate a target tree data structure according to the node positions of the initial tree data structure, and determine a second inspection item in the target tree data structure, wherein the second inspection item refers to an inspection item selected according to actual needs;
[0062] Based on the second inspection item, the inspection standard corresponding to the target inspection item list, and the configured inspection task name, the number of inspection reports retained, and the inspection report file format, an inspection task is generated, and an execution time node is set for the inspection task, wherein the execution time node can be set according to actual needs, that is, a timed opening and closing strategy is set for the inspection task;
[0063] Add the inspection tasks with multiple set execution time nodes to the inspection task table.
[0064] Specifically, Figure 3As shown, when creating a new inspection task, you need to configure the inspection task name, the maximum number of inspection reports to be retained, and the inspection report file format (WORD / EXCEL / PDF, etc.), and specify the device types and device models included in the inspection task (which may include multiple device types and device models). After selecting the device type and device model, the management system filters out a subset of devices that meet the corresponding device type and model from the added device set, and then obtains all inspection items in the inspection item list corresponding to the device type and model from the database. By traversing all inspection items, according to the relationship between the inspection item ID and the inspection parent ID, a tree data structure is recursively generated according to the level of device type, device model, and inspection item for users or systems to check. Among them, the same device model has the same inspection item, and all inspection items of the device model are checked by default. It also supports checking the inspection items of a certain device separately. For example, Figure 4 As shown in the figure, according to the records in the database, a tree consisting of the hierarchical relationship of the inspection items displayed on the front-end inspection task management page is built. First, the inspection item records are sorted in ascending order, and then the inspection items are traversed to find the child nodes corresponding to the inspection items. For example, the child nodes corresponding to the root node are server, storage, and switch respectively; then the child nodes corresponding to the server, storage, and switch are searched in turn, that is, all the records whose parent node ID is the current inspection item ID in all inspection items are searched; the child inspection item IDs corresponding to the server are 101 and 102, and then the corresponding child nodes of 101 are searched. The points are inspection item 1001 and inspection item 1002; the child node corresponding to 102 is inspection item 1003; the child nodes corresponding to storage are 201 and 202, and the child nodes corresponding to 201 and 202 are inspection item 2001; the child nodes corresponding to switches are 301 and 302; the child nodes corresponding to 301 and 302 are inspection item 3001, that is, first perform a depth traversal on the nodes in the node list, and then return to the previous layer for a breadth traversal, that is, execute the following code for the three highest categories of server, storage, and switch to complete the construction of the sub-inspection items of each inspection item.
[0065] public void getChildItems(Item currentItem){
[0066] String itemId=currentItem.getItemId();
[0067] List <item>childIdItems=new ArrayList<>();
[0068] List <item>items = new ArrayList<>();
[0069] for(Item item:items){
[0070] if(item.getParentItemIds().contains(itemld)){
[0071] childIdItems.add(item);
[0072] getChildItems(item);
[0073] }
[0074] }
[0075] currentItem.setChildItems(childIdltems);
[0076] }
[0077] It is returned to the front end in JSON format, such as the server part as follows:
[0078] {"itemId":1,"itemName":"Server","itemChildItem":[{"itemId":101,
[0079] "itemName":"
[0080] Server Model M5","itemChildItem":[{"itemId":1001,"itemName":"CPU Utilization
[0081] ","itemChildItem":[]},{"itemId":1002,"itemName":"Memory utilization
[0082] ","itemChildItem":[]}]},{"itemId":102,"itemName":"Server model
[0083] M4","itemChildItem":[{"itemId":1001,"itemName":"CPU utilization
[0084] ","itemChildItem":[]},{"itemId":1003,"itemName":"Memory utilization
[0085] ","itemChildItem":[]}]}]}
[0086] Its structure is as follows:
[0087] ∨0:
[0088] ∨itemChildItem:Array(2)
[0089] >0:{itemId:1001,itemName:CPU utilization'itemChildItem:Array(0)}
[0090] >1:{itemId:1002,itemName:CPU utilization'itemChildItem:Array(0)}
[0091] length:2
[0092] >[[Prototype]]:Array(0)
[0093] itemId:101
[0094] itemName:"Server Model M5"
[0095] >[[Prototype]]:0bject
[0096] ∨1:
[0097] ∨itemChildItem:Array(2)
[0098] >0:{itemId:1001,itemName:CPU utilization'itemChildItem:Array(0)}
[0099] >1:{itemId:1003,itemName:memory utilization',itemChildItem:Array(0)}
[0100] length:2
[0101] >[[Prototype]]:Array(0)
[0102] itemId:102
[0103] itemName:"Server Model M4"
[0104] >[[Prototype]]:0bject
[0105] length:2
[0106] >[[Prototype]]:Array(0)
[0107] itemId:1
[0108] ItemName: "Server"
[0109] According to the itemChildItem attribute of the server, the relationship between each level and the bottom inspection item are displayed in a tree structure. When adding an inspection item (such as device model, device type or the first inspection item, etc.), you only need to pay attention to the parent node of the inspection item (there can be multiple parent nodes). When displayed on the front page, all child nodes of the node are displayed through the above conversion.
[0110] At the same time, set the timing strategy for turning on or off the inspection task. Specifically, the execution of the inspection task includes manual execution and scheduled execution. The scheduled execution strategy includes interval strategy and timing strategy. The interval strategy setting includes the task execution interval, such as 1 day, 1 week or 1 month. The timing strategy includes execution at H hour and M minute every day, execution at H hour and M minute on a certain day of the week, or execution at a fixed time point every month. The selected time point is the preset execution time node corresponding to the target inspection task.
[0111] Furthermore, after the inspection task is successfully created, the inspection task is saved in the inspection task table of the database, and then the inspection task table of the database is queried to display all the inspection tasks on the page. Each inspection task record in the inspection task table mainly includes the inspection task ID, the inspection device ID set and the inspection item ID set. After selecting an inspection task, you can view the detailed information of the task and modify the added inspection tasks, such as modifying the maximum number of inspection reports retained for the task, the inspection report file format, and modifying the selected device type, device model and device and the corresponding inspection items. At the same time, you can also modify the opening and closing of the timing strategy, modify the time of the specific timing strategy, and delete the added inspection tasks.
[0112] In the above implementation, when creating an inspection task, all inspection items of the device model are displayed through a tree data structure for selection. Inspection tasks for different device types can be added on the management system page, and the added inspection tasks can reuse sub-inspection items of other device types, or add new sub-inspection items to the device type, thereby improving inspection efficiency.
[0113] S4: Execute the inspection task in the inspection task table, generate an execution result, and determine the status of the device to be inspected according to the execution result.
[0114] It should be noted that the status of the equipment to be inspected includes normal and abnormal status.
[0115] In some specific implementations, executing the inspection tasks in the inspection task table and generating execution results includes:
[0116] Obtain the current time node, and determine whether the current time node is a preset execution time node corresponding to the target inspection task;
[0117] In response to the current time node being the preset execution time node, executing the target inspection task in the inspection task table and generating an execution result;
[0118] In response to the current time node not being the preset execution time node, the target inspection task in the inspection task table is executed when the preset execution time node is reached, and an execution result is generated.
[0119] In some specific implementations, determining the state of the device to be inspected according to the execution result includes:
[0120] Based on the inspection standard corresponding to the target inspection item list, the execution result is analyzed to determine the status of the device to be inspected.
[0121] Specifically, the background of the management system starts a timer with an interval of 1 minute, traverses the created inspection tasks, and checks whether the timing of the current inspection task matches the current time point. If it matches, the inspection task is executed. If there are multiple inspection tasks that match the current time, multiple threads are started to execute the inspection tasks separately. If the number of inspection tasks exceeds the maximum number allocated by the thread pool of background running threads, it is necessary to insert the later traversed inspection task into the waiting task queue and wait until the previous inspection task is completed before executing the inspection task.
[0122] In some specific implementations, the method for determining the number of inspection task execution threads and the number of inspection tasks in the waiting task queue includes:
[0123] Determine a preset resource occupancy amount, wherein the method for determining the preset resource occupancy amount includes:
[0124] Obtain resource usage at different time nodes and the corresponding system operation efficiency;
[0125] In response to detecting that the system operation efficiency is greater than a first preset threshold and the corresponding resource occupancy is greater than a second preset threshold, marking the resource occupancy corresponding to the system operation efficiency, wherein the first preset threshold and the second preset threshold can be set according to actual needs;
[0126] In response to detecting that the number of marks is greater than a third preset threshold, calculating an average value corresponding to a plurality of marked resource occupancy amounts, and defining the average value as the preset resource occupancy amount, wherein the third preset threshold value can be set according to actual needs;
[0127] Obtaining the target resource occupancy at the current time node and the preset resource occupancy;
[0128] In response to detecting that the difference between the target resource occupancy and the preset resource occupancy is greater than a fourth preset threshold, allocating the resource margin, wherein the difference refers to the value of the preset resource occupancy minus the target resource occupancy, and the fourth preset threshold can be set according to actual needs. The resource margin allocation method includes:
[0129] Determine whether the current time node is a peak period for creating and executing inspection tasks, which can be determined by the resource usage of executing inspection tasks in multiple time periods, that is, when the resource usage of executing inspection tasks at the time node in multiple time periods is greater than a fifth preset threshold, wherein the fifth preset threshold can be set according to actual needs, then determine that the time node is a peak period for creating and executing inspection tasks;
[0130] In response to detecting that the current time node is a peak period for creating and executing inspection tasks, allocating resource margins according to a first preset ratio to determine the number of inspection task execution threads and the number of inspection tasks in the waiting task queue;
[0131] In response to detecting that the current time node is not a peak period for creating and executing inspection tasks, allocating resource margins according to a second preset ratio to determine the number of inspection task execution threads and the number of inspection tasks in the waiting task queue;
[0132] Among them, the ratio of the first preset ratio is greater than the ratio of the second preset ratio. Both the first preset ratio and the second preset ratio can be set according to actual needs. For example, the first preset ratio is 9:1, and the second preset ratio is 7:3. That is, when the first preset ratio is 9:1, nine-tenths of the resource surplus is used to execute inspection tasks, and one-tenth is used to place inspection tasks in the waiting task queue, and so on.
[0133] In the above implementation, by determining the number of inspection task execution threads and the number of inspection tasks in the waiting task queue through preset rules, the inspection task execution efficiency can be further improved while ensuring the system operation efficiency.
[0134] Furthermore, when executing the inspection task, according to the equipment checked in the inspection task and the inspection items checked, first traverse each checked device, inspect the current device, and then inspect the corresponding inspection items of the device (excluding the inspection items at the level of device type or device model), query the command or interface corresponding to the inspection item, obtain the execution result returned by the device through the specified protocol, and judge whether the inspection result is normal, abnormal or warning through logical judgment according to the inspection standard configured for the inspection item. When the inspection result is abnormal, judge the status of the device to be inspected as abnormal, fill in the inspection suggestion and inspection result. The abnormal description content gives different abnormal inspection descriptions and corresponding inspection suggestions according to the reasons for abnormal inspection results. During the execution of the inspection task, the inspection results, inspection suggestions, inspection abnormal description content and inspection progress of the current inspection item are sent to the front-end page of the platform through the Websocket protocol. Users can track the execution of the inspection task in real time. After the inspection task is completed, the inspection item results, inspection suggestions, inspection abnormal description content and other information are written into the file in sequence, and the inspection report is generated according to the report format set by the user for the user to download and view.
[0135] In the above implementation, the created inspection task is executed to obtain the execution result, so as to judge the status of the equipment to be inspected, so as to quickly and effectively inspect the equipment to be inspected in the data center.
[0136] In the above-mentioned equipment inspection management method, the method includes: obtaining identification information of the equipment to be inspected, the identification information at least including the equipment type and equipment model; obtaining a target inspection item list matching the identification information of the equipment to be inspected, and an inspection standard corresponding to the target inspection item list, the target inspection item list at least including the equipment type, equipment model, and a first inspection item corresponding to the equipment model; obtaining a hierarchical division result corresponding to the equipment type, the equipment model, and the first inspection item corresponding to the equipment model, generating a target tree data structure based on the hierarchical division result, and determining a second inspection item in the target tree data structure, generating an inspection task based on the second inspection item and the inspection standard corresponding to the target inspection item list, and adding the inspection task to the inspection task list. In the table; execute the inspection tasks in the inspection task table, generate execution results, and determine the status of the equipment to be inspected based on the execution results; the present application regards the equipment type and equipment model as a kind of inspection item, and its inspection level is the parent of the first inspection item. Then, the hierarchical relationship between the equipment type, equipment model and sub-inspection items can be viewed through the tree structure. When adding a new equipment type or equipment model, the sub-inspection items of other models can be directly reused, which solves the defect that when adapting new equipment types, equipment models and inspection items in the automatic inspection method, it is necessary to re-encode in the system background to increase the sending process and the parsing process, that is, to add inspection items on the page, configure the upper-level nodes corresponding to the inspection items, the corresponding commands, the return fields and the inspection standards and inspection results filling, without adding new coding in the background, effectively improving the inspection efficiency.
[0137] It should be understood that although Figure 1-Figure 3 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1-Figure 3 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0138] In one embodiment, Figure 5 As shown, a device inspection management device is provided, including: a first acquisition module, a second acquisition module, a construction module and a task execution module, wherein: the first acquisition module is used to obtain the identification information of the device to be inspected, and the identification information at least includes the device type and the device model; the second acquisition module is used to obtain a target inspection item list matching the identification information of the device to be inspected, and the inspection standard corresponding to the target inspection item list, and the target inspection item list at least includes the device type, the device model, and the first inspection item corresponding to the device model; the construction module is used to obtain the hierarchical division result corresponding to the device type, the device model, and the first inspection item corresponding to the device model, generate a target tree data structure based on the hierarchical division result, and determine the second inspection item in the target tree data structure, generate an inspection task based on the second inspection item and the inspection standard corresponding to the target inspection item list, and add the inspection task to the inspection task table; the task execution module executes the inspection task in the inspection task table, generates an execution result, and determines the status of the device to be inspected according to the execution result.
[0139] As a preferred implementation manner, in an embodiment of the present invention, the device also includes a detection module, which is specifically used to: compare the identification information of the equipment to be inspected with the equipment identification information pre-stored in a database, wherein the database includes multiple first inspection items corresponding to the equipment model and an inspection item list generated by the equipment identification information; in response to a successful comparison, determine that there is a target inspection item list in the database that matches the identification information of the equipment to be inspected; in response to a failed comparison, determine that there is no target inspection item list in the database that matches the identification information of the equipment to be inspected.
[0140] As a preferred implementation mode, in an embodiment of the present invention, the device also includes an inspection item list creation module, which is specifically used to: obtain a first inspection item corresponding to the device model of the device to be inspected; hierarchically divide the device type, device model, and the first inspection item corresponding to the device model of the device to be inspected to obtain a hierarchical division result including multiple levels, and define the device type, device model, and the first inspection item corresponding to the device model of the device to be inspected as a third inspection item in the corresponding level; obtain a unique code corresponding to the third inspection item, and map the name of the third inspection item of the target level with the unique code corresponding to the third inspection item according to the hierarchical division result to generate a first mapping relationship; in response to the existence of an association relationship between the third inspection items of different target levels, map the first mapping relationships corresponding to the different target levels with the association relationship to generate a second mapping relationship, and save it in a mapping relationship table to generate the target inspection item list.
[0141] As a preferred implementation mode, in an embodiment of the present invention, the device also includes an inspection standard creation module, which is specifically used to: obtain the execution method of the first inspection item and the preset passing standard of the execution result; define the execution method of the first inspection item and the preset passing standard of the execution result as the inspection standard corresponding to the target inspection item list, and map them into the target inspection item list; save the target inspection item list and its corresponding inspection standard into the database.
[0142] As a preferred implementation mode, in an embodiment of the present invention, the construction module is specifically used to: in response to receiving the inspection task creation request, obtain the device type, the device model, and the hierarchical division result corresponding to the first inspection item corresponding to the device model, and determine the node position of the initial tree data structure based on the hierarchical division result; recursively generate the target tree data structure according to the node position of the initial tree data structure, and determine the second inspection item in the target tree data structure; generate the inspection task based on the second inspection item, the inspection standard corresponding to the target inspection item list, and the configured inspection task name, the number of inspection reports retained and the inspection report file format, and set the execution time node for the inspection task; add the inspection tasks with multiple execution time nodes set to the inspection task table.
[0143] As a preferred implementation mode, in an embodiment of the present invention, the task execution module is specifically used to: obtain the current time node, determine whether the current time node is the preset execution time node corresponding to the target inspection task; in response to the current time node being the preset execution time node, execute the target inspection task in the inspection task table, and generate an execution result.
[0144] As a preferred implementation manner, in an embodiment of the present invention, the task execution module is further specifically used to: analyze the execution result based on the inspection standard corresponding to the target inspection item list to determine the status of the device to be inspected.
[0145] For the specific definition of the equipment inspection management device, please refer to the definition of the equipment inspection management method above, which will not be repeated here. Each module in the above-mentioned equipment inspection management device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0146] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 6 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through 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 and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. 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, a device inspection management method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0147] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0148] In one embodiment, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program: S1: obtaining identification information of a device to be inspected, wherein the identification information includes at least a device type and a device model; S2: obtaining a target inspection item list matching the identification information of the device to be inspected, and an inspection standard corresponding to the target inspection item list, wherein the target inspection item list includes at least a device type, a device model, and a first inspection item corresponding to the device model; S3: obtaining a hierarchical division result corresponding to the device type, the device model, and the first inspection item corresponding to the device model, generating a target tree data structure based on the hierarchical division result, determining a second inspection item in the target tree data structure, generating an inspection task based on the second inspection item and the inspection standard corresponding to the target inspection item list, and adding the inspection task to an inspection task table; S4: executing the inspection task in the inspection task table, generating an execution result, and determining the status of the device to be inspected based on the execution result.
[0149] In one embodiment, when the processor executes the computer program, the following steps are also implemented: comparing the identification information of the device to be inspected with the device identification information pre-stored in a database, wherein the database includes multiple first inspection items corresponding to the device model and an inspection item list generated by the device identification information; in response to a successful comparison, determining that a target inspection item list that matches the identification information of the device to be inspected exists in the database; in response to a failed comparison, determining that a target inspection item list that matches the identification information of the device to be inspected does not exist in the database.
[0150] In one embodiment, when the processor executes the computer program, the following steps are also implemented: obtaining the first inspection item corresponding to the device model of the device to be inspected; hierarchically dividing the device type, device model, and the first inspection item corresponding to the device model of the device to be inspected to obtain a hierarchical division result including multiple levels, and defining the device type, device model, and the first inspection item corresponding to the device model of the device to be inspected as the third inspection item in the corresponding level; obtaining the unique code corresponding to the third inspection item, and mapping the name of the third inspection item of the target level with the unique code corresponding to the third inspection item according to the hierarchical division result to generate a first mapping relationship; in response to the existence of an association relationship between the third inspection items of different target levels, mapping the first mapping relationships corresponding to the different target levels with the association relationship to generate a second mapping relationship, and saving it in the mapping relationship table to generate the target inspection item list.
[0151] In one embodiment, when the processor executes the computer program, the following steps are also implemented: obtaining the execution method of the first inspection item and the preset passing standard of the execution result; defining the execution method of the first inspection item and the preset passing standard of the execution result as the inspection standard corresponding to the target inspection item list, and mapping them into the target inspection item list; saving the target inspection item list and its corresponding inspection standard into the database.
[0152] In one embodiment, when the processor executes the computer program, the following steps are also implemented: in response to receiving the inspection task creation request, the device type, the device model, and the hierarchical division result corresponding to the first inspection item corresponding to the device model are obtained, and based on the hierarchical division result, the node position of the initial tree data structure is determined; according to the node position of the initial tree data structure, a target tree data structure is recursively generated, and a second inspection item in the target tree data structure is determined; based on the second inspection item, the inspection standard corresponding to the target inspection item list, and the configured inspection task name, the number of inspection reports retained, and the inspection report file format, an inspection task is generated, and an execution time node is set for the inspection task; and multiple inspection tasks with set execution time nodes are added to the inspection task table.
[0153] In one embodiment, when the processor executes the computer program, the following steps are also implemented: obtaining the current time node, determining whether the current time node is a preset execution time node corresponding to the target inspection task; in response to the current time node being the preset execution time node, executing the target inspection task in the inspection task table, and generating an execution result.
[0154] In one embodiment, when the processor executes the computer program, the following steps are further implemented: based on the inspection standard corresponding to the target inspection item list, the execution result is analyzed to determine the status of the device to be inspected.
[0155] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented: S1: obtaining identification information of a device to be inspected, the identification information at least including the device type and the device model; S2: obtaining a target inspection item list that matches the identification information of the device to be inspected, and an inspection standard corresponding to the target inspection item list, the target inspection item list at least including the device type, the device model, and a first inspection item corresponding to the device model; S3: obtaining a hierarchical division result corresponding to the device type, the device model, and the first inspection item corresponding to the device model, generating a target tree data structure based on the hierarchical division result, determining a second inspection item in the target tree data structure, generating an inspection task based on the second inspection item and the inspection standard corresponding to the target inspection item list, and adding the inspection task to an inspection task table; S4: executing the inspection task in the inspection task table, generating an execution result, and determining the status of the device to be inspected based on the execution result.
[0156] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: comparing the identification information of the device to be inspected with the device identification information pre-stored in a database, wherein the database includes multiple first inspection items corresponding to the device model and an inspection item list generated by the device identification information; in response to a successful comparison, determining that a target inspection item list that matches the identification information of the device to be inspected exists in the database; in response to a failed comparison, determining that a target inspection item list that matches the identification information of the device to be inspected does not exist in the database.
[0157] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: obtaining the first inspection item corresponding to the device model of the device to be inspected; hierarchically dividing the device type, device model, and the first inspection item corresponding to the device model of the device to be inspected to obtain a hierarchical division result including multiple levels, and defining the device type, device model, and the first inspection item corresponding to the device model of the device to be inspected as the third inspection item in the corresponding level; obtaining the unique code corresponding to the third inspection item, and mapping the name of the third inspection item of the target level with the unique code corresponding to the third inspection item according to the hierarchical division result to generate a first mapping relationship; in response to the existence of an association relationship between the third inspection items of different target levels, mapping the first mapping relationships corresponding to the different target levels with the association relationship to generate a second mapping relationship, and saving it in the mapping relationship table to generate the target inspection item list.
[0158] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: obtaining the execution method of the first inspection item and the preset passing standard of the execution result; defining the execution method of the first inspection item and the preset passing standard of the execution result as the inspection standard corresponding to the target inspection item list, and mapping them into the target inspection item list; saving the target inspection item list and its corresponding inspection standard into the database.
[0159] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: in response to receiving the inspection task creation request, obtaining the device type, the device model, and the hierarchical division result corresponding to the first inspection item corresponding to the device model, and determining the node position of the initial tree data structure based on the hierarchical division result; recursively generating a target tree data structure according to the node position of the initial tree data structure, and determining the second inspection item in the target tree data structure; generating an inspection task based on the second inspection item, the inspection standard corresponding to the target inspection item list, and the configured inspection task name, the number of inspection reports retained, and the inspection report file format, and setting an execution time node for the inspection task; adding multiple inspection tasks with set execution time nodes to the inspection task table.
[0160] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: obtaining the current time node, determining whether the current time node is a preset execution time node corresponding to the target inspection task; in response to the current time node being the preset execution time node, executing the target inspection task in the inspection task table, and generating an execution result.
[0161] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: based on the inspection standard corresponding to the target inspection item list, the execution result is analyzed to determine the status of the device to be inspected.
[0162] In one embodiment, a computer program product is provided, the computer program product comprising a computer program, and when the computer program is executed by a processor, the following steps are implemented: S1: obtaining identification information of a device to be inspected, the identification information comprising at least a device type and a device model; S2: obtaining a target inspection item list matching the identification information of the device to be inspected, and an inspection standard corresponding to the target inspection item list, the target inspection item list comprising at least a device type, a device model, and a first inspection item corresponding to the device model;
[0163] S3: Obtain the device type, the device model, and the hierarchical division result corresponding to the first inspection item corresponding to the device model, generate a target tree data structure based on the hierarchical division result, and determine the second inspection item in the target tree data structure, generate an inspection task based on the inspection standard corresponding to the second inspection item and the target inspection item list, and add the inspection task to the inspection task table; S4: Execute the inspection task in the inspection task table, generate an execution result, and determine the status of the device to be inspected based on the execution result.
[0164] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: comparing the identification information of the device to be inspected with the device identification information pre-stored in a database, wherein the database includes multiple first inspection items corresponding to the device model and an inspection item list generated by the device identification information; in response to a successful comparison, determining that a target inspection item list that matches the identification information of the device to be inspected exists in the database; in response to a failed comparison, determining that a target inspection item list that matches the identification information of the device to be inspected does not exist in the database.
[0165] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: obtaining the first inspection item corresponding to the device model of the device to be inspected; hierarchically dividing the device type, device model, and the first inspection item corresponding to the device model of the device to be inspected to obtain a hierarchical division result including multiple levels, and defining the device type, device model, and the first inspection item corresponding to the device model of the device to be inspected as the third inspection item in the corresponding level; obtaining the unique code corresponding to the third inspection item, and mapping the name of the third inspection item of the target level with the unique code corresponding to the third inspection item according to the hierarchical division result to generate a first mapping relationship; in response to the existence of an association relationship between the third inspection items of different target levels, mapping the first mapping relationships corresponding to the different target levels with the association relationship to generate a second mapping relationship, and saving it in the mapping relationship table to generate the target inspection item list.
[0166] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: obtaining the execution method of the first inspection item and the preset passing standard of the execution result; defining the execution method of the first inspection item and the preset passing standard of the execution result as the inspection standard corresponding to the target inspection item list, and mapping them into the target inspection item list; saving the target inspection item list and its corresponding inspection standard into the database.
[0167] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: in response to receiving the inspection task creation request, obtaining the device type, the device model, and the hierarchical division result corresponding to the first inspection item corresponding to the device model, and determining the node position of the initial tree data structure based on the hierarchical division result; recursively generating a target tree data structure according to the node position of the initial tree data structure, and determining the second inspection item in the target tree data structure; generating an inspection task based on the second inspection item, the inspection standard corresponding to the target inspection item list, and the configured inspection task name, the number of inspection reports retained, and the inspection report file format, and setting an execution time node for the inspection task; adding multiple inspection tasks with set execution time nodes to the inspection task table.
[0168] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: obtaining the current time node, determining whether the current time node is a preset execution time node corresponding to the target inspection task; in response to the current time node being the preset execution time node, executing the target inspection task in the inspection task table, and generating an execution result.
[0169] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: based on the inspection standard corresponding to the target inspection item list, the execution result is analyzed to determine the status of the device to be inspected.
[0170] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and 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-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0171] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, 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, they should be considered to be within the scope of this specification.
[0172] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application.< / item> < / item>
Claims
1. A method for equipment inspection management, characterized in that: The method comprises: Obtaining identification information of the device to be inspected, wherein the identification information includes at least the device type and device model; Obtain a target inspection item list that matches the identification information of the device to be inspected, and an inspection standard corresponding to the target inspection item list, wherein the target inspection item list includes at least a device type, a device model, and a first inspection item corresponding to the device model; Obtaining the device type, the device model, and a hierarchical division result corresponding to the first inspection item corresponding to the device model, generating a target tree data structure based on the hierarchical division result, and determining a second inspection item in the target tree data structure, generating an inspection task based on the inspection standard corresponding to the second inspection item and the target inspection item list, and adding the inspection task to the inspection task table; Execute the inspection task in the inspection task table, generate an execution result, and determine the status of the device to be inspected based on the execution result.
2. The equipment inspection management method according to claim 1, characterized in that: Before obtaining a target inspection item list matching the identification information of the device to be inspected and an inspection standard corresponding to the target inspection item list, the method further includes: Comparing the identification information of the device to be inspected with the device identification information pre-stored in a database, wherein the database includes a plurality of inspection item lists generated by first inspection items corresponding to device models and the device identification information; In response to the comparison being successful, determining that a target inspection item list matching the identification information of the device to be inspected exists in the database; In response to a comparison failure, it is determined that there is no target inspection item list matching the identification information of the device to be inspected in the database.
3. The equipment inspection management method according to claim 2, characterized in that: When it is determined that there is no target inspection item list matching the identification information of the device to be inspected in the database, the method further includes: Obtain a first inspection item corresponding to the device model of the device to be inspected; The device type, device model, and first inspection item corresponding to the device model of the device to be inspected are hierarchically divided to obtain a hierarchical division result including multiple hierarchies, and the device type, device model, and first inspection item corresponding to the device model of the device to be inspected are defined as the third inspection item in the corresponding hierarchical level; Obtaining a unique code corresponding to the third inspection item, and mapping the name of the third inspection item of the target level with the unique code corresponding to the third inspection item according to the hierarchical division result to generate a first mapping relationship; In response to the association between the third inspection items of different target levels, the first mapping relationships corresponding to the different target levels with the association are mapped to generate a second mapping relationship, which is saved in the mapping relationship table to generate the target inspection item list.
4. The equipment inspection management method according to claim 3, characterized in that: After generating the target inspection item list, the method further includes: Obtain the execution method of the first inspection item and the preset passing standard of the execution result; Defining the execution mode of the first inspection item and the preset passing standard of the execution result as the inspection standard corresponding to the target inspection item list, and mapping them into the target inspection item list; The target inspection item list and its corresponding inspection criteria are saved in the database.
5. The equipment inspection management method according to claim 1, characterized in that: Acquiring the device type, the device model, and a hierarchical division result corresponding to the first inspection item corresponding to the device model, generating a target tree data structure based on the hierarchical division result, and determining a second inspection item in the target tree data structure, generating an inspection task based on the inspection standard corresponding to the second inspection item and the target inspection item list, and adding the inspection task to the inspection task table includes: In response to receiving the inspection task creation request, obtaining the device type, the device model, and a hierarchical division result corresponding to the first inspection item corresponding to the device model, and determining a node position of an initial tree data structure based on the hierarchical division result; Recursively generate a target tree data structure according to the node positions of the initial tree data structure, and determine a second inspection item in the target tree data structure; Generate an inspection task based on the inspection standard corresponding to the second inspection item and the target inspection item list, as well as the configured inspection task name, the number of inspection reports retained, and the inspection report file format, and set an execution time node for the inspection task; Add the inspection tasks with multiple set execution time nodes to the inspection task table.
6. The equipment inspection management method according to claim 1, characterized in that: Execute the inspection tasks in the inspection task table, and generate execution results including: Obtain the current time node, and determine whether the current time node is a preset execution time node corresponding to the target inspection task; In response to the current time node being the preset execution time node, executing the target inspection task in the inspection task table and generating an execution result.
7. The equipment inspection management method according to claim 1, characterized in that: Determining the status of the device to be inspected according to the execution result includes: Based on the inspection standard corresponding to the target inspection item list, the execution result is analyzed to determine the status of the device to be inspected.
8. An equipment inspection management device, characterized in that: The device comprises: A first acquisition module is used to acquire identification information of the device to be inspected, wherein the identification information at least includes the device type and the device model; A second acquisition module is used to acquire a target inspection item list that matches the identification information of the device to be inspected, and an inspection standard corresponding to the target inspection item list, wherein the target inspection item list includes at least a device type, a device model, and a first inspection item corresponding to the device model; A construction module, used to obtain the device type, the device model, and the hierarchical division result corresponding to the first inspection item corresponding to the device model, generate a target tree data structure based on the hierarchical division result, and determine the second inspection item in the target tree data structure, generate an inspection task based on the inspection standard corresponding to the second inspection item and the target inspection item list, and add the inspection task to the inspection task table; The task execution module executes the inspection task in the inspection task table, generates an execution result, and determines the status of the device to be inspected according to the execution result.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.
10. 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 7 is implemented.
Citation Information
Cited By
Automatic inspection method and device based on distributed system and computer equipment
CN119854302A
Automated Inspection Method, Device and Computer Equipment Based on Distributed System
CN119854302B