A camera fault diagnosis method and device, electronic equipment and storage medium
Patent Information
- Application Number
- CN202510485744.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-17
- Publication Date
- 2026-10-23
AI Technical Summary
[0003]现有故障诊断与恢复机制主要采用两类策略,首先是通过设定帧率阈值门限值,当摄像头数据流帧率连续低于阈值超过预设周期时触发故障判定,触发后执行设备完整重启恢复流程,其虽具有实现简单、响应迅速的特点,但其检测维度缺乏对底层硬件状态的深度诊断能力,难以进行故障隔离与定向修复;或者采用定时轮询方式遍历核心组件的状态寄存器,执行故障代码解析与健康状态评估,该方案虽然实现全链路状态监控与故障溯源,但周期性检测导致系统时钟资源占用率升高,且检测周期参数较难实现动态平衡确定,而固定的检测周期会造成故障漏检
[0015]本发明提供的一种摄像头故障诊断方法、装置、电子设备及存储介质,通过响应于摄像头上电完成,获取视频数据,基于视频数据执行第一检测流程,第一检测流程包括对视频数据分别进行丢帧检测、断流检测和错误帧检测,得到视频流故障状态信息,视频流故障状态信息包括丢帧故障信息、断流故障信息和错误帧故障信息中至少一种,根据视频流故障状态信息进行视频流故障信息上报,并触发故障定位检测,得到故障节点信息,以根据故障节点信息进行节点故障上报,故障定位检测包括根据视频流故障状态信息中存在的故障类型执行与故障类型对应的定位流程检测,故障类型包括丢帧故障、断流故障和错误帧故障;本申请通过同步执行丢帧、断流、错误帧检测,覆盖硬件异常、数据流中断、图像质量劣化等场景,突破单一检测维度限制,综合视频流特征实现多模态故障诊断,采用动态触发机制与分层检测逻辑,仅当检测到故障时才触发特定故障定位流程,而非持续轮询,减少无效资源占用,实现按需检测的动态平衡,且本申请基于故障类型的自适应定位流程进行故障节点信息精准上报,支持定向修复或部分功能降级运行,提升故障的修复效率。
Smart Images

Figure CN122970241A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of vehicle monitoring and maintenance, and in particular to a method, device, electronic equipment and storage medium for diagnosing camera faults. Background Technology
[0002] As the core perception module of advanced driver assistance systems (ADAS), the image acquisition quality of in-vehicle vision systems directly affects the reliability and safety of functions such as environmental perception, target detection, and lane keeping. With the gradual evolution of autonomous driving levels, the performance requirements of camera modules in in-vehicle vision systems are increasing. In order to ensure the real-time reliability of multimodal perception tasks in ADAS, it is necessary to build a comprehensive camera health management system to diagnose the fault status and fault location of cameras in real time.
[0003] Existing fault diagnosis and recovery mechanisms mainly employ two strategies. The first is to set a frame rate threshold. When the camera data stream frame rate continuously falls below the threshold for a preset period, a fault determination is triggered, and a complete device restart recovery process is executed. While this approach is simple to implement and responds quickly, it lacks in-depth diagnostic capabilities for the underlying hardware status, making fault isolation and targeted repair difficult. The second approach uses periodic polling to traverse the status registers of core components, performing fault code parsing and health status assessment. While this solution achieves end-to-end status monitoring and fault tracing, periodic detection increases system clock resource usage, and the detection period parameter is difficult to dynamically balance. A fixed detection period can lead to missed faults. Therefore, neither existing solution has built an adaptive detection framework, and both their detection timeliness and fault detection coverage have limitations. Summary of the Invention
[0004] The purpose of this invention is to provide a camera fault diagnosis method, device, electronic device, and storage medium to solve the above-mentioned technical problems.
[0005] This invention provides a camera fault diagnosis method, comprising: acquiring video data in response to the camera power-on completion; executing a first detection process based on the video data, the first detection process including performing frame loss detection, stream interruption detection, and error frame detection on the video data to obtain video stream fault status information, the video stream fault status information including at least one of frame loss fault information, stream interruption fault information, and error frame fault information; reporting video stream fault information according to the video stream fault status information and triggering fault location detection to obtain fault node information, so as to report node faults according to the fault node information, the fault location detection including performing a location process detection corresponding to the fault type according to the fault type present in the video stream fault status information, the fault type including frame loss fault, stream interruption fault, and error frame fault.
[0006] In one embodiment of the present invention, the camera fault diagnosis method further includes: in response to the camera power-on completion, obtaining the running status of a first detection process, the running status of the first detection process including detection started and detection not responding; if the running status of the first detection process includes detection started, then starting a second detection process according to a preset protection cycle; if the running status of the first detection process includes detection not responding, then reporting an error in the detection execution.
[0007] In one embodiment of the present invention, initiating a second detection process according to a preset guardian cycle includes: performing hardware operation detection on the hardware node to be detected according to the preset guardian cycle, wherein the hardware node to be detected includes a camera module, a deserialization and encoding module, a chip management module, and a power management module; if at least one of the camera module, deserialization and encoding module, chip management module, and power management module is in an abnormal hardware operation state, then abnormal hardware node type information and abnormal operation state information are obtained, and a hardware operation abnormality status reporting text is generated and reported based on the abnormal hardware node type information and abnormal operation state information; if the hardware operation detection of the camera module, deserialization and encoding module, chip management module, and power management module is all in a normal state, then the current second detection process ends, and the second detection process is executed cyclically according to the preset guardian cycle.
[0008] In one embodiment of the present invention, the video data is subjected to frame loss detection and flow interruption detection, which includes: determining the frame reception time difference between frames based on the video data; if the frame reception time difference is greater than or equal to a first time difference threshold, the frame loss detection is determined to be a frame loss fault; if either the frame reception time difference is greater than a second time difference threshold or the time duration for not receiving the next frame data is greater than the second time difference threshold, the flow interruption detection is determined to be a flow interruption fault.
[0009] In one embodiment of the present invention, triggering fault location detection includes: if the fault type present in the video stream fault status information is a frame dropping fault, then performing frame dropping fault location detection, the frame dropping fault location detection including obtaining frame dropping camera information corresponding to the video stream where the frame dropping fault occurred, reporting the frame dropping fault based on the frame dropping camera information and the frame dropping fault detection information, and updating the cumulative number of frame dropping fault occurrences during this power-on; if the fault type present in the video stream fault status information is a stream interruption fault, then performing stream interruption fault location detection, the stream interruption fault location detection including camera connection status detection, deserializer hardware fault status detection, camera power supply status detection, and so on. And camera module fault status detection; when at least one fault detection node is abnormal in the fault location detection, the abnormal fault detection node is reported as a fault, and the cumulative number of system faults during this power-on is updated. The cumulative number of system faults during this power-on is used to record any detected fault that occurs during this power-on process. When the cumulative number of system faults during this power-on is greater than or equal to the preset repair termination threshold, the first detection process is terminated and a camera abnormality alarm is issued; when there are no abnormal nodes in the fault location detection and the cumulative number of system faults during this power-on is less than the preset repair termination threshold, a hot-swap restart is performed.
[0010] In one embodiment of the present invention, error frame detection of the video data includes: parsing the video data to obtain frame data parsing packets; performing interface protocol verification, data format verification, and data integrity verification on each frame data parsing packet; if any of the interface protocol verification, data format verification, and data integrity verification results in verification failure, the error frame detection is determined to be an error frame fault.
[0011] In one embodiment of the present invention, triggering fault location detection includes: if the fault type present in the video stream fault status information is an error frame fault, then performing error frame fault location detection, the error frame fault location detection including chip data interface status detection, deserializer hardware fault status detection, and camera module fault status detection; when at least one error frame to be detected node is abnormal in the error frame fault location detection, the abnormal error frame to be detected node is reported abnormally, and the cumulative number of system faults occurring during this power-on is updated; when no error frame to be detected node is abnormal in the error frame fault location detection, and the cumulative number of system faults occurring during this power-on is less than a preset repair termination threshold, hot-plugging and restarting is performed.
[0012] This invention also provides a camera fault diagnosis device, comprising: a diagnostic data acquisition module for acquiring video data in response to camera power-on completion; a first diagnostic execution module for executing a first detection process based on the video data, the first detection process including performing frame loss detection, stream interruption detection, and error frame detection on the video data to obtain video stream fault status information, the video stream fault status information including at least one of frame loss fault information, stream interruption fault information, and error frame fault information; and a fault location processing module for reporting video stream fault information based on the video stream fault status information and triggering fault location detection to obtain fault node information, so as to report node faults based on the fault node information, the fault location detection including performing a location process detection corresponding to the fault type existing in the video stream fault status information, the fault type including frame loss fault, stream interruption fault, and error frame fault.
[0013] This invention also provides an electronic device, including: one or more processors; and a storage device for storing one or more programs, which, when executed by the one or more processors, cause the electronic device to implement the camera fault diagnosis method as described in any of the above embodiments.
[0014] This invention also provides a computer-readable storage medium storing computer-readable instructions, which, when executed by a computer's processor, cause the computer to perform the camera fault diagnosis method as described in any of the above embodiments.
[0015] This invention provides a camera fault diagnosis method, apparatus, electronic device, and storage medium. Upon camera power-on, video data is acquired. A first detection process is executed based on the video data. This first detection process includes performing frame loss detection, stream interruption detection, and error frame detection on the video data to obtain video stream fault status information. The video stream fault status information includes at least one of frame loss fault information, stream interruption fault information, and error frame fault information. Based on the video stream fault status information, video stream fault information is reported, and fault location detection is triggered to obtain fault node information. Node fault reporting is then performed based on the fault node information. Fault location detection includes identifying faults present in the video stream fault status information. The application performs a fault location process detection corresponding to the fault type, which includes frame loss faults, stream interruption faults, and erroneous frame faults. By synchronously performing frame loss, stream interruption, and erroneous frame detection, this application covers scenarios such as hardware anomalies, data stream interruptions, and image quality degradation, breaking through the limitations of a single detection dimension. It achieves multimodal fault diagnosis by comprehensively utilizing video stream features. It adopts a dynamic triggering mechanism and hierarchical detection logic, triggering a specific fault location process only when a fault is detected, rather than continuously polling, reducing the occupation of invalid resources and achieving a dynamic balance of on-demand detection. Furthermore, this application accurately reports fault node information based on the adaptive location process of fault type, supporting targeted repair or partial functional degradation operation, thereby improving the efficiency of fault repair.
[0016] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description
[0017] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. It is obvious that the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort. In the drawings:
[0018] Figure 1 This is a schematic diagram illustrating an exemplary system architecture as shown in an exemplary embodiment of this application;
[0019] Figure 2 This is a flowchart illustrating a camera fault diagnosis method in an exemplary embodiment of this application;
[0020] Figure 3 This is a schematic diagram illustrating the first detection process in specific camera fault diagnosis, as shown in an exemplary embodiment of this application.
[0021] Figure 4 This is a schematic diagram of a camera fault diagnosis device shown in an exemplary embodiment of this application;
[0022] Figure 5 This is a schematic diagram of the structure of a computer system for an electronic device, as illustrated in an exemplary embodiment of this application. Detailed Implementation
[0023] The embodiments of the present invention will be described below with reference to the accompanying drawings and specific examples. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be understood that the preferred embodiments are only for illustrating the present invention and not for limiting the scope of protection of the present invention.
[0024] It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. Therefore, the illustrations only show the components related to the present invention and are not drawn according to the actual number, shape and size of the components in the actual implementation. In the actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.
[0025] In the following description, numerous details are explored to provide a more thorough explanation of embodiments of the invention. However, it will be apparent to those skilled in the art that embodiments of the invention may be practiced without these specific details. In other embodiments, well-known structures and devices are shown in block diagram form rather than in detail to avoid obscuring embodiments of the invention.
[0026] The term "and / or" used in this application describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. The character " / " generally indicates that the related objects before and after it are in an "or" relationship.
[0027] Figure 1 This is a schematic diagram illustrating an exemplary system architecture as shown in an exemplary embodiment of this application.
[0028] Reference Figure 1As shown, the system architecture may include a camera 110 and a computer device 120. The computer device 120 acquires video data in response to the power-on of the camera 110, and executes a first detection process based on the video data. This first detection process includes performing frame loss detection, stream interruption detection, and error frame detection on the video data to obtain video stream fault status information. This video stream fault status information includes at least one of frame loss fault information, stream interruption fault information, and error frame fault information. Based on the video stream fault status information, the computer device 120 reports video stream fault information and triggers fault location detection to obtain fault node information. Based on the fault node information, it reports node faults. This fault location detection includes performing a location process detection corresponding to the fault type present in the video stream fault status information. The fault types include frame loss faults, stream interruption faults, and error frame faults. The aforementioned camera 110 refers to an in-vehicle imaging device used for environmental image perception in intelligent assisted driving, including but not limited to front-view cameras, wide-angle cameras, telephoto cameras, rear-view cameras, side-view cameras, surround-view cameras, and cabin cameras; the aforementioned computer device 120 refers to a hardware device used for processing, storing, and transmitting data, which can provide relevant computing power to support logical judgment capabilities and can carry and deploy relevant monitoring and control software, including but not limited to microcomputers, microcontrollers, virtual computers, and embedded machines.
[0029] Schematic, the computer device 120 acquires video data in response to the power-on of the camera 110, and performs a first detection process based on the video data. The first detection process includes performing frame loss detection, stream interruption detection, and error frame detection on the video data to obtain video stream fault status information. The video stream fault status information includes at least one of frame loss fault information, stream interruption fault information, and error frame fault information. Based on the video stream fault status information, video stream fault information is reported, and fault location detection is triggered to obtain fault node information. Based on the fault node information, node fault reporting is performed. Fault location detection includes performing fault matching based on the fault type present in the video stream fault status information. The fault location process is corresponding to the fault type, which includes frame loss fault, flow interruption fault, and erroneous frame fault. This application synchronously executes frame loss, flow interruption, and erroneous frame detection, covering scenarios such as hardware anomalies, data stream interruptions, and image quality degradation. It breaks through the limitations of a single detection dimension, integrates video stream features to achieve multimodal fault diagnosis, and adopts a dynamic triggering mechanism and hierarchical detection logic. The specific fault location process is triggered only when a fault is detected, rather than continuous polling, reducing the occupation of invalid resources and achieving dynamic balance of on-demand detection. Furthermore, this application accurately reports fault node information based on the adaptive location process of fault type, supports targeted repair or partial function degradation operation, and improves the efficiency of fault repair.
[0030] Figure 2This is a flowchart illustrating an exemplary embodiment of the present application of a camera fault diagnosis method, which can be used in... Figure 1 It can be executed in the implementation environment described above, but it can also be implemented in other implementation environments. No specific limitations are imposed on the implementation environments mentioned above. Figure 3 This is a schematic diagram illustrating the first detection process in a specific camera fault diagnosis, as shown in an exemplary embodiment of this application. (Refer to...) Figure 2 and Figure 3 As shown in the flowchart, the camera fault diagnosis method includes at least steps S210 to S230, which are described in detail below:
[0031] In step S210, video data is acquired in response to the camera power-on completion.
[0032] In one embodiment of this application, after the vehicle infotainment system is powered on, the vehicle infotainment system control chip controls the power supply of the peripheral camera and implements graded power supply to each camera through the power management chip. Each camera sends a status signal after initialization. If a device fails to respond within a preset power-on detection time threshold, it is marked as abnormal and a warning message is sent.
[0033] In one embodiment of this application, each camera continuously captures images and directs the captured video stream to a cache partition for subsequent image processing and image diagnostics.
[0034] In step S220, a first detection process is performed based on the video data. The first detection process includes performing frame loss detection, stream interruption detection, and error frame detection on the video data to obtain video stream fault status information.
[0035] In one embodiment of this application, the video stream fault status information includes at least one of frame loss fault information, stream interruption fault information, and error frame fault information.
[0036] In one embodiment of this application, frame loss detection of video data includes determining the frame reception time difference between frames based on the video data. If the frame reception time difference is greater than or equal to a first time difference threshold, the frame loss detection is determined to be a frame loss fault. Specifically, the frame reception time difference refers to the time interval between the acquisition times of two consecutive frames in the video stream at the receiving end. For example, if the first frame is received at 100 milliseconds and the second frame is received at 150 milliseconds, the frame reception time difference is 50 milliseconds. In one embodiment of this application, the determination of the first time difference threshold includes calculating the average frame reception time difference based on the frame reception time difference between each data frame in the received video stream, and setting twice the average frame reception time difference as the first time difference threshold. For example, if the average frame reception time difference calculated for the video stream is approximately 35 milliseconds, the first time difference threshold can be set to 70 milliseconds.
[0037] It should be noted that the above-mentioned method for determining the first time difference threshold is only one possible implementation method of this application. In the specific implementation of this solution, it may also include multiplication based on the camera calibration frame rate information, or be customized by relevant technical personnel or users based on application requirements. The method for determining the first time difference threshold is not specifically limited here.
[0038] In one embodiment of this application, the video data interruption detection includes determining the frame reception time difference between frames based on the video data. If either the frame reception time difference is greater than a second time difference threshold or the duration of the time without receiving the next frame is greater than the second time difference threshold, the interruption detection is determined to be an interruption fault. Specifically, if the frame reception time difference between the current frame and the previous frame exceeds the second time difference threshold, such as a second time difference threshold of 375 milliseconds and a frame reception time difference of 500 milliseconds, the interruption detection is determined to be an interruption fault; or if, after receiving the previous frame, no new frame is received for more than the second time difference threshold, such as a second time difference threshold of 375 milliseconds and the timestamp of the last frame being 800 milliseconds, and no new frame is received within a total duration of 1175 milliseconds, the interruption detection is determined to be an interruption fault. One method for determining the second time difference threshold in this application embodiment includes calculating the average frame reception time difference based on the frame reception time difference between each data frame in the received video stream, and determining five times the average frame reception time difference as the second time difference threshold. For example, if the average frame reception time difference calculated from the video stream is about 35 milliseconds, the second time difference threshold can be set to 175 milliseconds.
[0039] It should be noted that the above-mentioned method for determining the second time difference threshold is only one possible implementation method of this application. In the specific implementation of this solution, it may also include determining it by multiplying the first time difference threshold, or by setting it in a personalized manner by relevant technical personnel or users based on application requirements. The method for determining the second time difference threshold is not specifically limited here.
[0040] In one embodiment of this application, error frame detection of video data includes parsing the video data to obtain frame data parsing packets, and performing interface protocol verification, data format verification, and data integrity verification on each frame data parsing packet. If any of the interface protocol verification, data format verification, and data integrity verification results in verification failure, the error frame detection is determined to be an error frame fault.
[0041] Specifically, in this application, error frame detection is a specialized verification based on the Mobile Industry Processor Interface (MIM) standard. It verifies whether the video stream's data packet structure, synchronization header, and data format conform to the MIM standard's transmission requirements. First, the video data is parsed into frame data parsing packets, then segmented into independent frame data parsing packets to obtain the synchronization header, data length, pixel format, and checksum field. The synchronization header is a fixed sequence of bytes identifying the start position of the data packet; the data length is the effective payload length of the current data packet; and the checksum field is a hash value used for verification. Interface protocol verification verifies whether the data packet conforms to the MIM standard, including but not limited to verification of synchronization header format, protocol version, and field positions. Data format verification ensures that parameters such as pixel format and resolution within the data packet conform to the MIM standard; specific verification content includes, but is not limited to, pixel format verification, resolution verification, and data packet structure verification. Data integrity verification ensures that the data has not been damaged or tampered with during transmission; verification content includes, but is not limited to, cyclic redundancy check (CRC) verification, hash value verification, and parity check.
[0042] In one embodiment of this application, video stream fault status information is used to characterize the list of detection types and detection results in the first detection process, and its presentation includes, but is not limited to, text information and table information.
[0043] In step S230, video stream fault information is reported based on video stream fault status information, and fault location detection is triggered to obtain fault node information, so as to report node faults based on fault node information.
[0044] In one embodiment of this application, the fault location detection includes performing a location process detection corresponding to the fault type based on the fault type present in the video stream fault status information. The fault types include frame loss fault, stream interruption fault, and erroneous frame fault.
[0045] In one embodiment of this application, if the fault type in the video stream fault status information is a frame dropping fault, then frame dropping fault location detection is performed. The frame dropping fault location detection includes obtaining the frame dropping camera information corresponding to the video stream where the frame dropping fault occurred, reporting the frame dropping fault based on the frame dropping camera information and the frame dropping fault detection information, and updating the cumulative number of frame dropping fault occurrences during the current power-on. The frame dropping camera information refers to information identifying the specific camera that caused the frame dropping fault, including but not limited to camera ID, device location, and hardware serial number. The frame dropping fault detection information during frame dropping fault reporting includes context data at the time of the fault occurrence, such as fault timestamp, number of frame drops, and video stream parameters. The cumulative number of frame dropping fault occurrences during the current power-on is used to record frame dropping fault events. When the cumulative number of frame dropping fault occurrences during the current power-on is greater than a preset frame dropping fault alarm threshold, a real-time alert is triggered. When the cumulative number of frame dropping fault occurrences during the current power-on is less than or equal to the preset frame dropping fault alarm threshold, the cumulative number of frame dropping fault occurrences during the current power-on is reset to zero.
[0046] In one embodiment of this application, if the fault type in the video stream fault status information is a disconnection fault, then a disconnection fault location detection is performed. The disconnection fault location detection includes camera connection status detection, deserializer hardware fault status detection, camera power supply status detection, and camera module fault status detection. When at least one disconnection detection node is abnormal in the disconnection fault location detection, the abnormal disconnection detection node is reported as a disconnection fault, and the cumulative number of system faults occurring during this power-on is updated. The cumulative number of system faults occurring during this power-on is used to record any detected fault that occurs during this power-on process. When the cumulative number of system faults occurring during this power-on is greater than or equal to a preset repair termination threshold, the first detection process is terminated, and a camera abnormality alarm is issued. When there are no abnormal nodes in the disconnection fault location detection, and the cumulative number of system faults occurring during this power-on is less than the preset repair termination threshold, a hot-swap restart is performed.
[0047] Specifically, the disconnection detection node is used to characterize hardware that may cause disconnection faults, including but not limited to camera connection status, deserializer hardware failure, camera power supply status, and camera module failure. The preset repair termination threshold refers to the set upper limit of the number of faults allowed; exceeding this limit triggers a forced termination of repair. Camera connection status detection checks the camera's network connection or physical interface, such as IP address reachability or whether the data access port is recognized. Deserializer hardware failure detection verifies whether the deserializer is working properly, such as reading status codes through hardware registers or detecting output signals. Camera power supply status detection measures whether the camera's input voltage and current are within the normal range. Camera module failure detection verifies whether the module responds by sending test commands. If at least one disconnection detection node detects an anomaly, a disconnection anomaly is reported. The anomaly report includes, but is not limited to, the fault type, the anomaly node, and a timestamp. The cumulative system fault count for this power-on is incremented by 1 in the device's local or cloud database. After the report is completed, hot-swap repair is performed. Before repair, it is necessary to check whether the cumulative number of system failures during this power-on is greater than or equal to the preset repair termination threshold. If the cumulative number of system failures during this power-on is greater than or equal to the preset repair termination threshold, the first detection process is terminated and a camera abnormality alarm is issued. If the cumulative number of system failures during this power-on is less than the preset repair termination threshold, hot-swap restart is performed on the faulty camera, that is, the camera interface is unplugged and plugged in and restarted again without turning off the power.
[0048] If the fault type in the video stream fault status information is an error frame fault, then error frame fault location detection is performed. The error frame fault location detection includes chip data interface status detection, deserializer hardware fault status detection, and camera module fault status detection. When at least one error frame to be detected node is abnormal in the error frame fault location detection, the abnormal error frame to be detected node is reported as abnormal, and the cumulative number of system faults occurring during this power-on is updated. When no error frame to be detected node is abnormal in the error frame fault location detection, and the cumulative number of system faults occurring during this power-on is less than a preset repair termination threshold, a hot-swap restart is performed.
[0049] Specifically, the nodes to be detected for error frames include, but are not limited to, the chip data interface that caused the error frame, the deserializer hardware, and the camera module. First, the chip data interface status is checked to confirm a stable data interface connection. Second, the deserializer hardware is checked for faults to verify its proper functioning, such as by reading error flags in the chip status register. Finally, the camera module is checked for faults to determine if the sensor is malfunctioning. If any node detects an anomaly, an anomaly report is triggered, including but not limited to the fault type, the anomaly node, and error details.
[0050] In one embodiment of this application, based on the first detection process described above, functional frame loss detection, stream interruption detection, and error frame detection can be performed on the video stream to determine the usability status of the current video data. If an anomaly exists, fault location detection corresponding to the anomaly status is further triggered, which can ensure accurate location of the abnormal node and timely reporting of fault information, facilitating response, repair, maintenance, and other safety assurance operations.
[0051] In one embodiment of this application, in addition to the execution of the first detection process described above, the method further includes obtaining the running status of the first detection process in response to the completion of camera power-on. The running status of the first detection process includes detection started and detection not responding. If the running status of the first detection process includes detection started, the second detection process is started according to a preset guard period. If the running status of the first detection process includes detection not responding, an error is reported for detection execution. The second detection process, initiated according to a preset guardian cycle, includes hardware operation detection. The hardware nodes to be detected include a camera module, a deserialization and encoding module, a chip management module, and a power management module. If at least one of these modules is found to be in an abnormal hardware operation state, information on the abnormal hardware node type and abnormal operating status is obtained. An abnormal hardware operation status report text is generated and reported based on this information. If all modules are in normal operating status, the second detection process ends, and the process is repeated cyclically according to the preset guardian cycle. The camera module includes, but is not limited to, a camera photosensitive unit and a camera data storage unit. The deserialization and encoding module includes, but is not limited to, a deserializer and an encoder. The chip management module includes, but is not limited to, a SOC chip. The power management module includes, but is not limited to, a coaxial power supply chip and a camera power management chip.
[0052] Specifically, the preset protection cycle is a hardware health status scan cycle that is automatically executed at fixed intervals. This cycle can be set by relevant technical personnel or users based on accuracy or robustness requirements, and the specific value is not limited here. In the solution of this application, due to the existence of the first detection process, the second detection process serves as the execution of the protection process, and its detection cycle can be configured at the second level, thus ensuring functional safety. Among the hardware nodes to be tested, the camera module includes a camera photosensitive unit such as a CMOS sensor and a data storage unit such as a cache chip; the chip management module includes a system-on-a-chip (SOC chip) for managing video encoding / decoding and data streams; the power management module includes, but is not limited to, coaxial power supply chips such as PoC power supply modules, and camera power management chips responsible for voltage regulation. The hardware operation anomaly report text is a structured anomaly report, including but not limited to the anomaly module type, specific faulty unit, and anomaly details.
[0053] In one embodiment of this application, the camera module detection includes: photosensitive unit detection (reading sensor temperature and detecting frame data continuity), and data storage unit detection (verifying cache read / write speed and remaining capacity); deserialization and enserialization module detection (checking signal phase-locked state and verifying encoded signal level); chip management module detection (monitoring SOC chip core temperature, load rate, and memory usage); and power management module detection (measuring output voltage for the coaxial power supply chip and detecting current fluctuation range for the power management chip). If no abnormality is detected, the current detection ends, and the system waits for the next cycle to start. If an abnormality is detected, a structured abnormality report is generated, including but not limited to the abnormal module type, specific faulty unit, and abnormality details. For example, if the photosensitive unit of the camera module is abnormal, the reported abnormality report includes: abnormal module is camera module, faulty unit is photosensitive unit, abnormality type is temperature exceeding limit, abnormal detection value is 65℃, and an actual timestamp is marked.
[0054] In this embodiment, the periodic monitoring program is extended to provide full-link diagnostics, covering all hardware nodes. The diagnostic cycle can be adjusted according to different platforms to meet the functional safety and performance requirements of different platforms.
[0055] This invention provides a camera fault diagnosis method, apparatus, electronic device, and storage medium. Upon camera power-on, video data is acquired. A first detection process is executed based on the video data. This first detection process includes performing frame loss detection, stream interruption detection, and error frame detection on the video data to obtain video stream fault status information. The video stream fault status information includes at least one of frame loss fault information, stream interruption fault information, and error frame fault information. Based on the video stream fault status information, video stream fault information is reported, and fault location detection is triggered to obtain fault node information. Node fault reporting is then performed based on the fault node information. Fault location detection includes identifying faults present in the video stream fault status information. The application performs a fault location process detection corresponding to the fault type, which includes frame loss faults, stream interruption faults, and erroneous frame faults. By synchronously performing frame loss, stream interruption, and erroneous frame detection, this application covers scenarios such as hardware anomalies, data stream interruptions, and image quality degradation, breaking through the limitations of a single detection dimension. It achieves multimodal fault diagnosis by comprehensively utilizing video stream features. It adopts a dynamic triggering mechanism and hierarchical detection logic, triggering a specific fault location process only when a fault is detected, rather than continuously polling, reducing the occupation of invalid resources and achieving a dynamic balance of on-demand detection. Furthermore, this application accurately reports fault node information based on the adaptive location process of fault type, supporting targeted repair or partial functional degradation operation, thereby improving the efficiency of fault repair.
[0056] The following describes an embodiment of the apparatus described in this application, which can be used to execute the camera fault diagnosis method described in the above embodiments of this application. For details not disclosed in the apparatus embodiments of this application, please refer to the embodiments of the camera fault diagnosis method described in the above applications.
[0057] Figure 4 This is a schematic diagram illustrating a camera fault diagnosis device according to an exemplary embodiment of this application. The device can be applied to… Figure 2 The method implementation process shown can be based on the device Figure 1 The implementation environment shown can be applied to other exemplary implementation environments and specifically configured in other devices. This embodiment does not limit the implementation environment to which the device is applicable.
[0058] like Figure 4 As shown, the exemplary camera fault diagnosis device includes: a diagnostic data acquisition module 401, a first diagnostic execution module 402, and a fault location processing module 403.
[0059] The diagnostic data acquisition module 401 is used to acquire video data in response to the camera power-on completion; the first diagnostic execution module 402 is used to execute a first detection process based on the video data, the first detection process including performing frame loss detection, stream interruption detection and error frame detection on the video data to obtain video stream fault status information, the video stream fault status information including at least one of frame loss fault information, stream interruption fault information and error frame fault information; the fault location processing module 403 is used to report video stream fault information according to the video stream fault status information and trigger fault location detection to obtain fault node information, so as to report node faults according to the fault node information, the fault location detection includes performing a location process detection corresponding to the fault type according to the fault type present in the video stream fault status information, the fault type including frame loss fault, stream interruption fault and error frame fault.
[0060] Embodiments of this application also provide an electronic device, including: one or more processors; and a storage device for storing one or more programs, which, when executed by one or more processors, cause the electronic device to implement the camera fault diagnosis method provided in the above embodiments.
[0061] Figure 5 This is a schematic diagram illustrating the structure of a computer system for an electronic device, as shown in an exemplary embodiment of this application. It should be noted that... Figure 5 The computer system 500 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0062] like Figure 5 As shown, the computer system 500 includes a Central Processing Unit (CPU) 501, which can perform various appropriate actions and processes based on a program stored in Read-Only Memory (ROM) 502 or a program loaded from storage into Random Access Memory (RAM) 503, such as performing the methods described in the above embodiments. The RAM 503 also stores various programs and data required for system operation. The CPU 501, ROM 502, and RAM 503 are interconnected via a bus. An Input / Output (I / O) interface 505 is also connected to the bus 504.
[0063] The following components are connected to I / O interface 505: an input section 506 including a keyboard, mouse, etc.; an output section 507 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN (Local Area Network) card, modem, etc. The communication section performs communication processing via a network such as the Internet. A drive is also connected to I / O interface 505 as needed. Removable media 511, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 510 as needed so that computer programs read from them can be installed into storage section 508 as needed.
[0064] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program including a computer program for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 509, and / or installed from removable medium 511. When the computer program is executed by central processing unit (CPU) 501, it performs various functions defined in the system of this application.
[0065] It should be noted that the computer-readable medium shown in the embodiments of this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying a computer-readable computer program. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.
[0066] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. Each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0067] In the corresponding figures of the above embodiments, connecting lines can represent the connection relationship between various components, indicating more constitutive signal paths and / or one or more ends of some lines having arrows to indicate the main information flow direction. Connecting lines serve as an identifier and are not a limitation on the scheme itself, but rather, using these lines in conjunction with one or more exemplary embodiments helps to more easily connect circuits or logic units. Any signal represented (determined by design requirements or preferences) can actually include one or more signals that can be transmitted in any direction and can be implemented in any suitable type of signal scheme.
[0068] The units described in the embodiments of this application can be implemented in software or hardware, and the described units can also be located in a processor. The names of these units do not necessarily limit the specific unit itself.
[0069] Another aspect of this application provides a computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the method as described above. This computer-readable storage medium may be included in the electronic device described in the above embodiments, or it may exist independently and not assembled into the electronic device.
[0070] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to the embodiments of this application, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0071] Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, touch terminal, or network device, etc.) to execute the methods according to the embodiments of this application.
[0072] It should be noted that this application can be used in a wide range of general-purpose or special-purpose computing system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc.
[0073] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the embodiments disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein.
[0074] It should be understood that the above content of this application is only a preferred exemplary embodiment of this application and is not intended to limit the implementation of this application. Those skilled in the art can easily make corresponding modifications or alterations based on the main concept and spirit of this application. Therefore, the scope of protection of this application should be the scope of protection claimed in the claims.
Claims
1. A method for diagnosing camera faults, characterized in that, The camera fault diagnosis method includes: Upon camera power-on, video data is acquired. Based on the video data, a first detection process is executed. The first detection process includes performing frame loss detection, stream interruption detection, and error frame detection on the video data to obtain video stream fault status information. The video stream fault status information includes at least one of frame loss fault information, stream interruption information, and error frame fault information. Based on the video stream fault status information, video stream fault information is reported and fault location detection is triggered to obtain fault node information. Node faults are then reported based on the fault node information. The fault location detection includes performing a location process detection corresponding to the fault type based on the fault type present in the video stream fault status information. The fault types include frame loss faults, stream interruption faults, and erroneous frame faults.
2. The camera fault diagnosis method according to claim 1, characterized in that, The camera fault diagnosis method also includes: In response to the camera power-on completion, the running status of the first detection process is obtained, including the detection started and the detection not responding; If the running status of the first detection process includes "detection started", then the second detection process is started according to the preset protection period; If the running status of the first detection process includes "no response", then an error is reported during detection execution.
3. The camera fault diagnosis method according to claim 2, characterized in that, The second detection process, initiated according to the preset protection cycle, includes: According to the preset protection cycle, hardware operation detection is performed on the hardware node to be tested. The hardware node to be tested includes a camera module, a deserialization and enumeration module, a chip management module, and a power management module. If at least one of the camera module, deserialization and enserialization module, chip management module, and power supply management module is detected as having an abnormal hardware operation status, then the abnormal hardware node type information and abnormal operation status information are obtained, and a hardware operation abnormal status report text is generated and reported based on the abnormal hardware node type information and abnormal operation status information. If the hardware operation of the camera module, the deserialization and enumeration module, the chip management module, and the power supply management module are all in normal condition, then the second detection process ends and the second detection process is executed repeatedly according to the preset protection cycle.
4. The camera fault diagnosis method according to claim 1, characterized in that, The video data is subjected to frame drop detection and stream interruption detection, including: Determine the frame reception time difference between the frames based on the video data; If the frame reception time difference is greater than or equal to the first time difference threshold, the frame loss detection is determined to be a frame loss fault. If either the frame reception time difference is greater than the second time difference threshold or the time duration for not receiving the next frame data is greater than the second time difference threshold, then the interruption detection is determined to be an interruption fault.
5. The camera fault diagnosis method according to claim 4, characterized in that, Triggering fault location detection includes: If the fault type in the video stream fault status information is a frame dropping fault, then a frame dropping fault location detection is performed. The frame dropping fault location detection includes obtaining the frame dropping camera information corresponding to the video stream that has a frame dropping fault, reporting the frame dropping fault based on the frame dropping camera information and the frame dropping fault detection information, and updating the cumulative number of frame dropping faults that have occurred during this power-on. If the fault type in the video stream fault status information is a disconnection fault, then a disconnection fault location detection is performed. The disconnection fault location detection includes camera connection status detection, deserializer hardware fault status detection, camera power supply status detection, and camera module fault status detection. If at least one disconnection-detected node is abnormal in the disconnection fault location detection, the abnormal disconnection-detected node is reported as a disconnection fault, and the cumulative number of system faults occurring during this power-on is updated. The cumulative number of system faults occurring during this power-on is used to record any detected fault that occurs during this power-on process. If the cumulative number of system faults occurring during this power-on is greater than or equal to a preset repair termination threshold, then the first detection process is terminated, and a camera abnormality alarm is issued. If no node is abnormal in the disconnection fault location detection, and the cumulative number of system faults occurring during this power-on is less than the preset repair termination threshold, a hot-swap restart is performed.
6. The camera fault diagnosis method according to claim 1, characterized in that, Error frame detection of the video data includes: The video data is parsed to obtain frame data parsing packets; Perform interface protocol verification, data format verification, and data integrity verification on each frame of data parsing packet; If any of the interface protocol verification, data format verification, and data integrity verification results in a verification failure, then the error frame detection is determined to be an error frame fault.
7. The camera fault diagnosis method according to claim 6, characterized in that, Triggering fault location detection includes: If the fault type in the video stream fault status information is an error frame fault, then an error frame fault location detection is performed. The error frame fault location detection includes chip data interface status detection, deserializer hardware fault status detection, and camera module fault status detection. If at least one fault frame detection node is abnormal in the fault frame fault location detection, the abnormal fault frame detection node is reported as abnormal, and the cumulative number of system faults during this power-on is updated. If no error frame is detected in the fault location detection and the number of system faults accumulated during this power-on is less than the preset repair termination number threshold, a hot-swap restart will be performed.
8. A camera fault diagnosis device, characterized in that, The camera fault diagnosis device includes: The diagnostic data acquisition module is used to acquire video data in response to the camera power-on completion; The first diagnostic execution module is used to execute a first detection process based on the video data. The first detection process includes performing frame loss detection, stream interruption detection, and error frame detection on the video data to obtain video stream fault status information. The video stream fault status information includes at least one of frame loss fault information, stream interruption fault information, and error frame fault information. The fault location processing module is used to report video stream fault information based on the video stream fault status information and trigger fault location detection to obtain fault node information, so as to report node faults based on the fault node information. The fault location detection includes performing a location process detection corresponding to the fault type based on the fault type present in the video stream fault status information. The fault types include frame loss fault, stream interruption fault, and erroneous frame fault.
9. An electronic device, characterized in that, It includes a processor, a memory, and a communication bus; the communication bus is used to connect the processor and the memory; the processor is used to execute a computer program stored in the memory to implement the camera fault diagnosis method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, It stores a computer program that enables the computer to perform the camera fault diagnosis method as described in any one of claims 1-7.
