CN111966573B - Automatic inspection method, device, storage medium and terminal - Google Patents

Automatic inspection method, device, storage medium and terminal Download PDF

Info

Publication number
CN111966573B
CN111966573B CN202010290850.5A CN202010290850A CN111966573B CN 111966573 B CN111966573 B CN 111966573B CN 202010290850 A CN202010290850 A CN 202010290850A CN 111966573 B CN111966573 B CN 111966573B
Authority
CN
China
Prior art keywords
inspection
script
automatic
module
patrol
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010290850.5A
Other languages
Chinese (zh)
Other versions
CN111966573A (en
Inventor
冯龙
邓伟
张志平
胡道生
夏曙东
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Transwiseway Information Technology Co Ltd
Original Assignee
Beijing Transwiseway Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Transwiseway Information Technology Co Ltd filed Critical Beijing Transwiseway Information Technology Co Ltd
Priority to CN202010290850.5A priority Critical patent/CN111966573B/en
Publication of CN111966573A publication Critical patent/CN111966573A/en
Application granted granted Critical
Publication of CN111966573B publication Critical patent/CN111966573B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3692Test management for test results analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Quality & Reliability (AREA)
  • Computer Hardware Design (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Computation (AREA)
  • Evolutionary Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Stored Programmes (AREA)

Abstract

The application discloses an automatic inspection method, an automatic inspection device, a storage medium and a terminal, wherein the method comprises the following steps: acquiring a patrol script matched with the current running environment and a patrol strategy for patrol; running a patrol script according to a patrol strategy to obtain various patrol data; and classifying each item of inspection data according to a preset grade classification model to obtain each item of inspection data at different processing grades. Therefore, by adopting the embodiment of the application, the automatic inspection is realized as the inspection script matched with the current operation environment can be automatically operated according to the inspection strategy; in addition, each item of inspection data is classified into inspection data with different processing levels, so that the inspection data with different processing levels can be conveniently processed according to preset priorities.

Description

Automatic inspection method, device, storage medium and terminal
Technical Field
The present application relates to the field of computer technologies, and in particular, to an automatic inspection method, an automatic inspection device, a storage medium, and a terminal.
Background
The existing inspection method is often manual inspection, so that a large amount of manpower and material resources are consumed.
Besides manual inspection, there are also automatic inspection methods. However, the current automatic inspection method often only supports the running environment of one script, requires a designer to have certain programming capability, and needs to write different running scripts for different environments, thus consuming a great deal of manpower and material resources.
The existing automatic inspection method comprises the following steps: and simulating an HTTP request by using an HTTP proxy mode, and realizing crawling of links and key data of a service system to be monitored by using a technology of an HttpClient and HtmlParser open source component aiming at URL connection and interface analysis. The method has the following defects: only HTTP protocol is supported, and the programming language only supports java version httpfile tools to crawl business system data.
Disclosure of Invention
The embodiment of the application provides an automatic inspection method, an automatic inspection device, a storage medium and a terminal. The following presents a simplified summary in order to provide a basic understanding of some aspects of the disclosed embodiments. This summary is not an extensive overview and is intended to neither identify key/critical elements nor delineate the scope of such embodiments. Its sole purpose is to present some concepts in a simplified form as a prelude to the more detailed description that is presented later.
In a first aspect, an embodiment of the present application provides an automatic inspection method, where the method includes:
acquiring a patrol script matched with the current running environment and a patrol strategy for patrol;
operating the inspection script according to the inspection strategy to obtain various inspection data;
and classifying each item of inspection data according to a preset grade classification model to obtain each item of inspection data at different processing grades.
In a second aspect, an embodiment of the present application provides an automatic inspection apparatus, including:
the acquisition module is used for acquiring a patrol script matched with the current running environment and a patrol strategy for patrol;
the automatic inspection module is used for running the inspection script acquired by the acquisition module according to the inspection strategy acquired by the acquisition module to acquire various inspection data;
the processing grade setting module is used for classifying all inspection data according to a preset grade classification model to obtain all inspection data at different processing grades.
In a third aspect, embodiments of the present application provide a computer storage medium storing a plurality of instructions adapted to be loaded by a processor and to perform the above-described method steps.
In a fourth aspect, an embodiment of the present application provides a terminal, which may include: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the above-mentioned method steps.
The technical scheme provided by the embodiment of the application can have the following beneficial effects:
in the embodiment of the application, a patrol script matched with the current running environment and a patrol strategy for patrol are obtained; running a patrol script according to a patrol strategy to obtain various patrol data; and classifying each item of inspection data according to a preset grade classification model to obtain each item of inspection data at different processing grades. Due to the technical scheme provided by the application, the inspection script matched with the current operation environment can be automatically operated according to the inspection strategy, so that automatic inspection is realized; in addition, each item of inspection data is classified into inspection data with different processing levels, so that the inspection data with different processing levels can be conveniently processed according to preset priorities.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application as claimed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
Fig. 1 is a schematic flow chart of an automatic inspection method according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of an automatic inspection device according to an embodiment of the present application;
FIG. 3 is a schematic diagram of another automatic inspection tool according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a terminal according to an embodiment of the present application.
Detailed Description
The following description and the drawings sufficiently illustrate specific embodiments of the application to enable those skilled in the art to practice them.
It should be understood that the described embodiments are merely some, but not all, embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the application as detailed in the accompanying claims.
In the description of the present application, it should be understood that the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. The specific meaning of the above terms in the present application will be understood in specific cases by those of ordinary skill in the art. Furthermore, in the description of the present application, unless otherwise indicated, "a plurality" means two or more. "and/or", describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate: a exists alone, A and B exist together, and B exists alone. The character "/" generally indicates that the context-dependent object is an "or" relationship.
The existing automatic inspection method only supports the running environment of one script, requires a designer to have certain programming capability, and needs to write different running scripts according to different environments, so that a large amount of manpower and material resources are consumed. Therefore, the application provides an automatic inspection method, an automatic inspection device, a storage medium and a terminal, so as to solve the problems in the related technical problems. In the technical scheme provided by the application, the following is a detailed description of an exemplary embodiment due to the application.
The method provided by the embodiment of the application will be described in detail with reference to fig. 1. The method can be realized by means of a computer program and can be run on an automatic inspection device. The computer program may be integrated in the application or may run as a stand-alone tool class application.
Referring to fig. 1, a schematic flow chart of an automatic inspection method is provided in an embodiment of the present application. As shown in fig. 1, the method according to the embodiment of the present application may include the following steps:
s101, acquiring a patrol script matched with the current running environment and a patrol strategy for patrol.
In this step, a patrol script matching the current operating environment is acquired.
Specifically, in one possible implementation manner, when the code in the current running environment is Java code, the type of the obtained inspection script is Java inspection script, and a first command type matched with the command type of the Java inspection script is configured.
In one possible implementation manner, when the code in the current running environment is a Python code, the type of the acquired inspection script is a Python inspection script, and a second command type matched with the command type of the Python inspection script is configured.
In one possible implementation manner, when the code in the current operating environment is a Shell code, the type of the obtained inspection script is a Shell inspection script, and a third command type matched with the command type of the Shell inspection script is configured.
In one possible implementation, when the code in the current running environment is the Go code, the type of the obtained inspection script is the Go inspection script, and a fourth command type matched with the command type of the Go inspection script is configured.
In one possible implementation, before acquiring the inspection script and the inspection policy for inspection that match the current operating environment, the method further includes the steps of:
identifying the type of the inspection script in the current running environment;
in this step, the type of the identified inspection script in the current running environment may be a Java inspection script, a Python inspection script, a Shell inspection script, or a Go inspection script. The types of the inspection scripts in the common operation environment are listed only, and the types of the inspection scripts can be expanded according to different application scenes, so that the types of the inspection scripts are not repeated.
And determining the command type for running the inspection script according to the type of the inspection script.
Specifically, determining the command type for running the inspection script according to the type of the inspection script specifically comprises the following steps:
when the type of the inspection script is a Java script, determining that the command type for running the inspection script is a first command type matched with the Java script; or,
when the type of the inspection script is a Python script, determining that the command type for running the inspection script is a second command type matched with the Python script; or,
when the type of the patrol script is Shell script, determining that the command type for running the patrol script is a third command type matched with Shell script; or,
and when the type of the inspection script is the Go script, determining that the command type for running the inspection script is a fourth command type matched with the Go script.
In this step, only common command types for running various types of inspection scripts are listed, and the command types for running various types of inspection scripts can be expanded according to different application scenarios, so that the types of the command types for running various types of inspection scripts are not repeated.
S102, running a patrol script according to a patrol strategy to obtain various patrol data.
In this step, running the inspection script according to the inspection policy is an auto-complete process.
In this step, the inspection policy may be set according to different automatic inspection scenes, or may be modified according to the requirements of different automatic inspection scenes. For example, the inspection policy may be set to automatically inspect for which preset area, and the time interval of the automatic inspection is set to 3 minutes for the automatic inspection to complete one automatic inspection within the preset area. The specific time interval for automatic inspection can be adjusted according to the requirements of different application scenes, and will not be described in detail here.
In this step, the running inspection script is matched to the current running environment.
Specifically, when the code in the current running environment is Java code, the type of the obtained inspection script is Java inspection script; when the code in the current running environment is a Python code, the type of the acquired inspection script is the Python inspection script; when the code in the current running environment is Shell code, the type of the obtained inspection script is Shell inspection script; when the code in the current running environment is the Go code, the type of the acquired inspection script is the Go inspection script. The types of the inspection scripts in the common operation environment are listed only, and the types of the inspection scripts can be expanded according to different application scenes, so that the types of the inspection scripts are not repeated.
In one possible implementation, after running the inspection script according to the inspection policy, the method further comprises the steps of:
under the condition that the running inspection script fails according to the inspection strategy, disabling the automatic inspection process of the current first automatic inspection module and starting the automatic inspection process of the second automatic inspection module; therefore, under the condition that the current first automatic inspection module fails, the standby second automatic inspection module is immediately started to automatically inspect, and the automatic inspection efficiency is improved.
In one possible implementation, before starting the automatic inspection process of the second automatic inspection module, the method further comprises the steps of:
acquiring a first inspection script of a first automatic inspection module, and configuring a second inspection script of a second automatic inspection module according to the first inspection script so that the second automatic inspection module runs the second inspection script according to an inspection strategy to obtain various inspection data; thus, under the condition that the first automatic inspection module is in fault, the standby second automatic inspection module is immediately started to perform automatic inspection. Because the second inspection script corresponding to the second automatic inspection module is configured according to the first inspection script of the first automatic inspection module, the second automatic inspection module operates the second inspection script according to the inspection strategy to obtain various inspection data, and consistency of the inspection data obtained by automatic inspection through the second automatic inspection module and the inspection data obtained by the first automatic inspection module under the normal automatic inspection condition is ensured.
And S103, classifying each item of inspection data according to a preset grade classification model to obtain each item of inspection data at different processing grades.
In one possible implementation, after obtaining each item of inspection data at different processing levels, the method further comprises the steps of:
marking the processing grades of all the inspection data in different grades respectively as a first priority processing grade, a second priority processing grade and a third priority processing grade, wherein the first priority processing grade is higher than the second priority processing grade, and the second priority processing grade is higher than the third priority processing grade. And classifying each item of inspection data into inspection data with different processing grades, so that the inspection data with different processing grades can be conveniently processed according to preset priorities.
Specifically, the system processes the inspection data marked as the first priority processing level, then the inspection data marked as the second priority processing level, and finally the inspection data marked as the third priority processing level.
The above-mentioned only listed common grade marking method is classified into three grades, which is equivalent to respectively marking each grade of inspection data into automatic inspection data needing urgent processing, automatic inspection data needing urgent processing and automatic inspection data processed according to normal time limit; therefore, the method is convenient for orderly processing various automatic inspection data, and unnecessary memory overhead is avoided.
In one possible implementation, after obtaining each item of inspection data at different processing levels, the method further comprises the steps of:
generating a corresponding patrol report according to each item of patrol data at different processing levels, and sending the patrol report to terminal equipment of at least one appointed user with a view authority level; in this way, it is convenient to perform a corresponding response operation in accordance with a trigger instruction of at least one designated user having a viewing authority level.
The automatic inspection method of the embodiment of the disclosure is adopted for automatic inspection in the following specific application scenes:
automatic inspection of truck monitoring system-vehicle final position function
And (3) detecting whether the final positioning time of the vehicle and the current time are within 3 minutes at regular time, compiling a shell script for calling a final positioning information interface of the vehicle, acquiring the final positioning time of the inspection vehicle, comparing the final positioning time with the current system time, and if the time difference is greater than 3 minutes, sending an alarm mail with the emergency level to appointed personnel. Uploading the script to an automatic inspection system with an inspection automation tool, and configuring a scheduling strategy: every 5 minutes, report transmission mode: and E, clicking to start operation, and executing a patrol script matched with the current operation environment according to a strategy by an automatic patrol system capable of automatically patrol, and sending an alarm mail to related personnel when the final positioning time of the vehicle is more than 3 minutes from the system time difference.
According to the automatic inspection method provided by the embodiment of the disclosure, the inspection script (for example, shell, python, java and the like) customized by a user is automatically found, corresponding scheduling is executed according to the designated time, inspection personnel do not need to log in the system to check the functional operation condition, the manual inspection cost can be effectively reduced, and meanwhile, the error rate of manual inspection is reduced.
In the embodiment of the application, a patrol script matched with the current running environment and a patrol strategy for patrol are obtained; running a patrol script according to a patrol strategy to obtain various patrol data; and classifying each item of inspection data according to a preset grade classification model to obtain each item of inspection data at different processing grades. Due to the technical scheme provided by the application, the inspection script matched with the current operation environment can be automatically operated according to the inspection strategy, so that automatic inspection is realized; in addition, each item of inspection data is classified into inspection data with different processing levels, so that the inspection data with different processing levels can be conveniently processed according to preset priorities.
The following are examples of the apparatus of the present application that may be used to perform the method embodiments of the present application. For details not disclosed in the embodiments of the apparatus of the present application, please refer to the embodiments of the method of the present application.
Referring to fig. 2, a schematic structural diagram of an automatic inspection device according to an exemplary embodiment of the present application is shown. The automatic inspection device may be implemented as all or part of the terminal by software, hardware or a combination of both. The automatic inspection device comprises an acquisition module 10, an automatic inspection module 20 and a processing grade setting module 30:
specifically, the acquiring module 10 is configured to acquire a patrol script matched with the current operating environment and a patrol policy for patrol;
the automatic inspection module 20 is configured to run the inspection script acquired by the acquisition module 10 according to the inspection policy acquired by the acquisition module 10, so as to obtain various inspection data;
the processing level setting module 30 is configured to classify each item of inspection data according to a preset level classification model, so as to obtain each item of inspection data at different processing levels.
Optionally, the automatic inspection device further includes:
a processing module (not shown in figure 2),
before the acquisition module 10 acquires the inspection script and the inspection policy for inspection, which are matched with the current running environment, the processing module is configured to:
identifying the type of the inspection script in the current running environment;
and determining the command type for running the inspection script according to the type of the inspection script.
Optionally, the processing module is specifically configured to:
when the type of the inspection script is a Java script, determining that the command type for running the inspection script is a first command type matched with the Java script; or,
when the type of the inspection script is a Python script, determining that the command type for running the inspection script is a second command type matched with the Python script; or,
when the type of the patrol script is Shell script, determining that the command type for running the patrol script is a third command type matched with Shell script; or,
and when the type of the inspection script is the Go script, determining that the command type for running the inspection script is a fourth command type matched with the Go script.
Optionally, the processing module is further configured to:
after the processing level setting module 30 obtains each item of inspection data at different processing levels, the processing levels of each item of inspection data at different levels are respectively marked as a first priority processing level, a second priority processing level and a third priority processing level, wherein the first priority processing level is higher than the second priority processing level, and the second priority processing level is higher than the third priority processing level.
Optionally, the processing module is further configured to:
after the automatic inspection module 20 runs the inspection script according to the inspection policy, in the case that the inspection script fails according to the inspection policy, the automatic inspection process of the current first automatic inspection module is disabled, and the automatic inspection process of the second automatic inspection module is started.
Optionally, the processing module is further configured to:
before an automatic inspection process of the second automatic inspection module is started, a first inspection script of the first automatic inspection module is obtained, and the second inspection script of the second automatic inspection module is configured according to the first inspection script, so that the second automatic inspection module can conveniently operate the second inspection script according to the inspection strategy, and various inspection data are obtained.
Optionally, the processing module is further configured to:
after the processing level setting module 30 obtains the pieces of inspection data at different processing levels, a corresponding inspection report is generated according to the pieces of inspection data at different processing levels, and the inspection report is sent to the terminal device of at least one designated user with the viewing authority level.
Fig. 3 is a schematic structural diagram of another automatic inspection tool according to an embodiment of the present application. As shown in fig. 3, the automatic inspection method of the disclosed embodiment of the application is accomplished by a programmable inspection automation tool as shown in fig. 3.
The programmable inspection automation tool shown in fig. 3 mainly comprises a script management module, an automatic inspection module, an intelligent regulation module and a report sending module.
Specifically, the functions of the script management module are as follows:
the module provides a programmable (through java, python, shell, go and other programming languages) inspection script uploading entry page, and a user can check, edit and delete the existing script through the page, and can directly write the script on the page, and the script is automatically uploaded after writing is completed. The user writes the inspection script according to the service requirement and uploads the inspection script to the script management module, the module is provided with the running environment of each programming language and a bottom class library, the module bottom realizes the script screening function through python, and the key words and grammar characteristics of each programming language code are identified: if the java code is identified, invoking a java compiling class command, automatically packaging and operating through the java command; if the user identifies the python script, the user runs the script through the python command, so that the user can automatically adapt to the script running environment and execute the script without intervention of operation and maintenance personnel. The module provides the configuration functions of the inspection scheduling strategy, the report sending mode and the report receiver list for the user, so that the whole inspection process is simpler and more flexible.
The function of the automatic inspection module is as follows:
according to the uploaded script and the configured inspection strategy, the automatic inspection module automatically discovers the added inspection script, automatically operates the inspection script according to the strategy, comprises calling interfaces, filtering logs, summarizing results and the like, counts various inspection result data at a designated time point, generates an inspection result file according to the preset configuration, persists the inspection result to a database, starts an inspection result classification machine learning tool, classifies the result by adopting a naive Bayesian algorithm classifier, combines the stored historical inspection result records to form an inspection result classification experience model, and automatically marks the inspection classification according to the current inspection result (such as general, urgent and serious).
The intelligent regulation and control module has the following functions:
the real-time socket communication is established with all automatic inspection modules through a heartbeat detection mechanism, and if a certain automatic inspection module is detected to have no response or unreachable conditions, the module can start an intelligent regulation and control function: stopping the service of the failed automatic inspection module, and redeploying the service of a new automatic inspection module, wherein the new service copies the inspection configuration and the strategy configuration of the failed module, and adds the inspection configuration and the strategy configuration into the inspection system service cluster according to the preset rules of the original script to ensure the normal operation of the whole inspection system.
The function of the report sending module is as follows:
according to the generated inspection result file, the bottom layer reads the result file through the python script, generates a chart or document (txt, pdf, xlsx, doc) format report file, and automatically sends the inspection report to appointed receivers according to the configured receiver list and the receiving strategy by the module according to the receiving strategy. The module also provides a user-defined report generation programmable python interface, so that a user can independently realize the report files with richer forms.
The process of integrating each automatic inspection module including at least a script management module, an automatic inspection module, an intelligent regulation module and a report transmission module as shown in fig. 3 is as follows:
in order to ensure normal operation and instant communication of each module, each automatic inspection module is integrated to realize bottom communication through python script socket. Py, and a heartbeat maintenance mechanism is established, each module asynchronously broadcasts user operation records to other modules, and each module starts corresponding functions according to the operation records: the automatic inspection module starts timing inspection service according to the operation record sent by the script management module through the socket, after the automatic inspection task is finished, a finished state result is sent to the report sending module through the socket, the report sending module starts report file generation service according to the state, and corresponding functions are finished among the modules through standard socket message communication.
It should be noted that, when the automatic inspection device provided in the above embodiment is executed, only the division of the above functional modules is used for illustration, in practical application, the above functional allocation may be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the functions described above. In addition, the automatic inspection device and the automatic inspection method provided in the foregoing embodiments belong to the same concept, which embody detailed implementation procedures in the method embodiments, and are not described herein again.
In the embodiment of the application, an acquisition module acquires a patrol script matched with the current running environment and a patrol strategy for patrol; the automatic inspection module runs an inspection script according to an inspection strategy to obtain various inspection data; the processing grade setting module classifies all inspection data according to a preset grade classification model to obtain all inspection data at different processing grades. Due to the technical scheme provided by the application, the inspection script matched with the current operation environment can be automatically operated according to the inspection strategy, so that automatic inspection is realized; in addition, each item of inspection data is classified into inspection data with different processing levels, so that the inspection data with different processing levels can be conveniently processed according to preset priorities.
The application also provides a computer readable medium, on which program instructions are stored, which when executed by a processor implement the automatic inspection method provided by the above-mentioned method embodiments.
The application also provides a computer program product containing instructions which, when run on a computer, cause the computer to perform the automatic inspection method described in the above method embodiments.
Referring to fig. 4, a schematic structural diagram of a terminal is provided in an embodiment of the present application. As shown in fig. 4, the terminal 1000 may include: at least one processor 1001, at least one network interface 1004, a user interface 1003, a memory 1005, at least one communication bus 1002.
Wherein the communication bus 1002 is used to enable connected communication between these components.
The user interface 1003 may include a Display screen (Display) and a Camera (Camera), and the optional user interface 1003 may further include a standard wired interface and a wireless interface.
The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface), among others.
Wherein the processor 1001 may include one or more processing cores. Processor 1001 utilizes various interfaces and lines to connect various portions of terminal 1000 in its entirety, by executing or executing instructions, programs, code sets, or instruction sets stored in memory 1005, and invoking data stored in memory 1005, performing various functions of terminal 1000 and processing data. Alternatively, the processor 1001 may be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), programmable logic array (Programmable Logic Array, PLA). The processor 1001 may integrate one or a combination of several of a central processing unit (Central Processing Unit, CPU), an image processor (Graphics Processing Unit, GPU), and a modem, etc. The CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing the content required to be displayed by the display screen; the modem is used to handle wireless communications. It will be appreciated that the modem may not be integrated into the processor 1001 and may be implemented by a single chip.
The Memory 1005 may include a random access Memory (Random Access Memory, RAM) or a Read-Only Memory (Read-Only Memory). Optionally, the memory 1005 includes a non-transitory computer readable medium (non-transitory computer-readable storage medium). The memory 1005 may be used to store instructions, programs, code, sets of codes, or sets of instructions. The memory 1005 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the above-described respective method embodiments, etc.; the storage data area may store data or the like referred to in the above respective method embodiments. The memory 1005 may also optionally be at least one storage device located remotely from the processor 1001. As shown in fig. 4, an operating system, a network communication module, a user interface module, and an auto patrol application may be included in the memory 1005, which is a type of computer storage medium.
In terminal 1000 shown in fig. 4, user interface 1003 is mainly used for providing an input interface for a user, and acquiring data input by the user; and the processor 1001 may be configured to call an auto-patrol application stored in the memory 1005, and specifically perform the following operations:
acquiring a patrol script matched with the current running environment and a patrol strategy for patrol;
running a patrol script according to a patrol strategy to obtain various patrol data;
and classifying each item of inspection data according to a preset grade classification model to obtain each item of inspection data at different processing grades.
In one embodiment, the processor 1001 further performs the following operations before executing the patrol script and patrol policy for patrol matching the current running environment:
identifying the type of the inspection script in the current running environment;
and determining the command type for running the inspection script according to the type of the inspection script.
In one embodiment, the processor 1001, when executing the determining the command type for running the patrol script according to the type of the patrol script, specifically performs the following operations:
when the type of the inspection script is a Java script, determining that the command type for running the inspection script is a first command type matched with the Java script; or,
when the type of the inspection script is a Python script, determining that the command type for running the inspection script is a second command type matched with the Python script; or,
when the type of the patrol script is Shell script, determining that the command type for running the patrol script is a third command type matched with Shell script; or,
and when the type of the inspection script is the Go script, determining that the command type for running the inspection script is a fourth command type matched with the Go script.
In one embodiment, after executing the various inspection data at different processing levels, the processor 1001 further performs the following operations:
marking the processing grades of all the inspection data in different grades respectively as a first priority processing grade, a second priority processing grade and a third priority processing grade, wherein the first priority processing grade is higher than the second priority processing grade, and the second priority processing grade is higher than the third priority processing grade.
In one embodiment, after executing the inspection script according to the inspection policy, the processor 1001 further performs the following operations:
under the condition that the running inspection script fails according to the inspection strategy, the automatic inspection process of the current first automatic inspection module is stopped, and the automatic inspection process of the second automatic inspection module is started.
In one embodiment, the processor 1001, prior to executing the auto-patrol process that initiates the second auto-patrol module, further performs the following:
the method comprises the steps of obtaining a first inspection script of a first automatic inspection module, and configuring a second inspection script of a second automatic inspection module according to the first inspection script so that the second automatic inspection module can operate the second inspection script according to an inspection strategy to obtain inspection data.
In one embodiment, after executing the various inspection data at different processing levels, the processor 1001 further performs the following operations:
and generating a corresponding patrol report according to each item of patrol data at different processing levels, and sending the patrol report to the terminal equipment of at least one appointed user with the view authority level.
In the embodiment of the application, a patrol script matched with the current running environment and a patrol strategy for patrol are obtained; running a patrol script according to a patrol strategy to obtain various patrol data; and classifying each item of inspection data according to a preset grade classification model to obtain each item of inspection data at different processing grades. Due to the technical scheme provided by the application, the inspection script matched with the current operation environment can be automatically operated according to the inspection strategy, so that automatic inspection is realized; in addition, each item of inspection data is classified into inspection data with different processing levels, so that the inspection data with different processing levels can be conveniently processed according to preset priorities.
Those skilled in the art will appreciate that implementing all or part of the above-described methods in the embodiments may be accomplished by computer programs stored in a computer-readable storage medium, which when executed, may include the steps of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a read-only memory, a random access memory, or the like.
The foregoing disclosure is illustrative of the present application and is not to be construed as limiting the scope of the application, which is defined by the appended claims.

Claims (8)

1. An automatic inspection method, comprising:
acquiring a patrol script matched with the current running environment and a patrol strategy for patrol;
operating the inspection script according to the inspection strategy to obtain various inspection data;
classifying each item of inspection data according to a preset level classification model to obtain each item of inspection data at different processing levels, wherein,
when the code in the current running environment is Java code, the type of the obtained inspection script is Java inspection script; when the code in the current running environment is a Python code, the type of the acquired inspection script is the Python inspection script; when the code in the current running environment is Shell code, the type of the obtained inspection script is Shell inspection script; when the codes in the current running environment are Go codes, the type of the acquired inspection script is Go inspection script;
the method further comprises the steps of:
under the condition that the inspection script is operated to fail according to the inspection strategy, the automatic inspection process of the current first automatic inspection module is stopped, and the automatic inspection process of the second automatic inspection module is started; before the automatic inspection process of the second automatic inspection module is started, a first inspection script of the first automatic inspection module is obtained, and the second inspection script of the second automatic inspection module is configured according to the first inspection script, so that the second automatic inspection module can conveniently operate the second inspection script according to the inspection strategy, and various inspection data are obtained.
2. The method of claim 1, wherein prior to the obtaining the inspection script and the inspection policy for inspection that match the current operating environment, the method further comprises:
identifying the type of the inspection script in the current running environment;
and determining the command type for running the inspection script according to the type of the inspection script.
3. The method of claim 2, wherein the determining a command type to run the inspection script based on the type of inspection script comprises:
when the type of the inspection script is a Java script, determining that the command type for running the inspection script is a first command type matched with the Java script; or,
when the type of the inspection script is a Python script, determining that the command type for running the inspection script is a second command type matched with the Python script; or,
when the type of the inspection script is Shell script, determining that the command type for running the inspection script is a third command type matched with the Shell script; or,
and when the type of the inspection script is the Go script, determining that the command type for running the inspection script is a fourth command type matched with the Go script.
4. The method of claim 1, wherein after said obtaining the various inspection data at different processing levels, the method further comprises:
marking the processing grades of all the inspection data in different grades as a first priority processing grade, a second priority processing grade and a third priority processing grade, wherein the first priority processing grade is higher than the second priority processing grade, and the second priority processing grade is higher than the third priority processing grade.
5. The method of claim 1, wherein after said obtaining the various inspection data at different processing levels, the method further comprises:
and generating a corresponding patrol report according to each item of patrol data at different processing levels, and sending the patrol report to terminal equipment of at least one appointed user with a viewing authority level.
6. An automatic inspection device, the device comprising:
the acquisition module is used for acquiring a patrol script matched with the current running environment and a patrol strategy for patrol;
the automatic inspection module is used for running the inspection script acquired by the acquisition module according to the inspection strategy acquired by the acquisition module to acquire various inspection data;
a processing grade setting module for classifying each item of inspection data according to a preset grade classification model to obtain each item of inspection data in different processing grades,
when the code in the current running environment is Java code, the type of the obtained inspection script is Java inspection script; when the code in the current running environment is a Python code, the type of the acquired inspection script is the Python inspection script; when the code in the current running environment is Shell code, the type of the obtained inspection script is Shell inspection script; when the codes in the current running environment are Go codes, the type of the acquired inspection script is Go inspection script;
the device is used for disabling the automatic inspection process of the current first automatic inspection module and starting the automatic inspection process of the second automatic inspection module under the condition that the inspection script is operated to fail according to the inspection strategy; before the automatic inspection process of the second automatic inspection module is started, a first inspection script of the first automatic inspection module is obtained, and the second inspection script of the second automatic inspection module is configured according to the first inspection script, so that the second automatic inspection module can conveniently operate the second inspection script according to the inspection strategy, and various inspection data are obtained.
7. A computer storage medium storing a plurality of instructions adapted to be loaded by a processor and to perform the method steps of any one of claims 1 to 5.
8. A terminal, comprising: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the method steps of any of claims 1 to 5.
CN202010290850.5A 2020-04-14 2020-04-14 Automatic inspection method, device, storage medium and terminal Active CN111966573B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010290850.5A CN111966573B (en) 2020-04-14 2020-04-14 Automatic inspection method, device, storage medium and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010290850.5A CN111966573B (en) 2020-04-14 2020-04-14 Automatic inspection method, device, storage medium and terminal

Publications (2)

Publication Number Publication Date
CN111966573A CN111966573A (en) 2020-11-20
CN111966573B true CN111966573B (en) 2023-11-24

Family

ID=73357888

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010290850.5A Active CN111966573B (en) 2020-04-14 2020-04-14 Automatic inspection method, device, storage medium and terminal

Country Status (1)

Country Link
CN (1) CN111966573B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101799791A (en) * 2010-02-08 2010-08-11 成都市华为赛门铁克科技有限公司 Equipment routing inspection method and device
CN102571396A (en) * 2010-12-28 2012-07-11 中兴通讯股份有限公司 Communication network system and routing inspection subsystem and routing inspection method of communication equipment
CN105118107A (en) * 2015-09-01 2015-12-02 国家电网公司 Application inspection method and device
DE102015001557B3 (en) * 2015-02-10 2016-02-04 Komet Group Gmbh Method for monitoring a machine tool
CN107231267A (en) * 2016-03-25 2017-10-03 中兴通讯股份有限公司 A kind of method of communication network inspection, device and inspection client
CN108055165A (en) * 2017-12-12 2018-05-18 浙江齐治科技股份有限公司 The method and equipment patrolling device of equipment routing inspection
CN108959037A (en) * 2018-07-13 2018-12-07 山东汇贸电子口岸有限公司 A kind of data center's automatic detecting method and device
CN109684160A (en) * 2018-09-07 2019-04-26 平安科技(深圳)有限公司 Database method for inspecting, device, equipment and computer readable storage medium
CN109992478A (en) * 2019-03-29 2019-07-09 广东电网有限责任公司 A kind of server method for inspecting and device
CN110908875A (en) * 2019-11-27 2020-03-24 中国银行股份有限公司 Inspection method and device based on operation terminal

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101799791A (en) * 2010-02-08 2010-08-11 成都市华为赛门铁克科技有限公司 Equipment routing inspection method and device
CN102571396A (en) * 2010-12-28 2012-07-11 中兴通讯股份有限公司 Communication network system and routing inspection subsystem and routing inspection method of communication equipment
DE102015001557B3 (en) * 2015-02-10 2016-02-04 Komet Group Gmbh Method for monitoring a machine tool
CN105118107A (en) * 2015-09-01 2015-12-02 国家电网公司 Application inspection method and device
CN107231267A (en) * 2016-03-25 2017-10-03 中兴通讯股份有限公司 A kind of method of communication network inspection, device and inspection client
CN108055165A (en) * 2017-12-12 2018-05-18 浙江齐治科技股份有限公司 The method and equipment patrolling device of equipment routing inspection
CN108959037A (en) * 2018-07-13 2018-12-07 山东汇贸电子口岸有限公司 A kind of data center's automatic detecting method and device
CN109684160A (en) * 2018-09-07 2019-04-26 平安科技(深圳)有限公司 Database method for inspecting, device, equipment and computer readable storage medium
CN109992478A (en) * 2019-03-29 2019-07-09 广东电网有限责任公司 A kind of server method for inspecting and device
CN110908875A (en) * 2019-11-27 2020-03-24 中国银行股份有限公司 Inspection method and device based on operation terminal

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
IT运维自动化巡检技术研究;韩春晖,杨扬;《新技术新工艺》(第10期);全文 *
轻量级自动化巡检系统开发和实践;曹小明;《生态互联 数字电力——2019电力行业信息化年会论文集》;全文 *

Also Published As

Publication number Publication date
CN111966573A (en) 2020-11-20

Similar Documents

Publication Publication Date Title
US8108456B2 (en) Method and apparatus for migrating the system environment on which the applications depend
CN111949520A (en) Automatic interface test method and equipment
CN111104387A (en) Method and device for acquiring data set on server
WO2023231704A1 (en) Algorithm running method, apparatus and device, and storage medium
CN111737152B (en) Method and device for realizing WEB automatic test by inputting data through webpage
CN112181746A (en) Fault repairing method, device and equipment for vehicle-mounted operating system
CN112313627A (en) Mapping mechanism of events to serverless function workflow instances
CN111966573B (en) Automatic inspection method, device, storage medium and terminal
WO2023151397A1 (en) Application program deployment method and apparatus, device, and medium
CN111859139A (en) Application program recommendation method and device, computing equipment and medium
CN116719697A (en) System monitoring method, device, terminal equipment and storage medium
US20230297970A1 (en) Intelligent scheduling of maintenance tasks to minimize downtime
CN113435489B (en) Method, device, computer readable storage medium and processor for deploying system
CN112882892B (en) Data processing method and device, electronic equipment and storage medium
CN110727565A (en) Network equipment platform information collection method and system
CN114020565A (en) Intelligent log collection processing method and device, electronic equipment and storage medium
CN111158654A (en) Algorithm calling method, device, server and storage medium
CN111694752A (en) Application testing method, electronic device and storage medium
CN111966605A (en) Automatic resource retrieval method, system and storage medium for Redfish
CN111356011B (en) Television program production monitoring probe and computer program product
CN113419775B (en) Firmware configuration method, system, equipment and medium
US11416187B2 (en) Information processing system, information processing apparatus, and non-transitory computer readable medium
CN116723093A (en) Virtual network card detection method, device, equipment and storage medium
CN114553866A (en) Full data access method, device and computer readable storage medium
CN118227434A (en) Method, device, computer equipment and storage medium for analyzing application performance

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant