WO2020078355A1 - 设备状态监控方法及装置 - Google Patents

设备状态监控方法及装置 Download PDF

Info

Publication number
WO2020078355A1
WO2020078355A1 PCT/CN2019/111323 CN2019111323W WO2020078355A1 WO 2020078355 A1 WO2020078355 A1 WO 2020078355A1 CN 2019111323 W CN2019111323 W CN 2019111323W WO 2020078355 A1 WO2020078355 A1 WO 2020078355A1
Authority
WO
WIPO (PCT)
Prior art keywords
client
connection
state parameter
current value
value
Prior art date
Application number
PCT/CN2019/111323
Other languages
English (en)
French (fr)
Inventor
罗育华
Original Assignee
杭州海康威视数字技术股份有限公司
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 杭州海康威视数字技术股份有限公司 filed Critical 杭州海康威视数字技术股份有限公司
Priority to US17/285,551 priority Critical patent/US11930292B2/en
Priority to EP19874086.2A priority patent/EP3852363A4/en
Publication of WO2020078355A1 publication Critical patent/WO2020078355A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/76Television signal recording
    • H04N5/765Interface circuits between an apparatus for recording and another apparatus
    • H04N5/77Interface circuits between an apparatus for recording and another apparatus between a recording apparatus and a television camera
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3024Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a central processing unit [CPU]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3034Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a storage system, e.g. DASD based or network based
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3041Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is an input/output interface
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3055Monitoring arrangements for monitoring the status of the computing system or of the computing system component, e.g. monitoring if the computing system is on, off, available, not available
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3065Monitoring arrangements determined by the means or processing involved in reporting the monitored data
    • 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/535Tracking the activity of the user
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/28Timers or timing mechanisms used in protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N17/00Diagnosis, testing or measuring for television systems or their details
    • H04N17/06Diagnosis, testing or measuring for television systems or their details for recorders
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/18Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast
    • H04N7/181Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast for receiving images from a plurality of remote sources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/18Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast

Definitions

  • the present application relates to the field of communication technology, and in particular, to a method and device for monitoring equipment status.
  • the client needs to monitor the various states of the NVR (Network Video Recorder) device in the video surveillance system (such as the status of the Central Processing Unit, CPU), hardware status, channel status, and disk status. , IO (input / output) status, etc.) for monitoring.
  • NVR Network Video Recorder
  • the client regularly sends status query commands (such as MIP (Management Information) database management commands) to the NVR devices in each video surveillance system by way of inspection.
  • status query commands such as MIP (Management Information) database management commands
  • the NVR device After receiving the status query command, the NVR device obtains the state parameters corresponding to each state in the device, and returns the obtained state parameters of each state to the client, so that the client monitors the state of each NVR device.
  • MIP Management Information
  • the present application provides a method and device for monitoring equipment status.
  • a device state monitoring method which is applied to an electronic device, the method comprising: detecting a current value of a state parameter; checking the current value of the state parameter relative to the recorded state Whether the value of the parameter has changed; if there is a change, the current value of the status parameter is reported to the client through the connection between the electronic device and the client.
  • a device state monitoring device which is applied to an electronic device.
  • the device includes: a detection module for detecting the current value of a state parameter; and a check module for checking the state parameter Whether the current value of the parameter has changed from the recorded value of the status parameter; a change reporting module is used to report the current value of the status parameter through the connection between the electronic device and the client when there is a change To the client.
  • an electronic device including a readable storage medium and a processor; wherein, the readable storage medium is used to store machine-executable instructions; the processor, It is used to read the machine-executable instructions on the readable storage medium and execute the instructions to implement the steps described in the first aspect above.
  • a computer-readable storage medium in which a computer program is stored; the computer program is executed by a processor to implement the steps described in the first aspect above .
  • FIG. 1 is a structural diagram of a video monitoring system according to an exemplary embodiment of the present application
  • FIG. 2 is a flow chart of an embodiment of a method for monitoring device status according to an exemplary embodiment of the present application
  • Fig. 3 is a hardware structure diagram of an electronic device according to an exemplary embodiment of the present application.
  • Fig. 4 is a structural diagram of an embodiment of an apparatus state monitoring apparatus according to an exemplary embodiment of the present application.
  • first, second, third, etc. may be used to describe various information in this application, the information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other.
  • first information may also be referred to as second information, and similarly, the second information may also be referred to as first information.
  • word “if” as used herein may be interpreted as "when” or “when” or “in response to a determination”.
  • FIG. 1 is a structural diagram of a video surveillance system according to an exemplary embodiment of the present application.
  • the system shown in FIG. 1 includes a front-end camera (FIG. 1 exemplarily shows three front-end cameras), an NVR device, and a client.
  • the front-end camera is used to collect surrounding video data;
  • the NVR device is used to store the video data transmitted by the front-end camera through the network;
  • the client can be monitored by the installed video surveillance management program (SDK (Software Development Kit) software development kit) package
  • SDK Software Development Kit
  • the client needs to periodically send status query commands to the NVR device to obtain status parameters of various states in the NVR device, and determine whether there is an abnormal state according to the acquired status parameters. If it is judged that there is an abnormal state, the user is prompted about the abnormal state.
  • the number of NVR devices monitored by the client is relatively large, it will cause great pressure on the client to receive data, and some status parameters usually do not change frequently. If all status status parameters are returned for each query, it will be Waste network traffic
  • the NVR device can detect the current value of the status parameter, and when it is detected that the current value of the status parameter has changed from the recorded value of the status parameter, the status parameter's The current value is reported to the client.
  • Fig. 2 is a flowchart of an embodiment of a method for monitoring device status according to an exemplary embodiment of the present application.
  • the device status monitoring method can be applied to electronic devices.
  • the following uses a electronic device as an NVR device as an example for detailed description.
  • the device status monitoring method includes the following steps:
  • Step 201 Detect the current value of the state parameter.
  • a connection between the device and the client needs to be established before step 201 is performed.
  • the process of establishing a connection is that when a connection request sent by a client is received, a full report identifier corresponding to the client is generated and recorded based on the connection request, and the generated full report identifier is added to the first connection response and sent to The client can successfully establish a connection between the device and the client. Then, obtain and record the value of each state parameter of the device, and report the value of each state parameter to the client through the connection.
  • the NVR device After arming the NVR device into the video surveillance system, the NVR device generates and records the full report identifier corresponding to the client when it receives the connection request (including an empty full report identifier) sent by the client, to It is used to indicate whether full reporting is performed after the connection is established.
  • the full reporting identifier may be a random identifier, such as GUID (Globally Unique Identifier, globally unique identifier). Since the full report identifier is generated during the establishment of the connection, after the connection is established, the NVR device also needs to report the values of various status parameters acquired and recorded by the device to the client, so that the client and the device record the status parameters Value is consistent.
  • the state parameter for the process of detecting the current value of the state parameter, can be determined according to the state identifier carried in the connection request, the state information of each state parameter can be detected, and the detected state information can be converted into an easily identifiable value The converted value is determined as the current value of each state parameter.
  • Status parameters can be related to CPU status (normal or abnormal), channel status (online and offline and whether recording), hard disk status (sleep, abnormal, etc.), IO status (on or off), but not limited to this .
  • the connection request sent by the client can carry the status identifier corresponding to the status that the user wants to monitor, that is, the user can subscribe to the status according to actual needs, so that the NVR device only detects the status information of the subscription status, which can save Network traffic.
  • the detected state information is usually a series of character strings indicating normality or not, it is difficult for the user to recognize, so the state information can be converted into a value that is easy for the user to recognize.
  • the channel status information 0Xabcde indicates that the channel is online
  • the status information 0Xabcdf indicates that the channel is offline.
  • the trigger condition for detecting the current value of each state parameter may be: detection every preset duration, and / or detection when a trigger instruction is received.
  • the trigger instruction may be an instruction input by the user.
  • Step 202 Check whether the current value of the status parameter has changed from the recorded value of the status parameter. If there is no change, return to step 201, and if there is a change, execute step 203.
  • step 201 all the state parameter values obtained and recorded after the first connection between the NVR device and the client are reported to the client, so the state parameters maintained at both ends of the NVR device and the client The values are synchronized. If the current value of the subsequently detected state parameter is inconsistent with the recorded value of the state parameter, it indicates that the state parameter has changed. Go to step 203; if the current value of the subsequently detected state parameter is the same as the recorded value of the state parameter If the values are consistent, it indicates that the status parameter has not changed, and return to step 201.
  • Step 203 Report the current value of the status parameter to the client through the connection between the device and the client.
  • the current value of the status parameter may be used to update the recorded value of the status parameter.
  • verification can be implemented through a confirmation mechanism, that is, if the confirmation notification returned by the client is received, it indicates that the client received the reported value and updated it in time, so that the NVR The device can use the current value of the status parameter to update the recorded value of the status parameter so that the locally maintained value is synchronized with the client.
  • the reconnection between the NVR device and the client may be continuously triggered.
  • a preset timer for example, (The default duration is 10 minutes).
  • the timer is turned off and sent to the client
  • the second connection responds to re-establish a connection with the client; if the reconnection request sent by the client has not been received when the timer expires, the locally reported full reporting identifier corresponding to the client is deleted; After receiving the reconnection request sent by the client after the expiration of the device, regenerate and record the full report identifier corresponding to the client based on the reconnect request, and add the regenerated full report identifier to the first connection response and send Go to the client to establish a connection with the client again, and then obtain and record the values of various status parameters of the device, and report the values of the various status parameters to the client through the connection.
  • the process of detecting the disconnection between the device and the client is: the heartbeat packet can be sent to the client every preset heartbeat cycle, when there is no preset number of heartbeat cycles (for example, 3) When receiving the heartbeat response returned by the client, it is determined that the connection between the device and the client is broken.
  • the preset timer is used to indicate the tolerable length of disconnection. If the client's reconnection request is received before the timer expires, the timer is turned off; if the timer has not yet received the reconnection sent by the client Request, indicating that the recorded full report identifier is invalid, delete the recorded full report identifier corresponding to the client; when the client reconnect request is received after the timer expires, indicating that the connection disconnection time is too long, this The value of each status parameter in the device may change, but the client has not learned it, and the locally reported full report identifier has been deleted.
  • the device when receiving the reconnection request sent by the client, the locally reported full report identifier is deleted, the full report identifier is regenerated and recorded, and the regenerated full report identifier is added
  • the first connection response is reported to the client, obtain and record the value of each state parameter of the device again, and report the value of each state parameter to the client through the connection, so that the client and the device are maintained
  • the value of the status parameter is synchronized.
  • the current value of the state parameter can be detected, and when it is detected that the current value of the state parameter changes from the recorded value of the state parameter, the state parameter is connected through the connection between the device and the client The current value of is reported to the client, and the current value of the status parameter is used to update the recorded value of the status parameter.
  • FIG. 3 is a hardware structure diagram of an electronic device according to an exemplary embodiment of the present application.
  • the electronic device includes: a communication interface 301, a processor 302, a machine-readable storage medium 303, a bus 304, and a physical storage medium 305; Among them, the communication interface 301, the processor 302, the machine-readable storage medium 303 and the physical storage medium 305 complete communication with each other through the bus 304.
  • the processor 302 can execute the device state monitoring method described above by reading and executing the machine executable instructions corresponding to the control logic of the device state monitoring method in the machine-readable storage medium 302. For the specific content of the method, refer to the above embodiments , No longer exhausted here.
  • the machine-readable storage medium 303 mentioned in this application may be any electronic, magnetic, optical, or other physical storage device, and may contain or store information, such as executable instructions, data, and so on.
  • the machine-readable storage medium may be: volatile memory, non-volatile memory, or similar storage media.
  • the machine-readable storage medium 303 may be RAM (Radom Access Memory, random access memory), flash memory, storage drive (such as a hard disk drive), any type of storage disk (such as optical disk, DVD, etc.), or similar storage Media, or a combination of them.
  • FIG. 4 is a structural diagram of an embodiment of an apparatus state monitoring apparatus according to an exemplary embodiment of the present application.
  • the apparatus state monitoring apparatus is applied to electronic equipment. As shown in FIG. 4, the apparatus state monitoring apparatus includes:
  • the detection module 410 is used to detect the current value of the state parameter
  • the checking module 420 is used to check whether the current value of the status parameter has changed from the recorded value of the status parameter;
  • the change reporting module 430 is configured to report the current value of the status parameter to the client through the connection between the device and the client when checking for changes.
  • the device further includes (not shown in FIG. 4):
  • a connection establishment module configured to receive a connection request sent by a client; generate and record a full-volume reporting identifier corresponding to the client based on the connection request, and the full-volume reporting identifier is used to indicate whether to perform full-volume reporting after establishing a connection;
  • the generated full report identifier is added to the first connection response and sent to the client to successfully establish the connection between the device and the client, and then obtain and record the values of various status parameters of the device and pass the The connection reports the value of each state parameter to the client.
  • the device further includes (not shown in FIG. 4):
  • a reconnection module used to start a preset timer (for example, the preset duration is 10 minutes) when the connection between the device and the client is detected to be disconnected; if it is received before the timer expires If the reconnection request sent by the client and the full report identifier carried in the reconnection request are consistent with the locally recorded full report identifier corresponding to the client, the timer is turned off and sent to the client A second connection response to re-establish a connection with the client; if the reconnection request sent by the client is not received when the timer expires, delete the locally recorded corresponding to the client Full report identifier; when a reconnection request sent by the client is received after the timer expires, a full report identifier corresponding to the client is regenerated and recorded based on the reconnection request, and the The generated full report identifier is added to the first connection response and sent to the client to re-establish a connection with the client, and then, obtain and record the status parameters of the
  • the state parameter refers to a state parameter corresponding to the state identifier carried in the connection request; the value or initial value of the state parameter is an easily identifiable identifier determined according to the obtained state information .
  • connection request sent by the client may carry a status identifier corresponding to the status that the user wants to monitor, that is, the user can subscribe to the status according to actual needs, so that the NVR device only detects the status information of the subscription status.
  • the device further includes (not shown in FIG. 4):
  • the detection module 410 is specifically configured to detect the current value of the state parameter every preset duration; and / or, when receiving the trigger instruction, detect the current value of the state parameter.
  • the relevant parts can be referred to the description of the method embodiments.
  • the device embodiments described above are only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in One place, or it can be distributed to multiple network elements. Part or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present application. Those of ordinary skill in the art can understand and implement without paying creative labor.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Quality & Reliability (AREA)
  • General Physics & Mathematics (AREA)
  • Signal Processing (AREA)
  • Mathematical Physics (AREA)
  • Multimedia (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer And Data Communications (AREA)

Abstract

本申请提供一种设备状态监控方法及装置,方法包括:检测状态参数的当前值;检查所述状态参数的当前值相对已记录的所述状态参数的值是否有变化;若有变化,则通过设备与客户端之间的连接将所述状态参数的当前值上报至所述客户端。

Description

设备状态监控方法及装置
相关申请的交叉引用
本专利申请要求于2018年10月17日提交的、申请号为201811211115X、发明名称为“设备状态监控方法及装置”的中国专利申请的优先权,该申请的全文以引用的方式并入本文中。
技术领域
本申请涉及通信技术领域,尤其涉及一种设备状态监控方法及装置。
背景技术
在视频监控领域中,客户端需要对视频监控***中NVR(Network Video Recorder,网络硬盘录像机)设备的各个状态(如中央处理器(Central Processing Unit,CPU)状态、硬件状态、通道状态、磁盘状态、IO(input/output)状态等)进行监控。
目前,客户端是通过巡检方式,定时向各个视频监控***中的NVR设备发送状态查询命令(如MIP(Management Information Database,管理信息库)命令)。NVR设备在接收到状态查询命令后,获取本设备中各个状态对应的状态参数,并向客户端返回获取到的各个状态的状态参数,从而实现客户端对各个NVR设备的状态的监控。然而,当需要监控的NVR设备数量比较大时,会导致客户端接收数据压力很大。
发明内容
有鉴于此,本申请提供一种设备状态监控方法及装置。
根据本申请实施例的第一方面,提供一种设备状态监控方法,应用于电子设备,所述方法包括:检测状态参数的当前值;检查所述状态参数的当前值相对已记录的所述状态参数的值是否有变化;若有变化,则通过所述电子设备与客户端之间的连接将所述状态参数的当前值上报至所述客户端。
根据本申请实施例的第二方面,提供一种设备状态监控装置,应用于电子设备,所述装置包括:检测模块,用于检测状态参数的当前值;检查模块,用于检查所述状态参 数的当前值相对已记录的所述状态参数的值是否有变化;变化上报模块,用于在检查有变化时,通过所述电子设备与客户端之间的连接将所述状态参数的当前值上报至所述客户端。
根据本申请实施例的第三方面,提供一种电子设备,所述设备包括可读存储介质和处理器;其中,所述可读存储介质,用于存储机器可执行指令;所述处理器,用于读取所述可读存储介质上的所述机器可执行指令,并执行所述指令以实现上述第一方面所述的步骤。
根据本申请实施例的第四方面,提供一种计算机可读存储介质,所述计算机可读存储介质内存储有计算机程序;所述计算机程序被处理器执行以实现上述第一方面所述的步骤。
附图说明
图1为本申请根据一示例性实施例示出的一种视频监控***结构图;
图2为本申请根据一示例性实施例示出的一种设备状态监控方法的实施例流程图;
图3为本申请根据一示例性实施例示出的一种电子设备的硬件结构图;
图4为本申请根据一示例性实施例示出的一种设备状态监控装置的实施例结构图。
具体实施方式
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本申请相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本申请的一些方面相一致的装置和方法的例子。
在本申请使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本申请。在本申请和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。还应当理解,本文中使用的术语“和/或”是指并包含一个或多个相关联的列出项目的任何或所有可能组合。
应当理解,尽管在本申请可能采用术语第一、第二、第三等来描述各种信息,但这些信息不应限于这些术语。这些术语仅用来将同一类型的信息彼此区分开。例如,在不脱离本申请范围的情况下,第一信息也可以被称为第二信息,类似地,第二信息也可以 被称为第一信息。取决于语境,如在此所使用的词语“如果”可以被解释成为“在……时”或“当……时”或“响应于确定”。
图1为本申请根据一示例性实施例示出的一种视频监控***结构图,图1所示的***包含前端摄像头(图1示例性示出了3个前端摄像头)、NVR设备和客户端,前端摄像头用于采集周边的视频数据;NVR设备用于存储前端摄像头通过网络传输的视频数据;客户端可以通过安装的视频监控管理程序(SDK(Software Development Kit,软件开发工具包)包)来监控NVR设备的各个状态,且客户端可以对多个视频监控***中的NVR设备的状态进行监控。
目前,客户端需要定时向NVR设备发送状态查询命令,以获取NVR设备中各个状态的状态参数,并根据获取的状态参数判断是否存在异常的状态。如果判断存在异常的状态,向用户提示该异常的状态。然而,当客户端监控的NVR设备数量比较大时,会导致客户端的接收数据压力很大,并且有些状态参数通常是不会频繁变化的,如果针对每次查询都返回所有状态的状态参数,会浪费网络流量
基于此,NVR设备可以检测状态参数的当前值,当检查到该状态参数的当前值相对已记录的该状态参数的值有变化时,通过本设备与客户端之间的连接将该状态参数的当前值上报至客户端。
基于上述描述可知,对于每次检测到的状态参数的当前值,只上报有变化的参数值,无需客户端定时查询各个状态,从而可减少设备与客户端的网络交互。由于客户端每次接收的只是有变化的状态参数的值,并非所有状态参数的值,因此可以降低客户端接收数据压力,节省网络流量,特别是在网络环境比较差的情况下,可以提高状态上报实时性。
需要说明的是,本申请的技术方案可以对各种类型的电子设备的状态进行监控,并不限定于对NVR设备状态的监控。
图2为本申请根据一示例性实施例示出的一种设备状态监控方法的实施例流程图。该设备状态监控方法可以应用在电子设备上,下面以电子设备为NVR设备为例进行详细说明。如图2所示,该设备状态监控方法包括如下步骤:
步骤201:检测状态参数的当前值。
在一实施例中,在执行步骤201之前需要本设备与客户端之间建立连接。建立连接的过程是:在接收到客户端发送的连接请求时,基于该连接请求生成并记录与该客户端 对应的全量上报标识,并将生成的全量上报标识添加至第一连接响应并发送至该客户端,以成功建立本设备与客户端之间的连接。然后,获取并记录本设备的各个状态参数的值,并通过所述连接将各个状态参数的值上报至客户端。
其中,在将NVR设备布防到视频监控***中后,该NVR设备在接收到客户端发送的连接请求(包含空的全量上报标识)时,生成并记录与该客户端对应的全量上报标识,以用于指示建立连接之后是否进行全量上报,全量上报标识可以是一个随机标识,如GUID(Globally Unique Identifier,全局唯一标识符)。由于在建立该连接过程中有生成全量上报标识,在建立连接后,NVR设备还需要将本设备获取并记录的各个状态参数的值上报至客户端,使得客户端与本设备记录的各个状态参数的值一致。
在一实施例中,针对检测状态参数的当前值过程,可以根据连接请求中携带的状态标识确定状态参数,检测各个状态参数的状态信息,将检测到的状态信息转换为易于识别的值,并将转换得到的值确定为各个状态参数的当前值。状态参数可以为分别与CPU状态(正常或异常)、通道状态(在线离线和是否在录像)、硬盘状态(休眠、异常等)、IO状态(开或关)相关的参数,但并不限于此。
其中,客户端发送的连接请求中可以携带用户想监控的状态对应的状态标识,即用户可以根据实际需求订阅状态,从而NVR设备只检测订阅状态的状态信息便可,可以节省状态监控过程中的网络流量。由于检测到的状态信息通常是一连串用于指示正常与否等的字符串,对于用户来说很难识别,因此可以将状态信息转换为易于用户识别的值。假设通道状态的状态信息0Xabcde表示的是通道在线,状态信息0Xabcdf表示的是通道下线,可以将0Xabcde的状态信息转换为值0,表示通道在线,0Xabcdf的状态信息转换为值1,表示通道下线。
需要说明的是,检测各个状态参数的当前值的触发条件可以是:每隔预设时长检测,和/或当接收到触发指令时检测。其中,触发指令可以是用户输入的指令。
步骤202:检查该状态参数的当前值相对已记录的该状态参数的值是否有变化,若无变化,则返回执行步骤201,若有变化,则执行步骤203。
在一实施例中,基于上述步骤201所述,NVR设备与客户端第一次连接后获取并记录的所有状态参数的值全量上报至客户端,因此NVR设备与客户端两端维护的状态参数的值是同步的。如果后续检测到的状态参数的当前值与已记录的该状态参数的值不一致,表示该状态参数有变化,执行步骤203;如果后续检测到的状态参数的当前值与已 记录的该状态参数的值一致,表示该状态参数没有变化,返回继续执行步骤201。
步骤203:通过本设备与客户端之间的连接将该状态参数的当前值上报至客户端。
在一实施例中,在将该状态参数的当前值上报至客户端之后,可以在接收到客户端返回的确认通知时,利用该状态参数的当前值更新已记录的该状态参数的值。
其中,为了验证NVR设备上报的值是否被客户端接收,可以通过确认机制实现验证,即如果接收到客户端返回的确认通知,表示客户端接收到了上报的值,且进行了及时更新,从而NVR设备可以利用该状态参数的当前值更新已记录的该状态参数的值,使得本地维护的值与客户端是同步的。
针对上述步骤201至步骤203的过程,需要说明的是,为了避免NVR设备与客户端每次重连之后都需要将所有状态参数的值全量上报至客户端的情况,尤其是在网络抖动严重时,NVR设备与客户端之间可能会不断的触发重连,在客户端与NVR设备建立连接之后,当检测到本设备与客户端之间的连接断开时,启动预设的定时器(比如,预设时长为10分钟)。若在定时器到期之前接收到客户端发送的重连接请求且重连接请求携带的全量上报标识与本地记录的与该客户端对应的全量上报标识一致,则关闭定时器,并向客户端发送第二连接响应,以重新与客户端建立连接;若在定时器到期时仍未接收到客户端发送的重连接请求,则删除本地记录的与该客户端对应的全量上报标识;当在定时器到期之后接收到客户端发送的重连接请求时,基于该重连接请求重新生成并记录与该客户端对应的全量上报标识,并将重新生成的全量上报标识添加至第一连接响应并发送至该客户端以重新与客户端建立连接,然后获取并记录本设备的各个状态参数的值,并通过所述连接将各个状态参数的值上报至该客户端。
其中,检测到本设备与客户端之间的连接断开的过程是:可以每隔预设的心跳周期向客户端发送心跳包,当在预设数量个(比如,3个)心跳周期内未接收到客户端返回的心跳响应时,确定本设备与该客户端之间的连接断开。
预设的定时器用于表示能够容忍的连接断开时长,如果在定时器到期前接收到客户端的重连接请求,关闭定时器;如果定时器到期时仍未接收到客户端发送的重连接请求,表示已记录的全量上报标识失效,删除已记录的与该客户端对应的全量上报标识;当在定时器到期后才接收到客户端的重连接请求,表示连接断开时间太长,本设备中各状态参数的值可能都发生变化,而客户端并未获知到,且本地已记录的全量上报标识已被删除,需要重新生成并记录一个与该客户端对应的全量上报标识,以在本设备与客户端成 功建立连接之后,再次获取并记录本设备的各个状态参数的值,并通过所述连接将各个状态参数的值全量上报至该客户端,使客户端与本设备维护的状态参数的值是同步的。
由此可知,通过定时器到期,全量上报标识失效删除的方式,可以保证网络抖动严重情况下触发的多次重连不会出现多次全量上报的情况,避免客户端与本设备之间产生数据风暴的问题。
需要进一步说明的是,如果本设备重启,则在接收到客户端发送的重连接请求时,将本地记录的全量上报标识删除,重新生成并记录全量上报标识,并将重新生成的全量上报标识添加至第一连接响应上报至客户端之后,再次获取并记录本设备的各个状态参数的值,并通过所述连接将所述各个状态参数的值上报至该客户端,使客户端与本设备维护的状态参数的值是同步的。
本申请实施例中,可以检测状态参数的当前值,当检查到该状态参数的当前值相对已记录的该状态参数的值有变化时,通过本设备与客户端之间的连接将该状态参数的当前值上报至客户端,并利用该状态参数的当前值更新已记录的该状态参数的值。
基于上述描述可知,对于每次检测到的状态参数的当前值,只上报有变化的值,无需客户端定时查询各个状态,从而可减少设备与客户端的网络交互,并且又由于客户端每次接收的只是有变化的状态参数的值,并非所有状态参数的值,因此可以降低客户端接收数据压力,节省网络流量,特别是在网络环境比较差的情况下,可以提高状态上报实时性。
图3为本申请根据一示例性实施例示出的一种电子设备的硬件结构图,该电子设备包括:通信接口301、处理器302、机器可读存储介质303、总线304以及物理存储介质305;其中,通信接口301、处理器302、机器可读存储介质303和物理存储介质305通过总线304完成相互间的通信。处理器302通过读取并执行机器可读存储介质302中与设备状态监控方法的控制逻辑对应的机器可执行指令,可执行上文描述的设备状态监控方法,该方法的具体内容参见上述实施例,此处不再累述。
本申请中提到的机器可读存储介质303可以是任何电子、磁性、光学或其它物理存储装置,可以包含或存储信息,如可执行指令、数据等等。例如,机器可读存储介质可以是:易失性存储器、非易失性存储器或者类似的存储介质。具体地,机器可读存储介质303可以是RAM(Radom Access Memory,随机存取存储器)、闪存、存储驱动器(如硬盘驱动器)、任何类型的存储盘(如光盘、DVD等),或者类似的存储介质,或者 它们的组合。
图4为本申请根据一示例性实施例示出的一种设备状态监控装置的实施例结构图,所述设备状态监控装置应用于电子设备,如图4所示,所述设备状态监控装置包括:
检测模块410,用于检测状态参数的当前值;
检查模块420,用于检查所述状态参数的当前值相对已记录的所述状态参数的值是否有变化;
变化上报模块430,用于在检查有变化时,通过本设备与客户端之间的连接将所述状态参数的当前值上报至所述客户端。
在一可选实现方式中,所述装置还包括(图4中未示出):
建立连接模块,用于接收客户端发送的连接请求;基于所述连接请求生成并记录与所述客户端对应的全量上报标识,所述全量上报标识用于指示建立连接之后是否进行全量上报;将生成的全量上报标识添加至第一连接响应并发送至所述客户端,以成功建立本设备与客户端之间的连接,然后,获取并记录本设备的各个状态参数的值,并通过所述连接将所述各个状态参数的值上报至所述客户端。
在一可选实现方式中,所述装置还包括(图4中未示出):
重连接模块,用于当检测到本设备与客户端之间的连接断开时,启动预设的定时器(比如,预设时长为10分钟);若在所述定时器到期之前接收到所述客户端发送的重连接请求且所述重连接请求携带的全量上报标识与本地记录的与所述客户端对应的全量上报标识一致,则关闭所述定时器,并向所述客户端发送第二连接响应,以重新与所述客户端建立连接;若在所述定时器到期时仍未接收到所述客户端发送的重连接请求,则删除本地记录的与所述客户端对应的全量上报标识;当在所述定时器到期之后接收到所述客户端发送的重连接请求时,基于所述重连接请求重新生成并记录与所述客户端对应的全量上报标识,并将重新生成的全量上报标识添加至第一连接响应并发送至所述客户端以重新与所述客户端建立连接,然后,获取并记录本设备的各个状态参数的值,并通过所述连接将所述各个状态参数的值上报至所述客户端。
在一可选实现方式中,所述状态参数指的是所述连接请求中携带的状态标识对应的状态参数;所述状态参数的值或初始值是依据获取的状态信息确定的易识别的标识。
在一可选实现方式中,客户端发送的连接请求中可以携带用户想监控的状态对应的 状态标识,即用户可以根据实际需求订阅状态,从而NVR设备只检测订阅状态的状态信息。
在一可选实现方式中,所述装置还包括(图4中未示出):
确认模块,用于所述变化上报模块430在通过本设备与客户端之间的连接将所述状态参数的当前值上报至所述客户端之后,在接收到来自所述客户端的确认通知时,利用所述状态参数的当前值更新已记录的所述状态参数的值。
在一可选实现方式中,所述检测模块410,具体用于每隔预设时长,检测状态参数的当前值;和/或,当接收到触发指令时,检测状态参数的当前值。
上述装置中各个单元的功能和作用的实现过程具体详见上述方法中对应步骤的实现过程,在此不再赘述。
对于装置实施例而言,由于其基本对应于方法实施例,所以相关之处参见方法实施例的部分说明即可。以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本申请方案的目的。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本申请的其它实施方案。本申请旨在涵盖本申请的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本申请的一般性原理并包括本申请未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本申请的真正范围和精神由下面的权利要求指出。
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、商品或者设备中还存在另外的相同要素。
以上所述仅为本申请的较佳实施例而已,并不用以限制本申请,凡在本申请的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本申请保护的范围之内。

Claims (14)

  1. 一种设备状态监控方法,应用于电子设备,所述方法包括:
    检测状态参数的当前值;
    检查所述状态参数的当前值相对已记录的所述状态参数的值是否有变化;
    若有变化,则通过所述电子设备与客户端之间的连接将所述状态参数的当前值上报至所述客户端。
  2. 根据权利要求1所述的方法,其特征在于,检测所述状态参数的当前值之前,进一步包括:
    接收所述客户端发送的连接请求;
    基于所述连接请求生成并记录与所述客户端对应的全量上报标识,所述全量上报标识用于指示建立连接之后是否进行全量上报;
    将所生成的所述全量上报标识添加至第一连接响应后,将所述第一连接响应发送至所述客户端,以成功建立所述电子设备与所述客户端之间的连接;
    获取并记录所述电子设备的所述状态参数的值,并
    通过所述电子设备与所述客户端之间的连接将所述状态参数的值上报至所述客户端。
  3. 根据权利要求1所述的方法,其特征在于,进一步包括:
    当检测到所述电子设备与所述客户端之间的连接断开时,启动预设的定时器;
    若在所述定时器到期之前接收到所述客户端发送的重连接请求且所述重连接请求携带的全量上报标识与所述电子设备本地记录的与所述客户端对应的全量上报标识一致,则关闭所述定时器,并向所述客户端发送第二连接响应,以重新与所述客户端建立连接;
    若在所述定时器到期时仍未接收到所述客户端发送的重连接请求,则删除所述电子设备本地记录的与所述客户端对应的全量上报标识。
  4. 根据权利要求2所述的方法,其特征在于,
    所述状态参数指的是所述连接请求中携带的状态标识对应的状态参数;
    所述状态参数的值或初始值是依据获取的状态信息确定的易识别的标识。
  5. 根据权利要求1所述的方法,其特征在于,利用所述状态参数的当前值更新已记录的所述状态参数的值包括:
    在接收到来自所述客户端的确认通知时,利用所述状态参数的当前值更新已记录的所述状态参数的值。
  6. 根据权利要求1所述的方法,其特征在于,检测所述状态参数的当前值,包括:
    每隔预设时长,检测所述状态参数的当前值;和/或,
    当接收到触发指令时,检测所述状态参数的当前值。
  7. 一种设备状态监控装置,应用于电子设备,所述装置包括:
    检测模块,用于检测状态参数的当前值;
    检查模块,用于检查所述状态参数的当前值相对已记录的所述状态参数的值是否有变化;
    变化上报模块,用于在检查到有变化时,通过所述电子设备与客户端之间的连接将所述状态参数的当前值上报至所述客户端。
  8. 根据权利要求7所述的装置,其特征在于,所述装置还包括:
    建立连接模块,用于接收所述客户端发送的连接请求;基于所述连接请求生成并记录与所述客户端对应的全量上报标识,所述全量上报标识用于指示建立连接之后是否进行全量上报;将所生成的所述全量上报标识添加至第一连接响应并将所述第一连接响应发送至所述客户端,以成功建立所述电子设备与所述客户端之间的连接,获取并记录所述电子设备的所述状态参数的值,并通过所述连接将所述状态参数的值上报至所述客户端。
  9. 根据权利要求7所述的装置,其特征在于,所述装置还包括:
    重连接模块,用于当检测到所述电子设备与所述客户端之间的连接断开时,启动预设的定时器;若在所述定时器到期之前接收到所述客户端发送的重连接请求且所述重连接请求携带的全量上报标识与所述电子设备本地记录的与所述客户端对应的全量上报标识一致,则关闭所述定时器,并向所述客户端发送第二连接响应,以重新与所述客户端建立连接;若在所述定时器到期时仍未接收到所述客户端发送的重连接请求,则删除所述电子设备本地记录的与所述客户端对应的全量上报标识。
  10. 根据权利要求8所述的装置,其特征在于,
    所述状态参数指的是所述连接请求中携带的状态标识对应的状态参数;
    所述状态参数的值或初始值是依据获取的状态信息确定的易识别的标识。
  11. 根据权利要求7所述的装置,其特征在于,所述装置还包括:
    确认模块,用于所述变化上报模块在通过所述电子设备与所述客户端之间的所述连接将所述状态参数的当前值上报至所述客户端之后,在接收到来自所述客户端的确认通知时,利用所述状态参数的当前值更新已记录的所述状态参数的值。
  12. 根据权利要求7所述的装置,其特征在于,所述检测模块具体用于每隔预设时 长,检测所述状态参数的当前值;和/或,当接收到触发指令时,检测所述状态参数的当前值。
  13. 一种电子设备,包括处理器、通信接口、存储介质和通信总线,其中,所述处理器、通信接口、存储介质通过所述通信总线完成相互间的通信;
    所述存储介质,用于存放机器可执行指令;
    所述处理器,用于执行所述存储介质上所存放的机器可执行指令时,实现权利要求1-6任一所述的方法步骤。
  14. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现权利要求1-6任一所述的方法步骤。
PCT/CN2019/111323 2018-10-17 2019-10-15 设备状态监控方法及装置 WO2020078355A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
US17/285,551 US11930292B2 (en) 2018-10-17 2019-10-15 Device state monitoring method and apparatus
EP19874086.2A EP3852363A4 (en) 2018-10-17 2019-10-15 DEVICE STATE MONITORING PROCESS AND APPARATUS

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811211115.X 2018-10-17
CN201811211115.XA CN111064957B (zh) 2018-10-17 2018-10-17 设备状态监控方法及装置

Publications (1)

Publication Number Publication Date
WO2020078355A1 true WO2020078355A1 (zh) 2020-04-23

Family

ID=70283687

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/111323 WO2020078355A1 (zh) 2018-10-17 2019-10-15 设备状态监控方法及装置

Country Status (4)

Country Link
US (1) US11930292B2 (zh)
EP (1) EP3852363A4 (zh)
CN (1) CN111064957B (zh)
WO (1) WO2020078355A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112398955B (zh) * 2021-01-19 2021-04-16 树根互联技术有限公司 物联网设备状态事件的处理方法、装置和电子设备
CN113923397B (zh) * 2021-09-28 2023-12-19 北京字跳网络技术有限公司 会议室设备的状态检测方法、装置、电子设备和存储介质
CN114416186A (zh) * 2021-12-29 2022-04-29 河南紫联物联网技术有限公司 一种设备关闭方法、装置及电子设备

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101309277A (zh) * 2008-06-19 2008-11-19 华为技术有限公司 Sip终端及其上报状态的方法、***以及处理该上报状态的方法、设备
CN101651665A (zh) * 2008-08-14 2010-02-17 华为技术有限公司 一种实现媒体资源播放状态检测的控制方法、装置及***
CN105847052A (zh) * 2016-03-23 2016-08-10 浪潮(苏州)金融技术服务有限公司 基于Net-SNMP开源库的自助设备状态监控方法
US20170134395A1 (en) * 2015-11-05 2017-05-11 Trilliant Networks, Inc. Method and apparatus for secure aggregated event reporting

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020169738A1 (en) * 2001-05-10 2002-11-14 Giel Peter Van Method and system for auditing an enterprise configuration
US7644376B2 (en) 2003-10-23 2010-01-05 Microsoft Corporation Flexible architecture for notifying applications of state changes
US9477734B2 (en) 2011-05-10 2016-10-25 Microsoft Technology Licensing, Llc Data synch notification using a notification gateway
CN102821011A (zh) * 2012-08-28 2012-12-12 北京星网锐捷网络技术有限公司 对端状态检测方法、装置及设备
KR102193619B1 (ko) * 2013-07-01 2020-12-21 삼성전자주식회사 전자 디바이스에서 어플리케이션의 상태정보를 업데이트하는 방법, 관리하는 방법 및 그 전자 디바이스
CN104202565A (zh) * 2014-08-27 2014-12-10 上海熙菱信息技术有限公司 一种基于b/s架构的智能安防设备实时状态显示***
JP2017535128A (ja) 2014-09-24 2017-11-24 ブイ・5・システムズ・インコーポレイテッド 動的データ管理
US9983812B1 (en) * 2016-06-13 2018-05-29 EMC IP Holding Company LLC Automated node failure detection in an active/hot-standby storage cluster
JP2018032298A (ja) * 2016-08-26 2018-03-01 スター精密株式会社 デバイス状態監視システム、デバイス状態監視装置およびデバイス状態監視方法
CN106453657A (zh) * 2016-12-07 2017-02-22 海信集团有限公司 智能家居设备的状态信息更新方法及装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101309277A (zh) * 2008-06-19 2008-11-19 华为技术有限公司 Sip终端及其上报状态的方法、***以及处理该上报状态的方法、设备
CN101651665A (zh) * 2008-08-14 2010-02-17 华为技术有限公司 一种实现媒体资源播放状态检测的控制方法、装置及***
US20170134395A1 (en) * 2015-11-05 2017-05-11 Trilliant Networks, Inc. Method and apparatus for secure aggregated event reporting
CN105847052A (zh) * 2016-03-23 2016-08-10 浪潮(苏州)金融技术服务有限公司 基于Net-SNMP开源库的自助设备状态监控方法

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3852363A4 *

Also Published As

Publication number Publication date
EP3852363A1 (en) 2021-07-21
US20210385406A1 (en) 2021-12-09
US11930292B2 (en) 2024-03-12
CN111064957A (zh) 2020-04-24
EP3852363A4 (en) 2021-11-03
CN111064957B (zh) 2021-03-23

Similar Documents

Publication Publication Date Title
WO2020078355A1 (zh) 设备状态监控方法及装置
WO2017097130A1 (zh) 一种分布式存储***的服务节点切换方法和装置
WO2018214887A1 (zh) 数据存储方法、存储服务器、存储介质及***
CN109274544B (zh) 一种分布式存储***的故障检测方法及装置
CN110830283B (zh) 故障检测方法、装置、设备和***
CN104065526B (zh) 一种服务器故障报警的方法和装置
JP2012108642A (ja) データ収集システム、データ収集システムの異常要因判定方法
CN102227131A (zh) 网络视频录像机的热备份***及方法
US20120124221A1 (en) Element terminal and communication system
WO2011124177A2 (zh) 设备之间的交互方法和机器通信网络***
US10721135B1 (en) Edge computing system for monitoring and maintaining data center operations
WO2023173870A1 (zh) 一种存储设备的控制方法、装置、电子设备及非易失性可读存储介质
CN114764380A (zh) 一种基于etcd的分布式集群控制方法和装置
CN108243031B (zh) 一种双机热备的实现方法及装置
CN111342986B (zh) 分布式节点管理方法及装置、分布式***、存储介质
CN111083176B (zh) 一种监控摄像机云端自适应上线方法及装置
JP5625605B2 (ja) Os動作状態確認システム、確認対象装置、os動作状態確認装置、os動作状態確認方法およびプログラム
JP2008225567A (ja) 情報処理システム
WO2022228012A1 (zh) 异常处理方法、装置、电子设备及***
CN104346233A (zh) 一种用于计算机***的故障恢复方法及装置
CN113778746A (zh) 时序数据库集群数据处理方法、装置、介质和电子设备
CN105072418A (zh) 一种判断监控前端设备离线的方法和装置
TWI512453B (zh) 主備伺服器切換系統及方法
TW201828087A (zh) 分布式儲存系統的服務節點切換方法及裝置
CN117033084B (zh) 虚拟机备份方法、装置、电子设备及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19874086

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2019874086

Country of ref document: EP

Effective date: 20210414