A method and system for testing a TF card recording based on recording stream index closed loop verification

By using the closed-loop verification method of recording stream index, multiple types of evidence in the recording test are collected and aligned, solving the problem of full-stage verification of the recording link in the TF card recording test of security equipment, and realizing the efficient discovery and location of recording reliability problems.

CN123164218APending Publication Date: 2026-11-24深圳市天视通科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611274691.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-21
Publication Date
2026-11-24

AI Technical Summary

Technical Problem

Existing security equipment TF card recording test solutions are difficult to achieve closed-loop verification of the entire process, including recording stream output, file storage, index update, event segments, and playback results, in complex scenarios. This results in insufficient ability to detect recording reliability issues and an unobjective conclusion on the problem location.

Method used

By using a closed-loop verification method based on the recording stream index, information such as recording stream output, video file growth, index update, event segments, and playback verification is collected, and their timestamps are aligned to a unified time base. Multi-dimensional cross-verification is then performed to form a closed-loop cross-verification result, which is used to identify recording link anomalies and perform stage-based attribution.

Benefits of technology

It enables quantitative and reproducible reliability testing of the entire recording link, improves the ability to discover recording reliability problems and the efficiency of fault location, reduces the cost of repeated troubleshooting between testing and R&D, and is applicable to security equipment with different forms and interface capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123164218A_ABST
    Figure CN123164218A_ABST
Patent Text Reader

Abstract

This application discloses a TF card recording test method and system based on closed-loop verification of recording stream index. It includes: configuring the TF card status, recording mode, and disturbance conditions of the security device under test and triggering the recording service; collecting recording stream output information, recording file growth information, index update information, event log information, and event segment information at a monitoring cycle of 500ms to 1s; calling the playback interface to perform retrieval, location, and playback verification for the target time period; normalizing various timestamps to a unified time base, and then performing recording stream-file consistency verification, file-index closed-loop verification, event segment consistency verification, and playback closed-loop verification; and outputting test conclusions and fault attribution results based on the five-dimensional status combination of recording stream, file, index, event segment, and playback. This application, through closed-loop cross-judgment of multiple types of evidence, can reliably detect anomalies at each stage of the recording link and output attribution results, improving test objectivity and fault location efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of embedded security equipment testing technology, and in particular to a TF card recording test method and system based on closed-loop verification of recording stream index. Background Technology

[0002] Security equipment typically supports writing audio and video data to local storage media such as TF cards to enable continuous recording, event recording, and local playback. Existing tests for local recording functionality usually include individual function verifications such as whether the TF card is recognized, whether recording can start, whether a recording file is generated, and whether playback is possible.

[0003] However, in actual product testing and after-sales problem localization, video recording defects often do not manifest as "no recording at all," but rather more commonly as: the recording stream has been output but the file has not been properly written to disk; the file continues to grow but the index has not been updated synchronously; event recording is triggered but the event segment does not cover the target time period; playback can be retrieved but the timeline is misaligned; both the file and the index exist but playback parsing fails. These types of problems are often distributed at different stages of the recording chain, and it is difficult to reliably detect them by simply relying on the existence of the recording file or the result of a single playback.

[0004] Specifically, existing testing methods have the following shortcomings: First, many testing schemes only verify whether the video file is generated or whether the playback is successful, lacking a holistic verification of the correspondence between recording stream output, file writing to disk, index update, event fragment generation, and playback parsing; Second, many tests rely on only a single piece of evidence, such as only looking at the file, only looking at the index, or only looking at the playback result, making it difficult to accurately distinguish between file writing anomalies, index generation anomalies, event fragment anomalies, and playback parsing anomalies; Third, in complex scenarios such as full card coverage, hot-swapping, concurrent streaming, and concurrent PTZ actions, existing tests struggle to maintain objective, quantitative, and reproducible judgment criteria; Fourth, when recording anomalies occur, existing test conclusions usually only provide a pass or fail, making it difficult to further output problem attribution results suitable for R&D positioning.

[0005] Therefore, a systematic testing solution for TF card recording links in security equipment is needed. This solution should enable the testing process to simultaneously correlate recording output, file growth, index updates, event segments, and playback results around a unified time reference, and to form a closed-loop cross-judgment based on multiple types of evidence, thereby improving the ability to detect recording reliability issues and locate faults. Summary of the Invention

[0006] To address the aforementioned shortcomings of existing technologies, this invention provides a TF card recording test method and system based on closed-loop verification of recording stream index, which solves the problems in existing test schemes that can only roughly determine the existence of recording files, lack link closed-loop verification, have difficulty distinguishing the stage of anomaly occurrence, and have insufficient objectivity in the location conclusion.

[0007] In a first aspect, embodiments of this application provide a TF card recording test method based on closed-loop verification of the recording stream index, comprising the following steps: Configure the test scenario parameters for the security device under test, and trigger the recording service of the security device under test; During the execution of the recording service, recording stream output information and recording file growth information are collected, as well as index update information corresponding to the recording service; Collect event log information and event fragment information corresponding to the events; Call the playback interface of the security device under test to perform retrieval, location and playback verification for the target time period, and obtain playback verification information; Align the timestamps in the recording output information, the video file growth information, the index update information, the event log information, the event segment information, and the playback verification information to a unified time base, and perform closed-loop cross-validation based on the aligned information to obtain the closed-loop cross-validation result; Based on the closed-loop cross-validation results, stage-by-stage attribution is performed on the video link anomalies, and test conclusions and fault attribution results are output. The closed-loop cross-validation includes: Perform a recording-file consistency check based on the recording output information and the recording file growth information; Perform file-index closed-loop verification based on the video file growth information and the index update information; Perform event fragment consistency verification based on the event log information and the event fragment information; Perform a replay closed-loop verification based on the index update information, the event fragment information, and the replay verification information.

[0008] Preferably, the test scenario parameters include TF card status, recording mode, disturbance conditions, and target verification time period; The TF card status includes at least one of the following: normal card, full card, fragmented card, and hot-swappable recovery status; The recording mode includes at least one of continuous recording, event recording, manual recording, and alarm recording; The disturbance conditions include at least one of concurrent streaming, concurrent gimbal actions, and network fluctuations; The configuration of the test scenario parameters is performed through at least one of the following: device web interface, open SDK interface, ONVIF interface, private control protocol, or local debugging interface.

[0009] Preferably, the recording output information includes the continuous output status of the bitstream, timestamp continuity information, and bitstream interruption information; The video file growth information includes file generation status, file size change information, file start and end time information, and file rotation information; The index update information includes index entry change information, index update time information, and index time mapping information; The event segment information includes the event segment generation status, segment start time, segment end time, and the correspondence between the segment and the main recording. The playback verification information includes the retrieval hit status, playback continuity status, and playback timestamp.

[0010] Preferably, the timestamps include recording timestamps, file timestamps, index timestamps, event timestamps, and playback timestamps; the unified time base is the system time of the security device under test, or a unified time base for the testing end. The step of aligning timestamps to a unified time reference includes: when a time jump is detected, dividing the time before and after the jump into different time periods, aligning the data before and after the jump with a monotonic time series within each segment; and marking data segments that cannot be restored to a unified time reference as gray data segments and outputting them separately.

[0011] Preferably, the recording-file consistency verification includes determining the theoretical file size deviation, determining the overlap of time intervals, determining the file growth stagnation, and determining the bitstream interruption.

[0012] Preferably, the file-index closed-loop verification includes index update delay determination, time mapping deviation determination, index continuity determination, and index reconstruction determination after recovery.

[0013] Preferably, the event segment consistency verification includes event segment time window coverage determination and segment-to-main recording dependency determination; the playback closed-loop verification includes retrieval hit determination, playback continuity determination and time consistency determination.

[0014] Preferably, the stage-based attribution of video recording link anomalies includes: determining the anomaly stage based on the combination relationship of five dimensions: recording stream status, file status, index status, event segment status, and playback status; when the combination result is not unique, priority is determined according to the cascading order of recording stream, file, index, event segment, and playback. The method also includes specific verifications corresponding to the disturbance conditions: when the disturbance condition is full card coverage, verify the timing of old file deletion, new file generation, and index switching; when the disturbance condition is hot-swapped recovery, verify the TF card re-identification time and the index continuation status after recovery; when the disturbance condition is concurrent streaming, verify the average bitrate change of the recording stream, file size deviation, and playback hit rate; when the disturbance condition is concurrent gimbal action, verify the continuity of the bitstream, the continuity of file growth, and the integrity of event segments.

[0015] Preferably, the recording output information is acquired through at least one of RTSP streaming, device stream export interface, or debug port; The video file growth information is collected in a polling cycle of 500ms to 1s through the file list interface, the debugging interface, or the exported file system list. The index update information is collected through the index file, the database index interface, the index information returned by the playback retrieval interface, or the debugging interface at a monitoring cycle of 500ms to 1s. The playback verification information is obtained by initiating retrieval, location, and playback commands through the device playback interface or platform playback interface.

[0016] Secondly, embodiments of this application provide a TF card recording test system based on closed-loop verification of the recording stream index, including: The service triggering and scenario configuration module is used to configure the test scenario parameters of the security device under test and trigger the recording service of the security device under test; The information acquisition module is used to acquire recording stream output information and recording file growth information during the execution of the recording service, and to acquire index update information corresponding to the recording service. The event fragment monitoring module is used to collect event log information and event fragment information corresponding to the events; The playback verification module is used to call the playback interface of the security device under test to perform retrieval, positioning and playback verification for the target time period and obtain playback verification information. The closed-loop cross-analysis module is used to align the timestamps in the recording output information, the video file growth information, the index update information, the event log information, the event segment information, and the playback verification information to a unified time base, and perform closed-loop cross-validation based on the aligned information to obtain the closed-loop cross-validation result. The attribution output module is used to perform stage-based attribution of video link anomalies based on the closed-loop cross-validation results, and output test conclusions and fault attribution results. The closed-loop cross-validation includes: Perform a recording-file consistency check based on the recording output information and the recording file growth information; Perform file-index closed-loop verification based on the video file growth information and the index update information; Perform event fragment consistency verification based on the event log information and the event fragment information; Perform a replay closed-loop verification based on the index update information, the event fragment information, and the replay verification information.

[0017] Compared with the solutions of the prior art, the present invention has at least the following beneficial technical effects: (1) First, by establishing a closed-loop cross-judgment logic around the recording output, file storage, index update, event fragments and playback results, the video recording reliability test is upgraded from a single point coarse-grained judgment of "whether a video file exists" to a quantitative closed-loop judgment covering the entire stage of the recording link, which improves the objectivity and quantification of local video recording test. (2) By jointly collecting multiple types of evidence such as recording output information, video file growth information, index update information, event fragment information and playback verification information and verifying the corresponding relationship, the misjudgment caused by relying only on files or only on playback results is overcome, and the accuracy of problem identification is improved. (3) By incorporating event video clips, main video, index and playback retrieval results into the same set of verification logic, it is possible to discover problems that are difficult to detect in traditional functional testing, such as missing event clips, event clip time windows not being covered, time misalignment and abnormal index mapping. (4) By designing special verification rules for complex scenarios such as full card coverage, hot-swapping, concurrent streaming and concurrent PTZ action, the reliability of the recording link under complex business conditions can be verified more stably, and the test conclusions can be objective, quantitative and reproducible even under disturbance scenarios. (5) By supplementing the data acquisition caliber of the five types of timestamps, the time alignment error tolerance mechanism, the time jump preprocessing rules, the interaction method between the monitoring module and the device under test, and the monitoring cycle, the present invention has strong engineering feasibility. (6) By outputting structured stage attribution results (recording data output stage anomaly, file writing stage anomaly, index generation stage anomaly, event fragment stage anomaly, index mapping stage anomaly and playback parsing stage anomaly), it can better support R&D personnel to quickly locate local recording defects and reduce the cost of repeated troubleshooting between testing and R&D.

[0018] (7) By organizing the execution sequence of “scenario configuration → business triggering → periodic monitoring → rule judgment → report output” in the form of test tasks, the test results include at least the normal / abnormal status of each dimension, the hit judgment rule, key timestamps, suspected abnormal stages and suggested investigation directions, so that the test process can be automated, can be executed in batches, and the test conclusions can be traced. (8) By providing multiple alternative implementation methods for time reference, theoretical file size estimation and playback verification, the present invention can be adapted to security devices of different forms and interface capabilities, with a wide range of applications and is easy to promote and apply.

[0019] In summary, this invention uses a unified time benchmark as a link to incorporate five types of evidence—recording output, file storage, index updates, event segments, and playback results—into a single closed-loop cross-verification system. Combined with a time error tolerance mechanism, time jump preprocessing rules, disturbance scenario-specific verification rules, and five-dimensional state combination attribution rules, it forms a quantitative, reproducible, and attributable TF card recording reliability testing method and system covering the entire recording link. This significantly improves the ability to detect and locate local recording defects in security equipment, demonstrating good engineering feasibility and application value. Attached Figure Description

[0020] Exemplary embodiments of the present invention can be more fully understood by referring to the accompanying drawings. The drawings are provided to further illustrate the embodiments of this application and form part of the specification. They are used together with the embodiments of this application to explain the present invention and do not constitute a limitation thereof. In the drawings, the same reference numerals generally represent the same components or steps.

[0021] Figure 1 A flowchart of a TF card recording test method based on closed-loop verification of recording index provided for an exemplary embodiment of this application; Figure 2 A schematic diagram of a closed-loop cross-validation relationship provided for an exemplary embodiment of this application; Figure 3 A schematic diagram of the structure of a TF card recording test system based on closed-loop verification of recording stream index provided as an exemplary embodiment of this application; Figure 4 A schematic diagram of an electronic device provided for an exemplary embodiment of this application; Figure 5 This is a schematic diagram of a computer-readable medium provided for an exemplary embodiment of this application. Detailed Implementation

[0022] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.

[0023] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0024] For ease of explanation, in this application, "recording stream consistency" refers to the correspondence between the recording stream output status and the recording file generation and growth status after the recording service is triggered; "index closed-loop verification" refers to the correspondence between the recording file growth information and the index update time or index time mapping information; "event segment consistency" refers to the ability of the corresponding segment to be generated and cover the target event time period after the event is triggered; "playback closed-loop verification" refers to the ability of the target time period to be correctly retrieved, located, and played, and the playback time to be consistent with the index time and event time; and "stage attribution" refers to the determination of the stage to which the anomaly belongs based on the combination of multiple types of evidence.

[0025] Furthermore, the technical features involved in the different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0026] Please refer to Figure 1 , Figure 1This is a flowchart illustrating a TF card recording test method based on closed-loop verification of the recording stream index, as described in some embodiments of this application. This embodiment uses a security device under test with a normally functioning TF card inserted and configured for continuous recording mode as an example to elaborate on each step of the above method. The method in this embodiment is executed by a test terminal, which can be a test computer, test server, or an automated test station integrated into the production line, independent of the security device under test. This embodiment does not simply perform single tests on TF card recognition, recording file generation, or single playback, but rather constructs a complete test scheme around "business triggering, recording stream output, file storage, index update, event segment generation, playback verification, and stage attribution." It uses a unified time benchmark to correlate and align multiple types of evidence generated during the test, such as recording stream output information, recording file growth information, index update information, event segment information, and playback verification information, performing multi-dimensional cross-verification of the recording link, rather than relying on a single result to make a conclusion. This solution can establish a correspondence between multiple source results during the recording process and distinguish different defect types such as abnormal recording data output, abnormal file writing, abnormal index generation, abnormal event fragments, abnormal index mapping, and abnormal playback parsing.

[0027] Specifically, the method provided in this application includes the following steps: S110, Configure the test scenario parameters of the security device under test, and trigger the recording service of the security device under test; Specifically, the test terminal first configures the test scenario parameters for the security device under test. These parameters include the TF card status, recording mode, disturbance conditions, and target verification period. The TF card status includes normal card, full card, fragmented card, and hot-swappable recovery status; the recording mode includes continuous recording, event recording, manual recording, and alarm recording; and the disturbance conditions include one or more of concurrent streaming, concurrent PTZ action, and network fluctuations. In this embodiment, the TF card status is configured as normal card, and the recording mode is configured as continuous recording. The configuration can be performed through any one or more of the following methods: issuing configuration commands via the device's web interface; calling configuration functions via the open SDK interface; executing configuration commands via the ONVIF interface; sending configuration messages via a private control protocol; or executing configuration via a local debugging interface (such as serial port or telnet). After configuration, the test terminal triggers the security device under test to perform continuous recording. It should be noted that the above five configuration methods constitute multiple implementation methods supporting the overarching general feature of "configuring the test scenario parameters for the security device under test" in the abstract.

[0028] S120, during the execution of the recording service, collect the recording stream output information and the recording file growth information, and collect the index update information corresponding to the recording service; Specifically, during the recording service execution, the test terminal simultaneously performs recording stream monitoring, file monitoring, and index monitoring. Recording stream monitoring collects recording stream output information through at least one of the following methods: RTSP streaming, device stream export interface, or debug interface. This includes the continuous output status of the stream, timestamp continuity information, and stream interruption information. File monitoring polls the recording file size, file generation time, and file rotation status at a monitoring cycle of 500ms to 1s (1s in this embodiment) through the file list interface, debug interface, or exported file system list to obtain file generation status, file size change information, file start and end time information, and file rotation information. Index monitoring collects index entry changes at a monitoring cycle of 500ms to 1s through index files, database index interface, index information returned by the playback retrieval interface, or debug interface. This obtains index entry change information, index update time information, index time mapping information, and the correlation information between the index and the recording time period.

[0029] By aligning index update information with video file growth information, it is determined whether file write-to-disk and index refresh are synchronized. Regarding the timestamp retrieval method: the recording stream timestamp is preferably taken from the frame-level PTS in the device bitstream; when the device does not output a standard PTS, it can degenerate into the recording stream sampling time under the device system time. The file growth timestamp is preferably taken from the device-side disk write-to-disk time; when the device cannot directly provide the disk write-to-disk time, it can be determined jointly by the file modification time recorded by the TF card file system and the sampling time at the test end. The index update timestamp is preferably taken from the time embedded in the index entry; when there is no time field in the index entry, the index file modification time, database update time, or index interface return time can be used.

[0030] S130, collect event log information and event fragment information corresponding to the event; Specifically, during recording, the test terminal can trigger motion detection, alarm input, or other events, and collect event log information and corresponding event segment information. Motion detection can be triggered after pre-configuring detection sensitivity and detection area through the device's web interface or open SDK interface; alarm input can be triggered by external alarm sources such as switch inputs, door sensors, or infrared sensors; event log information is obtained through the event log interface, alarm log interface, or platform event message interface, and includes at least the event type, event trigger time, and trigger channel. Event segment information includes the event segment generation status, segment start time, segment end time, the correspondence between the segment and the main recording, and event marker information; the correspondence between the segment and the main recording can be obtained through the event segment index, event marker information (e.g., timeline highlighting), or an event segment file list. The event timestamp is preferably taken from the device event log trigger time or alarm message time. This embodiment is for a continuous recording scenario, and this step is optional.

[0031] S140, Call the playback interface of the security device under test to perform retrieval, positioning and playback verification for the target time period, and obtain playback verification information; The test client calls the playback interface on the device under test or the platform to perform retrieval, location, and playback verification for the target time period, obtaining playback verification information. Retrieval can be initiated by one or more of the following methods: by time period, by event, or by video file. Location includes positioning the playback time point to the start time of the target time period, and performing random location positioning by dragging the progress bar. Playback verification includes verifying continuous playback, playback smoothness, and audio-visual synchronization status of the target time period. Playback verification information includes whether the retrieval was successful, whether playback was continuous, whether dragging the location was successful, and whether the playback time matches the event time or index time. When the playback interface is a device playback interface, the test client directly sends a playback command to the device under test; when the playback interface is a platform playback interface, the test client sends a playback command to the device under test through the management platform. The stuttering duration can be obtained by statistically analyzing the difference between the interval of two adjacent playback timestamps and the preset playback frame interval. The playback timestamp is preferably taken from the playback time returned by the playback interface, the retrieval hit time interval, or the player's current timeline.

[0032] S150 aligns the timestamps in the recording output information, recording file growth information, index update information, event log information, event segment information, and playback verification information to a unified time base, performs closed-loop cross-validation based on the aligned information, and obtains the closed-loop cross-validation result. Specifically, refer to Figure 2 , Figure 2 This is a schematic diagram illustrating the closed-loop cross-validation relationship in some embodiments of this application, showing the interaction relationships between five types of evidence. Specifically, the closed-loop cross-validation includes: (1) Time base normalization. All timestamps are normalized to a unified time base before entering the closed-loop analysis. The unified time base is preferably the device system time; in scenarios where a unified time base can be set at the test end, a unified time base at the test end can also be used, and normalization can be completed through the mapping relationship between the device system time and the test end time.

[0033] (2) Time alignment error tolerance and jump preprocessing. To avoid misjudgment caused by different sampling frequencies and recording methods of different information sources, this invention sets up a time error tolerance mechanism. In a preferred embodiment, the allowable deviation threshold between the recording timestamp and the file timestamp is ±500ms to ±1000ms; the allowable deviation threshold between the file timestamp and the index timestamp is within 2s; the allowable deviation between the event time and the event segment start time is preferably no greater than 1s; the allowable deviation between the playback time and the index time or event time is preferably no greater than 1s. When a time jump caused by device time synchronization, hot-plug recovery, restart recovery, or time zone switching is detected, time preprocessing is performed first, and then closed-loop analysis is entered. The preprocessing rules include: if a continuous timestamp mutation exceeds a preset jump threshold, the time point is divided into a new time period; the data before and after the jump are aligned using the monotonic time series within the segment; for scenarios where the time is reset after hot-plug recovery, it is preferable to combine the file generation order, index sequence number, and event log to re-anchor the unified time starting point after recovery; data segments that cannot be restored to a unified time base are marked as gray area data segments and output separately in the final report.

[0034] (3) Recording Stream-File Consistency Verification. Recording stream-file consistency verification is used to determine whether the recorded data has been correctly written to disk when the service has been triggered and the recording stream is continuously outputting. At least one of the following methods can be used for this determination: a. Determination of theoretical document size deviation Specifically, the theoretical file size is calculated according to formula (1): (1); in, For the theoretical file size, The average bitrate of the recorded stream, This refers to the duration of the recording. The deviation rate between the actual file size and the theoretical file size is also relevant. Calculate according to formula (2): (2); in, This is the actual file size. If the deviation rate... If the deviation is less than 5%, it is considered consistent; if the deviation exceeds 5% and persists, it is considered a suspected file writing anomaly.

[0035] b. Determination of time interval overlap Specifically, the overlap between the recording time interval and the file coverage time interval is calculated according to formula (3): (3); in, For the degree of overlap, This refers to the overlap between the recording time interval and the file time interval. The duration of the continuous recording time interval. When the overlap... A score greater than or equal to 98% is considered consistent.

[0036] c. File growth stagnation determination: If the recording stream is continuously output and the file size does not change within two consecutive monitoring periods, or the period of no change exceeds 2 seconds, it is determined to be an abnormal file growth stagnation.

[0037] d. Bitstream interruption determination: If the bitstream PTS is interrupted or the timestamp breakpoint exceeds the preset threshold, it will be determined as an abnormal recording data output rather than a file writing abnormality.

[0038] (4) File-index closed-loop verification. File-index closed-loop verification is used to determine whether the index is updated synchronously according to preset rules after the video file is generated. In a preferred embodiment, it includes: a. Index update delay threshold: After a file is written to disk, the index entries should be updated synchronously within 2 seconds; if no new index entries are added after 2 seconds, it is considered an abnormal index update delay.

[0039] b. Time mapping deviation threshold: The mapping deviation between index time and file time should preferably not exceed 1 second; if it exceeds this deviation threshold, it is judged as an index mapping abnormality.

[0040] c. Index continuity rule: If the index sequence number is missing more than one record, or the time interval between adjacent indexes exceeds the preset limit, it is determined to be an index generation anomaly.

[0041] d. Index reconstruction rules after recovery: After hot-swap recovery, restart recovery, or full card overwrite switch, if new files have been generated but the index cannot be continued in sequence, it will be judged as an abnormal index reconstruction after recovery.

[0042] (5) Event Segment Consistency Verification. Event segment coverage requirements: In the preferred embodiment, the entire event segment should be included from 3 seconds before the event is triggered to 10 seconds after the event is triggered. This time window can be adjusted according to the device type and service requirements. Segment and main recording dependency rules: The time interval of the event segment must fall completely within the time interval of the main recording, and the start and end times of the segment should be verifiable by both the main recording and the index information.

[0043] (6) Playback Closed-Loop Verification. Search Hit Rule: When the video clip returned by the playback interface covers the target time window, and the deviation between the returned clip and the index time and event time does not exceed 1 second, it is determined as a search hit. Playback Continuity Rule: If the playback pause duration exceeds 1 second, or if drag positioning fails, timeline rollback occurs, or timeline jumps exceed the threshold, it is determined as a playback anomaly. Time Consistency Rule: If the deviation between the playback time and the index time and event time exceeds 1 second, it is determined as an index mapping anomaly or a playback parsing anomaly.

[0044] Through the above four types of closed-loop verification, at least one type of anomaly can be identified. The anomaly types include: the recording stream exists but the file is not written to disk, the file grows but the index is not updated, the event is triggered but the segment is missing, the file and index exist but the playback fails, and the playback time is misaligned.

[0045] S160, based on the closed-loop cross-validation results, performs stage-by-stage cause attribution for video link anomalies, and outputs test conclusions and fault attribution results; Specifically, the five dimensions of recording stream status, file status, index status, event segment status, and playback status are used as inputs to combine and attribute the abnormal stages. Example rules are shown in Table 1.

[0046] Table 1. Five-Dimensional State Combination Attribution Rules

[0047] The typical scenario in this embodiment is as follows: If continuous recording output and continuous growth of the video file are detected, but no new index entries are added within 2 seconds after the file is written to disk, or if there is a gap of more than one index number, it is identified as a file-index closed loop anomaly and output as an index generation stage anomaly. The test results include at least the normal / abnormal status of each dimension, the hit judgment rules, key timestamps, suspected abnormal stages, and suggested investigation directions.

[0048] This embodiment also provides the following alternative implementation methods, which also fall within the protection scope of this invention: (1) Alternative implementation of unified time base: In scenarios where the test end can uniformly set the time base, the unified time base adopts the unified time base of the test end, and completes the normalization of various timestamps through the mapping relationship between the device system time and the test end time, so as to replace the scheme of using the device system time as the unified time base.

[0049] (2) Alternative implementation method for estimating theoretical file size: Replace the average bitrate method with frame counting, that is, estimate the theoretical file size based on the product of the collected streaming frame rate, frame number and average frame size, and calculate according to formula (4): (4); in, For the recording frame rate, For the number of recorded frames, This is the average frame size. When the bitrate is variable and the average bitrate cannot be stably obtained, this method is preferred, and the judgment is also performed with a deviation rate not exceeding 5%.

[0050] (3) Alternative implementation of playback verification method: For the device under test that does not have a standard playback interface or whose playback interface has limited capabilities, frame extraction decoding verification is used instead of complete playback verification. That is, key frames are extracted from the video file within the target time period at preset intervals and decoded. If the decoding is successful and the timestamps of the extracted frames are continuous, it is determined that the playback is usable. The other closed-loop verification rules remain unchanged.

[0051] In summary, this embodiment uses a unified time benchmark as a link to incorporate five types of evidence—stream output, file storage, index update, event segments, and playback results—into a single closed-loop cross-validation system for continuous recording scenarios. Combined with a time error tolerance mechanism, time jump preprocessing rules, and five-dimensional state combination attribution rules, it achieves closed-loop verification of the entire recording link in continuous recording scenarios. This system can reliably distinguish anomalies at each stage of the recording link, avoid misjudgments from single-evidence testing, and improve the objectivity, quantification, and fault location efficiency of the test.

[0052] To further illustrate the proposed solution, the following will explain the specific application of the proposed method in conjunction with event recording scenarios and disturbance scenarios such as full card coverage, hot-swap recovery, concurrent streaming, and concurrent gimbal actions.

[0053] This application discloses specific implementation scenarios of the methods described in the above embodiments in some embodiments, so as to more specifically illustrate the specific workflow and beneficial effects of the methods and systems constituted by the methods in the present invention when facing multi-scenario deployment, especially the typical application of local recording reliability testing of TF cards in security equipment.

[0054] Some embodiments of this application take the scenario where the security device under test is simultaneously recording video and motion detection as an example. After an event is triggered, the test terminal collects event logs and event segment information, and performs retrieval and playback verification within a time window from 3 seconds before the event to 10 seconds after the event.

[0055] If the detection results show that the event log exists, but the corresponding event segment has not been generated, or the start and end times of the segment do not cover the event time window, then it is determined that the event segment consistency is abnormal. If the event segment has been generated but cannot be retrieved during playback, or the playback time deviates from the event time by more than 1 second, then it is further output as an event segment stage abnormality or an index mapping stage abnormality. If the video segment returned by the playback interface covers the target time window, and the deviation between the returned segment and the index time and event time does not exceed 1 second, then it is determined that the retrieval is successful, and the playback closed-loop verification passes.

[0056] In summary, this embodiment incorporates event recording segments, main recordings, indexes, and playback retrieval results into the same set of verification logic. This enables the detection of issues that are difficult to find in traditional functional testing, such as missing event segments, uncovered event segment time windows, time misalignments, and abnormal index mappings, thereby improving the accuracy of problem identification in event recording scenarios.

[0057] Some embodiments of this application use examples of disturbance scenarios such as full card coverage, hot-swap recovery, concurrent streaming and PTZ concurrent actions, and fragmented cards to illustrate how to perform special verification on the recording link under disturbance conditions. In disturbance scenarios, in addition to performing the conventional closed-loop verification in the aforementioned embodiments, the test terminal also performs the following special verifications according to the disturbance conditions.

[0058] (1) Full Card Coverage Scenario Verification: The TF card is gradually brought to its storage limit through continuous recording, and the device under test enters the full card coverage scenario. The test terminal collects the rotation status of old and new video files, the index change information before and after coverage, and performs playback retrieval on the latest recording period and the critical coverage period to verify the old file deletion sequence, the new file generation sequence, the index switching sequence, and the retrieval of the latest video. If the oldest video is not deleted according to the policy after coverage, the latest video is not generated normally, the index is not switched to the new file within 2 seconds after the latest video is generated, or the corresponding period of the latest video cannot be retrieved or the playback is not continuous, it is identified as an abnormal recording link under full card coverage, and the specific stage conclusion is output in combination with file changes, index changes and playback results; if the old file is not deleted according to the policy or the new file has been generated but the index has not been switched, it is determined to be an abnormality in the full card coverage stage.

[0059] (2) Hot-swap recovery scenario verification: During the recording process, the security device under test will hot-swap the TF card and complete the re-identification. The test end will configure the hot-swap recovery as a disturbance condition, and then trigger continuous recording or event recording again, and verify the time taken for TF card re-identification, the time taken to generate the first file after recovery, the time taken to generate the first index entry after recovery, and the timestamp re-anchoring result after recovery. If the hot-swap causes the device system time to reset, the new and old time periods will be re-anchored according to the file generation order, index sequence number and the event log after recovery, and then the closed-loop analysis will continue. If the device can start recording again after re-identification, but the recovered recording file exists, the index is partially missing or the playback only partially hits, it is determined that the closed-loop reconstruction after recovery is incomplete, and the output is a partial recovery status. At the same time, more detailed conclusions on the abnormality of the index generation stage, the abnormality of the event segment stage or the abnormality of the playback parsing stage are given. If the recording stream recovers normally after recovery but the index cannot be continued, it is first determined that the index reconstruction after recovery is abnormal.

[0060] (3) Special verification of concurrent streaming and PTZ concurrent action scenarios: During local recording, the security device under test simultaneously performs main stream streaming and continuous PTZ rotation. The test end collects multiple types of status information to verify whether the recording link maintains closed-loop consistency under high load scenarios. In the concurrent streaming scenario, the average bitrate change, file size deviation and playback hit rate under concurrent streaming are additionally verified to identify recording anomalies caused by resource contention. In the PTZ concurrent action scenario, the continuity of the stream, the continuity of file growth and the integrity of event segments during continuous PTZ action are additionally verified to identify recording link anomalies caused by PTZ control thread or high load. If the timestamp is discontinuous on the streaming side and the recording file growth stops abnormally for more than 2 seconds, the output is given priority to record data output stage anomaly. If the streaming is continuous, the file size deviates from the theoretical file size by more than 5%, and playback fails, the output is given priority to file writing stage anomaly or playback parsing stage anomaly. If only event segments are missing during PTZ action, the output is given priority to event segment stage anomaly.

[0061] (4) Special verification for fragmented card scenarios: When the TF card is in the state of a fragmented card, pay extra attention to file growth jitter and index update delay. Short-term write fluctuations are allowed under fragmented conditions, but if the reading exceeds the preset threshold for three or more consecutive monitoring cycles, it will still be judged as abnormal.

[0062] In summary, this embodiment executes specific verification rules under complex scenarios such as full card coverage, hot-swap recovery, concurrent streaming, concurrent PTZ actions, and fragmented cards. This ensures that the test conclusions are objective, quantitative, and reproducible even under disturbed scenarios. It can more stably verify the reliability of the recording link under complex business conditions and output phased attribution conclusions suitable for R&D positioning.

[0063] Please refer to Figure 3 , Figure 3 This is a structural block diagram of a TF card recording test system based on closed-loop verification of the recording stream index, as described in some embodiments of this application. Based on the same inventive concept as the above method embodiments, this invention also provides a TF card recording test system based on closed-loop verification of the recording stream index, comprising: a service triggering and scene configuration module, an information acquisition module, an event segment monitoring module, a playback verification module, a closed-loop cross-analysis module, and an attribution output module. Each module in the system corresponds one-to-one with each step in the above method embodiments. The service triggering and scenario configuration module is used to configure the test scenario parameters of the security device under test and trigger the recording service of the security device under test; The information acquisition module is used to acquire recording stream output information and recording file growth information during the execution of the recording service, and to acquire index update information corresponding to the recording service. The event fragment monitoring module is used to collect event log information and event fragment information corresponding to the events; The playback verification module is used to call the playback interface of the security device under test to perform retrieval, positioning and playback verification for the target time period and obtain playback verification information. The closed-loop cross-analysis module is used to align the timestamps in various types of information to a unified time base, and perform stream-file consistency verification, file-index closed-loop verification, event fragment consistency verification, and playback closed-loop verification based on the aligned information to obtain the closed-loop cross-verification results. The attribution output module is used to perform stage-based attribution of video link anomalies based on the closed-loop cross-validation results, and output test conclusions and fault attribution results.

[0064] The testing system of this application is preferably run in the form of test tasks, and is executed in a time sequence of "scenario configuration → business triggering → periodic monitoring → rule judgment → report output"; the test results shall include at least the normal / abnormal status of each dimension, the judgment rule of the hit, key timestamps, suspected abnormal stages and suggested investigation directions.

[0065] To ensure that those skilled in the art can implement this invention, the present invention further defines the interaction methods between each module and the device under test: The service triggering and scene configuration module configures the recording mode, alarm input, PTZ action, and TF card status through the device web interface, open SDK interface, ONVIF interface, private control protocol, or local debugging interface; The information acquisition module collects the recording stream status and frame-level timestamps through RTSP streaming, device stream export interface, or debugging port, and polls the file size, file generation time, and file rotation status at a monitoring cycle of 500ms to 1s through the file list interface, debugging interface, or exported file system list, and collects index entry changes at a monitoring cycle of 500ms to 1s through the index file, database index interface, playback retrieval interface returned index information, or debugging interface; The event segment monitoring module obtains the event time through the event log interface, alarm log interface, or platform event message interface, and confirms the event segment status in combination with file and index information; The playback verification module initiates retrieval, location, and playback commands through the device playback interface or platform playback interface, and records the retrieval hit, playback time, stutter duration, and current playback time. The aforementioned interface methods provide support for various implementation methods of the corresponding higher-level generalized features in the abstract.

[0066] It should be noted that the division of labor and naming of the modules and their sub-modules described in this embodiment are merely illustrative examples. Those skilled in the art can merge multiple modules into one module or split one module into multiple sub-modules with finer functions according to the actual system architecture. These adjustments do not affect the substance of the technical solution of this invention and should be considered as falling within the protection scope of this invention.

[0067] Please refer to Figure 4 This illustrates a schematic diagram of an electronic device provided by some embodiments of this application. For example... Figure 4 As shown, the electronic device 30 includes a processor 300, a memory 301, a bus 302, and a communication interface 303. The processor 300, communication interface 303, and memory 301 are connected via the bus 302. The memory 301 stores a computer program that can run on the processor 300. When the processor 300 runs the computer program, it executes the method described above in this application. This electronic device can be any device with security equipment testing capabilities, such as a test computer, test server, industrial control computer, or an automated test station host integrated into a production line. Since the device internally implements the TF card recording test method by running the aforementioned computer program, and the method adopts a recording link verification mechanism with a unified time reference and four types of closed-loop cross-verification as its core, this electronic device can maintain a unified test process when facing security devices of different forms, recording modes, and under different disturbance conditions. It does not require reconfiguring multiple sets of test parameters for each abnormal mode, and can stably and efficiently complete the reliability test and stage attribution of TF card recording for security devices.

[0068] The memory 301 may include high-speed random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 303 (which can be wired or wireless), such as the Internet, wide area network, local area network, or metropolitan area network.

[0069] Bus 302 can be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. The memory 301 is used to store programs. After receiving an execution instruction, the processor 300 executes the program. The methods disclosed in any of the foregoing embodiments of this application can be applied to the processor 300, or implemented by the processor 300.

[0070] The processor 300 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of the processor 300 or by instructions in software form. The processor 300 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), an off-the-shelf programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules may reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory 301. The processor 300 reads the information in memory 301 and, in conjunction with its hardware, completes the steps of the above method.

[0071] It should be noted that the electronic device provided in this embodiment is based on the same inventive concept as the method embodiment described above, and its specific implementation process and technical effects can be referred to the corresponding descriptions in the foregoing method embodiments. This electronic device can be deployed in security product testing laboratories, production testing stations, or automated production line testing sites, and establishes a connection with the security device under test via a network or debugging interface to achieve fully automated testing of the reliability of TF card recording.

[0072] This application also provides a computer-readable medium corresponding to the method provided in the foregoing embodiments. Please refer to... Figure 5 The computer-readable storage medium shown is an optical disc 40, on which a computer program (i.e., a program product) is stored, which, when run by a processor, performs the aforementioned method.

[0073] The computer-readable storage medium may include, but is not limited to, various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks. In a specific application scenario, the computer-readable storage medium can be built into an industrial testing control computer as part of the firmware; or it can be installed on the target device as a standalone software product through downloading or physical distribution, enabling existing testing devices with only basic network communication capabilities to acquire the TF card recording test function based on stream index closed-loop verification as described in this invention after loading and executing the computer program on the storage medium.

[0074] The computer-readable storage medium provided in the above embodiments of this application and the method provided in the embodiments of this application are based on the same inventive concept and have the same beneficial effects as the methods adopted, run or implemented by the applications stored therein.

[0075] This embodiment provides a computer program product, which includes a computer program. When executed by a processor, the computer program implements the TF card recording test method as described in any of the above embodiments.

[0076] This computer program product can be deployed on a test server to provide TF card recording reliability testing capabilities to multiple test terminals in the form of a service; it can also be packaged as a software development kit (SDK) for integration and calling by third-party test systems, so that applications integrating the SDK can obtain the TF card recording test function based on recording stream index closed-loop verification of this invention without increasing additional hardware costs or modifying the existing test link.

[0077] It should be noted that 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. In this regard, 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 the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive 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 the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0078] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0079] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and there may be other division methods in actual implementation. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the coupling or direct coupling or communication connection shown or discussed may be through some communication interface; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0080] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0081] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0082] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application, and they should all be covered within the scope of the claims and specification of this application.

Claims

1. A TF card recording test method based on closed-loop verification of recording stream index, characterized in that, Includes the following steps: Configure the test scenario parameters for the security device under test, and trigger the recording service of the security device under test; During the execution of the recording service, recording stream output information and recording file growth information are collected, as well as index update information corresponding to the recording service; Collect event log information and event fragment information corresponding to the events; Call the playback interface of the security device under test to perform retrieval, location and playback verification for the target time period, and obtain playback verification information; Align the timestamps in the recording output information, the video file growth information, the index update information, the event log information, the event segment information, and the playback verification information to a unified time base, and perform closed-loop cross-validation based on the aligned information to obtain the closed-loop cross-validation result; Based on the closed-loop cross-validation results, stage-by-stage attribution is performed on the video link anomalies, and test conclusions and fault attribution results are output. The closed-loop cross-validation includes: Perform a recording-file consistency check based on the recording output information and the recording file growth information; Perform file-index closed-loop verification based on the video file growth information and the index update information; Perform event fragment consistency verification based on the event log information and the event fragment information; Perform a replay closed-loop verification based on the index update information, the event fragment information, and the replay verification information.

2. The method according to claim 1, characterized in that, The test scenario parameters include TF card status, recording mode, disturbance conditions, and target verification time period; The TF card status includes at least one of the following: normal card, full card, fragmented card, and hot-swappable recovery status; The recording mode includes at least one of continuous recording, event recording, manual recording, and alarm recording; The disturbance conditions include at least one of concurrent streaming, concurrent gimbal actions, and network fluctuations; The configuration of the test scenario parameters is performed through at least one of the following: device web interface, open SDK interface, ONVIF interface, private control protocol, or local debugging interface.

3. The method according to claim 1, characterized in that, The recorded stream output information includes the continuous output status of the bitstream, timestamp continuity information, and bitstream interruption information; The video file growth information includes file generation status, file size change information, file start and end time information, and file rotation information; The index update information includes index entry change information, index update time information, and index time mapping information; The event segment information includes the event segment generation status, segment start time, segment end time, and the correspondence between the segment and the main recording. The playback verification information includes the retrieval hit status, playback continuity status, and playback timestamp.

4. The method according to claim 1, characterized in that, The timestamps in the recording output information, the video file growth information, the index update information, the event log information, the event segment information, and the playback verification information include the recording timestamp, file timestamp, index timestamp, event timestamp, and playback timestamp; The unified time reference is the system time of the security equipment under test, or the unified time reference of the test end; The step of aligning the timestamps in the recording output information, the video file growth information, the index update information, the event log information, the event segment information, and the playback verification information to a unified time base includes: when a time jump is detected, dividing the time before and after the jump into different time periods, aligning the data before and after the jump with a monotonic time series within each segment; and marking data segments that cannot be restored to a unified time base as gray area data segments and outputting them separately.

5. The method according to claim 1, characterized in that, The recording-file consistency verification includes determining the theoretical file size deviation, the overlap of time intervals, the stagnation of file growth, and the interruption of the bitstream.

6. The method according to claim 1, characterized in that, The file-index closed-loop verification includes index update delay determination, time mapping deviation determination, index continuity determination, and index reconstruction determination after recovery.

7. The method according to claim 1, characterized in that, The event segment consistency verification includes event segment time window coverage determination and segment-to-main recording dependency determination; the playback closed-loop verification includes retrieval hit determination, playback continuity determination and time consistency determination.

8. The method according to claim 1, characterized in that, The stage-based attribution of video link anomalies includes: determining the anomaly stage based on the combination relationship of five dimensions: recording stream status, file status, index status, event segment status, and playback status; when the combination result is not unique, priority is determined according to the cascading order of recording stream, file, index, event segment, and playback. The method also includes specific verifications corresponding to the disturbance conditions: when the disturbance condition is full card coverage, verify the timing of old file deletion, new file generation, and index switching; when the disturbance condition is hot-swappable recovery, verify the TF card re-identification time and the index continuation status after recovery; when the disturbance condition is concurrent streaming, verify the average bitrate change of the recording stream, file size deviation, and playback hit rate; when the disturbance condition is concurrent gimbal action, verify the continuity of the bitstream, the continuity of file growth, and the integrity of event segments.

9. The method according to claim 1, characterized in that, The recorded output information is collected through at least one of the following methods: RTSP streaming, device stream export interface, or debug port. The video file growth information is collected in a polling cycle of 500ms to 1s through the file list interface, the debugging interface, or the exported file system list. The index update information is collected through the index file, the database index interface, the index information returned by the playback retrieval interface, or the debugging interface at a monitoring cycle of 500ms to 1s. The playback verification information is obtained by initiating retrieval, location, and playback commands through the device playback interface or platform playback interface.

10. A TF card recording test system based on closed-loop verification of recording stream index, characterized in that, include: The service triggering and scenario configuration module is used to configure the test scenario parameters of the security device under test and trigger the recording service of the security device under test; The information acquisition module is used to acquire recording stream output information and recording file growth information during the execution of the recording service, and to acquire index update information corresponding to the recording service. The event fragment monitoring module is used to collect event log information and event fragment information corresponding to the events; The playback verification module is used to call the playback interface of the security device under test to perform retrieval, positioning and playback verification for the target time period and obtain playback verification information. The closed-loop cross-analysis module is used to align the timestamps in the recording output information, the video file growth information, the index update information, the event log information, the event segment information, and the playback verification information to a unified time base, and perform closed-loop cross-validation based on the aligned information to obtain the closed-loop cross-validation result. The attribution output module is used to perform stage-based attribution of video link anomalies based on the closed-loop cross-validation results, and output test conclusions and fault attribution results. The closed-loop cross-validation includes: Perform a recording-file consistency check based on the recording output information and the recording file growth information; Perform file-index closed-loop verification based on the video file growth information and the index update information; Perform event fragment consistency verification based on the event log information and the event fragment information; Perform a replay closed-loop verification based on the index update information, the event fragment information, and the replay verification information.