Inspection task processing method and device and electronic equipment
By combining inspection instructions with equipment to be inspected as inspection meta tasks and processing results in a distributed system, the problems of untimely feedback on inspection results and complex correspondence relationships are solved, and the high accuracy and reliability of equipment inspections are achieved.
Patent Information
- Application Number
- CN202311206359.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-18
- Publication Date
- 2025-03-18
AI Technical Summary
Due to the large volume of the equipment to be inspected and the large number of inspection instructions, the feedback of inspection results is not timely or lagging, resulting in the loss of results. In traditional methods, the correspondence between inspection instructions and equipment is complex, making it difficult to count accurate results.
By combining and encapsulating the inspection instructions with the corresponding equipment to be inspected, a patrol element task is formed, and sent to the target equipment for execution through the preset collection service procedure, the first inspection result is obtained. Then input the results into the distributed publishing and subscription message system, obtain the second inspection result through multi-threading, and count the number of tasks to determine the inspection metatask to be completed.
The accuracy and reliability of inspection results are achieved, the loss of results is avoided, and the corresponding relationship management between inspection instructions and equipment is simplified, and the overall accuracy of equipment inspection is improved.
Smart Images

Figure CN119649487A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of equipment inspection, and in particular to an inspection task processing method, device and electronic equipment. Background Art
[0002] Equipment inspection is to issue inspection instructions to the equipment to be inspected and record the execution results of the inspection instructions. For example: daily inspection of hosts, database health check, switch port status check, etc.
[0003] At present, due to the large size of the equipment to be inspected, when the above-mentioned inspection equipment is executing the above-mentioned inspection instructions, if the above-mentioned inspection equipment fails to provide timely inspection result feedback or is stuck, the inspection result may be lost. In addition, the correspondence between the inspection instructions and the equipment to be inspected in the traditional inspection task processing method is complex, which makes it inconvenient to count the inspection results, and further leads to poor accuracy of the inspection results. Summary of the invention
[0004] The purpose of the present invention is to provide a patrol inspection task processing method, device and electronic device to alleviate the problem that due to the large size of the equipment to be inspected and the large number of patrol inspection instructions, if the above-mentioned patrol inspection equipment fails to provide timely feedback on the inspection results or is stuck, the results after the inspection are often lost. In addition, the correspondence between the patrol inspection instructions and the equipment to be inspected in the traditional patrol inspection task processing method is complex, which makes it inconvenient to count the patrol inspection results, further resulting in poor accuracy of the inspection results, thereby improving the accuracy of equipment inspection.
[0005] In the first aspect, an embodiment of the present invention provides a method for processing inspection tasks, including: obtaining a preset inspection instruction and a device to be inspected corresponding to the inspection instruction; combining and packaging the inspection instruction and the device to be inspected corresponding to the inspection instruction to obtain an inspection meta-task; sending the inspection meta-task to the target device to be inspected corresponding to the inspection meta-task through a preset collection service program; executing the inspection instruction in the inspection meta-task through the target device to be inspected to obtain a first inspection result.
[0006] In a preferred embodiment of the present invention, after the step of obtaining the first inspection result by executing the inspection instruction in the inspection meta-task through the target device to be inspected, the method includes: inputting the first inspection result into a distributed publish-subscribe message system; monitoring the first inspection result in the distributed publish-subscribe message system through a preset inspection service program, and performing multi-threaded processing on the first inspection result to obtain a second inspection result corresponding to the first inspection result; and inputting the second inspection result into a preset distributed system.
[0007] In a preferred embodiment of the present invention, after combining and packaging the above-mentioned inspection instructions and the equipment to be inspected corresponding to the above-mentioned inspection instructions to obtain the step of inspection meta-task, the above-mentioned method includes: counting the number of tasks of the above-mentioned inspection meta-task; inputting the above-mentioned number of tasks into a preset data storage system; after the step of inputting the above-mentioned second inspection result into a preset distributed system, the above-mentioned method includes: determining the inspection meta-task to be completed based on the above-mentioned number of tasks and the number of results of the above-mentioned second inspection result.
[0008] In a preferred embodiment of the present invention, after determining the step of the inspection meta-tasks to be completed based on the number of tasks and the number corresponding to the second inspection results, the method further includes: determining whether the number of the inspection meta-tasks to be completed is zero; if so, determining that all the inspection meta-tasks have been executed.
[0009] In a preferred embodiment of the present invention, the step of monitoring the above-mentioned first inspection result in the above-mentioned distributed publish-subscribe message system through a preset inspection service program, and performing multi-threaded processing on the above-mentioned first inspection result to obtain a second inspection result corresponding to the above-mentioned first inspection result includes: monitoring the above-mentioned first inspection result in the above-mentioned distributed publish-subscribe message system through a preset inspection service program, querying the inspection meta-task of the above-mentioned data storage system corresponding to the above-mentioned first inspection result; determining a parsing script string according to the inspection meta-task of the above-mentioned data storage system corresponding to the above-mentioned first inspection result; and determining the second inspection result corresponding to the above-mentioned first inspection result according to the above-mentioned parsing script string and the above-mentioned first inspection result.
[0010] In a preferred embodiment of the present invention, the step of determining the second inspection result corresponding to the above-mentioned first inspection result based on the above-mentioned parsing script string and the above-mentioned first inspection result includes: parsing the above-mentioned parsing script string and the above-mentioned first inspection result through a preset parsing program to obtain a parsing result; and determining the above-mentioned second inspection result based on the above-mentioned parsing result.
[0011] In a preferred embodiment of the present invention, after the step of inputting the above-mentioned second inspection result into a preset distributed system, the above-mentioned method also includes: generating a task execution end code through a preset distributed back-end service based on the above-mentioned second inspection result; and pushing the above-mentioned task execution end code to the data warehouse of the above-mentioned distributed publish-subscribe message system.
[0012] In a preferred embodiment of the present invention, after the step of pushing the above-mentioned task execution end code to the data warehouse of the above-mentioned distributed publish-subscribe message system, the above-mentioned method also includes: if a call request for the above-mentioned second inspection result is received; calling the above-mentioned second inspection result in the above-mentioned data warehouse.
[0013] In the second aspect, an embodiment of the present invention provides a patrol task processing device, including: a data acquisition module, used to obtain preset patrol instructions and the equipment to be inspected corresponding to the above patrol instructions; a patrol meta-task determination module, used to combine and package the above patrol instructions and the equipment to be inspected corresponding to the above patrol instructions to obtain a patrol meta-task; a patrol task sending module, used to send the above patrol meta-task to the target equipment to be inspected corresponding to the above patrol meta-task through a preset collection service program; and a patrol result determination module, used to execute the patrol instructions in the above patrol meta-task through the above target equipment to be inspected to obtain a first patrol result.
[0014] In a third aspect, an embodiment of the present invention provides an electronic device, comprising a processor and a memory, wherein the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement the inspection task processing method.
[0015] The present invention has the following beneficial technical effects:
[0016] The embodiment of the present invention provides a method, device and electronic device for processing inspection tasks, including: obtaining a preset inspection instruction and a device to be inspected corresponding to the inspection instruction; combining and packaging the inspection instruction and the device to be inspected corresponding to the inspection instruction to obtain an inspection meta-task; sending the inspection meta-task to the target device to be inspected corresponding to the inspection meta-task through a preset collection service program; executing the inspection instruction in the inspection meta-task through the target device to be inspected to obtain a first inspection result. The invention combines and packages the inspection instruction and the device to be inspected corresponding to the inspection instruction to obtain an inspection meta-task. Since the number of inspection meta-tasks corresponds to the inspection result one-to-one, it alleviates the loss of inspection results caused by the delay in feedback of the inspection result or the jamming of the inspection result when the inspection device executes the inspection instruction, and the difficulty in counting the inspection result due to the complex correspondence between the inspection instruction and the device to be inspected, thereby improving the accuracy of equipment inspection.
[0017] Other features and advantages disclosed in this embodiment will be described in the subsequent description, or some features and advantages can be inferred or determined without doubt from the description, or can be learned by implementing the above-mentioned technology of the present disclosure.
[0018] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0020] Figure 1 A flowchart of a method for processing inspection tasks provided by an embodiment of the present invention;
[0021] Figure 2 A flowchart of another inspection task processing method provided by an embodiment of the present invention;
[0022] Figure 3 A schematic diagram of the structure of an inspection task processing device provided by an embodiment of the present invention;
[0023] Figure 4 A schematic diagram of the structure of an electronic device is provided for an embodiment of the present invention.
[0024] Icons: 31 - data acquisition module; 32 - inspection meta-task determination module; 33 - inspection task delivery module; 34 - inspection result determination module; 41 - memory; 42 - processor; 43 - bus; 44 - communication interface. DETAILED DESCRIPTION
[0025] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0026] Equipment inspection is to issue inspection instructions to the equipment to be inspected and record the execution results of the inspection instructions. For example: daily inspection of hosts, database health check, switch port status check, etc. At present, due to the large volume of equipment to be inspected and the large number of inspection instructions, the inspection results are often lost, resulting in poor accuracy of the inspection results.
[0027] Based on this, an embodiment of the present invention provides a patrol inspection task processing method, device and electronic device, which can improve the accuracy of equipment patrol inspection. To facilitate understanding of the embodiment of the present invention, a patrol inspection task processing method disclosed in the embodiment of the present invention is first introduced in detail.
[0028] Example 1
[0029] In this embodiment, Figure 1 A flowchart of a method for processing inspection tasks provided by an embodiment of the present invention.
[0030] Depend on Figure 1 As can be seen, the above methods include:
[0031] Step S101: obtaining a preset inspection instruction and a device to be inspected corresponding to the inspection instruction.
[0032] In this embodiment, the prior art directly sends the inspection instruction to the device to be inspected for inspection. When the number of devices to be inspected and the number of inspection instructions reach the hundreds, the number of inspection results generated by multiplying the number of devices to be inspected by the number of inspection instructions will reach tens of thousands. Furthermore, when the inspection device executes the inspection instruction, if the inspection device fails to provide timely feedback or freezes, the inspection result is lost, and the corresponding relationship between the inspection instruction and the device to be inspected is complex and difficult to count the inspection results, which further leads to the phenomenon of poor accuracy of the inspection result.
[0033] Step S102: The inspection instructions and the devices to be inspected corresponding to the inspection instructions are combined and packaged to obtain an inspection meta-task.
[0034] In this embodiment, assuming that the inspection instruction is instruction A, and the device to be inspected corresponding to the inspection instruction is device B, the instruction A and the device B are combined and packaged to obtain an inspection meta-task.
[0035] Step S103: Send the inspection meta-task to the target device to be inspected corresponding to the inspection meta-task through a preset collection service program.
[0036] Step S104: the target device to be inspected executes the inspection instruction in the inspection meta-task to obtain a first inspection result.
[0037] In this embodiment, since the first inspection result corresponds one-to-one to the above-mentioned inspection meta-task, the accuracy of the first inspection result obtained is relatively high. Even if the inspection result feedback of the above-mentioned equipment to be inspected is not timely or is stuck, it can be discovered and processed in time, thereby avoiding the loss of inspection results and improving the accuracy of equipment inspection.
[0038] The embodiment of the present invention provides a method for processing inspection tasks, including: obtaining a preset inspection instruction and a device to be inspected corresponding to the inspection instruction; combining and packaging the inspection instruction and the device to be inspected corresponding to the inspection instruction to obtain an inspection meta-task; sending the inspection meta-task to the target device to be inspected corresponding to the inspection meta-task through a preset collection service program; executing the inspection instruction in the inspection meta-task through the target device to be inspected to obtain a first inspection result. The method combines and packages the inspection instruction and the device to be inspected corresponding to the inspection instruction to obtain an inspection meta-task, and the device to be inspected executes the inspection meta-task to obtain an inspection result corresponding to the inspection meta-task, thereby alleviating the phenomenon that the inspection results are often lost due to the large size of the device to be inspected and the large number of inspection instructions, and the phenomenon that the corresponding relationship between the inspection instruction and the device to be inspected is complex and difficult to count the inspection results, thereby improving the accuracy of equipment inspection.
[0039] Example 2
[0040] Based on Example 1, Example 2 also provides another inspection task processing method. In this embodiment, Figure 2 A flowchart of another inspection task processing method provided by an embodiment of the present invention.
[0041] Depend on Figure 2 As can be seen, the above methods include:
[0042] Step S201: Obtain a preset inspection instruction and a device to be inspected corresponding to the inspection instruction.
[0043] Step S202: The inspection instructions and the devices to be inspected corresponding to the inspection instructions are combined and packaged to obtain an inspection meta-task.
[0044] Step S203: Send the inspection meta-task to the target device to be inspected corresponding to the inspection meta-task through a preset collection service program.
[0045] Step S204: the target device to be inspected executes the inspection instruction in the inspection meta-task to obtain a first inspection result.
[0046] Step S205: input the first inspection result into the distributed publish-subscribe message system.
[0047] Step S206: monitor the first inspection result in the distributed publish-subscribe message system through a preset inspection service program, and perform multi-thread processing on the first inspection result to obtain a second inspection result corresponding to the first inspection result.
[0048] In this embodiment, the above step S206 includes: first, monitoring the above first inspection result in the above distributed publish-subscribe message system through a preset inspection service program, and querying the inspection meta-task of the above data storage system corresponding to the above first inspection result. Then, according to the inspection meta-task of the above data storage system corresponding to the above first inspection result, determining the parsing script string. Finally, according to the parsing script string and the above first inspection result, determining the second inspection result corresponding to the above first inspection result.
[0049] In actual operation, the step of determining the second inspection result corresponding to the first inspection result according to the above-mentioned parsing script string and the above-mentioned first inspection result includes: first, parsing the above-mentioned parsing script string and the above-mentioned first inspection result through a preset parsing program to obtain a parsing result. Then, determining the above-mentioned second inspection result according to the above-mentioned parsing result.
[0050] Step S207: input the second inspection result into a preset distributed system.
[0051] In one embodiment, after the step S202, the method includes the following steps A1-A2:
[0052] Step A1: Count the number of tasks of the above inspection meta-task.
[0053] Step A2: Input the above task quantity into a preset data storage system.
[0054] Furthermore, after the step of inputting the second inspection result into a preset distributed system, the method further includes the following steps B1-B2:
[0055] Step B1: If the second inspection result is received, the number of results of the second inspection result is counted.
[0056] Step B2: Determine the inspection meta-tasks to be completed according to the number of tasks and the number of results of the second inspection results.
[0057] In the process of executing the above step B2, when the result quantity of the above second inspection result increases by one, the above task quantity decreases by one until the above task quantity reaches zero.
[0058] In this embodiment, after the above step B2, the above method further includes: determining whether the number of the above inspection element tasks to be completed is zero; if so, determining that all the above inspection element tasks are executed.
[0059] Furthermore, after the above step S207, the method further includes: generating a task execution end code through a preset distributed backend service according to the above second inspection result; and pushing the above task execution end code to the data warehouse of the above distributed publish-subscribe message system.
[0060] Here, after the second inspection result and the total inspection task result are input into the above distributed system, an event will be thrown accordingly. This event will be converted into a message of the distributed publish-subscribe message system and pushed to the topic of the inspection event for use in secondary development.
[0061] Here, when developing the second inspection result, there is no need to call the inspection result query interface, but directly listen to the topic of the above inspection event in the distributed publish-subscribe message system, so that the method has scalability.
[0062] The embodiment of the present invention provides a method for processing inspection tasks, including: obtaining a preset inspection instruction and a device to be inspected corresponding to the inspection instruction; combining and encapsulating the inspection instruction and the device to be inspected corresponding to the inspection instruction to obtain an inspection meta-task; sending the inspection meta-task to the target device to be inspected corresponding to the inspection meta-task through a preset collection service program; executing the inspection instruction in the inspection meta-task through the target device to be inspected to obtain a first inspection result; inputting the first inspection result into a distributed publish-subscribe message system; monitoring the first inspection result in the distributed publish-subscribe message system through a preset inspection service program, and performing multi-thread processing on the first inspection result to obtain a second inspection result corresponding to the first inspection result; and inputting the second inspection result into a preset distributed system. The method pushes the executed second inspection result to the distributed publish-subscribe message system, monitors the messages of the distributed publish-subscribe message system through the inspection service program, and each message is independently processed by each child thread in the thread pool, which ensures that the results do not affect each other, and ensures the accuracy of the data and the concurrency of the inspection results. Furthermore, after the distributed publish-subscribe message system sends a program to call the collection service, the monitoring result of the program calling the collection service can be monitored, thereby improving the convenience of obtaining equipment inspection results.
[0063] Example 3
[0064] Figure 3 The present invention provides a schematic diagram of the structure of a patrol task processing device. Figure 3 As can be seen, the device includes:
[0065] The data acquisition module 31 is used to acquire a preset inspection instruction and the device to be inspected corresponding to the inspection instruction.
[0066] The inspection meta-task determining module 32 is used to combine and package the inspection instructions and the devices to be inspected corresponding to the inspection instructions to obtain the inspection meta-task.
[0067] The inspection task sending module 33 is used to send the above inspection meta-task to the target to-be-inspected equipment corresponding to the above inspection meta-task through a preset collection service program.
[0068] The inspection result determination module 34 is used to execute the inspection instruction in the inspection meta-task through the target device to be inspected to obtain a first inspection result.
[0069] The data acquisition module 31, the inspection meta-task determination module 32, the inspection task delivery module 33 and the inspection result determination module 34 are connected in sequence.
[0070] In one embodiment, the device also includes a distributed publish-subscribe message system input module; the distributed publish-subscribe message system input module is used to input the first inspection result into the distributed publish-subscribe message system; the first inspection result in the distributed publish-subscribe message system is monitored by a preset inspection service program, and the first inspection result is multi-threadedly processed to obtain a second inspection result corresponding to the first inspection result; and the second inspection result is input into the preset distributed system.
[0071] In one embodiment, the inspection result determination module 34 is also used to count the number of tasks of the inspection meta-task; input the number of tasks into a preset data storage system; if the second inspection result is received, count the number of results of the second inspection result; and determine the inspection meta-task to be completed based on the number of tasks and the number of results of the second inspection result.
[0072] In one embodiment, the inspection result determination module 34 is further configured to determine whether the number of the inspection meta-tasks to be completed is zero; if so, determine that all the inspection meta-tasks are executed.
[0073] In one embodiment, the inspection result determination module 34 is also used to monitor the first inspection result in the distributed publish-subscribe message system through a preset inspection service program, and query the inspection meta-task of the data storage system corresponding to the first inspection result; determine the parsing script string according to the inspection meta-task of the data storage system corresponding to the first inspection result; and determine the second inspection result corresponding to the first inspection result according to the parsing script string and the first inspection result.
[0074] In one embodiment, the inspection result determination module 34 is further configured to parse the analysis script string and the first inspection result through a preset analysis program to obtain an analysis result; and determine the second inspection result based on the analysis result.
[0075] In one embodiment, the device also includes a data push module; the data push module is used to generate a task execution end code through a preset distributed backend service based on the second inspection result; and push the task execution end code to the data warehouse of the distributed publish-subscribe message system.
[0076] In one embodiment, the device further includes a data calling module; the data calling module is used to call the second inspection result in the data warehouse if a call request for the second inspection result is received.
[0077] The inspection task processing device provided in the embodiment of the present invention has the same technical features as the inspection task processing method provided in the above embodiment, so it can also solve the same technical problems and achieve the same technical effects. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the device described above can refer to the corresponding process in the above method embodiment, and will not be repeated here.
[0078] Example 4
[0079] This embodiment provides an electronic device, including a processor and a memory, wherein the memory stores computer executable instructions that can be executed by the processor, and the processor executes the computer executable instructions to implement the steps of the inspection task processing method.
[0080] This embodiment provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of the inspection task processing method are implemented.
[0081] See also Figure 4 The schematic diagram of the structure of an electronic device shown in the figure comprises: a memory 41 and a processor 42. The memory 41 stores a computer program that can be run on the processor 42. When the processor executes the computer program, the steps provided by the above inspection task processing method are implemented.
[0082] like Figure 4 As shown, the device further includes: a bus 43 and a communication interface 44, a processor 42, a communication interface 44 and a memory 41 are connected via the bus 43; the processor 42 is used to execute executable modules stored in the memory 41, such as computer programs.
[0083] The memory 41 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk memory. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 44 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used.
[0084] The bus 43 may be an ISA bus, a PCI bus, or an EISA bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0085] Among them, the memory 41 is used to store the program, and the processor 42 executes the program after receiving the execution instruction. The method performed by the inspection task processing device disclosed in any embodiment of the present invention can be applied to the processor 42, or implemented by the processor 42. The processor 42 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit in the processor 42 or the instruction in the form of software. The above processor 42 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The disclosed methods, steps and logic block diagrams in the embodiments of the present invention can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present invention can be directly embodied as being executed by a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 41, and the processor 42 reads the information in the memory 41 and completes the steps of the above method in combination with its hardware.
[0086] Furthermore, an embodiment of the present invention also provides a machine-readable storage medium, which stores machine-executable instructions. When the machine-executable instructions are called and executed by the processor 42, the machine-executable instructions prompt the processor 42 to implement the above-mentioned inspection task processing method.
[0087] The electronic device and computer-readable storage medium provided by the embodiments of the present invention have the same technical features, and therefore can solve the same technical problems and achieve the same technical effects.
[0088] In addition, in the description of the embodiments of the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0089] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.
Claims
1. A patrol inspection task processing method, characterized in that: include: Obtaining a preset inspection instruction and the device to be inspected corresponding to the inspection instruction; Combining and packaging the inspection instruction and the equipment to be inspected corresponding to the inspection instruction to obtain an inspection meta-task; Sending the inspection meta-task to the target device to be inspected corresponding to the inspection meta-task through a preset collection service program; The target device to be inspected executes the inspection instruction in the inspection meta-task to obtain a first inspection result.
2. The inspection task processing method according to claim 1, characterized in that: After the step of executing the inspection instruction in the inspection meta-task by the target device to be inspected to obtain a first inspection result, the method includes: Inputting the first inspection result into a distributed publish-subscribe messaging system; The first inspection result in the distributed publish-subscribe message system is monitored by a preset inspection service program, and the first inspection result is processed by multi-threading to obtain a second inspection result corresponding to the first inspection result; The second inspection result is input into a preset distributed system.
3. The inspection task processing method according to claim 2, characterized in that: After combining and packaging the inspection instruction and the device to be inspected corresponding to the inspection instruction to obtain an inspection meta-task, the method includes: Counting the number of tasks of the inspection meta-task; inputting the task quantity into a preset data storage system; After the step of inputting the second inspection result into a preset distributed system, the method further includes: If the second inspection result is received, counting the number of results of the second inspection result; The inspection meta-tasks to be completed are determined according to the number of tasks and the number of results of the second inspection results.
4. The inspection task processing method according to claim 3, characterized in that: After the step of determining the inspection meta-task to be completed according to the number of tasks and the number corresponding to the second inspection result, the method further includes: Determining whether the number of inspection meta-tasks to be completed is zero; If yes, it is determined that all the inspection meta-tasks are executed.
5. The inspection task processing method according to claim 3, characterized in that: The step of monitoring the first inspection result in the distributed publish-subscribe message system through a preset inspection service program and performing multi-thread processing on the first inspection result to obtain a second inspection result corresponding to the first inspection result includes: Monitoring the first inspection result in the distributed publish-subscribe message system through a preset inspection service program, and querying the inspection meta-task of the data storage system corresponding to the first inspection result; Determine a parsing script string according to an inspection meta-task corresponding to the data storage system according to the first inspection result; A second inspection result corresponding to the first inspection result is determined according to the parsed script character string and the first inspection result.
6. The inspection task processing method according to claim 5, characterized in that: The step of determining a second inspection result corresponding to the first inspection result according to the parsed script character string and the first inspection result includes: Parsing the parsing script character string and the first inspection result through a preset parsing program to obtain a parsing result; The second inspection result is determined according to the analysis result.
7. The inspection task processing method according to claim 2, characterized in that: After the step of inputting the second inspection result into a preset distributed system, the method further includes: According to the second inspection result, a task execution end code is generated through a preset distributed backend service; The task execution end code is pushed to the data warehouse of the distributed publish-subscribe message system.
8. The inspection task processing method according to claim 7, characterized in that: After the step of pushing the task execution end code to the data warehouse of the distributed publish-subscribe message system, the method further includes: If a call request for the second inspection result is received; The second inspection result is called in the data warehouse.
9. A patrol inspection task processing device, characterized in that: include: A data acquisition module, used to acquire a preset inspection instruction and a device to be inspected corresponding to the inspection instruction; An inspection meta-task determination module is used to combine and encapsulate the inspection instruction and the device to be inspected corresponding to the inspection instruction to obtain an inspection meta-task; An inspection task sending module is used to send the inspection meta-task to the target device to be inspected corresponding to the inspection meta-task through a preset collection service program; The inspection result determination module is used to execute the inspection instruction in the inspection meta-task through the target device to be inspected to obtain a first inspection result.
10. An electronic device, characterized in that: The electronic device includes a processor and a memory, the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement the inspection task processing method described in any one of claims 1 to 8.