CN111782515A - Web application state detection method and device, server and storage medium - Google Patents

Web application state detection method and device, server and storage medium Download PDF

Info

Publication number
CN111782515A
CN111782515A CN202010583356.8A CN202010583356A CN111782515A CN 111782515 A CN111782515 A CN 111782515A CN 202010583356 A CN202010583356 A CN 202010583356A CN 111782515 A CN111782515 A CN 111782515A
Authority
CN
China
Prior art keywords
web application
target web
self
program
starting
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
CN202010583356.8A
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.)
Shenzhen Huayuxun Technology Co ltd
Original Assignee
Shenzhen Huayuxun Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Huayuxun Technology Co ltd filed Critical Shenzhen Huayuxun Technology Co ltd
Priority to CN202010583356.8A priority Critical patent/CN111782515A/en
Publication of CN111782515A publication Critical patent/CN111782515A/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/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0793Remedial or corrective actions

Landscapes

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

Abstract

The embodiment of the invention provides a method and a device for detecting the state of a web application, a server and a storage medium. The state detection method of the web application comprises the following steps: when a completion instruction sent when the target web application is issued is obtained, starting a self-checking program corresponding to the target web application; and detecting the target web application based on the self-checking program to determine state information of the target web application, wherein the state information is used for representing whether the target web application is normal or not. The effect of enhancing the experience of the user is achieved.

Description

Web application state detection method and device, server and storage medium
Technical Field
The embodiment of the invention relates to the technical field of internet, in particular to a method and a device for detecting the state of a web application, a server and a storage medium.
Background
With the rapid development of internet technology, more and more web applications are coming up.
Currently, a common solution is to deploy web applications into servers. When the user uses the web application, the user only needs to access the web application through the browser to use the related functions of the web application, and various kinds of software do not need to be additionally installed.
However, when a user accesses a web application for use, the user may encounter various abnormal problems and cannot use the web application normally, which affects the user experience.
Disclosure of Invention
The embodiment of the invention provides a method and a device for detecting the state of a web application, a server and a storage medium, which are used for realizing the effect of enhancing the experience of a user.
In a first aspect, an embodiment of the present invention provides a method for detecting a state of a web application, including:
when a completion instruction sent when the target web application is issued is obtained, starting a self-checking program corresponding to the target web application;
and detecting the target web application based on the self-checking program to determine state information of the target web application, wherein the state information is used for representing whether the target web application is normal or not.
Optionally, the detecting the target web application based on the self-test program to determine the state information of the target web application includes:
sending a starting instruction to the target web application at regular time, wherein the starting instruction is used for indicating the target web application to start;
receiving a response message returned by the target web application in response to the starting instruction;
and determining the state information of the target web application according to the response information.
Optionally, the determining the status message of the target web application according to the response message includes:
determining the response time of the target web application according to the time of sending the starting instruction and the time of receiving the response message;
if the response time is larger than a response time threshold value, determining that the target web application is abnormal;
and if the response time is not larger than the response time threshold, determining that the target web application is normal.
Optionally, the detecting the target web application based on the self-test program to determine the state information of the target web application further includes:
when the waiting time after the starting instruction is sent exceeds a waiting time threshold value, marking one-time application starting failure;
acquiring the current application starting failure times of the target web application;
if the current application starting failure times are not larger than the threshold value of the application starting failure times, the starting instruction is sent to the target web application again;
and if the current application starting failure times are larger than the application starting failure time threshold, determining that the target web application is abnormal.
Optionally, the method further includes:
if the target web application is determined to be abnormal, acquiring the abnormal type of the target web application;
and processing the target web application according to the processing strategy corresponding to the abnormal type.
Optionally, the exception type includes at least one of response timeout and restart failure, and the processing the target web application according to the processing policy corresponding to the exception type includes:
if the abnormal type is response overtime, restarting a server for deploying the target web application;
and if the abnormal type is restart failure, switching the target web application to a backup server for deployment.
Optionally, the method further includes:
if the self-checking program fails to be started, marking the program starting failure once;
acquiring the current program starting failure times of the self-checking program;
if the current program starting failure times are not larger than the program starting failure time threshold, restarting the self-checking program;
and if the current program starting failure times are larger than a program starting failure time threshold, sending a failure message of the self-checking program failure to the terminal.
In a second aspect, an embodiment of the present invention provides a state detection apparatus for a web application, including:
the self-checking program starting module is used for starting a self-checking program corresponding to the target web application when a finishing instruction sent by the target web application when the target web application is issued is obtained;
and the detection module is used for detecting the target web application based on the self-checking program so as to determine the state information of the target web application, wherein the state information is used for representing whether the target web application is normal or not.
In a third aspect, an embodiment of the present invention provides a server, including:
one or more processors;
a storage device to store one or more computer programs,
when executed by the one or more processors, cause the one or more processors to implement a method for state detection of a web application as described in any embodiment of the invention.
In a fourth aspect, the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a state detection method for a web application according to any embodiment of the present invention.
According to the embodiment of the invention, when a completion instruction sent when the target web application is released is obtained, a self-checking program corresponding to the target web application is started; the target web application is detected based on the self-checking program to determine state information of the target web application, wherein the state information is used for representing whether the target web application is normal or not, so that the problem that the user experience is influenced because various abnormal problems cannot be normally used when the user accesses the web application for use is solved, and the effect of enhancing the user experience is realized.
Drawings
Fig. 1 is a schematic flowchart of a method for detecting a state of a web application according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a method for detecting a state of a web application according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of a state detection apparatus for a web application according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of a server according to a fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Before discussing exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart may describe the steps as a sequential process, many of the steps can be performed in parallel, concurrently or simultaneously. In addition, the order of the steps may be rearranged. A process may be terminated when its operations are completed, but may have additional steps not included in the figure. A process may correspond to a method, a function, a procedure, a subroutine, a sub computer program, or the like.
Furthermore, the terms "first," "second," and the like may be used herein to describe various orientations, actions, steps, elements, or the like, but the orientations, actions, steps, or elements are not limited by these terms. These terms are only used to distinguish one direction, action, step or element from another direction, action, step or element. For example, the first information may be referred to as second information, and similarly, the second information may be referred to as first information, without departing from the scope of the present application. The first information and the second information are both information, but they are not the same information. The terms "first", "second", etc. are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the present invention, "a plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
Example one
Fig. 1 is a schematic flowchart of a method for detecting a state of a web application according to an embodiment of the present invention, which is applicable to a scene where detection is performed after the web application is released.
As shown in fig. 1, a method for detecting a state of a web application according to an embodiment of the present invention includes:
s110, when a completion instruction sent by a target web application when the release is completed is obtained, starting a self-checking program corresponding to the target web application;
the Web application program is an application program which can be accessed through Web, and the program has the greatest advantage that a user can easily access the application program, and the user only needs to have a browser and does not need to install other software. The completion instruction is used for representing that the target web application is completely issued, and when the server acquires the completion instruction, the target web application is considered to be completely issued and can be put into use. The self-checking program is used for carrying out self-checking on the target web application, is configured in advance, and is started to carry out self-checking on the web application when a finishing instruction is obtained. Optionally, a self-checking program corresponding to each of the multiple web applications is preconfigured, the target web application is one of the multiple web applications, and when the target web application is released, the self-checking program corresponding to the target web application is started to perform self-checking according to the target web application identifier carried by the completion instruction. It should be noted that the self-check conditions of different web applications are not consistent, for example, the response times of different web applications are different, and therefore different self-check programs need to be set.
In an optional embodiment, if the self-test program fails to be started, marking a program starting failure; acquiring the current program starting failure times of the self-checking program; if the current program starting failure times are not larger than the program starting failure time threshold, restarting the self-checking program; and if the current program starting failure times are larger than a program starting failure time threshold, sending a failure message of the self-checking program failure to the terminal.
Specifically, in some cases, the self-test procedure may fail to start. In this embodiment, when the startup self-test program fails, a program startup failure is marked once. The current program start failure times refer to the accumulated failure times when the self-checking program fails to start. And if the current program starting failure times are not more than the program starting failure time threshold, restarting the self-checking program. If the current program start failure number is greater than the program start failure number threshold, sending a failure message of the self-test program start failure to the terminal, for example, sending the failure message to a "nail" application of the mobile terminal, which is not limited herein. Alternatively, the threshold of the number of failed program starts may be set as required, for example, 3 times.
S120, detecting the target web application based on the self-checking program to determine state information of the target web application, wherein the state information is used for representing whether the target web application is normal or not.
The state information refers to the state information of the target web application determined after the self-checking program is started to detect the target web application, and is used for representing whether the target web application is normal or not. Alternatively, the status information may include normal and abnormal, and a level of the abnormal may be set, which is not limited herein.
Specifically, when a user accesses a web application and uses a corresponding function, the web application cannot be normally used under the condition of abnormal web application, so that the user experience is greatly reduced. According to the technical scheme, after the web application is released, the self-checking program is started to perform self-checking on the target web application, whether the target web application is normal or abnormal is determined, and if the target web application is abnormal, corresponding personnel can be notified to perform processing, so that the target web application is in a normal state when a user uses the web application, and the user experience is improved.
In an optional embodiment, the detecting the target web application based on the self-test program to determine the state information of the target web application may include:
sending a starting instruction to the target web application at regular time, wherein the starting instruction is used for indicating the target web application to start; receiving a response message returned by the target web application in response to the starting instruction; and determining the state information of the target web application according to the response information.
The timing may be sent once per hour per day to instruct the target web application to start, and is not limited in particular here. The response message refers to a message returned by the target web application after receiving the start instruction and responding to the start instruction, and the state of the target web application may be determined according to information carried in the response message, for example, the state message of the target web application is determined according to response time information carried in the response message, and may be set as needed, which is not limited specifically here.
In an optional embodiment, determining the status message of the target web application according to the response message includes:
determining the response time of the target web application according to the time of sending the starting instruction and the time of receiving the response message; if the response time is larger than a response time threshold value, determining that the target web application is abnormal; and if the response time is not larger than the response time threshold, determining that the target web application is normal.
The response time is determined according to the time for sending the start instruction and the time for receiving the response message, and specifically, the response time is a difference value between the time for receiving the response message and the time for sending the start instruction. The response time threshold may be set as desired for the target web application. For example, the response time threshold may be 5ms (milliseconds) or the like, and is not particularly limited herein. If the response time is larger than the response time threshold, the response time of the target web application is too long, and the target web application is judged to be abnormal; and if the response time is not greater than the response time threshold, namely less than or equal to the response time threshold, judging that the target web application is normal.
In particular, in some cases, the target web application may not be responsive to the launch instruction. In an optional embodiment, the detecting the target web application based on the self-test program to determine the state information of the target web application further includes:
when the waiting time after the starting instruction is sent exceeds a waiting time threshold value, marking one-time application starting failure; acquiring the current application starting failure times of the target web application; if the current application starting failure times are not larger than the threshold value of the application starting failure times, the starting instruction is sent to the target web application again; and if the current application starting failure times are larger than the application starting failure time threshold, determining that the target web application is abnormal.
The waiting time refers to a duration after the instruction is sent and before the response message instruction is received. The latency threshold may be set as desired. Specifically, the latency threshold is greater than the response time threshold. When the waiting time exceeds a waiting time threshold, marking one-time application starting failure. The current application startup failure times are accumulated failure times when the current waiting time exceeds the waiting time threshold. If the current application starting failure times are not larger than the application starting failure time threshold, the starting instruction is lost in the sending process, or the server cannot send the starting instruction to the target web application again because of the network problem; and if the current application starting failure times are larger than the application starting failure time threshold, judging that the target web application is abnormal. The threshold of the number of application start failures may be set according to needs, for example, 3 times, and the like, and is not limited herein.
According to the technical scheme of the embodiment of the invention, when a completion instruction sent when the target web application is released is obtained, a self-checking program corresponding to the target web application is started; the target web application is detected based on the self-checking program to determine state information of the target web application, the state information is used for representing whether the target web application is normal or not, after the web application is released, the self-checking program is started to perform self-checking on the target web application to determine whether the target web application is normal or abnormal, if the target web application is abnormal, corresponding personnel can be informed to perform processing, so that the target web application is in a normal state when a user uses the target web application, and the technical effect of improving user experience is achieved.
Example two
Fig. 2 is a schematic flowchart of a method for detecting a state of a web application according to a second embodiment of the present invention. The embodiment is further detailed in the technical scheme, and is suitable for a scene of processing after the web application exception is detected. The method may be performed by a state detection apparatus of a web application, which may be implemented in software and/or hardware, and may be integrated on a server.
As shown in fig. 2, a method for detecting a state of a web application according to a second embodiment of the present invention includes:
s210, when a completion instruction sent when the target web application is issued is obtained, starting a self-checking program corresponding to the target web application;
s220, detecting the target web application based on the self-checking program to determine state information of the target web application, wherein the state information is used for representing whether the target web application is normal or not.
S230, if the target web application is determined to be abnormal, acquiring the abnormal type of the target web application;
wherein the exception type represents a specific exception to the target web application. Optionally, the exception type includes, but is not limited to, response timeout, restart failure, and the like.
S240, processing the target web application according to the processing strategy corresponding to the abnormal type.
The processing policy refers to a manner for processing the web application, and may be set as needed. Generally, when the web application is abnormal, corresponding operation and maintenance personnel are notified to process the abnormal web application. According to the method and the device, after the abnormal type of the abnormality is determined, the target web application is processed according to the processing strategy corresponding to the abnormal type, and therefore manual resources are saved.
In an optional embodiment, the exception type includes at least one of a response timeout and a restart failure, and the processing the target web application according to the processing policy corresponding to the exception type includes:
if the abnormal type is response overtime, restarting a server for deploying the target web application; and if the abnormal type is restart failure, switching the target web application to a backup server for deployment.
The response timeout refers to that the server sends a starting instruction to the target web application, and the time of the target web application responding to the starting instruction exceeds a response time threshold. The restart failure means that a response message fed back by the target web application is not received, and the re-sending start instruction also does not receive the response message. Specifically, if the abnormal type is response timeout, it is considered that a problem occurs in deployment, the server of the target web application is redeployed, that is, the web application is uploaded again, and if the abnormal type is restart failure, it is considered that the performance of the server is insufficient, the target web application is switched to the backup server for deployment. The performance of the current server is lower than that of the backup server, for example, the number and frequency of the CPU cores of the current server are less than those of the CPU cores of the backup server.
According to the technical scheme of the embodiment of the invention, when a completion instruction sent when the target web application is released is obtained, a self-checking program corresponding to the target web application is started; the target web application is detected based on the self-checking program to determine state information of the target web application, the state information is used for representing whether the target web application is normal or not, after the web application is released, the self-checking program is started to perform self-checking on the target web application to determine whether the target web application is normal or abnormal, if the target web application is abnormal, corresponding personnel can be informed to perform processing, so that the target web application is in a normal state when a user uses the target web application, and the technical effect of improving user experience is achieved. In addition, by acquiring the processing strategy corresponding to the exception type for processing, the manual resource is saved, and the exception solving efficiency is improved.
EXAMPLE III
Fig. 3 is a schematic structural diagram of a state detection apparatus for a web application according to a third embodiment of the present invention, where this embodiment is applicable to a scene where detection is performed after a web application is released, and the apparatus may be implemented in a software and/or hardware manner and may be integrated on a server.
As shown in fig. 3, the state detection apparatus for a web application provided in this embodiment may include a self-test program starting module 310 and a detection module 320, where:
a self-check program starting module 310, configured to start a self-check program corresponding to a target web application when a completion instruction sent by the target web application when issuing is completed is obtained; a detection module 320, configured to detect the target web application based on the self-test program to determine state information of the target web application, where the state information is used to characterize whether the target web application is normal.
Optionally, the detecting module 320 includes: a starting instruction sending unit, configured to send a starting instruction to the target web application at regular time, where the starting instruction is used to instruct the target web application to start; a response message receiving unit, configured to receive a response message returned by the target web application in response to the start instruction; and the state message determining unit is used for determining the state message of the target web application according to the response message.
Optionally, the status message determining unit is specifically configured to determine the response time of the target web application according to the time of sending the start instruction and the time of receiving the response message; if the response time is larger than a response time threshold value, determining that the target web application is abnormal; and if the response time is not larger than the response time threshold, determining that the target web application is normal.
Optionally, the status message determining unit is further configured to mark a one-time application start failure when the waiting time after the start instruction is sent exceeds a waiting time threshold; acquiring the current application starting failure times of the target web application; if the current application starting failure times are not larger than the threshold value of the application starting failure times, the starting instruction is sent to the target web application again; and if the current application starting failure times are larger than the application starting failure time threshold, determining that the target web application is abnormal.
Optionally, the apparatus further comprises: the processing module is used for acquiring the abnormal type of the target web application if the target web application is determined to be abnormal; and processing the target web application according to the processing strategy corresponding to the abnormal type.
Optionally, the exception type includes at least one of response timeout and restart failure, and the processing module is specifically configured to restart the server that deploys the target web application if the exception type is response timeout; and if the abnormal type is restart failure, switching the target web application to a backup server for deployment.
Optionally, the apparatus further comprises: the message sending module is used for marking the program starting failure once if the program starting self-checking fails; acquiring the current program starting failure times of the self-checking program; if the current program starting failure times are not larger than the program starting failure time threshold, restarting the self-checking program; and if the current program starting failure times are larger than a program starting failure time threshold, sending a failure message of the self-checking program failure to the terminal.
The state detection device for the web application provided by the embodiment of the invention can execute the state detection method for the web application provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method. Reference may be made to the description of any method embodiment of the invention not specifically described in this embodiment.
Example four
Fig. 4 is a schematic structural diagram of a server according to a fourth embodiment of the present invention. FIG. 4 illustrates a block diagram of an exemplary server 612 suitable for use in implementing embodiments of the present invention. The server 612 shown in fig. 4 is only an example, and should not bring any limitation to the function and the scope of the use of the embodiments of the present invention.
As shown in fig. 4, the server 612 is in the form of a general-purpose server. The components of server 612 may include, but are not limited to: one or more processors 616, a memory device 628, and a bus 618 that couples the various system components including the memory device 628 and the processors 616.
Bus 618 represents one or more of any of several types of bus structures, including a memory device bus or memory device controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
The server 612 typically includes a variety of computer system readable media. Such media can be any available media that is accessible by server 612 and includes both volatile and nonvolatile media, removable and non-removable media.
Storage 628 may include computer system readable media in the form of volatile Memory, such as Random Access Memory (RAM) 630 and/or cache Memory 632. Terminal 612 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 634 may be used to read from or write to non-removable, nonvolatile magnetic media (not shown in FIG. 4, and commonly referred to as a "hard drive"). Although not shown in FIG. 4, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk such as a Compact disk Read-Only Memory (CD-ROM), Digital Video disk Read-Only Memory (DVD-ROM) or other optical media may be provided. In such cases, each drive may be connected to bus 618 by one or more data media interfaces. The memory device 628 may include at least one computer program product having a set (e.g., at least one) of computer program modules configured to perform the functions of embodiments of the present invention.
A computer program/utility 640 having a set (at least one) of computer program modules 642 may be stored, for example, in storage 628, such computer program modules 642 including, but not limited to, an operating system, one or more application computer programs, other computer program modules, and computer program data, each of which examples or some combination may comprise an implementation of a network environment. The computer program modules 642 generally perform the functions and/or methods of the described embodiments of the present invention.
The server 612 may also communicate with one or more external devices 614 (e.g., keyboard, pointing terminal, display 624, etc.), with one or more terminals that enable a user to interact with the server 612, and/or with any terminals (e.g., network card, modem, etc.) that enable the server 612 to communicate with one or more other computing terminals. Such communication may occur via input/output (I/O) interfaces 622. Further, server 612 may communicate with one or more networks (e.g., a Local Area Network (LAN), Wide Area Network (WAN), and/or a public Network such as the internet) via Network adapter 620. As shown in FIG. 4, the network adapter 620 communicates with the other modules of the server 612 via the bus 618. It should be appreciated that although not shown, other hardware and/or software modules may be used in conjunction with the server 612, including but not limited to: microcode, end drives, Redundant processors, external disk drive Arrays, RAID (Redundant Arrays of Independent Disks) systems, tape drives, and data backup storage systems, among others.
The processor 616 executes various functional applications and data processing by running computer programs stored in the storage device 628, for example, implementing a state detection method for a web application provided by any embodiment of the present invention, which may include:
when a completion instruction sent when the target web application is issued is obtained, starting a self-checking program corresponding to the target web application;
and detecting the target web application based on the self-checking program to determine state information of the target web application, wherein the state information is used for representing whether the target web application is normal or not.
According to the technical scheme of the embodiment of the invention, when a completion instruction sent when the target web application is released is obtained, a self-checking program corresponding to the target web application is started; the target web application is detected based on the self-checking program to determine state information of the target web application, the state information is used for representing whether the target web application is normal or not, after the web application is released, the self-checking program is started to perform self-checking on the target web application to determine whether the target web application is normal or abnormal, if the target web application is abnormal, corresponding personnel can be informed to perform processing, so that the target web application is in a normal state when a user uses the target web application, and the technical effect of improving user experience is achieved.
EXAMPLE five
An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a method for detecting a state of a web application according to any embodiment of the present invention, where the method includes:
when a completion instruction sent when the target web application is issued is obtained, starting a self-checking program corresponding to the target web application;
and detecting the target web application based on the self-checking program to determine state information of the target web application, wherein the state information is used for representing whether the target web application is normal or not.
The computer-readable storage media of embodiments of the invention may take any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having 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. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable computer program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a computer program for use by or in connection with an instruction execution system, apparatus, or device.
Computer program code embodied on a storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more computer programming languages, including an object oriented computer programming language such as Java, Smalltalk, C + +, and conventional procedural computer programming languages, such as the "C" language or similar computer programming languages. The computer program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or terminal. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
According to the technical scheme of the embodiment of the invention, when a completion instruction sent when the target web application is released is obtained, a self-checking program corresponding to the target web application is started; the target web application is detected based on the self-checking program to determine state information of the target web application, the state information is used for representing whether the target web application is normal or not, after the web application is released, the self-checking program is started to perform self-checking on the target web application to determine whether the target web application is normal or abnormal, if the target web application is abnormal, corresponding personnel can be informed to perform processing, so that the target web application is in a normal state when a user uses the target web application, and the technical effect of improving user experience is achieved.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A method for detecting a state of a web application, the method comprising:
when a completion instruction sent when the target web application is issued is obtained, starting a self-checking program corresponding to the target web application;
and detecting the target web application based on the self-checking program to determine state information of the target web application, wherein the state information is used for representing whether the target web application is normal or not.
2. The method of claim 1, wherein the detecting the target web application based on the self-test program to determine the state information of the target web application comprises:
sending a starting instruction to the target web application at regular time, wherein the starting instruction is used for indicating the target web application to start;
receiving a response message returned by the target web application in response to the starting instruction;
and determining the state information of the target web application according to the response information.
3. The method of claim 2, wherein the determining a status message for the target web application from the response message comprises:
determining the response time of the target web application according to the time of sending the starting instruction and the time of receiving the response message;
if the response time is larger than a response time threshold value, determining that the target web application is abnormal;
and if the response time is not larger than the response time threshold, determining that the target web application is normal.
4. The method of claim 3, wherein the detecting the target web application based on the self-test program to determine the state information of the target web application further comprises:
when the waiting time after the starting instruction is sent exceeds a waiting time threshold value, marking one-time application starting failure;
acquiring the current application starting failure times of the target web application;
if the current application starting failure times are not larger than the threshold value of the application starting failure times, the starting instruction is sent to the target web application again;
and if the current application starting failure times are larger than the application starting failure time threshold, determining that the target web application is abnormal.
5. The method of claim 1, wherein the method further comprises:
if the target web application is determined to be abnormal, acquiring the abnormal type of the target web application;
and processing the target web application according to the processing strategy corresponding to the abnormal type.
6. The method of claim 5, wherein the exception type includes at least one of a response timeout and a restart failure, and wherein processing the target web application according to a processing policy corresponding to the exception type includes:
if the abnormal type is response overtime, restarting a server for deploying the target web application;
and if the abnormal type is restart failure, switching the target web application to a backup server for deployment.
7. The method of claim 1, wherein the method further comprises:
if the self-checking program fails to be started, marking the program starting failure once;
acquiring the current program starting failure times of the self-checking program;
if the current program starting failure times are not larger than the program starting failure time threshold, restarting the self-checking program;
and if the current program starting failure times are larger than a program starting failure time threshold, sending a failure message of the self-checking program failure to the terminal.
8. An apparatus for detecting a state of a web application, the apparatus comprising:
the self-checking program starting module is used for starting a self-checking program corresponding to the target web application when a finishing instruction sent by the target web application when the target web application is issued is obtained;
and the detection module is used for detecting the target web application based on the self-checking program so as to determine the state information of the target web application, wherein the state information is used for representing whether the target web application is normal or not.
9. A server, comprising:
one or more processors;
storage means for storing one or more computer programs;
when executed by the one or more processors, cause the one or more processors to implement a state detection method for a web application as claimed in any one of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out a method for state detection of a web application according to any one of claims 1 to 7.
CN202010583356.8A 2020-06-23 2020-06-23 Web application state detection method and device, server and storage medium Pending CN111782515A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010583356.8A CN111782515A (en) 2020-06-23 2020-06-23 Web application state detection method and device, server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010583356.8A CN111782515A (en) 2020-06-23 2020-06-23 Web application state detection method and device, server and storage medium

Publications (1)

Publication Number Publication Date
CN111782515A true CN111782515A (en) 2020-10-16

Family

ID=72757230

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010583356.8A Pending CN111782515A (en) 2020-06-23 2020-06-23 Web application state detection method and device, server and storage medium

Country Status (1)

Country Link
CN (1) CN111782515A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113595815A (en) * 2021-07-14 2021-11-02 上海淇玥信息技术有限公司 Method and device for detecting application survival and electronic equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030121003A1 (en) * 2001-12-20 2003-06-26 Sun Microsystems, Inc. Application launcher testing framework
CN105354131A (en) * 2015-12-11 2016-02-24 北京慧眼智行科技有限公司 Monitoring method for running of service program and device
US20160224426A1 (en) * 2015-02-03 2016-08-04 Uber Technologies, Inc. System and method for introducing functionality to an application for use with a network service
CN107608896A (en) * 2017-09-26 2018-01-19 上海爱优威软件开发有限公司 The detection method and system of a kind of terminal applies
KR20180076020A (en) * 2016-12-27 2018-07-05 주식회사 넥슨코리아 Apparatus and method for application test automation
CN110688319A (en) * 2019-09-30 2020-01-14 RealMe重庆移动通信有限公司 Application keep-alive capability test method and related device
CN111147291A (en) * 2019-12-18 2020-05-12 深圳前海微众银行股份有限公司 Service maintenance method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030121003A1 (en) * 2001-12-20 2003-06-26 Sun Microsystems, Inc. Application launcher testing framework
US20160224426A1 (en) * 2015-02-03 2016-08-04 Uber Technologies, Inc. System and method for introducing functionality to an application for use with a network service
CN105354131A (en) * 2015-12-11 2016-02-24 北京慧眼智行科技有限公司 Monitoring method for running of service program and device
KR20180076020A (en) * 2016-12-27 2018-07-05 주식회사 넥슨코리아 Apparatus and method for application test automation
CN107608896A (en) * 2017-09-26 2018-01-19 上海爱优威软件开发有限公司 The detection method and system of a kind of terminal applies
CN110688319A (en) * 2019-09-30 2020-01-14 RealMe重庆移动通信有限公司 Application keep-alive capability test method and related device
CN111147291A (en) * 2019-12-18 2020-05-12 深圳前海微众银行股份有限公司 Service maintenance method and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113595815A (en) * 2021-07-14 2021-11-02 上海淇玥信息技术有限公司 Method and device for detecting application survival and electronic equipment

Similar Documents

Publication Publication Date Title
CN112486629B (en) Micro-service state detection method, micro-service state detection device, electronic equipment and storage medium
KR101944873B1 (en) Method for checking whether hardware of intelligent terminal runs abnormally and intelligent terminal
US20180081776A1 (en) Automated System-Level Failure and Recovery
US20090138757A1 (en) Failure recovery method in cluster system
CN108874441B (en) Board card configuration method, device, server and storage medium
CN111338698A (en) Method and system for accurately booting server by BIOS (basic input output System)
CN111090546B (en) Method, device and equipment for restarting operating system and readable storage medium
CN103257922A (en) Method for quickly testing reliability of BIOS (basic input output system) and OS (operating system) interface codes
CN106997313B (en) Signal processing method and system of application program and terminal equipment
CN114527857B (en) Multi-core system reset method, device, equipment and readable storage medium
CN116266150A (en) Service recovery method, data processing unit and related equipment
US9792168B2 (en) System and method for cloud remediation of a client with a non-bootable storage medium
CN111782515A (en) Web application state detection method and device, server and storage medium
CN110764962A (en) Log processing method and device
CN110532203B (en) NAND reset method, device, electronic equipment and storage medium
CN113412480B (en) Mounting processing method, mounting processing device, electronic equipment and computer readable storage medium
CN109634782B (en) Method and device for detecting system robustness, storage medium and terminal
CN110688130A (en) Physical machine deployment method, physical machine deployment device, readable storage medium and electronic equipment
CN106130815B (en) Board level testing method and device
CN110851328B (en) Method for detecting abnormal power failure of password card in PKCS #11 application
US20220179680A1 (en) Application state control method apparatus, and terminal and computer-readable storage medium
CN103473081A (en) Operant method after system updating of terminal and terminal
CN112751782A (en) Flow switching method, device, equipment and medium based on multi-activity data center
CN111694587A (en) Server PNOR firmware upgrading method, device, equipment and storage medium
CN113220510A (en) Device detection method, detection device, and computer-readable 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