CN110445683A - Server, equipment, the method and system of monitoring server existing state - Google Patents

Server, equipment, the method and system of monitoring server existing state Download PDF

Info

Publication number
CN110445683A
CN110445683A CN201910718612.7A CN201910718612A CN110445683A CN 110445683 A CN110445683 A CN 110445683A CN 201910718612 A CN201910718612 A CN 201910718612A CN 110445683 A CN110445683 A CN 110445683A
Authority
CN
China
Prior art keywords
equipment
server
heartbeat packet
frequency
device parameter
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910718612.7A
Other languages
Chinese (zh)
Other versions
CN110445683B (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.)
SHENZHEN DANALE TECHNOLOGY Co Ltd
Original Assignee
SHENZHEN DANALE 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 DANALE TECHNOLOGY Co Ltd filed Critical SHENZHEN DANALE TECHNOLOGY Co Ltd
Priority to CN201910718612.7A priority Critical patent/CN110445683B/en
Publication of CN110445683A publication Critical patent/CN110445683A/en
Application granted granted Critical
Publication of CN110445683B publication Critical patent/CN110445683B/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/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
    • 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
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/54Presence management, e.g. monitoring or registration for receipt of user log-on information, or the connection status of the users

Abstract

This application discloses a kind of server, equipment, the method and system of monitoring server existing state.Wherein, the method for the monitoring server existing state includes: that server and equipment are established and communicated to connect, and obtains the heartbeat packet frequency of the equipment, and send heartbeat packet to the equipment based on the heartbeat packet frequency;The heartbeat packet that the equipment monitoring server is sent determines the server for existing state if receiving the heartbeat packet within the predetermined time.The monitoring method is middle compared to the prior art to send heartbeat packet to server to judge whether server is in the monitoring method of existing state using equipment, the equipment of the application only needs to receive data during monitoring heartbeat packet, data need not be sent, therefore equipment only needs to consume reception power consumption, without consuming sending power consumption, the overall power for being conducive to save equipment, extends the service life of equipment.The application is widely used in the existing state of monitoring server.

Description

Server, equipment, the method and system of monitoring server existing state
Technical field
This application involves field of communication technology, more particularly, to a kind of server, equipment, monitoring server existing state Method and system.
Background technique
With the arrival of all things on earth Internet age, the common vector of server and equipment as Internet of Things, in answering for Internet of Things With the middle scene that can be encountered and judge whether server survives, such as: after restarting server in batches, whether each host or virtual machine Start successfully.
In the prior art, to determine whether server survives, referring to Fig. 1, Fig. 1 is the survival of prior art monitoring server The structural schematic diagram of one embodiment of the method for state.As shown in Figure 1, the prior art be by the way of using equipment timing or Sporadically send heartbeat packet to server, replied if continuously losing preset multiple heartbeat packets, equipment determine server from Line.But it is found in practice process, the power consumption that equipment persistently sends heartbeat packet is larger, greatly shortens the use of device battery Time, and equipment component can not replace battery, so that the power consumption of equipment directly influences the service life of equipment.
Summary of the invention
The application is intended to solve at least some of the technical problems in related technologies.For this purpose, the application One purpose is to provide method, the system of a kind of server, equipment and monitoring server existing state, can monitoring server deposit State living, while reducing the power consumption of equipment and extending the service life of equipment.
Technical solution used by the application is:
In a first aspect, the present invention provides a kind of method of monitoring server existing state, executed by server, this method packet It includes: establishing and communicate to connect with equipment;Obtain the heartbeat packet frequency of the equipment;Heartbeat is sent to the equipment based on the heartbeat packet frequency Packet.
Second aspect, the present invention provides a kind of method of monitoring server existing state, by the equipment with server communication It executes, this method comprises: monitoring the data of server transmission, and judges whether the data are the heartbeat packet;If predetermined The heartbeat packet is received within time, then determines the server for existing state.
The third aspect, the present invention provide a kind of server, which includes: that module is established in communication connection, for set It is standby to establish communication connection;Heartbeat packet frequency acquisition module, for obtaining the heartbeat packet frequency of the equipment;Heartbeat packet sending module, Heartbeat packet is sent to the equipment based on the heartbeat packet frequency.
Fourth aspect, the present invention provide a kind of equipment, which includes: heartbeat packet monitoring modular, for monitoring the service The data that device is sent, and judge whether the data are the heartbeat packet;Server existing state determination module, for according to predetermined The heartbeat packet whether is received within time, determines whether the server is existing state.
5th aspect, a kind of server is provided, which includes: communication module, the communication module include transmitter and Receiver, the communication module are used to establish with the equipment and communicate to connect;Processor, for obtaining the heartbeat packet frequency of equipment;It should Transmitter is also used to send heartbeat packet to the equipment based on the heartbeat packet frequency.
6th aspect, the present invention provide a kind of equipment, which includes: receiver, for receiving server transmission Heartbeat packet;Processor, if determining the server for existing state for receiving the heartbeat packet.
7th aspect, the present invention provide a kind of system of monitoring server existing state, which includes: according to above-mentioned A kind of server and according to any of the above-described kind of equipment, which further includes standby server;The equipment be also used to this Server is established after connection failure, establishes connection request to standby server initiation;If established with the standby server Successful connection reports that the server goes offline situation to the standby server.
The application sends heartbeat packet to equipment using server, and whether equipment receive heartbeat packet, to judge that server is It is no to be in existing state;Heartbeat packet is sent to server using equipment in compared to the prior art, and receives server return Heartbeat packet is replied, to judge whether server is in existing state;The equipment of the application only needs during monitoring heartbeat packet Data are received, without transmission data, therefore equipment only needs to consume reception power consumption, without consuming sending power consumption, is conducive to save The overall power for saving equipment, extends the service life of equipment.And for most equipment, power consumption is received much smaller than hair Power consumption is sent, the overall power of equipment is further saved.
Further, the application is also by static devices parameters such as the types of acquisition equipment come the heartbeat packet frequency of set device Rate, in this way, different equipment is arranged different heartbeat packet frequencies, for example, or communication chip shorter to the device battery service life connects It receives power consumption and consumes the low-frequency heartbeat packet of biggish equipment transmission, the overall power of such equipment monitoring heartbeat packet can be saved, Extend the service life of equipment.
Further, whether the application also passes through the operation duration for obtaining equipment and needs to set with dynamics such as server communications The overall power of equipment monitoring heartbeat packet can be adjusted flexibly to adjust the heartbeat packet frequency of equipment in standby parameter.
Further, the application is also initiated by equipment to server when preliminary judgement server is in and goes offline state Communication request is established, if equipment and server foundation communicate to connect successfully, determining server is in existing state;Conversely, Determining server is in the state that goes offline.The accuracy rate for judging whether server is in existing state can be improved.
In addition, the application determining server be in go offline state when, by enable standby server, with the spare clothes It is engaged in after device foundation communication connection, to the abnormality of standby server report server.It can be convenient maintenance personnel to know to take The network failure of business device, the normal use of fast quick-recovery server.
Detailed description of the invention
Fig. 1 is the structural schematic diagram of an embodiment of the method for prior art monitoring server existing state;
Fig. 2 is the flow diagram of an embodiment of the method for the application monitoring server existing state;
Fig. 3 is the flow diagram of an embodiment of the step S14 of Fig. 2;
Fig. 4 is the flow diagram of the second embodiment of the method for the application monitoring server existing state;
Fig. 5 is the flow diagram of the 3rd embodiment of the method for the application monitoring server existing state;
Fig. 6 is the broken line schematic diagram for the embodiment that the heartbeat packet frequency of the equipment of Fig. 5 changes over time;
Fig. 7 is the flow diagram of the fourth embodiment of the method for the application monitoring server existing state;
Fig. 8 is the flow diagram of the 5th embodiment of the method for the application monitoring server existing state;
Fig. 9 is the structural schematic diagram of an embodiment of the system of the application monitoring server existing state;
Figure 10 is the structural schematic diagram of an embodiment of the heartbeat inspecting module of Fig. 9;
Figure 11 is the structural schematic diagram of the second embodiment of the system of the application monitoring server existing state;
Figure 12 is the structural schematic diagram of the 3rd embodiment of the system of the application monitoring server existing state;
Figure 13 is the structural schematic diagram of the fourth embodiment of the system of the application monitoring server existing state;
Figure 14 is the structural schematic diagram of the 5th embodiment of the system of the application monitoring server existing state;
Figure 15 is the schematic network structure of an embodiment of the system of the application monitoring server existing state;
Figure 16 is the structural schematic diagram of an embodiment of the application server;
Figure 17 is the structural schematic diagram of an embodiment of the application equipment;
Figure 18 is the schematic network structure of another embodiment of the system of the application monitoring server existing state;
Figure 19 is the schematic network structure of the another embodiment of the system of the application monitoring server existing state.
Specific embodiment
In the following, being so that the application is easier to understand, to some common descriptions involved in present embodiments Explain, it should be noted that these explanation should not be considered as to this application claims protection scope restriction.
One, server
The server of the application can be entity device, or virtual server, server can be process service Device is also possible to remote server, does not limit herein.
In embodiments herein, if server is entity device, it is preferable that carrying out communicating between server and equipment can The communication standard of use includes but is not limited to various near-field communication standards, such as: bluetooth, near-field communication (Near Field Communication, NFC), ZigBee, infrared data transmission (Infrared Data Association, IrDA), wireless protect Very (Wireless Fidelity, WiFi) etc..
Various wired or wireless communication modes can also be used between server and equipment, wired communication mode includes but not It is limited to: Ethernet, MODEM communication.Wireless communication mode includes but is not limited to: any one in 2G, 3G, 4G, 5G.
No matter which kind of communication mode is used, is communicated between server and terminal as long as can be realized.
Two, equipment
The equipment of the application includes various types of Internet of Things entity devices, for example domestic electric appliance, smart home are set Standby, safety monitoring equipment, data collecting instrument table equipment, computer equipment, intelligent terminal etc., it is numerous to list herein.
Three, heartbeat packet frequency
The application all " heartbeat packet frequency " refers to that server (including standby server) sends heartbeat packet to equipment Frequency.
Four, the sending power consumption of communication chip and reception power consumption comparison
It was verified that the reception power consumption of communication chip is generally less than sending power consumption, for certain chips, such as WIFI core Piece receives power consumption and is much smaller than sending power consumption.Specifically, example as shown in the table is please referred to:
Chip type WIFI WIFI WIFI 2.4G 2.4G
Chip model CYW43438 Hi11315 CC3200 A7190 A7131
Receive power consumption 40mA 45mA 59mA 28mA 27mA
Sending power consumption (10dBm) 25mA
Sending power consumption (15dBm) 260mA 229mA
Sending power consumption (17dBm) 120mA
Sending power consumption (18dBm) 290mA 270mA
Sending power consumption (20dBm) 320mA 183mA
Sending power consumption (22dBm) 352mA
Table one
Based on above-mentioned table one, it can analyze and obtain:
One, in addition to the 2.4G chip of model A7131, the sending power consumption of most of near field communications chip is much larger than reception function Consumption, for example, the WIFI chip of model CYW43438@15dBm, sending power consumption is 6.5 times for receiving power consumption.
Two, different types of communication chip, such as WIFI chip and 2.4G chip, the sending power consumption and reception power consumption of the two It is entirely different, and power consumption difference is larger.For example, the WIFI chip of model CYW43438@15dBm and model A7190@ The 2.4G chip of 17dbmd, the former sending power consumption and receives power consumption and is the latter's sending power consumption and receives 2 times of power consumption.
Three, same type with model communication chip under different power situations corresponding sending power consumption it is different, such as type It number is worked respectively for the WIFI chip of CYW43438 in 15dBm and 20dBm, corresponding sending power consumption is not identical, Qian Zhewei 260mA, the latter 320mA.
Embodiment one:
Referring to Fig. 2, Fig. 2 is the flow diagram of an embodiment of the method for the application monitoring server existing state. As shown in Fig. 2, this method comprises the following steps:
S11: server 10 and equipment 20 are established and are communicated to connect;
In step s 11, server 10 has a variety of with the mode that equipment 20 establishes communication connection.Two kinds introduced below often The mode for the foundation communication connection seen.
One, communication connection is established by sending handshake packet between server 10 and equipment 20.Specifically, communication link is established The process connect includes the following steps:
(1) server 10 sends handshake packet to equipment 20;
Wherein, which meets scheduled communications protocol format.
(2) equipment 20 persistently receives the handshake packet, if equipment 20 receives the handshake packet, illustrates server 10 and sets Standby 20 are successfully established communication connection.
Wherein, if equipment 20 receives burst of data packet, data check is carried out to the data packet, to determine the data packet It whether is the handshake packet.After data check is qualified, equipment 20 returns to confirmation response (such as: character " ACK ") to server 10.Clothes Business device 10 receives the confirmation response, then illustrates that server 10 and equipment 20 are successfully established communication connection.
Two, server 10 and equipment 20 are established by socket communicates to connect.It should be noted that at this point, in server 10 creation client sockets create server side socket in equipment 20.
Connection procedure between socket can be divided into three steps: server monitoring, client request, connection confirmation.
(1) server is monitored: server side socket and the specific client socket of delocalization, but in the company of waiting The state connect monitors network state in real time.
(2) client request: referring to and propose connection request by client socket, and the target to be connected is server end cap Connect word.For this purpose, client socket must describe its server socket to be connected first, it is indicated that server side socket Then address and port numbers just propose connection request to server side socket.
(3) connection confirmation: refer to and receive the connection of client socket in other words when server side socket listens to Request, it establishes a new thread with regard to the request of customer in response end socket, visitor is issued in the description of server side socket Family end, once client confirmed that this description, connection just establish.And server side socket keeps listening state, Continue to the connection request of other client sockets.
S12: the heartbeat packet frequency of the setting equipment 20 of server 10;
In step s 12, can set device 20 based on experience value heartbeat packet frequency.For example, setting server 10 every 24S or 30S sends a heartbeat packet to equipment 20.
Optionally, configuration file is provided in server 10, the heartbeat packet frequency of equipment 20 is arranged.It can also service The heartbeat packet frequency of direct set device 20 in the application program of device 10.It can also be by mobile terminal or hand-held PDA for service The heartbeat packet frequency of the setting equipment 20 of device 10.
S13: server 10 sends heartbeat packet to equipment 20 with scheduled frequency.
In step s 13, server 10 sends heartbeat packet to equipment 20 at interval of a period of time, which meets step The heartbeat packet frequency of rapid S12 setting.
S14: the heartbeat packet that 20 monitoring server 10 of equipment is sent;
Detailed description below step S14.Referring to Fig. 3, Fig. 3 is the process signal of an embodiment of the step S14 of Fig. 2 Figure.Step S14 is executed by equipment 20, is included the following steps:
S141: heartbeat packet is received;
In step s 141, the read function of socket communication protocol can be called to receive the heartbeat packet.
S142: whether judgement is properly received the heartbeat packet when secondary;
Wherein, pass through the numerical value of each byte in the data packet length and heartbeat packet of the comparison received heartbeat packet of step S141 Whether desired value is met, to judge whether be properly received the heartbeat packet when secondary.
For example, the data packet length of the received heartbeat packet of step S141 be 15 bytes, if 15 bytes meet it is pre- Then the heartbeat packet length of phase judges whether the data content of the heartbeat packet is correct, will be in each byte of 15 bytes Appearance is compared one by one with the content of each byte of expected heartbeat packet, if the content of each byte and expected byte Content is identical, then determines to be properly received the heartbeat packet;Otherwise, it is determined that being not successfully received heartbeat packet.
In step S142, if step S141 is received successfully, S144 is thened follow the steps, then executes step S12;Instead It, then perform the next step rapid S143.
S143: if when time reception failure, judge whether current reception conditions meet preset stopping condition of acceptance;
In step S143, if current reception conditions are unsatisfactory for preset stopping condition of acceptance, step is returned to S141 continues to heartbeat packet;Conversely, thening follow the steps S144.
Optionally, a timer is set in step s 141;In this step S143, whether current reception conditions are judged Meet preset stopping condition of acceptance are as follows: whether the lapse of time (or remaining time) for judging current timer is more than (being less than) Scheduled threshold value, if it exceeds (being less than) predetermined threshold, then determine to stop receiving;Conversely, then determining to continue to.
Optionally, judge whether current reception conditions meet preset stopping condition of acceptance are as follows: judgement, which receives total degree, is No is more than scheduled number, for example, setting pre-determined number as 50 times;If it exceeds the pre-determined number, then determine to stop receiving;Instead It, then determine to continue to.
S144: stop receiving heartbeat packet.
It is to be appreciated that can recycle in loop body in software program realization and execute step S141-S143, if Meet preset stopping condition of acceptance in step S143, then interrupt circulation, executes step S144.
S15: if receiving the heartbeat packet within the predetermined time, 20 determining server 10 of equipment is existing state.
In step S15, it will be clear that the predetermined time be greater than step S143 described in timer when Between, because executing step S14 needs regular hour (perhaps seldom).For example, if equipment 20 does not receive server 10 in 72s The heartbeat packet of transmission, then it represents that equipment 20 and server 10 are not in connection status, and server 10 is likely to be at the state of going offline.
In the present embodiment, if equipment 20 is in step S15, determining server 10 is in existing state, then equipment 20 is followed Whether ring executes step S14- step S15, judge server 10 in existing state with lasting.
In the present embodiment, heartbeat packet is sent to equipment 20 by using server 10, whether is connect by monitoring device 20 Heartbeat packet is received, to judge the existing state of server 10.The heart is sent to server 10 using equipment 20 compared with the existing technology Packet is jumped, is replied by the response whether monitoring device 20 receives server 10 to judge whether server 10 survives;This implementation In example equipment 20 can no need to send data, it is only necessary to receive data, therefore need not consumption sending power consumption, it is only necessary to consume Receive power consumption.Also, since the reception power consumption of equipment 20 is generally less than sending power consumption, using the monitoring side of the present embodiment Method is conducive to the overall power for saving equipment 20, to save the use electric energy of equipment 20, meets the situation of current energy-saving and emission-reduction It is required that.For inactive component, be conducive to the battery for improving equipment 20, to extend the use of equipment 20 Service life.
In addition, using the monitoring method of the present embodiment, for equipment 20, monitoring method compared to the prior art, It does not need to carry out data transmission in each monitoring step, is conducive to the CPU and memory overhead that save equipment 20, so as to mention High equipment 20 executes the efficiency of other groundworks.
Embodiment two:
Referring to Fig. 4, Fig. 4 is the process signal of the second embodiment of the method for the application monitoring server existing state Figure.The multiple equipment connecting with server can be different types of, such as may include camera, television set, underground water meter The function of detector etc., these equipment is different, and operative scenario operating mode is different, and the demand of equipment reacted in time is also different Sample, therefore, different equipment can set different heartbeat packet frequencies.The difference between this embodiment and the first embodiment lies in logical The static device parameter for obtaining equipment is crossed, the heartbeat packet frequency of equipment is arranged.
As shown in figure 4, this method comprises the following steps:
S21: server 10 and equipment 20 are established and are communicated to connect;
Wherein, step S21 is identical as the step S11 of embodiment one.
S22: server 10 obtains the static device parameter of equipment 20, and calculates equipment 20 according to the static device parameter Heartbeat packet frequency;
In step S22, static device parameter includes: type, model, the type of communication chip and the model, again of equipment The property wanted, service life, battery total amount and power etc..
Wherein, the embodiment of step S22 can be with are as follows:
(1) server 10 obtains whole static device parameters from equipment 20, for example server 10 is established for the first time with equipment 20 When communication connection, specific communications command is sent to equipment 20;After equipment 20 receives specific order, sent out to server 10 Give the static device parameter of itself.
(2) device type and model that server 10 obtains equipment 20 are taking then according to the type and model of equipment 20 It is engaged in other static device parameters of query facility 20 in the database of device 10, such as the type and model of communication chip, equipment Importance, service life, battery total amount and power etc..
It will be clear that server 10 also may not need or it is not direct communicated with equipment 20, to obtain equipment 20 static device parameter.For example, pass through the device type and model of application software manual configuration equipment 20 in server 10, Or the device type and model of equipment 20 are obtained by reading configuration file, then in the database according to the device type and Other static device parameters of model query facility 20;Even, server 10 can also come from other mobile terminals by receiving Communication data, to obtain the static device parameter of equipment 20.
Preferably, the heartbeat packet frequency of equipment 20 is calculated by empirical value formula.The empirical value formula considers each static state The weight of device parameter.
For convenience of understanding, which can be expressed as follows:Wherein, f0Indicate equipment 20 Heartbeat packet frequency, Δ miIndicate equipment 20 one of static device parameter weight, be worth for greater than 0 less than 1, andηiIndicate corresponding heartbeat packet frequency when one of static device parameters weighting is 100%, rule of thumb Value setting;N indicates the number summation for all static device parameters that equipment 20 is related to.
According to the power consumption table (table one) of communication chip above-mentioned, it can be concluded that, the communication chip of different type or model is connect It is not identical to receive power consumption, it is therefore necessary to different communication chips be arranged different heartbeat packet frequencies, for example, for receiving function Consumption still consumes biggish communication chip, and low-frequency heartbeat packet is arranged, advantageously reduces in this way whole in the equipment course of work Body power consumption.
Influence of other static device parameters for the heartbeat packet frequency of setting equipment 20 is illustrated as follows.
(1) importance of equipment.For example, some equipment for being of little use, can reduce its heartbeat packet frequency.
(2) service life of equipment.For the service life for extending equipment, the equipment shorter to equipment life, it is necessary to reduce it Heartbeat packet frequency.
(3) the battery total amount of equipment.For the service life for extending equipment, the equipment less to battery total amount, it is necessary to drop Its low heartbeat packet frequency.
(4) power of equipment.For reduce equipment power consumption, to the biggish equipment of power consumption, it is necessary to reduce its heartbeat packet frequency Rate.
S23-S25: respectively with the step S14-S15 of embodiment one.
In the present embodiment, the heartbeat packet frequency of equipment, the static device are calculated according to the static device parameter of equipment The power consumption or service life close association of parameter and equipment, in this way, different equipment 20 is arranged different heartbeat packet frequencies, For example, or communication chip shorter to the device battery service life, which receives power consumption, consumes the low-frequency heartbeat packet of biggish equipment transmission, it can To save the overall power of such equipment monitoring heartbeat packet, extend the service life of equipment.
Embodiment three:
Referring to Fig. 5, Fig. 5 is the process signal of the 3rd embodiment of the method for the application monitoring server existing state Figure.The difference between the present embodiment and the second embodiment lies in that further, the heartbeat parlor of fixed frequency is sent to equipment in server After a period of time, the dynamic device parameter of equipment is obtained in real time, and the heartbeat of equipment is adjusted according to the dynamic device parameter Packet frequency.
As shown in figure 5, this method comprises the following steps:
S31: with the step S21 of embodiment two;
S32: server 10 obtains the static device parameter of equipment 20, and calculates equipment 20 according to the static device parameter First heartbeat packet frequency;
Wherein, this step S32 is identical as the step S22 of embodiment two, which is in step S22 Heartbeat packet frequency, this step are referred to as the first heartbeat packet frequency.
S33: server 10 sends heartbeat packet to equipment 20 with first frequency;
Wherein, step S33 is identical as the step S23 of embodiment.
S34: after equipment 20 runs a period of time, server 10 obtains the dynamic device parameter of equipment 20, root in real time The second heartbeat packet frequency of equipment 20 is calculated according to the static device parameter and the dynamic device parameter;
In step S34, the dynamic device parameter include: the operation duration of equipment, present battery total amount, current power consumption, Current time and whether need to connect server etc..
Optionally, server 10 obtains the dynamic device parameter of equipment 20 automatically at regular intervals.For example, in server The dynamic device parameter that equipment 20 was obtained every 2 hours is set in 10 application program;Or it is bent by configuration file or Freehandhand-drawing The time interval that equipment 20 obtains dynamic device parameter is arranged in line chart mode.
Optionally, hand push button is set on server 10, clicks the hand push button, server 10 will obtain equipment immediately 20 dynamic device parameter, the personnel that maintain easily are adjusted the heartbeat packet frequency of equipment 20 at any time.
It in step s 35, can be with reference implementation according to the calculation formula that dynamic device parameter calculates the second heartbeat packet frequency The step S34 dynamic device parameter obtained is added in heartbeat packet frequency calculation formula by the step S22 of example two.
Optionally, the formula for calculating the second heartbeat packet frequency is as follows:
Wherein f0Indicate the first heartbeat packet frequency, ftIndicate the second heartbeat Packet frequency, m indicate the total number of dynamic device parameter, Δ τjIndicate influence of j-th of dynamic device parameter to heartbeat packet frequency The factor, numerical value are greater than 0.
Each dynamic device parameter and its corresponding impact factor to heartbeat packet frequency are introduced in detail below.
(1) current power consumption.Optionally, if 20 current power consumption of equipment is greater than 20 rated disspation of equipment, impact factor=volume Determine power consumption/current power consumption.
(2) current battery charge.Optionally, if 20 current battery charge of equipment is less than scheduled threshold value, impact factor =current battery charge/battery power threshold.
(3) operation duration.Optionally, if 20 operation duration of equipment is more than scheduled threshold value, impact factor=equipment fortune Row duration threshold value/current device operation duration.
(4) current time.Optionally, according to the work characteristics of equipment 20, the impact factor is preset.
(5) server whether is connected, corresponding impact factor τ is 1 or 0, i.e., equipment 20 does not need connection server 10, τ is then set to 0, i.e. server 10 does not send heartbeat packet to equipment 20;Conversely, τ is then set to 1, i.e., server 10 is to equipment 20 Send heartbeat packet.The scene is applied: such as 20 type of equipment is electric energy acquisition terminal, and such equipment is only needed specific Period (such as: daily 23:00-24:00) communicated with server 10 (such as: electric energy acquisition terminal is on server 10 One day historgraphic data recording of report).
S35: server 10 sends heartbeat packet to equipment 20 with the second heartbeat packet frequency;
Wherein, the method for step S35 transmission heartbeat packet and the step S33 transmission method of heartbeat packet of embodiment are identical, no It is with place, the frequency for sending heartbeat packet is not identical.
S36: with the step S24 of embodiment two.S37: with the step S25 of embodiment two.
After executing step S37, it is possible to understand that ground, circulation execute step S34- step S37.
Referring to Fig. 7, the embodiment that the heartbeat packet frequency that Fig. 7 is equipment 20 (certain electric energy collect and acquisition) changes over time Broken line schematic diagram.As shown in fig. 7, the heartbeat packet frequency of equipment 20 is in the 20:00-22:00 period, corresponding numerical value is 4 times/ Hour;In the 22:00-24:00 period, which is the preparation reported data period of equipment 20, therefore to ensure equipment 20 Working efficiency, heartbeat packet set of frequency is 3 times/hour by the corresponding heartbeat packet frequency for reducing equipment 20;In 24:00-4:00 Period, the period need to the data such as the electric flux on 20 same day of 10 reporting equipment of server and logout, to ensure to take Business device 10 and equipment 20 communication connection does not interrupt, correspondingly increase the heartbeat packet frequency of equipment 20, by the numerical value be set as 6 times/it is small When.
In the present embodiment, by obtaining the operation duration of equipment and whether needing to join with dynamic devices such as server communications Number carrys out the heartbeat packet frequency of timing or not timing adjustment equipment, and compared to the method for embodiment two, the present embodiment can be adjusted flexibly The heartbeat packet frequency of finishing equipment is conducive to further decrease equipment work so that the overall power of monitoring heartbeat packet be adjusted flexibly Power consumption in the process improves the service life of equipment.
Example IV:
Referring to Fig. 7, Fig. 7 is the process signal of the fourth embodiment of the method for the application monitoring server existing state Figure.As shown in fig. 7, the difference between this embodiment and the first embodiment lies in: when preliminary judgement server is in non-viable state, it is Exclusion certain abnormal conditions, such as communication network disturb, and heartbeat packet are sent to server again by equipment, into one Whether step determining server is in existing state.This method comprises the following steps:
S41-S45: respectively with the step S11-S15 of embodiment one.
S46: after not receiving the heartbeat packet within the predetermined time, equipment 20 establishes connection to the initiation of server 10 Request.
In step S46, optionally, client socket is created in equipment 20 at this time, creates server in server 10 Hold socket.Specifically, it has been elaborated in the step S11 of embodiment one by the method that socket establishes communication connection, Details are not described herein.
S47: if communicate to connect successfully with the foundation of server 10, determining server 10 is existing state if equipment 20.
In step S47, if the connection request response that equipment 20 has successfully received server 10 is replied, determines and service The foundation of device 10 communicates to connect successfully.
Wherein, after determining server 10 is existing state, end step S47, the return of server 10 re-executes step Rapid S44-S47.
In the present embodiment, compared to embodiment one, further determine that server 10 is by step S46 and step S47 It is no to be in existing state, be conducive to improve the accuracy rate whether 20 determining server 10 of equipment is in existing state.It is understood that Ground can also execute the step S46 and step of the present embodiment after the last one step of embodiment two or embodiment three The method of S47.
Embodiment five:
Referring to Fig. 8, Fig. 8 is the flow diagram of an embodiment of the method for the application monitoring server existing state. The difference of the present embodiment and example IV is: further determining server in the state that goes offline, equipment 20 further passes through It establishes and communicates to connect with standby server 30, and be in the state that goes offline to 30 report server 10 of standby server.Such as Fig. 8 institute Show, this method comprises the following steps:
S51-S57: respectively with the step S41-S47 of embodiment one.
S58: after establishing communication connection failure with server 10, equipment 20 establishes connection to the initiation of standby server 30 Request;
In step S58, equipment 20 initiates to establish the method and apparatus 20 of connection request to service to standby server 30 The method that device 10 initiates to establish request is identical, and details are not described herein.
S59: if establishing successful connection with standby server 30, equipment 20 is at 30 report server 10 of standby server In the state of going offline.
In step S59, equipment 20 is other than being in the state to go offline to 30 report server 10 of standby server, also It can be to the exceptional communication data record of 30 reporting device 20 of standby server.Preferably, which uses Journal file form records the abnormal data information that heartbeat packet is received and dispatched between server 10 and equipment 20.Equipment 20 is literary by the log Part uploads to standby server 30.Benefit using journal file mode is conveniently to save abnormal data on standby server 30 Information.
Preferably, when standby server 30 receives server 10 in the state to go offline, with voice signal or optical signal Mode issues alarm prompt, for example, issuing voice prompt using loudspeaker, maintenance personnel is reminded to check.
It will be clear that the quantity of standby server 30 is not construed as limiting, if equipment 20 can not be spare with First Server establishes connection, then equipment 20 can establish connection with the second standby server.Optionally, standby server 30 is soft or hard Part configuration is identical as the software and hardware configuration of server 10.
In the present embodiment, if it is determined that server 10 is in the state that goes offline, then nothing between server 10 and equipment 20 Method communication, equipment 20 are communicated to connect by establishing with standby server 30, so that equipment 20 keeps working normally.
Further, the equipment 20 of the present embodiment can also to the state that goes offline of 30 report server 10 of standby server, Know that server 10 breaks down to maintain easily personnel.
In addition, log recording can be sent to standby server 30 by the present embodiment, in this way, standby server 30 can root According to log recording, the failure cause that goes offline of Analysis server 10, so that the failure of server 10 is quickly excluded, restarting service Device 10 works normally.
Embodiment six:
Also referring to Fig. 9 and Figure 10.Fig. 9 is the knot of an embodiment of the system of the application monitoring server existing state Structure schematic diagram.As shown in figure 9, the server 10 include communication connection establish module 11, heartbeat packet frequency acquisition module 12 and Heartbeat packet sending module 13.The equipment 20 includes heartbeat packet monitoring modular 21 and server existing state determination module 22.
Wherein, communication connection is established module 11 and is communicated to connect for establishing with equipment 20.Heartbeat packet frequency acquisition module 12, For obtaining the heartbeat packet frequency of equipment 20.Heartbeat packet sending module 13, for being sent based on the heartbeat packet frequency to equipment 20 Heartbeat packet.
The working method of each module of server 10 is introduced in detail below.
Communication connection is established the method that module 11 establishes communication connection with equipment 20 and has been elaborated in example 1, In This is not repeated.
Heartbeat packet frequency of the heartbeat packet frequency acquisition module 12 for set device 20 based on experience value.For example, setting clothes Business device 10 sends a heartbeat packet to equipment 20 every 24S or 30S.Optionally, configuration file is provided in server 10, to set Install standby 20 heartbeat packet frequency.Can also in the application program of server 10 direct set device 20 heartbeat packet frequency. The heartbeat packet frequency of equipment 20 can also be set by mobile terminal or hand-held PDA for server 10.
Heartbeat packet sending module 13 is used to send heartbeat packet to equipment 20 at interval of a period of time, which meets the heart Jump the heartbeat packet frequency that packet frequency acquisition module 12 is set.
The working method of each module of equipment 20 is introduced in detail below.
Heartbeat packet monitoring modular 21 is used for the heartbeat packet that monitoring server 10 is sent.Server existing state first determines mould If block 22 is existing state for receiving the heartbeat packet, determining server 10 within the predetermined time.
Referring to Fig. 10, whether heartbeat packet monitoring modular 21 is successfully sentenced including heartbeat packet receiving unit 211, heartbeat packet reception Disconnected unit 212, heartbeat packet reception whether stop judging unit 213 and heartbeat packet receives stop unit 214.It introduces in detail below The working method of heartbeat packet monitoring modular 21.
Optionally, heartbeat packet receiving unit 211 is for calling the read function of socket communication protocol to receive the heartbeat packet.
Optionally, heartbeat packet receives whether successful judging unit 212 is used to receive by comparing heartbeat packet receiving unit 211 The data packet length of heartbeat packet and the numerical value of each byte in heartbeat packet whether meet desired value, to judge when time whether succeeding Receive the heartbeat packet.
For example, the data packet length of the received heartbeat packet of heartbeat packet receiving unit 211 is 15 bytes, if 15 words Section meets expected heartbeat packet length, then judges whether the data content of the heartbeat packet is correct, by each of 15 bytes The content of byte is compared one by one with the content of each byte of expected heartbeat packet, if the content of each byte and pre- The byte content of phase is identical, then determines to be properly received the heartbeat packet;Otherwise, it is determined that being not successfully received heartbeat packet.
Heartbeat packet receives the judging unit 212 that whether succeeds, and is bundled into if receiving heartbeat for heartbeat packet receiving unit 211 Function then calls heartbeat packet to receive stop unit 214, and server 20 then re-calls heartbeat packet monitoring modular 21 and server is deposited The first determination module of state 22 living;Conversely, then calling whether heartbeat packet reception stops judging unit 213.
If whether heartbeat packet reception, which stops judging unit 213, receives whether successful judging unit 212 is worked as heartbeat packet Secondary reception heartbeat packet failure, judges whether current reception conditions meet preset stopping condition of acceptance.
Whether heartbeat packet reception stops judging unit 213, if being also used to current reception conditions is unsatisfactory for preset stopping Condition of acceptance then calls heartbeat packet receiving unit 211 to continue to heartbeat packet;Conversely, heartbeat packet is then called to receive stop unit 214 stop receiving heartbeat packet, and server 10 determines the heartbeat packet for not receiving equipment 20.
Optionally, a timer is set in heartbeat packet receiving unit 211;Whether heartbeat packet reception stops judging unit 213 judge whether current reception conditions meet preset stopping condition of acceptance are as follows: judgement at this time the timer lapse of time (or Person's remaining time) it whether is more than (being less than) scheduled threshold value, if it exceeds (being less than) predetermined threshold, then determine to stop receiving;Instead It, then determine to continue to.
Optionally, whether heartbeat packet reception stops judging unit 213 and judges whether current reception conditions meet preset stop Only condition of acceptance are as follows: judge whether the total degree for calling heartbeat packet receiving unit 211 to receive heartbeat packet is more than scheduled number, example Such as, pre-determined number is set as 50 times;If it exceeds the pre-determined number, then determine to stop receiving;Conversely, then judgement can be after continued access It receives.
Heartbeat packet receives stop unit 214 and receives heartbeat packet for stopping.
Server existing state determination module 22, if determining the server for survival for receiving the heartbeat packet State.
In the present embodiment, server 10 is by calling heartbeat packet sending module 13 to send heartbeat packet, equipment to equipment 20 20 by calling heartbeat packet monitoring modular 21 to monitor heartbeat packet, to judge the existing state of server 10.Compared with the existing technology Heartbeat packet is sent to server 10 using equipment 20, is replied by the response whether monitoring device 20 receives server 10, this No need to send data for equipment 20 in embodiment, it is only necessary to receive data, therefore need not consume sending power consumption, it is only necessary to consume Receive power consumption.Also, since the reception power consumption of equipment 20 is generally less than sending power consumption, using the server of the present embodiment 10 and the method whether survived of 20 determining server 10 of equipment, be conducive to the overall power for saving equipment 20, to save equipment 20 use electric energy, meets the situation of current energy-saving and emission-reduction.
If equipment 20 is inactive component, be conducive to the service life for improving 20 battery of equipment, to extend equipment 20 Service life.
In addition, the equipment 20 of the present embodiment is in monitoring process, heartbeat packet data packet is sent without to server 10, favorably In the expense for the CPU and memory for saving equipment 20, so as to improve the working efficiency of equipment 20.
Embodiment seven:
Figure 11 is please referred to, Figure 11 is the structural representation of the second embodiment of the system of the application monitoring server existing state Figure.The multiple equipment connecting with server can be different types of, such as may include camera, television set, underground water meter The function of detector etc., these equipment is different, and operative scenario operating mode is different, and the demand of equipment reacted in time is also different Sample, therefore, different equipment can set different heartbeat packet frequencies.The present embodiment and the difference of embodiment six are, lead to The static device parameter that heartbeat packet frequency computing module 12 obtains equipment is crossed, the heartbeat packet frequency of equipment is arranged.
As shown in figure 11, server 10 includes that module 11, heartbeat packet frequency computing module 12 and the heart are established in communication connection Jump packet sending module 13.Equipment 20 includes heartbeat packet monitoring modular 21 and server existing state determination module 22.Wherein, it communicates Connection establishment module 11, heartbeat packet sending module 13, heartbeat packet monitoring modular 21 and server existing state determination module 22 Identical as embodiment six, therefore not to repeat here.
Heartbeat packet frequency computing module 12 is discussed in detail as follows.Heartbeat packet frequency computing module 12 is for obtaining equipment 20 Static device parameter, and according to the heartbeat packet frequency of static device parameter calculating equipment 20.Wherein, static device parameter packet It includes: type, model, the type of communication chip and the model of equipment, importance, service life, battery total amount and power etc..
The present embodiment is the system embodiment corresponding to embodiment two.The realization process and beneficial effect of the present embodiment please join According to the explanation of embodiment two, this will not be repeated here.
Embodiment eight:
Figure 12 is please referred to, Figure 12 is the structural representation of the 3rd embodiment of the system of the application monitoring server existing state Figure.The present embodiment and the difference of embodiment seven are, are sending fixed frequency to equipment by the first heartbeat packet sending module 13 Heartbeat packet certain interval of time after, further, pass through the second heartbeat packet frequency computing module 14 and the second heartbeat packet Sending module 15 obtains the dynamic device parameter of equipment in real time, and the heartbeat packet frequency of equipment is adjusted according to the dynamic device parameter Rate.
As shown in figure 12, server 10 includes that module 11, the first heartbeat packet frequency computing module 12, the are established in communication connection One heartbeat packet sending module 13, the second heartbeat packet frequency computing module 14 and the second heartbeat packet sending module 15.Equipment 20 is wrapped Include heartbeat packet monitoring modular 21 and server existing state determination module 22.
Wherein, module 11, the first heartbeat packet frequency computing module 12, the first heartbeat packet sending module are established in communication connection 13, heartbeat packet monitoring modular 21 and server existing state determination module 22 are identical as embodiment seven, and therefore not to repeat here. The second heartbeat packet frequency computing module 14 is introduced in detail below.
Second heartbeat packet frequency computing module 14 is used for after equipment 20 runs a period of time, obtains equipment 20 in real time Dynamic device parameter calculates the second heartbeat packet frequency of equipment 20 according to the static device parameter and the dynamic device parameter.The Two heartbeat packet sending modules 15 are used to send heartbeat packet to equipment 20 with the second heartbeat packet frequency.
Preferably, the dynamic device parameter include: the operation duration of equipment, present battery total amount, current power consumption, it is current when It carves and whether needs to connect server etc..
Optionally, the second heartbeat packet frequency computing module 14 obtains the dynamic device ginseng of equipment 20 automatically at regular intervals Number.For example, setting obtained the dynamic device parameter of equipment 20 every 2 hours;Or pass through configuration file or Freehandhand-drawing curve graph side The time interval that equipment 20 obtains dynamic device parameter is arranged in formula.Hand push button is set on server 10, clicks the hand push button, Second heartbeat packet frequency computing module 14 will obtain the dynamic device parameter of equipment 20 immediately, maintain easily personnel and carry out at any time Adjust the heartbeat packet frequency of equipment 20.
The present embodiment is the system embodiment corresponding to embodiment three.The realization process and beneficial effect of the present embodiment please join According to the description of embodiment three, this will not be repeated here.
Embodiment nine:
Figure 13 is please referred to, Figure 13 is the structural representation of the fourth embodiment of the system of the application monitoring server existing state Figure.As shown in figure 13, the present embodiment and the difference of embodiment six are: equipment 20 further includes that connection request mould is established with server Block 23 and the second determination module of server existing state 24, when preliminary judgement server is in non-viable state, in order to exclude Certain abnormal conditions, such as communication network disturb, and send heartbeat packet to server again by equipment, further determine Whether server is in existing state.
Wherein, established with server connection request module 23 for do not received within the predetermined time heartbeat packet it Afterwards, connection request is established to server initiation.If the second determination module of server existing state 24 is used to establish with server It communicates to connect successfully, then determining server is existing state.
If the connection request response that the second determination module of server existing state 24 is used to have successfully received server is replied, Then determine to communicate to connect successfully with server foundation.
In the present embodiment, compared to embodiment six, by establishing connection request module 23 with server and server is deposited Whether the second determination module of state 24 living further determines server 10 in existing state, is conducive to improve the judgement of equipment 20 Whether server 10 is in the accuracy rate of existing state.It is to be appreciated that in the service of embodiment seven or embodiment eight After the first determination module of device existing state 22, addition and server establish connection request module 23 and server existing state the Two determination modules 24.
Embodiment ten:
Figure 14 is please referred to, Figure 14 is the structural representation of the 5th embodiment of the system of the application monitoring server existing state Figure.The present embodiment and the difference of embodiment nine are: equipment 20 further include established with standby server connection request module 25 and Server exception status report module 26.
Connection request module 25 is established for after establishing connection failure with the server with standby server, to spare Connection request is established in the initiation of server (not shown).
Server exception status report module 26, if for establishing successful connection with standby server, to the spare clothes Business device reports that the server is in the state that goes offline.
Server exception status report module 26 is used in addition to being in the shape to go offline to standby server report server 10 It, can also be to the exceptional communication data record of standby server reporting device 20 except state.Preferably, which remembers Record is using the abnormal data information for receiving and dispatching heartbeat packet between journal file form record server 10 and equipment 20.Server exception The journal file is uploaded to standby server 30 by status report module 26.Benefit using journal file mode is convenient standby With preservation abnormal data information on server 30.
Preferably, when standby server receives server 10 in the state to go offline, with voice signal or optical signal side Formula issues alarm prompt, for example, issuing voice prompt using loudspeaker, maintenance personnel is reminded to check.
It will be clear that the quantity of standby server is not construed as limiting, if establishing connection request with standby server Module 25 can not establish connection with First standby server, then established with standby server connection request module 25 be also used to Second standby server establishes connection.Optionally, the software and hardware configuration phase of the software and hardware configuration of standby server and server 10 Together.
In the present embodiment, if the second determination module of server existing state 24 determines that server 10 is in the shape that goes offline State, then can not be communicated between server 10 and equipment 20, then by with standby server establish connection request module 25 with it is standby It is established and is communicated to connect with server 30, so that equipment 20 keeps working normally.
Further, the equipment 20 of the present embodiment can also be by server exception status report module 26 to active service The state that goes offline of 3 report server 10 of device knows that server 10 breaks down to maintain easily personnel.
In addition, the equipment 20 of the present embodiment is sent out the log recording of equipment 20 by server exception status report module 26 It send to standby server, in this way, standby server 30 can be according to above-mentioned log recording, the failure original that goes offline of Analysis server 10 Cause, to quickly exclude the failure of server 10, restarting server 10 is worked normally.
Embodiment 11:
It is an embodiment of the system of the application monitoring server existing state also referring to Figure 15 to Figure 17, Figure 15 Schematic network structure.As shown in figure 15, which includes the first equipment 20, the second equipment 40, third equipment the 50, the 4th Equipment 60 and server 10.Server 10 respectively with the first equipment 20, the second equipment 40, third equipment 50 and the 4th equipment 60 are communicated.Wherein, any one equipment in aforementioned four equipment is selected to judge server 10 whether in survival shape State.
Preferably, judge that equipment reaches preset condition currently, such as currently judge the battery capacity of equipment lower than predetermined Threshold value or current judgement equipment operating time when reaching scheduled operating time, other equipment can be enabled to continue to judge Whether server 10 is in existing state.Due to the first equipment 20, the second equipment 40, third equipment 50 and the 4th equipment 60 Device parameter is different, when switching other equipment to continue to judge, is recalculated according to the device parameter characteristic of the other equipment The heartbeat packet frequency of the other equipment.
For example, the heartbeat packet set of frequency is 5 beats/min when using the first equipment 20;When using the second equipment 40, The heartbeat packet set of frequency is 3 beats/min;When using third equipment 50, which is 2 beats/min;When adopting When with four equipment 60, which is 1 beat/min.
Figure 16 is please referred to, as shown in figure 16, server 10 includes communication module and processor 101.Wherein, the communication module Including transmitter 102 and receiver 103, which is used to establish with the equipment and communicate to connect.Processor 101, for obtaining Take the heartbeat packet frequency of equipment.Transmitter 102 is also used to send heartbeat packet to the equipment based on the heartbeat packet frequency.
In addition, server 10 further includes memory 104, display 105 and physical button 106.Memory 104 can be used In storage program, the program of storage can be used for controlling above-mentioned each unit and device.In addition, memory 104 can also store processing The intermediate variable data generated in the operation of device 101, such as heartbeat packet frequency.
Display screen 105, the heartbeat packet frequency data generated for video-stream processor 101.Optionally, display screen 105 can have There is the function of touch-control, the display screen 105 is touching display screen at this time, and the screen touch for receiving user operates, to processor 101 provide the input operation information of user.
Physical button 106 can be used for receiving the input operation of user, such as: rendering preferences etc. on screen is chosen, and will The information of the input operation of user is sent to processor 101, for the processing of processor 101.
Figure 17 is please referred to, as shown in figure 17, equipment 20 includes processor 201, transmitter 202 and receiver 203.
Receiver 203, for receiving the heartbeat packet of the transmission of server 10.
Processor 201, if for receiving the heartbeat packet, determining server 10 is existing state.
Transmitter 202, if establishing connection request to the initiation of server 10 for not receiving the heartbeat packet.
Receiver 203, be also used to receive the sending of server 10 establishes connection request response;Processor 201 be also used to as Fruit equipment 20 and server 10 establish successful connection, then determining server 10 is existing state.
It is described herein to be, the transmitter 102 and receiver 103 of server 10 respectively with the transmitter 202 of equipment 20 and The pairing of receiver 203 uses.If the transmitter 102 and receiver 103 of server 10 are bluetooth communication, the then hair of equipment 20 Emitter 202 and receiver 203 are similarly bluetooth communication.
Embodiment 12:
Figure 18 is please referred to, Figure 18 is the network structure of another embodiment of the system of the application monitoring server existing state Schematic diagram.As shown in figure 18, which includes server 10, the first equipment 20, standby server 30 and the second equipment 40.Wherein, the first equipment 20 is connect with server 10, standby server 30 respectively.Second equipment 40 respectively with server 10, standby It is connected with server 30.
This monitoring system at work, communicates to connect firstly, establishing server 10 and the first equipment 20, server 10 to First equipment 20 sends heartbeat packet and judges to service if the first equipment 20 receives the heartbeat packet within the scheduled time Device 10 is in existing state;Conversely, then judging that server 10 is likely to be at the state of going offline, server 10 is initiated to equipment 20 at this time Communication request is established, if server 10 and equipment 20 are successfully established communication connection, illustrates that server 10 is in existing state; Conversely, then illustrating that server 20 is in the state that goes offline, server 20 establishes communication connection request to the initiation of standby server 30, such as Fruit and the foundation of standby server 30 communicate to connect successfully, then are in the state that goes offline to 30 report server 10 of standby server, with Prompting maintenance personnel carry out maintenance and inspection to server 10.
In addition, if the first equipment 20 is after a period of time that works, due to reaching preset condition, be restricted from after It is continuous to be used to judge whether server 10 survives, then it enables the second equipment 40 and is communicated with server 10, to judge server Whether 10 survive.At this point, the second equipment 40 is counted as the stand-by equipment of the first equipment 20.
Embodiment 13:
Figure 19 is please referred to, Figure 19 is the network structure of the another embodiment of the system of the application monitoring server existing state Schematic diagram.As described in Figure 19, which includes server 10, equipment 20, standby server 30 and mobile terminal 80.Its In, server 10, equipment 20 and standby server 30 are identical as the function of embodiment above-mentioned.
Mobile terminal 80 described in detail below.Mobile terminal 80 with server 10 for being communicated, to check server 10 working condition and the operating parameter of setting server 10.
Mobile terminal 80 can be used for checking the heartbeat packet frequency variation lines figure that server 10 is arranged.Specifically, mobile whole Graphic interface is set on end 80, the lines figure that heartbeat packet frequency changes over time is sent with display server 10.
Mobile terminal 80 can be used for being arranged the heartbeat packet frequency of equipment 20.Specifically, mobile terminal 80 provides text box, supplies The heartbeat packet frequency of equipment 20 is set, and the heartbeat packet frequency data of the setting are sent to server 10 by mobile terminal 80, service Device 10 sends heartbeat packet to equipment 20 according to the heartbeat packet frequency.
In the present embodiment, the working condition of server 10 and the work of setting server 10 are checked by mobile terminal 80 Parameter maintains easily the use of personnel monitoring's server 10.
To sum up, the method, apparatus and system that the application provides a kind of detection service device existing state are, it can be achieved that monitoring service The existing state of device.The equipment of the application is not necessarily to consume sending power consumption in monitoring process, it is only necessary to which consumption receives power consumption, compares It needs to consume simultaneously in monitoring process in prior art device to send and receive power consumption, during advantageously reducing equipment monitoring Overall power, be conducive to save equipment energy consumption, extend the service life of equipment.

Claims (10)

1. a kind of method of monitoring server existing state, is executed by server characterized by comprising
According to the device parameter characteristic for the equipment connecting with the server, the heartbeat packet frequency of the equipment is set;
Heartbeat packet is sent to the equipment based on the heartbeat packet frequency.
2. the method according to claim 1, wherein the device parameter characteristic according to the equipment, setting The heartbeat packet frequency of the equipment, comprising:
The static device parameter of the equipment is obtained, the static device parameter includes: type, model, importance, service life, electricity The type and model of pond total amount, power and communication chip;
The heartbeat packet frequency is calculated according to the static device parameter, the heartbeat packet frequency is denoted as the first heartbeat packet frequency Rate, the calculation formula of the first heartbeat packet frequency are as follows:Wherein, f0Indicate the heartbeat packet frequency of equipment 20, ΔmiIndicate equipment 20 one of static device parameter weight, be worth for greater than 0 less than 1, andηiIndicating should One of static device parameters weighting corresponding heartbeat packet frequency when being 100%, sets based on experience value;N indicates equipment 20 The number summation for all static device parameters being related to.
3. according to the method described in claim 2, it is characterized in that, the static device parameter for obtaining the equipment, comprising:
Obtain the device type and model of the equipment;
According to the device type and the model, other static device parameters of the equipment are inquired.
4. according to the method in claim 2 or 3, which is characterized in that described to be based on the heartbeat packet frequency to the equipment After transmission heartbeat packet, further includes: interval adjusts the heartbeat packet frequency of the equipment;
The interval adjusts the heartbeat packet frequency of the equipment, comprising:
At regular intervals, obtain the dynamic device parameter of the equipment, the dynamic device parameter include: operating time, when Preceding battery total amount, current power consumption, current time and whether need to connect server;
The heartbeat packet frequency of the equipment, the heartbeat that will be recalculated are recalculated according to the dynamic device parameter Packet frequency is denoted as the second heartbeat packet frequency, the calculation formula of the second heartbeat packet frequency are as follows:Wherein f0Indicate the first heartbeat packet frequency, ftIndicate the second heartbeat packet frequency, m Indicate the total number of dynamic device parameter, Δ τjIndicate j-th of dynamic device parameter to the impact factor of heartbeat packet frequency, numerical value Greater than 0.
5. a kind of method of monitoring server existing state, by being executed with the equipment of server communication characterized by comprising
Monitor the data that the server is sent, and judge whether the data are heartbeat packet, the frequency of the heartbeat packet according to The device parameter characteristic of the equipment generates;
If receiving the heartbeat packet within the predetermined time, determine the server for existing state.
6. according to the method described in claim 5, it is characterized by further comprising:
After not receiving the heartbeat packet within the predetermined time, request is established with the server and is communicated to connect;
If communicated to connect successfully with server foundation, determine the server for existing state.
7. method according to claim 5 or 6, which is characterized in that further include:
The device parameter is sent to the server, the device parameter includes static device parameter and dynamic device parameter.
8. a kind of server characterized by comprising
Heartbeat packet frequency setting module, for according to the device parameter characteristic of equipment being connect with the server, described in setting The heartbeat packet frequency of equipment;
Heartbeat packet sending module, for sending heartbeat packet to the equipment based on the heartbeat packet frequency.
9. a kind of equipment characterized by comprising
Heartbeat packet monitoring modular for the data that monitoring server is sent, and judges whether the data are the heartbeat packet, institute The frequency for stating heartbeat packet is generated according to the device parameter characteristic of the equipment;
Server existing state determination module, for determining institute according to the heartbeat packet whether is received within the predetermined time State whether server is existing state;
Device parameter sending module, for sending the device parameter to the server, the device parameter is set including static state Standby parameter and dynamic device parameter.
10. a kind of system of monitoring server existing state characterized by comprising server according to claim 8 With equipment according to claim 9, the system also includes standby servers;
The equipment is also used to after establishing connection failure with the server, and connection is established in the initiation of Xiang Suoshu standby server Request;If establishing successful connection with the standby server, Xiang Suoshu standby server reports that the server goes offline situation.
CN201910718612.7A 2019-08-05 2019-08-05 Server, equipment, method and system for monitoring survival state of server Active CN110445683B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910718612.7A CN110445683B (en) 2019-08-05 2019-08-05 Server, equipment, method and system for monitoring survival state of server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910718612.7A CN110445683B (en) 2019-08-05 2019-08-05 Server, equipment, method and system for monitoring survival state of server

Publications (2)

Publication Number Publication Date
CN110445683A true CN110445683A (en) 2019-11-12
CN110445683B CN110445683B (en) 2022-11-25

Family

ID=68433334

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910718612.7A Active CN110445683B (en) 2019-08-05 2019-08-05 Server, equipment, method and system for monitoring survival state of server

Country Status (1)

Country Link
CN (1) CN110445683B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111679931A (en) * 2020-06-12 2020-09-18 恒为科技(上海)股份有限公司 Heartbeat packet sending method and system to be tested
CN112880727A (en) * 2021-02-08 2021-06-01 广州仪速安电子科技有限公司 Instrument state monitoring method and system
CN112994934A (en) * 2021-02-07 2021-06-18 杭州迪普科技股份有限公司 Data interaction method, device and system
CN117336213A (en) * 2023-12-01 2024-01-02 四川才子软件信息网络有限公司 Subsystem monitoring method, system and equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103248504A (en) * 2012-02-06 2013-08-14 上海软智信息科技有限公司 Cluster node matching method, cluster communicating module, equipment and system
CN104243293A (en) * 2014-08-21 2014-12-24 深圳市合信自动化技术有限公司 Automatic heartbeat interval adjustment method, gateway device and server
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
CN106506277A (en) * 2016-11-17 2017-03-15 广东美的暖通设备有限公司 Communication means, communicator and home appliance
CN106803833A (en) * 2015-11-26 2017-06-06 北京百度网讯科技有限公司 Processing method, the apparatus and system of heartbeat in connection long
CN106851799A (en) * 2017-01-19 2017-06-13 珠海市魅族科技有限公司 The sending method and device of heartbeat packet in a kind of connection long
CN107645529A (en) * 2016-07-21 2018-01-30 腾讯科技(深圳)有限公司 Heartbeat packet transmission method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103248504A (en) * 2012-02-06 2013-08-14 上海软智信息科技有限公司 Cluster node matching method, cluster communicating module, equipment and system
CN104243293A (en) * 2014-08-21 2014-12-24 深圳市合信自动化技术有限公司 Automatic heartbeat interval adjustment method, gateway device and server
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
CN106803833A (en) * 2015-11-26 2017-06-06 北京百度网讯科技有限公司 Processing method, the apparatus and system of heartbeat in connection long
CN107645529A (en) * 2016-07-21 2018-01-30 腾讯科技(深圳)有限公司 Heartbeat packet transmission method and device
CN106506277A (en) * 2016-11-17 2017-03-15 广东美的暖通设备有限公司 Communication means, communicator and home appliance
CN106851799A (en) * 2017-01-19 2017-06-13 珠海市魅族科技有限公司 The sending method and device of heartbeat packet in a kind of connection long

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111679931A (en) * 2020-06-12 2020-09-18 恒为科技(上海)股份有限公司 Heartbeat packet sending method and system to be tested
CN111679931B (en) * 2020-06-12 2023-11-24 恒为科技(上海)股份有限公司 Method for sending heartbeat packet and system to be tested
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
CN112880727A (en) * 2021-02-08 2021-06-01 广州仪速安电子科技有限公司 Instrument state monitoring method and system
CN117336213A (en) * 2023-12-01 2024-01-02 四川才子软件信息网络有限公司 Subsystem monitoring method, system and equipment
CN117336213B (en) * 2023-12-01 2024-02-27 四川才子软件信息网络有限公司 Subsystem monitoring method, system and equipment

Also Published As

Publication number Publication date
CN110445683B (en) 2022-11-25

Similar Documents

Publication Publication Date Title
CN110445683A (en) Server, equipment, the method and system of monitoring server existing state
CN110445682A (en) Monitor method, server, equipment and the system of networked node existing state
CN104601203B (en) A kind of low-power consumption bluetooth equipment dynamically adjusts the method and device of Connecting quantity
CN106453648A (en) Device state determining method and device of smart home devices
EP3133741B1 (en) Method for controlling wearable electronic device, central apparatus and device
CN107204999B (en) Method and device for realizing heartbeat
CN103823400B (en) Socket monitoring system
CN106199261B (en) Electric appliance Degree of Ageing Internet-based continues detection system and detection method
CN105530377B (en) It is a kind of to wake up the processing method locked, apparatus and system
CN110381130A (en) The long connection method of keep-alive, device, communication terminal and storage medium
CN107846457A (en) Load-balancing method, device, storage medium and the system of server cluster
CN106656693A (en) Equipment control method, device and system
CN109582531A (en) Monitoring method, device and the electronic equipment of power distribution unit
CN110365114A (en) The energy-accumulating power station total management system and information interacting method integrated based on multimode
CN113031453A (en) Intelligent household appliance, cloud server and power consumption abnormity monitoring method for intelligent household appliance
CN106447242A (en) Power consumption service acceptance time limit management method and device
CN105357387B (en) A kind of method, apparatus and system for waking up terminal
CN104796973B (en) Radio reception device control method and radio reception device
CN110601914B (en) Method and system for monitoring survival state of server
CN107612705A (en) A kind of method and trunking of the equipment power saving of bulk management internet-of-things terminal
CN103115414B (en) Communication equipment room energy-conserving controls system and method
CN105045119B (en) A kind of intelligent home equipment control method and intelligent home device
CN103441509A (en) Reactive power compensation cabinet and control method
CN107231276A (en) Multi-purpose intelligent Internet of Things communication means and system
CN106371399A (en) Numerical control equipment processing information acquisition system and numerical control equipment processing information acquisition method

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