CN117336213B - Subsystem monitoring method, system and equipment - Google Patents

Subsystem monitoring method, system and equipment Download PDF

Info

Publication number
CN117336213B
CN117336213B CN202311632656.0A CN202311632656A CN117336213B CN 117336213 B CN117336213 B CN 117336213B CN 202311632656 A CN202311632656 A CN 202311632656A CN 117336213 B CN117336213 B CN 117336213B
Authority
CN
China
Prior art keywords
subsystem
api request
information
heartbeat
equipment
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.)
Active
Application number
CN202311632656.0A
Other languages
Chinese (zh)
Other versions
CN117336213A (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.)
Sichuan Caizisoft Information Network Co ltd
Original Assignee
Sichuan Caizisoft Information Network 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 Sichuan Caizisoft Information Network Co ltd filed Critical Sichuan Caizisoft Information Network Co ltd
Priority to CN202311632656.0A priority Critical patent/CN117336213B/en
Publication of CN117336213A publication Critical patent/CN117336213A/en
Application granted granted Critical
Publication of CN117336213B publication Critical patent/CN117336213B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • 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/0811Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking connectivity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/143Termination or inactivation of sessions, e.g. event-controlled end of session
    • H04L67/145Termination or inactivation of sessions, e.g. event-controlled end of session avoiding end of session, e.g. keep-alive, heartbeats, resumption message or wake-up for inactive or interrupted session

Abstract

The application discloses a subsystem monitoring method, a system and a device, wherein after the subsystem monitoring method, the system and the device are connected with subsystem equipment, when an API request sent by the subsystem equipment is received, heartbeat detection configuration information corresponding to the API request is formulated according to different characteristics of the received API request, and during the process of responding to the API request to provide service for the subsystem equipment, a heartbeat detection process is created according to the heartbeat detection configuration information so as to detect the connection between a server and the subsystem equipment during the process of responding to the API request to provide service for the subsystem equipment. And simultaneously, when the API request is ended, terminating the heartbeat detection process, and after receiving a new API request, re-creating a new heartbeat detection process according to the new API request. The proposal can adapt different heartbeat detection parameters according to different API requests, has strong adaptability and low occupation of system resources, and solves the problem that the existing heartbeat period is difficult to meet various application scenes.

Description

Subsystem monitoring method, system and equipment
Technical Field
The present application relates to the field of internet technologies, and in particular, to a subsystem monitoring method, system, and device.
Background
The terminal equipment or the subsystem in the network can ensure the smoothness of communication connection by actively responding to the polling check of the server or periodically sending the heartbeat period of the detection message to the server. The network management system carries out periodic information exchange through the heartbeat cycle of the detection message, the terminal equipment or the subsystem sends the heartbeat cycle of the detection message to the server, and under the condition that the communication connection is normal, the server receives the heartbeat cycle of the detection message and considers that the link between the server and the terminal equipment or the subsystem is normal; if the server does not receive the heartbeat period of the detection message of the terminal equipment or the subsystem due to the abnormality of the terminal equipment or the subsystem or the abnormality of the communication link, the communication connection between the server and the terminal equipment or the subsystem is indicated to be faulty.
Currently, distributed systems generally employ heartbeat detection to discover failed terminal devices or subsystems to ensure that tasks on the distributed system are operating properly. However, the heartbeat period of the existing heartbeat detection is difficult to set, and the heartbeat period is generally set to be a fixed length, but the period is often difficult to meet various application scenes.
Disclosure of Invention
The invention provides a subsystem monitoring method, a system and equipment, which at least solve the problems that the heartbeat period of the existing heartbeat detection is difficult to set, the heartbeat period is generally set to be of a fixed length, but the period is difficult to meet various application scenes.
A subsystem monitoring method, comprising:
establishing a network connection with the subsystem equipment;
receiving a first API request sent by the subsystem equipment, wherein the first API request is generated by the subsystem equipment according to a first instruction input by a user;
providing a first service to the subsystem device in response to the first API request;
according to the first API request, during the process of providing the first service, performing connection detection on the subsystem equipment through a first heartbeat detection process matched with the first API request;
when the connection and disconnection with the subsystem equipment are detected, generating first alarm information and sending the first alarm information to a designated terminal;
and responding to a first API termination request sent by the subsystem equipment, and terminating the first heartbeat detection process.
Optionally, a network connection with the subsystem device is established by configuring a monitoring Socket.
Optionally, the method further includes a monitoring platform running locally, and during the providing of the first service according to the first API request, the step of performing connection detection on the subsystem device through a first heartbeat detection process matched with the first API request includes:
acquiring first API request information according to the first API request;
according to the first API request information, the first API request information is sent to the monitoring platform so as to request first heartbeat detection configuration information matched with the first API request information to the monitoring platform;
receiving the first heartbeat detection configuration information sent by the monitoring platform, and creating the first heartbeat detection process according to the first heartbeat detection configuration information;
and during the period of providing the first service, performing connection detection on the subsystem equipment through the first heartbeat detection process.
Optionally, the method further comprises at least one feature parameter for characterizing the first API request;
the step of sending the first API request information to the monitoring platform according to the first API request information to request the monitoring platform for first heartbeat detection configuration information matched with the first API request information, includes:
the first service corresponding to the first API request information is obtained according to the first API request information;
obtaining at least one characteristic parameter according to the first API request information and/or the first service;
transmitting said at least one said characteristic parameter to said monitoring platform;
and receiving the first heartbeat detection configuration information generated by the monitoring platform according to the at least one characteristic parameter.
Optionally, the first heartbeat detection configuration information includes first heartbeat period information and first disconnection determination information;
the first heartbeat period information is used for indicating the heartbeat period of sending the heartbeat packet and indicating the set time of the overtime timer;
the first disconnection determination information is used for indicating a condition that when disconnection with the subsystem equipment is detected, first alarm information is generated and sent to a specified terminal.
Optionally, the step of generating the first alarm information and sending the first alarm information to the designated terminal when the connection and disconnection with the subsystem equipment are detected includes:
sending a heartbeat packet to the subsystem equipment according to the first heartbeat period information;
starting a timeout timer when sending the heartbeat packet to the subsystem device;
when receiving a response packet sent by the subsystem equipment within the set time of the timeout timer, detecting that the subsystem equipment is normally connected, and deleting the timeout timer;
when the response packet sent by the subsystem equipment is not received after the time set by the timeout timer is over, detecting that the subsystem equipment is disconnected;
and when the connection and disconnection with the subsystem equipment are detected, generating the first alarm information according to the first disconnection judging information, and sending the first alarm information to the appointed terminal.
Optionally, when the connection and disconnection with the subsystem device are detected, the step of generating the first alarm information according to the first disconnection determination information and sending the first alarm information to the designated terminal includes:
when the disconnection of the subsystem equipment is detected, attempting reconnection with the subsystem equipment according to the first disconnection judging information;
and generating first alarm information and sending the first alarm information to a designated terminal if the connection with the subsystem equipment cannot be reestablished within the first threshold time required by the first disconnection judging information.
Optionally, after the first heartbeat detection process is terminated in response to a first API termination request sent by the subsystem device, the method further includes:
performing connection detection on the subsystem equipment through a second heartbeat detection process;
and when the connection and disconnection with the subsystem equipment are detected, generating second alarm information and sending the second alarm information to the appointed terminal.
In yet another aspect, a subsystem monitoring system includes a server device and at least one subsystem device, wherein:
the server device is configured to:
establishing a network connection with the subsystem equipment in response to a connection request of the subsystem equipment;
receiving a first API request sent by the subsystem equipment;
providing a first service to the subsystem device in response to the first API request;
according to the first API request, during the process of providing the first service, performing connection detection on the subsystem equipment through a first heartbeat detection process matched with the first API request;
when the connection and disconnection with the subsystem equipment are detected, generating first alarm information and sending the first alarm information to a designated terminal;
responding to a first API termination request sent by the subsystem equipment, and terminating the first heartbeat detection process;
the subsystem assembly is configured to:
receiving a user instruction, and sending the connection request to the server device according to the user instruction;
or, sending the first API request to the server device according to the instruction of the user;
or sending the first API termination request to the server device according to the instruction of the user.
In yet another aspect, a computer device includes a memory having a computer program stored therein and a processor executing the computer program to implement the above method.
In yet another aspect, a computer readable storage medium has a computer program stored thereon, and a processor executes the computer program to implement the above method.
Compared with the prior art, the invention has the following advantages and beneficial effects:
after the subsystem equipment is connected, when an API request sent by the subsystem equipment is received, heartbeat detection configuration information corresponding to the API request is formulated according to different characteristics of the received API request, and during the process of providing service for the subsystem equipment in response to the API request, a heartbeat detection process is created according to the heartbeat detection configuration information so as to detect the connection between the server and the subsystem equipment during the process of providing service for the subsystem equipment in response to the API request. And when the API request is ended, terminating the heartbeat detection process, and after receiving a new API request, re-creating a new heartbeat detection process according to the new API request, wherein the new heartbeat detection process can use different heartbeat detection configuration information with different heartbeat periods from the previous heartbeat detection process. The scheme can adapt different heartbeat detection parameters according to different API requests, has the characteristics of strong adaptability and low system resource occupation, and solves the problems that the heartbeat period of the existing heartbeat detection is difficult to set, the heartbeat period is generally set to be a fixed length, but the period is difficult to meet various different application scenes.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following description will make brief description of the drawings used in the description of the embodiments or the prior art. Like elements or portions are generally identified by like reference numerals throughout the several figures. In the drawings, elements or portions thereof are not necessarily drawn to scale.
FIG. 1 is a schematic flow chart of a subsystem monitoring method in the present application;
fig. 2 is a schematic diagram of a subsystem monitoring system in the present application.
The realization, functional characteristics and advantages of the present application will be further described with reference to the embodiments, referring to the attached drawings.
Detailed Description
In order that those skilled in the art will better understand the present disclosure, a clear and complete description of the technical solutions of the embodiments of the present disclosure will be provided below in conjunction with the accompanying drawings in the embodiments of the present disclosure, and it is apparent that the described embodiments are only some embodiments of the present disclosure, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without inventive effort, based on the embodiments in this disclosure, shall fall within the scope of the present disclosure.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the foregoing figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the disclosure described herein may be capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
As shown in fig. 1, a subsystem monitoring method is executed by a server device, and includes:
s1, establishing network connection with subsystem equipment;
optionally, the server device establishes network connection with the subsystem device through a TCP/IP protocol, specifically, establishes network connection with the subsystem device through a three-way handshake of the TCP/IP protocol;
optionally, a network connection with the subsystem device is established by configuring a monitoring Socket.
Specifically, the method comprises the following steps executed by the server device:
creating a Socket: a Socket () function is used to create a Socket, specifying parameters such as a communication protocol, an address family, and a Socket type. After the Socket is successfully created, the system allocates a unique Socket descriptor for the Socket.
Binding Socket: socket is bound to local address and port using bind () function so that subsystem devices can connect to the Socket. When binding Socket, parameters such as communication protocol, address family, local address and the like need to be specified.
Monitoring Socket: socket is set to listening state using listen () function to wait for connection request of subsystem devices. When monitoring Socket, the parameters such as maximum connection number need to be specified.
Receiving connection: the accept () function is used to accept the connection request of the subsystem devices and create a new Socket for communicating with the subsystem devices. When connection is accepted, parameters such as a monitoring Socket, a subsystem device address and the like are required to be specified.
The method further comprises the following steps performed by the subsystem assembly:
creating a Socket: a Socket () function is used to create a Socket, specifying parameters such as a communication protocol, an address family, and a Socket type. After the Socket is successfully created, the system allocates a unique Socket descriptor for the Socket.
Request connection: connection () function is used to request a connection from a server device. When a connection is requested, parameters such as the address of the server device need to be specified.
S2, receiving a first API request sent by the subsystem equipment, wherein the first API request is generated by the subsystem equipment according to a first instruction input by a user;
the subsystem equipment receives a first instruction input by a user, generates a first API request according to the first instruction input by the user, and sends the first API request to the server equipment.
S3, responding to a first API request, and providing a first service for the subsystem equipment;
the method comprises the steps that a server side device responds to a first API request and provides first service corresponding to the first API request for a subsystem device;
specifically, the first service generally sends first data corresponding to the first API request to the subsystem device.
S4, according to the first API request, during the first service providing period, the subsystem equipment is subjected to connection detection through a first heartbeat detection process matched with the first API request;
during the first service providing period, the server side equipment requests, selects or calculates first heartbeat detection configuration information matched with the first API request according to the first API request, and performs connection detection on the subsystem equipment through a first heartbeat detection process matched with the first API request according to the first heartbeat detection configuration information.
Optionally, the method further includes a monitoring platform running locally, and during the providing of the first service according to the first API request, the step of performing connection detection on the subsystem device through a first heartbeat detection process matched with the first API request includes:
acquiring first API request information according to the first API request;
according to the first API request information, the first API request information is sent to a monitoring platform so as to request first heartbeat detection configuration information matched with the first API request information to the monitoring platform;
receiving first heartbeat detection configuration information sent by a monitoring platform, and creating a first heartbeat detection process according to the first heartbeat detection configuration information;
during the provision of the first service, connection detection is performed on the subsystem devices by a first heartbeat detection process.
Optionally, the method further comprises at least one feature parameter for characterizing the first API request;
according to the first API request information, the first API request information is sent to the monitoring platform to request the first heartbeat detection configuration information matched with the first API request information from the monitoring platform, and the method comprises the following steps:
obtaining a first service corresponding to the first API request information according to the first API request information;
obtaining at least one characteristic parameter according to the first API request information and/or the first service;
transmitting at least one characteristic parameter to a monitoring platform;
and receiving first heartbeat detection configuration information generated by the monitoring platform according to the at least one characteristic parameter.
Specifically, the characteristic parameter for characterizing the first API request may be a data size of the data requested by the first API;
when the data volume requested by the first API request is large, the time for maintaining connection between the server side equipment and the subsystem equipment is long, and when the data volume requested by the first API request is small, the time for maintaining connection between the server side equipment and the subsystem equipment is short; optionally, the characteristic parameter may be a small data request when the data volume of the first API request is not greater than 500MB, and the characteristic parameter may be a data request when the data volume of the first API request is greater than 500MB and not greater than 5GB, and the characteristic parameter may be a large data request when the data volume of the first API request is greater than 5 GB. Alternatively, the characteristic parameter may be a specific data size, such as 400MB.
Specifically, the characteristic parameter for characterizing the first API request may be a data type of the data requested by the first API;
when the data requested by the first API request is video data, the stability of connection between the server side equipment and the subsystem equipment is higher, and when the data requested by the first API request is text or linked list data, the stability of connection between the server side equipment and the subsystem equipment is lower; optionally, when the data requested by the first API request is video data, the characteristic parameter may be a video data request, and when the data requested by the first API request is text data, the characteristic parameter may be a text data request.
In particular, the characteristic parameter for characterizing the first API request may be a data use of the data of the first API request;
when the data requested by the first API request is the data needing to be displayed in real time, the stability of the connection between the server side equipment and the subsystem equipment needs to be maintained is stronger, and when the data requested by the first API request is the data needing not to be displayed in real time, the stability of the connection between the server side equipment and the subsystem equipment needs to be maintained is lower; optionally, when the data requested by the first API request is data that needs to be displayed in real time, the characteristic parameter may be a real-time data request, and when the data requested by the first API request is data that does not need to be displayed in real time, the characteristic parameter may be a non-real-time data request.
Specifically, the characteristic parameter for characterizing the first API request may be a UID of the user inputting the first instruction or a user member level obtained according to the UID of the user, and the optional characteristic parameter for characterizing the first API request may be: VIP member request, general member request, or guest request.
Optionally, the monitoring platform generates the first heartbeat detection configuration information through a mapping table and characteristic parameters, and specifically:
the heartbeat period of the heartbeat packet sent by the small data request is 30s, and the setting time of the timeout timer is 30s; the heartbeat period of the data request corresponding to the heartbeat packet is 1min, and the setting time of the timeout timer is 30s; the heartbeat period of the big data request corresponding to the heartbeat packet is 10min, and the time of the big data request is set to 60s.
The heartbeat period of the video data request corresponding to the heartbeat packet is 10s, and the setting time of the timeout timer is 5s; the heartbeat period of the text data request corresponding to the heartbeat packet is 1min, and the setting time of the timeout timer is 30s.
The heartbeat period of the heartbeat packet corresponding to the real-time data request is 5s, and the setting time of the timeout timer is 3s; the heartbeat period of the non-real-time data request corresponding to the heartbeat packet is 10min, and the time of the non-real-time data request is set to 60s.
The heartbeat period of the heartbeat packet corresponding to the VIP member request is 30s, and the setting time of the overtime timer is 10s; the heartbeat period of the heartbeat packet sent by the common member request is 1min, and the setting time of the overtime timer is 30s; the heartbeat period of the heartbeat packet corresponding to the tourist request is 10min, and the setting time of the overtime timer is 60s
Optionally, the monitoring platform generates the first heartbeat detection configuration information through the function and the characteristic parameter, and specifically:
the data size a corresponds to the heartbeat period=a/20 of the transmitted heartbeat packet, the set time of the timeout timer=a/40, wherein the unit of a is MB, and the unit of the heartbeat period and the set time is seconds.
Optionally, the monitoring platform generates the first heartbeat detection configuration information through the big data model and the characteristic parameters.
Optionally, the first heartbeat detection configuration information includes first heartbeat period information and first disconnection determination information;
the first heartbeat period information is used for indicating the heartbeat period of sending the heartbeat packet and indicating the setting time of the overtime timer;
the first disconnection determination information is used for indicating a condition that when disconnection from the subsystem equipment is detected, first alarm information is generated and sent to the designated terminal.
Specifically, the heartbeat period of sending the heartbeat packet and the set time for indicating the timeout timer may be the same or different, and the first heartbeat period information may be: the heartbeat period of sending the heartbeat packet is 30s, and the setting time of the timeout timer is 30s; or, the heartbeat period of sending the heartbeat packet is 30s, and the setting time of the timeout timer is 15s; or the heartbeat period of sending the heartbeat packet is 10min, and the setting time of the timeout timer is 60s.
Specifically, the first disconnection determination information may be: and when the connection disconnection with the subsystem equipment is detected, continuously sending a heartbeat packet to the subsystem equipment according to the heartbeat period within a first threshold time, if a response packet returned by the subsystem equipment is received within the first threshold time, judging that reconnection is successful, and not generating first alarm information, and if the response packet returned by the subsystem equipment is not received within the first threshold time, judging that reconnection is unsuccessful, generating the first alarm information and sending the first alarm information to the designated terminal. Alternatively, it may be provided that more than one response packet is received consecutively to be considered as a reconnection success. Alternatively, the first threshold time may be any time less than the period of sending the heartbeat packet.
S5, when the disconnection with the subsystem equipment is detected, generating first alarm information and sending the first alarm information to the appointed terminal;
when the server side equipment detects that the connection with the subsystem equipment is disconnected, first alarm information is generated and sent to a designated terminal, wherein the designated terminal can be a terminal of an operation and maintenance personnel of an operator of the subsystem equipment or a terminal of an operation and maintenance personnel of a service side equipment service provider. The content of the first alarm information may be: the XX subsystem equipment is disconnected from the server equipment at the ZZ time when the YY service is requested. Wherein XX is the name or ID of the subsystem equipment, YY is the name or ID of the service requested by the XX subsystem equipment, and ZZ is the time when the XX subsystem is disconnected from the server equipment.
Optionally, when detecting disconnection from the subsystem device, generating first alarm information and sending the first alarm information to the designated terminal, including:
sending a heartbeat packet to the subsystem equipment according to the first heartbeat period information;
starting a timeout timer when sending the heartbeat packet to the subsystem device;
when a response packet sent by the subsystem equipment is received within the set time of the timeout timer, detecting that the connection with the subsystem equipment is normal, and deleting the timeout timer;
when the response packet sent by the subsystem equipment is not received after the time set by the timeout timer is over, the disconnection of the subsystem equipment is detected;
and when the connection and disconnection with the subsystem equipment are detected, generating first alarm information according to the first disconnection judging information, and sending the first alarm information to the appointed terminal.
Specifically, the server side equipment sends first heartbeat detection configuration information according to the monitoring platform, a first heartbeat detection process is established, and the first heartbeat detection process sends heartbeat packets to the subsystem equipment according to first heartbeat period information;
starting a timeout timer in the thread when the first heartbeat detection process sends a heartbeat packet to the subsystem equipment;
when the server side equipment receives a response packet sent by the subsystem equipment within the set time of the timeout timer, the server side equipment detects that the connection with the subsystem equipment is normal, the timeout timer in the thread is deleted by the first heartbeat detection process, then the next heartbeat packet sending time in the first heartbeat period information is waited, and the process is repeated;
when the server-side equipment still does not receive the response packet sent by the subsystem equipment after the time set by the timeout timer is over, the server-side equipment detects that the connection with the subsystem equipment is disconnected;
when the server side equipment detects that the connection with the subsystem equipment is disconnected, the server side equipment generates first alarm information according to the first disconnection judging information and sends the first alarm information to the appointed terminal.
Optionally, when detecting that the connection with the subsystem device is disconnected, generating first alarm information according to the first disconnection determination information, and sending the first alarm information to the designated terminal, including:
when the disconnection of the subsystem equipment is detected, attempting reconnection with the subsystem equipment according to the first disconnection judging information;
and generating first alarm information and sending the first alarm information to the appointed terminal if the connection with the subsystem equipment cannot be reestablished within the first threshold time required by the first disconnection judging information.
Specifically, when the server side equipment detects that the connection with the subsystem equipment is disconnected, heartbeat packets are continuously sent to the subsystem equipment according to the heartbeat period in a first threshold time according to the first disconnection judging information, when a response packet returned by the subsystem equipment is received in the first threshold time, the reconnection is judged to be successful, first alarm information is not required to be generated and sent to a designated terminal, when the response packet returned by the subsystem equipment is not received in the first threshold time, the reconnection is judged to be failed, and the first alarm information is generated and sent to the designated terminal.
And S6, responding to a first API termination request sent by the subsystem equipment, and terminating the first heartbeat detection process.
The subsystem equipment receives a second instruction input by a user, the second instruction instructs the subsystem equipment to send a first API termination request to the server equipment, the first API termination request is generated according to the second instruction input by the user, the first API termination request is sent to the server equipment, and the server equipment responds to the first API termination request sent by the subsystem equipment to terminate the first heartbeat detection process and the first service.
Optionally, after the first heartbeat detection process is terminated in response to the first API termination request sent by the subsystem device, the method further includes:
connection detection is carried out on the subsystem equipment through a second heartbeat detection process;
and when the connection and disconnection with the subsystem equipment are detected, generating second alarm information and sending the second alarm information to the appointed terminal.
After the subsystem device and the server device are connected, even if the subsystem device does not send an API request to the server device, the server device generally needs to detect the connection of the subsystem device so as to facilitate the device management of the server device, therefore, after the server device terminates the first heartbeat detection process, the connection detection of the subsystem device is also performed through the second heartbeat detection process, the heartbeat period of the second heartbeat detection process and the setting time for indicating the timeout timer are both longer, and the occupation of system resources can be reduced as much as possible while the connection detection of the subsystem device is maintained.
Alternatively, the content of the second alarm information may be that the XX subsystem device is disconnected from the server device at ZZ time. Wherein XX is the name or ID of the subsystem equipment, and ZZ is the time when the XX subsystem is disconnected from the server equipment.
Optionally, the method further comprises the steps of:
and S7, responding to a disconnection request sent by the subsystem equipment, disconnecting the subsystem equipment and terminating the second heartbeat detection process.
The subsystem device may send a disconnection request to the server device through the fourth handshake, where the server device responds to the disconnection request sent by the subsystem device to disconnect from the subsystem device, and terminate the second heartbeat detection process.
Example 2
As shown in fig. 2, a subsystem monitoring system includes a server device and at least one subsystem device, optionally, the number of subsystems is 3, where:
the server device is configured to:
establishing a network connection with the subsystem equipment in response to a connection request of the subsystem equipment;
receiving a first API request sent by subsystem equipment;
providing a first service to the subsystem device in response to the first API request;
according to the first API request, during the process of providing the first service, performing connection detection on the subsystem equipment through a first heartbeat detection process matched with the first API request;
when the connection and disconnection with the subsystem equipment are detected, generating first alarm information and sending the first alarm information to a designated terminal;
responding to a first API termination request sent by the subsystem equipment, and terminating a first heartbeat detection process;
the subsystem assembly is configured to:
receiving a user instruction, and sending a connection request to the server device according to the user instruction;
or, sending a first API request to the server device according to the instruction of the user;
or, sending a first API termination request to the server device according to the instruction of the user.
Example 3
The present embodiment provides a computer device including a memory and a processor, the memory storing a computer program, the processor executing the computer program to implement any of the methods described above.
Example 4
The present embodiment provides a computer-readable storage medium, on which a computer program is stored, and a processor executes the computer program to implement any one of the methods described above.
In some embodiments, the computer readable storage medium may be ferroelectric memory FRAM, read only memory ROM, programmable read only memory PROM, erasable programmable read only memory EPROM, electrically erasable programmable read only memory EEPROM, flash memory, magnetic surface memory, optical disk, or optical disk read only memory CD-ROM; but may be a variety of devices including one or any combination of the above memories. The computer may be a variety of computing devices including smart terminals and servers.
In the foregoing embodiments of the present disclosure, the descriptions of the various embodiments are emphasized, and for a portion of this disclosure that is not described in detail in this embodiment, reference is made to the related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed technology content may be implemented in other manners. The above-described embodiments of the apparatus are merely exemplary, and the division of units may be a logic function division, and there may be another division manner in actual implementation, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interfaces, units or modules, or may be in electrical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present disclosure may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable non-volatile storage medium. Based on such understanding, the technical solution of the present disclosure may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a non-volatile storage medium, including several instructions to cause a computer device (which may be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the methods of the various embodiments of the present disclosure. And the aforementioned nonvolatile storage medium includes: a U-disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely a preferred embodiment of the present disclosure and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present disclosure and are intended to be comprehended within the scope of the present disclosure.

Claims (8)

1. A method of subsystem monitoring, comprising:
establishing a network connection with the subsystem equipment;
receiving a first API request sent by the subsystem equipment, wherein the first API request is generated by the subsystem equipment according to a first instruction input by a user;
providing a first service to the subsystem device in response to the first API request;
according to the first API request, during the process of providing the first service, performing connection detection on the subsystem equipment through a first heartbeat detection process matched with the first API request;
when the connection and disconnection with the subsystem equipment are detected, generating first alarm information and sending the first alarm information to a designated terminal;
responding to a first API termination request sent by the subsystem equipment, and terminating the first heartbeat detection process;
the method further comprises a monitoring platform running locally, and the step of performing connection detection on the subsystem device through a first heartbeat detection process matched with the first API request during the first service providing according to the first API request comprises the following steps:
acquiring first API request information according to the first API request;
according to the first API request information, the first API request information is sent to the monitoring platform so as to request first heartbeat detection configuration information matched with the first API request information to the monitoring platform;
receiving the first heartbeat detection configuration information sent by the monitoring platform, and creating the first heartbeat detection process according to the first heartbeat detection configuration information;
during the providing of the first service, performing connection detection on the subsystem device through the first heartbeat detection process;
further comprising at least one characteristic parameter for characterizing the first API request;
the step of sending the first API request information to the monitoring platform according to the first API request information to request the monitoring platform for first heartbeat detection configuration information matched with the first API request information, includes:
the first service corresponding to the first API request information is obtained according to the first API request information;
obtaining at least one characteristic parameter according to the first API request information and/or the first service;
transmitting said at least one said characteristic parameter to said monitoring platform;
and receiving the first heartbeat detection configuration information generated by the monitoring platform according to the at least one characteristic parameter.
2. A method of monitoring a subsystem according to claim 1, wherein the network connection with the subsystem device is established by configuring a listening Socket.
3. The subsystem monitoring method according to claim 1, wherein the first heartbeat detection configuration information includes first heartbeat period information and first disconnection determination information;
the first heartbeat period information is used for indicating the heartbeat period of sending the heartbeat packet and indicating the set time of the overtime timer;
the first disconnection determination information is used for indicating a condition that when disconnection with the subsystem equipment is detected, first alarm information is generated and sent to a specified terminal.
4. A method of monitoring a subsystem according to claim 3, wherein the step of generating a first alarm message to be sent to a designated terminal when a disconnection from the subsystem apparatus is detected comprises:
sending a heartbeat packet to the subsystem equipment according to the first heartbeat period information;
starting a timeout timer when sending the heartbeat packet to the subsystem device;
when receiving a response packet sent by the subsystem equipment within the set time of the timeout timer, detecting that the subsystem equipment is normally connected, and deleting the timeout timer;
when the response packet sent by the subsystem equipment is not received after the time set by the timeout timer is over, detecting that the subsystem equipment is disconnected;
and when the connection and disconnection with the subsystem equipment are detected, generating the first alarm information according to the first disconnection judging information, and sending the first alarm information to the appointed terminal.
5. The method according to claim 4, wherein the step of generating the first alarm information according to the first disconnection determination information and transmitting the generated first alarm information to the specified terminal when disconnection from the subsystem apparatus is detected, comprises:
when the disconnection of the subsystem equipment is detected, attempting reconnection with the subsystem equipment according to the first disconnection judging information;
and generating first alarm information and sending the first alarm information to a designated terminal if the connection with the subsystem equipment cannot be reestablished within the first threshold time required by the first disconnection judging information.
6. The method for monitoring a subsystem according to claim 1, wherein after the terminating the first heartbeat detection process in response to a first API termination request sent by the subsystem device, further comprises:
performing connection detection on the subsystem equipment through a second heartbeat detection process;
and when the connection and disconnection with the subsystem equipment are detected, generating second alarm information and sending the second alarm information to the appointed terminal.
7. The subsystem monitoring system is characterized by comprising a server device and at least one subsystem device, wherein:
the server device is configured to:
establishing a network connection with the subsystem equipment in response to a connection request of the subsystem equipment;
receiving a first API request sent by the subsystem equipment;
providing a first service to the subsystem device in response to the first API request;
according to the first API request, during the process of providing the first service, performing connection detection on the subsystem equipment through a first heartbeat detection process matched with the first API request;
when the connection and disconnection with the subsystem equipment are detected, generating first alarm information and sending the first alarm information to a designated terminal;
responding to a first API termination request sent by the subsystem equipment, and terminating the first heartbeat detection process;
the method further comprises a monitoring platform running locally, and the step of performing connection detection on the subsystem device through a first heartbeat detection process matched with the first API request during the first service providing according to the first API request comprises the following steps:
acquiring first API request information according to the first API request;
according to the first API request information, the first API request information is sent to the monitoring platform so as to request first heartbeat detection configuration information matched with the first API request information to the monitoring platform;
receiving the first heartbeat detection configuration information sent by the monitoring platform, and creating the first heartbeat detection process according to the first heartbeat detection configuration information;
during the providing of the first service, performing connection detection on the subsystem device through the first heartbeat detection process;
further comprising at least one characteristic parameter for characterizing the first API request;
the step of sending the first API request information to the monitoring platform according to the first API request information to request the monitoring platform for first heartbeat detection configuration information matched with the first API request information, includes:
the first service corresponding to the first API request information is obtained according to the first API request information;
obtaining at least one characteristic parameter according to the first API request information and/or the first service;
transmitting said at least one said characteristic parameter to said monitoring platform;
receiving the first heartbeat detection configuration information generated by the monitoring platform according to the at least one characteristic parameter;
the subsystem assembly is configured to:
receiving a user instruction, and sending the connection request to the server device according to the user instruction;
or, sending the first API request to the server device according to the instruction of the user;
or sending the first API termination request to the server device according to the instruction of the user.
8. A computer device, characterized in that it comprises a memory in which a computer program is stored and a processor which executes the computer program, implementing the method according to any of claims 1-6.
CN202311632656.0A 2023-12-01 2023-12-01 Subsystem monitoring method, system and equipment Active CN117336213B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311632656.0A CN117336213B (en) 2023-12-01 2023-12-01 Subsystem monitoring method, system and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311632656.0A CN117336213B (en) 2023-12-01 2023-12-01 Subsystem monitoring method, system and equipment

Publications (2)

Publication Number Publication Date
CN117336213A CN117336213A (en) 2024-01-02
CN117336213B true CN117336213B (en) 2024-02-27

Family

ID=89293925

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311632656.0A Active CN117336213B (en) 2023-12-01 2023-12-01 Subsystem monitoring method, system and equipment

Country Status (1)

Country Link
CN (1) CN117336213B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6223072B1 (en) * 1999-06-08 2001-04-24 Impulse Dynamics N.V. Apparatus and method for collecting data useful for determining the parameters of an alert window for timing delivery of ETC signals to a heart under varying cardiac conditions
CN105897813A (en) * 2015-06-10 2016-08-24 乐视致新电子科技(天津)有限公司 Heartbeat message sending method, heartbeat message receiving method, heartbeat message sending device and heartbeat message receiving device
CN106411627A (en) * 2015-07-31 2017-02-15 博雅网络游戏开发(深圳)有限公司 Network connection detection method and apparatus
CN107517136A (en) * 2016-06-16 2017-12-26 中兴通讯股份有限公司 The implementation method of heartbeat keep-alive, apparatus and system
CN109298934A (en) * 2018-09-06 2019-02-01 京信通信系统(中国)有限公司 Heart beat cycle method of adjustment, apparatus and system
CN110445683A (en) * 2019-08-05 2019-11-12 深圳市大拿科技有限公司 Server, equipment, the method and system of monitoring server existing state
CN114090293A (en) * 2021-11-22 2022-02-25 湖北亿咖通科技有限公司 Service providing method and electronic equipment
CN114666390A (en) * 2022-05-19 2022-06-24 云账户技术(天津)有限公司 Page monitoring method and device of application program, electronic equipment and storage medium
CN115776510A (en) * 2022-11-23 2023-03-10 中国工商银行股份有限公司 Control method and device of heartbeat packet, processor and electronic equipment
CN115987852A (en) * 2022-12-21 2023-04-18 平安银行股份有限公司 Interface service state detection method and device, computer equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102404858B (en) * 2011-11-25 2014-04-02 华为技术有限公司 Radio resource optimizing method, device and system

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6223072B1 (en) * 1999-06-08 2001-04-24 Impulse Dynamics N.V. Apparatus and method for collecting data useful for determining the parameters of an alert window for timing delivery of ETC signals to a heart under varying cardiac conditions
CN105897813A (en) * 2015-06-10 2016-08-24 乐视致新电子科技(天津)有限公司 Heartbeat message sending method, heartbeat message receiving method, heartbeat message sending device and heartbeat message receiving device
CN106411627A (en) * 2015-07-31 2017-02-15 博雅网络游戏开发(深圳)有限公司 Network connection detection method and apparatus
CN107517136A (en) * 2016-06-16 2017-12-26 中兴通讯股份有限公司 The implementation method of heartbeat keep-alive, apparatus and system
CN109298934A (en) * 2018-09-06 2019-02-01 京信通信系统(中国)有限公司 Heart beat cycle method of adjustment, apparatus and system
CN110445683A (en) * 2019-08-05 2019-11-12 深圳市大拿科技有限公司 Server, equipment, the method and system of monitoring server existing state
CN114090293A (en) * 2021-11-22 2022-02-25 湖北亿咖通科技有限公司 Service providing method and electronic equipment
CN114666390A (en) * 2022-05-19 2022-06-24 云账户技术(天津)有限公司 Page monitoring method and device of application program, electronic equipment and storage medium
CN115776510A (en) * 2022-11-23 2023-03-10 中国工商银行股份有限公司 Control method and device of heartbeat packet, processor and electronic equipment
CN115987852A (en) * 2022-12-21 2023-04-18 平安银行股份有限公司 Interface service state detection method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN117336213A (en) 2024-01-02

Similar Documents

Publication Publication Date Title
CN103812823A (en) Method, device and system for configuration information migration in thermal migration of virtual machine
CN102223381A (en) Message pushing method, server, client terminal and system
CN103124275A (en) Method and device of obtaining files
CN108055311B (en) HTTP asynchronous request method, device, server, terminal and storage medium
CN104580376A (en) Method, device and system for constructing connection between terminals in local area network
CN109561054B (en) Data transmission method, controller and access device
CN107979539A (en) Message processing method and device
CN109391691A (en) The restoration methods and relevant apparatus that NAS is serviced under a kind of single node failure
CN111711680A (en) File breakpoint continuous transmission method and device based on UDP (user Datagram protocol)
CN103685398B (en) Communication connection method for building up and communication system
CN102882708A (en) Operation and maintenance auditing method, device and system
CN106210362B (en) Call method and device
CN117336213B (en) Subsystem monitoring method, system and equipment
CN107819599B (en) Message processing method and device
CN104243473A (en) Data transmission method and device
CN104780230A (en) Method of automatically acquiring cloud server IP address, system and cloud system
CN105721231A (en) Service quality sensing detection method and service quality sensing detection device
CN104065519A (en) Method for improving conversation interactive performance and automatic configuration server
CN110661836A (en) Message routing method, device and system, and storage medium
CN107071038A (en) A kind of method and device of transmitting multimedia data
CN114363204A (en) Request monitoring method, network device and storage medium
CN107249194A (en) Manage method, device and the equipment of wireless network connection
CN110474807B (en) Log processing method and device
CN111885097A (en) Network card processing method and device, electronic equipment and storage medium
CN114006936B (en) System operation information real-time acquisition method, server and client

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