CN117540718A - Intelligent inspection result statistical method based on document object model - Google Patents

Intelligent inspection result statistical method based on document object model Download PDF

Info

Publication number
CN117540718A
CN117540718A CN202311696314.5A CN202311696314A CN117540718A CN 117540718 A CN117540718 A CN 117540718A CN 202311696314 A CN202311696314 A CN 202311696314A CN 117540718 A CN117540718 A CN 117540718A
Authority
CN
China
Prior art keywords
information system
inspection result
object model
document object
preset
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.)
Pending
Application number
CN202311696314.5A
Other languages
Chinese (zh)
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.)
Big Data Center Of State Grid Corp Of China
Original Assignee
Big Data Center Of State Grid Corp Of China
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 Big Data Center Of State Grid Corp Of China filed Critical Big Data Center Of State Grid Corp Of China
Priority to CN202311696314.5A priority Critical patent/CN117540718A/en
Publication of CN117540718A publication Critical patent/CN117540718A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/186Templates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/20Administration of product repair or maintenance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/06Energy or water supply

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Human Resources & Organizations (AREA)
  • Economics (AREA)
  • Physics & Mathematics (AREA)
  • Tourism & Hospitality (AREA)
  • Marketing (AREA)
  • General Health & Medical Sciences (AREA)
  • General Business, Economics & Management (AREA)
  • Strategic Management (AREA)
  • Public Health (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Water Supply & Treatment (AREA)
  • Primary Health Care (AREA)
  • General Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Computational Linguistics (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses an intelligent statistical method for inspection results based on a document object model. The intelligent statistical method for the inspection result based on the document object model comprises the following steps: acquiring an initial inspection result of a power grid information system, and determining the initial inspection result corresponding to a sub-information system in the power grid information system; analyzing each initial inspection result based on a document object model to generate a document object model tree, and determining abnormal data in each initial inspection result in the document object model tree according to a preset abnormal data extraction rule; and counting the abnormal data according to the preset patrol report template to generate a target patrol report corresponding to the sub-information system. According to the embodiment of the invention, the automatic generation of the target patrol report is realized, the problems of low labor cost and low accuracy of manual statistics of abnormal information are avoided, the working efficiency of the statistics of the abnormal information is improved, the accuracy of the statistics of the target patrol report is improved, and the use experience of a user is improved.

Description

Intelligent inspection result statistical method based on document object model
Technical Field
The invention relates to the technical field of data processing, in particular to an intelligent statistical method for inspection results based on a document object model.
Background
Multiple sub-information systems, such as a docking enterprise or a docking individual user, may be included in the grid information system, each of which requires maintenance and inspection to prevent system failure. In order to ensure reliable operation of the power grid information systems, maintenance personnel need to carry out inspection work on each power grid information system regularly or irregularly. After each sub-information system of the system is inspected, an inspection report needs to be formed so that maintenance personnel can evaluate the condition of the system.
At present, inspection generally comprises two modes, manual inspection or automatic inspection through inspection tools, but no matter which inspection mode is adopted, inspection reports are required to be formed by manual summarizing of index data obtained by inspection, so that a great amount of time and manpower resources are consumed, inspection efficiency is low, and manual summarizing data are easily influenced by human factors, such as fatigue, negligence and the like, so that important index data are omitted, and therefore, how to automatically and accurately generate the inspection reports of requirements becomes a problem to be solved urgently.
Disclosure of Invention
The invention provides an intelligent statistical method for a patrol result based on a document object model, which is used for automatically generating a patrol report required by a user, improving the efficiency of generating the patrol report and improving the use experience of the user.
According to one aspect of the invention, an intelligent statistical method for inspection results based on a document object model is provided, wherein the method comprises the following steps:
acquiring an initial inspection result of a power grid information system, and determining the initial inspection result corresponding to a sub-information system in the power grid information system;
analyzing the initial inspection result based on a document object model to generate a document object model tree, and determining abnormal data in the initial inspection result in the document object model tree according to a preset abnormal data extraction rule;
and counting the abnormal data according to the preset patrol report template to generate a target patrol report corresponding to the sub-information system.
In an embodiment, the obtaining the initial inspection result of the power grid information system, and determining the initial inspection result corresponding to the sub-information system in the power grid information system, includes:
the method comprises the steps that each sub-information system in the power grid information system is inspected through an automatic inspection tool, and initial inspection results of each sub-information system are obtained, wherein the initial inspection results at least comprise an Internet protocol address and index data of the sub-information system;
and searching a target sub-information system associated with the Internet protocol address included in the initial inspection result according to a preset mapping relation table, and associating the initial inspection result to the target sub-information system.
In an embodiment, the analyzing each initial inspection result based on the document object model to generate a document object model tree, determining the abnormal data in each initial inspection result in the document object model tree according to a preset abnormal data extraction rule, includes:
analyzing report information in the initial inspection result according to a document object model to generate a document object model tree;
extracting a preset cascading style sheet selector, and extracting node objects corresponding to index data from the document object model tree according to the preset cascading style sheet selector;
extracting a preset index threshold value corresponding to each index data;
and determining abnormal data in the initial inspection result according to the index data corresponding to the node objects and the preset index threshold corresponding to the index data.
In an embodiment, the determining the abnormal data in the initial inspection result according to the index data corresponding to the node objects and the preset index threshold corresponding to the index data includes:
determining the size relation between index data corresponding to each node object and a preset index threshold corresponding to the index data;
and when the size relation comprises that the index data corresponding to the node object is larger than a preset index threshold corresponding to the index data, the index data is used as abnormal data in an initial inspection result.
In an embodiment, the generating, by using the abnormal data according to the preset patrol report template, a target patrol report corresponding to each sub-information system includes:
determining abnormal data belonging to the same sub-information system;
and filling the abnormal data into the preset patrol report template according to the sub-information system to generate a target patrol report.
In an embodiment, the index data includes at least one of: system classification, central processing unit usage, memory usage, and page access duration.
In one embodiment, the preset patrol report template is custom configured in response to user demand.
According to another aspect of the present invention, there is provided an intelligent statistical device for inspection results based on a document object model, wherein the device includes:
the result acquisition module is used for acquiring an initial inspection result of the power grid information system and determining the initial inspection result corresponding to the sub-information system in the power grid information system;
the result analysis module is used for analyzing the initial inspection result based on a document object model to generate a document object model tree, and determining abnormal data in the initial inspection result in the document object model tree according to a preset abnormal data extraction rule;
and the report generation module is used for statistically generating the target patrol report corresponding to the sub-information system according to the abnormal data and the preset patrol report template.
According to another aspect of the present invention, there is provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor, so that the at least one processor can execute the intelligent statistical method for the inspection result based on the document object model according to any embodiment of the invention.
According to another aspect of the present invention, there is provided a computer readable storage medium storing computer instructions for causing a processor to implement the intelligent statistical method for a patrol result based on a document object model according to any one of the embodiments of the present invention when executed.
According to the technical scheme, the initial inspection result corresponding to the sub-information system in the power grid information system is determined by acquiring the initial inspection result of the power grid information system, the document object model tree is generated based on the analysis of the initial inspection result of the document object model, the abnormal data in the initial inspection result is determined in the document object model tree according to the preset abnormal data extraction rule, the target inspection report corresponding to the sub-information system is generated by statistics of the abnormal data according to the preset inspection report template, automatic generation of the target inspection report is achieved, the problems of low labor cost and low accuracy of manual statistics of the abnormal information are avoided, the working efficiency of statistics of the abnormal information is improved, the accuracy of statistics of the target inspection report is improved, and the user experience is improved.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to delineate the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of an intelligent statistical method for inspection results based on a document object model according to an embodiment of the present invention;
FIG. 2 is a flowchart of an intelligent statistical method for inspection results based on a document object model according to a second embodiment of the present invention;
FIG. 3 is a flowchart of an intelligent statistical method for inspection results based on a document object model according to a third embodiment of the present invention;
FIG. 4 is an exemplary diagram of a document object model tree provided in accordance with a third embodiment of the present invention;
FIG. 5 is a schematic structural diagram of an intelligent inspection result statistics device based on a document object model according to a fourth embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device for implementing an intelligent statistical method for inspection results based on a document object model according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
Fig. 1 is a flowchart of a method for intelligent statistics of inspection results based on a document object model, which is applicable to the case of generating a target inspection report for intelligent statistics of inspection results according to an embodiment of the present invention, where the method may be performed by an intelligent statistics device of inspection results based on a document object model, and the intelligent statistics device of inspection results based on a document object model may be implemented in hardware and/or software, and the intelligent statistics device of inspection results based on a document object model may be configured in an electronic device. As shown in fig. 1, the method includes:
s110, acquiring an initial inspection result of the power grid information system, and determining an initial inspection result corresponding to the sub-information system in the power grid information system.
The initial inspection result can be understood as a result generated by inspecting each sub-information system in the power grid system, the number of the initial inspection results can include a plurality of initial inspection results, and corresponding initial inspection results exist for each sub-information system. In the actual operation process, the initial inspection result may include index data of the sub-information system, such as system classification, central processing unit usage, memory usage, and page access duration. Each initial inspection result may include a corresponding internet protocol (Internet Protocol, IP) address, and the corresponding sub-information system may be determined according to the IP address. In one embodiment, the data format of the initial inspection results may be hypertext markup language (Hyper Text Markup Language, HTML) or extensible markup language (Extensible Markup Language, XML).
In the embodiment of the invention, each sub-information system in the power grid information system can be inspected through an inspection tool, and an initial inspection result of each sub-information system is obtained. Meanwhile, extracting an IP address contained in the initial inspection result, and searching a sub-information system corresponding to the initial inspection result according to the IP address. In the actual operation process, the corresponding relation between the sub-information systems and the IP addresses can be stored in advance, the sub-information systems corresponding to the IP addresses are searched, and the initial inspection result is related to the target sub-information system.
S120, analyzing the initial inspection result based on the document object model to generate a document object model tree, and determining abnormal data in the initial inspection result in the document object model tree according to a preset abnormal data extraction rule.
The document object model (Document Object Model, DOM) is a standard programming interface for processing extensible markup language, and is a programming interface for representing and manipulating document structures such as HTML, XML, and the like. The document object model tree can be understood as a tree structure generated by analyzing the initial inspection result by the document object model. Each node in the document object model tree represents an element, attribute, text, etc. in the initial inspection result.
The preset abnormal data extraction rule refers to a preset rule for extracting abnormal data in the initial inspection result. In the actual operation process, the preset abnormal data extraction rule may be preset according to a user requirement, and exemplary, the preset abnormal data extraction rule may be to take index data, in which each index data in the initial inspection result is greater than a corresponding preset index threshold, as abnormal data; alternatively, index data with an abnormality flag may be extracted as the abnormality data. The abnormal data refers to data with abnormal index data in the initial inspection result, for example, may refer to data with loopholes in the sub-information system.
In the embodiment of the invention, a document object model tree can be generated by analyzing report information in an initial inspection result according to a document object model, and meanwhile, node objects corresponding to index data are extracted from the document object model tree through a cascading style sheet (Cascading Style Sheets, CSS) selector. Determining index thresholds preset by the index data, comparing the index data with the corresponding index thresholds, and taking the index data which is larger than the corresponding index thresholds in the index data as abnormal data in the initial inspection result.
S130, counting the abnormal data according to a preset patrol report template to generate a target patrol report corresponding to the sub-information system.
The preset patrol report templates are templates for generating target patrol reports, the number of the preset patrol report templates can be multiple, and different preset patrol report templates can exist for different target patrol report formats. In the preset patrol report template, the format of the abnormal data can be pre-stored so as to store the abnormal data in the target patrol report according to a uniform format.
In one embodiment, a preset patrol report template is custom configured in response to user demand.
In the embodiment of the invention, the abnormal data can be filled into a preset report template based on the attribution sub-information system to generate a target inspection report. And in the actual operation process, after the abnormal data is determined, filling the abnormal data to the corresponding position of a preset patrol report template according to the affiliated sub-information system, and generating a target patrol report.
In the embodiment of the invention, the initial inspection result corresponding to the sub-information system in the power grid information system is determined by acquiring the initial inspection result of the power grid information system, the document object model tree is generated based on the analysis of the initial inspection result of the document object model, the abnormal data in the initial inspection result is determined in the document object model tree according to the preset abnormal data extraction rule, the abnormal data is statistically generated into the target inspection report corresponding to the sub-information system according to the preset inspection report template, the automatic generation of the target inspection report is realized, the problems of low labor cost and low accuracy of manual statistics of the abnormal information are avoided, the working efficiency of the statistics of the abnormal information is improved, the accuracy of the statistics of the target inspection report is improved, and the use experience of a user is improved.
Example two
Fig. 2 is a flowchart of an intelligent statistical method for inspection results based on a document object model according to a second embodiment of the present invention, where the second embodiment is further optimized and expanded based on the foregoing embodiment, and may be combined with each optional technical solution in the foregoing embodiment. As shown in fig. 2, the method includes:
s210, carrying out inspection on each sub-information system in the power grid information system through an automatic inspection tool to obtain an initial inspection result of each sub-information system, wherein the initial inspection result at least comprises an Internet protocol address and index data of the sub-information system.
The automatic inspection tool is used for inspecting all sub-information systems in the power grid information system, and can detect index data of all the sub-systems.
In one embodiment, the index data includes at least one of: system classification, central processing unit usage, memory usage, and page access duration.
In the embodiment of the invention, each sub-information system in the power grid information system can be inspected by an automatic inspection tool, an initial inspection result of each sub-information system is generated, and the initial inspection result can comprise an internet protocol address and index data of the sub-information system.
S220, searching an internet protocol address associated target sub-information system included in the initial inspection result according to a preset mapping relation table, and associating the initial inspection result to the target sub-information system.
The preset mapping relation table is used for storing the mapping relation table of the internet protocol address and the sub-information system. In the preset mapping relation table, the corresponding relation between the internet protocol address and the sub-information system can be used for extracting the corresponding target sub-information system according to the internet protocol address.
In the embodiment of the invention, a target sub-information system associated with the internet protocol address can be searched in a preset mapping relation table according to the internet protocol address included in the initial inspection result, and the initial inspection result is associated with the target sub-information system to determine the association relation between the initial inspection result and the target sub-information system.
S230, analyzing report information in the initial inspection result according to the document object model to generate a document object model tree.
In the embodiment of the invention, the report information in the initial inspection result can be analyzed through the object model, the initial inspection result is analyzed into a tree structure composed of nodes nested layer by layer, and each node represents an element, an attribute, a text and the like of the report information in the initial inspection result.
S240, extracting a preset cascading style sheet selector, and extracting node objects corresponding to the index data from the document object model tree according to the preset cascading style sheet selector.
The preset cascading style sheet selector is a preset selector for acquiring node objects corresponding to index data in a document object model tree. For the document object model tree, a multi-get Element and query Selector method can be included, and node objects corresponding to index data can be extracted through a preset cascading style sheet Selector.
S250, extracting a preset index threshold corresponding to each index data.
The preset index threshold is a preset critical value of each index data, the preset index threshold can be set according to user requirements or experience, and when the index data exceeds the corresponding preset index threshold, the index data can be considered to be abnormal.
S260, determining abnormal data in the initial inspection result according to index data corresponding to each node object and a preset index threshold corresponding to each index data.
In the embodiment of the invention, after the index data corresponding to each node object is determined, the abnormal data in the initial inspection result can be determined by comparing the index data with the preset index threshold corresponding to each index data.
In one embodiment, S260 includes:
determining the size relation between index data corresponding to each node object and a preset index threshold corresponding to the index data;
and when the size relation comprises that the index data corresponding to the node object is larger than a preset index threshold corresponding to the index data, the index data are abnormal data in the initial inspection result.
In the embodiment of the invention, the index data corresponding to each node object can be compared with the preset index threshold corresponding to the index data, the size relation between the index data corresponding to each node object and the preset index threshold corresponding to the index data is determined, and when the index data corresponding to the node object is greater than the preset index threshold corresponding to the index data, the index data can be considered as abnormal data in the initial inspection result.
S270, determining abnormal data belonging to the same sub-information system.
In the embodiment of the invention, the abnormal data extracted from the same initial inspection result can be determined to be the abnormal data belonging to the same sub-information system.
S280, filling the various data into a preset patrol report template according to the sub-information system to generate a target patrol report.
In the embodiment of the invention, the abnormal data can be filled into the corresponding position of the preset patrol report template according to the sub-information system to generate the target patrol report.
According to the embodiment of the invention, each sub-information system in the power grid information system is inspected through the automatic inspection tool, the initial inspection result of each sub-information system is obtained, the target sub-information system associated with the Internet protocol address included in the initial inspection result is searched according to the preset mapping relation table, the initial inspection result is associated with the target sub-information system, and the association of the sub-information system and the initial inspection result is realized. The method comprises the steps of generating a document object model tree by analyzing report information in an initial inspection result according to a document object model, extracting a preset cascading style sheet selector, extracting node objects corresponding to index data in the document object model tree according to the preset cascading style sheet selector, extracting preset index thresholds corresponding to the index data, determining abnormal data in the initial inspection result according to the index data corresponding to the node objects and the preset index thresholds corresponding to the index data, determining abnormal data belonging to the same sub-information system, filling the abnormal data into a preset inspection report template according to the sub-information system to generate a target inspection report, realizing automatic generation of the preset inspection report template according to user requirements, improving working efficiency of the statistical target inspection report, and facilitating monitoring of the sub-information system by service personnel.
Example III
Fig. 3 is a flowchart of an intelligent statistical method for inspection results based on a document object model according to a third embodiment of the present invention, where, based on the above embodiment, an initial inspection result format is taken as HTML as an example, and as shown in fig. 3, the method includes:
the preset patrol report template can be pre-configured, the initial patrol result compression packet uploaded by the user is obtained, and all initial patrol results are obtained after decompression by the decompression tool. And (3) using a Document Object Model (DOM) to count the initial inspection result and abnormal data, and extracting a preset mapping relation table in the necessary auxiliary form through AUTOPOI. When extracting the initial inspection result data, the HTML document in the initial inspection result may be represented as a node object corresponding to the HMTL element using the DOM. The patrol report builds its corresponding DOM node tree while loading the HTML document. Typically, each attribute of an HTML element has a corresponding attribute in its corresponding DOM node object. Any element in the page can be accessed by acquiring the method and the attribute of the DOM node object, and the operations of modifying, deleting, adding and the like of the element can be performed.
In an embodiment, fig. 4 is an exemplary diagram of a document object model tree provided according to the third embodiment of the present invention, from an initial inspection result, an HTML file may be represented as a DOM node tree, and a plurality of get Element and query Selector methods are provided through a document root node object of the DOM node tree, and DOM node objects corresponding to HTML elements are obtained according to an HTML Element attribute and a CSS Selector of an inspection report, respectively. In the actual operation process, the same type of abnormal data can be combined and stored.
After the extraction of the abnormal data in the initial inspection result is completed, the extracted abnormal data can be used for generating a target inspection report according to a preset inspection report template. In the process of generating the data report, the abnormal data extracted from the DOM and the sub-information system extracted from the AUTOPOI can be related and combined to form an object. And generating a file stream by using an AUTOPOI technology, and generating an Excel report document by analyzing the file stream.
According to the embodiment of the invention, the target inspection report of the system is automatically generated according to the user requirements, and whether the equipment is abnormal or not can be judged through data analysis and equipment state detection, so that the automatic and intelligent inspection of the power grid system is realized. Meanwhile, the inspection efficiency and the security are improved, the labor cost, the time cost, the maintenance cost and the like are reduced, and the cost optimization is realized.
Example IV
Fig. 5 is a schematic structural diagram of an intelligent statistics device for inspection results based on a document object model according to a fourth embodiment of the present invention. As shown in fig. 5, the apparatus includes: a result acquisition module 51, a result analysis module 52 and a report generation module 53.
The result obtaining module 51 is configured to obtain an initial inspection result of the power grid information system, and determine an initial inspection result corresponding to the sub-information system in the power grid information system;
the result analysis module 52 is configured to analyze the initial inspection result based on the document object model to generate a document object model tree, and determine abnormal data in the initial inspection result in the document object model tree according to a preset abnormal data extraction rule;
and the report generation module 53 is used for statistically generating the target inspection report corresponding to the sub-information system according to the abnormal data and the preset inspection report template.
According to the embodiment of the invention, the initial inspection result of the power grid information system is obtained through the result obtaining module, the initial inspection result corresponding to the sub-information system in the power grid information system is determined, the result analyzing module analyzes the initial inspection result based on the document object model to generate the document object model tree, the abnormal data in the initial inspection result is determined in the document object model tree according to the preset abnormal data extraction rule, the report generating module carries out statistics on the abnormal data according to the preset inspection report template to generate the target inspection report corresponding to the sub-information system, automatic generation of the target inspection report is realized, the problems of low labor cost and low accuracy of manual statistics of the abnormal information are avoided, the accuracy of the statistics target inspection report is improved while the working efficiency of the statistics of the abnormal information is improved, and the use experience of a user is improved.
In one embodiment, the result acquisition module 51 includes:
the result extraction unit is used for carrying out inspection on each sub-information system in the power grid information system through the automatic inspection tool to obtain an initial inspection result of each sub-information system, wherein the initial inspection result at least comprises an Internet protocol address and index data of the sub-information system;
and the system corresponding unit is used for searching the target sub-information system associated with the internet protocol address included in the initial inspection result according to the preset mapping relation table, and associating the initial inspection result to the target sub-information system.
In one embodiment, the result parsing module 52 includes:
the model tree generating unit is used for generating a document object model tree according to the report information in the initial inspection result of the document object model analysis;
the object extraction unit is used for extracting a preset cascading style sheet selector, and extracting node objects corresponding to index data from the document object model tree according to the preset cascading style sheet selector;
the threshold value extraction unit is used for extracting a preset index threshold value corresponding to each index data;
the data determining unit is used for determining abnormal data in the initial inspection result according to the index data corresponding to each node object and the preset index threshold value corresponding to each index data.
In an embodiment, the data determining unit is specifically configured to:
determining the size relation between index data corresponding to each node object and a preset index threshold corresponding to the index data;
and when the size relation comprises that the index data corresponding to the node object is larger than a preset index threshold corresponding to the index data, the index data are abnormal data in the initial inspection result.
In one embodiment, the report generation module 53 includes:
the attribution determining unit is used for determining abnormal data attributing to the same sub-information system;
and the report generating unit is used for filling the various different data into a preset patrol report template according to the sub-information system to generate a target patrol report.
In one embodiment, the index data includes at least one of: system classification, central processing unit usage, memory usage, and page access duration.
In one embodiment, a preset patrol report template is custom configured in response to user demand.
The intelligent statistical device for the inspection result based on the document object model provided by the embodiment of the invention can execute the intelligent statistical method for the inspection result based on the document object model provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Example five
Fig. 6 is a schematic structural diagram of an electronic device for implementing an intelligent statistical method for inspection results based on a document object model according to an embodiment of the present invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 6, the electronic device 10 includes at least one processor 11, and a memory, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, in which the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various appropriate actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 may also be stored. The processor 11, the ROM 12 and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
Various components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, etc.; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as the intelligent statistical method of inspection results based on the document object model.
In some embodiments, the intelligent statistical method of inspection results based on the document object model may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more of the steps of the above-described document object model-based inspection result intelligent statistical method may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the document object model-based inspection result intelligent statistical method in any other suitable manner (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (10)

1. The intelligent statistical method for the inspection result based on the document object model is characterized by comprising the following steps of:
acquiring an initial inspection result of a power grid information system, and determining the initial inspection result corresponding to a sub-information system in the power grid information system;
analyzing the initial inspection result based on a document object model to generate a document object model tree, and determining abnormal data in the initial inspection result in the document object model tree according to a preset abnormal data extraction rule;
and counting the abnormal data according to the preset patrol report template to generate a target patrol report corresponding to the sub-information system.
2. The method according to claim 1, wherein the obtaining an initial inspection result of the grid information system, and determining the initial inspection result corresponding to the sub-information system in the grid information system, comprises:
the method comprises the steps that each sub-information system in the power grid information system is inspected through an automatic inspection tool, and initial inspection results of each sub-information system are obtained, wherein the initial inspection results at least comprise an Internet protocol address and index data of the sub-information system;
and searching a target sub-information system associated with the Internet protocol address included in the initial inspection result according to a preset mapping relation table, and associating the initial inspection result to the target sub-information system.
3. The method of claim 1, wherein the parsing the initial inspection result based on the document object model to generate a document object model tree, determining the anomaly data in the initial inspection result in the document object model tree according to a preset anomaly data extraction rule, comprises:
analyzing report information in the initial inspection result according to a document object model to generate a document object model tree;
extracting a preset cascading style sheet selector, and extracting node objects corresponding to index data from the document object model tree according to the preset cascading style sheet selector;
extracting a preset index threshold value corresponding to each index data;
and determining abnormal data in the initial inspection result according to the index data corresponding to the node objects and the preset index threshold corresponding to the index data.
4. The method of claim 3, wherein determining the anomaly data in the initial inspection result according to the index data corresponding to each of the node objects and the preset index threshold corresponding to each of the index data comprises:
determining the size relation between index data corresponding to each node object and a preset index threshold corresponding to the index data;
and when the size relation comprises that the index data corresponding to the node object is larger than a preset index threshold corresponding to the index data, the index data is used as abnormal data in an initial inspection result.
5. The method of claim 1, wherein generating the target inspection report corresponding to the sub-information system according to the abnormal data statistics of the preset inspection report template comprises:
determining abnormal data belonging to the same sub-information system;
and filling the abnormal data into the preset patrol report template according to the sub-information system to generate a target patrol report.
6. The method of claim 2, wherein the index data comprises at least one of: system classification, central processing unit usage, memory usage, and page access duration.
7. The method of claim 1, wherein the preset patrol report template is custom configured in response to user demand.
8. The utility model provides a patrol and examine result intelligent statistical device based on document object model which characterized in that includes:
the result acquisition module is used for acquiring an initial inspection result of the power grid information system and determining the initial inspection result corresponding to the sub-information system in the power grid information system;
the result analysis module is used for analyzing the initial inspection result based on a document object model to generate a document object model tree, and determining abnormal data in the initial inspection result in the document object model tree according to a preset abnormal data extraction rule;
and the report generation module is used for statistically generating the target patrol report corresponding to the sub-information system according to the abnormal data and the preset patrol report template.
9. An electronic device, the electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the intelligent statistical method of document object model-based inspection results of any one of claims 1-7.
10. A computer readable storage medium, wherein the computer readable storage medium stores computer instructions for causing a processor to implement the intelligent statistical generation method of inspection results based on a document object model according to any one of claims 1 to 7 when executed.
CN202311696314.5A 2023-12-11 2023-12-11 Intelligent inspection result statistical method based on document object model Pending CN117540718A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311696314.5A CN117540718A (en) 2023-12-11 2023-12-11 Intelligent inspection result statistical method based on document object model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311696314.5A CN117540718A (en) 2023-12-11 2023-12-11 Intelligent inspection result statistical method based on document object model

Publications (1)

Publication Number Publication Date
CN117540718A true CN117540718A (en) 2024-02-09

Family

ID=89788083

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311696314.5A Pending CN117540718A (en) 2023-12-11 2023-12-11 Intelligent inspection result statistical method based on document object model

Country Status (1)

Country Link
CN (1) CN117540718A (en)

Similar Documents

Publication Publication Date Title
CN115396289B (en) Fault alarm determining method and device, electronic equipment and storage medium
CN115509797A (en) Method, device, equipment and medium for determining fault category
CN115438663A (en) Risk analysis method, device, equipment and medium for power grid work bill
CN115034927A (en) Data processing method and device, electronic equipment and storage medium
CN116074183B (en) C3 timeout analysis method, device and equipment based on rule engine
CN117034149A (en) Fault processing strategy determining method and device, electronic equipment and storage medium
CN115687406B (en) Sampling method, device, equipment and storage medium for call chain data
CN116955075A (en) Method, device, equipment and medium for generating analytic statement based on log
CN116401281A (en) SQL query time prediction method, device, equipment and medium
CN115048352B (en) Log field extraction method, device, equipment and storage medium
CN117540718A (en) Intelligent inspection result statistical method based on document object model
CN114996930A (en) Modeling method and device, electronic equipment and storage medium
CN116185765B (en) Alarm processing method and device, electronic equipment and storage medium
CN116974856B (en) Method, device, equipment and medium for automatically acquiring log file
CN115098405B (en) Software product evaluation method and device, electronic equipment and storage medium
CN116149933B (en) Abnormal log data determining method, device, equipment and storage medium
CN117312168A (en) Interface test case generation method, device, equipment and storage medium
CN115495380A (en) Test case generation method and device, electronic equipment and storage medium
CN117573491A (en) Positioning method, device, equipment and storage medium for performance bottleneck
CN117272151A (en) Data processing method, device, equipment and storage medium
CN117667895A (en) Data processing method, system, equipment and medium based on data braiding
CN117827840A (en) Index creation method and device, electronic equipment and storage medium
CN117093558A (en) Method, device, equipment and medium for generating log file acquisition information
CN116562242A (en) Data report construction method and device, electronic equipment and storage medium
CN116089499A (en) Data statistics method, device and medium based on kafka data volume

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