CN114257532A - Server side state detection method and device - Google Patents

Server side state detection method and device Download PDF

Info

Publication number
CN114257532A
CN114257532A CN202111582703.6A CN202111582703A CN114257532A CN 114257532 A CN114257532 A CN 114257532A CN 202111582703 A CN202111582703 A CN 202111582703A CN 114257532 A CN114257532 A CN 114257532A
Authority
CN
China
Prior art keywords
node
application
application node
detection
server
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.)
Granted
Application number
CN202111582703.6A
Other languages
Chinese (zh)
Other versions
CN114257532B (en
Inventor
陈方
宫晨
袁宁
刘方毅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202111582703.6A priority Critical patent/CN114257532B/en
Publication of CN114257532A publication Critical patent/CN114257532A/en
Application granted granted Critical
Publication of CN114257532B publication Critical patent/CN114257532B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0817Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking functioning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/252Integrating or interfacing systems involving database management systems between a Database Management System and a front-end application
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • G06F16/9566URL specific, e.g. using aliases, detecting broken or misspelled links
    • 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

Abstract

The embodiment of the application provides a method and a device for detecting the state of a server, which can be used in the field of finance, and the method comprises the following steps: intercepting keywords of a network access request, determining a node query condition, calling a preset high-availability application node information table query interface according to the node query condition, and obtaining detail information of an application node; judging whether the application node detail information meets the detection condition, if so, determining a target detection link according to an initial detection link in the application node detail information; network calling detection is carried out on each application node contained in the application node detail information according to the target detection link, and the node server state of each application node is determined; sending a service request sent by a user to an application node with a normal node server state, writing the application node with the abnormal node server state into an abnormal node set, and sending the application node to an operation and maintenance management end; the method and the device can accurately, flexibly and lightweighting the back-end multi-activity detection.

Description

Server side state detection method and device
Technical Field
The application relates to the field of data processing and can also be used in the field of finance, in particular to a method and a device for detecting a state of a server.
Background
The existing WEB application high availability-multi-activity detection mostly belongs to some load balancing application services, and the general mechanism is to configure parameters such as the check failure times, check success times, request timeout time and the like of the back-end service in a configuration file of the service to perform the health check of the back-end service in an http mode.
Most of the existing multi-active mechanisms are part of load balancing application services, such as the rear-end service health detection configuration of nginx's upstream, WEB rear-end detection is performed after application needs to be built, health check is performed, an abnormal application node server is removed from a load list, flexible multi-level configuration self-defined local detection cannot be embedded into an application code, the application needs to be restarted after configuration is completed to be effective, service can be interrupted, maintenance cost is increased after service change is deployed, and the multi-active mechanisms are not suitable for light-weight embedded targeted rear-end service health detection.
Disclosure of Invention
Aiming at the problems in the prior art, the application provides a method and a device for detecting the state of a server, which can accurately, flexibly and lightweighted detect the back-end activity.
In order to solve at least one of the above problems, the present application provides the following technical solutions:
in a first aspect, the present application provides a method for detecting a server state, including:
intercepting keywords of a network access request, determining a node query condition, and calling a preset high-availability application node information table query interface according to the node query condition to obtain corresponding application node detail information;
judging whether the application node detail information meets a detection condition, if so, determining a corresponding target detection link according to an initial detection link in the application node detail information;
network calling detection is carried out on each application node contained in the application node detail information according to the target detection link, and the node server state of each application node is determined;
and sending the service request sent by the user to the application node with the normal state of the node server, writing the application node with the abnormal state of the node server into the abnormal node set, and sending the application node to the operation and maintenance management terminal.
Further, the intercepting the keyword of the network access request and determining the node query condition includes:
acquiring the mechanism information of a user according to a login request sent by the user;
and determining a corresponding node query condition according to the mechanism information of the user.
Further, the intercepting the keyword of the network access request and determining the node query condition further includes:
and determining a corresponding node query condition according to the application characteristic information in the application query request sent by the user.
Further, the determining a corresponding target probe link according to the initial probe link in the application node detail information includes:
judging whether the initial detection link is empty or not, if so, adopting a default detection link as a target detection link of each application node;
otherwise, splitting the IP set of the application server cluster nodes in the application node detail information, and determining the target detection link of each application node according to each application node IP obtained after splitting.
Further, the detecting network call for each application node included in the application node detail information according to the target detection link, and determining the node server state of each application node includes:
network calling detection is carried out on each application node according to the target detection link and detection parameters obtained from a preset database;
and determining the node server state of each application node according to the network calling detection result.
Further, the detecting network call for each application node included in the application node detail information according to the target detection link, and determining the node server state of each application node includes:
and if the unresponsive time length of the node server of the application node exceeds a detection timeout time preset parameter acquired from a preset database, judging that the state of the node server of the application node is abnormal.
Further, after the determining that the node server state of the application node is abnormal, the method further includes:
continuously detecting the application nodes with abnormal node server states according to the continuous detection times acquired from the preset database;
and if the unresponsive time length of the node server of the application node still exceeds the detection timeout time preset parameter acquired from the preset database, judging that the state of the node server of the application node is abnormal.
In a second aspect, the present application provides a server side state detection apparatus, including:
the node data acquisition module is used for intercepting keywords of the network access request, determining a node query condition, and calling a preset high-availability application node information table query interface according to the node query condition to obtain corresponding application node detail information;
a detection link determining module, configured to determine whether the application node detail information meets a detection condition, and if so, determine a corresponding target detection link according to an initial detection link in the application node detail information;
the multi-active detection module is used for carrying out network calling detection on each application node contained in the application node detail information according to the target detection link and determining the node server state of each application node;
and the state processing module is used for sending the service request sent by the user to the application node with the normal state of the node server, writing the application node with the abnormal state of the node server into the abnormal node set and sending the application node to the operation and maintenance management terminal.
In a third aspect, the present application provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement the steps of the server-side state detection method.
In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the steps of the server-side state detection method.
In a fifth aspect, the present application provides a computer program product comprising computer programs/instructions which, when executed by a processor, implement the steps of the server state detection method.
According to the technical scheme, the server state detection method and device are provided, the node query condition is determined by intercepting a keyword of a network access request, the preset high-availability application node information table query interface is called according to the node query condition to obtain corresponding application node detail information, then the corresponding target detection link is determined according to the initial detection link in the application node detail information, network calling detection is carried out on each application node contained in the application node detail information according to the target detection link, and the node server state of each application node is determined, so that back-end multi-activity detection can be accurately, flexibly and lightweighted.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flowchart of a server state detection method in an embodiment of the present application;
fig. 2 is a second schematic flowchart of a server-side status detection method in the embodiment of the present application;
fig. 3 is a third schematic flowchart of a server-side state detection method in the embodiment of the present application;
fig. 4 is a fourth schematic flowchart of a server-side state detection method in the embodiment of the present application;
fig. 5 is a fifth flowchart illustrating a server state detection method in the embodiment of the present application;
fig. 6 is a structural diagram of a server state detection apparatus in an embodiment of the present application;
fig. 7 is a schematic structural diagram of an electronic device in an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Considering that most of multi-active mechanisms in the prior art are part of load balancing application services, such as rear-end service health detection configuration of nginx upstream, WEB rear-end detection is carried out after application needs to be built, health check is carried out, abnormal application node servers are removed from a load list, flexible multi-level configuration customized local detection cannot be embedded into application codes, the application needs to be restarted after configuration is completed to be effective, the service can be interrupted, maintenance cost is increased after service change is deployed, and the method is not suitable for light-weight embedded rear-end service health detection with pertinence, the application provides a service end state detection method and a device, node query conditions are determined by intercepting keywords of network access requests, a preset high-available application node information table query interface is called according to the node query conditions, and corresponding application node detail information is obtained, and then, determining a corresponding target detection link according to the initial detection link in the application node detail information, performing network call detection on each application node contained in the application node detail information according to the target detection link, and determining the node server state of each application node, so that the back-end multi-activity detection can be accurately, flexibly and lightweighted.
In order to accurately, flexibly and lightweight detect the back-end multi-activity, the present application provides an embodiment of a server state detection method, and referring to fig. 1, the server state detection method specifically includes the following steps:
step S101: and intercepting keywords of the network access request, determining a node query condition, and calling a preset high-availability application node information table query interface according to the node query condition to obtain corresponding application node detail information.
Optionally, after the user accesses the system, the application feature information in the login information (e.g., login session) of the user may be obtained from the login information of the user, or the application feature information in the login information may be obtained from an application query request sent by the user, so as to serve as a node query condition of the corresponding application.
Optionally, the application characteristic information or the affiliated mechanism information may be an application name, an application mechanism short for name, or a corresponding IP address of a requested application, and node information of different application clusters at a back end is queried under the condition.
Optionally, the present application may invoke a query interface of a preset high-availability application node information table according to the obtained node query condition, so as to obtain corresponding application node detail information, where the application node detail information includes, but is not limited to: default local server node (ip), application server cluster node (clusterip), port (port), initial probe link (probe), and probe status information (status).
Step S102: judging whether the application node detail information meets a detection condition, if so, determining a corresponding target detection link according to an initial detection link in the application node detail information;
optionally, after the application node detail information is obtained, the application node detail information may further determine whether the application node detail information meets a detection condition, for example, determine whether a value of "whether detection information (status)" in the application node detail information is 1, and if the value of the detection information (status) is 1, the application request node needs health check to perform availability detection. If the value of the detection information (status) is 0, the local server node (ip) can be directly acquired for request forwarding.
Optionally, if the detection condition is met, the corresponding target detection link may be determined according to the initial detection link in the application node detail information, for example, splicing the target detection links, or adopting a default detection link.
For example, if the initial probe link (probe) is not empty, the IP set of the application server cluster node (clusterip) may be split, and for each application node IP, an independent probe URL is combined, and a plurality of probe URLs respectively spliced into IP + PORT + probe serve as target probe links of each application node.
If the initial probe link (probeurl) is empty, all server probe URLs of the application nodes can use the default probe link as the target probe link for each application node.
Step S103: and performing network call detection on each application node contained in the application node detail information according to the target detection link, and determining the node server state of each application node.
Optionally, the present application may execute multi-active probing on the node server of the application node according to the spliced target probing link.
Optionally, first, the method may call an interface to obtain detection parameters (for example, a detection timeout time setting parameter and a continuous detection number) from a database, and then, perform http call on a node server corresponding to the application sequentially through a spliced target detection link, so as to perform multi-activity detection. Meanwhile, the state of the server with http response in the 2xx state is judged to be normal, and the rest states are judged to be abnormal.
In other embodiments of the present application, if the http request of the probe is not responded beyond the probe time, the probe is forcibly ended, and the node is also determined to be abnormal.
Optionally, the application may traverse and detect all nodes corresponding to the application, store the detected healthy nodes in a healthy node set corresponding to the application, and place the abnormal nodes in an abnormal node set.
Step S104: and sending the service request sent by the user to the application node with the normal state of the node server, writing the application node with the abnormal state of the node server into the abnormal node set, and sending the application node to the operation and maintenance management terminal.
Optionally, the abnormal node information in the abnormal node set may notify the application node maintainer to process in time in a mail or alarm manner, and the abnormal application node may also be automatically included in the load requesting for offloading after recovery.
As can be seen from the above description, the server state detection method provided in the embodiment of the present application can determine a node query condition by intercepting a keyword for a network access request, and invoke a preset high-availability application node information table query interface according to the node query condition to obtain corresponding application node detail information, then determine a corresponding target detection link according to an initial detection link in the application node detail information, and perform network call detection on each application node included in the application node detail information according to the target detection link to determine a node server state of each application node, so that back-end multi-activity detection can be performed accurately, flexibly, and in a light weight manner.
In order to automatically and accurately join the node query conditions, in an embodiment of the method for detecting a server state in the present application, referring to fig. 2, the step S101 may further include the following steps:
step S201: and acquiring the mechanism information of the user according to the login request sent by the user.
Step S202: and determining a corresponding node query condition according to the mechanism information of the user.
Optionally, after the user accesses the system, the application feature information in the login information (e.g., login session) of the user may be obtained from the login information of the user, or the application feature information in the login information may be obtained from an application query request sent by the user, so as to serve as a node query condition of the corresponding application.
In order to automatically and accurately join the node query conditions, in an embodiment of the method for detecting a server state of the present application, the step S101 may further specifically include the following steps:
and determining a corresponding node query condition according to the application characteristic information in the application query request sent by the user.
In order to determine the corresponding target detection link, in an embodiment of the server-side state detection method of the present application, referring to fig. 3, the step S102 may further include the following steps:
step S301: and judging whether the initial detection link is empty or not, if so, adopting a default detection link as a target detection link of each application node.
Step S302: otherwise, splitting the IP set of the application server cluster nodes in the application node detail information, and determining the target detection link of each application node according to each application node IP obtained after splitting.
Optionally, if the detection condition is met, the corresponding target detection link may be determined according to the initial detection link in the application node detail information, for example, splicing the target detection links, or adopting a default detection link.
For example, if the initial probe link (probe) is not empty, the IP set of the application server cluster node (clusterip) may be split, and for each application node IP, an independent probe URL is combined, and a plurality of probe URLs respectively spliced into IP + PORT + probe serve as target probe links of each application node.
If the initial probe link (probeurl) is empty, all server probe URLs of the application nodes can use the default probe link as the target probe link for each application node.
In order to accurately determine the node server state, in an embodiment of the server state detection method of the present application, referring to fig. 4, the step S103 may further include the following steps:
step S401: and carrying out network call detection on each application node according to the target detection link and the detection parameters acquired from a preset database.
Step S402: and determining the node server state of each application node according to the network calling detection result.
Optionally, first, the method may call an interface to obtain detection parameters (for example, a detection timeout time setting parameter and a continuous detection number) from a database, and then, perform http call on a node server corresponding to the application sequentially through a spliced target detection link, so as to perform multi-activity detection. Meanwhile, the state of the server with http response in the 2xx state is judged to be normal, and the rest states are judged to be abnormal.
In order to accurately determine the node server state, in an embodiment of the method for detecting a server state of the present application, the step S103 may further include the following steps:
and if the unresponsive time length of the node server of the application node exceeds a detection timeout time preset parameter acquired from a preset database, judging that the state of the node server of the application node is abnormal.
In other embodiments of the present application, if the http request of the probe is not responded beyond the probe time, the probe is forcibly ended, and the node is also determined to be abnormal.
In order to accurately determine the node server state, in an embodiment of the server state detection method of the present application, referring to fig. 5, the step S103 may further include the following steps:
step S501: and continuously detecting the application nodes with abnormal node server states according to the continuous detection times acquired from the preset database.
Step S502: and if the unresponsive time length of the node server of the application node still exceeds the detection timeout time preset parameter acquired from the preset database, judging that the state of the node server of the application node is abnormal.
Optionally, for the application node determined to be abnormal, the application node may be continuously detected (for example, 3 times of detection) according to the number of continuous detection times (for example, 3 times) acquired from the preset database until the response time of the node server is normal, or all of the 3 times of detection are abnormal.
In order to accurately, flexibly and lightweight the backend multi-activity detection, the present application provides an embodiment of a server state detection apparatus for implementing all or part of the contents of the server state detection method, and referring to fig. 6, the server state detection apparatus specifically includes the following contents:
the node data obtaining module 10 is configured to intercept a keyword of the network access request, determine a node query condition, and call a preset high-availability application node information table query interface according to the node query condition to obtain corresponding application node detail information.
And a detection link determining module 20, configured to determine whether the application node detail information meets a detection condition, and if so, determine a corresponding target detection link according to an initial detection link in the application node detail information.
A multi-active detection module 30, configured to perform network call detection on each application node included in the application node detail information according to the target detection link, and determine a node server state of each application node.
And the state processing module 40 is configured to send a service request sent by a user to the application node with the normal node server state, write the application node with the abnormal node server state into the abnormal node set, and send the application node to the operation and maintenance management end.
As can be seen from the above description, the server state detection apparatus provided in the embodiment of the present application can determine a node query condition by intercepting a keyword for a network access request, and invoke a preset high-availability application node information table query interface according to the node query condition to obtain corresponding application node detail information, then determine a corresponding target detection link according to an initial detection link in the application node detail information, and perform network call detection on each application node included in the application node detail information according to the target detection link to determine a node server state of each application node, thereby being capable of performing back-end multi-activity detection accurately, flexibly, and with light weight.
In terms of hardware, in order to perform backend multi-activity detection accurately, flexibly, and in a light weight manner, the present application provides an embodiment of an electronic device for implementing all or part of the contents in the server state detection method, where the electronic device specifically includes the following contents:
a processor (processor), a memory (memory), a communication Interface (Communications Interface), and a bus; the processor, the memory and the communication interface complete mutual communication through the bus; the communication interface is used for realizing information transmission between the server state detection device and relevant equipment such as a core service system, a user terminal, a relevant database and the like; the logic controller may be a desktop computer, a tablet computer, a mobile terminal, and the like, but the embodiment is not limited thereto. In this embodiment, the logic controller may be implemented with reference to the embodiments of the server state detection method and the server state detection device in the embodiments, and the contents thereof are incorporated herein, and repeated descriptions are omitted.
It is understood that the user terminal may include a smart phone, a tablet electronic device, a network set-top box, a portable computer, a desktop computer, a Personal Digital Assistant (PDA), an in-vehicle device, a smart wearable device, and the like. Wherein, intelligence wearing equipment can include intelligent glasses, intelligent wrist-watch, intelligent bracelet etc..
In practical applications, part of the server state detection method may be executed on the electronic device side as described above, or all operations may be completed in the client device. The selection may be specifically performed according to the processing capability of the client device, the limitation of the user usage scenario, and the like. This is not a limitation of the present application. The client device may further include a processor if all operations are performed in the client device.
The client device may have a communication module (i.e., a communication unit), and may be communicatively connected to a remote server to implement data transmission with the server. The server may include a server on the task scheduling center side, and in other implementation scenarios, the server may also include a server on an intermediate platform, for example, a server on a third-party server platform that is communicatively linked to the task scheduling center server. The server may include a single computer device, or may include a server cluster formed by a plurality of servers, or a server structure of a distributed apparatus.
Fig. 7 is a schematic block diagram of a system configuration of an electronic device 9600 according to an embodiment of the present application. As shown in fig. 7, the electronic device 9600 can include a central processor 9100 and a memory 9140; the memory 9140 is coupled to the central processor 9100. Notably, this fig. 7 is exemplary; other types of structures may also be used in addition to or in place of the structure to implement telecommunications or other functions.
In one embodiment, the server-side state detection method function may be integrated into the central processor 9100. The central processor 9100 may be configured to control as follows:
step S101: and intercepting keywords of the network access request, determining a node query condition, and calling a preset high-availability application node information table query interface according to the node query condition to obtain corresponding application node detail information.
Step S102: judging whether the application node detail information meets a detection condition, if so, determining a corresponding target detection link according to an initial detection link in the application node detail information;
step S103: and performing network call detection on each application node contained in the application node detail information according to the target detection link, and determining the node server state of each application node.
Step S104: and sending the service request sent by the user to the application node with the normal state of the node server, writing the application node with the abnormal state of the node server into the abnormal node set, and sending the application node to the operation and maintenance management terminal.
As can be seen from the above description, in the electronic device provided in the embodiment of the present application, a node query condition is determined by intercepting a keyword for a network access request, a preset high-availability application node information table query interface is called according to the node query condition to obtain corresponding application node detail information, a corresponding target detection link is determined according to an initial detection link in the application node detail information, network call detection is performed on each application node included in the application node detail information according to the target detection link, and a node server state of each application node is determined, so that back-end multi-activity detection can be accurately, flexibly, and lightweight.
In another embodiment, the server state detection device may be configured separately from the central processing unit 9100, for example, the server state detection device may be configured as a chip connected to the central processing unit 9100, and the server state detection method function is realized by the control of the central processing unit.
As shown in fig. 7, the electronic device 9600 may further include: a communication module 9110, an input unit 9120, an audio processor 9130, a display 9160, and a power supply 9170. It is noted that the electronic device 9600 also does not necessarily include all of the components shown in fig. 7; further, the electronic device 9600 may further include components not shown in fig. 7, which may be referred to in the art.
As shown in fig. 7, a central processor 9100, sometimes referred to as a controller or operational control, can include a microprocessor or other processor device and/or logic device, which central processor 9100 receives input and controls the operation of the various components of the electronic device 9600.
The memory 9140 can be, for example, one or more of a buffer, a flash memory, a hard drive, a removable media, a volatile memory, a non-volatile memory, or other suitable device. The information relating to the failure may be stored, and a program for executing the information may be stored. And the central processing unit 9100 can execute the program stored in the memory 9140 to realize information storage or processing, or the like.
The input unit 9120 provides input to the central processor 9100. The input unit 9120 is, for example, a key or a touch input device. Power supply 9170 is used to provide power to electronic device 9600. The display 9160 is used for displaying display objects such as images and characters. The display may be, for example, an LCD display, but is not limited thereto.
The memory 9140 can be a solid state memory, e.g., Read Only Memory (ROM), Random Access Memory (RAM), a SIM card, or the like. There may also be a memory that holds information even when power is off, can be selectively erased, and is provided with more data, an example of which is sometimes called an EPROM or the like. The memory 9140 could also be some other type of device. Memory 9140 includes a buffer memory 9141 (sometimes referred to as a buffer). The memory 9140 may include an application/function storage portion 9142, the application/function storage portion 9142 being used for storing application programs and function programs or for executing a flow of operations of the electronic device 9600 by the central processor 9100.
The memory 9140 can also include a data store 9143, the data store 9143 being used to store data, such as contacts, digital data, pictures, sounds, and/or any other data used by an electronic device. The driver storage portion 9144 of the memory 9140 may include various drivers for the electronic device for communication functions and/or for performing other functions of the electronic device (e.g., messaging applications, contact book applications, etc.).
The communication module 9110 is a transmitter/receiver 9110 that transmits and receives signals via an antenna 9111. The communication module (transmitter/receiver) 9110 is coupled to the central processor 9100 to provide input signals and receive output signals, which may be the same as in the case of a conventional mobile communication terminal.
Based on different communication technologies, a plurality of communication modules 9110, such as a cellular network module, a bluetooth module, and/or a wireless local area network module, may be provided in the same electronic device. The communication module (transmitter/receiver) 9110 is also coupled to a speaker 9131 and a microphone 9132 via an audio processor 9130 to provide audio output via the speaker 9131 and receive audio input from the microphone 9132, thereby implementing ordinary telecommunications functions. The audio processor 9130 may include any suitable buffers, decoders, amplifiers and so forth. In addition, the audio processor 9130 is also coupled to the central processor 9100, thereby enabling recording locally through the microphone 9132 and enabling locally stored sounds to be played through the speaker 9131.
An embodiment of the present application further provides a computer-readable storage medium capable of implementing all the steps in the server-side state detection method in which an execution subject in the foregoing embodiment is a server or a client, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the computer program implements all the steps in the server-side state detection method in which the execution subject is the server or the client, for example, when the processor executes the computer program, the processor implements the following steps:
step S101: and intercepting keywords of the network access request, determining a node query condition, and calling a preset high-availability application node information table query interface according to the node query condition to obtain corresponding application node detail information.
Step S102: judging whether the application node detail information meets a detection condition, if so, determining a corresponding target detection link according to an initial detection link in the application node detail information;
step S103: and performing network call detection on each application node contained in the application node detail information according to the target detection link, and determining the node server state of each application node.
Step S104: and sending the service request sent by the user to the application node with the normal state of the node server, writing the application node with the abnormal state of the node server into the abnormal node set, and sending the application node to the operation and maintenance management terminal.
As can be seen from the above description, the computer-readable storage medium provided in the embodiment of the present application obtains corresponding application node detail information by intercepting a keyword for a network access request, determining a node query condition, and invoking a preset high-availability application node information table query interface according to the node query condition, then determines a corresponding target detection link according to an initial detection link in the application node detail information, and performs network call detection on each application node included in the application node detail information according to the target detection link, and determines a node server state of each application node, so that back-end multi-activity detection can be performed accurately, flexibly, and in a light weight manner.
Embodiments of the present application further provide a computer program product capable of implementing all steps in the server-side state detection method in which an execution subject in the foregoing embodiments is a server or a client, where the computer program/instruction when executed by a processor implements the steps of the server-side state detection method, for example, the computer program/instruction implements the following steps:
step S101: and intercepting keywords of the network access request, determining a node query condition, and calling a preset high-availability application node information table query interface according to the node query condition to obtain corresponding application node detail information.
Step S102: judging whether the application node detail information meets a detection condition, if so, determining a corresponding target detection link according to an initial detection link in the application node detail information;
step S103: and performing network call detection on each application node contained in the application node detail information according to the target detection link, and determining the node server state of each application node.
Step S104: and sending the service request sent by the user to the application node with the normal state of the node server, writing the application node with the abnormal state of the node server into the abnormal node set, and sending the application node to the operation and maintenance management terminal.
As can be seen from the above description, in the computer program product provided in the embodiment of the present application, a node query condition is determined by intercepting a keyword for a network access request, a preset high-availability application node information table query interface is called according to the node query condition to obtain corresponding application node detail information, a corresponding target detection link is determined according to an initial detection link in the application node detail information, network call detection is performed on each application node included in the application node detail information according to the target detection link, and a node server state of each application node is determined, so that back-end multi-activity detection can be accurately, flexibly, and lightweight.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (devices), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The principle and the implementation mode of the invention are explained by applying specific embodiments in the invention, and the description of the embodiments is only used for helping to understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (11)

1. A method for detecting a server state is characterized by comprising the following steps:
intercepting keywords of a network access request, determining a node query condition, and calling a preset high-availability application node information table query interface according to the node query condition to obtain corresponding application node detail information;
judging whether the application node detail information meets a detection condition, if so, determining a corresponding target detection link according to an initial detection link in the application node detail information;
network calling detection is carried out on each application node contained in the application node detail information according to the target detection link, and the node server state of each application node is determined;
and sending the service request sent by the user to the application node with the normal state of the node server, writing the application node with the abnormal state of the node server into the abnormal node set, and sending the application node to the operation and maintenance management terminal.
2. The method for detecting the state of the server side according to claim 1, wherein the intercepting the keyword from the network access request and determining the node query condition comprises:
acquiring the mechanism information of a user according to a login request sent by the user;
and determining a corresponding node query condition according to the mechanism information of the user.
3. The method for detecting the state of the server side according to claim 1, wherein the intercepting the keyword from the network access request and determining the node query condition further comprises:
and determining a corresponding node query condition according to the application characteristic information in the application query request sent by the user.
4. The method according to claim 1, wherein the determining a corresponding target probe link according to an initial probe link in the application node detail information includes:
judging whether the initial detection link is empty or not, if so, adopting a default detection link as a target detection link of each application node;
otherwise, splitting the IP set of the application server cluster nodes in the application node detail information, and determining the target detection link of each application node according to each application node IP obtained after splitting.
5. The method according to claim 1, wherein the performing network call detection on each application node included in the application node detail information according to the target detection link to determine the node server state of each application node comprises:
network calling detection is carried out on each application node according to the target detection link and detection parameters obtained from a preset database;
and determining the node server state of each application node according to the network calling detection result.
6. The method according to claim 4, wherein the performing network call detection on each application node included in the application node detail information according to the target detection link to determine the node server state of each application node comprises:
and if the unresponsive time length of the node server of the application node exceeds a detection timeout time preset parameter acquired from a preset database, judging that the state of the node server of the application node is abnormal.
7. The method according to claim 6, further comprising, after determining that the node server status of the application node is abnormal:
continuously detecting the application nodes with abnormal node server states according to the continuous detection times acquired from the preset database;
and if the unresponsive time length of the node server of the application node still exceeds the detection timeout time preset parameter acquired from the preset database, judging that the state of the node server of the application node is abnormal.
8. A server-side status detection apparatus, comprising:
the node data acquisition module is used for intercepting keywords of the network access request, determining a node query condition, and calling a preset high-availability application node information table query interface according to the node query condition to obtain corresponding application node detail information;
a detection link determining module, configured to determine whether the application node detail information meets a detection condition, and if so, determine a corresponding target detection link according to an initial detection link in the application node detail information;
the multi-active detection module is used for carrying out network calling detection on each application node contained in the application node detail information according to the target detection link and determining the node server state of each application node;
and the state processing module is used for sending the service request sent by the user to the application node with the normal state of the node server, writing the application node with the abnormal state of the node server into the abnormal node set and sending the application node to the operation and maintenance management terminal.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the steps of the server state detection method according to any one of claims 1 to 7 are implemented when the processor executes the program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the server state detection method according to any one of claims 1 to 7.
11. A computer program product comprising computer program/instructions, characterized in that the computer program/instructions, when executed by a processor, implement the steps of the server state detection method of any of claims 1 to 7.
CN202111582703.6A 2021-12-22 2021-12-22 Method and device for detecting state of server Active CN114257532B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111582703.6A CN114257532B (en) 2021-12-22 2021-12-22 Method and device for detecting state of server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111582703.6A CN114257532B (en) 2021-12-22 2021-12-22 Method and device for detecting state of server

Publications (2)

Publication Number Publication Date
CN114257532A true CN114257532A (en) 2022-03-29
CN114257532B CN114257532B (en) 2023-12-29

Family

ID=80794391

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111582703.6A Active CN114257532B (en) 2021-12-22 2021-12-22 Method and device for detecting state of server

Country Status (1)

Country Link
CN (1) CN114257532B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114928654A (en) * 2022-06-07 2022-08-19 中国工商银行股份有限公司 Node state monitoring method, device, equipment, storage medium and program product
CN115242687A (en) * 2022-07-20 2022-10-25 中国建设银行股份有限公司 Node activity detection method, device, equipment and medium
CN115242687B (en) * 2022-07-20 2024-04-19 中国建设银行股份有限公司 Node activity detection method, device, equipment and medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101971597A (en) * 2008-03-13 2011-02-09 思科技术公司 Stream server selection based on feedback information from a client
CN111338905A (en) * 2020-03-03 2020-06-26 中国工商银行股份有限公司 Application node data processing method and device
CN112737802A (en) * 2019-10-28 2021-04-30 中盈优创资讯科技有限公司 Internet private line management method and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101971597A (en) * 2008-03-13 2011-02-09 思科技术公司 Stream server selection based on feedback information from a client
CN112737802A (en) * 2019-10-28 2021-04-30 中盈优创资讯科技有限公司 Internet private line management method and system
CN111338905A (en) * 2020-03-03 2020-06-26 中国工商银行股份有限公司 Application node data processing method and device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114928654A (en) * 2022-06-07 2022-08-19 中国工商银行股份有限公司 Node state monitoring method, device, equipment, storage medium and program product
CN115242687A (en) * 2022-07-20 2022-10-25 中国建设银行股份有限公司 Node activity detection method, device, equipment and medium
CN115242687B (en) * 2022-07-20 2024-04-19 中国建设银行股份有限公司 Node activity detection method, device, equipment and medium

Also Published As

Publication number Publication date
CN114257532B (en) 2023-12-29

Similar Documents

Publication Publication Date Title
US9854032B2 (en) Context-aware task offloading among multiple devices
CN110177028B (en) Distributed health examination method and device
CN111031058A (en) Websocket-based distributed server cluster interaction method and device
CN104965848B (en) A kind of front end resource loading method and device
CN110297944B (en) Distributed XML data processing method and system
CN110764881A (en) Distributed system background retry method and device
CN111432001B (en) Method, apparatus, electronic device and computer readable medium for jumping scenes
CN110781373B (en) List updating method and device, readable medium and electronic equipment
CN112615753A (en) Link abnormity tracking method, first node, second node and link
CN111464352A (en) Call link data processing method and device
CN110716945A (en) Data updating method, data updating system, server and storage medium
CN114257532B (en) Method and device for detecting state of server
CN112468574B (en) Processing method, device and system for application service publishing and subscribing mechanism
CN112769945B (en) Distributed service calling method and device
CN112689012A (en) Cross-network proxy communication method and device
CN111813625B (en) Health checking method and device for distributed server cluster
CN109981778B (en) Method, device, equipment and storage medium for realizing service of content distribution network
CN111338905A (en) Application node data processing method and device
CN111782260A (en) Gray scale distribution method and gray scale distribution device
CN115914375A (en) Disaster tolerance processing method and device for distributed message platform
CN111767558B (en) Data access monitoring method, device and system
CN116185755A (en) Data processing method and device for distributed load balancing system
CN114697339A (en) Load balancing method and device under centralized architecture
CN113434423A (en) Interface test method and device
CN111782366A (en) Distributed task scheduling method and device

Legal Events

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