[go: up one dir, main page]

CN111157223B - Fault detection method, device and system - Google Patents

Fault detection method, device and system Download PDF

Info

Publication number
CN111157223B
CN111157223B CN201911418997.1A CN201911418997A CN111157223B CN 111157223 B CN111157223 B CN 111157223B CN 201911418997 A CN201911418997 A CN 201911418997A CN 111157223 B CN111157223 B CN 111157223B
Authority
CN
China
Prior art keywords
picture
picture message
message
sending device
detection
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911418997.1A
Other languages
Chinese (zh)
Other versions
CN111157223A (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201911418997.1A priority Critical patent/CN111157223B/en
Publication of CN111157223A publication Critical patent/CN111157223A/en
Application granted granted Critical
Publication of CN111157223B publication Critical patent/CN111157223B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01MTESTING STATIC OR DYNAMIC BALANCE OF MACHINES OR STRUCTURES; TESTING OF STRUCTURES OR APPARATUS, NOT OTHERWISE PROVIDED FOR
    • G01M11/00Testing of optical apparatus; Testing structures by optical methods not otherwise provided for

Landscapes

  • Chemical & Material Sciences (AREA)
  • Analytical Chemistry (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Telephonic Communication Services (AREA)
  • Alarm Systems (AREA)

Abstract

一种设备故障检测技术,图片报文发送设备在没有业务图片报文发送时,发送额外的图片检测报文给图片报文接收设备,从而维持图片报文的发送频度,避免所述图片报文发送设备长时间没有图片报文发送出去。图片报文接收设备接收所述图片报文发送设备所发生的图片报文,当图片报文接收设备在预设时长内没有收到图片报文,则说明图片报文发送设备出现故障,图片报文接收设备即可发出故障告警。

Figure 201911418997

A device failure detection technology. When no service picture message is sent, a picture message sending device sends an additional picture detection message to a picture message receiving device, thereby maintaining the sending frequency of picture messages and avoiding the picture message. The message sending device does not send any picture message for a long time. The picture message receiving device receives the picture message generated by the picture message sending device. When the picture message receiving device does not receive the picture message within the preset time period, it means that the picture message sending device is faulty and the picture message The message receiving device can issue a fault alarm.

Figure 201911418997

Description

一种故障检测方法装置和系统A fault detection method, device and system

技术领域technical field

本发明涉及计算机领域,尤其涉及一种设备故障检测。The invention relates to the field of computers, and in particular, to equipment fault detection.

背景技术Background technique

视频监控从传统以视频的内容为主逐步发展到以智能图片的内容来更好的支撑业务应用。在当前智能时代,在前端摄像机或后端分析平台产生大量智能抓拍图片,在公安、交通以及各行业有着广泛的应用。Video surveillance has gradually developed from traditional video content to intelligent picture content to better support business applications. In the current era of intelligence, a large number of intelligent snapshots are generated by front-end cameras or back-end analysis platforms, which are widely used in public security, transportation and various industries.

然而,如何发现摄像机是否工作正常对于行业标准以及业界厂家而言都是一个难题。一种现行的做法是在图片发送方和接收方之间建立心跳(heartbeat)机制,接收方可以通过检测心跳报文来判断发送方是否存活。心跳机制适用于大多数的计算机设备之间。However, how to find out whether the camera is working properly is a difficult problem for both industry standards and industry manufacturers. A current practice is to establish a heartbeat mechanism between the picture sender and the receiver, and the receiver can determine whether the sender is alive by detecting the heartbeat message. The heartbeat mechanism works between most computer devices.

然而,心跳机制只能进行较少功能的检测,例如:检测通信双方的网络通道正常、检测心跳发送方是否宕机。如果想要检测摄像机作为图片报文生成设备而拥有的、涉及到图片报文的功能是否正常,那么现有的心跳机制无能为力。However, the heartbeat mechanism can only perform detection of less functions, such as: detecting that the network channel of both parties is normal, and detecting whether the sender of the heartbeat is down. If you want to detect whether the function of the camera as a picture message generating device related to picture messages is normal, the existing heartbeat mechanism is powerless.

发明内容SUMMARY OF THE INVENTION

第一方面,本发明实施例提供一种设备故障检测方法,图片报文接收设备与图片报文发送设备通信,所述方法包括:所述图片报文接收设备接收所述图片报文发送设备发送的第一图片报文;所述图片报文接收设备判断自从接收到所述第一图片报文之后,是否在第一时长内接收到所述图片报文发送设备发送的第二图片报文;当所述图片报文接收设备没有接收到所述第二图片报文,则所述图片报文接收设备发出故障告警信号,其中,所述第二图片报文是检测图片报文。In a first aspect, an embodiment of the present invention provides a device fault detection method. A picture message receiving device communicates with a picture message sending device. The method includes: the picture message receiving device receives the picture message and sends the picture message sent by the device. The first picture message; the picture message receiving device determines whether it has received the second picture message sent by the picture message sending device within the first time period since receiving the first picture message; When the picture message receiving device does not receive the second picture message, the picture message receiving device sends a fault alarm signal, where the second picture message is a detection picture message.

应用该方案,图片报文接收设备可以发现图片报文发送设备的涉及到图片报文的功能是否故障。By applying this solution, the picture message receiving device can find out whether the function related to the picture message of the picture message sending device is faulty.

第一方面的第一种可能实现方式中,所述告警信号用于指示所述图片报文发送设备的图片报文生成功能故障。该方案中告警信号进一步提示了故障的具体类型。In a first possible implementation manner of the first aspect, the alarm signal is used to indicate a failure of the picture message generation function of the picture message sending device. The alarm signal in this solution further indicates the specific type of the fault.

第一方面的第二种可能实现方式中,所述检测图片报文是TLV数据结构封装成的RTP报文,所述告警信号用于指示的故障包括:构造TLV数据结构的功能发生故障;或者,把所述TLV数据结构封装到RTP报文的功能故障。该方案中告警信号进一步提示了故障的具体类型。In a second possible implementation manner of the first aspect, the detection picture message is an RTP message encapsulated into a TLV data structure, and the fault indicated by the alarm signal includes: a function of constructing the TLV data structure fails; or , the function failure of encapsulating the TLV data structure into the RTP message. The alarm signal in this solution further indicates the specific type of the fault.

第一方面的第三种可能实现方式中,所述检测图片报文是json数据结构封装成的HTTP报文,所述告警信号用于指示的故障包括:构造json数据结构的功能发生故障;或者,把所述json数据结构封装到HTTP报文的功能故障。该方案中告警信号进一步提示了故障的具体类型。In a third possible implementation manner of the first aspect, the detection picture message is an HTTP message encapsulated in a json data structure, and the fault indicated by the alarm signal includes: the function of constructing the json data structure fails; or , the functional failure of encapsulating the json data structure into an HTTP message. The alarm signal in this solution further indicates the specific type of the fault.

第一方面的第四种可能实现方式中,所述图片报文接收设备存储所述第一图片报文中的业务图片;所述图片报文接收设备抛弃所述第二图片报文中的数据。该方案对检测图片报文中的内容不予以存储,节约了存储空间。In a fourth possible implementation manner of the first aspect, the picture message receiving device stores the service picture in the first picture message; the picture message receiving device discards the data in the second picture message . The solution does not store the content in the detected picture message, which saves storage space.

第一方面第四种可能实现方式中,所述图片报文发送设备发送所述第一图片报文给所述图片报文接收设备;当所述图片报文发送设备停止发送所述业务图片报文的时长达到第二时长后,所述图片报文发送设备发送所述故障检测报文给所述图片报文接收设备,其中,所述第二时长小于或等于所述第一时长。该方案中介绍了图片报文发送设备所执行的步骤。In a fourth possible implementation manner of the first aspect, the picture message sending device sends the first picture message to the picture message receiving device; when the picture message sending device stops sending the service picture message After the duration of the message reaches a second duration, the picture message sending device sends the fault detection message to the picture message receiving device, where the second duration is less than or equal to the first duration. This solution introduces the steps performed by the picture message sending device.

第二方面,本发明提供一种故障检测装置,包括:接收模块,用于接收报文发送装置发送的第一图片报文;处理模块,用于判断自从接收到所述第一图片报文之后,是否在第一时长内接收到所述图片报文发送设备发送的第二图片报文;告警模块,用于当所述处理模块的判断结果为没有接收到所述第二图片报文,发出故障告警信号,其中,所述第二图片报文是检测图片报文。In a second aspect, the present invention provides a fault detection device, comprising: a receiving module for receiving a first picture message sent by a message sending device; and a processing module for judging after receiving the first picture message , whether the second picture message sent by the picture message sending device is received within the first time period; the alarm module is configured to send out when the judgment result of the processing module is that the second picture message has not been received A fault alarm signal, wherein the second picture message is a detection picture message.

该第二方面,具有第一方面以及第一方面各种可能实现方式相类似的可能实现方式,并具有相应的技术效果。The second aspect has possible implementations similar to the first aspect and various possible implementations of the first aspect, and has corresponding technical effects.

第三方面,提供一种设备故障检测系统的实施例,设备故障检测系统包括图片报文发送设备以及与所述图片报文发送设备通信的图片报文接收设备。所述图片报文发送设备用于:发送携带业务图片的业务报文给所述图片报文接收设备;当停止发送所述业务图片的时长达到第二时长后,持续发送故障检测报文给所述图片报文接收设备,故障检测报文之间的时间间隔小于所述第二时长;所述图片报文接收设备用于:接收所述图片报文发送设备发送的图片报文,当超过第一时长没有接收到2个图片报文,则所述图片报文接收设备发出告警信号。In a third aspect, an embodiment of a device failure detection system is provided. The device failure detection system includes a picture message sending device and a picture message receiving device that communicates with the picture message sending device. The picture message sending device is used to: send a service message carrying a service picture to the picture message receiving device; when the time period for stopping sending the service picture reaches the second time period, continuously send a fault detection message to the picture message receiving device. The picture message receiving device is used, and the time interval between the fault detection messages is less than the second duration; the picture message receiving device is used for: receiving the picture message sent by the picture message sending device. If two picture messages are not received for a period of time, the picture message receiving device sends an alarm signal.

该第三方面,具有第一方面以及第一方面各种可能实现方式相类似的可能实现方式,并具有相应的技术效果。The third aspect has possible implementation manners similar to the first aspect and various possible implementation manners of the first aspect, and has corresponding technical effects.

第四方面,提供一种存储介质的实施例,包括计算机指令,当所述指令在图片报文接收设备上运行时,使得所述图片报文接收设备执行第一方面以及第一方面各可能实现方式的方法。In a fourth aspect, an embodiment of a storage medium is provided, including computer instructions, which, when the instructions are executed on a picture message receiving device, cause the picture message receiving device to execute the first aspect and each possible implementation of the first aspect way method.

该第四方面,具有第一方面以及第一方面各种可能实现方式相类似的可能实现方式,并具有相应的技术效果。The fourth aspect has possible implementations similar to the first aspect and various possible implementations of the first aspect, and has corresponding technical effects.

第五方面,提供一种计算机程序产品的实施例,可以运行于图片报文发送设备,其特征在于,包括:用于接收图片报文发送设备发送的第一图片报文的指令;用于判断自从接收到所述第一图片报文之后,是否在第一时长内接收到所述图片报文发送设备发送的第二图片报文的指令;以及,用于当没有接收到所述第二图片报文,则所述图片报文接收设备发出故障告警信号,其中,所述第二图片报文是检测图片报文的指令。In a fifth aspect, an embodiment of a computer program product is provided, which can run on a picture message sending device, characterized in that it includes: an instruction for receiving a first picture message sent by the picture message sending device; an instruction for judging Whether an instruction for a second picture message sent by the picture message sending device is received within a first time period since the first picture message is received; and, for when the second picture message is not received message, the picture message receiving device sends a fault alarm signal, wherein the second picture message is an instruction to detect the picture message.

该第五方面,具有第一方面以及第一方面各种可能实现方式相类似的可能实现方式,并具有相应的技术效果。The fifth aspect has possible implementation manners similar to the first aspect and various possible implementation manners of the first aspect, and has corresponding technical effects.

第六方面,本发明还提供一种图片报文接收设备的实施例,图片报文接收设备包括处理器(可选的,还可以包括存储计算机指令的存储器),所述处理器通过运行计算机指令,执行前述第一方面中由所述图片报文接收设备所执行的步骤。In a sixth aspect, the present invention also provides an embodiment of a picture message receiving device, where the picture message receiving device includes a processor (optionally, may also include a memory for storing computer instructions), and the processor executes the computer instructions by running the computer instructions. , and perform the steps performed by the picture message receiving device in the foregoing first aspect.

附图说明Description of drawings

图1是图像监控系统实施例拓扑图。FIG. 1 is a topology diagram of an embodiment of an image monitoring system.

图2是摄像机故障检测方法实施例流程图。FIG. 2 is a flowchart of an embodiment of a camera fault detection method.

图3是本发明TLV数据结构的实施例示意图。FIG. 3 is a schematic diagram of an embodiment of the TLV data structure of the present invention.

图4是本发明TLV数据结构的实施例示意图。FIG. 4 is a schematic diagram of an embodiment of the TLV data structure of the present invention.

图5是本发明TLV数据结构的实施例示意图。FIG. 5 is a schematic diagram of an embodiment of the TLV data structure of the present invention.

图6是本发明TLV数据结构的实施例示意图。FIG. 6 is a schematic diagram of an embodiment of the TLV data structure of the present invention.

图7摄像机所执行的设备故障检测方法实施例流程图。FIG. 7 is a flow chart of an embodiment of a method for detecting equipment failure performed by a camera.

图8是存储服务器所执行的设备故障检测方法实施例流程图。FIG. 8 is a flow chart of an embodiment of a device failure detection method executed by a storage server.

图9还提供一种故障检测系统实施例示意图。FIG. 9 also provides a schematic diagram of an embodiment of a fault detection system.

具体实施方式Detailed ways

图像监控设备用于安防等对时效性要求苛刻的领域。因此,对于图像监控系统而言,如果能够检测到摄像机(也可以是监控照相机,能够拍摄图片即可)的功能正常,一旦检测摄像机发生异常后即可及时干预,这是业界普遍关注的问题。Image monitoring equipment is used in security and other fields that require strict timeliness. Therefore, for an image monitoring system, if it can be detected that the camera (or a monitoring camera, which can take pictures) is functioning properly, it can intervene in time once the abnormality of the camera is detected, which is a common concern in the industry.

参见图1的图像监控系统,摄像机111以及摄像机112均和存储服务器12通信,存储服务器12与图像分析服务器14通信。管理服务器13位于所述摄像机111和所述存储服务器12之间,用于所述摄像机111的注册。Referring to the image monitoring system in FIG. 1 , both the camera 111 and the camera 112 communicate with the storage server 12 , and the storage server 12 communicates with the image analysis server 14 . The management server 13 is located between the camera 111 and the storage server 12 and is used for the registration of the camera 111 .

以所述摄像机111为例,本发明实施例中:当所述摄像机111无业务图片报文发送时,所述摄像机111构造检测图片报文发送给所述存储服务器12。所述存储服务器12对来自摄像机111的检测图片报文进行接收,如果超过预定时间没有收到来自所述摄像机111的图片报文,就判定摄像机111出现了故障。故障的类型可能是图片报文生成故障,或者图片报文发送故障,在得知所述摄像机111故障之后,即可以及时对摄像机111尽快进行干预,例如进行升级、重启、维修等处理。Taking the camera 111 as an example, in this embodiment of the present invention, when the camera 111 does not send a service picture message, the camera 111 constructs a detection picture message and sends it to the storage server 12 . The storage server 12 receives the detection picture message from the camera 111 , and if the picture message from the camera 111 is not received within a predetermined time, it is determined that the camera 111 is faulty. The type of the fault may be a picture message generation failure or a picture message sending failure. After knowing the camera 111 failure, the camera 111 can be intervened as soon as possible, such as upgrading, restarting, and repairing.

类似的,在存储服务器12和图像分析服务器14之间也可以使用该方法,由所述图像分析服务器14来检测所述存储服务器12的故障。因此,本发明实施例不限于摄像机和存储服务器这样的组合,还可以是例如摄像机和图像分析设备的组合,图像存储设备与图像分析设备的组合,图像分析设备与图像分析设备的组合,图像存储设备与图像存储设备的组合。换句话说,本发明实施例可以广义的理解为用于:由图片报文接收设备对图片报文发送设备的图片报文生成/发送功能进行检测。当所述图片报文发送设备没有业务图片报文发送给所述图片报文接收设备时,图片报文发送设备向图片报文接收设备发送额外的图片检测报文,从而维持图片报文的发送频度,避免所述图片报文发送设备长时间没有图片报文发送出去。所述图片报文接收设备通过检测收到前一个报文之后,是否在预设时间时长内没有收到下一个图片报文,来判断所述图片报文发送设备是否正常运行。Similarly, the method can also be used between the storage server 12 and the image analysis server 14, and the image analysis server 14 detects the failure of the storage server 12. Therefore, the embodiment of the present invention is not limited to a combination of a camera and a storage server, but can also be, for example, a combination of a camera and an image analysis device, a combination of an image storage device and an image analysis device, a combination of an image analysis device and an image analysis device, and an image storage device. A combination of device and image storage device. In other words, the embodiments of the present invention can be broadly understood as being used for: the picture message receiving device detects the picture message generating/sending function of the picture message sending device. When the picture message sending device has no service picture message to send to the picture message receiving device, the picture message sending device sends an additional picture detection message to the picture message receiving device, thereby maintaining the sending of the picture message frequency, to avoid that the picture message sending device does not send picture messages for a long time. The picture message receiving device determines whether the picture message sending device operates normally by detecting whether the next picture message is not received within a preset time period after receiving the previous message.

参见图2,下面以所述图片报文发送设备是摄像机、所述图片报文接收设备是存储服务器为例,进行详细介绍。Referring to FIG. 2 , a detailed description is given below by taking an example that the picture message sending device is a camera and the picture message receiving device is a storage server.

21、摄像机(camera)向管理服务器发送注册消息,所述管理服务器收到所述注册消息之后,对所述摄像机进行注册。注册成功后,所述管理节点把所述摄像机已经上线的消息通知给存储服务器。所述注册信息包括所述摄像机的标识信息,所述标识信息例如摄像机ID,或者摄像机位置。21. A camera (camera) sends a registration message to a management server, and the management server registers the camera after receiving the registration message. After the registration is successful, the management node notifies the storage server that the camera has been online. The registration information includes identification information of the camera, such as a camera ID or a camera position.

所述摄像机与所述管理服务器之间、所述管理服务器与所述存储服务器之间传递所述注册消息的通道可以是专用的管理通道,管理通道不用于传输业务数据(例如图片)。所述管理服务器可以与所述摄像机、所述存储服务器相独立,也可以与其中一者集成在一起。The channel for transmitting the registration message between the camera and the management server and between the management server and the storage server may be a dedicated management channel, and the management channel is not used for transmitting service data (eg pictures). The management server may be independent of the camera and the storage server, or may be integrated with one of them.

22、所述存储服务器向所述摄像机发送图片(或者图片报文)请求,以向所述摄像机请求获得图片(或者图片报文)。22. The storage server sends a picture (or picture message) request to the camera, so as to request the camera to obtain a picture (or picture message).

23、所述摄像机收到所述存储服务器发送的图片请求后,发送响应消息给所述存储服务器。所述响应消息中携带:报文发送确认指令,检测图片报文指令,检测图片报文发送周期。23. After receiving the picture request sent by the storage server, the camera sends a response message to the storage server. The response message carries: a message sending confirmation command, a picture message detection command, and a picture message sending cycle detection.

其中,所述报文发送确认指令,用于告知所述存储服务器:所述摄像机已经做好了发送图片报文的准备。The message sending confirmation instruction is used to inform the storage server that the camera is ready to send the picture message.

所述检测图片报文指令以及所述检测图片报文发送周期,均用于与所述存储服务器进行协商。其中,所述检测图片报文指令,用于告知所述存储服务器:所述摄像机支持“报文发送功能检测”这一功能;因此,所述存储服务器可以打开对应的功能,从而检测所述摄像机的图片报文生成功能是否正常。所述报文发送周期,用于告知所述存储服务器:所述摄像机所支持的额外报文发送周期(本实施例中,这个报文发送周期设置为10秒)。Both the detection picture message instruction and the detection picture message sending period are used for negotiation with the storage server. The instruction for detecting the picture message is used to inform the storage server that the camera supports the function of "message sending function detection"; therefore, the storage server can enable the corresponding function to detect the camera Is the picture message generation function normal. The packet sending period is used to inform the storage server of the additional packet sending period supported by the camera (in this embodiment, this packet sending period is set to 10 seconds).

24、所述存储服务器收到所述响应消息后,开启“设备故障检测功能”,以便对收到的报文的时间间隔进行判断。以及,所述存储服务器把所述报文发送周期进行记录,以便在后续步骤中,按照所述发送周期检测所述摄像机的功能是否正常。24. After receiving the response message, the storage server enables the "device failure detection function", so as to judge the time interval of the received messages. And, the storage server records the message sending period, so as to detect whether the function of the camera is normal according to the sending period in subsequent steps.

需要说明的是,关于报文发送周期的协商有多种方式。例如:(1)所述摄像机发送单个时间周期供所述存储服务器记录;(2)所述摄像机发送多个时间周期供所述存储服务器挑选;(3)所述存储服务器和所述摄像机各自发送自己能够支持的时间周期,由第三方设备(例如所述管理服务器)仲裁出一个双方都支持的周期。It should be noted that there are multiple ways to negotiate the packet sending period. For example: (1) the camera sends a single time period for the storage server to record; (2) the camera sends multiple time periods for the storage server to select; (3) the storage server and the camera each send For the time period that can be supported by itself, a third-party device (for example, the management server) arbitrates a period supported by both parties.

25、所述摄像机以图片报文的方式向所述存储服务器发送业务图片报文。本发明实施例中,所述摄像机对物体进行拍摄以生成业务图片,被拍摄的物体可以是运动物体,例如下述中的一种:任意运动物、行驶的车辆、行人、动物。拍摄到的图片被所述摄像机发送给所述存储服务器进行持久化存储。25. The camera sends a service picture message to the storage server in the form of a picture message. In this embodiment of the present invention, the camera photographs objects to generate business pictures, and the photographed objects may be moving objects, such as one of the following: any moving objects, moving vehicles, pedestrians, and animals. The captured picture is sent by the camera to the storage server for persistent storage.

所述摄像机所拍摄的图片(为了与检测用图片进行区分,把经过拍摄所获得的图片称为业务图片)首先以TLV(类型/标签、长度、值;type/tag、length、value)数据结构的方式进行编码。tag(或者type)描述value的数据类型,length描述value的长度,value中携带包括业务图片在内的数据,例如一个所述value中包括2个图片,或者所述value中可以嵌套另外一个TLV数据结构。参见图3是本发明一个TLV数据结构的实施例示意图,在value中携带了图片;可选的value中还可以携带图片序列号,图片序列号描述了所述摄像机所发出的图片的编号,不同图片的序列号也不同。可选的,value中还可以携带图片的数量(未图示)。The picture taken by the camera (in order to distinguish it from the picture used for detection, the picture obtained through shooting is called a business picture) is firstly structured as a TLV (type/tag, length, value; type/tag, length, value) data structure. way to encode. The tag (or type) describes the data type of the value, the length describes the length of the value, and the value carries data including business pictures. For example, a value includes two pictures, or another TLV can be nested in the value. data structure. 3 is a schematic diagram of an embodiment of a TLV data structure of the present invention, where a picture is carried in the value; the optional value can also carry a picture serial number, which describes the serial number of the picture sent by the camera. The serial numbers of the pictures are also different. Optionally, the value can also carry the number of pictures (not shown).

TLV数据格式被作为净荷(payload)封装到实时传输协议(real-time transportprotocol,RTP)报文中以进行网络传输。RTP协议用来为语音、图像、传真等多种需要实时传输的多媒体数据提供端到端的流媒体传输服务。RTP报文包括:头部(head),扩展(extend)以及净荷(payload)。本发明中图片报文以媒体流的方式在所述摄像机与所述存储服务器之间进行传输,所述摄像机通过媒体流发送包括第一图片、第二图片在内的图片给所述存储服务器。用于传输图片的媒体流也可以称为图片流。The TLV data format is encapsulated into a real-time transport protocol (RTP) message as a payload for network transmission. The RTP protocol is used to provide end-to-end streaming media transmission services for voice, image, fax and other multimedia data that need to be transmitted in real time. The RTP message includes: a header (head), an extension (extend) and a payload (payload). In the present invention, the picture message is transmitted between the camera and the storage server in the form of a media stream, and the camera sends the pictures including the first picture and the second picture to the storage server through the media stream. A media stream used to transmit pictures may also be referred to as a picture stream.

类似的,图片也可以编码成json数据格式,把json数据格式封装到HTTP协议报文中进行发送。Similarly, pictures can also be encoded into json data format, and the json data format can be encapsulated into HTTP protocol packets for transmission.

26、每当所述摄像机停止发送业务图片的时长达到所述报文发送周期,则特定的图片开始持续发送所述检测图片报文给所述存储服务器,检测报文之间的时间间隔小于或者等于所述报文发送周期。当再次开始发送业务图片后,则停止发送所述检测图片报文,直到再次停止发送业务图片报文时,再重新启动检测图片报文的发送,如此循环。26. Whenever the time that the camera stops sending service pictures reaches the message sending period, the specific picture starts to continuously send the detection picture message to the storage server, and the time interval between the detection messages is less than or is equal to the packet sending period. After starting to send the service picture again, stop sending the detection picture message, until stop sending the service picture message again, restart the sending of the detection picture message, and so on.

本步骤中的检测图片报文的格式和步骤25中所介绍的报文格式相同,例如TLV+RTP或者是json+HTTP。不同之处在于,在步骤25中,数据格式的value中携带业务图片,不携带检测标签;而本发明实施例中,在value中额外携带检测标签,携带所述检测标签的报文是检测图片报文。value中还可以携带检测图片,例如:空白图片、公司标识(logo)等图片。value中也可以不携带图片。The format of the detection picture message in this step is the same as the message format introduced in step 25, for example, TLV+RTP or json+HTTP. The difference is that, in step 25, the value of the data format carries the service picture and does not carry the detection label; while in the embodiment of the present invention, the value additionally carries the detection label, and the message carrying the detection label is the detection picture. message. The value can also carry detection images, such as blank images, company logos, and other images. The value can also carry no image.

在实际使用中,摄像机的拍摄对象往往不是每时每刻都会出现,而是有时间上的规律性,因此摄像机发送的业务图片是间断的而不是连续的,而且间断的时间长度有长有短。下面以摄像机检测到行人后,拍摄行人的图片并发送给所述存储服务器为例进行介绍。这样的摄像机可以安装在地铁口、办公楼宇、医院等场所。以安装在写字楼门口的摄像机为例,在白天上下班时间,频繁有人员进出写字楼,因此业务图片可能是连续的(这种情况下,不断有图片从摄像机发送给存储服务器),或者,虽然不连续但是图片流之间的间隔非常短(例如前后两个业务图片报文的发送间隔不超过2秒)。在非上下班时间,进出写字楼的人数变少,业务图片往往并不连续,而是间隔较长时间。到了夜晚,所述摄像机能够拍摄到的行人变得极其稀少,甚至有可能整晚都没有人员经过摄像机,以至于所述摄像机整晚没有图片发送给所述存储服务器。In actual use, the camera's shooting objects often do not appear all the time, but have a regularity in time. Therefore, the business pictures sent by the camera are intermittent rather than continuous, and the length of the intermittent time is long or short. . In the following, after the camera detects a pedestrian, a picture of the pedestrian is taken and sent to the storage server as an example for introduction. Such cameras can be installed in subway entrances, office buildings, hospitals and other places. Taking the camera installed at the door of an office building as an example, during the daytime commuting hours, people frequently enter and leave the office building, so the business pictures may be continuous (in this case, pictures are continuously sent from the camera to the storage server), or, although not Continuous but the interval between picture streams is very short (for example, the interval between sending two service picture packets before and after does not exceed 2 seconds). During non-commute hours, fewer people enter and leave the office building, and business pictures are often not continuous, but at long intervals. At night, the pedestrians that can be photographed by the camera become extremely rare, and it is even possible that no one passes the camera all night, so that the camera does not send pictures to the storage server all night.

没有图片从所述摄像机发送给所述存储服务器有两种可能:一种可能情况是没有拍摄对象出现在摄像机的拍摄范围内;另外一种可能是摄像机的部分功能故障,所述摄像机虽然拍摄了图片,但是无法发出图片报文。而夜晚是治安事件的高发时段,一旦摄像机的功能不正常,那么需要及时维护,以免错过关键的图片报文。现有技术中,使用心跳技术等方案来检测摄像机是否正常,然而心跳消息过于简单,存储服务器收到心跳消息仅能证明:所述摄像机和所述存储服务器之间的网络正常,以及摄像机的网络功能正常;却无法检测摄像机的生成图片报文的功能是否正常,以及所述摄像机发送图片报文的功能是否正常。There are two possibilities that no pictures are sent from the camera to the storage server: one possibility is that there is no subject within the shooting range of the camera; the other possibility is that a part of the camera is malfunctioning. picture, but the picture message cannot be sent. Night is a high-incidence period of public security incidents. Once the function of the camera is abnormal, it needs to be maintained in time to avoid missing key picture messages. In the prior art, solutions such as heartbeat technology are used to detect whether the camera is normal, but the heartbeat message is too simple, and the storage server receives the heartbeat message only to prove that the network between the camera and the storage server is normal, and the network of the camera is normal. The function is normal; however, it is impossible to detect whether the function of the camera to generate the picture message is normal, and whether the function of the camera to send the picture message is normal.

本实施例中,结束一次业务图片发送之后,所述摄像机启动定时器,计时器的计时到达10秒后,发送一个额外的检测图片报文给所述存储服务器,当计时器的计时再次到达10秒后,再次发送一个额外的图片报文给所述存储服务器。也就是说,当所述摄像机没有图片报文发送给所述存储服务器时,就周期性的发送检测图片报文给所述存储服务器。当所述摄像机有新的业务图片发送给所述存储服务器时(例如,检测到行人从摄像机的拍摄范围路过,则拍摄图片并发送图片报文给所述存储服务器),把所述计时器清零。In this embodiment, after finishing sending a service picture, the camera starts a timer, and after the timer reaches 10 seconds, an additional detection picture message is sent to the storage server, and when the timer reaches 10 again Seconds later, send an additional picture message to the storage server again. That is to say, when the camera does not send a picture message to the storage server, it periodically sends a detection picture message to the storage server. When the camera has a new service picture to send to the storage server (for example, if a pedestrian is detected passing by the camera's shooting range, a picture is taken and a picture message is sent to the storage server), the timer is cleared. zero.

参见图4,所述检测图片报文中携带检测标签,具体而言,检测标签可以携带TLV数据结构的value中;需要说明的是,图片数据不是所述检测图片报文中的必要内容,因此检测图片报文中不携带图片,即使没有携带图片,它任然是一个图片报文。参见图5,所述检测图片报文的TLV数据结构中可以进一步携带:图片数量、图片(图片1、图片2)。进一步的,value中还可以携带图片日期(未图示)、每个图片的大小(未图示)等信息。图片有多种选择,例如:空白图片;公司logo图片,广告图片,已发送过的业务图片等。Referring to FIG. 4 , the detection picture message carries a detection label. Specifically, the detection label can be carried in the value of the TLV data structure; it should be noted that the picture data is not the necessary content in the detection picture message, so The detection picture message does not carry a picture, even if it does not carry a picture, it is still a picture message. Referring to FIG. 5 , the TLV data structure of the picture detection message may further carry: the number of pictures, and pictures (picture 1, picture 2). Further, the value can also carry information such as the date of the picture (not shown), the size of each picture (not shown). There are many options for pictures, such as: blank pictures; company logo pictures, advertising pictures, business pictures that have been sent, etc.

参见图6,可选的,在摄像机所发出的每一个图片报文中,还可以增加各个图片的序列号。本发明实施例中,图片序列号的携带规则有三种:(1)在业务图片报文、所述检测图片报文中均不携带图片序列号;(2)在业务图片报文、所述检测图片报文中均携带图片序列号,序列号之间连续;(3)在业务图片报文中携带图片序列号,序列号之间连续;所述检测图片报文中不携带图片序列号。Referring to FIG. 6 , optionally, in each picture message sent by the camera, the serial number of each picture may also be added. In the embodiment of the present invention, there are three types of carrying rules for picture serial numbers: (1) neither the service picture message nor the detection picture message carry the picture serial number; (2) the service picture message, the detection picture message do not carry the picture serial number; The picture messages all carry picture serial numbers, and the serial numbers are consecutive; (3) the service picture messages carry the picture serial numbers, and the serial numbers are consecutive; the detection picture message does not carry the picture serial numbers.

27、当所述存储服务器在预设时间长度(例如1个报文发送周期:10秒;或者,3个报文发送周期:10秒×3=30秒)内没有收到来自所述摄像机的图片报文,则发出告警。27. When the storage server does not receive a message from the camera within a preset length of time (for example, 1 message sending cycle: 10 seconds; or, 3 message sending cycles: 10 seconds×3=30 seconds) If the picture message is sent, an alarm will be issued.

当所述存储服务器在预设时间长度内没有收到来自所述摄像机的图片报文。这意味着所述摄像机发生了故障。除了网络故障、宕机故障等基本故障之外,还可能是生成图片报文的功能可能发生了故障,例如:构造TLV数据结构的功能发生故障,或者把所述TLV数据结构封装到RTP报文的功能故障;还可能是发送RTP报文的功能发生了故障。这些故障往往是由系统不稳定、软件不兼容等软件因素引起,因此相对于其他故障来说,是比较容易发生的。尤其是,这些故障是心跳消息等现有技术无法检测出来的。因此,相较于现有技术而言,本发明实施例可以检测出摄像机的特定故障。When the storage server does not receive a picture message from the camera within a preset time period. This means that the camera is malfunctioning. In addition to network failures, downtime failures and other basic failures, there may also be a failure in the function of generating image packets, for example, the function of constructing the TLV data structure has failed, or the TLV data structure has been encapsulated into RTP packets. The function of sending RTP packets may also be faulty. These faults are often caused by software factors such as system instability and software incompatibility, so they are more likely to occur than other faults. In particular, these failures cannot be detected by existing technologies such as heartbeat messages. Therefore, compared with the prior art, the embodiment of the present invention can detect a specific failure of the camera.

本发明实施例可以覆盖心跳消息所能检测到故障范围,因此可以替换掉心跳机制。当然,本发明实施例可以和心跳机制并行使用,这样的话如果正常收到心跳消息却没有正常收到检测图片报文,就可以排除掉一些基本的故障(例如所述摄像机和所述存储服务器之间网络故障、所述摄像机宕机的故障),从而把故障更加准确的定位到本发明实施例所描述的生成TLV故障、生成RTP报文故障等。The embodiment of the present invention can cover the fault range that can be detected by the heartbeat message, so the heartbeat mechanism can be replaced. Of course, the embodiment of the present invention can be used in parallel with the heartbeat mechanism. In this case, if the heartbeat message is normally received but the detection picture message is not normally received, some basic faults (for example, the connection between the camera and the storage server) can be eliminated. network fault, the camera downtime fault), so that the fault can be more accurately located to the TLV generation fault, the RTP packet generation fault, etc. described in the embodiment of the present invention.

所述存储服务器收到所述检测图片报文后,对收到的报文进行解析,通过判断是否有检测标识,可以确认收到的报文是业务图片报文还是检测图片报文。对于业务图片,所述存储服务器需要进行存储;而对于所述检测图片,所述存储服务器可以抛弃。因此,当所述存储服务器检测到报文中的检测标识后,可以识别出这是一个检测图片报文。借此,存储服务器可以判断出所述摄像机当前的处于正常工作状态,但是没有业务图片需要发送;此外,所述存储服务器把所述检测图片报文从普通图片报文中剥离出来,不做持久化存储。当然,可选的,也可以对所述额外报文进行存储。After receiving the detection picture message, the storage server parses the received message, and can confirm whether the received message is a service picture message or a detection picture message by judging whether there is a detection mark. For service pictures, the storage server needs to store them; and for the detection pictures, the storage server can discard them. Therefore, after the storage server detects the detection identifier in the message, it can identify that it is a detection picture message. In this way, the storage server can determine that the camera is currently in a normal working state, but there is no service picture to send; in addition, the storage server separates the detected picture message from the ordinary picture message, and does not make persistent storage. Of course, optionally, the additional message may also be stored.

所述告警可以提示所述摄像机出现异常,触发进行维护的流程。例如:所述存储服务器尝试重新建立与所述摄像机之间的数据通道,再次确认是否摄像机出现异常;或者,管理员收到告警后可以对所述摄像机进行进一步检测。The alarm may prompt that the camera is abnormal, and trigger the maintenance process. For example, the storage server tries to re-establish the data channel with the camera, and confirms again whether the camera is abnormal; or, the administrator can further detect the camera after receiving the alarm.

当所述数据结构中携带有图片序列号时,本步骤中进一步对图片序列号进行记录。When the picture sequence number is carried in the data structure, the picture sequence number is further recorded in this step.

28、所述存储服务器收到所述图片报文后,读取RTP报文中的TLV,从TLV中获取图片序列号。本步骤是可选步骤,可以定期执行,例如每24小时执行一次。28. After receiving the picture message, the storage server reads the TLV in the RTP message, and obtains the picture sequence number from the TLV. This step is optional and can be performed periodically, such as every 24 hours.

当业务图片报文和所述检测图片报文中均携带图片序列号。如果序列号不连续,说明有图片丢失(可能是业务图片也可能是检测图片),则进行记录。根据检查标识,可以进一步判断丢失的图片是业务图片还是检测图片,如果丢失的是业务图片,除了记录之外,所述存储服务器发送重传请求,请求所述摄像机重新发送丢失的图片。如果丢失的是检测图片,则不用重传,仅进行记录。When both the service picture message and the detection picture message carry the picture sequence number. If the serial numbers are not consecutive, it means that there is a picture missing (may be a business picture or a detection picture), then record it. According to the inspection identification, it can be further determined whether the lost picture is a service picture or a detection picture. If the lost picture is a business picture, in addition to recording, the storage server sends a retransmission request to request the camera to resend the lost picture. If the detected picture is lost, it will not be retransmitted, but only recorded.

当在业务图片报文中携带图片序列号,所述检测图片报文中不携带图片序列号。如果序列号不连续,说明有业务图片丢失,因此所述存储服务器发送重传请求,请求所述摄像机重新发送丢失的图片;以及对丢失情况进行记录。根据统计接收到多个所述业务图片中的所述图片序列号的丢失情况,获得业务图片丢失率。When the picture serial number is carried in the service picture message, the picture serial number is not carried in the detection picture message. If the serial numbers are not consecutive, it means that the service picture is lost, so the storage server sends a retransmission request to request the camera to resend the lost picture; and record the loss. The service picture loss rate is obtained according to statistics on the loss of the picture sequence numbers in the plurality of received service pictures.

所述存储服务器可以对报文丢失情况进行汇总,得到报文丢失率,反馈给主机(个人电脑、手机、PAD等)。通过报文丢失率可以判断出网络的可靠性程度。The storage server can summarize the packet loss situation, obtain the packet loss rate, and feed it back to the host (personal computer, mobile phone, PAD, etc.). The reliability of the network can be judged by the packet loss rate.

参见图7和图8,分别从摄像机一侧和存储服务器一侧对设备故障检测方法实施例进行介绍。Referring to FIG. 7 and FIG. 8 , embodiments of a device fault detection method are respectively introduced from the camera side and the storage server side.

摄像机的流程如下:The flow of the camera is as follows:

步骤31,摄像机发送业务图片报文,每发送一个业务图片报文之后,启动所述摄像机的本地定时器。Step 31: The camera sends a service picture message, and after each service picture message is sent, a local timer of the camera is started.

步骤32,当定时器计时超过10秒没有新的业务图片报文发送,进入步骤34;当10秒内有新的业务图片报文发送,进入步骤33。Step 32 , when the timer counts for more than 10 seconds and no new service picture message is sent, go to step 34 ; when a new service picture message is sent within 10 seconds, go to step 33 .

步骤33,把本地的定时器复位。Step 33, reset the local timer.

步骤34,生成检测图片报文并发送给所述存储服务器。检测报文的发送周期小于10秒(至少小于30秒)。Step 34: Generate a detection picture message and send it to the storage server. The sending period of detection packets is less than 10 seconds (at least less than 30 seconds).

步骤35,当所述摄像机在发送了一个检测图片报文之后10秒内有新的业务图片报文需要发送,则进入步骤33,将本地的计时器复位;否则进入步骤34,以便再次发送检测图片报文。Step 35, when the camera has sent a new service picture message within 10 seconds after sending a detection picture message, then enter step 33, reset the local timer; otherwise, enter step 34, so as to send the detection picture again. picture message.

存储服务器的流程如下:The process of storing the server is as follows:

步骤41,接收所述摄像机发送的图片报文,收到图片报文后启动本地的定时器开始计时。每收到一个新的图片报文,把所述存储服务器的本地定时器复位以重新开始计时。Step 41: Receive a picture message sent by the camera, and start a local timer to start timing after receiving the picture message. Each time a new picture message is received, the local timer of the storage server is reset to restart the timing.

步骤42,所述存储服务器根据定时器的计时,检测是否在30秒内收到新的图片。Step 42, the storage server detects whether a new picture is received within 30 seconds according to the timing of the timer.

当定时器计时达到30秒,仍然没有被复位,则进入步骤44;否则,进入步骤43。When the timer reaches 30 seconds and is still not reset, go to step 44; otherwise, go to step 43.

步骤43,将本地计时器复位。Step 43, reset the local timer.

步骤44,发出所述摄像机发生故障的告警信号。告警中可以携带具体的故障类型:图片报文生成功能故障,或者图片报文发送功能故障。考虑到图片报文发送功能故障的概率较低,在一些情况下可以忽略,因此故障类型也可以是:图片报文生成功能故障。Step 44, sending out an alarm signal that the camera is faulty. The alarm can carry the specific fault type: the picture message generation function failure, or the picture message sending function failure. Considering that the probability of failure of the picture message sending function is low, it can be ignored in some cases, so the failure type can also be: picture message generation function failure.

参见图9,本发明还提供一种故障检测系统实施例,故障检测系统包括:图片报文发送装置4以及故障检测装置5。其中,所述图片报文发送装置4可以执行上述方法31-35所描述的实施例;所述故障检测装置5可以执行上述方法41-44所描述的实施例;两个个装置的组合可以执行上述方法步骤21-28所描述的实施例。由于在方法实施例中已经有详细的介绍,因此下面仅做简要的说明。Referring to FIG. 9 , the present invention further provides an embodiment of a fault detection system. The fault detection system includes: a picture message sending device 4 and a fault detection device 5 . Wherein, the picture message sending apparatus 4 may execute the embodiments described in the foregoing methods 31-35; the fault detection apparatus 5 may execute the embodiments described in the foregoing methods 41-44; the combination of the two apparatuses may execute Embodiments described in the above method steps 21-28. Since the method embodiments have been described in detail, only a brief description is given below.

所述图片报文发送装置6包括:处理模块61,检测报文生成模块62以及发送模块63。其中,所述发送模块63,用于发送业务图片报文。所述处理模块61,用于判断所述图片报文发送设备停止发送所述业务图片报文的时长是否达到第二时长。所述发送模块63,还用于当判断结果为达到第二时长时,发送所述故障检测报文(第二图片报文)。The picture message sending device 6 includes: a processing module 61 , a detection message generating module 62 and a sending module 63 . Wherein, the sending module 63 is configured to send the service picture message. The processing module 61 is configured to determine whether the duration for which the picture message sending device stops sending the service picture message reaches a second duration. The sending module 63 is further configured to send the fault detection message (the second picture message) when the judgment result is that the second time period is reached.

所述故障检测装置5包括:接收模块51,处理模块52,以及告警模块53。其中,所述接收模块51用于接收所述发送模块63所发送的报文。处理模块52,用于判断自从接收到所述第一图片报文之后,是否在第一时长内接收到所述图片报文发送设备发送的第二图片报文。告警模块53,用于当所述图片报文接收设备没有接收到所述第二图片报文,则所述图片报文接收设备发出故障告警信号。The fault detection device 5 includes: a receiving module 51 , a processing module 52 , and an alarming module 53 . The receiving module 51 is configured to receive the message sent by the sending module 63 . The processing module 52 is configured to determine whether the second picture message sent by the picture message sending device has been received within a first time period since the first picture message was received. The alarm module 53 is configured to send a fault alarm signal from the picture message receiving device when the picture message receiving device does not receive the second picture message.

本发明还提供一种设备故障检测系统的实施例,包括图片报文发送设备以及与所述图片报文发送设备通信的图片报文接收设备,设备故障检测系统包括:所述图片报文发送设备用于:发送携带业务图片的业务报文给所述图片报文接收设备;当停止发送所述业务图片的时长达到第二时长后,持续发送故障检测报文给所述图片报文接收设备,故障检测报文之间的时间间隔小于所述第二时长;所述图片报文接收设备用于:接收所述图片报文发送设备发送的图片报文,当超过第一时长没有接收到2个图片报文,则所述图片报文接收设备发出告警信号。The present invention also provides an embodiment of a device failure detection system, which includes a picture message sending device and a picture message receiving device that communicates with the picture message sending device. The device failure detection system includes: the picture message sending device. It is used for: sending a service message carrying a service picture to the picture message receiving device; when the duration of stopping sending the service picture reaches a second duration, continuously sending a fault detection message to the picture message receiving device, The time interval between the fault detection messages is less than the second duration; the picture message receiving device is used to: receive the picture message sent by the picture message sending device, and when the first duration exceeds the first duration, no two are received. picture message, the picture message receiving device sends an alarm signal.

本发明还提供一种存储介质的实施例,所述存储介质包括计算机指令,当所述指令在图片报文接收设备上运行时,使得所述图片报文接收设备执行前述方法中由所述图片报文接收设备所执行的步骤。The present invention also provides an embodiment of a storage medium, where the storage medium includes computer instructions, when the instructions are run on a picture message receiving device, the picture message receiving device causes the picture message receiving device to execute the above-mentioned method from the picture The steps performed by the message receiving device.

本发明还提供一种图片报文接收设备的实施例,图片报文接收设备包括处理器(可选的还可以包括存储计算机指令的存储器),所述处理器通过运行计算机指令,执行前述方法中由所述图片报文接收设备所执行的步骤。The present invention also provides an embodiment of a picture message receiving device. The picture message receiving device includes a processor (optionally, a memory for storing computer instructions), and the processor executes the above method by running the computer instructions. Steps performed by the picture message receiving device.

一种计算机程序产品实施例,可以运行于前述图片报文发送设备所执行的步骤。所述计算机程序产品包括:用于接收图片报文发送设备发送的第一图片报文的指令;用于判断自从接收到所述第一图片报文之后,是否在第一时长内接收到所述图片报文发送设备发送的第二图片报文的指令;以及用于当没有接收到所述第二图片报文,则所述图片报文接收设备发出故障告警信号,其中,所述第二图片报文是检测图片报文的指令。An embodiment of a computer program product can be executed in the steps performed by the foregoing picture message sending device. The computer program product includes: an instruction for receiving a first picture message sent by a picture message sending device; and for judging whether the first picture message has been received within a first duration since the first picture message was received an instruction for a second picture message sent by a picture message sending device; and an instruction for sending a fault alarm signal from the picture message receiving device when the second picture message is not received, wherein the second picture message A message is an instruction to detect a picture message.

以上模块的一个或多个可以软件、硬件或二者结合来实现。当以上任一模块以软件实现的时候,所述软件以计算机程序指令的方式存在,并被存储在存储器中,处理器可以用于执行所述程序指令并实现以上方法流程。所述处理器可以包括但不限于以下至少一种:中央处理单元(central processing unit,CPU)、微处理器、数字信号处理器(DSP)、微控制器(microcontroller unit,MCU)、或人工智能处理器等各类运行软件的计算设备,每种计算设备可包括一个或多个用于执行软件指令以进行运算或处理的核。该处理器可以内置于SoC(片上系统)或专用集成电路(application specific integrated circuit,ASIC),也可是一个独立的半导体芯片。该处理器内处理用于执行软件指令以进行运算或处理的核外,还可进一步包括必要的硬件加速器,如现场可编程门阵列(field programmablegate array,FPGA)、PLD(可编程逻辑器件)、或者实现专用逻辑运算的逻辑电路。One or more of the above modules may be implemented in software, hardware, or a combination of both. When any of the above modules is implemented in software, the software exists in the form of computer program instructions and is stored in the memory, and the processor can be used to execute the program instructions and implement the above method flow. The processor may include, but is not limited to, at least one of the following: a central processing unit (CPU), a microprocessor, a digital signal processor (DSP), a microcontroller (MCU), or artificial intelligence Processors and other types of computing devices that run software, each computing device may include one or more cores for executing software instructions to perform operations or processing. The processor may be built in a SoC (system on chip) or an application specific integrated circuit (ASIC), or may be an independent semiconductor chip. Outside the core for executing software instructions to perform operations or processing, the internal processing of the processor may further include necessary hardware accelerators, such as field programmable gate array (FPGA), PLD (Programmable Logic Device), Or a logic circuit that implements dedicated logic operations.

当以上模块以硬件实现的时候,该硬件可以是CPU、微处理器、DSP、MCU、人工智能处理器、ASIC、SoC、FPGA、PLD、专用数字电路、硬件加速器或非集成的分立器件中的任一个或任一组合,其可以运行必要的软件或不依赖于软件以执行以上方法流程。When the above modules are implemented in hardware, the hardware can be CPU, microprocessor, DSP, MCU, artificial intelligence processor, ASIC, SoC, FPGA, PLD, dedicated digital circuit, hardware accelerator or non-integrated discrete device. Any one, or any combination, may run the necessary software or be independent of software to perform the above method flows.

Claims (14)

1.一种图片报文发送设备的故障检测方法,其特征在于,图片报文接收设备与图片报文发送设备通信,所述方法包括:1. the fault detection method of a picture message sending device, is characterized in that, picture message receiving device communicates with picture message sending device, and described method comprises: 所述图片报文接收设备接收来自所述图片报文发送设备的第一图片报文;The picture message receiving device receives the first picture message from the picture message sending device; 所述图片报文接收设备判断自接收到所述第一图片报文之后,是否在第一时长内接收到所述图片报文发送设备发送的第二图片报文;The picture message receiving device determines whether it has received the second picture message sent by the picture message sending device within a first time period after receiving the first picture message; 当所述图片报文接收设备没有接收到所述第二图片报文,则所述图片报文接收设备发出故障告警信号,其中,所述第一图片报文是携带业务图片的业务图片报文,所述第二图片报文是检测图片报文;所述检测图片是所述图片报文发送设备构造的检测图片。When the picture message receiving device does not receive the second picture message, the picture message receiving device sends a fault alarm signal, wherein the first picture message is a service picture message carrying a service picture , the second picture message is a detection picture message; the detection picture is a detection picture constructed by the picture message sending device. 2.根据权利要求1所述的方法,其特征在于,2. The method according to claim 1, wherein 所述故障告警信号用于指示所述图片报文发送设备的图片报文生成功能故障。The failure alarm signal is used to indicate a failure of the picture message generation function of the picture message sending device. 3.根据权利要求2所述的方法,其特征在于,所述检测图片报文是TLV数据结构封装成的RTP报文,所述故障告警信号用于指示的故障包括:3. The method according to claim 2, wherein the detection picture message is an RTP message encapsulated into a TLV data structure, and the failure that the fault alarm signal is used to indicate comprises: 所述图片报文发送设备的构造TLV数据结构的功能发生故障;或者The function of constructing the TLV data structure of the picture message sending device fails; or 所述图片报文发送设备的把所述TLV数据结构封装到RTP报文的功能故障。The function of the picture message sending device to encapsulate the TLV data structure into the RTP message is faulty. 4.根据权利要求2所述的方法,其特征在于,所述检测图片报文是json数据结构封装成的HTTP报文,所述故障告警信号用于指示的故障包括:4. The method according to claim 2, wherein the detection picture message is an HTTP message encapsulated into a json data structure, and the failure that the fault alarm signal is used to indicate comprises: 所述图片报文发送设备的构造json数据结构的功能发生故障;或者The function of constructing a json data structure of the picture message sending device fails; or 所述图片报文发送设备的把所述json数据结构封装到HTTP报文的功能故障。The function of the picture message sending device to encapsulate the json data structure into an HTTP message is faulty. 5.根据权利要求1所述的方法,其特征在于,所述方法进一步包括:5. The method of claim 1, wherein the method further comprises: 所述图片报文接收设备接收所述图片报文发送设备所发送的多个业务图片报文,所述多个业务图片报文中进一步携带图片序列号;The picture message receiving device receives a plurality of service picture messages sent by the picture message sending device, and the plurality of service picture messages further carry picture sequence numbers; 根据统计接收到所述多个业务图片报文中的所述图片序列号,获得业务图片丢失率。The service picture loss rate is obtained according to statistics of the picture sequence numbers in the plurality of service picture messages received. 6.根据权利要求1所述的方法,其特征在于,所述方法进一步包括:6. The method of claim 1, further comprising: 所述图片报文接收设备存储所述第一图片报文中的业务图片;The picture message receiving device stores the service picture in the first picture message; 所述图片报文接收设备抛弃所述第二图片报文中的数据。The picture message receiving device discards the data in the second picture message. 7.根据权利要求1-6任一项所述的方法,其特征在于,所述方法进一步包括:7. The method according to any one of claims 1-6, wherein the method further comprises: 所述图片报文发送设备发送所述第一图片报文给所述图片报文接收设备;The picture message sending device sends the first picture message to the picture message receiving device; 当所述图片报文发送设备停止发送所述第一图片报文的时长达到第二时长后,所述图片报文发送设备发送所述第二图片报文给所述图片报文接收设备,其中,所述第二时长小于或等于所述第一时长。After the picture message sending device stops sending the first picture message for a second time period, the picture message sending device sends the second picture message to the picture message receiving device, wherein , the second duration is less than or equal to the first duration. 8.根据权利要求1-6任一项所述的方法,其特征在于,8. The method according to any one of claims 1-6, characterized in that, 所述图片报文发送设备是摄像机,所述第一图片报文中的图片由所述摄像机拍摄获得;所述图片报文接收设备是存储服务器、或者所述图片报文接收设备是图像分析服务器。The picture message sending device is a camera, and the picture in the first picture message is captured by the camera; the picture message receiving device is a storage server, or the picture message receiving device is an image analysis server . 9.一种图片报文发送设备的故障检测装置,其特征在于,包括:9. A fault detection device for a picture message sending device, characterized in that, comprising: 接收模块,用于接收来自图片报文发送设备的第一图片报文;a receiving module, configured to receive the first picture message from the picture message sending device; 处理模块,用于判断自接收到所述第一图片报文之后,是否在第一时长内接收到所述图片报文发送设备发送的第二图片报文;a processing module, configured to determine whether the second picture message sent by the picture message sending device is received within a first time period after receiving the first picture message; 告警模块,用于当所述处理模块的判断结果为没有接收到所述第二图片报文,发出故障告警信号,其中,所述第一图片报文是携带业务图片的业务图片报文,所述第二图片报文是检测图片报文;所述检测图片是所述图片报文发送设备构造的检测图片。an alarm module, configured to send a fault alarm signal when the judgment result of the processing module is that the second picture message is not received, wherein the first picture message is a business picture message carrying a business picture, so The second picture message is a detection picture message; the detection picture is a detection picture constructed by the picture message sending device. 10.根据权利要求9所述的装置,其特征在于,所述检测图片报文是TLV数据结构封装成的RTP报文,所述故障告警信号用于指示的故障包括:10. The device according to claim 9, wherein the detection picture message is an RTP message encapsulated into a TLV data structure, and the failure that the fault alarm signal is used to indicate comprises: 所述图片报文发送设备的构造TLV数据结构的功能发生故障;或者The function of constructing the TLV data structure of the picture message sending device fails; or 所述图片报文发送设备的把所述TLV数据结构封装到RTP报文的功能故障。The function of the picture message sending device to encapsulate the TLV data structure into the RTP message is faulty. 11.根据权利要求9所述的装置,其特征在于,所述检测图片报文是json数据结构封装成的HTTP报文,所述故障告警信号用于指示的故障包括:11. The device according to claim 9, wherein the detection picture message is an HTTP message encapsulated into a json data structure, and the failure that the fault alarm signal is used to indicate comprises: 所述图片报文发送设备的构造json数据结构的功能发生故障;或者The function of constructing a json data structure of the picture message sending device fails; or 所述图片报文发送设备的把所述json数据结构封装到HTTP报文的功能故障。The function of the picture message sending device to encapsulate the json data structure into an HTTP message is faulty. 12.根据权利要求9-11任一项所述的装置,所述图片报文发送设备是摄像机,所述第一图片报文中的图片由所述摄像机拍摄获得;所述装置是存储服务器、或者图像分析服务器。12. The apparatus according to any one of claims 9-11, wherein the picture message sending device is a camera, and the picture in the first picture message is obtained by shooting the camera; the apparatus is a storage server, Or an image analysis server. 13.一种图片报文发送设备的故障检测系统,包括图片报文发送设备以及与所述图片报文发送设备通信的图片报文接收设备,其特征在于:13. A fault detection system for a picture message sending device, comprising a picture message sending device and a picture message receiving device communicating with the picture message sending device, characterized in that: 所述图片报文发送设备用于:发送携带业务图片的业务图片报文给所述图片报文接收设备;当停止发送所述业务图片报文的时长达到第二时长后,持续发送故障检测报文给所述图片报文接收设备,故障检测报文之间的时间间隔小于所述第二时长;所述故障检测报文是检测图片报文;所述检测图片是所述图片报文发送设备构造的检测图片;The picture message sending device is used for: sending a service picture message carrying a service picture to the picture message receiving device; when the duration of stopping sending the service picture message reaches a second duration, continuously sending a fault detection message send the message to the picture message receiving device, and the time interval between the failure detection messages is less than the second duration; the failure detection message is a detection picture message; the detection picture is the picture message sending device The constructed detection image; 所述图片报文接收设备用于:接收所述图片报文发送设备发送的图片报文,当超过第一时长没有接收到2个图片报文,则所述图片报文接收设备发出故障告警信号。The picture message receiving device is used for: receiving the picture message sent by the picture message sending device, and when two picture messages are not received after a first time period, the picture message receiving device sends a fault alarm signal . 14.一种存储介质,包括计算机指令,当所述指令在图片报文接收设备上运行时,使得所述图片报文接收设备执行如权利要求1至8中任意一项所述的方法。14. A storage medium comprising computer instructions which, when executed on a picture message receiving device, cause the picture message receiving device to perform the method of any one of claims 1 to 8.
CN201911418997.1A 2019-12-31 2019-12-31 Fault detection method, device and system Active CN111157223B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911418997.1A CN111157223B (en) 2019-12-31 2019-12-31 Fault detection method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911418997.1A CN111157223B (en) 2019-12-31 2019-12-31 Fault detection method, device and system

Publications (2)

Publication Number Publication Date
CN111157223A CN111157223A (en) 2020-05-15
CN111157223B true CN111157223B (en) 2022-05-10

Family

ID=70560499

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911418997.1A Active CN111157223B (en) 2019-12-31 2019-12-31 Fault detection method, device and system

Country Status (1)

Country Link
CN (1) CN111157223B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000092055A (en) * 1998-09-11 2000-03-31 Toshiba Corp Network failure detection system and network failure detection method
CN101587629A (en) * 2008-05-21 2009-11-25 上海新联纬讯科技发展有限公司 Fault alarm system of monitoring camera
CN102497283A (en) * 2011-11-24 2012-06-13 杭州华三通信技术有限公司 Method, system and device for data transmission based on Ethernet passive coax network (EPCN)
CN105872391A (en) * 2016-06-15 2016-08-17 华为技术有限公司 Network camera control method, device and system
CN105991371A (en) * 2015-04-16 2016-10-05 杭州迪普科技有限公司 Fault detection method and device
CN106656653A (en) * 2016-10-28 2017-05-10 浙江宇视科技有限公司 Method and device for processing registration and keeping alive
CN109246424A (en) * 2018-08-17 2019-01-18 安徽四创电子股份有限公司 Failure video camera method for rapidly positioning based on space-time analysis technology

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8013738B2 (en) * 2007-10-04 2011-09-06 Kd Secure, Llc Hierarchical storage manager (HSM) for intelligent storage of large volumes of data
CN101783970B (en) * 2009-12-22 2011-11-09 新太科技股份有限公司 Methods, devices and systems for automatically detecting and managing fault of camera
CN104601411A (en) * 2015-02-02 2015-05-06 华为技术有限公司 Link failure detection method and device
CN108650503B (en) * 2018-04-28 2020-08-21 努比亚技术有限公司 Camera fault determination method and device and computer readable storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000092055A (en) * 1998-09-11 2000-03-31 Toshiba Corp Network failure detection system and network failure detection method
CN101587629A (en) * 2008-05-21 2009-11-25 上海新联纬讯科技发展有限公司 Fault alarm system of monitoring camera
CN102497283A (en) * 2011-11-24 2012-06-13 杭州华三通信技术有限公司 Method, system and device for data transmission based on Ethernet passive coax network (EPCN)
CN105991371A (en) * 2015-04-16 2016-10-05 杭州迪普科技有限公司 Fault detection method and device
CN105872391A (en) * 2016-06-15 2016-08-17 华为技术有限公司 Network camera control method, device and system
CN106656653A (en) * 2016-10-28 2017-05-10 浙江宇视科技有限公司 Method and device for processing registration and keeping alive
CN109246424A (en) * 2018-08-17 2019-01-18 安徽四创电子股份有限公司 Failure video camera method for rapidly positioning based on space-time analysis technology

Also Published As

Publication number Publication date
CN111157223A (en) 2020-05-15

Similar Documents

Publication Publication Date Title
CN109889762B (en) Conference control method and device
US11153360B2 (en) Methods and systems for codec detection in video streams
CN104244109B (en) A kind of Media Stream transmitting and the method and apparatus received
CN109257253B (en) APP operation monitoring method and device
KR20170102603A (en) Error detection system for network camera
CN102811344A (en) Control method and device for improving storage stability in video monitoring system
CN111083176B (en) A monitoring camera cloud adaptive online method and device
CN109587002B (en) State detection method and system for video network monitoring equipment
CN105379164A (en) Method and apparatus for transmitting and receiving data and recording medium for performing the method
CN108924485B (en) Client real-time video stream interrupt processing method and system and monitoring system
WO2020078355A1 (en) Device state monitoring method and apparatus
CN104703053A (en) Packet loss processing method, device and system of video transmission process
CN110830763A (en) Monitoring video inspection method and device
CN111031084A (en) Method and device for remote maintenance of video network terminal
WO2016187979A1 (en) Transmitting method and apparatus for bidirectional forwarding detection (bfd) message
CN116668801A (en) Network condition monitoring method and system based on video platform
CN110740295B (en) A method and device for round-robin playback of video network monitoring video streams
CN111157223B (en) Fault detection method, device and system
CN109889775B (en) Data timeout processing method and device
CN103716589B (en) Method and device for reducing NVR live forwarding relay
CN106603977B (en) Video acquisition method and device based on Linux multi-core environment
CN110381022B (en) A data acquisition method and system applied to the Internet of Views
CN109698953B (en) State detection method and system for video network monitoring equipment
KR20150032973A (en) Method And Apparatus for Providing Efficient Failover
CN111885348A (en) Monitoring resource management method, device and computer readable storage medium

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