CN116225941A - Page detection method and device, electronic equipment and storage medium - Google Patents

Page detection method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116225941A
CN116225941A CN202310212942.5A CN202310212942A CN116225941A CN 116225941 A CN116225941 A CN 116225941A CN 202310212942 A CN202310212942 A CN 202310212942A CN 116225941 A CN116225941 A CN 116225941A
Authority
CN
China
Prior art keywords
page
alarm
pulling
result
task
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
CN202310212942.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.)
Beijing Bo Hongyuan Data Polytron Technologies Inc
Original Assignee
Beijing Bo Hongyuan Data Polytron Technologies Inc
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 Bo Hongyuan Data Polytron Technologies Inc filed Critical Beijing Bo Hongyuan Data Polytron Technologies Inc
Priority to CN202310212942.5A priority Critical patent/CN116225941A/en
Publication of CN116225941A publication Critical patent/CN116225941A/en
Pending legal-status Critical Current

Links

Images

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/362Software debugging
    • G06F11/3644Software debugging by instrumenting at runtime
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/366Software debugging using diagnostics
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a page detection method, a page detection device, electronic equipment and a storage medium. Periodically acquiring a page detection task aiming at a target website based on a timing task created in the Springboot framework; analyzing the page detection task to obtain a plurality of task basic information corresponding to the target website; running a custom pulling test Cas through a Selenium test tool so that a browsing controller simulates the operation of a client and obtains the current pulling test running result matched with a target website; and when the page alarm condition is determined to be met according to the current pulling and testing operation result and at least one historical pulling and testing operation result, generating a page alarm result matched with the page alarm condition. The problems that the main stream pulling measurement is tedious in covering a user system, the real operation of a client cannot be simulated, and the integration of monitoring and alarming cannot be triggered are solved, the experience of a user is improved, the efficiency of manual inspection is greatly improved, and the page detection and alarming operation can be automatically carried out.

Description

Page detection method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a page detection method, a device, an electronic device, and a storage medium.
Background
With the progress of the age, the popularization of the internet increases the access of users to the network, and the research on the availability of page access is also of great importance.
The inventors have found that the following drawbacks exist in the prior art in the process of implementing the present invention: at present, the mainstream pulling and testing is generally carried out by accessing and monitoring through a service interface, but the coverage of a user system is complicated, the user system is not comprehensive enough, the operation of a client cannot be simulated, the data acquisition mode through the service interface belongs to a passive mode, the monitoring and alarming cannot be triggered integrally, the user experience is poor, and the cost of the manual inspection system is high.
Disclosure of Invention
The invention provides a page detection method, a page detection device, electronic equipment and a storage medium, which are used for improving the experience of a user and automatically carrying out page detection and alarm operation.
According to an aspect of the present invention, there is provided a page detection method, including:
periodically acquiring a page detection task aiming at a target website based on a timing task created in the Springboot framework;
analyzing the page detection task to obtain a plurality of task basic information corresponding to the target website;
the basic information of the plurality of tasks passes through a Selenium test tool, a browsing controller is called to control a browser to operate a pull test Cas, and a current pull test operation result matched with the target website is obtained;
and when the page alarm condition is determined to be met according to the current pulling and testing operation result and at least one historical pulling and testing operation result, generating a page alarm result matched with the page alarm condition.
According to another aspect of the present invention, there is provided a page detection apparatus, including:
the page detection task acquisition module is used for periodically acquiring a page detection task aiming at a target website based on a timing task created in the Springboot framework;
the task basic information acquisition module is used for analyzing the page detection task and acquiring a plurality of task basic information corresponding to the target website;
the current pulling and testing operation result acquisition module is used for calling the browser to control the browser to operate the pulling and testing Cas through the Selenium testing tool according to the plurality of pieces of task basic information, and acquiring a current pulling and testing operation result matched with the target website;
and the page alarm result generating module is used for generating a page alarm result matched with the page alarm condition when the page alarm condition is determined to be met according to the current pulling and measuring operation result and at least one historical pulling and measuring operation result.
According to another aspect of the present invention, there is provided an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the page detection method according to any of the embodiments of the present invention when executing the computer program.
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 page detection method according to any one of the embodiments of the present invention when executed.
According to the technical scheme, the page detection task for the target website is periodically acquired based on the timing task created in the Springboot framework; analyzing the page detection task to obtain a plurality of task basic information corresponding to the target website; the basic information of the plurality of tasks passes through a Selenium test tool, a browsing controller is called to control a browser to operate a pull test Cas, and a current pull test operation result matched with the target website is obtained; and when the page alarm condition is determined to be met according to the current pulling and testing operation result and at least one historical pulling and testing operation result, generating a page alarm result matched with the page alarm condition. The problems that the main stream pulling and testing is tedious and incomplete in coverage of a user system and cannot actively trigger monitoring and alarming are solved, the experience and efficiency of a user are improved, and page detection and alarming operation can be automatically carried out.
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 flow chart of a page detection method according to a first embodiment of the present invention;
FIG. 2 is a flowchart of another page detection method according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of a page detection device according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to a fourth 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 "target," "current," and the like in the description and claims of the present invention and the above-described drawings 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 page detection method according to an embodiment of the present invention, where the method may be applied to a case of automatically performing page detection of a target website, and the method may be performed by a page detection device, and the page detection device may be implemented in a form of hardware and/or software.
Accordingly, as shown in fig. 1, the method includes:
s110, periodically acquiring a page detection task aiming at a target website based on a timing task created in the Springboot framework.
The timing task may be a timing task executed based on a timing task in a Springboot frame, and specifically, the detection of the page of the target website is required every time a timing task comes.
Specifically, the page detection task may be a task of performing page detection on the target website, and may detect a login response time or a time-consuming duration of the target website.
For example, assuming that page detection needs to be performed on the a website, first, the timing task created in the Springboot frame is performed, for example, every 1 minute, after the timing task is triggered, the operation of periodically acquiring the page detection task needs to be performed on the a website.
S120, analyzing the page detection task to obtain multiple task basic information corresponding to the target website.
The task basic information may be basic information describing a target website.
In the previous example, the acquired page detection task is analyzed, and the page detection task is assumed to be the detection of user login. Firstly, analyzing a page detection task corresponding to an A website to obtain a plurality of task basic information corresponding to a target website, and supposing that a website address corresponding to the A website, a start login time and website key elements corresponding to the A website are obtained through analysis.
S130, the plurality of pieces of task basic information pass through a Selenium testing tool, a browsing controller is called to control a browser to operate a pull test Cas, and a current pull test operation result matched with the target website is obtained.
The pull Cas may be a code for performing task detection of the target website, or a plug-in composed of the code. The current pull test operation result may be an operation result reflecting whether the target website can pass the detection.
Specifically, through operating the pull test Cas, the detection processing of the target website can be performed for multiple times, and in one time of timing task detection, the pull test Cas can be operated for multiple times, and the current pull test operation result and each history pull test operation result can be obtained.
The browser controller may be a terminal controller that controls a plurality of browsers, and specifically, the browser controller may be capable of performing operations such as controlling the browser.
Optionally, after the step of generating the page alarm result matched with the page alarm condition when the page alarm condition is determined to be met according to the current pulling and testing operation result and at least one historical pulling and testing operation result, the method further comprises: performing format conversion on the page alarm result to obtain a format conversion page alarm result; and sending the format conversion page alarm result to the information terminal equipment in a visual mode.
The format conversion page alarm result can be a page alarm result for format conversion, and can be compatible with all information terminal devices.
In this embodiment, the format conversion of the page alert result can better perform information transmission, and the information may be transmitted to an information terminal device, for example: the method and the device have the advantages that the page warning result can be fed back more comprehensively and rapidly by transmitting the short message, the public number or the enterprise micro message, so that a user can receive the page warning result more conveniently, the page detection efficiency is improved, and the page detection can be performed better.
And S140, when the page alarm condition is determined to be met according to the current pulling and testing operation result and at least one historical pulling and testing operation result, generating a page alarm result matched with the page alarm condition.
The historical pulling and testing operation result can be an operation result obtained by the historical operation pulling and testing Cas in one timing task. The page alarm condition can be a preset condition requiring page alarm, and the page alarm condition is learned by analyzing according to the historical page detection task in advance.
Specifically, the page alarm result may be a result including a plurality of alarm items, and the obtained page alarm result may be fed back to the user for processing operation, and specifically, the page alarm result may include: alert content, alert type, trigger time, trigger condition, go to view, access time, etc.
In this embodiment, the page alarm conditions may be of various types, for example, the page alarm conditions may include a login time threshold, an online time threshold, or a time-consuming time threshold, and the corresponding page alarm result is obtained by judging different page alarm conditions.
In the previous example, it is assumed that the login time of the website a is detected, and it is assumed that the login time of the website a does not meet the page alarm condition (it is assumed that the page alarm condition is that 4 logins within 5 minutes do not exceed 3.5 seconds), so that a corresponding page alarm result is obtained, and specifically, the page alarm result includes access time: 3.5s; the alarm types are as follows: a slow; the triggering time is as follows: 2022, 12, 7, 18, 52 minutes and 56 seconds; go to and look at: http:// xxxx/; triggering conditions: the 4 logins in 5 minutes each exceeded 3.5 seconds.
When the page alarm condition is determined to be met according to the current pulling and testing operation result and at least one historical pulling and testing operation result, generating a page alarm result matched with the page alarm condition, including: acquiring at least one historical pulling and testing operation result; judging whether the current pulling and testing operation result meets the page alarm condition, if so, sending a page alarm result passing verification, and initializing continuous alarm marking times; if not, recording the continuous alarm marking times according to each historical pulling and measuring operation result, and returning to call a browsing controller to control a browser to operate a pulling and measuring Cas, obtaining the operation of the current pulling and measuring operation result matched with the target website, if the continuous alarm marking times are greater than or equal to a preset alarm marking times threshold, sending page alarm results which are not passed by verification, and initializing the continuous alarm marking times.
The historical pulling operation result may be an operation result obtained by a historical pulling Cas operating in one timing task. The number of continuous alarm marks can be Cas with multiple pulling tests, and the page alarm condition is not satisfied continuously. The warning flag number threshold may be a preset number threshold that allows warning flag to be performed.
Specifically, when the number of continuous alarm marking times is greater than or equal to the threshold value of the number of alarm marking times, alarm operation is performed, and the page alarm result is fed back. The target website is not verified, a page warning result needs to be sent to the user, and the user can receive the page warning result through the terminal equipment, and the page warning result can be an applet or an application program in a mobile phone.
Optionally, after recording the number of continuous alarm marks according to each historical pulling and testing operation result, and returning to call the browsing controller to control the browser to operate the pulling and testing Cas, the operation of obtaining the current pulling and testing operation result matched with the target website further includes: and if the number of continuous alarm marks is smaller than a preset alarm mark number threshold, sending a page alarm result passing verification, and initializing the alarm mark number.
In this embodiment, when the number of continuous alarm marks is smaller than the threshold number of alarm marks, it is indicated that the target website passes the verification, that is, the page alarm result does not need to be fed back to the user, and at the same time, after the current timing task is executed, the initialization process of the number of alarm marks needs to be performed.
The advantages of this arrangement are that: whether the page detection task corresponding to the target website passes verification or not can be timely fed back, the number of alarm marks is initialized timely, next timing task is convenient to come, page re-detection is conducted, and user experience is improved.
Optionally, the page warning result includes at least one of the following: alert content, alert type, trigger time, trigger condition, go to view, and access time.
In this embodiment, the page alarm result may include alarm content, alarm type, trigger time, trigger condition, forward viewing, access time, etc., and the page alarm result is rich in content, so that the user can accurately determine the specific reason of unsuccessful page detection, and the experience of the user is improved.
According to the technical scheme, the page detection task for the target website is periodically acquired based on the timing task created in the Springboot framework; analyzing the page detection task to obtain a plurality of task basic information corresponding to the target website; the basic information of the plurality of tasks passes through a Selenium test tool, a browsing controller is called to control a browser to operate a pull test Cas, and a current pull test operation result matched with the target website is obtained; and when the page alarm condition is determined to be met according to the current pulling and testing operation result and at least one historical pulling and testing operation result, generating a page alarm result matched with the page alarm condition. The problems that the main stream pulling measurement is tedious in covering a user system, the real operation of a client cannot be simulated, and the integration of monitoring and alarming cannot be triggered are solved, the experience of a user is improved, the efficiency of manual inspection is greatly improved, and the page detection and alarming operation can be automatically carried out.
Example two
Fig. 2 is a flowchart of another page detection method provided in the second embodiment of the present invention, where the optimization is performed based on the above embodiments, and in this embodiment, a specific operation procedure for determining the pull test Cas is further included before periodically obtaining the page detection task for the target website based on the timing task created in the Springboot frame.
Accordingly, as shown in fig. 2, the method includes:
s210, acquiring a historical page detection task, and analyzing the historical page detection task to obtain multiple pieces of historical task basic information.
The historical page detection task may be a task of detecting a page in a history, and may be a task of detecting a historical page of each target website. The historical task base information may be information that parses the historical page detection task to describe the historical task.
S220, according to initial pull-out test Cas and multiple historical task basic information, self-learning respectively determines page alarm conditions and alarm marking frequency thresholds corresponding to the initial pull-out test Cas.
The initial pull Cas may be a predefined code segment for performing task detection of the target website, or a plug-in component composed of the code segment.
Specifically, the page warning condition and the warning mark frequency threshold value can be determined by learning according to initial measurement Cas and multiple pieces of historical task basic information, so that measurement Cas is determined. According to the determined pulling and measuring Cas, page detection processing of the target website can be performed.
S230, determining the pulling and measuring Cas according to the page alarm condition and the alarm mark frequency threshold.
S240, periodically acquiring a page detection task aiming at a target website based on a timing task created in the Springboot framework.
S250, analyzing the page detection task to obtain multiple task basic information corresponding to the target website.
And S260, calling a browsing controller to control a browser to run the pull test Cas through a Selenium test tool according to the task basic information, and obtaining a current pull test running result matched with the target website.
S270, when the page alarm condition is determined to be met according to the current pulling and testing operation result and at least one historical pulling and testing operation result, generating a page alarm result matched with the page alarm condition.
According to the technical scheme, a history page detection task is obtained, and analysis processing is carried out on the history page detection task to obtain multiple history task basic information; according to initial pulling Cas and multiple pieces of historical task basic information, self-learning respectively determines page alarm conditions and alarm marking frequency thresholds corresponding to the initial pulling Cas; determining a pulling test Cas according to the page alarm condition and the alarm mark frequency threshold; periodically acquiring a page detection task aiming at a target website based on a timing task created in the Springboot framework; analyzing the page detection task to obtain a plurality of task basic information corresponding to the target website; the basic information of the plurality of tasks passes through a Selenium test tool, a browsing controller is called to control a browser to operate a pull test Cas, and a current pull test operation result matched with the target website is obtained; and when the page alarm condition is determined to be met according to the current pulling and testing operation result and at least one historical pulling and testing operation result, generating a page alarm result matched with the page alarm condition. Cas can be pulled out more accurately, user experience is improved, manual inspection efficiency is greatly improved, and page detection and alarm operation can be automatically performed.
Example III
Fig. 3 is a schematic structural diagram of a page detection device according to a third embodiment of the present invention. The page detection device provided in the embodiment of the invention can be implemented by software and/or hardware, and can be configured in a terminal device or a server to implement a page detection method in the embodiment of the invention. As shown in fig. 3, the apparatus includes: the system comprises a page detection task acquisition module 310, a task basic information acquisition module 320, a current pulling and testing operation result acquisition module 330 and a page alarm result generation module 340.
The page detection task obtaining module 310 is configured to periodically obtain a page detection task for a target website based on a timing task created in the Springboot frame;
the task basic information obtaining module 320 is configured to parse the page detection task to obtain multiple task basic information corresponding to the target website;
the current pulling and testing operation result obtaining module 330 is configured to call a browsing controller to control a browser to operate a pulling and testing Cas through a Selenium testing tool according to the multiple task basic information, and obtain a current pulling and testing operation result matched with the target website;
the page alarm result generating module 340 is configured to generate a page alarm result that matches a page alarm condition when it is determined that the page alarm condition is satisfied according to a current measurement operation result and at least one historical measurement operation result.
According to the technical scheme, the page detection task for the target website is periodically acquired based on the timing task created in the Springboot framework; analyzing the page detection task to obtain a plurality of task basic information corresponding to the target website; the basic information of the plurality of tasks passes through a Selenium test tool, a browsing controller is called to control a browser to operate a pull test Cas, and a current pull test operation result matched with the target website is obtained; and when the page alarm condition is determined to be met according to the current pulling and testing operation result and at least one historical pulling and testing operation result, generating a page alarm result matched with the page alarm condition. The problems that the main stream pulling measurement is tedious in covering a user system, the real operation of a client cannot be simulated, and the integration of monitoring and alarming cannot be triggered are solved, the experience of a user is improved, the efficiency of manual inspection is greatly improved, and the page detection and alarming operation can be automatically carried out.
Optionally, the system further includes a format conversion page alarm result determining module, specifically configured to, when it is determined that a page alarm condition is met according to a current pulling and testing operation result and at least one historical pulling and testing operation result, perform format conversion on a page alarm result that matches the page alarm condition after generating the page alarm result, and obtain a format conversion page alarm result; and the format conversion page alarm result sending module is used for sending the format conversion page alarm result to the information terminal equipment in a visual mode.
Optionally, the page alert result generating module 340 may be specifically configured to: acquiring at least one historical pulling and testing operation result; judging whether the current pulling and testing operation result meets the page alarm condition, if so, sending a page alarm result passing verification, and initializing continuous alarm marking times; if not, recording the continuous alarm marking times according to each historical pulling and measuring operation result, and returning to call a browsing controller to control a browser to operate a pulling and measuring Cas, obtaining the operation of the current pulling and measuring operation result matched with the target website, if the continuous alarm marking times are greater than or equal to a preset alarm marking times threshold, sending page alarm results which are not passed by verification, and initializing the continuous alarm marking times.
Optionally, the page warning result generating module 340 may be further specifically configured to: after recording the number of continuous alarm marks according to each historical pulling and measuring operation result, and returning to call a browsing controller to control a browser to operate a pulling and measuring Cas, acquiring the operation of the current pulling and measuring operation result matched with the target website, if the number of continuous alarm marks is smaller than a preset alarm mark number threshold, sending a page alarm result passing verification, and initializing the number of alarm marks.
Optionally, the method further includes a pull-out Cas determination module, which may be specifically used for: before periodically acquiring a page detection task aiming at a target website, acquiring a historical page detection task, and analyzing the historical page detection task to obtain multiple pieces of historical task basic information; according to initial pulling Cas and multiple pieces of historical task basic information, self-learning respectively determines page alarm conditions and alarm marking frequency thresholds corresponding to the initial pulling Cas; and determining the pulling and measuring Cas according to the page alarm condition and the alarm mark frequency threshold.
Optionally, the page alert result may include at least one of: alert content, alert type, trigger time, trigger condition, go to view, and access time.
The page detection device provided by the embodiment of the invention can execute the page detection method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Example IV
Fig. 4 shows a schematic diagram of an electronic device 10 that may be used to implement a fourth embodiment of the 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. 4, 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 respective methods and processes described above, such as the page detection method.
In some embodiments, the page detection method may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as the 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 steps of the page detection method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the page detection method in any other suitable way (e.g., by means of firmware).
The method comprises the following steps: periodically acquiring a page detection task aiming at a target website based on a timing task created in the Springboot framework; analyzing the page detection task to obtain a plurality of task basic information corresponding to the target website; the basic information of the plurality of tasks passes through a Selenium test tool, a browsing controller is called to control a browser to operate a pull test Cas, and a current pull test operation result matched with the target website is obtained; and when the page alarm condition is determined to be met according to the current pulling and testing operation result and at least one historical pulling and testing operation result, generating a page alarm result matched with the page alarm condition.
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 Chip (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.
Example five
A fifth embodiment of the present invention also provides a computer-readable storage medium containing computer-readable instructions, which when executed by a computer processor, are configured to perform a method of page detection, the method comprising: periodically acquiring a page detection task aiming at a target website based on a timing task created in the Springboot framework; analyzing the page detection task to obtain a plurality of task basic information corresponding to the target website; the basic information of the plurality of tasks passes through a Selenium test tool, a browsing controller is called to control a browser to operate a pull test Cas, and a current pull test operation result matched with the target website is obtained; and when the page alarm condition is determined to be met according to the current pulling and testing operation result and at least one historical pulling and testing operation result, generating a page alarm result matched with the page alarm condition.
Of course, the computer-readable storage medium provided in the embodiments of the present invention is not limited to the above-described method operations, and may also perform the related operations in the page detection method provided in any embodiment of the present invention.
From the above description of embodiments, it will be clear to a person skilled in the art that the present invention may be implemented by means of software and necessary general purpose hardware, but of course also by means of hardware, although in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, etc., and include several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the embodiments of the present invention.
It should be noted that, in the above embodiment of the page detection device, each unit and module included are only divided according to the functional logic, but not limited to the above division, so long as the corresponding functions can be implemented; in addition, the specific names of the functional units are also only for distinguishing from each other, and are not used to limit the protection scope of the present invention.
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. A method for detecting a page, comprising:
periodically acquiring a page detection task aiming at a target website based on a timing task created in the Springboot framework;
analyzing the page detection task to obtain a plurality of task basic information corresponding to the target website;
the basic information of the plurality of tasks passes through a Selenium test tool, a browsing controller is called to control a browser to operate a pull test Cas, and a current pull test operation result matched with the target website is obtained;
and when the page alarm condition is determined to be met according to the current pulling and testing operation result and at least one historical pulling and testing operation result, generating a page alarm result matched with the page alarm condition.
2. The method of claim 1, wherein after generating a page alert result that matches a page alert condition when it is determined that the page alert condition is met based on a current pulling operation result and at least one historical pulling operation result, further comprising:
performing format conversion on the page alarm result to obtain a format conversion page alarm result;
and sending the format conversion page alarm result to the information terminal equipment in a visual mode.
3. The method of claim 2, wherein generating a page alert result that matches a page alert condition when it is determined that the page alert condition is met based on a current pulling operation result and at least one historical pulling operation result comprises:
acquiring at least one historical pulling and testing operation result;
judging whether the current pulling and testing operation result meets the page alarm condition, if so, sending a page alarm result passing verification, and initializing continuous alarm marking times;
if not, recording the continuous alarm marking times according to each historical pulling and measuring operation result, and returning to call a browsing controller to control a browser to operate a pulling and measuring Cas, obtaining the operation of the current pulling and measuring operation result matched with the target website, if the continuous alarm marking times are greater than or equal to a preset alarm marking times threshold, sending page alarm results which are not passed by verification, and initializing the continuous alarm marking times.
4. The method of claim 3, further comprising, after recording a number of consecutive alert flags based on each of the historical pull test run results and returning to the operation of invoking the browse controller to control the browser to run the pull test Cas to obtain a current pull test run result that matches the target website:
and if the number of continuous alarm marks is smaller than a preset alarm mark number threshold, sending a page alarm result passing verification, and initializing the alarm mark number.
5. The method of claim 1, further comprising, prior to periodically acquiring the page detection task for the target website based on the timing task created in the Springboot framework:
acquiring a historical page detection task, and analyzing the historical page detection task to obtain multiple historical task basic information;
according to initial pulling and measuring Cas and multiple historical task basic information, self-learning respectively determines page alarm conditions and alarm marking frequency thresholds corresponding to the initial pulling and measuring Cas;
and determining the pulling and measuring Cas according to the page alarm condition and the alarm mark frequency threshold.
6. The method of claim 1, wherein the page alert result comprises at least one of: alert content, alert type, trigger time, trigger condition, go to view, and access time.
7. A page detection apparatus, characterized by comprising:
the page detection task acquisition module is used for periodically acquiring a page detection task aiming at a target website based on a timing task created in the Springboot framework;
the task basic information acquisition module is used for analyzing the page detection task and acquiring a plurality of task basic information corresponding to the target website;
the current pulling and testing operation result acquisition module is used for calling the browser to control the browser to operate the pulling and testing Cas through the Selenium testing tool according to the plurality of pieces of task basic information, and acquiring a current pulling and testing operation result matched with the target website;
and the page alarm result generating module is used for generating a page alarm result matched with the page alarm condition when the page alarm condition is determined to be met according to the current pulling and measuring operation result and at least one historical pulling and measuring operation result.
8. The apparatus as recited in claim 7, further comprising:
the format conversion pulling and testing operation result determining module is used for carrying out format conversion on the page alarm result after generating the page alarm result matched with the page alarm condition when the page alarm condition is determined to be met according to the current pulling and testing operation result and at least one historical pulling and testing operation result, so as to obtain a format conversion page alarm result;
and the format conversion page alarm result sending module is used for sending the format conversion page alarm result to the information terminal equipment in a visual mode.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the page detection method of any of claims 1-6 when the computer program is executed by the processor.
10. A computer readable storage medium storing computer instructions for causing a processor to perform the page detection method of any one of claims 1-6.
CN202310212942.5A 2023-03-06 2023-03-06 Page detection method and device, electronic equipment and storage medium Pending CN116225941A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310212942.5A CN116225941A (en) 2023-03-06 2023-03-06 Page detection method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310212942.5A CN116225941A (en) 2023-03-06 2023-03-06 Page detection method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116225941A true CN116225941A (en) 2023-06-06

Family

ID=86569245

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310212942.5A Pending CN116225941A (en) 2023-03-06 2023-03-06 Page detection method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116225941A (en)

Similar Documents

Publication Publication Date Title
CN112948223B (en) Method and device for monitoring running condition
CN116089231A (en) Fault alarm method and device, electronic equipment and storage medium
CN116820826B (en) Root cause positioning method, device, equipment and storage medium based on call chain
CN115168154B (en) Abnormal log detection method, device and equipment based on dynamic baseline
CN117040799A (en) Page interception rule generation and page access control method and device and electronic equipment
CN116545905A (en) Service health detection method and device, electronic equipment and storage medium
CN116795615A (en) Chip evaluation method, system, electronic equipment and storage medium
CN115481594B (en) Scoreboard implementation method, scoreboard, electronic equipment and storage medium
CN116225941A (en) Page detection method and device, electronic equipment and storage medium
CN113010571B (en) Data detection method, device, electronic equipment, storage medium and program product
CN114706610A (en) Business flow chart generation method, device, equipment and storage medium
CN114238069A (en) Web application firewall testing method and device, electronic equipment, medium and product
CN113836291B (en) Data processing method, device, equipment and storage medium
CN117290179B (en) Method, device, equipment and storage medium for determining event timeout state
CN116560952A (en) Test platform alarm method and device, electronic equipment and storage medium
CN117714561A (en) Alarm message processing method, device, equipment and storage medium
CN117271289A (en) Webpage monitoring method, device, equipment and storage medium
CN118642807A (en) Interface operation processing method and device, electronic equipment and storage medium
CN115361308A (en) Industrial control network data risk determination method, device, equipment and storage medium
CN118312663A (en) Method and device for determining article information, electronic equipment and storage medium
CN118350631A (en) Equipment risk identification method and device, electronic equipment and storage medium
CN118074625A (en) Equipment fault detection method, device, equipment and storage medium
CN117010908A (en) Information display method and device, electronic equipment and storage medium
CN117668833A (en) Abnormal operation identification method, device, electronic equipment and storage medium
CN118587627A (en) Abnormal behavior identification method and device, electronic equipment and storage medium

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