A method for constructing cross-camera access sessions based on semantic topology and evidence chain rollback

By limiting latency accumulation through clock synchronization, mutex locks, and reference counting mechanisms, a spatial three-dimensional relationship network is constructed and a versioned evidence graph is split, which solves the problems of latency accumulation and read/write conflicts in multi-camera video streams and achieves efficient and accurate data processing for cross-camera tracking.

CN123075162APending Publication Date: 2026-11-10CHENGDU DINGDING TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611257015.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-19
Publication Date
2026-11-10

AI Technical Summary

Technical Problem

In scenarios where multiple cameras concurrently push video streams, the lack of a global clock synchronization and queue full-load replacement mechanism leads to the accumulation of latency and read/write conflicts caused by network jitter. When the system reads video frames across modules, it performs a full image data copy operation, resulting in a waste of computing resources and matching errors when the target is occluded or there are sudden changes in lighting. Existing tracking frameworks lack a state rollback mechanism.

Method used

Clock synchronization is performed via a network time protocol server. Single-frame transmission delay parameters are calculated and timed-out video frames are discarded. The old frame popping operation of the memory buffer queue limits the accumulation of delay. A mutex lock and reference counting mechanism is used to read the memory address area instead of copying the entire image data. A spatial three-dimensional relationship network with passing nodes, stopping nodes, and floor transition nodes is constructed. The minimum passage threshold is derived by combining the shortest distance of node transfer and walking speed, and hard rule blocking operation is triggered to filter matching errors. A versioned association evidence graph is constructed and the nearest common ancestor algorithm is called to trace historical nodes. The contaminated graph structure is split into independent connected subgraphs and identity identification codes are reassigned.

Benefits of technology

It effectively prevents read/write conflicts when multiple video streams are accessed concurrently, reduces data transmission overhead, reduces the ineffective consumption of hardware computing resources, and provides a state rollback and data splitting and recombining error correction mechanism during cross-camera tracking, thereby improving the accuracy and efficiency of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123075162A_ABST
    Figure CN123075162A_ABST
Patent Text Reader

Abstract

This invention relates to the field of computer vision technology and discloses a method for constructing cross-camera access sessions based on semantic topology and evidence chain rollback. The method includes receiving video stream data and performing latest frame buffering; extracting target features to generate local trajectory data; performing time calculation operations in conjunction with a spatial three-dimensional relationship network; performing feature scoring and blocking determination based on the time calculation results; constructing a versioned association evidence graph to perform backtracking and splitting / reorganizing; and extracting state details to generate session data. This invention limits latency and avoids read / write conflicts by combining a synchronized clock with a memory buffer queue and a reference counting mechanism; it triggers hard rule blocking operations to terminate similarity calculations by comparing access time with the minimum access threshold; and when spatial mutual exclusion occurs, it calls the nearest common ancestor algorithm to trace and erase the directed edge with the lowest confidence, and uses a graph connectivity component algorithm to split the graph structure and reallocate identifier codes, thus achieving state rollback error correction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer vision technology, specifically to a method for constructing cross-camera access sessions based on semantic topology and evidence chain rollback. Background Technology

[0002] In scenarios where multiple cameras concurrently push video streams, the lack of a global clock synchronization and queue full-load replacement mechanism causes network jitter to accumulate single-frame transmission delays. The full image data copying operation performed by the system when reading video frames across modules causes concurrent read-write conflicts and increases internal data transmission overhead. The cross-camera target association determination stage relies excessively on visual appearance features for comparison. Due to the lack of mandatory spatial transfer constraints, the system continuously performs floating-point matrix operations on candidate targets that violate physical transfer limits, resulting in wasted computing resources and matching errors when targets encounter occlusion or sudden changes in lighting.

[0003] Existing tracking frameworks lack a reverse addressing and tracing mechanism based on graph structure state snapshots when erroneous associations are generated in the early stages of video frame processing and trigger mutual exclusion conflicts between disconnected spatial nodes in subsequent tracking stages. When faced with spatial logic fallacies, the system cannot locate and cut off the source of the error, and lacks a process for edge splitting and identity reorganization to correct the contaminated network topology graph, ultimately outputting invalid access records with physical state conflicts to the business end.

[0004] Therefore, this invention proposes a cross-camera access session construction method based on semantic topology and evidence chain rollback to address the shortcomings of existing technologies. Summary of the Invention

[0005] The technical problem solved by this invention is the lack of a state rollback mechanism when cross-camera target tracking encounters concurrent video streams, resulting in latency accumulation and read / write conflicts, and causing spatial logic errors.

[0006] To address the problems existing in the prior art, the present invention provides the following technical solution: This invention provides a method for constructing cross-camera access sessions based on semantic topology and evidence chain rollback, including the following steps: Receive video stream data pushed by multiple camera terminals and perform the latest frame buffering operation; Extract pedestrian target features from video stream data and generate local trajectory data within a single shot; Read the spatial three-dimensional relationship network of the monitored area and perform time calculation on the local trajectory data in combination with the spatial three-dimensional relationship network; Receive the time calculation results output by the time calculation operation and perform feature scoring and blocking determination on the related candidate targets across shots based on the time calculation results; Based on the results of the blocking determination, a versioned association evidence graph is constructed and conflict backtracking and splitting / reorganizing operations are performed. Extract the target state details from the versioned association evidence graph after the split and reorganization operation and generate customer access session data for output.

[0007] For receiving video stream data pushed by multiple camera terminals and performing the latest frame buffering operation, clock synchronization is completed through the network time protocol server and the single frame transmission delay parameter is calculated, and the timed-out original video frames are discarded; when the memory buffer queue is full, the first old frame is popped, the latest frame pointer at the tail of the queue is read using a mutex lock mechanism, and the new frame overwrite operation is performed by skipping the protected memory block based on the reference counting mechanism.

[0008] To extract pedestrian target features from video stream data and generate local trajectory data within a single shot, a deep learning detection network is invoked to output a set of detection box coordinates and detection confidence parameters. Image regions are extracted to generate floating-point target appearance feature vectors. The area intersection-over-union ratio (IoU) and cosine similarity parameters of historical trajectories and newly added detection boxes are calculated to construct an association cost matrix. A bipartite graph matching algorithm is invoked to perform optimal allocation calculation. The trajectory-level fusion main features are updated frame by frame, and the final additional attribute parameters are extracted based on the voting frequency of multiple frames. An independent trajectory summary package data entity is generated by combining the timestamp and the camera terminal's unique hardware identifier and converted into a continuous byte sequence for push.

[0009] To read the spatial three-dimensional relationship network of the monitored area and perform time calculation on the local trajectory data in combination with the spatial three-dimensional relationship network, a topology graph data structure with passing nodes, dwelling nodes, and floor transition nodes is constructed. The connecting lines are transformed into directed edge entities with minimum passing threshold and topology flow probability parameters. By comparing the unique hardware identifier of the camera terminal with the node position, the time difference is calculated for the dwelling node to generate the dwell time parameter. The target passing time parameter is derived by combining the timestamp and the dwell time parameter.

[0010] The system calculates the time result of the received time calculation operation and performs feature scoring and blocking judgment on the cross-camera related candidate targets based on the time calculation result. When the target passage time parameter is less than the minimum passage threshold, a hard rule blocking operation is triggered. The system calculates the appearance comprehensive score by combining the main appearance feature similarity parameter generated by the dot product calculation with the attribute reward value or attribute penalty value generated by the comparison attribute label. The system also obtains the rearrangement correction score by combining the topology flow direction probability parameter. The system discards the matching ambiguity results by comparing the score difference between the best and second-best matches. The system runs the continuous trajectory hit state machine and outputs the confirmed related target when the frequency value reaches the preset confirmation number threshold.

[0011] Based on the results of the blocking determination, a versioned association evidence graph is constructed, and conflict backtracking and splitting / reorganization operations are performed. The trajectory summary packet is mapped to graph vertex entities, and directed edge entities with confidence parameters are established. When the graph structure is updated, the global version number is automatically incremented, and a snapshot of the graph structure state is recorded. When the time interval parameters of the newly accessed time intervals intersect with the time interval parameters of other graph vertex entities in the connected subgraphs, and the spatial nodes are not connected, a spatial mutual exclusion alarm is triggered. The nearest common ancestor algorithm is called to address the common historical ancestor node, and the target directed edge entity data index corresponding to the minimum confidence parameter in the branch connected path is erased. The corrected graph structure is converted into an undirected graph topology matrix, and the graph connected component algorithm is called to split it into independent connected subgraphs. The connected subgraph with the smallest timestamp value is selected to retain the original global target identity code, and a new identity code is assigned to the other connected subgraphs.

[0012] For each versioned association evidence graph after splitting and reorganizing, the target state details are extracted and customer visit session data is generated and output. The earliest occurrence timestamp with the smallest value and the latest departure timestamp with the largest value in the complete connected subgraph are extracted to calculate the total visit dwell time. Passage nodes and floor transition nodes are removed, and the time difference of dwell nodes is summarized to generate a store preference visit sequence. The global identity code, final attached attribute parameters, total visit dwell time and store preference visit sequence are packaged and merged to output a structured customer visit session data entity.

[0013] This invention provides a method for constructing cross-camera access sessions based on semantic topology and evidence chain rollback. It has the following beneficial effects: 1. This invention uses a network time protocol server to synchronize the clock and calculate the single-frame transmission delay parameter to discard timed-out video frames. It also combines the old frame popping operation of the memory buffer queue to limit the accumulation of delay. At the same time, it uses a mutex lock and reference counting mechanism to read the memory address area instead of copying the entire image data, which prevents read and write conflicts when multiple video streams are accessed concurrently and reduces the data transmission overhead between modules.

[0014] 2. This invention constructs a spatial three-dimensional relationship network with passage nodes, dwell nodes, and floor transition nodes, and derives the minimum passage threshold by combining the shortest distance of node transfer and walking speed. When the target passage time parameter is less than the minimum passage threshold or when non-connected nodes are concurrently connected, a hard rule blocking operation is triggered and subsequent similarity calculation is terminated. Spatiotemporal constraints are used to filter out matching errors caused by single visual features, reducing the ineffective consumption of system hardware computing resources.

[0015] 3. This invention records target matching status snapshots by constructing a versioned association evidence graph that increments with the version number. When a spatial mutual exclusion alarm is triggered, the nearest common ancestor algorithm is invoked to trace historical ancestor nodes and erase the directed edge entity data index with the smallest confidence parameter in the branch connected path. Combined with the graph connected component algorithm, the contaminated graph structure is split into mutually independent connected subgraphs and the global identity code is reassigned based on the earliest occurrence timestamp. This provides a state rollback and data splitting and reorganization error correction mechanism when spatial logic errors occur in cross-camera tracking. Attached Figure Description

[0016] Figure 1 This is a system framework diagram of the present invention; Figure 2 This is a flowchart of the method of the present invention; Figure 3 This is a flowchart illustrating step S10 of the present invention; Figure 4 This is a flowchart illustrating step S20 of the present invention; Figure 5 This is a flowchart illustrating step S30 of the present invention; Figure 6 This is a flowchart illustrating step S40 of the present invention; Figure 7 This is a flowchart illustrating step S50 of the present invention; Figure 8 This is a flowchart illustrating step S60 of the present invention; Figure 9 This is a comparison and verification chart showing the long-term accuracy of cross-lens tracking in this invention. Detailed Implementation

[0017] The technical solutions in 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 embodiments of the present invention, and not all embodiments. 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.

[0018] See attached document Figure 1 This invention provides a cross-camera access session construction system based on semantic topology and evidence chain rollback, including multiple camera terminals distributed in the monitoring area, edge computing nodes that establish data transmission links with the multiple camera terminals, and a central processing server that establishes network connections with the edge computing nodes. The multiple camera terminals continuously collect video stream data of the monitoring area and push the video stream data to the edge computing nodes in real time. The edge computing nodes carry the core logic operation process and synchronize the final generated session result data to the central processing server for storage.

[0019] The edge computing node integrates a video access caching module, a local trajectory construction module, a semantic topology calculation module, an evidence evaluation and judgment module, an evidence graph rollback module, and a session output module. The video access caching module receives video stream data pushed by multiple camera terminals and performs the latest frame caching operation. The local trajectory construction module extracts pedestrian target features from the video stream data and generates local trajectory data within independent shots. The semantic topology calculation module reads the spatial three-dimensional relationship network of the monitored area and performs time calculation operation on the local trajectory data in combination with the spatial three-dimensional relationship network. The evidence evaluation and judgment module receives the time calculation results output by the semantic topology calculation module and performs feature scoring and blocking judgment on the cross-shot related candidate targets based on the time calculation results; the evidence graph rollback module constructs a versioned related evidence graph based on the judgment results output by the evidence evaluation and judgment module and performs conflict backtracking and splitting and reorganizing operations; the session output module extracts the target status details from the split and reorganized versioned related evidence graph and generates customer access session data for output.

[0020] The central processing server receives customer access session data pushed by the session output module and performs persistent storage operations on the customer access session data; external business terminals connect to the central processing server and retrieve detailed movement data and status records of targets across cameras within the monitoring area.

[0021] See attached document Figure 2 This invention provides a method for constructing cross-camera access sessions based on semantic topology and evidence chain rollback, comprising the following steps: S10: Receive video stream data pushed by multiple camera terminals and perform the latest frame buffering operation; S20, extract pedestrian target features from video stream data and generate local trajectory data within a single shot; S30: Read the spatial three-dimensional relationship network of the monitored area and perform time calculation operation on the local trajectory data in combination with the spatial three-dimensional relationship network; S40, receive the time calculation result output by the time calculation operation and perform feature scoring and blocking determination on the cross-shot related candidate targets based on the time calculation result; S50, Based on the result of the blocking determination, construct a versioned association evidence graph and perform conflict backtracking and splitting / reorganizing operations; S60: Extract target state details from the versioned association evidence graph after the split and reorganization operation and generate customer access session data for output.

[0022] The video access caching module reads video frames from multiple camera terminals at a preset frequency and pushes the video frames into a memory buffer queue. The local trajectory construction module obtains video frames from the memory buffer queue and calls a deep learning detection network to identify the coordinates of pedestrian targets within the video frames. The extraction step performs a transformation operation on the pixels of the image region corresponding to the pedestrian target coordinates to obtain the target appearance features. The intersection-union parameter, combined with the target appearance features, is applied to the detection results of consecutive video frames to form local trajectory data. The smoothing calculation process processes the local trajectory data to generate a trajectory summary packet and sends the trajectory summary packet to the semantic topology solution module.

[0023] The semantic topology solution module receives the trajectory summary packet and locates the spatial node type corresponding to the local trajectory data. The time solution step determines the target dwelling status based on the spatial node type and extracts the dwelling time from the total duration to obtain the target passage time parameter. The evidence evaluation and judgment module receives the target passage time parameter and compares it with the minimum passage threshold in the spatial network parameters. When the target passage time parameter is less than the minimum passage threshold, a hard rule blocking operation is triggered. When the target passage time parameter is greater than or equal to the minimum passage threshold, the appearance comprehensive score of the associated candidate target is calculated and the relevant association logic is triggered.

[0024] The evidence graph rollback module reads the overall appearance score and establishes a versioned association evidence graph with vertices as trajectory summary packets and directed edges as candidate relationships. When the newly generated trajectory summary packet causes spatial concurrency mutual exclusion, the conflict localization mechanism backtracks the versioned association evidence graph and disconnects the historical association edges that caused the conflict. The graph connectivity component algorithm receives the graph structure after disconnecting the historical association edges and splits it into multiple connected subgraphs. The session output module traverses the node data in the connected subgraphs to generate customer access session data with path information and sends the customer access session data to the central processing server.

[0025] The specific technical details of the cross-camera access session construction method will be explained in detail below.

[0026] See attached document Figure 3 The S10 step includes the following sub-steps: S101, a Network Time Protocol (NTP) server is deployed within the edge computing node. When multiple camera terminals establish a data transmission link, they synchronize their global clock with the edge computing node via NTP to ensure that the subsequently acquired raw timestamps and system timestamps are on the same absolute time reference plane. After clock synchronization is completed, the video access caching module initiates a NTP connection request within the data receiving thread corresponding to each camera terminal. After acquiring the video stream data, it calls the hardware decoder to decode the video stream data, outputting a continuous set of raw video frames. Each raw video frame includes a system timestamp generated by the hardware decoder and a raw timestamp assigned by the camera terminal during encoding.

[0027] Regarding the connection mechanism of network streaming media protocols, those skilled in the art can call the corresponding underlying interface according to the actual chip platform. Network streaming media parsing is a well-known technology in this field and will not be described in detail here.

[0028] S102, extract the system timestamp and original timestamp attached to the original video frame, and calculate the time difference between the system timestamp and the original timestamp to obtain the single-frame transmission delay parameter. To prevent network jitter from causing the accumulation of outdated video frames, the system defines a maximum allowable delay threshold. For original video frames whose single-frame transmission delay parameter exceeds the maximum allowable delay threshold, the video access buffer module triggers an active frame dropping mechanism, directly discarding the timed-out original video frame and waiting for the next frame to arrive.

[0029] S103: Construct a memory buffer queue and perform the latest frame buffering operation. The capacity of the memory buffer queue is set to a fixed value. When the original video frame passes the latency detection, the video access buffer module pushes the original video frame to the end of the memory buffer queue. When the memory buffer queue is full, a newly arrived original video frame will trigger the popping of the old video frame at the head of the queue. Regardless of changes in the processing rate of the downstream local trajectory construction module, the memory buffer queue always remains in a full-load replacement state and only retains the most recently arrived original video frame, thereby breaking the latency accumulation chain caused by multi-channel concurrency.

[0030] In step S104, when the local trajectory construction module retrieves video frames from the memory buffer queue, it uses a mutex lock mechanism to read the latest frame pointer at the tail of the memory buffer queue. To avoid data pollution caused by concurrent read / write conflicts, the memory buffer queue uses a reference counting mechanism for memory lifecycle management. When the local trajectory construction module completes the video frame reading operation by directly accessing the memory address region corresponding to the pointer, the reference count of the corresponding memory block is incremented by one; when the video access cache module performs a new frame overwrite operation, it forcibly skips protected memory blocks whose reference count is not zero.

[0031] By using this shared memory address method to replace the full image data copy operation, the data transmission overhead between the video access cache module and the local trajectory construction module is reduced while ensuring data security.

[0032] For the scheduling logic of the shared memory lock mechanism, those skilled in the art can call the standard thread synchronization interface of the operating system to complete the functional development. Cross-thread memory reading is a well-known technology in this field and will not be described in detail here.

[0033] See attached document Figure 4 The S20 step includes the following sub-steps: S201, the local trajectory construction module calls the deep learning detection network to perform forward inference calculations on the video frame, outputting the set of detection box coordinates of pedestrian targets within the video frame and the corresponding detection confidence parameters. For the network structure and forward inference process of the deep learning detection network, those skilled in the art can use a general object detection algorithm model to complete the deployment. Image object detection is a well-known technology in this field and will not be elaborated further here.

[0034] S202, the extraction step crops the corresponding image region from the video frame based on the set of detection box coordinates. The local trajectory construction module inputs the image region into the feature extraction network model to perform matrix convolution operations, generating a multi-dimensional floating-point target appearance feature vector. The feature extraction network model adopts a convolutional neural network structure pre-trained using a large-scale pedestrian dataset, and the extraction step converts the image pixel matrix into high-dimensional vector data representing clothing color and texture.

[0035] S203, the local trajectory construction module performs a quality assessment on the detection box coordinate set. The quality assessment process compares the pixel width and height of the detection box coordinate set with a preset size threshold, and also compares the detection confidence parameter with a preset confidence threshold. The local trajectory construction module removes detection box coordinate sets whose pixel width and height are lower than the preset size threshold or whose detection confidence parameter is lower than the preset confidence threshold, retaining only those that meet the size and confidence conditions for subsequent inter-frame matching. This removal operation reduces the interference of blurry targets and excessively small distant targets on subsequent tracking logic.

[0036] S204, the area intersection-over-union (AUI) parameter, combined with target appearance features, is applied to the detection results of consecutive video frames to form local trajectory data. The local trajectory construction module extracts the historical trajectory end detection boxes retained from the previous video frame and the newly added detection boxes in the current video frame, calculating the area intersection-over-union parameter between the historical trajectory end detection boxes and the newly added detection boxes. Simultaneously, the local trajectory construction module calculates the cosine similarity parameter between the target appearance feature vector corresponding to the historical trajectory and the target appearance feature vector corresponding to the current video frame. The system uses the area intersection-over-union parameter and the cosine similarity parameter to construct an association cost matrix. The local trajectory construction module calls a bipartite graph matching algorithm to perform optimal allocation calculation on the association cost matrix, completing the pairing and connection action between the historical trajectory and the newly added detection boxes in the current video frame, continuously updating and generating local trajectory data within a single shot in memory.

[0037] For the optimal allocation calculation process of the bipartite graph matching algorithm, those skilled in the art can use the Hungarian algorithm to complete the matrix solution. The optimal matching of bipartite graphs is a well-known technology in this field and will not be elaborated here.

[0038] S205, the local trajectory construction module extracts a time-ordered sequence of target appearance feature vectors from the local trajectory data. Changes in lighting or limb occlusion in a single frame can cause numerical fluctuations in the target appearance feature vectors. The smoothing calculation process accumulates the target appearance feature vectors frame by frame according to the time sequence and updates the trajectory-level fused main features. The smoothing calculation process is expressed by the following formula: ; In the formula, Representing local trajectory data in the first Trajectory-level fusion main features obtained from frame calculation; This represents the pre-defined smooth update weight coefficient; Representing local trajectory data in the first The single-frame target appearance feature vector extracted from the frame; Representing local trajectory data in the first Historical fusion master features obtained from frame calculation.

[0039] S206, the classification network model receives the image region corresponding to each frame within the local trajectory data and outputs the single-frame additional attribute classification result. The pedestrian additional attribute labels cover the target clothing color category and the target backpack status category. The local trajectory construction module builds an attribute statistics dictionary in memory, which collects and records the single-frame additional attribute classification results corresponding to all video frames. A multi-frame voting mechanism traverses the attribute statistics dictionary and calculates the cumulative frequency value of each type of label. The local trajectory construction module extracts the category label with the highest frequency value as the final additional attribute parameter of the local trajectory data. The multi-frame cumulative voting logic overcomes the interference of occasional incorrect label output by the single-frame classification network model.

[0040] For the construction of classification network models, those skilled in the art can use multi-label image classification algorithms to complete the training. Image attribute classification is a well-known technology in this field and will not be elaborated here.

[0041] S207, the local trajectory construction module traverses the frame time series corresponding to the local trajectory data, extracting the earliest appearance timestamp and the latest departure timestamp of the pedestrian target within the single lens's field of view. The program memory synchronously reads the unique hardware identifier of the camera terminal currently providing the video stream data. The earliest appearance timestamp, the latest departure timestamp, and the camera terminal's unique hardware identifier together constitute the spatiotemporal metadata set of the target movement record.

[0042] S208, the system kernel predefines a standardized data structure template with fixed field formats. The local trajectory construction module writes the trajectory-level fusion main features, final additional attribute parameters, and spatiotemporal metadata sets into the reserved positions of the data structure template according to field mapping rules, generating an independent trajectory summary package data entity. The trajectory summary package data entity discards redundant image pixel content from the original video stream data, retaining only the vector matrix and discrete character parameters representing the target's identity appearance and spatiotemporal node state.

[0043] In step S209, the local trajectory construction module calls the data serialization interface to perform format conversion on the trajectory summary packet data entity, transforming the structured object in runtime memory into a continuous byte sequence suitable for network protocol transmission. The processed continuous byte sequence is then pushed to the corresponding listening port of the semantic topology calculation module via the message middleware channel. The semantic topology calculation module receives the continuous byte sequence and calls the deserialization interface to reconstruct the complete trajectory summary packet. Sending the trajectory summary packet to the semantic topology calculation module replaces the transmission of original video frames or large image files, thus controlling the data throughput between modules within the edge computing node.

[0044] For the data push mechanism of message middleware nodes, those skilled in the art can use a general message queue system for deployment. Cross-process message distribution is a well-known technology in this field and will not be elaborated here.

[0045] See attached document Figure 5 The S30 step includes the following sub-steps: S301, the semantic topology calculation module loads the topology graph data structure of the monitored area into the runtime memory. Vertices within the topology graph data structure correspond to logical regions in space. The monitoring views of multiple camera terminals are mapped to vertices based on the spatial coordinate system. The system supports mapping a single camera's view to multiple independent graph vertices, and also supports jointly mapping and stitching the monitoring views of multiple camera terminals to a single graph vertex. The installation location coordinates of the multiple camera terminals inside the building are converted into a set of discrete points in a three-dimensional coordinate system. When there are overlapping areas between adjacent monitoring views or when there are walkable connecting passages, the semantic topology calculation module generates connecting lines between the corresponding two vertices, thus forming a basic mesh topology base map.

[0046] S302, the system assigns corresponding semantic labels to vertices in the topology map data structure according to the business division drawing of the monitored area. Vertices corresponding to areas where people only move through, such as corridors and entrances / exits, are marked as passage nodes; vertices corresponding to areas where people are likely to stay for a long time, such as inside shops and rest areas, are marked as dwell nodes; vertices corresponding to areas involving cross-floor movement, such as escalators and elevators, are marked as floor transition nodes. Locating the spatial node type corresponding to the local trajectory data helps the system trigger independent branch logic in subsequent time-based determination steps.

[0047] S303, the semantic topology solving module, assigns multi-dimensional spatial network parameters to the connecting lines within the mesh topology base map, transforming the connecting lines into directed edge entities with directional attributes. The spatial network parameters encompass the actual walking distance between any two connected nodes and the minimum passage threshold calculated based on the highest human walking speed. The semantic topology solving module reads historical movement records from the passenger flow statistics database, calculates the transfer frequency of people moving from the source node to the adjacent target node, and converts the transfer frequency into topological flow direction probability parameters attached to the directed edges. The topology graph data structure, combined with the spatial network parameters, constitutes a complete spatial three-dimensional relationship network, continuously providing edge computing nodes with benchmark data for spatial environment judgment.

[0048] S304, the semantic topology calculation module receives the trajectory summary packet sent by the local trajectory construction module and compares the unique hardware identifier of the camera terminal carried in the trajectory summary packet with the node data in the spatial three-dimensional relationship network in the running memory. The hardware comparison operation accurately maps the trajectory summary packet to the corresponding specific node position in the topology map data structure. The system kernel extracts the earliest appearance timestamp and the latest departure timestamp recorded in the trajectory summary packet and puts them into the buffered arithmetic unit to await invocation.

[0049] S305, the time calculation step determines the target's dwelling status based on the spatial node type and obtains the corresponding dwell time value. When the mapped node is marked as a dwelling node, the semantic topology calculation module calculates the time difference between the latest departure timestamp and the earliest appearance timestamp. If the time difference is greater than a preset dwell benchmark value, the system determines that a clear target dwelling status has been identified. The semantic topology calculation module records the time difference as an independent dwell time parameter. For areas marked as passage nodes and floor transition nodes, the semantic topology calculation module directly assigns a zero value to the dwell time parameter to avoid misidentification during normal walking.

[0050] S306, the time calculation step obtains the target travel time parameter through the time difference calculation formula. The semantic topology calculation module extracts the earliest appearing timestamp corresponding to the current trajectory summary packet. And the latest departure timestamp corresponding to the historical trajectory summary package And combined with the dwell time parameters obtained in S305 The following formula is used to perform the calculation: ; In the formula, The total observation time difference of the target across shots, Represents the target travel time parameter; This represents the earliest occurrence timestamp corresponding to the current trajectory summary packet; The latest departure timestamp corresponding to the historical trajectory summary package.

[0051] S307, the semantic topology calculation module writes the derived target passage time parameter into the time calculation result data packet. The time calculation result data packet is transmitted to the evidence evaluation and judgment module via the system bus. This target passage time parameter characterizes the absolute transfer time of the pedestrian target in the cross-camera space, providing benchmark data for subsequent non-connectivity blocking judgment logic executed based on the human walking speed limit.

[0052] See attached document Figure 6 The S40 step includes the following sub-steps: S401, the evidence evaluation and determination module parses the time calculation results and extracts the target travel time parameters. The system memory synchronously reads associated candidate target data from the historical record cache area. The program retrieves the connection paths between the associated candidate target's resident nodes and the corresponding nodes in the current trajectory summary packet from the spatial three-dimensional relationship network. The evidence evaluation and determination module reads the spatial network parameters corresponding to the connection paths and extracts the minimum travel threshold. The minimum travel threshold is derived from the quotient of the shortest walking distance corresponding to the connection path and the human limit walking speed parameter.

[0053] S402, the evidence evaluation and determination module executes spatial concurrency mutual exclusion and non-connectivity blocking logic. The timestamp comparison process handles the latest departure timestamp of the associated candidate target and the earliest appearance timestamp of the current trajectory summary packet. If there is a numerical overlap in the timestamp parameters and the overlap duration exceeds the preset network time drift tolerance, and there is no overlapping area in the monitoring field of view corresponding to the corresponding node, the evidence evaluation and determination module determines that a cross-floor conflict has occurred and triggers a hard rule blocking operation. The program checks the building floor identification parameters of different nodes. If the building floor identification parameters are inconsistent and a floor transition node is missing in the connection path, the evidence evaluation and determination module determines that a cross-floor conflict has occurred and triggers a hard rule blocking operation.

[0054] Meanwhile, the evidence evaluation and judgment module maintains the set of assigned identities for the current video frame. When a target in the same video frame is bound to a specific associated candidate target, the other targets in the same frame will be forcibly blocked from matching with that specific associated candidate target, thereby achieving global identity mutual exclusion within the same frame.

[0055] S403, the blocking logic unit handles the task of determining the minimum travel time threshold. The evidence evaluation and determination module compares the target travel time parameter with the minimum travel threshold in the spatial network parameters. A hard rule blocking operation is triggered when the target travel time parameter is less than the minimum threshold. Violation of the minimum travel threshold condition means that the actual travel time of the pedestrian target crossing the corresponding node is shorter than the minimum travel time threshold corresponding to the maximum speed. The evidence evaluation and determination module immediately terminates the feature similarity calculation process after triggering the hard rule blocking operation. Hardware computing resources are spared from processing false positive matching targets that violate common sense, and the blocking determination result is directly entered into the memory log for future reference.

[0056] S404, the evidence evaluation and judgment module extracts the trajectory-level fusion main features from the current trajectory summary package and simultaneously reads the historical fusion main features corresponding to the associated candidate targets within the historical record cache area. The computational logic unit performs a dot product calculation on the trajectory-level fusion main features and the historical fusion main features to generate a main appearance feature similarity parameter. The main appearance feature similarity parameter reflects the basic visual consistency of the distribution of clothing texture and color of pedestrians in different monitoring fields.

[0057] For vector cosine similarity calculation, those skilled in the art can call basic mathematical operation libraries to complete the code writing. Multidimensional vector similarity solution is a well-known technology in this field, and will not be elaborated here.

[0058] The historical record cache area stores a set of multi-feature prototypes of the target. The computational logic unit performs dot product calculations on the trajectory-level fused main feature and each feature in the multi-feature prototype set, extracting the maximum value or the Top-K average value as the main appearance feature similarity parameter. S405, the evidence evaluation and judgment module reads the final additional attribute parameters from the current trajectory summary packet and the historical additional attribute parameters corresponding to the associated candidate targets. The final additional attribute parameters include discrete labels for the target's clothing color category and the target's backpack status category. The logical judgment unit compares the consistency of the category labels between the final and historical additional attribute parameters one by one. When the category labels are completely consistent, the program assigns a positive attribute reward value to the scoring mechanism; when the category labels are contradictory, the program assigns a negative attribute penalty value to the scoring mechanism. The discrete label comparison process compensates for the judgment error of floating-point feature vectors under drastic lighting conditions.

[0059] S406, the evidence evaluation and judgment module combines the main appearance feature similarity parameter with the attribute reward value and the attribute penalty value for linear weighted calculation to generate a comprehensive appearance score for the associated candidate targets. The comprehensive appearance score is obtained by the following formula: ; In the formula, Represents the overall appearance score; The basic weight coefficients corresponding to the main appearance feature similarity parameters; This represents the calculated main appearance feature similarity parameter. This represents the sum of attribute reward values ​​accumulated when the category labels match after comparison. This represents the sum of attribute penalty values ​​accumulated when there is a contradiction in the category labels determined by comparison.

[0060] In step S407, the evidence evaluation and judgment module writes the generated comprehensive appearance score into the attribute field of the associated candidate target and arranges the associated candidate targets in descending order of score, forming a soft rule comparison list awaiting confirmation. The calculated comprehensive appearance score takes into account both the implicit texture features extracted by the deep learning network and the explicit clothing attributes that humans can understand, providing a quantitative evaluation standard for the final identification of targets across shots.

[0061] S408, the evidence evaluation and judgment module reads the overall appearance score corresponding to the associated candidate target in the soft rule comparison list and requests the topological flow probability parameter attached to the directed edge of the associated candidate target from the semantic topology solution module. The operation logic unit multiplies the overall appearance score by the topological flow probability parameter to obtain the rearrangement correction score of the associated candidate target. When the historical travel record of the corresponding path is missing in the passenger flow statistics database, the program assigns a preset non-zero basic smoothing constant to the topological flow probability parameter to avoid logical paralysis caused by the rearrangement correction score being zero during the cold start phase. The introduction of prior flow probability data of the spatial environment corrects the blindness caused by pure visual feature comparison, tending to place targets that conform to the majority of crowd movement patterns at the front of the queue. The calculation method of the rearrangement correction score is as follows: ; In the formula, This represents the rearranged and corrected scores; Represents the overall appearance score; This represents the topological flow probability parameter attached to the directed edge corresponding to the associated candidate target.

[0062] S409, the program rearranges the associated candidate targets in the soft rule comparison list according to the rearrangement correction scores in descending order. The evidence evaluation and determination module extracts the associated candidate target ranked first and the associated candidate target ranked second. The arithmetic logic unit calculates the score difference between the rearrangement correction scores of the associated candidate target ranked first and the associated candidate target ranked second. The evidence evaluation and determination module compares the score difference with a pre-set score safety margin. When the score difference is less than or equal to the score safety margin, the evidence evaluation and determination module determines that the comparison result of the current trajectory summary packet has a matching ambiguity, actively discards the best matching result of the current trajectory summary packet, and keeps the counter value of the continuous trajectory hit state machine unchanged, waiting to receive the next trajectory summary packet for re-evaluation.

[0063] In this step, the score safety margin is used to measure the advantage of the optimal matching target over the second-best matching target. The system dynamically adjusts this score safety margin based on the lighting complexity and passenger flow density parameters of the monitored area, thereby filtering out ambiguous matching states caused by features being too similar. The mechanism of extracting score differences for comparison prevents ambiguity caused by multiple candidate target scores being too close.

[0064] S410, the evidence evaluation and determination module internally loads an independently running continuous trajectory hit state machine. This state machine allocates counter resources in memory to continuously track and accumulate the frequency of successful initial target hits. When the frequency reaches a preset confirmation threshold, the continuous frame hit state machine determines that the target matching result has reached a stable state. The evidence evaluation and determination module then formally triggers the relevant association logic, outputting the initial hit target as a confirmed associated target. This state confirmation operation filters out abnormally high-scoring results caused by accidental coincidences in the angle of a single trajectory segment capture.

[0065] Simultaneously, a timeout decay timer is deployed within the consecutive frame hit state machine. When the time span for which the initial hit state of a specific target is continuously lost exceeds a preset forgetting threshold, the program automatically clears the counter value of the state machine and releases the corresponding memory resources, thereby preventing false triggering of features and memory leaks in the state machine caused by the target being out of contact for a long period of time.

[0066] For the program deployment of state machine decision logic, those skilled in the art can use finite state machine algorithms to complete the engineering implementation. Multi-state transition tracking is a well-known technology in this field and will not be elaborated here.

[0067] When local trajectory data cannot be matched with any associated candidate targets, the system triggers a delayed creation mechanism. Only after the frequency of failure to reconnect to existing targets reaches the preset number of new identity confirmations will the system request the allocation of a brand-new globally unique identity code from the system bus.

[0068] See attached document Figure 7 The S50 step includes the following sub-steps: S501, the evidence graph rollback module instantiates a directed graph data structure in memory. The program maps the received independent trajectory summary packets to graph vertex entities in the directed graph data structure. Each graph vertex entity encapsulates the trajectory-level fusion master feature generated during the local trajectory construction phase, the earliest appearance timestamp, the latest departure timestamp, and the spatial node identifier of the corresponding camera terminal. This mapping method transforms isolated trajectory fragments distributed in different monitoring fields into independent node resources in the topology network that can be computed and analyzed.

[0069] In step S502, the evidence graph rollback module reads the confirmed associated target relationship output by the evidence evaluation and judgment module, establishes a connection path between two graph vertex entities with a matching relationship, and generates directed edge entities with directional attributes. The direction of the directed edge entity is from the graph vertex entity corresponding to the historical trajectory summary packet to the graph vertex entity generated at the current time node, representing the pedestrian target's transfer process in the time dimension. Due to the irreversible unidirectional increasing characteristic of the surveillance video timeline, the generated directed edge entities strictly follow the chronological order, ensuring that the versioned associated evidence graph always maintains a directed acyclic graph in its topological structure, thus providing a definite algorithmic convergence premise and mathematical foundation for subsequent calls to the Lowest Common Ancestor algorithm. The program synchronously extracts the previously calculated rearrangement correction score and writes the rearrangement correction score as a confidence parameter into the weight field of the directed edge entity. A high confidence parameter value indicates a higher probability that the two graph vertex entities belong to the same real-world pedestrian target.

[0070] In S503, the system introduces a time-series snapshot mechanism to support potential rollback and split / reorganization operations. The evidence graph rollback module triggers a global version number increment operation every time a new vertex or directed edge entity is added to the directed graph data structure. The versioned association evidence graph is mathematically represented using a dynamic graph structure that evolves with the version number; its evolution formula is as follows: ; ; ; In the formula, A versioned association evidence diagram representing the current version number vv; This represents the set of graph vertices corresponding to the current version. This represents the set of directed edges corresponding to the current version; This represents the set of vertices of the previous version of the graph recorded in the historical snapshot; This represents the set of directed edges that represent the previous version recorded in the historical snapshot. The graph vertex entity represents the newly accessed trajectory summary packet. This represents a newly added directed edge entity generated based on the confirmed associated target relationship; Graph vertex entities representing historical existence; This represents the confidence parameter written into the weight field of the directed edge entity.

[0071] In step S504, the program binds and stores the currently generated auto-incrementing version number with the newly added graph vertex entity or directed edge entity, and synchronously records a snapshot of the graph structure state before this update operation in the in-memory database. By recording directed edges with confidence parameters and graph vertices with auto-incrementing version numbers, the system constructs a versioned association evidence graph with historical state tracing capabilities.

[0072] For the persistence and snapshot mechanism of graph data structures in memory, those skilled in the art can use a general graph database to complete the system construction. The multi-version storage and retrieval of graph data are well known technologies in this field and will not be elaborated here.

[0073] S505, the evidence graph rollback module monitors the update status of each versioned associated evidence graph. When a graph vertex entity corresponding to a newly added trajectory summary packet is connected to an existing connected subgraph via a newly added directed edge, the system extracts the spatiotemporal metadata set attached to all graph vertex entities in the connected subgraph. The program extracts the time interval parameters corresponding to the newly added graph vertex entity and also extracts the time interval parameters of the remaining graph vertex entities in the connected subgraph.

[0074] The program calculates whether there is a numerical intersection between the time intervals of any two graph vertex entities. If there is an intersection between the time intervals, and the spatial nodes corresponding to the two graph vertex entities are not connected and there is no overlap in the monitoring field of view, the evidence graph rollback module determines that the target concurrently appears in the non-connected spatial nodes, then triggers a spatial mutual exclusion alarm, and marks the current connected subgraph as a contaminated graph structure.

[0075] S506: After triggering the spatial mutual exclusion alarm, the evidence graph rollback module locks the newly added graph vertex entity that caused the conflict, as well as the historical graph vertex entity that caused the temporal discrepancy. The addressing logic unit calls the graph traversal algorithm within the contaminated graph structure, specifically the nearest common ancestor algorithm, to trace back and find the historical ancestor node that the two conflicting nodes both depend on. The program extracts the branch connected paths from this historical ancestor node to the two conflicting nodes, extracts all directed edge entities contained in these two branch connected paths, and merges them in runtime memory to construct a candidate set of historical associated edges.

[0076] For graph traversal search operations, those skilled in the art can use depth-first search or breadth-first search algorithms to complete the path finding. Graph structure node traversal is a well-known technology in this field and will not be described in detail here.

[0077] S507, the evidence graph rollback module traverses the historical candidate set of related edges, sequentially reading the confidence parameter stored in the entity weight field of each directed edge. Visual appearance comparison has inherent errors due to lighting and occlusion. The system, based on a greedy strategy, assumes that the association operation with the lowest confidence parameter in the historical record is the root cause of the current spatial logical contradiction. The comparison operation unit performs a comparison and retrieval operation on the values ​​within the historical candidate set of related edges, accurately locating the target directed edge entity whose confidence parameter reaches a minimum value.

[0078] S508, after identifying the target directed edge entity with the smallest confidence parameter, the evidence graph rollback module performs the action of disconnecting historical associated edges. The program directly erases the data index of the target directed edge entity from the current set of directed edges in the versioned associated evidence graph, forcibly severing the context propagation chain that caused the spatial logic fallacy.

[0079] To prevent accidental severing caused by complex ring topology, the program verifies whether there are still other connected paths between the two nodes that caused the conflict after erasure. If the verification result shows that the graph structure where the two conflicting nodes are located remains connected after a single erasure operation, the program repeatedly executes the action of finding the target directed edge with the minimum confidence and erasing it, until the contaminated graph structure where the two conflicting nodes that caused spatial mutual exclusion are located is completely broken into at least two independent graph clusters that do not intersect.

[0080] If multiple directed edge entities with the same confidence parameter exist in the historical associated edge candidate set and all reach a minimum value, the evidence graph rollback module further compares the timestamp spans corresponding to these directed edge entities and prioritizes the target directed edge entity with the latest time series occurrence for erasure, ensuring the uniqueness of the local graph state correction mechanism. The mathematical expression of the edge culling operation is as follows: ; ; In the formula, This represents the set of directed edges corrected after removing erroneous associated edges; This represents the set of directed edges in the current version when a space mutual exclusion alert is triggered; The target directed edge entity with the smallest confidence parameter in the candidate set of historical associated edges; This represents the set of directed edges contained in the branch connected paths from the common historical ancestor node to the two conflicting nodes. It represents the confidence parameter corresponding to a specific directed edge entity in the set of connected paths.

[0081] S509, the evidence graph rollback module extracts the corrected set of directed edges and all graph vertices within the contaminated graph structure. To accurately identify connectivity, the logic computation unit ignores the direction attribute of directed edge entities and converts the local directed graph structure into an undirected graph topology matrix. Eliminating topological direction restrictions ensures that the program traverses all vertices that remain connected through other valid paths, preventing normally associated node sequences from being accidentally isolated.

[0082] S510, the evidence graph rollback module uses the graph connectivity component algorithm to solve the undirected graph topology matrix, outputting several independent sets of maximally connected subgraphs. Since the preceding steps erased the target directed edge entity with the lowest confidence, the originally connected single network topology will inevitably break into at least two disjoint graph clusters. The mathematical expression of the splitting and recombining calculation process is as follows: ; The following constraints must be satisfied during the splitting process: For any ,exist .

[0083] In the formula, This represents the contaminated graph structure after the edge removal operation has been performed. Represents the set of all graph vertices contained in the contaminated graph structure; This represents the set of directed edges corrected after removing erroneous associated edges; Represents the first generation generated by splitting and reorganizing Each independent connected subgraph; Representing the The set of graph vertex entities corresponding to each independent connected subgraph; Representing the The set of directed edge entities corresponding to each independent connected subgraph.

[0084] For the specific calculation process of the graph connectivity component algorithm, those skilled in the art can use the disjoint-set data structure or the connected graph traversal algorithm to complete the deployment. Undirected graph connectivity component analysis is a well-known technology in this field and will not be elaborated here.

[0085] In step S511, the evidence graph rollback module traverses the generated set of independent connected subgraphs and checks the earliest occurrence timestamp parameter contained in each independent connected subgraph. The system sets the trajectory chain with the earliest occurrence time sequence to have priority in identity inheritance. The comparison operator selects the independent connected subgraph with the smallest earliest occurrence timestamp value, allowing it to fully inherit the original global target identity code. For the remaining separated independent connected subgraphs, the evidence graph rollback module requests a new globally unique identity code from the system bus and writes the new identity data into the attribute field of the corresponding graph vertex entity.

[0086] In step S512, after the identity reassignment is completed, the evidence graph rollback module merges the reassembled and independent connected subgraphs into the latest snapshot of the versioned associated evidence graph, thereby overwriting the conflict node data of the old version. Simultaneously, the underlying database releases the memory space occupied by the contaminated graph structure. Thus, without manual intervention, the system automatically cuts off early visual false positive matches based on posterior spatial mutual exclusion cues, restoring the cross-camera target tracking network to a normal state that conforms to the fundamental laws of space.

[0087] See attached document Figure 8 The S60 step includes the following sub-steps: S601, the session output module imports a complete connected subgraph with a unified global identity code into the runtime memory. The program traverses all graph vertex entities within the connected subgraph, extracting the spatiotemporal metadata set carried within each vertex entity and the corresponding bound spatial node identifier. The query engine synchronously calls the spatial three-dimensional relationship network to obtain the semantic labels of the regions where the graph vertex entities are located, distinguishing the passage nodes and dwell nodes experienced by the customer in the space.

[0088] S602, the data aggregation unit performs extreme value search calculations on timestamp parameters belonging to the same global identity code. The session output module compares the time parameters recorded by all graph vertices within the connected subgraph, selecting the earliest occurrence timestamp with the smallest value as the initial time node of the entire access journey, and selecting the latest departure timestamp with the largest value as the termination time node of the access journey. The journey span calculation logic uses the following formula: ; In the formula, This represents the calculated total customer visit duration. The latest departure timestamp represents the largest value among the time parameters recorded by all graph vertices in a connected subgraph. The earliest occurrence timestamp with the smallest value among all time parameters recorded by the vertex entities in the connected subgraph. The overall access and dwell time objectively reflects the overall lifecycle of a single activity of a target within the monitored area.

[0089] S603, the session output module filters and removes passable nodes and floor transition nodes in the connected subgraph based on semantic tags, retaining graph vertices marked as dwell nodes. The logic operation unit summarizes the accumulated time difference between customers within each dwell node and generates the customer's store preference access sequence in memory. The preference access sequence records in detail the order in which customers enter a specific store and the specific dwell time in each independent area.

[0090] For sorting and filtering operations on data sequences, those skilled in the art can call basic data set processing functions to complete the program writing. Set filtering and attribute sorting are well-known technologies in this field and will not be described in detail here.

[0091] S604, the formatted encapsulation logic packages and merges the global identity code, final attached attribute parameters, overall visit duration, and store preference visit sequence according to a preset data structure protocol. The session output module outputs structured customer visit session data entities. The structured encapsulation operation removes the complex underlying visual feature vectors and intermediate graph connectivity parameters, providing external systems with highly condensed and easily parsed commercial behavior data packets.

[0092] Specific application examples: Application scenarios and hardware framework settings: This application example is deployed inside a large commercial complex. The system includes three camera terminals: Camera A is deployed at the south entrance on the first floor, and its corresponding spatial node is defined as a passage node; Camera B is deployed at a brand clothing store on the first floor, and its corresponding spatial node is defined as a dwell node; Camera C is deployed at the north escalator entrance on the second floor, and its corresponding spatial node is defined as a floor transition node.

[0093] The system is configured with edge computing nodes, which are industrial control computers based on ARM architecture and equipped with NPUs for neural network inference, and connected to the central processing server via a local area network.

[0094] Status entry and feature smoothing: At 10:00:00, a group of people entered the field of view of camera A. These people were wearing red shirts and carrying black backpacks. After the video input caching module acquired video frames, the local trajectory construction module extracted the target's appearance features. To overcome network inference jitter caused by lighting conditions, the program performed a smoothing calculation process.

[0095] Set smooth update weight coefficients In the first Frame, using the target appearance feature vector of a single frame. Taking one feature dimension as an example, the value of this feature dimension is 0.90, which is the historical fusion main feature. The corresponding feature dimension value is 0.85. The two are then fused according to the aforementioned smoothing calculation formula: ; Substitute the data: Finally, a trajectory summary packet carrying the earliest occurrence timestamp (10:00:00) is generated and pushed into memory.

[0096] Topology solving and soft rule scoring: At 10:05:00, the same pedestrian entered camera B. The semantic topology solving module determined its spatial node type to be a stationary node.

[0097] The evidence evaluation and judgment module retrieves related candidate targets from historical records, i.e., targets whose local trajectory data were previously generated in camera A. It then calculates their main appearance feature similarity parameters. Since the target remains the red shirt and black backpack, and the category labels are completely consistent, an attribute bonus value is assigned. Attribute penalty value Basic weighting coefficient .

[0098] Calculate the overall appearance score: ; Substitute the data: .

[0099] Read the passenger flow statistics database to obtain the topological flow probability parameters from node A to node B. .

[0100] Calculate the rearranged corrected score: ; Substitute the data: .

[0101] The score exceeds the safety margin, so the system connects A and B, generates a directed edge entity from A to B in the versioned association evidence graph, and writes 0.6681 as the confidence parameter.

[0102] Spatial mutual exclusion triggering and evidence graph rollback: At 10:05:10, another pedestrian dressed very similarly (red shirt and black bag) appeared in the field of view of camera C. A purely visual deep learning model could easily misidentify this person as the same target.

[0103] At this point, the time calculation step begins. The earliest occurrence timestamp of the current trajectory summary packet. If we use 00:00:00 of the current day as the time conversion benchmark, then it corresponds to 36310 seconds. The latest departure timestamp of the associated candidate target at camera B. This corresponds to 36305 seconds. Since B is a stationary node, the target is still within the monitoring range, and the dwell time parameter is stripped. .

[0104] Calculate the target travel time parameters: ; Substitute the data: Second.

[0105] The system reads the spatial three-dimensional relationship network, and combines the shortest walking distance from the first-floor shop node B to the second-floor escalator node C with the human limit walking speed to set the minimum passage threshold to 120 seconds.

[0106] Since the target passage time parameter (5 seconds) is less than the minimum passage threshold (120 seconds), the system immediately triggers a hard rule blocking operation and throws a spatial mutual exclusion alarm. The current graph structure is marked as a contaminated graph structure.

[0107] The evidence graph rollback module intervenes, invoking the nearest common ancestor algorithm to locate the common historical ancestor node (node ​​A) that caused the conflict. Tracing the candidate set of historical associated edges, comparison reveals directed edge entities on the paths A->B and A->C. Upon retrieval, A->C, due to its crossing of floors and extremely short time, has a minimal confidence parameter for visually forced association.

[0108] The program performs an erase operation: ; The system forcibly disconnects the connection from A to C, applies the graph connectivity component algorithm to the undirected graph topology matrix, and splits the contaminated network into two sets of independent, disjoint connected subgraphs. The target of node C is assigned a new, globally unique identifier.

[0109] Session output: At 10:20:00, a genuine customer leaves shop B. The session output module aggregates the data and extracts the earliest timestamp. =10:00:00, latest departure timestamp =10:20:00.

[0110] Calculate the total customer visit duration: ; Substitute the data: =1200 seconds (20 minutes). The system removes the passage node A, extracts the time difference generated by the dwell node B, generates a store visit sequence containing the clothing store node identifier and the corresponding 15-minute dwell time, and finally outputs the structured customer visit session data to the central processing server.

[0111] Experimental verification and effect comparison: To verify the resource-saving rate and accuracy of the evidence chain rollback and topology blocking mechanism in this invention under long-term tracking scenarios, a continuous 6-hour comparative experiment was conducted in a real shopping mall environment containing 30 camera terminals. The comparison object was the traditional pure visual Re-ID association method (which only relies on feature comparison and does not include topology verification and rollback reconstruction).

[0112] The conclusions are as follows: Reference Appendix Figure 9 In the figure, the horizontal axis represents the system runtime, and the vertical axis represents the global identity tracking accuracy. Due to feature confusion caused by changes in lighting and dense crowds, the accuracy of traditional purely visual association methods has been declining over time, dropping from 92.5% to 51.5%.

[0113] During operation, if a erroneous association leads to a spatial logic error, the evidence graph rollback module can promptly trigger a spatial mutual exclusion alarm and perform a splitting and reorganization operation, quickly severing the erroneous historical association chain. This mechanism enables the system to have a posteriori error correction capability, thereby ensuring that the system's tracking accuracy remains stable at over 91% during 6 hours of continuous high-concurrency operation, demonstrating the robustness and technical effectiveness of this invention in complex engineering environments.

Claims

1. A method for constructing cross-camera access sessions based on semantic topology and evidence chain rollback, characterized in that, include: Cache video stream data pushed by multiple camera terminals to obtain video frames; Based on the video frames, pedestrian target features are extracted and local trajectory data is generated; The spatial three-dimensional relationship network with semantic labels, spatial node types, and minimum passage thresholds is combined with the local trajectory data to perform time calculation, and associated candidate targets in historical records are retrieved. Based on the time calculation results, the associated candidate targets are blocked and their features are scored to obtain the confirmed associated targets; Based on the confirmed associated targets, directed edges with confidence parameters are established to update the versioned associated evidence graph, spatiotemporal conflicts are detected and historical associated edges are disconnected, and the graph structure is split and reorganized. Extract target state details from the split and reorganized versioned association evidence graph and generate customer access session data.

2. The method for constructing cross-camera access sessions based on semantic topology and evidence chain rollback according to claim 1, characterized in that, The method of caching video stream data pushed by multiple camera terminals to obtain video frames includes: The absolute time reference plane is unified by global clock synchronization with the computing device performing the cache operation through the Network Time Protocol; Extract the system timestamp and the original timestamp attached to the video frame; The single-frame transmission delay parameter is obtained by calculating the time difference between the system timestamp and the original timestamp; Video frames that do not exceed the maximum allowed delay threshold are pushed into memory blocks of the memory buffer queue; When reading the video frame from the buffer queue for subsequent processing, the reference count of the memory block corresponding to the video frame is incremented by one; When performing a new frame overwrite, protected memory blocks with non-zero reference counts are forcibly skipped.

3. The method for constructing cross-camera access sessions based on semantic topology and evidence chain rollback according to claim 1, characterized in that, The generated local trajectory data includes: A preset detection network is invoked to perform forward inference on the video frames to obtain new detection boxes; The image region is cropped based on the newly added detection box and input into a preset feature extraction network to generate the target appearance feature vector; The processing results of historical frames are retained in memory. When historical trajectories exist, the detection boxes at the end of the historical trajectory and the corresponding historical target appearance feature vectors are extracted from memory. The area intersection-union ratio (IUU) of the detection boxes at the end of the historical trajectory and the corresponding historical target appearance feature vectors with the newly added detection boxes, as well as the cosine similarity parameter with the target appearance feature vectors, are calculated respectively. The association cost matrix is ​​constructed using the area intersection-union ratio parameter and the cosine similarity parameter, and the optimal allocation is performed to generate local trajectory data.

4. The method for constructing cross-camera access sessions based on semantic topology and evidence chain rollback according to claim 3, characterized in that, After generating local trajectory data, the following is included: Accumulate the target appearance feature vector in chronological order, and smoothly update the trajectory-level fused main features frame by frame; The image region is input into a classification network model, and the category label with the highest frequency value is extracted as the final additional attribute parameter. The trajectory-level fusion main features, the final additional attribute parameters, and the corresponding time series information are written into a trajectory summary packet, and the trajectory summary packet is converted into a continuous byte sequence as input for subsequent time calculation.

5. The method for constructing cross-camera access sessions based on semantic topology and evidence chain rollback according to claim 4, characterized in that, The time calculation includes: Load the topology graph data structure corresponding to the spatial three-dimensional relationship network. The topology graph data structure includes spatial nodes and directed edges connecting adjacent spatial nodes, and configures a minimum passage threshold and topology flow probability parameters for each directed edge. Extract the unique hardware identifier of the camera terminal that provides the video stream data to map the current spatial node and determine the node type, the node type including passing nodes and stationary nodes; Based on the continuous video frame time series corresponding to the local trajectory data, the earliest occurrence timestamp and the latest departure timestamp corresponding to the current trajectory summary package are extracted. Based on the node type and the duration of the local trajectory within the monitoring field of view corresponding to the current spatial node, it is determined whether dwelling has occurred, and the dwelling duration parameter is obtained; The target passage time parameter is calculated by combining the earliest occurrence timestamp corresponding to the current trajectory summary packet, the latest departure timestamp corresponding to the historical trajectory summary packet in the historical record, and the dwell time parameter. Write the derived target travel time parameter into the time calculation result data packet.

6. The method for constructing cross-camera access sessions based on semantic topology and evidence chain rollback according to claim 5, characterized in that, The blocking determination includes: The connection paths between the associated candidate target resident nodes and the corresponding nodes of the current trajectory summary package are obtained by retrieving the spatial three-dimensional relationship network. Read the spatial network parameters corresponding to the connection path and extract the minimum passage threshold; The latest departure timestamp of the associated candidate target is compared with the earliest appearance timestamp of the current trajectory summary packet. If there is a numerical overlap range in the timestamp parameters and the overlap duration is greater than the preset network time drift tolerance, and there is no overlapping area in the monitoring field of view corresponding to the corresponding node, a hard rule blocking operation is triggered. The target passage time parameter is compared with the minimum passage threshold, and the hard rule blocking operation is triggered when the target passage time parameter is less than the minimum passage threshold.

7. The method for constructing cross-camera access sessions based on semantic topology and evidence chain rollback according to claim 6, characterized in that, The feature scoring of associated candidate targets includes: Obtain the historical fusion main features and historical additional attribute parameters of the associated candidate targets; Extract the trajectory-level fusion main features and the final additional attribute parameters from the local trajectory data; The dot product of the trajectory-level fused main feature and the historical fused main feature is calculated to obtain the main appearance feature similarity parameter. Compare the final additional attribute parameters with the historical additional attribute parameters to generate an attribute reward value or an attribute penalty value; The main appearance feature similarity parameter is weighted and calculated with attribute reward value and attribute penalty value to obtain the overall appearance score; The overall appearance score is combined with the corresponding topological flow probability parameter to obtain the rearrangement correction score.

8. The method for constructing cross-camera access sessions based on semantic topology and evidence chain rollback according to claim 7, characterized in that, After obtaining the rearranged and corrected scores, the following are included: The associated candidate targets are arranged according to the rearranged correction scores; When there are at least two associated candidate targets, the score difference between the first and second associated candidate targets is calculated. If the score difference is not greater than a preset score safety margin, the matching result is discarded. When the score difference is greater than the score safety margin, the first candidate target is taken as the initial hit target; For the continuous update status of the same local trajectory data, the number of consecutive hits on the same initial hit target is accumulated. When the number of confirmations reaches the confirmation threshold, the confirmed associated target is output, and the corresponding rearrangement correction score is used as the confidence parameter. Otherwise, when the time span of consecutive loss in the initial hit state exceeds the preset forgetting threshold, the counter value is reset to zero.

9. The method for constructing cross-camera access sessions based on semantic topology and evidence chain rollback according to claim 8, characterized in that, The step of establishing directed edges with confidence parameters based on the confirmed associated targets to update the versioned association evidence graph, detecting spatiotemporal conflicts and disconnecting historical association edges, and disassembling and reorganizing the graph structure includes: Based on the video frame time corresponding to the local trajectory data, time interval parameters are extracted and mapped to the current spatial node in the spatial three-dimensional relationship network to construct a graph vertex entity. Directed edge entities with the confidence parameters are established according to the confirmed associated targets in chronological order. When a new directed edge entity is added, a global version number auto-increment operation is triggered to generate a new version. The directed edge entity and the graph vertex entity are connected to form a connected subgraph, and a snapshot of the graph structure state before this update operation is recorded in the memory database simultaneously. When the time intervals of any two graph vertex entities intersect, and the corresponding spatial nodes are not connected and there is no overlap in the monitoring field of view, a spatial mutual exclusion alarm is triggered, and the connected subgraph is marked as a contaminated graph structure. The newly added graph vertex entity that caused the conflict and the historical graph vertex entity that caused the time contradiction are locked as two conflict nodes. The process involves tracing back to find the historical ancestor node that the two conflicting nodes both depend on, extracting the branch connected paths from the historical ancestor node to the two conflicting nodes, merging all directed edge entities contained in the branch connected paths to construct a historical associated edge candidate set, performing the action of disconnecting the historical associated edges, making the directed edge entity with the smallest confidence parameter in the historical associated edge candidate set invalid in the current version, and re-detecting conflicts until there are no conflicts.

10. The method for constructing cross-camera access sessions based on semantic topology and evidence chain rollback according to claim 9, characterized in that, The generated customer access session data includes: Extract the corrected set of directed edges and all vertex entities of the versioned association evidence graph in the current valid version, and convert them into an undirected graph topology matrix; Perform graph connectivity component calculations on the undirected graph topology matrix to obtain a set of maximally connected subgraphs; Assign a globally unique identifier to each independent connected subgraph in the set of maximally connected subgraphs; The earliest occurrence timestamp with the smallest value and the latest departure timestamp with the largest value among the time parameters recorded by the vertex entities in the independent connected subgraph are selected to calculate the total visit and stay time of customers, and the accumulated time difference within each stay node is summarized. Extract semantic tags corresponding to the dwell nodes in chronological order, generate a store preference access sequence, and output customer access session data.