CN111064639A - Service state announcement method, device, equipment and storage medium - Google Patents

Service state announcement method, device, equipment and storage medium Download PDF

Info

Publication number
CN111064639A
CN111064639A CN201911313983.3A CN201911313983A CN111064639A CN 111064639 A CN111064639 A CN 111064639A CN 201911313983 A CN201911313983 A CN 201911313983A CN 111064639 A CN111064639 A CN 111064639A
Authority
CN
China
Prior art keywords
service
server
state
server side
service state
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
CN201911313983.3A
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.)
TCL China Star Optoelectronics Technology Co Ltd
Original Assignee
Shenzhen China Star Optoelectronics 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 China Star Optoelectronics Technology Co Ltd filed Critical Shenzhen China Star Optoelectronics Technology Co Ltd
Priority to CN201911313983.3A priority Critical patent/CN111064639A/en
Publication of CN111064639A publication Critical patent/CN111064639A/en
Pending legal-status Critical Current

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/10Active monitoring, e.g. heartbeat, ping or trace-route
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/16Threshold monitoring

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Health & Medical Sciences (AREA)
  • Cardiology (AREA)
  • General Health & Medical Sciences (AREA)
  • Debugging And Monitoring (AREA)
  • Computer And Data Communications (AREA)

Abstract

The embodiment of the application discloses a service state announcement method, a service state announcement device, electronic equipment and a storage medium. According to the technical scheme provided by the embodiment of the application, the heartbeat package is actively sent to the server side through the client side, the service state of the current server side is inquired, the state reply is carried out on the heartbeat package through the server side, the response package representing the current service state is returned, the response package identifies the normality or abnormality of the service state of the server side according to the set assignment rule, and after the client side receives the response package, the response package can be analyzed according to the set assignment rule, and the service state of the current server side is determined. By adopting the technical means, the real-time performance and the timeliness of the server service state bulletin are guaranteed by the mode of actively inquiring the heartbeat packet, and the service state inquiry reply of the heartbeat packet is carried out by the response packet, so that the cost of the information bulletin is reduced, and the data processing pressure of a server-side message system is further reduced.

Description

Service state announcement method, device, equipment and storage medium
Technical Field
The embodiment of the application relates to the technical field of data communication, in particular to a service status announcement method, a service status announcement device, electronic equipment and a storage medium.
Background
Servers are used in communication networks primarily to provide business computing or application services to clients. When the server has service abnormality, the server needs to inform the client of the current service abnormality condition in order to facilitate the client to know the service abnormality condition of the server. Currently, the method for informing the client of the service exception mainly includes: and actively sending a fault message to the client through the IM system, and informing the user of service abnormity through official networks, short messages or mail notifications and the like. Therefore, the user can be ensured to know about the abnormal service condition, and the user experience is optimized.
However, the service abnormality notification method for sending the fault information through the IM system requires the system to send a large number of messages in a short time, which has a high requirement on the performance of the message system and a relatively high cost. However, the abnormal service notification mode through official networks, short messages or mails generally has the problems of low information access rate, low information notification timeliness and the like.
Disclosure of Invention
The embodiment of the application provides a service state announcement method, a service state announcement device, electronic equipment and a storage medium, which can improve the timeliness of service abnormity notification and reduce the cost of service abnormity information announcement.
In a first aspect, an embodiment of the present application provides a service status announcement method, including:
sending a heartbeat packet to a server side, wherein the heartbeat packet is used for inquiring the service state of the server side at present;
receiving a response packet returned by the server side based on the state reply of the heartbeat packet, wherein the response packet identifies the normality or abnormality of the server side service state according to a set assignment rule;
and analyzing the response packet based on a set assignment rule, and determining the current service state of the server side.
Further, the step of identifying the normality or abnormality of the server side service state by the response packet according to a set assignment rule includes:
using a first state character and a second state character as state reply information to respectively identify the normality or abnormality of the server-side service state;
correspondingly, the analyzing the response packet based on the set assignment rule to determine the current service state of the server side includes:
analyzing the response packet, if the state reply information of the response packet is determined to be a first state character, judging that the service state of the server end is normal, and if the state reply information of the response packet is determined to be a second state character, judging that the service state of the server end is abnormal.
Further, after the determining that the service state of the server is abnormal, the method further includes:
and sending an abnormal detail request to the server, and pulling and displaying the abnormal detail from the server.
Further, the exception details include exception information of the server corresponding to the service module or exception information of the whole server.
Furthermore, the abnormal information of the corresponding service module includes corresponding abnormal grade information, and the abnormal grade information is set according to the service type of the current corresponding service module.
Further, after the server side is judged to have abnormal service state, the method further includes:
and receiving state recovery information actively sent by the server in real time, and determining that the service state of the server is recovered to be normal according to the state recovery information.
Further, after the analyzing the response packet based on the set assignment rule and determining the current service state of the server, the method further includes:
and continuously analyzing that the response packet reaches a set threshold value, and adjusting the sending period of the heartbeat packet when the service state of the server side is continuously abnormal.
Further, after the analyzing the response packet based on the set assignment rule and determining the current service state of the server, the method further includes:
and if the service state of the current server side is determined to be abnormal, sending an abnormal detail request to the server side, pulling the abnormal detail from the server side and displaying the abnormal detail.
In a second aspect, an embodiment of the present application provides a service status announcement apparatus, including:
the system comprises a sending module, a receiving module and a sending module, wherein the sending module is used for sending a heartbeat packet to a server side, and the heartbeat packet is used for inquiring the current service state of the server side;
the receiving module is used for receiving a response packet returned by the server side based on the state reply of the heartbeat packet, and the response packet identifies the normality or abnormality of the server side service state according to a set assignment rule;
and the determining module is used for analyzing the response packet based on a set assignment rule and determining the current service state of the server side.
Specifically, still include:
and the adjusting module is used for adjusting the sending period of the heartbeat packet when the response packet is continuously analyzed and the service state of the server side is continuously abnormal.
In a third aspect, an embodiment of the present application provides an electronic device, including:
a memory and one or more processors;
the memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the service status announcement method as described in the first aspect.
In a fourth aspect, embodiments of the present application provide a storage medium containing computer-executable instructions for performing the service status announcement method according to the first aspect when executed by a computer processor.
According to the embodiment of the application, the heartbeat packet is actively sent to the server side through the client side, the service state of the current server side is inquired, the state reply is carried out on the heartbeat packet through the server side, the response packet representing the current service state is returned, the response packet identifies the normality or abnormality of the service state of the server side according to the set assignment rule, after the client side receives the response packet, the response packet can be analyzed according to the set assignment rule, and the service state of the current server side is determined. By adopting the technical means, the real-time performance and the timeliness of the server service state bulletin are guaranteed by the mode of actively inquiring the heartbeat packet, and the service state inquiry reply of the heartbeat packet is carried out by the response packet so as to reduce the cost of the information bulletin.
In addition, the response packet is sent and analyzed based on the set assignment rule, the condition that a server side needs to send a large amount of notice information when the server side services abnormal notices is avoided, the data processing pressure of a server side message system is further reduced, and the operation efficiency of the server side is optimized.
Drawings
Fig. 1 is a flowchart of a service status announcement method according to an embodiment of the present application;
FIG. 2 is a flow chart of service status exception handling in an embodiment of the present application;
fig. 3 is a flowchart of another service status announcement method provided in the second embodiment of the present application;
fig. 4 is a schematic structural diagram of a service status notification apparatus according to a third embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, specific embodiments of the present application will be described in detail with reference to the accompanying drawings. It is to be understood that the specific embodiments described herein are merely illustrative of the application and are not limiting of the application. It should be further noted that, for the convenience of description, only some but not all of the relevant portions of the present application are shown in the drawings. 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 operations (or steps) as a sequential process, many of the operations can be performed in parallel, concurrently or simultaneously. In addition, the order of the operations may be re-arranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figure. The processes may correspond to methods, functions, procedures, subroutines, and the like.
The service state announcement method aims to inquire the current service state of the server by actively sending a heartbeat packet through the client, and determine the service state of the server according to a response packet returned by the server. Therefore, the real-time performance and the timeliness of the server service state information announcement are guaranteed. And when the server side feeds back the response packet, the server side respectively represents normal or abnormal two different state reply messages of the server side service state by using '0' or '1' according to a preset assignment rule, so that the data processing pressure of a server side message system is relieved, and the data volume of the notice messages when the service state is abnormal is reduced. Compared with the existing announcement mode of server service state abnormity, no matter the service state abnormity information is sent through the IM system or the service state abnormity information is sent through a short message or mail mode, the server side is required to send a large amount of announcement information when the server is abnormal, and the cost is relatively high. And the mode of announcement through the official website cannot ensure the reaching rate of the abnormal server state information, so that the user cannot know the abnormal server state information in the first time. Based on the above, the service state announcement method provided by the embodiment of the application is provided to solve the technical problems of poor real-time performance and timeliness and high announcement cost of the existing server service state announcement method.
The first embodiment is as follows:
fig. 1 is a flowchart of a service status announcement method according to an embodiment of the present application, where the service status announcement method provided in this embodiment may be executed by a service status announcement device, and the service status announcement device may be implemented by software and/or hardware. Generally, the service status notification device may be a client device such as a computer, a mobile phone, a tablet, etc.
The following description will be given taking a service status announcement device as an example of a main body for executing the service status announcement method. Referring to fig. 1, the service status announcement method specifically includes:
s110, sending a heartbeat packet to a server side, wherein the heartbeat packet is used for inquiring the service state of the server side at present.
Specifically, the heartbeat is a mode for detecting whether a system is alive or not or whether a network link is unobstructed or not, and the method includes that a heartbeat packet is sent to a detected system at regular time, the detected system receives the heartbeat packet to reply, and the reply is received to indicate that the opposite side is alive. Meanwhile, when the heartbeat packet is received, the survival of the sender can be determined. In a communication link between a server and a client, the server can determine whether the client is alive (online) by receiving a heartbeat packet of the client, and can determine that the client is offline if the server does not receive the heartbeat packet of the client within a certain time period, and the server performs data cleaning corresponding to the client at the moment and releases resources allocated to the client before. It can be understood that when the client is online to communicate with the server, the client will periodically send heartbeat packets to notify itself of the current "alive" status. According to the embodiment of the application, by utilizing the characteristic of the communication network between the server side and the client side, when the client side sends the heartbeat packet to indicate the current state of the client side, the service state of the current server side is inquired through the heartbeat packet. When the server side service state query is performed, query information can be inserted into the heartbeat packet to perform the query of the service state. Or automatically replying the service state when the heartbeat packet is received by the setting server terminal.
It should be noted that the server replies to the current service state corresponding to the heartbeat packet based on whether the service state of each service module of the server is normal or not, rather than replying to whether the server is disconnected or not. It can be understood that when the server and the client are disconnected or shut down, the server and the client cannot receive a reply based on the heartbeat packet from the other party, and therefore, if the heartbeat packet sent by the client does not receive the reply within a set time, it is considered that the communication link between the client and the server is interrupted, which may be caused by the shutdown of the server, an abnormal communication link, or interference. At the moment, the client feeds back information of the connection interruption between the user and the server, and prompts the user to reconnect or perform other related operations.
And S120, receiving a response packet returned by the server side based on the state reply of the heartbeat packet, wherein the response packet identifies the normality or abnormality of the service state of the server side according to a set assignment rule.
Further, after receiving the heartbeat packet, the server detects whether the service state of the server is normal, and performs state reply on the heartbeat packet according to a detection result to generate a corresponding response packet. In the embodiment of the application, when the state reply information is generated according to the service state detection result, the state reply information is set by using a preset assignment rule. Specifically, the first state character and the second state character are used as state reply information to respectively identify the normality or abnormality of the server-side service state. The first status character and the second status character may be characters of many different forms, according to actual needs. The present application uses binary characters "0" and "1" as the first and second status characters. Binary characters "0" and "1" are the minimum units of information storage, and the capacity of status reply information can be effectively reduced by using the binary characters. If the service state of the server is normal, the state reply information is assigned with '0' based on a preset assignment rule, and if the service state of the server is abnormal, the state reply information is assigned with '1' based on a preset assignment rule. It should be noted that the assignment rule of the status reply message may be regarded as an assignment rule agreed in advance between the client and the server, so that the client can determine the meaning of the response packet according to the preset assignment rule when receiving the response packet.
And the server side returns a response packet generated according to the service state detection result to the client side in real time, and after receiving the response packet, the client side can determine that the server is alive (online) according to the response of the server side. Similarly, when the server receives the heartbeat packet before, the survival state of the client can be determined. Therefore, the process that the server side and the client side determine whether to live or not based on the heartbeat mechanism is completed. On the other hand, the embodiment of the application is based on a heartbeat mechanism between the server side and the client side, and whether the service state of the server side is normal or not is further determined through a response packet returned by the server side, so that the server side can announce the service state of the server side. The server side service state announcement is carried out by utilizing the original heartbeat mechanism, so that the sending of information is reduced, and the real-time performance and the timeliness of the client side for receiving the server side service state information are ensured.
It can be understood that, because the client executes the heartbeat mechanism when the client is online, the server service state is announced on the basis of the heartbeat mechanism in the embodiment of the application, and it can be ensured that each online user can receive the service state information of the server in real time, thereby avoiding the situation that the user cannot know the server service state abnormality in time and ensuring the high touch rate of the service state information.
S130, analyzing the response packet based on the set assignment rule, and determining the service state of the current server side.
Specifically, based on the response packet obtained in step S120, the response packet is further analyzed to determine the current service state of the server while determining that the server is alive. When the response packet is analyzed, based on a preset assignment rule, if the state reply information of the response packet is determined to be '0', the service state of the server side is judged to be normal, and if the state reply information of the response packet is determined to be '1', the service state of the server side is judged to be abnormal. Because the service state of the server is represented by '0' or '1', the server can send less announcement information to inform the client of the current service state of the server when the state reply information is sent, so that the information processing pressure of a server message system is relieved, and the operation efficiency of the server is improved. It should be noted that, in the embodiment of the present application, no fixed limitation is imposed on the abnormal condition that "0" or "1" is specifically used to represent the service state of the server side, and a preset assignment rule is specifically used as a standard. It can be understood that, according to the preset assignment rule, if "0" is set to indicate that the server service state is abnormal, then "1" indicates that the server service state is normal.
And under the condition that the service state is determined to be normal, the client side operates normally, the client side can send a service request to the server side in real time, and the service request is responded through a relevant service module of the server side. And if the service state of the server side is judged to be abnormal, the client side further carries out corresponding processing corresponding to the abnormal condition of the service state of the server side. Referring to fig. 2, the service status exception handling process includes:
s1301, if the state reply information of the response packet is determined to be '1', the service state of the server side is judged to be abnormal.
S1302, sending an abnormal detail request to the server, and pulling and displaying the abnormal detail from the server.
Specifically, the state reply information replied to "1" is obtained corresponding to the analysis response packet, and it is determined that the server side has an abnormal service state. The server side obtains the abnormal details corresponding to the abnormal condition of the service state by sending an abnormal detail request. The exception details may specifically include exception information of a service module corresponding to the server side or exception information of the entire server side. It can be understood that, if a server is abnormal due to a server side running and the like, the abnormality details include abnormality information of the entire server side. If the service state of a certain service module is abnormal, the abnormal details comprise abnormal information of the corresponding service module. The server side sets corresponding business modules corresponding to different business services of the client side, so that a user can know specific abnormal conditions of the service state conveniently, the server side can determine the abnormal service state of a certain business module, and the abnormal details are sent to the client side. And when the abnormal information corresponding to the business module is sent, different abnormal grades are set corresponding to the abnormal information, and the abnormal grades are set according to the business service types which can be currently responded by the corresponding business module. If the number of the service types that can be executed by the corresponding service module is less, the exception level is higher. The server can set the abnormal grade in advance according to the service type of the service which can be executed by the service module in the abnormal service state.
Taking the WeChat client as an example, when the service state of the business module corresponding to the friend circle is abnormal, the client displays the prompt information of abnormal use of the friend circle from the abnormal details pulled by the server. According to the abnormal details, the user can know the abnormal use condition of the friend circle, so that the use experience of the user is optimized, and the abnormal use condition of the friend circle is informed in advance to avoid the condition that the use experience is influenced when the user uses the device. The WeChat friend circle comprises business service types such as friend circle viewing, comment and approval. And if the friend circle is determined to have abnormal service state, based on the business service types, if the more business service types still can be used, the lower the abnormal level of the friend circle is. Conversely, if the service types which can still be used are less, the abnormal level of the friend circle is higher. Finally, according to the abnormal level of the friend circle, whether the business module of the current corresponding friend circle is completely unusable or partly usable can be determined, so that the abnormal details of the business module can be displayed in more detail. In addition, when the server side feeds back the abnormal details, the server side can further feed back which part of the business service types of the corresponding business modules are abnormal and cannot be normally used, so that a user can know the fault condition of the relevant business service of the client side more clearly.
In addition, after the server feeds back the abnormal details, whether the service module with the abnormal service state or the whole server side returns to normal or not is detected in real time. When the corresponding service module is recovered to be normal, the server sends state recovery information to the client in real time, and the client can determine that the service state of the server is recovered to be normal according to the state recovery information. Therefore, the service state condition of the current server side of the client side is prompted in real time, so that a user can know whether the related service of the client side can be normally used in real time, and the use experience of the user is further optimized.
The heartbeat packet is actively sent to the server side through the client side, the service state of the current server side is inquired, the state reply is carried out on the heartbeat packet through the server side, a response packet representing the current service state is returned, the response packet respectively represents the normality or the abnormality of the service state of the server side by using '0' or '1' according to the set assignment rule, and after the client side receives the response packet, the response packet can be analyzed according to the set assignment rule, and the service state of the current server side is determined. By adopting the technical means, the real-time performance and the timeliness of the server service state bulletin are guaranteed by the mode of actively inquiring the heartbeat packet, and the service state inquiry reply of the heartbeat packet is carried out by the response packet so as to reduce the cost of the information bulletin. In addition, the response packet is sent and analyzed based on the set assignment rule, the condition that a server side needs to send a large amount of notice information when the server side services abnormal notices is avoided, the data processing pressure of a server side message system is further reduced, and the operation efficiency of the server side is optimized.
Example two:
based on the foregoing embodiments, fig. 3 is a flowchart of another service status announcement method provided in the second embodiment of the present application. Referring to fig. 3, the service status announcement method provided in this embodiment specifically includes:
s210, sending a heartbeat packet to a server side, wherein the heartbeat packet is used for inquiring the service state of the server side at present;
s220, receiving a response packet returned by the server end based on the state reply of the heartbeat packet, wherein the response packet respectively represents the normality or the abnormality of the service state of the server end by using '0' or '1' according to a set assignment rule;
s230, analyzing the response packet based on a set assignment rule, and determining the service state of the current server side;
s240, continuously analyzing the response packet to reach a set threshold value, and adjusting the sending period of the heartbeat packet when the service state of the server side is continuously abnormal.
After the service state of the server is determined, a heartbeat packet is sent every other set period to inquire the service state of the server, a response packet returned by the server is received, and the response packet is analyzed to determine the service state of the server in the heartbeat period. When the continuous analysis response packet reaches the set threshold value and the determined service states are all server side service state abnormity, the power consumption of the client side is prevented from being influenced by the fact that the client side frequently sends heartbeat packets, and data processing pressure of the server side is reduced. The client adjusts the sending period of the heartbeat packet to be longer by adjusting the sending period of the heartbeat packet, so that the sending time interval of the heartbeat packet is longer.
Furthermore, after the service state of the server side is recovered to be normal, the client side can adjust the sending period of the heartbeat packet again, the sending period of the heartbeat packet is recovered to be the original sending period, and the sending time interval of the heartbeat packet is shortened so as to ensure the real-time performance and the timeliness of the service state notice of the server side.
Example three:
based on the above embodiments, fig. 4 is a schematic structural diagram of a service status announcement device according to a third embodiment of the present application. Referring to fig. 4, the service status announcement apparatus provided in this embodiment specifically includes: a sending module 31, a receiving module 32 and a determining module 33.
The sending module 31 is configured to send a heartbeat packet to a server, where the heartbeat packet is used to inquire a current service state of the server;
the receiving module 32 is configured to receive a response packet returned by the server side after performing a state reply based on the heartbeat packet, where the response packet identifies a normal or abnormal service state of the server side according to a set assignment rule;
the determining module 33 is configured to analyze the response packet based on a set assignment rule, and determine a current service state of the server.
The heartbeat packet is actively sent to the server side through the client side, the service state of the current server side is inquired, the state reply is carried out on the heartbeat packet through the server side, a response packet representing the current service state is returned, the response packet respectively represents the normality or the abnormality of the service state of the server side by using '0' or '1' according to the set assignment rule, and after the client side receives the response packet, the response packet can be analyzed according to the set assignment rule, and the service state of the current server side is determined. By adopting the technical means, the real-time performance and the timeliness of the server service state bulletin are guaranteed by the mode of actively inquiring the heartbeat packet, and the service state inquiry reply of the heartbeat packet is carried out by the response packet so as to reduce the cost of the information bulletin. In addition, the response packet is sent and analyzed based on the set assignment rule, the condition that a server side needs to send a large amount of notice information when the server side services abnormal notices is avoided, the data processing pressure of a server side message system is further reduced, and the operation efficiency of the server side is optimized.
Specifically, still include:
and the adjusting module is used for adjusting the sending period of the heartbeat packet when the response packet is continuously analyzed and the service state of the server side is continuously abnormal.
Specifically, the determining module 33 includes:
and the abnormity determining unit is used for determining that the state reply information of the response packet is '1', and then judging that the service state of the server side is abnormal.
And the detail request unit is used for sending an abnormal detail request to the server side, pulling the abnormal detail from the server side and displaying the abnormal detail.
The service status announcement device provided by the third embodiment of the present application can be used for executing the service status announcement methods provided by the first and second embodiments, and has corresponding functions and beneficial effects.
Example four:
an embodiment of the present application provides an electronic device, and with reference to fig. 5, the electronic device includes: a processor 41, a memory 42, a communication module 43, an input device 44, and an output device 45. The number of processors in the electronic device may be one or more, and the number of memories in the electronic device may be one or more. The processor 41, the memory 42, the communication module 43, the input device 44 and the output device 45 of the electronic device may be connected by a bus or other means.
The memory 42, which is a computer-readable storage medium, can be used for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the service status announcement method described in any embodiment of the present application (e.g., the sending module, the receiving module, and the determining module in the service status announcement device). The memory can mainly comprise a program storage area and a data storage area, wherein the program storage area can store an operating system and an application program required by at least one function; the storage data area may store data created according to use of the device, and the like. Further, the memory may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, the memory may further include memory located remotely from the processor, and these remote memories may be connected to the device over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The communication module 43 is used for data transmission.
The processor 41 executes various functional applications of the device and data processing, i.e., implements the service status announcement method described above, by executing software programs, instructions, and modules stored in the memory.
The input device 44 is operable to receive input numeric or character information and to generate key signal inputs relating to user settings and function controls of the apparatus. The output device 45 may include a display device such as a display screen.
The electronic device provided by the above can be used to execute the service status announcement method provided by the above first embodiment and second embodiment, and has corresponding functions and beneficial effects.
Example five:
embodiments of the present application also provide a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform a service status announcement method, the service status announcement method comprising: sending a heartbeat packet to a server side, wherein the heartbeat packet is used for inquiring the service state of the server side at present; receiving a response packet returned by the server side based on the state reply of the heartbeat packet, wherein the response packet respectively represents the normal or abnormal service state of the server side by using '0' or '1' according to a set assignment rule; and analyzing the response packet based on a set assignment rule, and determining the current service state of the server side.
Storage medium-any of various types of memory devices or storage devices. The term "storage medium" is intended to include: mounting media such as CD-ROM, floppy disk, or tape devices; computer system memory or random access memory such as DRAM, DDR RAM, SRAM, EDO RAM, Lanbas (Rambus) RAM, etc.; non-volatile memory such as flash memory, magnetic media (e.g., hard disk or optical storage); registers or other similar types of memory elements, etc. The storage medium may also include other types of memory or combinations thereof. In addition, the storage medium may be located in a first computer system in which the program is executed, or may be located in a different second computer system connected to the first computer system through a network (such as the internet). The second computer system may provide program instructions to the first computer for execution. The term "storage medium" may include two or more storage media residing in different locations, e.g., in different computer systems connected by a network. The storage medium may store program instructions (e.g., embodied as a computer program) that are executable by one or more processors.
Of course, the storage medium provided in the embodiments of the present application contains computer-executable instructions, and the computer-executable instructions are not limited to the service status announcement method described above, and may also perform related operations in the service status announcement method provided in any embodiments of the present application.
The service status announcement device, the storage medium, and the electronic device provided in the above embodiments may execute the service status announcement method provided in any embodiment of the present application, and reference may be made to the service status announcement method provided in any embodiment of the present application without detailed technical details described in the above embodiments.
The foregoing is considered as illustrative of the preferred embodiments of the invention and the technical principles employed. The present application 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 application has been described in more detail with reference to the above embodiments, the present application is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present application, and the scope of the present application is determined by the scope of the claims.

Claims (11)

1. A service status advertisement method, comprising:
sending a heartbeat packet to a server side, wherein the heartbeat packet is used for inquiring the service state of the server side at present;
receiving a response packet returned by the server side based on the state reply of the heartbeat packet, wherein the response packet identifies the normality or abnormality of the server side service state according to a set assignment rule;
and analyzing the response packet based on a set assignment rule, and determining the current service state of the server side.
2. The service status announcement method according to claim 1, wherein the identifying, by the response packet, whether the server side service status is normal or abnormal according to a set assignment rule includes:
using a first state character and a second state character as state reply information to respectively identify the normality or abnormality of the server-side service state;
correspondingly, the analyzing the response packet based on the set assignment rule to determine the current service state of the server side includes:
analyzing the response packet, if the state reply information of the response packet is determined to be a first state character, judging that the service state of the server end is normal, and if the state reply information of the response packet is determined to be a second state character, judging that the service state of the server end is abnormal.
3. The service status advertisement method according to claim 2, further comprising, after the determining that the service status of the server is abnormal:
and sending an abnormal detail request to the server, and pulling and displaying the abnormal detail from the server.
4. The service status advertisement method according to claim 3, wherein the exception details include exception information of the server corresponding to the service module or exception information of the entire server.
5. The service status announcement method of claim 4 wherein the exception information of the corresponding service module includes corresponding exception level information, and the exception level information is set according to a service type of the service of the current corresponding service module.
6. The service status advertisement method according to claim 2, further comprising, after determining that the service status of the server is abnormal:
and receiving state recovery information actively sent by the server in real time, and determining that the service state of the server is recovered to be normal according to the state recovery information.
7. The service status announcement method according to any one of claims 1 to 6, further comprising, after parsing the response packet based on the set assignment rule and determining the current service status of the server side:
and continuously analyzing that the response packet reaches a set threshold value, and adjusting the sending period of the heartbeat packet when the service state of the server side is continuously abnormal.
8. The service status advertisement method according to claim 1, wherein after the analyzing the response packet based on the set assignment rule and determining the current service status of the server, the method further comprises:
and if the service state of the current server side is determined to be abnormal, sending an abnormal detail request to the server side, pulling the abnormal detail from the server side and displaying the abnormal detail.
9. A service status announcement apparatus, comprising:
the system comprises a sending module, a receiving module and a sending module, wherein the sending module is used for sending a heartbeat packet to a server side, and the heartbeat packet is used for inquiring the current service state of the server side;
the receiving module is used for receiving a response packet returned by the server side based on the state reply of the heartbeat packet, and the response packet identifies the normality or abnormality of the server side service state according to a set assignment rule;
and the determining module is used for analyzing the response packet based on a set assignment rule and determining the current service state of the server side.
10. An electronic device, comprising:
a memory and one or more processors;
the memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the service status advertisement method of any of claims 1-8.
11. A storage medium containing computer-executable instructions for performing the service status announcement method of any one of claims 1-8 when executed by a computer processor.
CN201911313983.3A 2019-12-19 2019-12-19 Service state announcement method, device, equipment and storage medium Pending CN111064639A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911313983.3A CN111064639A (en) 2019-12-19 2019-12-19 Service state announcement method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911313983.3A CN111064639A (en) 2019-12-19 2019-12-19 Service state announcement method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111064639A true CN111064639A (en) 2020-04-24

Family

ID=70301141

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911313983.3A Pending CN111064639A (en) 2019-12-19 2019-12-19 Service state announcement method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111064639A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112994934A (en) * 2021-02-07 2021-06-18 杭州迪普科技股份有限公司 Data interaction method, device and system
CN115022393A (en) * 2022-05-11 2022-09-06 杭州网易云音乐科技有限公司 Method, apparatus, medium, and computing device for determining connection status

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103391303A (en) * 2012-05-09 2013-11-13 腾讯科技(深圳)有限公司 Service fault noticing method and server using same
CN104734896A (en) * 2013-12-18 2015-06-24 青岛海尔空调器有限总公司 Method and system for acquiring running situations of service sub-systems
CN106534378A (en) * 2016-12-29 2017-03-22 宁波金网信息产业股份有限公司 Health index monitoring system for Web application
CN109586989A (en) * 2017-09-28 2019-04-05 阿里巴巴集团控股有限公司 A kind of state detection method, device and group system
CN109887125A (en) * 2019-02-02 2019-06-14 北京主线科技有限公司 Fault detection method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103391303A (en) * 2012-05-09 2013-11-13 腾讯科技(深圳)有限公司 Service fault noticing method and server using same
CN104734896A (en) * 2013-12-18 2015-06-24 青岛海尔空调器有限总公司 Method and system for acquiring running situations of service sub-systems
CN106534378A (en) * 2016-12-29 2017-03-22 宁波金网信息产业股份有限公司 Health index monitoring system for Web application
CN109586989A (en) * 2017-09-28 2019-04-05 阿里巴巴集团控股有限公司 A kind of state detection method, device and group system
CN109887125A (en) * 2019-02-02 2019-06-14 北京主线科技有限公司 Fault detection method and device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112994934A (en) * 2021-02-07 2021-06-18 杭州迪普科技股份有限公司 Data interaction method, device and system
CN112994934B (en) * 2021-02-07 2023-02-10 杭州迪普科技股份有限公司 Data interaction method, device and system
CN115022393A (en) * 2022-05-11 2022-09-06 杭州网易云音乐科技有限公司 Method, apparatus, medium, and computing device for determining connection status
CN115022393B (en) * 2022-05-11 2024-05-17 杭州网易云音乐科技有限公司 Method, device, medium and computing equipment for determining connection state

Similar Documents

Publication Publication Date Title
EP2736200B1 (en) Transmission of notifications to multiple devices associated with a user
US20180270182A1 (en) Message notification method, system, and device for a communication account
US10404633B2 (en) Enhanced video instant messaging processing
CN104579912B (en) Data pushing method and device
CN113067882A (en) Message processing method and device, electronic equipment and medium
CN104967537A (en) Alarm information pushing method and device
CN115004673B (en) Message pushing method, device, electronic equipment and computer readable medium
US8386559B2 (en) Method for exchanging requests between the computer application of a mobile terminal and an instantaneous messaging server
CN111694674A (en) Message distribution processing method, device, equipment and storage medium
CN111064639A (en) Service state announcement method, device, equipment and storage medium
CN108880972B (en) Information processing method, server and terminal
WO2023222109A1 (en) Network wakeup management method and apparatus, electronic device, and storage medium
WO2014108913A1 (en) Choosing a service to provide a message
CN106685800A (en) Information prompting method and device
CN110809262B (en) COAP protocol-based operation and maintenance management method for Internet of things equipment
CN106411713B (en) State notification method and server
CN112838980B (en) Message processing method, system, device, electronic equipment and storage medium
CN111262731B (en) Alarm method, alarm device, server equipment and storage medium
CN111835578B (en) Information transmission management method, information transmission management apparatus, and readable storage medium
CN114520827B (en) Message receiving method, pushing method, system and medium
CN113014404B (en) Message transmission method and device, server and second client
CN110233744B (en) Conference state display method, conference state updating method and device
CN113965495A (en) Method and device for detecting activity of terminal application program, electronic equipment and storage medium
WO2020107208A1 (en) Failure notification method and device, and apparatus
CN106604244B (en) Method and device for prompting notification message

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200424