Video behavior analysis and memory writing method, device and computer equipment

CN122990588APending Publication Date: 2026-10-27SHENZHEN XIAOPAI TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611491438.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-23
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

[0003]本发明实施例提供一种视频行为解析与记忆写入方法、装置、计算机设备及存储介质,以解决现有视频行为识别采用全量重算,算力开销大,缺少分层记忆管控机制,识别结果稳定性差且难以追溯的技术问题

Benefits of technology

[0017]上述视频行为解析与记忆写入方法、装置、计算机设备及存储介质,通过多路数据流预处理得到标准化帧序列,借助滑动时间窗增量解析计算窗级特征,复用历史特征减少重复计算,降低实时处理算力开销。针对各主体求解置信度与一致性分数,依托短期工作记忆库构建结构化候选事件;基于置信度、一致性分数实施门控判决,区分候选事件是存入短期记忆或晋升至长期记忆。因此,本方案实现了事件假设动态观测与可信事件持久固化分离,为事件后续事务化校验、版本追溯与分层存储提供基础,提升视频行为解析的稳定性与可追溯性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122990588A_ABST
    Figure CN122990588A_ABST
Patent Text Reader

Abstract

The application discloses a video behavior analysis and memory writing method and device and computer equipment, comprising: obtaining a standardized frame sequence through multi-path data stream preprocessing, incrementally analyzing and calculating window-level features with the aid of a sliding time window, multiplexing historical features to reduce repeated calculation, and reducing real-time processing computing power overhead. Confidence and consistency scores are solved for each subject, and a structured candidate event is constructed relying on a short-term working memory bank; gate decision is implemented based on the confidence and consistency scores to distinguish whether the candidate event is stored in the short-term memory or promoted to the long-term memory. Therefore, the scheme provides a basis for subsequent transactional verification, version tracing and hierarchical storage of events, and improves the stability and traceability of video behavior analysis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of computer vision, streaming data processing and artificial intelligence, and in particular to a method, apparatus and computer device for video behavior analysis and memory writing. Background Technology

[0002] When processing multi-channel video data streams, a fixed-window, full-frame recalculation processing mode is commonly used. This mode cannot achieve incremental feature reuse, resulting in a large amount of redundant calculation, high overall computational overhead, and low real-time processing efficiency. Furthermore, existing technologies lack a hierarchical memory management mechanism, failing to distinguish between dynamically observed temporary event hypotheses and verified reliable events, thus hindering hierarchical storage and iterative updates of behavioral events. They cannot dynamically retain and optimize candidate events observed in real time, nor can they effectively solidify and store highly reliable and stable events. The lack of refined event filtering and memory management logic makes it difficult for video behavior analysis to meet the real-time performance, stability, and data management standards required for practical applications. Summary of the Invention

[0003] This invention provides a video behavior analysis and memory writing method, apparatus, computer device, and storage medium to solve the technical problems of existing video behavior recognition, which uses full recalculation, has high computing power consumption, lacks a hierarchical memory management mechanism, and has poor stability and difficulty in traceability of recognition results.

[0004] A video behavior parsing and memory writing method includes: The multiple data streams are parsed to obtain a standardized frame sequence, and the standardized frame sequence is subjected to incremental parsing with a sliding time window to determine the window-level features. Determine the target confidence and consistency score for each subject in the standardized frame sequence; Based on the target confidence level and short-term working memory, construct structured candidate events with window-level feature associations; Gating decisions are made based on target confidence and consistency scores to write candidate events into short-term or long-term working memory.

[0005] In one embodiment, incremental parsing of a standardized frame sequence using a sliding time window to determine window-level features includes: determining window parameters for the sliding time window; the window parameters include window length and step size; incrementally parsing the standardized frame sequence according to the window parameters, reusing cached historical features in the overlapping portion of the current window and the previous window, and fusing the window-level features of the previous window with the historical features to obtain the window-level features of the current window; determining a semantic change score based on the dynamic allocation of window-level features with changes in behavioral semantics; and adjusting the step size according to the threshold range corresponding to the semantic change score to obtain new window-level features based on the new step size.

[0006] In one embodiment, determining the target confidence and consistency score for each subject in the standardized frame sequence includes: performing multi-target recognition on the standardized frame sequence to obtain recognition results; the recognition results include appearance features, motion features, keyframes, trajectory segments, and identity association results; obtaining the target confidence of the current window through appearance features, motion features, and the historical confidence of the previous window; constructing a cross-window evidence graph based on the recognition results; the cross-window evidence graph uses the recognition results output by different windows as nodes, and constructs edges between nodes to establish temporal, spatial, subject, and semantic class relationships; and determining the consistency score of the behavioral hypothesis based on the cross-window evidence graph.

[0007] In one embodiment, the target confidence of the current window is obtained by using appearance features, motion features, and the historical confidence of the previous window, including: fusing appearance features and motion features to obtain fused features; performing probability distribution and correction processing on the fused features to obtain an initial confidence; and when there is a behavioral hypothesis of subject association in the short-term working memory, performing time smoothing on the historical confidence of the previous window and the initial confidence of the current window to obtain the target confidence of the current window.

[0008] In one embodiment, the edges in the cross-window evidence graph include at least temporally continuous edges, edges with the same subject, spatially adjacent edges, supporting edges, and conflicting edges. Each edge records at least the edge type, relation strength, generation window ID, and evidence validity period. The consistency score of the behavioral hypothesis is determined based on the cross-window evidence graph, including: determining the aggregation strength of supporting edges, the aggregation strength of conflicting edges, and event persistence in the cross-window evidence graph; supporting edges represent edges that are temporally continuous, trajectory continuous, and action phase continuous; conflicting edges represent edges that are inconsistent in identity, mutually exclusive in action, non-migratable in location, and opposite in scene state; and the consistency score in the fields of the behavioral hypothesis is determined based on the aggregation strength of supporting edges, the aggregation strength of conflicting edges, event persistence, and their respective learning weights.

[0009] In one embodiment, a structured candidate event associated with window-level features is constructed based on the target confidence level and the short-term working memory (SLM) database. This includes: obtaining the recognition results corresponding to the standardized frame sequence; the recognition results include the behavior type probability, identity_id, keyframes, and local event quality; searching the SLM database for the existence of a behavior hypothesis associated with the recognition results; if it exists, updating the fields of the behavior hypothesis with the information from the recognition results; if it does not exist, creating a new behavior hypothesis based on the target confidence level; and associating the cross-window evidence graph and consistency score with the fields of the behavior hypothesis and assembling them into a structured candidate event associated with the window-level features.

[0010] In one embodiment, the method further includes: aggregating multiple candidate events associated with the same subject into an event cluster, and updating the cross-window evidence graph through the event cluster; the consensus score of the event cluster serves as an auxiliary decision factor for the multi-path scenario.

[0011] In one embodiment, gating decisions are made on the target confidence level and consistency score to write candidate events into the short-term working memory or the long-term working memory, including: obtaining gating information; the gating information includes a low confidence threshold, a high confidence threshold, a window number threshold, and a consistency threshold; when the target confidence level is less than the low confidence threshold, the candidate event is discarded or continues to be observed; when the target confidence level falls within the interval formed by the low confidence threshold and the high confidence threshold, the candidate event is written into the short-term working memory; when the target confidence level is greater than the high confidence threshold, and the number of consecutive stable windows associated with the candidate event is greater than the window number threshold and the consistency score is greater than the consistency threshold, the candidate event is written into the long-term working memory.

[0012] In one embodiment, writing to the long-term working memory (LTM) employs a transactional process of pre-commit, confirmation commit, and compensatory rollback. Writing candidate events to the LTM includes: in the pre-commit phase, adding identifier data to the candidate events to generate pre-commit entries; the identifier data includes an event identifier (event_id), a parent version identifier (parent_version_id), an evidence graph digest, a time-to-live (TTL), and a commit token (commit_token); in the confirmation commit phase, if, within the TTL, a new window continues to meet the gating decisions for the target confidence level and consistency score, the pre-commit entry is upgraded to a formal entry; the formal entry includes a version hash, a final start and end time, a confirmation window set, and an immutable evidence index; in the compensatory rollback phase, when highly credible conflicting evidence appears, a compensatory entry is generated for the candidate events; the compensatory entry is used to trigger backtracking correction, pushing the correction information of the candidate events to the short-term working memory.

[0013] In one embodiment, the long-term working memory uses a structured library to store event details and writes vector summaries to support semantic retrieval or segmentation management by time window, including: obtaining multiple value parameters; the value parameters include target confidence, consistency score, deviation, impact, future query benefits, storage space, and computational cost; calculating the memory value of candidate events based on multiple value parameters and their corresponding weights; and performing hierarchical structured storage of various entries associated with candidate events based on the size between the memory value and a preset value.

[0014] A video behavior analysis and memory writing device, comprising: The streaming preprocessing module is used to parse and process multiple data streams to obtain a standardized frame sequence; The sliding window incremental parsing module is used to perform incremental parsing of the standardized frame sequence using a sliding time window to determine window-level features; The behavior hypothesis management module is used to determine the target confidence and consistency score for each subject in the standardized frame sequence, and to construct structured candidate events with window-level feature associations based on the target confidence and short-term working memory. The confidence and consistency gating module is used to perform gating decisions on the target confidence level and consistency score; The working memory writing module is used to write candidate events into the short-term working memory or the long-term working memory.

[0015] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the aforementioned video behavior parsing and memory writing method.

[0016] A computer-readable storage medium storing a computer program, which, when executed by a processor, implements the aforementioned video behavior parsing and memory writing method.

[0017] The aforementioned video behavior analysis and memory writing method, apparatus, computer equipment, and storage medium obtain a standardized frame sequence through multi-stream data preprocessing. It then uses a sliding time window for incremental analysis and calculation of window-level features, reusing historical features to reduce redundant calculations and lower real-time processing computational overhead. For each subject, confidence and consistency scores are calculated, and structured candidate events are constructed based on a short-term working memory (STM). Gating decisions are implemented based on confidence and consistency scores to distinguish whether candidate events are stored in STM or promoted to long-term memory. Therefore, this scheme achieves separation between dynamic observation of event hypotheses and persistent solidification of credible events, providing a foundation for subsequent transactional verification, version tracing, and hierarchical storage of events, thereby improving the stability and traceability of video behavior analysis. Attached Figure Description

[0018] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 This is a schematic diagram of the application environment of the video behavior parsing and memory writing method in one embodiment; Figure 2 This is a flowchart of a video behavior parsing and memory writing method in one embodiment; Figure 3 This is a schematic diagram of a video behavior parsing and memory writing method in one embodiment; Figure 4This is a flowchart of incremental analysis of a sliding time window in one embodiment; Figure 5 This is a flowchart of multi-target recognition of a standardized frame sequence in one embodiment; Figure 6 This is a flowchart of gating decisions on behavioral assumptions in one embodiment; Figure 7 This is a schematic diagram illustrating the principle of a two-layer working memory in one embodiment; Figure 8 This is a schematic diagram of the structure of a computer device in one embodiment. Detailed Implementation

[0020] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0021] The video behavior parsing and memory writing method provided in this embodiment of the invention can be applied to, for example... Figure 1 The application environment shown. Specifically, including, for example... Figure 1 The client and server shown communicate over a network to implement video stream access and streaming preprocessing, sliding time window incremental parsing, behavioral hypothesis generation, cross-window evidence graph construction and recognition, confidence and consistency gating, and transactional two-layer memory writing, as well as long-term memory organization, value stratification, and reorganization. The client, also known as the user terminal, refers to the program that provides local services to the client, corresponding to the server. The client can be installed on, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices. The server can be implemented using a standalone server or a server cluster consisting of multiple servers.

[0022] In one embodiment, such as Figure 2 As shown, a video behavior parsing and memory writing method is provided, which is applied to... Figure 1 Taking the server in the example, the following steps are included: Step S101: Parse and process the multiple data streams to obtain a standardized frame sequence, and perform incremental parsing of the standardized frame sequence with a sliding time window to determine the window-level features.

[0023] Window-level features include appearance features, motion features, and temporal context features. Appearance features include human ROI embedding, pose keypoints, scene or location embedding, and person identity features; motion features include optical flow statistics, displacement velocity, trajectory curvature, and pose change rate; temporal context features include probability distribution of behavior types within the window, event duration, difference from the previous window state, and window mode, etc.

[0024] Specifically, such as Figure 3 As shown, Figure 3 This is a schematic diagram of the video behavior parsing and memory writing method. Data streams from one or more cameras are received. The server maintains a circular frame buffer and performs preprocessing operations, including resolution normalization, necessary noise reduction, time frame extraction or keyframe filtering, and optional edge-side preprocessing to reduce latency. Finally, a standardized frame sequence is output. Next, the server performs incremental parsing of the standardized frame sequence using sliding time windows to determine the window-level features of different windows. Each window maintains multiple ongoing events (i.e., ongoing behavior hypotheses), including the start frame, current type distribution, subject trajectory, scene region state, and reused feature versions.

[0025] In one embodiment, for multiple cameras, when each video stream is accessed, the video acquisition module retains the camera identifier, local timestamp, region identifier, and image quality indicators; the server estimates the camera's clock offset Δc through audio and video synchronization markers, repeated motion trajectories, and periodic calibration signals; based on preset region mapping, calibration points, or trajectory adaptive registration, the spatial mapping function Φc is obtained, thereby unifying the spatiotemporal coordinates; finally, a standardized frame sequence with spatiotemporal calibration information is output for subsequent incremental feature calculation and cross-view evidence map association.

[0026] Step S102: Determine the target confidence and consistency score for each subject in the standardized frame sequence.

[0027] Specifically, the server detects human bodies and tracks targets in standardized frame sequences, determines the perceived recognition results, and completes identity (_id) association. It then fuses appearance features, motion features, and other characteristics from the recognition results to obtain fused features. Based on these fused features and the historical confidence level of the previous window, the target confidence level of the current window is obtained. Using the recognition results as perception material and combining them with prior behavioral constraints, a cross-window evidence graph is constructed to determine the consistency score of the behavioral hypothesis. The cross-window evidence graph is an independently maintained graph structure that stores the nodes generated by each window and the edges representing the logical relationships between them. The consistency score represents a quantitative evaluation value obtained by weighted aggregation of all supporting edges, conflicting edges, and persistent edges associated in the cross-window evidence graph.

[0028] As is easily understood, after fusing feature representations for multi-target detection and tracking, local features are obtained by extracting features individually for each detected subject. These local features are used to determine the behavioral hypotheses corresponding to multiple subjects in subsequent windows. The aforementioned window-level feature representation, which aggregates the entire window's content, links all content within the window to the behavioral hypotheses of individual subjects via the `process_trace` field. Window-level features are used to drive adaptive window scheduling.

[0029] Step S103: Construct structured candidate events for window-level feature association based on the target confidence and short-term working memory.

[0030] Specifically, the server determines the behavioral hypothesis for each subject based on the identification results, target confidence, and short-term working memory. The server then associates the identification results, cross-window evidence graph, and consistency score with the fields in the behavioral hypothesis, assembling them into structured candidate events associated with window-level features. (Reference) Figure 3 As shown, the output candidate events are stored in the short-term working memory to maintain the trajectory of ongoing events in preparation for subsequent memory promotion; on the other hand, gating decisions continue to be made.

[0031] The behavioral hypothesis representation is based on behavioral conjectures obtained from single-window time-series observations. The candidate event representation transforms the behavioral hypothesis, which is assembled from multi-dimensional fields, into a structured event entity for hierarchical memory decision-making. For example, the behavioral hypothesis H = {type, identity_id, start_candidate, conf, consistency, evidence, evidence_debt, process_trace, status, window_id}, where conf is the target confidence score, consistency is the consistency score, and the evidence handle is the index handle of H pointing to a node in the cross-window evidence graph. The recognition results include information such as identity_id and behavior type type.

[0032] In one embodiment, when a behavioral hypothesis is updated, new evidence nodes and edge relationships are added to the cross-window evidence graph. After the cross-window evidence graph adds new evidence and edges, the consistency score is recalculated and the behavioral hypothesis is updated, achieving bidirectional linkage between the cross-window evidence graph and the behavioral hypothesis. Subsequent gating decisions are based not only on the target confidence score after moving average, but also on reading the consistency score stored internally in the behavioral hypothesis to jointly determine whether to allow it to be permanently written to the long-term working memory.

[0033] Step S104: By gating the target confidence and consistency score, the candidate event is written into the short-term working memory or the long-term working memory.

[0034] Specifically, the server determines the range to which the target confidence level belongs. If the target confidence level belongs to the range consisting of the low confidence threshold and the high confidence threshold, the candidate event is written into the short-term working memory. When the target confidence level is greater than the high confidence threshold, the server makes a gating decision based on the consistency score and uses a transactional mechanism of pre-commit, confirmation commit, and conflict compensation rollback to complete the promotion from short-term working memory to long-term memory.

[0035] The aforementioned video behavior parsing and memory writing method obtains a standardized frame sequence through multi-stream data preprocessing, and incrementally analyzes and calculates window-level features using a sliding time window. It reuses historical features to reduce redundant calculations and lowers the computational overhead of real-time processing. For each subject, confidence and consistency scores are calculated, and structured candidate events are constructed based on a short-term working memory (STM). Gating decisions are implemented based on confidence and consistency scores to distinguish whether candidate events are stored in STM or promoted to long-term memory. Therefore, this solution provides a foundation for subsequent transactional verification, version tracking, and hierarchical storage of events, improving the stability and traceability of video behavior parsing. It can be applied to scenarios such as family companionship agents, security monitoring, and elderly care.

[0036] In one embodiment, the process of transforming a standardized frame sequence within a window into candidate events is carried out through an identification backbone network such as 2D / 3D convolution, a temporal model, or a Transformer. This application does not limit the implementation of this method, in order to achieve the processing flow of "feature source - feature fusion - behavioral hypothesis generation - structured candidate event output".

[0037] In one embodiment, incremental parsing of a standardized frame sequence using a sliding time window to determine window-level features includes: determining the window parameters of the sliding time window; performing incremental parsing of the standardized frame sequence according to the window parameters, reusing cached historical features in the overlapping portion of the current window and the previous window, and fusing the window-level features of the previous window with the historical features to obtain the window-level features of the current window; determining the semantic change score based on the dynamic allocation of window-level features with changes in behavioral semantics; and adjusting the step size according to the threshold range corresponding to the semantic change score to obtain new window-level features based on the new step size.

[0038] The window parameters include window length and step size. For example... Figure 4 As shown, Figure 4 This is a flowchart of the sliding time window incremental analysis.

[0039] Specifically, the server maintains the window length L and the step size S_base. For the current window W... k When calculating or updating spatiotemporal features, relative to the previous window W k-1The overlapping portion reuses cached historical features, fusing the window-level features of the previous window with historical features to obtain the window-level features of the current window. This means incremental updates during window sliding, rather than full recalculation each time. To enable dynamic allocation of inference window-level features according to behavioral semantic changes, a semantic change score is calculated for subject u in the k-th window: D(k, u) = α·dA(k, u) + β·dM(k, u) + γ·dP(k, u) + δ·dT(k, u). Where dA is the normalized distance of the subject appearance embedding, dM is the difference in velocity, acceleration, and attitude change rate, dP is the divergence of the probability distribution of behavior categories, and dT is the change in the relative positional relationship or region migration relationship between subjects; α, β, γ, and δ are non-negative weights that sum to 1, used to identify behavioral transitions and allocate parsing resources.

[0040] When the semantic change score D(k, u) is lower than the first change threshold, an extended step size S_high, a low sampling rate, and lightweight feature updates are used. This is a low-sensitivity mode, where the character's pose and position remain almost unchanged. The increased step size and sparse sampling save computational power. When D(k, u) is between the first and second change thresholds, the step size S_base continues to be used. When D(k, u) exceeds the second change threshold, or when triggering conditions such as region crossing, object interaction, or sudden pose changes are detected, the system switches to a compressed step size S_low and initiates high-density keyframe extraction and deep temporal verification. This is a high-sensitivity mode. Here, S_low < S_base < S_high; the first change threshold is less than the second change threshold. Therefore, incremental parsing of continuous video is performed over a sliding time window, and the parsing parameters are adaptively adjusted based on semantic changes between windows.

[0041] Furthermore, to avoid frequent switching due to short-term noise, entering high-sensitivity mode requires q1 consecutive windows to satisfy the high-change condition that D(k, u) exceeds the second change threshold, and exiting high-sensitivity mode requires q2 consecutive windows to satisfy the low-change condition that D(k, u) is below the first change threshold, with q2 being greater than q1. The window parameters, window mode, triggering reason, sampling density, and reused feature versions are written into the process_trace field of the behavioral hypothesis, thereby achieving source correlation between window-level features and behavioral hypotheses.

[0042] In the above embodiments, by reusing the historical features of overlapping windows, full repetitive calculations are avoided, reducing computational power consumption. The step size, sampling density, or inference level of the sliding window are dynamically adjusted based on the semantic change scores of the window-level features. When semantic changes are drastic, the step size is reduced to capture details, and when changes are gradual, the step size is increased to improve processing speed, balancing the real-time performance of video behavior analysis with recognition accuracy.

[0043] In one embodiment, determining the target confidence and consistency score for each subject in a standardized frame sequence includes: performing multi-target recognition on the standardized frame sequence to obtain recognition results; obtaining the target confidence of the current window through appearance features, motion features, and the historical confidence of the previous window; constructing a cross-window evidence map based on the recognition results; and determining the consistency score of the behavioral hypothesis based on the cross-window evidence map.

[0044] The recognition results include appearance features, motion features, keyframes, trajectory segments, and identity association results; the cross-window evidence graph uses the recognition results output by different windows as nodes, and edges are constructed between the nodes to establish temporal, spatial, subject, and semantic class relationships.

[0045] Specifically, the server performs feature fusion on appearance and motion features to obtain initial confidence levels for various behavioral probability associations. This is then combined with historical confidence levels from the previous window for temporal smoothing to obtain the target confidence level for the current window. To avoid confirming semantically contradictory results with high confidence in a single window, a cross-window evidence graph is established for the same or related subjects. Cross-window evidence graph nodes include candidate event fragments, keyframes, trajectory fragments, identity association results, scene region states, and multi-camera local events; edges include temporally continuous edges, edges with the same subject, spatially adjacent edges, semantically supporting edges, and semantically conflicting edges. Each edge records at least its type, relationship strength, generating window ID, and evidence validity period. The server determines the consistency score of the behavioral hypothesis based on the aggregation strength of the edges represented in the cross-window evidence graph and the event persistence represented by the nodes.

[0046] In this embodiment, target confidence is calculated by fusing appearance, motion features, and historical confidence to suppress single-frame recognition jitter. A cross-window evidence map is constructed based on the multi-target recognition results, and cross-window temporal evidence is associated to calculate the behavioral hypothesis consistency score, thereby comprehensively evaluating the temporal rationality of the behavioral hypothesis.

[0047] In one embodiment, the server first performs human detection and multi-object tracking on the standardized frame sequence within the current window to obtain the bounding box sequence, tracking ID, and optional pose key points for each subject. Appearance features are derived from the subject's RGB image ROI within the window, pose key points, and identity features. When a face is visible, the tracking ID is mapped to an identity_id using face recognition; when the face is temporarily invisible, the associated identity is retained and corrected upon re-visibility. Motion features are derived from optical flow in adjacent frames, or from statistical quantities such as displacement, velocity, and acceleration formed by the inter-frame difference between the tracking box center and key points.

[0048] In one embodiment, the target confidence of the current window is obtained by using appearance features, motion features, and the historical confidence of the previous window, including: fusing appearance features and motion features to obtain fused features; performing probability distribution and correction processing on the fused features to obtain an initial confidence; and when there is a behavioral hypothesis of subject association in the short-term working memory, performing time smoothing on the historical confidence of the previous window and the initial confidence of the current window to obtain the target confidence of the current window.

[0049] Specifically, such as Figure 5 As shown, Figure 5 This is a flowchart of multi-target recognition for standardized frame sequences. The appearance vector A obtained from the appearance branch and the motion vector M obtained from the motion branch are fused after feature dimension alignment. Fusion methods include post-concatenation compression, gated weighting, or cross-attention, resulting in fused features. These fused features are input to the behavior classification head, which outputs the probability distribution of each behavior type. The probability distribution of the largest behavior category is then corrected based on tracking continuity, human detection reliability, identity matching reliability, and camera image quality factors to obtain the corrected initial confidence. The historical confidence of the behavior hypothesis in the previous window, stored in short-term working memory, is obtained. Temporal smoothing is applied to the historical confidence of the previous window and the initial confidence of the current window to obtain the target confidence of the current window. Therefore, the sudden changes in confidence caused by single-frame noise are mitigated, recognition fluctuations are smoothed, and the temporal stability of the target confidence output is improved.

[0050] In one embodiment, if detection and multi-target tracking fail, the subject window does not generate new behavioral hypotheses, but only performs timeout decay on existing behavioral hypotheses in short-term working memory or requests supplementary evidence from other perspectives.

[0051] In one embodiment, when the identity of the subject in the identification result is temporarily uncertain, behavior analysis can still continue, but the corresponding identity field in the long-term working memory remains in a provisional state.

[0052] In one embodiment, determining the consistency score of a behavioral hypothesis based on a cross-window evidence graph includes: determining the aggregation strength of supporting edges, the aggregation strength of conflicting edges, and the event persistence in the cross-window evidence graph; and determining the consistency score in the fields of the behavioral hypothesis based on the aggregation strength of supporting edges, the aggregation strength of conflicting edges, the event persistence, and their respective learning weights.

[0053] The edges in the cross-window evidence graph include at least temporally continuous edges, edges with the same subject, spatially adjacent edges, supporting edges, and conflicting edges. Each edge records at least its type, relationship strength, generation window ID, and evidence validity period. Supporting edges represent edges that are temporally continuous, trajectory continuous, and action phase continuous. Conflicting edges represent edges with inconsistent identities, mutually exclusive actions, non-migratory positions, and opposite scene states. The cross-window evidence graph represents observational evidence, subject relationships, and supporting or conflicting semantics between evidence across multiple sliding time windows.

[0054] Specifically, a consistency score is calculated for the behavioral hypothesis: C(H) = Σw_sup·r_sup−Σw_conf·r_conf+η·r_cont, where r_sup is the aggregation strength of supporting edges such as temporal continuity, trajectory continuity, and action phase continuity; r_conf is the aggregation strength of conflicting edges such as identity inconsistency, mutually exclusive actions, unreachable migration, and opposite scene states; r_cont is the event persistence; and w_sup, w_conf, and η are preset or self-learned weights. Mutually exclusive actions can be automatically generated based on the behavioral state constraint table, spatiotemporal reachability constraints, or historical scene states. Therefore, by comprehensively considering the positive evidence, contradictory evidence, and temporal continuity represented by the cross-window evidence graph, the global temporal rationality of the behavioral hypothesis is quantified, local noise interference is reduced, and the objectivity and accuracy of subsequent behavioral hypothesis evaluation are improved.

[0055] In one embodiment, a structured candidate event associated with window-level features is constructed based on the target confidence level and the short-term working memory (STM) database. This includes: obtaining the recognition results corresponding to the standardized frame sequence; searching the STM database for behavioral hypotheses associated with the recognition results; if they exist, updating the fields of the behavioral hypothesis with the information from the recognition results; if they do not exist, creating a new behavioral hypothesis based on the target confidence level; and associating the cross-window evidence graph and consistency score with the fields of the behavioral hypothesis and assembling them into a structured candidate event associated with the window-level features.

[0056] The identification results include behavior type probability, identity_id, keyframes, and local event quality.

[0057] Specifically, based on fusion features, trajectory fragments, and identity association results, the server obtains the behavior type probability, target confidence (CONF), identity (_id), keyframe index, and local event quality corresponding to the standardized frame sequence. It then searches the short-term working memory to check if a compatible behavior hypothesis with the same identity (_id) or tracking trajectory already exists. If it does, the duration, confidence, evidence, process_trace, and cross-window evidence maps in the behavior hypothesis are updated. If it does not exist and the target confidence is not lower than the low confidence threshold θ_low, a new behavior hypothesis is created, where the start_candidate field is the moment it first exceeds θ_low.

[0058] The field information associated with the cross-window evidence graph and consistency score is written back to the behavioral hypothesis H={type, identity_id, start_candidate, conf, consistency, evidence, evidence_debt, process_trace, status, window_id}, where status includes at least the following: under observation, working memory, pending review, pre-committed, solidified, rolled back, and discarded. Finally, the behavioral hypothesis is constructed into an entity structure for candidate events, including: identity_id, behavior type (type), start candidate time (start_candidate), current end time, duration, location, confidence level (conf), consistency score (consistency), evidence debt (evidence_debt is a marker obtained from the cross-window evidence graph conflict analysis), keyframe or cross-window evidence graph handle (evidence), source window ID, camera identifier, process trace information (process_trace), and status. This completes the mapping of appearance / motion / identity / cross-view evidence and window-level features to structured candidate events.

[0059] In this embodiment, existing behavioral hypotheses are matched by retrieving them from the short-term working memory, enabling iterative updates or on-demand creation of hypotheses. Cross-window evidence graphs and consistency scores are associated with hypothesis fields to assemble structured candidate events. Reusing existing behavioral hypotheses avoids redundant creation, and unified encapsulation of multi-dimensional evidence information facilitates subsequent gating decisions, ensuring continuity and integrity in event management.

[0060] In one embodiment, gating decisions are made on the target confidence level and consistency score to write candidate events into the short-term working memory or the long-term working memory, including: obtaining gating information; discarding candidate events or continuing to observe them when the target confidence level is less than a low confidence threshold; writing candidate events into the short-term working memory when the target confidence level falls within the interval formed by the low confidence threshold and the high confidence threshold; and writing candidate events into the long-term working memory when the target confidence level is greater than the high confidence threshold, and the number of consecutive stable windows associated with the candidate event is greater than a window number threshold and the consistency score is greater than a consistency threshold.

[0061] The gating information includes the low confidence threshold θ_low, the high confidence threshold θ_high, the window number threshold K, and the consistency threshold θ_cons.

[0062] Specifically, such as Figure 6 As shown, Figure 6 This is a flowchart for gating decisions on behavioral hypotheses. When the target confidence level CONF is below θ_low, the hypothesis is discarded or continues to be observed; when θ_low ≤ CONF < θ_high, it is written to or updated in the short-term working memory (STM), and promoted after reaching the long-term working memory's write threshold. The STM supports "current state" queries. When CONF is not lower than θ_high, the number of consecutive stable windows associated with the candidate event is not lower than K, and the consistency score C(H) is not lower than θ_cons, the candidate event enters the long-term memory preparation state, and the long-term working memory supports post-event retrieval and upper-level habit or alarm applications. If CONF is high but C(H) is not lower than the threshold and has not yet been met, or if there is still uncertainty about identity, disagreement among multiple cameras, or evidentiary debt, it is not directly solidified but enters a pending review or pre-submission state.

[0063] Solidification refers to the process of elevating ongoing or confirmed behavioral hypotheses from working memory into long-term memory, forming persistent structured entries, and adding evidence references for retrospective analysis. Solidification is not simply copying; it also involves completing the end_time period, deduplicating and merging with existing entries, and allowing for retrospective correction or invalidation of previous entries should a higher confidence level emerge later.

[0064] In this embodiment, candidate events are categorized and processed based on gating information: low-confidence events are discarded directly or continuously observed; medium-confidence events are stored in short-term working memory; and high-confidence events that meet the requirements of temporal stability and consistency are promoted to long-term memory. This achieves hierarchical storage management of events, filters low-quality hypotheses, reduces invalid data storage, and balances real-time observation with the solidification of reliable events.

[0065] In one embodiment, if the target confidence is high but the consistency score is lower than θ_cons, the status field is written to a pending review status, the sampling density of subsequent windows is increased or supplementary identity, scene or auxiliary perspective evidence is requested, and evidence debt evidence_debt is set.

[0066] In one embodiment, writing candidate events into the long-term working memory includes: in the pre-commit phase, adding identification data to the candidate events to generate pre-commit entries; in the confirmation commit phase, if within the validity period TTL, a new window continues to meet the target confidence and consistency score for gating decision, and the pre-commit entries are upgraded to formal entries; in the compensation rollback phase, when highly credible conflict evidence appears, candidate events are generated into compensation entries.

[0067] The writing to the long-term working memory adopts a transactional process of pre-commit, confirmed commit, and compensated rollback; the identification data includes event identifier event_id, parent version identifier parent_version_id, evidence graph digest, validity period TTL, and commit token; formal entries include version hash, final start and end time, confirmation window set, and immutable evidence index; the compensated entries include the main version identifier target_version_id, which is used to point to the original formal entries that have been revoked or corrected and to establish an association with the old version; the compensated entries are used to trigger backtracking correction and push the correction information of candidate events to the short-term working memory.

[0068] Specifically, during the pre-commit phase, a pre-commit entry M_pre is generated. The identification data of the pre-commit entry includes event_id, parent_version_id, structured event fields, confidence level, current consistency score, evidence graph digest, validity period TTL, and commit_token. Pre-commit records are marked as provisional for the query interface and are not included in irreversible statistics or high-risk automatic actions. During the confirmation commit phase, if a new window is added within the validity period TTL, causing the consistency score to reach the consistency threshold θ_cons and no strong conflict evidence appears, the pre-commit entry M_pre is upgraded to a formal entry M_com, and the version hash, final start and end times, confirmation window set, and immutable evidence index are written into it. If highly credible conflict evidence appears after the pre-commit or confirmation commit, a compensation entry M_rev is generated. The compensation entry M_rev points to the revoked or corrected version through target_version_id and includes the rollback reason, conflict evidence index, corrected fields, and generation time. The server retains the original evidence and version relationships but does not physically delete historical records. Ultimately, we obtain a real-time behavioral event stream and a set of entries in a searchable, traceable, version-chained long-term working memory to support retrieval of evidence citations and cross-perspective aggregation queries.

[0069] In one embodiment, persistence is not a simple copying of working memory, but a traceable promotion write process constrained by confidence, stability, consistency, and transaction state. The query interface displays the currently valid facts in a collapsed manner based on the version chain and effective status, and allows tracing the reasons for their confirmation, merging, and correction.

[0070] In the above embodiments, a three-stage event submission control mechanism of pre-submission, confirmation submission, and compensation rollback is adopted. The pre-submission stage generates pre-submission entries carrying identifiers; these entries can only be upgraded to formal entries if they continuously pass gating verification within their validity period; when highly credible conflict evidence is detected, compensation entries are generated, delaying the confirmation event and supporting anomaly backtracking correction. This effectively reduces the risk of erroneous event persistence and improves the reliability of memory storage results.

[0071] In one embodiment, the method further includes: aggregating multiple candidate events associated with the same subject into an event cluster, and updating the cross-window evidence graph through the event cluster; the consensus score of the event cluster serves as an auxiliary decision factor for the multi-path scenario.

[0072] Specifically, for candidate events from multiple cameras on the same subject, based on the time calibration function t*=t c +Δc and the spatial mapping function z*=Φc(z c A unified spatiotemporal coordinate system is established to form a cross-perspective event cluster E. The consensus score Q(E) of this event cluster is determined as Q(E) = Σρ·CONF·C / Σρ, where ρ represents the dynamic reliability based on occlusion rate, image clarity, tracking interruption rate, identity recognition stability, and historical calibration residual updates, and C represents the consistency score. The consensus score Q(E) serves as an auxiliary decision factor for multi-path scenarios, helping to adjust the status of candidate events. High consensus can alleviate the stringency of pending review, while significant disagreements across multiple perspectives will place candidate events under review. Based on the corroboration or contradiction relationships between multiple perspectives in Q(E), the edge strength of cross-perspective support edges and conflict edges in the global cross-window evidence graph is updated, indirectly triggering the recalculation of the consistency score and updating the consistency field in candidate events. During the transactional writing to the long-term memory phase, the TTL validity period of pre-commit records is adjusted according to Q(E) to control the pace of pre-commits being upgraded to formal entries.

[0073] In one embodiment, the event cluster writes the cluster identifier (cluster_id) back to each candidate event to achieve cross-perspective association of candidate events.

[0074] In one embodiment, for repeated observations of the same event, a weighted matching is performed based on event similarity, subject correlation, time overlap, and evidence graph neighborhood similarity to obtain a merge score. When the merge score is not lower than the threshold θ_merge, the two candidate events are merged into the same version chain instead of being repeatedly written to the long-term working memory.

[0075] In one embodiment, the long-term working memory uses a structured library to store event details and writes vector summaries to support semantic retrieval or segmentation management by time window, including: obtaining multiple value parameters; calculating the memory value of candidate events based on the multiple value parameters and their corresponding weights; and performing hierarchical structured storage of multiple entries associated with candidate events based on the size between the memory value and a preset value.

[0076] The value parameters include target confidence, consistency score, degree of deviation, degree of impact, future query benefits, storage space, and computational cost.

[0077] Specifically, to balance availability and storage cost, the server calculates the memory value for confirmed candidate events: V(H) = a·CONF + b·C(H) + c·Novel(H) + d·Impact(H) + e·Query Gain(H) − f·Cost(H), where CONF is the target confidence level, C(H) is the consistency score, Novel represents the degree of deviation from the historical event pattern of the same subject, Impact represents the degree of influence on subsequent states, environment objects or rule triggers, Query Gain represents the future query benefits predicted based on historical retrieval behavior, and Cost represents storage space and computational overhead. All items can be normalized to [0, 1].

[0078] When V(H) reaches a high-value preset value, a complete structured event, keyframe index, local evidence graph, version chain information, and vector digest are written. When V(H) is in the middle range, an event digest and representative evidence are written. When V(H) is below a low-value preset value but the events are continuous, similar adjacent events are aggregated into compressed entries consisting of time periods, behavior distributions, and anomalous fragment indexes. Before compression, the version chain and verifiable digest fingerprint are preserved to ensure that aggregation does not disrupt subsequent traceability.

[0079] In this embodiment, the memory value of candidate events is calculated by integrating multiple value parameters and their weights. Based on the comparison results between the memory value and the preset value, the related entries of the candidate events are stored in a hierarchical structure. This enables differentiated management of event data according to importance, prioritizes the retention of high-value events, optimizes the allocation of storage resources, reduces storage overhead, and improves the efficiency of data retrieval and retrieval in the memory bank.

[0080] In one embodiment, the apparatus corresponding to the video behavior analysis and memory writing method further includes a query interface module. When the server is idle or under low load, it can upgrade, merge, or expire low-value pre-submitted records based on subsequent evidence and user query feedback. This operation only affects the item display layer or generates new version nodes, without changing the original evidence references, thereby achieving a unified approach to dynamic compression and audit traceability.

[0081] In one embodiment, such as Figure 7 As shown, Figure 7 This is a schematic diagram of the dual-layer working memory architecture. The dual-layer memory storage architecture of this application includes a short-term working memory, a long-term working memory, and a bottom-level value storage module. The short-term working memory stores the trajectory of ongoing events, unconfirmed behavioral hypotheses, and the feature cache of the most recent N seconds, supporting real-time queries of the current target behavior status. When a candidate event remains stable and meets the judgment criteria, it is transferred to the long-term working memory through a solidification or promotion process. The long-term working memory stores verified structured events, accompanied by vector summaries, evidence citations, and audit information, providing data support for upper-layer habit mining and alarm operations. The long-term working memory can update the short-term working memory through a backtracking correction channel, enabling the correction of current behavioral hypotheses based on historical evidence. The bottom-level storage module processes events differently based on their memory value; high-value events are fully solidified, while low-value events are aggregated before being written, optimizing storage resources. Therefore, the dual-layer memory storage architecture distinguishes between real-time temporary hypotheses and persistent reliable events, supports bidirectional data linkage, and balances real-time inference and long-term event audit analysis capabilities.

[0082] In one embodiment, for a multi-view homecoming event, both the doorway camera and the hallway camera are accessed simultaneously. The server calculates a semantic change score for the subject's trajectory detected from the doorway view. When the subject crosses the doorway and changes in posture or displacement cause the semantic change score D(k, u) to exceed a second change threshold, the compression step size S_low is switched and keyframes are extracted with increased density. After time offset and region mapping calibration, the two video streams form the same cross-view event cluster. The facial identity from the main viewpoint and the trajectory continuity from the auxiliary viewpoint jointly improve the consistency score. The event first generates a pre-committed record. After K consecutive windows meet the confidence and consistency thresholds, it is upgraded to a formal homecoming event, i.e., promoted to the long-term working memory. If identity conflicts are subsequently discovered, they are corrected through a compensating version without physically deleting the original record.

[0083] In one embodiment, for continuous updating and value stratification of learning behavior: During the low semantic change phase of a sitting posture event at a desk, an extended step size S_high is used while incremental updates of duration in working memory are maintained; when a departure from the seat or a significant change in posture is detected, a high-sensitivity mode is entered to confirm the end time. If the event is a normal continuous learning behavior and the memory value is in the middle range, only the time period, duration, representative keyframes, and summary are solidified; if there is an abnormal interruption, a risky posture, or a scenario with high query benefits, it is treated as a high-value event and a complete evidence graph and version chain are solidified.

[0084] In one embodiment, the suppression and rollback of false positives for low-confidence falls at night are as follows: Although candidate fall events caused by changes in nighttime illumination may have high confidence in individual windows, the continuity of the trajectory, scene location, and auxiliary camera evidence form conflicting edges, causing the consistency score C(H) to be lower than θ_cons. These events are placed in a pending review state with increased sampling density, rather than being directly fixed. If pre-submitted records have been previously generated, they are rolled back with compensation entries after a conflict is detected, preventing false positives from having a long-term impact on subsequent retrieval and rule triggering.

[0085] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0086] In one embodiment, a video behavior analysis and memory writing device is provided, which corresponds one-to-one with the video behavior analysis and memory writing method described in the above embodiments. The video behavior analysis and memory writing device includes: The streaming preprocessing module is used to parse and process multiple data streams to obtain a standardized frame sequence; The sliding window incremental parsing module is used to perform incremental parsing of the standardized frame sequence using a sliding time window to determine window-level features.

[0087] The behavior hypothesis management module is used to determine the target confidence and consistency score for each subject in the standardized frame sequence, and to construct structured candidate events with window-level feature associations based on the target confidence and short-term working memory.

[0088] The confidence and consistency gating module is used to perform gating decisions on the target confidence level and consistency score; The working memory writing module is used to write candidate events into the short-term working memory or the long-term working memory.

[0089] Specific limitations regarding the video behavior analysis and memory writing device can be found in the limitations of the video behavior analysis and memory writing method described above, and will not be repeated here. Each module in the aforementioned video behavior analysis and memory writing device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0090] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 8As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and the database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores a dual-level memory architecture. The network interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements a video behavior analysis and memory writing method.

[0091] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the video behavior parsing and memory writing method described in the above embodiment. To avoid repetition, it will not be described again here.

[0092] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When executed by a processor, the computer program implements the video behavior parsing and memory writing method described in the above embodiment. To avoid repetition, further details are omitted here. The computer-readable storage medium can be non-volatile or volatile.

[0093] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0094] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0095] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention 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 of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.

Claims

1. A method for video behavior analysis and memory writing, characterized in that, include: Multiple data streams are parsed to obtain a standardized frame sequence, and the standardized frame sequence is subjected to incremental parsing with a sliding time window to determine window-level features. Determine the target confidence and consistency score for each subject in the standardized frame sequence; Based on the target confidence level and short-term working memory, construct the structured candidate events associated with the window-level features; Gating decisions are made on the target confidence level and the consistency score to write the candidate events into the short-term working memory or the long-term working memory.

2. The method as described in claim 1, characterized in that, Incremental parsing of the standardized frame sequence using a sliding time window is performed to determine window-level features, including: Determine the window parameters of the sliding time window; the window parameters include the window length and the step size; The standardized frame sequence is incrementally parsed according to the window parameters. The overlapping part of the current window and the previous window reuses the cached historical features, and the window-level features of the previous window and the historical features are fused to obtain the window-level features of the current window. The semantic change score is determined based on the dynamic allocation of the window-level features as the semantics of the behavior changes. The step size is adjusted according to the threshold range corresponding to the semantic change score, so as to obtain new window-level features based on the new step size.

3. The method as described in claim 1, characterized in that, Determining the target confidence and consistency score for each subject in the standardized frame sequence includes: Multi-target recognition is performed on the standardized frame sequence to obtain recognition results; the recognition results include appearance features, motion features, keyframes, trajectory segments, and identity association results; The target confidence of the current window is obtained by using the appearance features, the motion features, and the historical confidence of the previous window. A cross-window evidence graph is constructed based on the recognition results; the cross-window evidence graph uses the recognition results output by different windows as nodes, and edges are constructed between the nodes to establish temporal, spatial, subject, and semantic class relationships. The consistency score of the behavioral hypothesis is determined based on the cross-window evidence graph.

4. The method as described in claim 3, characterized in that, The target confidence score of the current window is obtained by using the appearance features, the motion features, and the historical confidence score of the previous window, including: The appearance features and the motion features are fused to obtain the fused features; The fused features are subjected to probability distribution and correction processing of the classification head to obtain the initial confidence level; When the behavioral hypothesis of the subject association exists in the short-term working memory, the historical confidence of the previous window and the initial confidence of the current window are smoothed over time to obtain the target confidence of the current window.

5. The method as described in claim 3, characterized in that, The edges in the cross-window evidence graph include at least temporally continuous edges, edges with the same subject, spatially adjacent edges, supporting edges, and conflicting edges; each edge records at least the edge type, relationship strength, generating window ID, and evidence validity period; Determining the consistency score of the behavioral hypothesis based on the cross-window evidence graph includes: The aggregation strength of supporting edges, the aggregation strength of conflicting edges, and the event persistence are determined in the cross-window evidence graph; the supporting edges represent edges that are continuous in time, continuous in trajectory, and continuous in action phase; the conflicting edges represent edges that are inconsistent in identity, mutually exclusive in action, non-transferable in position, and opposite in scene state. The consistency score in the behavioral hypothesis field is determined based on the aggregation strength of the supporting edges, the aggregation strength of the conflicting edges, the event persistence, and their respective learning weights.

6. The method as described in claim 1, characterized in that, Based on the target confidence level and short-term working memory, the structured candidate events associated with the window-level features are constructed, including: Obtain the recognition results corresponding to the standardized frame sequence; the recognition results include behavior type probability, identity_id, keyframes, and local event quality. The hypothesis of whether the recognition result is associated with the short-term working memory library is searched. If it exists, the information in the identification result is updated to the field of the behavior hypothesis; if it does not exist, a new behavior hypothesis is created based on the target confidence level. The cross-window evidence graph and the consistency score are associated with the fields in the behavioral hypothesis and assembled into structured candidate events related to the window-level feature tracing. The method further includes: aggregating multiple candidate events associated with the same subject into an event cluster, and updating the cross-window evidence graph through the event cluster; the merged score of the event cluster is an auxiliary decision factor for the multi-path scenario.

7. The method as described in claim 1, characterized in that, Gating decisions are made on the target confidence level and the consistency score to write the candidate events into the short-term working memory or the long-term working memory, including: Obtain gating information; the gating information includes a low confidence threshold, a high confidence threshold, a window number threshold, and a consistency threshold; When the target confidence level is less than the low confidence threshold, the candidate event is discarded or continues to be observed; When the target confidence level falls within the range formed by the low confidence threshold and the high confidence threshold, the candidate event is written into the short-term working memory. When the target confidence level is greater than the high confidence threshold, and the number of consecutive stable windows associated with the candidate event is greater than the window number threshold and the consistency score is greater than the consistency threshold, the candidate event is written into the long-term working memory.

8. The method as described in claim 7, characterized in that, The writing to the long-term working memory adopts a transactional process of pre-commit, confirmed commit, and compensated rollback; Writing the candidate events into the long-term working memory includes: During the pre-commit phase, identification data is added to the candidate events to generate pre-commit entries; the identification data includes event_id, parent_version_id, evidence graph digest, TTL, and commit_token. During the confirmation and submission phase, if the newly added window continues to meet the gating decision of the target confidence and consistency score within the validity period TTL, the pre-submission entry is upgraded to a formal entry; the formal entry includes version hash, final start and end time, confirmation window set, and immutable evidence index; During the compensation rollback phase, when highly credible conflict evidence appears, compensation entries are generated for the candidate events; the compensation entries are used to trigger backtracking correction and push the correction information of the candidate events to the short-term working memory.

9. The method according to any one of claims 1 to 8, characterized in that, The long-term working memory uses a structured library to store event details and writes vector summaries to support semantic retrieval or segmentation management by time window, including: Multiple value parameters are obtained; the value parameters include the target confidence level, the consistency score, the degree of deviation, the degree of impact, future query benefits, storage space, and computational cost; The memory value of the candidate event is calculated based on multiple value parameters and their corresponding weights. Based on the magnitude between the memory value and the preset value, the various entries associated with the candidate events are stored in a hierarchical and structured manner.

10. A video behavior analysis and memory writing device, characterized in that, include: The streaming preprocessing module is used to parse and process multiple data streams to obtain a standardized frame sequence; The sliding window incremental parsing module is used to perform incremental parsing of the standardized frame sequence using a sliding time window to determine window-level features; The behavior hypothesis management module is used to determine the target confidence and consistency score corresponding to each subject in the standardized frame sequence, and to construct the structured candidate events associated with the window-level features based on the target confidence and short-term working memory. The confidence and consistency gating module is used to perform gating decisions on the target confidence level and the consistency score. The working memory writing module is used to write the candidate events into the short-term working memory or the long-term working memory.

11. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the video behavior parsing and memory writing method as described in any one of claims 1 to 9.

12. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the video behavior parsing and memory writing method as described in any one of claims 1 to 9.