A subway security monitoring video rapid retrieval and multi-channel transmission optimization system
By using multi-source data fusion and adaptive coding technology, the problem of insufficient cross-modal correlation in the subway security monitoring system was solved, enabling rapid retrieval and reliable transmission of video streams and improving emergency response efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING JINGSHIDA MASCH & EQUIP RES INST CO LTD
- Filing Date
- 2025-12-22
- Publication Date
- 2026-06-30
Smart Images

Figure CN121815029B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of subway security monitoring and video transmission technology, specifically to a subway security monitoring video fast retrieval and multi-channel transmission optimization system. Background Technology
[0002] Subway security monitoring systems are core components ensuring the safe operation of urban rail transit. They generate video streams and multi-source heterogeneous data through a massive number of front-end devices. In the event of an anomaly, the ability to quickly and accurately retrieve and reliably transmit critical video streams to the command terminal is crucial for improving emergency response capabilities. Currently, systems typically employ a static process of event alarm, manual search, selective retrieval, and unified forwarding. This process suffers from systemic deficiencies in data processing, hindering response efficiency and effectiveness.
[0003] The shortcomings of existing technologies are mainly reflected in four aspects of the data processing chain: First, in the data perception and fusion stage, the metadata of subsystems such as video analysis and passenger flow statistics are isolated, lacking cross-modal correlation and unified representation mechanisms. This leads to event detection relying on a single information source, resulting in low confidence and the inability to automatically construct event profiles containing spatiotemporal context. Second, in the resource retrieval and scheduling stage, video retrieval relies on human experience and lacks intelligent reasoning based on spatial topology and event status. It cannot dynamically generate accurate device retrieval lists, which may lead to blind retrieval. Third, in the streaming media processing stage, the system treats video streams as homogeneous data and fails to perform logical channel isolation and differentiated resource guarantees based on real-time performance and priority, resulting in weak congestion resistance. Finally, in the encoding and transmission stage, the strategy is rigid, failing to dynamically adapt encoding parameters according to terminal capabilities and real-time network quality, and lacking an intelligent and reliable transmission mechanism that integrates selective retransmission and forward error correction, which may make it difficult to guarantee the user experience under complex networks. Summary of the Invention
[0004] The technical problem to be solved by this invention is to overcome the shortcomings of the prior art and provide a subway security monitoring video rapid retrieval and multi-channel transmission optimization system. It achieves intelligent perception through multi-source data fusion, realizes dynamic resource allocation through scheduling and channelization, and ensures stable delivery of streaming media through adaptive encoding and reliable transmission, thereby comprehensively improving the emergency response capability of the subway security monitoring system.
[0005] To solve the above-mentioned technical problems, the basic concept of the technical solution adopted by the present invention is as follows:
[0006] Firstly, a system for rapid retrieval and multi-channel transmission optimization of subway security monitoring videos includes:
[0007] The analysis module is used to extract the feature set of multi-source heterogeneous metadata in the subway station and match it with the abnormal event template to obtain the matching confidence score. If the matching confidence score exceeds the preset threshold, the abnormal event is determined to have occurred and the event feature identifier is output. Based on the event feature identifier and combined with the spatial and scene information in the metadata, the scope of influence and the association path of the event are determined. Based on the scope of influence and the association path, a target device retrieval list containing device identifier, spatiotemporal weight and initial priority is obtained.
[0008] The processing module is used to parse the target device retrieval list to obtain the spatiotemporal weight and initial priority of the device, and concurrently retrieve the target video resources based on the spatiotemporal weight and initial priority; divide the target video resources into real-time command stream and process backtracking stream according to real-time, and pre-allocate I / O and transmission resources for them based on the initial priority to build the corresponding logical channel, complete the video stream binding, and obtain the channelized video stream;
[0009] The allocation module is used to receive channelized video streams and obtain their channel attributes, stream priority, and real-time network status; based on the channel attributes, stream priority, and real-time network status, it performs differentiated bandwidth control strategies and strategic shaping on the channelized video streams to obtain the scheduled data streams.
[0010] The transmission module receives the scheduled data stream and generates adaptive encoding parameters based on the device capability metadata and real-time link quality of the requesting terminal. It dynamically encodes and encapsulates the scheduled data stream according to the adaptive encoding parameters to generate data packets to be transmitted. When transmitting the data packets to be transmitted, it monitors the integrity based on their metadata sequence identifier and triggers the corresponding retransmission mechanism to ensure reliable delivery.
[0011] Secondly, a control method for a subway security monitoring video rapid retrieval and multi-channel transmission optimization system includes the following steps:
[0012] The feature set of multi-source heterogeneous metadata in the subway station is extracted and matched with the abnormal event template to obtain the matching confidence. If the matching confidence exceeds the preset threshold, the abnormal event is determined to have occurred and the event feature identifier is output. Based on the event feature identifier and combined with the spatial and scene information in the metadata, the scope of influence and the association path of the event are determined. Based on the scope of influence and the association path, a target device retrieval list containing device identifier, spatiotemporal weight and initial priority is obtained.
[0013] The target device retrieval list is parsed to obtain the spatiotemporal weight and initial priority of the device. Based on the spatiotemporal weight and initial priority, the target video resources are retrieved concurrently. The target video resources are divided into real-time command stream and process backtracking stream according to real-time performance. I / O and transmission resources are pre-allocated to them based on the initial priority to build corresponding logical channels, complete video stream binding, and obtain channelized video streams.
[0014] Receive channelized video streams and obtain their channel attributes, stream priority, and real-time network status; based on the channel attributes, stream priority, and real-time network status, perform differentiated bandwidth control strategies and strategic shaping on the channelized video streams to obtain the scheduled data streams;
[0015] The system receives the scheduled data stream and generates adaptive encoding parameters based on the device capability metadata and real-time link quality of the requesting terminal. It then dynamically encodes and encapsulates the scheduled data stream according to the adaptive encoding parameters to generate data packets to be transmitted. When transmitting the data packets to be transmitted, it monitors the integrity based on their metadata sequence identifier and triggers the corresponding retransmission mechanism to ensure reliable delivery.
[0016] By adopting the above technical solution, the present invention has the following beneficial effects compared with the prior art.
[0017] By extracting feature sets from multi-source heterogeneous metadata, the system achieves fusion representation of different types of data, improving the comprehensiveness and accuracy of anomaly event matching. Combining spatial and scene information from metadata to determine the scope of event impact and associated paths makes the generation of the target device retrieval list more targeted, reducing the retrieval overhead of invalid devices. The output of event feature identifiers enables precise binding of anomalies and associated information, providing clear traceability for subsequent data processing. Parsing the target device retrieval list yields key parameters, providing accurate input for subsequent data processing. Concurrent retrieval of target video resources improves data acquisition efficiency and shortens response time. Classifying video resources according to real-time requirements and pre-allocating I / O and transmission resources based on initial priority ensures differentiated resource protection, meeting the transmission needs of different types of video streams. The construction of logical channels enables isolated transmission of video streams, and video stream binding makes the data processing link more organized, laying an orderly foundation for subsequent scheduling. The system provides a foundation for: synchronous acquisition of channelized video streams, channel attributes, stream priorities, and real-time network status, enabling collaborative decision-making based on multi-dimensional data and improving the adaptability of bandwidth control; differentiated bandwidth control strategies can dynamically allocate resources according to stream type and network status, ensuring resource supply for core video streams and improving resource utilization efficiency; strategic shaping optimizes the transmission characteristics of data streams, reducing the risk of congestion in network transmission and improving the adaptability of data streams to subsequent transmission stages; adaptive encoding parameters are generated based on the capabilities of the requesting terminal device and real-time link quality, achieving precise matching between encoding strategies and terminal and link conditions, improving the compatibility and transmission efficiency of encoded data; dynamic encoding and encapsulation make the data packet structure more closely fit the transmission requirements, reducing data loss during transmission; and integrity monitoring based on metadata sequence identifiers can quickly locate transmission anomalies, trigger corresponding retransmission mechanisms to avoid full retransmission, reduce bandwidth waste, and ensure the integrity and reliability of data transmission.
[0018] The specific embodiments of the present invention will now be described in further detail with reference to the accompanying drawings. Attached Figure Description
[0019] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. Some specific embodiments of this application will be described in detail below with reference to the accompanying drawings in an exemplary and non-limiting manner. The same reference numerals in the drawings designate the same or similar parts or components. Those skilled in the art should understand that these drawings are not necessarily drawn to scale. In the drawings:
[0020] Figure 1 This is a schematic diagram of the subway security monitoring video rapid retrieval and multi-channel transmission optimization system of the present invention.
[0021] Figure 2 This is a schematic diagram of the control method for the subway security monitoring video rapid retrieval and multi-channel transmission optimization system of the present invention.
[0022] It should be noted that these accompanying drawings and textual descriptions are not intended to limit the scope of the invention in any way, but rather to illustrate the concept of the invention to those skilled in the art by referring to specific embodiments. The elements in the drawings are schematic and not drawn to scale. Detailed Implementation
[0023] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of the present application, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present application without creative effort should fall within the scope of protection of the present application.
[0024] The following embodiments of this application use a subway security monitoring video fast retrieval and multi-channel transmission optimization system as an example to illustrate the solution of this application in detail. However, this embodiment does not limit the scope of protection of this application.
[0025] like Figure 1 As shown, this invention provides a system for rapid retrieval and multi-channel transmission optimization of subway security monitoring videos, comprising:
[0026] The analysis module 100 is used to extract the feature set of multi-source heterogeneous metadata in the subway station and perform matching calculation with the abnormal event template to obtain the matching confidence score. If the matching confidence score exceeds the preset threshold, it is determined that an abnormal event has occurred and the event feature identifier is output. Based on the event feature identifier and combined with the spatial and scene information in the metadata, the scope of influence and the association path of the event are determined. Based on the scope of influence and the association path, a target device retrieval list containing device identifier, spatiotemporal weight and initial priority is obtained.
[0027] The processing module 200 is used to parse the target device retrieval list to obtain the spatiotemporal weight and initial priority of the device, and concurrently retrieve the target video resources according to the spatiotemporal weight and initial priority; divide the target video resources into real-time command stream and process backtracking stream according to real-time, and pre-allocate I / O and transmission resources for them based on the initial priority to build the corresponding logical channel, complete the video stream binding, and obtain the channelized video stream;
[0028] The allocation module 300 is used to receive channelized video streams and obtain their channel attributes, stream priority, and real-time network status; based on the channel attributes, stream priority, and real-time network status, it performs differentiated bandwidth control strategies and strategic shaping on the channelized video streams to obtain the scheduled data streams.
[0029] The transmission module 400 is used to receive the scheduled data stream and generate adaptive encoding parameters based on the device capability metadata and real-time link quality of the requesting terminal; dynamically encode and encapsulate the scheduled data stream according to the adaptive encoding parameters to generate a data packet to be transmitted; when transmitting the data packet to be transmitted, monitor its integrity according to its metadata sequence identifier and trigger the corresponding retransmission mechanism to ensure reliable delivery.
[0030] In this embodiment of the invention, the extraction of multi-source heterogeneous metadata feature sets can integrate various data dimensions, improving the comprehensiveness of feature information; the matching calculation with abnormal event templates provides data basis for event judgment, enhancing the objectivity of the judgment; combining spatial and scene information to determine the scope of influence and related paths can accurately locate event-related elements; the device identifier, spatiotemporal weight, and initial priority in the target device retrieval list provide precise guidance for subsequent video retrieval, improving the targeting of retrieval; concurrently retrieving video resources based on spatiotemporal weight and initial priority can improve resource acquisition efficiency; dividing video streams according to real-time and pre-allocating I / O and transmission resources can achieve targeted resource delivery, reducing Resource waste; the construction of logical channels and binding with video streams clearly define the transmission boundaries of different types of video streams, ensuring transmission order; differentiated bandwidth control based on channel attributes, stream priority, and real-time network status allows bandwidth allocation to meet actual transmission needs; strategic shaping and optimization of data stream form improves the adaptability of data streams to the network environment, reduces transmission congestion, and ensures transmission stability; adaptive encoding parameters are generated based on terminal device capabilities and link quality, adapting the encoding results to terminal characteristics and transmission environment, improving terminal reception and parsing efficiency; monitoring data packet integrity and triggering retransmission mechanisms during transmission can promptly fill data transmission gaps and ensure the reliability of data delivery.
[0031] In the subway security monitoring video rapid retrieval and multi-channel transmission optimization system described in this embodiment of the invention, the analysis module 100 extracts the feature set of multi-source heterogeneous metadata within the subway station and performs matching calculations with abnormal event templates to obtain a matching confidence level. If the matching confidence level exceeds a preset threshold, an abnormal event is determined to have occurred, and an event feature identifier is output. Based on the event feature identifier and combined with the spatial and scene information in the metadata, the scope of influence and the associated path of the event are determined. Based on the scope of influence and the associated path, a target device retrieval list containing device identifiers, spatiotemporal weights, and initial priorities is obtained, including:
[0032] Step 101: Extract a feature set from the multi-source heterogeneous metadata. The multi-source heterogeneous metadata includes at least video content description metadata, camera metadata, passenger flow monitoring metadata, and equipment alarm metadata. The feature set includes at least semantic tag features, spatial coordinate features, and numerical statistical features. Specifically, this includes: First, constructing a multi-source heterogeneous metadata access interface and a distributed metadata index system. The interface is compatible with video stream derived data accessed via the RTSP protocol, camera operation data accessed via the ONVIF protocol, JSON format statistical data output by passenger flow monitoring equipment, and XML format alarm data uploaded by alarm equipment. Real-time synchronous access and traffic shaping of multiple data types are achieved through a Kafka message queue. The index system is constructed according to three dimensions: data type, acquisition time, and spatial location, supporting millisecond-level data positioning. For massive video content description metadata, a model is used... Lightweight CNN models with quantization and pruning optimization, such as MobileNetV3, perform object detection and behavior recognition on video keyframes, extracting semantic label features such as crowd gathering, falling, and running. Simultaneously, they parse the GPS coordinates of the camera at the time of capture or the pre-set 3D spatial coordinates within the station using the EXIF information of the video frames, forming spatial coordinate features. The model's inference speed is increased to over 30 frames per second, meeting real-time processing requirements. For camera metadata, attributes such as device number, installation location, field of view, and current operating status are extracted and transformed into structured spatial association features. For passenger flow monitoring metadata, a sliding window statistical method is used to perform real-time statistics on passenger flow density, flow rate, and flow direction per unit time, generating numerical statistical features. For equipment alarm metadata, information such as alarm type, trigger time, and associated device number is extracted and transformed into event association features.
[0033] Finally, through feature standardization, semantic label features, spatial coordinate features, and numerical statistical features of different dimensions and scales are integrated into a feature set of a unified dimension. Semantic label features are represented by one-hot encoding, spatial coordinate features are standardized using Cartesian coordinates, and numerical statistical features are standardized using Z-scores to ensure the consistency and comparability of the feature set. At the same time, the feature set is bound and stored with the video index information of the corresponding metadata, laying the foundation for subsequent video association.
[0034] Step 102: Based on the feature set, calculate its semantic label features, spatial coordinate features, and numerical statistical features, and their similarity with the corresponding category feature vectors in the predefined abnormal event templates to obtain the similarity values of each category feature. Specifically, the predefined abnormal event templates are based on historical subway operation data and typical scenario requirements. The specific process is as follows: First, collect complete data on real abnormal events that occurred in subway stations in the past five years, such as people falling, passenger congestion, and equipment failures, including event-related videos, passenger flow statistics for the corresponding time period, equipment operation logs, and alarm records. At the same time, combine emergency response standards to simulate and construct event data under extreme scenarios to form a comprehensive template construction dataset; Second, process the dataset... Multi-dimensional feature annotation is performed, with security experts and data annotation personnel jointly annotating information such as event type, core features, occurrence scenario, and scope of impact to ensure annotation accuracy. Subsequently, for each type of annotated event, the corresponding semantic label features, spatial coordinate features, and numerical statistical features are extracted according to the feature extraction standards in step 101. The initial feature vector for this type of event is formed through feature aggregation. Finally, the initial feature vector is cross-validated using historical event data to calculate the matching error between the vector and the actual event features. The vector parameters are optimized by iteratively adjusting the feature weights. At the same time, a dynamic template update mechanism is established, and the feature vector is corrected quarterly based on newly added abnormal event cases to ensure the timeliness and accuracy of the template.
[0035] Based on the above process, an abnormal event template library and a feature vector retrieval engine are pre-built. The template library built based on the above process contains standard feature vectors of typical abnormal events such as people falling, crowd congestion, and equipment failure. The feature vectors of each event template correspond to three feature categories: semantic labels, spatial coordinates, and numerical statistics. The dimension of each feature vector is consistent with the dimension of the feature set output in step 101. The retrieval engine uses the FAISS vector database to achieve fast feature matching. This engine supports efficient indexing of massive feature vectors and can control the matching time of a single feature to the millisecond level. In order to meet the parallel computing needs of massive feature data, a distributed computing framework is built based on SparkMLlib. The framework adopts a master-slave architecture design. The master node is responsible for task allocation and result aggregation, and the slave nodes undertake specific computing work according to feature categories. Independent computing tasks are started for the three types of features: semantic labels, spatial coordinates, and numerical statistics.
[0036] For semantic tag feature similarity calculation, the Jaccard similarity coefficient algorithm is used. The semantic tag set in the feature set and the semantic tag set in the event template are intersected and unioned. The semantic similarity value is obtained by the ratio of the number of elements in the intersection to the number of elements in the union. For spatial coordinate feature similarity calculation, the Euclidean distance algorithm is used. The coordinates of the preset core area of the event occurrence in the event template are used as a reference. This reference coordinate is determined by the statistical mean of the historical occurrence locations of similar events. The spatial distance between the camera spatial coordinates in the feature set and this reference coordinate is calculated, and then normalized to a spatial similarity value between 0 and 1. The closer the distance, the closer the similarity value is to 1. For numerical statistical feature similarity calculation, the cosine similarity algorithm is used. First, the high-dimensional numerical feature vector is reduced in dimensionality using the PCA algorithm, retaining more than 95% of the feature information to simplify computational complexity. Then, the reduced feature vector is multiplied by the numerical statistical feature vector in the event template. The numerical similarity value is obtained by combining the magnitudes of the two vectors. The closer the vector directions are, the closer the similarity value is to 1.
[0037] After the calculation is completed, the semantic tag similarity value, spatial coordinate similarity value and numerical statistical similarity value are output respectively. Each similarity value is retained to two decimal places to ensure calculation accuracy. At the same time, each feature similarity is associated with the index information of the corresponding video. The index information includes the video storage path, device number and timestamp, realizing the initial binding of features and videos, and providing a basic association basis for subsequent video retrieval.
[0038] Step 103: Based on the preset category weights, the similarity values of the features in each category are weighted and comprehensively calculated to obtain the matching confidence. Specifically, this includes: The determination of the preset category weights is guided by the core needs of event judgment, and a standardized process is formed by combining quantitative analysis and qualitative evaluation. Specifically, as follows: First, the core objective of weight setting is to improve the accuracy and efficiency of abnormal event judgment. Weight influencing factors are selected around this objective, including three types of factors: the correlation between features and the essence of the event, the supporting value of features for handling decisions, and the discriminative contribution of features in historical data. Second, a three-layer hierarchical structure of objective, criteria, and scheme is constructed. The objective layer is to determine the optimal feature weights, the criteria layer corresponds to the above three types of influencing factors, and the scheme layer includes semantic labels and spatial coordinates. The system identifies three types of features: semantic tag features, spatial coordinate features, and numerical statistics features. A panel of 10 experts (5 subway security engineers, 3 data analysts, and 2 emergency response specialists) then compared each layer of features pairwise using a 1-9 scale to form a judgment matrix. The eigenvectors of the judgment matrix were calculated using the analytic hierarchy process (AHP) to obtain the initial weights for each feature. A consistency check (CR value less than 0.1) was performed to ensure the rationality of the weight allocation. Finally, the weights were validated using over 100,000 historical event data points from the past three years. The accuracy and false positive rates of event judgment under different weight combinations were calculated, and the weight parameters were iteratively adjusted to the optimal values. Ultimately, the semantic tag feature weight was determined to be 0.4, the spatial coordinate feature weight to be 0.3, and the numerical statistics feature weight to be 0.3.
[0039] Based on the above process, and combined with experience in handling incidents in subway security scenarios and historical data, the preset weights for each feature category are determined. Among them, semantic tag features are directly related to the essential attributes of the event, with a weight of 0.4; spatial coordinate features determine the accuracy of event location, with a weight of 0.3; and numerical statistical features reflect the development trend of the event, with a weight of 0.3. The sum of the weights of each feature category is 1 to meet the normalization requirements. These weights can be dynamically adjusted through the weight configuration interface in the system backend, supporting flexible optimization based on changes in operational scenarios (such as a surge in passenger flow during large-scale events or equipment upgrades). At the same time, a weight cache pool is constructed, and an LRU (Least Recently Used) eviction strategy is used to cache the weight parameters of high-frequency event templates to avoid redundant calculations and improve the efficiency of weight retrieval.
[0040] Subsequently, a weighted summation algorithm and the Flink real-time computing engine are used to perform distributed comprehensive calculation on the three types of similarity values output in step 102. The specific calculation method is: Matching confidence = semantic tag similarity value × 0.4 + spatial coordinate similarity value × 0.3 + numerical statistical similarity value × 0.3. During the calculation, the massive feature data is split according to the event occurrence time and spatial region through data sharding technology and distributed to different computing nodes. Data synchronization and result interaction between nodes are realized through the RPC protocol, which effectively avoids the bottleneck of single-node computing power and ensures computing efficiency. After calculating the matching confidence value between 0 and 1, the matching confidence value, the similarity value of each feature category, the corresponding weight, and the associated video index are stored together in a distributed temporary data cache area, such as a Redis cluster. The cached data is set to expire in 5 minutes, which can not only ensure the rapid data acquisition of subsequent abnormal event judgment, result traceability and other links, but also avoid cache overflow by automatically eliminating expired data, thus balancing data availability and storage resource consumption.
[0041] Step 104: Compare the matching confidence level with a preset threshold. If the threshold is exceeded, an abnormal event is determined to have occurred, and the event type and key feature identifier corresponding to the template are obtained as event feature identifiers. Specifically, the preset threshold is based on the event handling requirements and combines quantitative experiments and dynamic optimization to form a systematic process, as follows: First, sort out the core attributes of various abnormal events in subway operation and determine two key influencing factors. One is the handling priority. Events that directly threaten safety, such as people falling and violent conflicts, are classified as Level 1, while events that do not directly endanger safety, such as slow passenger flow and equipment malfunction prompts, are classified as Level 2. The other is the tolerance for misjudgment. Level 1 events require strict control of the missed judgment rate and have a low tolerance for misjudgment. Level 2 events can have a more relaxed tolerance for missed judgment. To reduce the cost of misjudgment, an experimental dataset containing over 1000 simulated scenarios was constructed, covering different peak passenger flow periods, equipment operating status, and ambient lighting conditions. Each scenario was labeled with the real event type and the manual judgment result. Subsequently, multiple rounds of simulation experiments were conducted based on this dataset, with the goal of a false negative rate of less than or equal to 1% and a false negative rate of less than or equal to 5% for first-level events, and a false negative rate of less than or equal to 3% and a false negative rate of less than or equal to 8% for second-level events. The initial threshold range was determined through iterative testing, and then verified by combining more than 50,000 real event data and more than 200,000 normal scenario data from the past three years. Finally, the threshold for emergency events such as people falling and violent conflicts was set at 0.7, and the threshold for general events such as slow passenger flow and equipment abnormal prompts was set at 0.5.
[0042] The above thresholds can be customized according to changes in the operational scenario. For example, during large-scale events, the threshold for passenger flow events can be lowered by 0.1 to improve sensitivity. At the same time, a dynamic threshold adjustment model is built. The model takes the monthly historical misjudgment rate data as input. If the missed judgment rate of first-level events exceeds 1% or the misjudgment rate exceeds 5%, the corresponding threshold will be automatically fine-tuned by ±0.05. After adjustment, it will be officially implemented after verification in a small-scale scenario. The threshold parameters will be optimized regularly to adapt to changes in the operational environment.
[0043] The matching confidence score calculated in step 103 is compared one by one with the preset threshold of the corresponding event template. The comparison process uses a Bloom filter to quickly filter low-confidence data, and only performs precise comparison on high-confidence data, improving judgment efficiency. If the matching confidence score exceeds the preset threshold, an abnormal event judgment result is triggered, and the event type corresponding to the event template is recorded, such as a person falling or a platform passenger congestion event. Subsequently, an event feature identifier is generated. This identifier uses a combination of event type code, occurrence timestamp, core equipment number, key feature summary, and video index prefix, where the video index... The prefix is directly associated with the distributed storage path of the corresponding video file. The event type is encoded using a two-digit number. The timestamp is in ten-digit format (year, month, day, hour, minute, second, millisecond). The core device number is the camera number with the highest correlation to the triggering event. The key feature summary is a combination of core keywords from the semantic tag features. Finally, the event judgment result, event type, event feature identifier, and complete index information of the associated video are synchronized to the system's event management module, video scheduling module, and subsequent processing module through the data interface. This enables real-time binding of abnormal events and associated videos, ensuring the timeliness and completeness of information transmission.
[0044] Step 105: Based on the event feature identifier, retrieve the corresponding camera spatial location coordinates and video content geographic scene polygon information from the multi-source heterogeneous metadata, and perform spatial reference unification and fusion to construct a unified spatial data layer. Specifically, this includes: based on the event feature identifier, performing precise retrieval in the multi-source heterogeneous metadata database through a metadata retrieval engine and spatial index. The retrieval process first locates the device cluster to which the associated video belongs by using the video index prefix, then locks the target device by using the core device number, and extracts the spatial location coordinates of all cameras associated with the event. These coordinates include two formats: relative coordinates within the station and absolute geodetic coordinates. The absolute geodetic coordinates are recorded as latitude, longitude, and elevation data using a spherical coordinate system (WGS84 datum). At the same time, extract the geographic scene polygon information corresponding to the video content captured by each camera. This information is obtained by integrating the geographic markers of the video frames with scene modeling data, including the boundary coordinates of scenes such as platform areas, stairwells, and transfer halls. The boundary coordinates are also recorded simultaneously in dual formats: spherical coordinates and relative coordinates within the station.
[0045] To address the processing needs of massive spatial data, the GeoSpark distributed GIS computing framework and spherical coordinate system mapping algorithm are introduced. A coordinate preprocessing unit is constructed to achieve parallel processing, mapping correction, and efficient integration of spatial data. The specific calculation process of the spherical coordinate system mapping algorithm is as follows: First, the mapping datum is determined, using the WGS84 reference ellipsoid as the spherical coordinate datum, with its semi-major axis set to 6378137 meters and semi-minor axis set to 6356752.3142 meters. The ellipsoidal flattening is calculated to be 1 / 298.257223563 using the formula. Second, the absolute geodetic coordinates are standardized in degree, minute, and second format. Latitude and longitude are converted to decimal format, and then converted to radian values using a radian conversion formula. Next, the spatial rectangular coordinates corresponding to the spherical coordinates are calculated. With the center of the ellipsoid as the origin, the radius of curvature of the ramusoidal circle is calculated using the latitude radian values. Combined with elevation data, the XYZ three-dimensional components of the spatial rectangular coordinates are obtained. Finally, combined with the geoid difference data of the subway area, a quadratic polynomial fitting algorithm is used to correct the regional deviation of the spatial rectangular coordinates. The correction factor is obtained by comparing historical survey data and GPS measured data of the area to ensure that the deviation between the corrected coordinates and the actual geographic space within the station is controlled within 0.05 meters.
[0046] After completing the mapping and correction of the spherical coordinate system, a unified spatial reference processing was performed. The station coordinate system used for subway operations was adopted as the reference coordinate system. This coordinate system has the station's central control room as the origin, with the X-axis pointing east of the station, the Y-axis pointing north of the station, and the Z-axis pointing vertically to the ground. The corrected spatial rectangular coordinates and other coordinate formats were uniformly converted into coordinate data under the reference coordinate system using a seven-parameter transformation method. The seven parameters (three translation parameters, three rotation parameters, and one scale parameter) were calculated by comparing the spherical coordinates and station coordinates of at least eight known control points within the station. During the transformation process, a quadratic polynomial fitting algorithm was called again to compensate for the transformation error, ultimately ensuring that the overall error of the coordinate transformation was controlled within 0.1 meters.
[0047] After unifying the coordinates, spatial data fusion is performed, linking and binding the camera's spatial location coordinates, corresponding geographic scene polygon information, and associated video index information to construct a unified spatial data layer containing fields such as device ID, spatial coordinates, scene type, boundary range, associated video ID, video storage path, and video resolution. This data layer is stored in the Shapefile format of a GIS geographic information system, and a bidirectional associated index of spatial coordinates and video indexes is constructed. The index structure adopts a hybrid index mode combining B+ trees and R trees, which supports both quick querying of video resources in the corresponding area by spatial location range and reverse location of the shooting device and the covered scene by video ID, providing a standardized, highly correlated, and high-precision data foundation for subsequent spatial analysis and video positioning.
[0048] Step 106: Perform spatial topology analysis on the unified spatial data layer to calculate the topological inclusion, adjacency, and connectivity relationships between the event location and the view areas of each camera and scene polygons. Specifically, this includes: using a topology analysis algorithm and a graph computing engine (such as Neo4j) to process the unified spatial data layer constructed in Step 105. First, determine the core coordinate point of the event location, which is determined by the center of the core device's shooting range associated with the event feature identifier. For the calculation of topological relationships of massive spatial elements, an incremental topology update mechanism is adopted, performing topological relationship calculations only on spatial elements in the event-related area, rather than calculating all elements, thus reducing computational overhead. Subsequently, calculate the topological inclusion relationship between the event location and the view areas of each camera by determining whether the core coordinate point of the event falls within the polygon range of the camera's view area. If it falls within the range, it is determined to be an inclusion relationship; if it is located at the view area boundary, it is determined to be an adjacency inclusion relationship. At the same time, the corresponding inclusion relationship is marked. The system prioritizes the videos associated with the camera; calculates the adjacency relationships between the event location and various scene polygons by determining whether the scene polygon containing the event's core coordinates shares a common edge or vertex with other scene polygons. A common edge indicates direct adjacency, while a common vertex indicates indirect adjacency. It also calculates spatial connectivity by constructing a spatial connectivity graph based on geographic information such as the subway station's passageway layout and stair locations. Nodes in the graph represent scene regions, and edges represent connecting channels. A parallel optimized version of Dijkstra's algorithm is used to quickly calculate the shortest connecting path between the event location and other regions, forming a connectivity chain of event points, connected nodes, and target regions. Finally, the topological inclusion relationships, adjacency relationships, connectivity relationships, and corresponding video resource information are output as a topological relationship matrix. The matrix rows and columns represent spatial elements, and the matrix elements simultaneously identify the topological relationship type between elements and the index information of associated videos, providing a clear basis for subsequent rapid video location through spatial association.
[0049] Step 107: Based on the topological inclusion, adjacency, and connectivity relationships, and the situation represented by the event feature identifiers, perform buffer analysis to calculate and delineate the impact area of the event. Specifically, this includes: First, based on the situation represented by the event feature identifiers, determine the event's impact diffusion characteristic parameters. These parameters include indicators such as diffusion speed, impact attenuation coefficient, and risk level. Specifically, the diffusion speed of a person falling event is set to 0.5 m / s, the impact attenuation coefficient to 0.8, and the risk level to high; the diffusion speed of a passenger congestion event is set to 0.2 m / s, the impact attenuation coefficient to 0.6, and the risk level to medium. The parameters are trained and stored in a parameter library using historical event diffusion data, which can be quickly accessed by event type. Then, using the core coordinates of the event location as the center and combining diffusion characteristic parameters, a GPU-accelerated dynamic buffer algorithm is used to perform buffer analysis. The parallel computing capability of the GPU can shorten the calculation time of large-scale spatial buffers to the level of hundreds of milliseconds. The initial buffer radius is determined according to the event risk level. The initial radius is set to 5 meters for high-risk events and 3 meters for medium-risk events. The buffer range is then dynamically adjusted according to the diffusion speed and event duration. For every minute the duration increases, the buffer radius increases by 0.5 meters. During the buffer calculation process, the buffer range is corrected by combining the topological adjacency and connectivity relationships obtained in step 106. If the buffer range touches physical obstacles such as walls or railings, the diffusion stops. If it touches connected areas such as transfer passages, the buffer range is extended along the connectivity direction. At the same time, the video index information of all monitoring devices in the buffer is associated in real time. Finally, by fitting the coordinates of the buffer boundary, a closed event influence area polygon is generated. The monitoring devices, scene areas, personnel activity spaces, and corresponding video resource lists contained in the influence area are determined. The list marks the distance weight between each video and the core area of the event, providing a spatial basis for subsequent priority retrieval of videos.
[0050] Step 108: Based on the affected area and the spatial connectivity obtained through spatial topology analysis, analyze and determine the event-related paths. Specifically, this includes: starting from the affected area, and combining the spatial connectivity obtained through spatial topology analysis in step 106, constructing an internal spatial connectivity network graph based on a graph database. This network graph uses various functional areas within the station (such as platforms, stairs, transfer halls, and entrances / exits) as nodes, and connecting channels between areas as edges. The weight of the edge is set as the ratio of the channel width to the passenger flow density. The narrower the channel width and the higher the passenger flow density, the greater the weight, indicating greater difficulty in passage. At the same time, the monitoring equipment and video index information of the corresponding area are associated in the node attributes. To meet the path analysis requirements of massive nodes and edges, a path query optimization algorithm (such as bidirectional breadth-first search) of the graph database is adopted to improve path retrieval efficiency.
[0051] Subsequently, key nodes within the affected area are identified, such as entrances to evacuation routes and starting points of emergency rescue routes. Using these key nodes as targets, the optimal path from the affected area to the target nodes is searched. The optimal path is determined by minimizing the sum of path weights, i.e., the lowest difficulty of passage. Simultaneously, the associated paths are filtered based on the event type represented by event feature identifiers. For example, in the case of a person falling, paths leading to the first aid station and police station are prioritized; in the case of passenger congestion, paths leading to backup evacuation routes and platform broadcasting rooms are prioritized. During the path filtering process, video index information of all monitoring devices along the path is extracted, and the positional order of each video within the path is marked. Finally, detailed information about the event-related paths is output, including the area nodes traversed by the path, path length, included monitoring device numbers, corresponding video indexes, and path passage priority, identifying the critical links in the spread of the event's impact and the core video resource channels required for emergency response.
[0052] Step 109: Based on the influence range and associated paths, a target device retrieval list is obtained by calculating the spatiotemporal proximity of each monitoring device to the event core. This target device retrieval list includes device identifiers, spatiotemporal weights, and initial priorities. Specifically, this includes: First, determining the location of the event core, which is the central coordinate point of the event occurrence, obtained through analysis of video content associated with the event feature identifier; then, based on the influence area and associated path range, combined with the distributed device status monitoring system, filtering out monitoring devices in normal working condition, excluding faulty and offline devices, and reducing invalid searches; calculating the relationship between the filtered devices and the event. The core spatiotemporal proximity is calculated as follows: temporal proximity is calculated using the difference between the latest update time of the device's video data and the time of the event. The smaller the difference, the higher the temporal proximity. For every 1 second the time difference decreases, the temporal proximity value increases by 0.1. Spatial proximity is calculated using the straight-line distance between the device's installation location and the core location of the event. The closer the distance, the higher the spatial proximity. For every 1 meter the distance decreases, the spatial proximity value increases by 0.2. The comprehensive spatiotemporal proximity is calculated by weighted summation, with the temporal proximity weight set at 0.3 and the spatial proximity weight set at 0.7. The comprehensive spatiotemporal proximity = temporal proximity × 0.3 + spatial proximity × 0.7.
[0053] The spatiotemporal weight of each device is determined based on the comprehensive spatiotemporal proximity; the higher the spatiotemporal proximity value, the greater the spatiotemporal weight. Simultaneously, the initial priority is determined by combining the event type and device function. Devices that directly captured the event occurrence are assigned priority level 1, devices covering the affected area are assigned priority level 2, and devices covering the associated path are assigned priority level 3. Videos associated with priority level 1 devices are marked as core videos and retrieved first. Finally, the device identifier, spatiotemporal weight, initial priority, and complete video index information (including storage path, data format, and bitrate) are integrated to generate a target device retrieval list. The list is sorted from high to low initial priority, and within the same priority level, it is sorted from high to low spatiotemporal weight. Video segment location information is also added to the list to determine the time segment in each device's video that is associated with the event (e.g., 30 seconds before and after the event), providing a direct basis for subsequent video segment retrieval, avoiding full video transmission, and improving retrieval efficiency.
[0054] In this embodiment of the invention, multiple types of data information, including video, equipment, and passenger flow, are covered. Semantic, spatial, and numerical features are extracted to provide comprehensive and diverse data support for subsequent matching calculations. Similarity is calculated separately for different categories of features, such as semantic tags and spatial coordinates, to achieve refined feature matching and ensure the presentation of matching results for various features. The similarity values are weighted and combined with preset category weights to ensure that the matching confidence reflects the differences in the importance of different features, improving the rationality and relevance of the confidence results. By comparing the matching confidence with a preset threshold, abnormal events are clearly identified, and the corresponding event type and key feature identifiers are output, providing a core basis for subsequent processing. The spatial location of the camera and video geographic scene information are integrated, and... Spatial reference unification and fusion construct a unified data layer to achieve standardized integration and centralized management of spatial data; spatial topology analysis obtains various spatial relationships, clearly presenting the spatial association between the location of the event and the field of view of the monitoring equipment and the scene area, providing a spatial basis for range delineation; combined with event situation execution buffer analysis, the calculation and delineation of the event impact area are more in line with the actual situation, ensuring the accuracy and applicability of the impact area range; based on the impact area and spatial connectivity relationship, path analysis is carried out to accurately locate the event-related associated paths and determine the key links of event propagation and impact; target monitoring equipment is screened through spatiotemporal proximity calculation, making equipment retrieval more targeted, and the equipment identification, spatiotemporal weight and other information included in the list provide a scheduling basis for subsequent video retrieval.
[0055] In the subway security monitoring video fast retrieval and multi-channel transmission optimization system described in this embodiment of the invention, the processing module 200 parses the target device retrieval list to obtain the spatiotemporal weight and initial priority of the devices, and concurrently retrieves target video resources based on the spatiotemporal weight and initial priority; it divides the target video resources into real-time command streams and process backtracking streams according to real-time performance, and pre-allocates I / O and transmission resources for them based on the initial priority to construct corresponding logical channels, complete video stream binding, and obtain channelized video streams, including:
[0056] Step 201: Parse the target device retrieval list to obtain the device identifier, spatiotemporal weight, and initial priority of each target device. Specifically, the target device retrieval list is transmitted to the processing module 200 in structured JSON format. This list contains a four-segment data structure: device identifier, spatiotemporal weight, initial priority, and network status pre-evaluation. The device identifier uses a 16-bit string encoding (the first 8 bits are the device type code, and the last 8 bits are a unique serial number). The spatiotemporal weight is represented by integers from 0 to 10. The initial priority is divided into 1 to 3 levels. The network status pre-evaluation segment includes the real-time packet loss rate, latency, and bandwidth margin parameters of the link to which the device belongs. First, start the list parsing engine. This engine integrates a JSONSchema validator and a network parameter pre-validation unit. It first performs format validity checks on the list data. If there are problems such as missing fields or incorrect types, a data retransmission request is triggered. After the validation is passed, the network parameter pre-validation unit calls the link detection interface to compare the network status parameters in the list with the subway... The security network management platform compares real-time data and removes device entries with packet loss rate greater than 2%, latency greater than 200ms, or bandwidth margin less than 5Mbps. In particular, for the initial priority level 1 (corresponding to the real-time command flow associated device), its network access threshold is raised to packet loss rate less than or equal to 0.5%, latency less than or equal to 100ms, and bandwidth margin greater than or equal to 10Mbps to ensure that the associated device has basic transmission capabilities. Subsequently, the field mapping algorithm is used to map the effective fields of the list to device identifier, spatiotemporal weight, initial priority, and network adaptation parameters respectively. At the same time, the device information verification interface is called to compare the extracted device identifier with the subway security device ledger to confirm that the device is in normal operating condition. Finally, the extracted effective parameters are stored in the local cache in the form of key-value pairs of device identifier and parameter set. The cache adopts a hash table structure to support parameter query with O(1) time complexity. The parameter entries of the real-time command flow associated device are marked with high priority transmission identifiers to provide efficient data support for subsequent resource allocation.
[0057] Step 202: Based on the aforementioned spatiotemporal weights and initial priorities, a comprehensive retrieval priority value is generated for each target device through weighted calculation. Specifically, this includes: pre-determining the weighting coefficients of the spatiotemporal weights and initial priorities using the Delphi method based on subway emergency response standards and historical retrieval efficiency data. The spatiotemporal weights reflect the close correlation between the device and the core of the event, with a weighting coefficient set to 0.6; the initial priority reflects the urgent needs of event handling, with a weighting coefficient set to 0.4. The sum of these two coefficients is 1 to meet normalization requirements. This coefficient can be dynamically updated through the system configuration file. Subsequently, the numerical calculation component is called to extract the values from step 201. The parameters are weighted and calculated. The specific process is as follows: First, the spatiotemporal weights (integers from 0 to 10) are standardized to values from 0 to 1 (i.e., spatiotemporal weight value ÷ 10). Then, the initial priorities are converted into corresponding values (level 1 = 1.0, level 2 = 0.6, level 3 = 0.3). Finally, the result is obtained by calculating the comprehensive retrieval priority value using the formula: standardized spatiotemporal weight × 0.6 + priority value × 0.4. After the calculation is completed, all target devices are sorted from high to low according to the comprehensive retrieval priority value, and a priority sequence table is generated. The sequence table is synchronously associated with the device identifier and the corresponding video storage address prefix, providing a basis for the distribution of subsequent retrieval requests.
[0058] Step 203: Based on the comprehensive retrieval priority value, initiate concurrent priority retrieval requests to the video storage system to obtain the target video resources corresponding to each target device. Specifically, this includes: constructing a distributed retrieval scheduling framework, which includes a request dispatcher, multiple retrieval execution nodes, and a result aggregator. The framework communicates with the video storage system (distributed file storage cluster) using the HTTP / 2 protocol to support concurrent transmission of multiple requests. The request dispatcher, based on the priority sequence list generated in step 202, distributes retrieval requests to retrieval execution nodes according to the principle of allocating resources based on higher priority. Requests with a comprehensive retrieval priority value greater than or equal to 0.8 are allocated to the core node (configured with 8 CPU cores and 16GB memory), while requests with a score between 0.5 and 0.8 are allocated to the general nodes. Requests with a score less than 0.5 are assigned to backup nodes to avoid resource contention. Each search request includes device identifier, video time range (derived from the event occurrence time), and data verification code. After receiving the request, the search execution node locates the storage node where the video file is located by the storage address prefix associated with the device identifier and extracts the target video resource using a range query command. A timeout retransmission mechanism is enabled during the search process. The timeout threshold for core nodes is set to 500ms, and for ordinary and backup nodes it is set to 1000ms. After the timeout, retransmission is automatically initiated and idle bandwidth is prioritized. After all search results are verified by the data verification code, the result aggregator integrates them according to priority to form a resource list containing video resource identifier, data size, and storage path, and returns it.
[0059] Step 204: Perform real-time analysis on the target video resource. Based on the difference between its recording time and the current time, as well as the stream status, classify and label it as a real-time command stream and a historical process backtracking stream. Specifically, this includes: activating a dual-dimensional video stream analysis component that combines real-time performance and network status. This component simultaneously acquires three types of data: first, the system's current time (calibrated by an NTP time server with an error of less than or equal to 10ms) and the recording timestamp of the target video resource (extracted from the video file's metadata), calculating the time difference ΔT; second, obtaining the real-time transmission status of the video stream through the RTSP protocol, extracting three core status parameters: frame rate, bitrate fluctuation value, and transmission delay; and third, collecting the real-time network data of the link to which the device belongs through the SNMP protocol. The data includes instantaneous bandwidth, packet loss rate, RTT, and jitter value. Classification rules are set as follows: If ΔT is less than or equal to 3 seconds, frame rate is greater than or equal to 25 fps, bit rate fluctuation is less than or equal to 5%, transmission delay is less than or equal to 100 ms, and the link instantaneous bandwidth is greater than or equal to 15 Mbps, packet loss rate is less than or equal to 0.5%, RTT is less than or equal to 50 ms, and jitter value is less than or equal to 10 ms, then it is judged as a real-time command stream. This type of stream is used for real-time decision-making in emergency command and requires priority to ensure transmission quality. If ΔT is greater than 3 seconds, or frame rate is less than 25 fps, bit rate fluctuation is greater than 5%, or link packet loss rate is greater than 2%, and RTT is greater than 200 ms, then it is judged as a historical process backtracking stream. This type of stream focuses on completeness rather than real-time performance.
[0060] After classification, a tag embedding algorithm is used to serialize the composite tags. The composite tags correspond one-to-one with the video stream type: real-time command streams correspond to the key-value pair combination of real time=1 and network level=high, used to identify high network security level; historical process backtracking streams correspond to the key-value pair combination of real time=0 and network level=normal, used to identify normal network security level. The serialized composite tags are embedded into the custom field of the RTMP header information of the video stream. At the same time, link adaptation parameters, including recommended transmission protocol and optimal bitrate range, are added to the index field of the stream data to ensure that the subsequent resource allocation and channel construction stages can quickly identify the video stream type and transmission adaptation requirements and accurately match the corresponding network strategy.
[0061] Step 205: Based on the initial priority, execute differentiated resource allocation algorithms for the real-time command stream and the process backtracking stream respectively. The differentiated resource allocation algorithm determines the basic resource allocation boundary by constructing and analyzing a multi-dimensional resource demand vector set for various video streams, and adjusts the basic resource allocation boundary with weights based on the initial priority. This generates and outputs a dedicated resource quota for each type of video stream. The resource quota includes storage I / O access queue depth and network transmission bandwidth quota. Specifically, it includes: firstly, constructing a five-dimensional resource demand vector for the video stream, based on the original video resolution, bitrate, frame rate, and transmission... Based on real-time requirements, a new dimension of network anti-interference capability is added, forming a vector system containing five core dimensions. The vector parameters for real-time command flow are set to 4K, 8Mbps, 25fps, high, and extremely high; the vector parameters for historical process backtracking flow are set to 1080P, 4Mbps, 15fps, medium, and general. To achieve accurate mapping of high-dimensional vectors to the resource allocation space, a vector space projection algorithm is introduced to preprocess the five-dimensional resource demand vector. The specific calculation process is as follows: First, determine the projection target space, storing the core resource allocation indicators as I / O access queue depth and network transmission bandwidth. The first step involves constructing a two-dimensional resource projection space, using the target dimension as the projection dimension. The second step involves setting a projection benchmark by collecting matching data from the past year on resource demand vectors and actual resource allocation for different types of video streams in the subway security system. 1000 optimal matching samples are selected as the projection benchmark set, and the mean and standard deviation of each dimension's parameters are calculated to complete the standardization calibration of the projection space. The third step involves generating a projection matrix by fitting the mapping relationship between the five-dimensional resource demand vector and the two-dimensional projection space coordinates using the least squares method, resulting in a 5x2 projection matrix. The matrix elements are calculated through linear regression of the benchmark set samples to ensure accurate projection. The error is controlled within 5%; the fourth step is to perform vector projection calculation, which multiplies the constructed five-dimensional resource demand vector with the projection matrix to obtain a two-dimensional projection vector. The two components of this vector correspond to the storage I / O resource demand coefficient and the bandwidth resource demand coefficient, respectively; the fifth step is to correct the projection results. Based on the resource allocation experience value of the subway operation scenario, the demand coefficient obtained by projection is linearly corrected. The correction factor is dynamically adjusted according to different video stream types. The correction factor for real-time command stream is set to 1.1 to improve resource guarantee; the correction factor for historical process backtracking stream is set to 0.9 to optimize resource utilization.
[0062] Based on the corrected two-dimensional resource demand vector obtained by vector space projection, a network-aware resource demand assessment model is used to calculate the basic resource allocation boundary. This model fits the correspondence between historical resource occupancy data, projected resource demand coefficients, and network fluctuation data through a linear regression algorithm, reserving network fluctuation redundancy in the basic quota. The specific quota settings are as follows: the basic storage I / O access queue depth for real-time command flow is set to 1024, the basic network transmission bandwidth quota is set to 10Mbps, and an additional 20% bandwidth redundancy is added, that is, the basic bandwidth is calculated as 12Mbps to cope with sudden network congestion; the basic I / O queue depth for historical process backtracking flow is set to 512, the basic bandwidth quota is set to 5Mbps, and an additional 10% bandwidth redundancy is added.
[0063] Subsequently, the basic boundaries were adjusted in a weighted manner based on the initial priority and network security level: the real-time command flow of the Level 1 priority was increased by 30% on the basis of the basic quota including redundancy; the real-time command flow of the Level 2 priority remained at the basic quota; the real-time command flow of the Level 3 priority was reduced by 10%, but the bandwidth was not less than 10Mbps; the historical process backtracking flow was adjusted according to the original rules, that is, Level 1 was increased by 50%, Level 2 remained unchanged, and Level 3 was reduced by 20%.
[0064] In the final output resource quota, the I / O access queue depth is accurate to an integer, and the bandwidth quota is accurate to 0.1Mbps. At the same time, dynamic bandwidth adjustment permissions are configured for the real-time command flow. When the network monitor detects insufficient link bandwidth, it can temporarily preempt the redundant bandwidth of the historical process backtracking flow. In the generated quota allocation table, the real-time command flow entries are additionally marked with a priority scheduling identifier and associated with the network resource management module to ensure that its resource requirements are responded to with priority.
[0065] Step 206: Instantiate the corresponding logical channel control structure based on the resource quota, construct independent logical channels for the real-time command flow and process backtracking flow respectively, and complete their initialization. Specifically, this includes: based on the resource quota and video stream network protection level, calling the network adaptive logical channel control interface to instantiate the channel control structure. This structure contains five core fields: channel identifier, resource constraint parameters, transmission protocol type, port number, and network fault tolerance strategy. For the real-time command flow, a hybrid transmission protocol of UDP and FEC (Forward Error Correction) is adopted: UDP ensures low latency, and FEC achieves packet loss self-healing by adding redundant data packets. The redundancy is set to 20%, that is, 2 redundant frames are added for every 10 data frames sent. At the same time, the BBR congestion control algorithm is integrated to sense bandwidth changes in real time and adjust the sending rate to avoid latency spikes caused by congestion. The channel port number is 5000. For the dedicated port segment up to 5999, a dynamic port switching mechanism is enabled. When the packet loss rate of the current port is detected to be greater than 1%, it automatically switches to an idle port in the same port segment within 50ms to avoid transmission interruptions caused by port conflicts or attacks. For historical process backtracking streams, the TCP protocol is still used to ensure reliability, and the port number uses the port segment from 6000 to 6999. During channel initialization, hierarchical resource constraints and fault tolerance rules are configured: the I / O queue depth of the real-time command flow channel is locked to the allocated quota, and queue priority scheduling is enabled (the I / O requests of the real-time command flow are processed with priority over other queues). Bandwidth usage adopts a preemptive and reservation strategy, pre-locking 80% of the bandwidth within the quota as dedicated resources, and the remaining 20% can be dynamically preempted from other low-priority channel resources. When network resources are scarce, the historical process backtracking stream channel automatically reduces bandwidth usage to avoid real-time command flow.
[0066] Simultaneously, a millisecond-level channel monitoring thread is activated to collect real-time metrics such as channel resource utilization, transmission error rate, link RTT, and packet loss rate. A threshold trigger mechanism is set: if the real-time command flow channel latency exceeds 150ms or the packet loss rate exceeds 1%, dynamic adjustment is immediately triggered, increasing FEC redundancy to 30% and switching the BBR algorithm to low-latency mode. If the metrics still do not improve, a backup logical channel (using a different link from the primary channel) is automatically activated to achieve hot standby switching. After initialization, the real-time command flow channel must pass a network stress test, simulating a complex scenario of 10% packet loss and 20% bandwidth fluctuation. Only if the video frame transmission latency is less than or equal to 100ms and the packet loss rate is less than or equal to 0.5% can a channel ready signal be output.
[0067] Step 207: The real-time command stream and the process backtracking stream are injected and bound to the corresponding logical channels constructed for the real-time command stream and the process backtracking stream according to their categories, respectively, to complete the association mapping and obtain the channelized video stream and its channel attribute metadata. Specifically, a triple association mapping algorithm based on network status, protocol type, and priority is adopted. This algorithm first matches the network assurance level (high / normal) of the video stream with the network fault tolerance capability of the channel, then matches the stream type with the transmission protocol (the real-time command stream matches the UDP+FEC channel, and the historical process backtracking stream matches the TCP channel), and finally achieves accurate matching through the hash association between the device identifier and the channel identifier, ensuring that the real-time command stream is bound to the channel with the optimal network conditions. After matching, the video stream data is injected into the corresponding logical channel by frame grouping and priority marking: Video frames in the real-time command stream are classified as I-frames, P-frames, and B-frames. I-frames (keyframes) are marked with the highest priority, P-frames with high priority, and B-frames with medium priority. During injection, I-frames and P-frames are transmitted first to avoid screen distortion caused by keyframe loss. Simultaneously, frame fragmentation technology is used to split large I-frames into small 1500-byte data packets (compliant with MTU standards) to reduce latency caused by data packet fragmentation. Frame synchronization and retransmission mechanisms are enabled during injection. Timestamp synchronization ensures that the transmission order of video frames matches the recording order. If a frame transmission timeout (greater than 50ms) or packet loss is detected, retransmission is immediately initiated, prioritizing reserved bandwidth during retransmission. The generated channel attribute metadata includes additional network fault tolerance parameters for the real-time command stream (FEC redundancy, congestion control algorithm type, and backup channel identifier), stored in XML format and bound to the channel. To verify the binding validity, a network simulation binding verification process is initiated: test data packets containing I-frames, P-frames, and B-frames are sent to the channel to simulate a complex network scenario (5% packet loss, 100ms latency, 10% bandwidth fluctuation). If a reception confirmation signal is received within 50ms, and there is no I-frame loss, the P-frame packet loss rate is less than or equal to 0.5%, and the B-frame packet loss rate is less than or equal to 2%, then the binding is considered successful. If the requirements are not met, a channel with better network quality is re-matched and the verification is repeated until the binding is successful. Finally, the channelized video stream and corresponding channel attribute metadata are output. The real-time command stream channel additionally carries a QoS guarantee request, which is prioritized for processing when pushed to the allocation module 300 to ensure high-quality, low-latency, and reliable transmission under complex network conditions.
[0068] In this embodiment of the invention, core parameters of the target device are extracted to determine the device identifier, spatiotemporal weight, and initial priority, providing a clear and standardized input basis for subsequent data processing and avoiding processing deviations caused by parameter ambiguity. A comprehensive retrieval priority value is generated by fusing spatiotemporal weight and initial priority, achieving effective aggregation of multi-dimensional parameters and making the retrieval priority more aligned with event handling needs, thus improving the targeting of resource retrieval. Concurrent retrieval requests are initiated according to the comprehensive retrieval priority, allowing multiple retrieval forces to be mobilized simultaneously, prioritizing the acquisition of video resources from high-priority devices, reducing retrieval waiting time, and improving the retrieval efficiency of massive video resources. Video stream classification and labeling are completed based on recording time difference and stream status, clearly distinguishing the edges between real-time command streams and historical process replay streams. The system categorizes video streams for different purposes, laying the foundation for subsequent differentiated processing. By determining allocation boundaries through multi-dimensional resource demand vectors and combining them with priority-weighted adjustments, it achieves precise calculation of resource quotas, allocating storage I / O and bandwidth quotas on demand to avoid resource waste and ensure resource supply for core video streams. It instantiates and initializes logical channel control structures, building dedicated transmission carriers for different types of video streams, achieving physical isolation of video stream transmission, reducing mutual interference, and improving transmission stability. It precisely binds video streams to corresponding logical channels, establishing clear association mapping relationships to ensure fixed video stream transmission paths. Simultaneously, the generated channel attribute metadata provides a complete reference for subsequent scheduling, improving the coherence and traceability of data processing.
[0069] In the subway security monitoring video fast retrieval and multi-channel transmission optimization system described in this embodiment of the invention, the allocation module 300 receives the channelized video stream and obtains its channel attributes, stream priority, and real-time network status; based on the channel attributes, stream priority, and real-time network status, it performs differentiated bandwidth control strategies and strategic shaping on the channelized video stream to obtain the scheduled data stream, including:
[0070] Step 301: Receive the channelized video stream and its channel attribute metadata, and collect network status data in real time. The channel attribute metadata includes channel attributes and stream priority. Specifically, it includes: receiving the channelized video stream and channel attribute metadata transmitted by the processing module 200 through a multi-port data access unit. The channelized video stream is transmitted using RTP encapsulation format, and the port number is consistent with the output port of the processing module (segment 5000 to 5999 for real-time command stream and segment 6000 to 6999 for process backtracking stream). The channel attribute metadata is transmitted synchronously through an independent control channel in XML format, including core fields such as channel identifier, transmission protocol type, stream priority (levels 1 to 3), resource quota, and network adaptation parameters. The data receiving stage integrates a data verification unit, which first performs integrity verification on the RTP header information of the video stream, checks the continuity of the sequence number and the consistency of the timestamp, and if packet loss is found... If the data is out of order, a retransmission request is made via the RTCP protocol. XMLSchema validation is used for channel attribute metadata to ensure field integrity and compliant format. After successful validation, the data is associated with the channel identifier and stored in local shared memory. Simultaneously, a network status acquisition unit is activated, using SNMP protocol and NetFlow traffic analysis technology to collect real-time network data in parallel. Acquisition metrics include core link bandwidth utilization, link packet loss rate, round-trip time (RTT), jitter, available bandwidth, and port traffic. Bandwidth utilization and packet loss rate are collected every 10ms, while RTT and jitter are collected every 5ms. Available bandwidth is calculated in real-time using a sliding window algorithm. All collected data is stored in a circular buffer with a structure of timestamp, link identifier, and metric set. The buffer capacity is set to 100 records, and new data automatically overwrites expired data, providing high-frequency and accurate network status support for subsequent parameter calculations.
[0071] Step 302: Based on the channel attributes, flow priority, and collected real-time network status data, dynamically calculate bandwidth allocation weights and congestion control parameters for each logical channel. Specifically, this includes: First, constructing a multi-dimensional factor dynamic calculation algorithm system. This algorithm system includes a parameter calculation engine and a network status adaptation unit. First, extract the channel attributes (transmission protocol, resource quota), flow priority, and real-time network status data obtained in step 301. Determine the weight calculation factors as flow priority (weight percentage 0.4), channel type (real-time command flow or process backtracking flow, percentage 0.3), and link quality score (converted from packet loss rate and RTT to 0 to 10 points, percentage 0.3). The congestion control parameter calculation factors are link packet loss rate, RTT, available bandwidth, and stream bitrate. The parameter calculation engine uses a combination of analytic hierarchy process (AHP) and entropy weighting algorithm to calculate bandwidth allocation weights: first, determine the subjective weights of each factor using AHP, and then combine the entropy weighting algorithm with historical data. Network data is corrected to objective weights, and the final weighted average yields the bandwidth allocation weight for each logical channel. The base weight for the real-time command flow is no less than 0.5 to ensure resource allocation. Congestion control parameters are calculated differently for different transmission protocols: For UDP protocol channels (real-time command flow), the initial congestion window (set to 10 MTU size), packet loss retransmission threshold (triggered when packet loss rate is greater than 1%), and jitter compensation coefficient (jitter value × 0.1) are calculated; for TCP protocol channels (process backtracking flow), the slow start threshold (initially 1 / 2 of available bandwidth), the incremental step size for the congestion avoidance phase, and the timeout retransmission time (RTT × 2 + jitter value) are calculated. The parameter calculation results are updated every 50ms. The network state adaptation unit compares the differences between the old and new parameters in real time. If the difference exceeds 10%, a smooth transition mechanism is triggered to avoid transmission fluctuations caused by parameter mutations. All calculation results are stored in the parameter cache pool after being associated with the channel identifier, supporting millisecond-level queries.
[0072] Step 303: Based on the bandwidth allocation weights, execute a minimum bandwidth guarantee strategy for the logical channel bound to the real-time command flow, and execute an elastic allocation strategy based on available network bandwidth for the logical channel bound to the process backtrack flow, completing the initial bandwidth resource allocation. Specifically, this includes: starting the bandwidth scheduling controller, which includes a guarantee scheduling unit and an elastic scheduling unit, and executing a differentiated strategy based on the bandwidth allocation weights calculated in step 302; for the logical channel bound to the real-time command flow, the guarantee scheduling unit executes the minimum bandwidth guarantee strategy: first, extract the resource quota from the channel attribute metadata, determine the minimum guaranteed bandwidth (no less than 10Mbps for level 1 priority real-time command flow, and no less than 8Mbps for level 2), configure this bandwidth value to the core network switch through the QoS protocol, and mark the channel traffic with a DSCP value (EF for level 1, AF41 for level 2). The switch prioritizes scheduling this type of traffic to ensure that the minimum bandwidth is not preempted; if the available real-time network bandwidth is sufficient, the portion exceeding the minimum guaranteed bandwidth is allocated according to the bandwidth allocation weight ratio. For example, if the weight of a level 1 real-time command flow is 0.6, and the available bandwidth exceeds the total minimum guaranteed bandwidth by 20Mbps, then the channel is allocated an additional 12Mbps.
[0073] For the logical channels of the bound process backtracking stream, the elastic scheduling unit executes an elastic allocation strategy based on available bandwidth: First, it summarizes the total bandwidth demand of all process backtracking streams, calculates the ratio of demand to available bandwidth, and if the demand is less than or equal to the available bandwidth, it allocates bandwidth in full according to the bandwidth allocation weight. If the demand is greater than the available bandwidth, it scales the bandwidth quota of each channel according to the ratio, and the minimum bandwidth after scaling is not less than 2Mbps to ensure basic transmission. At the same time, it sets the dynamic bandwidth adjustment trigger condition. When the real-time available bandwidth increases by more than 10%, it allocates incremental bandwidth to the process backtracking stream according to the weight ratio. When the available bandwidth decreases by more than 5%, it first reduces the bandwidth of low-priority (level 3) backtracking streams, and then reduces level 2 backtracking streams to ensure that the minimum bandwidth guarantee of the real-time command stream is not affected. After the bandwidth allocation is completed, it outputs the actual bandwidth quota and scheduling log of each channel. The log includes the allocation time, quota value and link identifier.
[0074] Step 304: Based on the congestion control parameters and real-time network status data, implement priority-based hierarchical smooth rate limiting control on the output traffic of the process backtracking flow channel to obtain the data stream of each logical channel after rate limiting control. Specifically, this includes: constructing a priority-aware rate limiting engine, which includes a rate limiting rule configuration unit, a flow control unit, and a network status feedback unit. First, the process backtracking flow is divided into two rate limiting levels, high (level 2) and medium (level 3), according to the initial priority. Rate limiting rules are formulated in combination with the congestion control parameters calculated in step 302 and the real-time network status in step 301. The flow control unit uses the token bucket algorithm to implement smooth rate limiting. An independent token bucket is configured for each process backtracking flow channel. The token generation rate is set according to the actual bandwidth quota allocated in step 303. For example, for a channel with a quota of 5Mbps, the token generation rate is set to 5Mbps, and the bucket capacity is set to 100KB to cope with burst traffic. For high-level backtracking flows, the token bucket capacity is expanded to 200KB, and when the available network bandwidth temporarily increases, the token generation rate can be temporarily increased by 20% (not exceeding the maximum quota). Low-level backtracking flows maintain a fixed token generation rate.
[0075] During rate limiting, the network status feedback unit collects the output traffic of the channel in real time. If the traffic exceeds the rate limit for three consecutive collection cycles (error greater than 5%), the token generation rate is reduced by 5% and a congestion warning is triggered. If the link packet loss rate is greater than 2% or the RTT is greater than 200ms, the token generation rate of the low-level backtracking flow is immediately reduced by 10% to 20%, and the released bandwidth resources are temporarily supplemented to the real-time command flow channel. After the rate limiting is completed, the traffic fluctuation value of each process backtracking flow channel is controlled within 5%, and the data stream after rate limiting and traffic statistics are output. The statistics include the average rate, peak rate and the number of rate limiting triggers, providing a basis for subsequent integration and shaping.
[0076] Step 305: Based on the preliminary bandwidth resource allocation and the data streams of each logical channel after rate limiting, perform integration and strategic shaping to obtain the scheduled data stream. Specifically, this includes: starting the data stream integration and shaping engine, which includes a stream aggregation unit, a shaping processing unit, and a quality verification unit; the stream aggregation unit first classifies and aggregates the real-time command stream data stream after preliminary bandwidth allocation and the process backtracking stream data stream after rate limiting according to the link identifier; the data streams on the same link are sorted according to the stream priority, with the real-time command stream always at the top, and the process backtracking streams arranged in order of high and medium priority; a timestamp synchronization mechanism is used during the aggregation process to ensure that the time base of the data streams of different channels is consistent, avoiding timing disorder in subsequent transmissions; the shaping processing unit performs strategic shaping on the aggregated data stream: first, frame sorting optimization, reassembling the I-frames, P-frames, and B-frames of the real-time command stream in the order of 1 I-frame + 4 P-frames + 2 B-frames to ensure priority transmission of key frames; second, traffic smoothing processing, using a leaky bucket. The algorithm performs secondary smoothing on the output rate of the aggregated data stream to match the output traffic with the available bandwidth of the link, avoiding congestion caused by traffic bursts. Thirdly, it performs redundant data compression, applying LZ4 compression to the video frame appendages of the process backtracking stream, with a compression ratio controlled between 10% and 20% to reduce bandwidth usage. After shaping, the data stream is encapsulated into standard IP packets, with link identifiers, priority identifiers, and checksums added to the packet header. The TTL value for the real-time command stream packets is set to 64, and for the process backtracking stream, it is set to 32, ensuring that the real-time stream arrives first in complex networks. The quality verification unit verifies the shaped data stream, checking frame integrity, rate stability, and data compression quality. If the frame loss rate of the real-time command stream is greater than 0.5% or the rate fluctuation is greater than 10%, the shaping parameters are readjusted. After successful verification, the algorithm outputs the scheduled data stream and a shaping report, which includes the rate, bandwidth usage, and quality indicators before and after shaping, providing high-quality and stable data stream input for subsequent processing.
[0077] In this embodiment of the invention, channelized video streams, complete channel attribute metadata, and real-time network status data are acquired simultaneously to achieve comprehensive aggregation of multi-dimensional information, providing a complete input basis for subsequent bandwidth control strategy formulation. By combining channel attributes, stream priority, and real-time network status with dynamically calculated parameters, the limitations of fixed parameters are broken, enabling bandwidth allocation weights and congestion control parameters to match the current transmission scenario, improving the adaptability and targeting of bandwidth control. Differentiated bandwidth allocation strategies are implemented for different types of video streams. The minimum bandwidth guarantee for real-time command streams ensures that core transmission needs are prioritized, while the flexible allocation of process backtracking streams achieves efficient utilization of network resources, balancing core needs and resource economy. Based on parameters and network status, graded smooth rate limiting is implemented for process backtracking streams to prevent them from consuming excessive bandwidth and causing network congestion. Simultaneously, smooth control reduces the impact of traffic fluctuations on network stability, indirectly ensuring the transmission quality of real-time command streams. Through integration and strategic shaping, dispersed data streams are optimized and integrated, making the transmission characteristics of the scheduled data streams more adaptable to the current network status, improving the overall efficiency and stability of data transmission.
[0078] In the subway security monitoring video rapid retrieval and multi-channel transmission optimization system described in this embodiment of the invention, the transmission module 400 receives the scheduled data stream and generates adaptive encoding parameters based on the device capability metadata and real-time link quality of the requesting terminal; it dynamically encodes and encapsulates the scheduled data stream according to the adaptive encoding parameters to generate a data packet to be transmitted; when transmitting the data packet to be transmitted, it monitors the integrity based on its metadata sequence identifier and triggers a corresponding retransmission mechanism to ensure reliable delivery, including:
[0079] Step 401: Receive the scheduled data stream and obtain the device decoding capability metadata, screen resolution parameters, and real-time link quality data of the requesting terminal. Specifically, this includes: receiving the scheduled data stream transmitted by the allocation module 300 through a high-concurrency data receiving unit. This data stream is transmitted in the form of IP data packets. The receiving unit is configured with a 10GE optical port to support high-bandwidth data access. At the same time, the data packet fragmentation and reassembly function is enabled to reassemble data packets exceeding the MTU value in real time to ensure data integrity. The data receiving stage integrates a flow identifier parsing unit. By parsing the link identifier and priority identifier in the header of the data packet, different types of data streams are classified and stored in independent memory buffers according to real-time command streams and process backtracking streams. The buffers adopt a circular overwrite mechanism, prioritizing the retention of real-time command stream data.
[0080] Simultaneously, the terminal capability and link quality acquisition unit is activated, and a capability query request is initiated to the requesting terminal through a device information interaction protocol (such as TR-069) to obtain the terminal's device decoding capability metadata, including supported encoding formats (H.264, H.265, AV1, etc.), maximum decoding resolution, upper limit of decoding frame rate, and hardware decoding resource usage; the terminal's physical screen resolution, display ratio, and current display mode are extracted through the screen parameter acquisition interface to determine the optimal resolution range for video output.
[0081] Link quality data collection employs a dual mechanism of end-to-end probing and network device feedback. It measures the round-trip delay between the terminal and the transmission module through ICMP echo requests and TCP handshake delays, calculates the link packet loss rate through SR / RR messages of the RTCP protocol, and uses NetFlow technology to statistically analyze the real-time available bandwidth and traffic fluctuations of the link. Simultaneously, it calls the interface of the subway security network management platform to obtain the port bandwidth utilization and bit error rate data of the core switches and routers. All collected data is updated at a 10ms cycle to form a real-time link quality dataset containing 12 indicators, which is stored in association with data flow and terminal capability data according to terminal identifier and data flow identifier.
[0082] Step 402: Based on the device decoding capability metadata, screen resolution parameters, and real-time link quality data, adaptive encoding parameters are obtained by calculating the final balance point between encoding complexity and bandwidth usage. Specifically, this includes: First, constructing a multi-factor balance calculation algorithm system, which includes a parameter constraint processing module, a weight allocation processing module, and a balance solution processing module. The parameter constraint processing module first extracts the multi-dimensional data obtained in step 401 to determine the boundary constraints of the encoding parameters: the encoding format must match the terminal decoding capability, the resolution must not exceed the minimum of the terminal screen resolution and the original resolution of the data stream, the frame rate must not exceed the upper limit of the terminal decoding frame rate, and the peak bit rate must not exceed 80% of the real-time available bandwidth of the link to reserve redundancy.
[0083] The weight allocation processing module, based on the emergency transmission needs of the subway, determines the weights of each constraint factor using the analytic hierarchy process (AHP): terminal decoding capability directly determines encoding compatibility, with a weight of 0.3; screen resolution affects display quality, with a weight of 0.2; link quality determines transmission stability, with a weight of 0.5. The sum of all weights is 1 and can be dynamically adjusted through the system configuration interface. The balance solution processing module aims for minimum encoding complexity and optimal bandwidth utilization. It establishes a mapping relationship between encoding parameters and each factor. Encoding complexity is represented by the product of the computational complexity coefficient of the encoding format and the resolution and frame rate, while bandwidth utilization is calculated using a bitrate algorithm.
[0084] For real-time command streams, low latency is prioritized, with H.265 encoding being the preferred format due to its moderate computational load and high compression efficiency. The frame rate is fixed at 25fps, and the resolution is matched to the screen resolution at a 1:1 ratio. The bitrate is dynamically adjusted based on the available bandwidth of the link to ensure that the bitrate fluctuation does not exceed ±10%. For process backtracking streams, storage efficiency is prioritized, with AV1 encoding being a viable option for its high compression ratio. The frame rate is set to 15fps, and the resolution is matched to 75% of the screen resolution. The bitrate is controlled within 50% of the available bandwidth of the link. After calculation, a complete adaptive encoding parameter set is output, including encoding format, resolution, frame rate, bitrate control mode, I-frame interval, and quantization parameters. The parameter set is stored in the parameter cache after being associated with the terminal and data stream identifiers and is recalculated every 50ms to adapt to changes in the link and terminal status.
[0085] Step 403: Based on the adaptive encoding parameters, perform real-time transcoding and protocol encapsulation on the scheduled data stream to obtain a data packet to be transmitted with a complete transmission metadata header and a sequence identifier. Specifically, this includes: starting a distributed transcoding engine, which adopts a CPU and GPU collaborative computing architecture. The GPU is responsible for parallel encoding processing of video frames, and the CPU is responsible for scheduling and controlling the data stream. The transcoding engine supports multiple encoding formats such as H.264, H.265, and AV1 and can be dynamically switched. During the transcoding process, the transcoding control unit calls the adaptive encoding parameters generated in step 402 to perform targeted processing on the scheduled data stream: a low-latency encoding mode is used for the real-time command stream, with the I-frame interval set to 100 frames to reduce encoding latency, and the quantization parameter dynamically adjusted within a range of 20 to 30; a high-compression encoding mode is used for the process backtracking stream, with the I-frame interval set to 300 frames, the quantization parameter adjusted within a range of 25 to 35, and intra-frame prediction optimization is enabled to improve compression efficiency.
[0086] After transcoding, the process moves to protocol encapsulation. The encapsulation unit selects the appropriate transmission protocol based on the terminal type and transmission scenario: RTSP is used for professional terminals in command centers to support real-time control; HLS is used for mobile terminals to improve compatibility; and SRT is used for emergency command vehicles to enhance anti-interference capabilities. During encapsulation, a complete transmission metadata header is constructed, containing eight fields: terminal identifier, data stream type, encoding parameter digest, sequence identifier (16-bit auto-incrementing integer), timestamp (accurate to milliseconds), data length, checksum, and transmission priority. The sequence identifier increments sequentially according to the data packet transmission order to ensure traceability of the transmission process.
[0087] After encapsulation, the data verification unit performs integrity and consistency checks on the data packets, checking the integrity of the metadata header fields, the continuity of the sequence identifier, and the matching of data lengths. If any abnormalities are found, the data packets are returned to the transcoding stage for reprocessing. After the verification is passed, a list of data packets to be transmitted containing the sequence identifier index is generated, providing a basis for subsequent transmission monitoring.
[0088] Step 404: During the transmission of the data packet to be transmitted, based on the sequence identifier and timestamp in its metadata header, end-to-end transmission integrity monitoring based on sliding window verification is performed to obtain a verification status report. Specifically, this includes: constructing a sliding window verification system, which includes a window management unit, a status acquisition unit, and a report generation unit; the window management unit initializes the sliding window parameters, setting the window size to 32, i.e., simultaneously monitoring the transmission status of 32 consecutive data packets; and setting the window sliding step size to 8 to ensure the continuity and efficiency of monitoring; after the data packet to be transmitted is sent through the transmission interface, the status acquisition unit receives the RTCPRR message and custom acknowledgment frame fed back by the receiving end in real time, and extracts the received sequence identifier, received timestamp, and error marker information from them.
[0089] The sliding window verification is performed as follows: the right boundary of the window is the maximum sequence identifier currently being sent, and the range of sequence identifiers within the window is determined; the received sequence identifiers fed back by the receiver are compared one by one with the identifiers within the window, and four states are marked: received, not received, received incorrectly, and out of order; for out-of-order data packets, the correct order is determined by comparing the timestamp with the sequence identifier, and the error type (checksum error, data incomplete, etc.) is recorded for received incorrect data packets.
[0090] During the verification process, the window management unit drives the window to slide once every 20ms, the status acquisition unit updates the status of each data packet synchronously, and the report generation unit generates a verification status report at a period of 50ms. The report includes the overall transmission success rate of data packets within the window, the list of unreceived identifiers, the list of error identifiers, the list of out-of-order identifiers, and the average transmission delay. The report is stored according to the terminal identifier and data stream identifier and pushed to the transmission control unit in real time, providing accurate basis for subsequent retransmission and error correction.
[0091] Step 405: When the verification status report indicates the presence of data packet loss, verification error, or out-of-order timing events, a selective retransmission request based on sequence identifiers is triggered. Simultaneously, based on the real-time link quality data, if it indicates a high bit error rate environment, a forward error correction mechanism is activated in parallel to supplement redundant data. This retransmission and error correction process continues iterating until all data packets are confirmed by the receiving end and a reliable delivery state is achieved. Specifically, this includes: after receiving the verification status report, immediately initiating an exception handling mechanism, first parsing the exception identifier list in the report, and locating the corresponding data packet and associated data stream type and terminal information through the sequence identifier; for data packets with loss, error, or out-of-order events, a selective retransmission request based on sequence identifiers is triggered: the retransmission request is sent using the UDP protocol, and the request message includes the terminal identifier, data stream identifier, list of exception sequence identifiers, and retransmission priority. The retransmission request for the real-time command stream is marked with the highest priority, and the process backtracking stream is marked according to the severity of the exception.
[0092] After receiving the request, the retransmission execution unit extracts the corresponding data packet from the data packet buffer and allocates retransmission bandwidth using a priority preemption strategy. Retransmission data packets from the real-time command flow are given priority in occupying link bandwidth. During retransmission, small packet fragmentation (1000 bytes per fragment) is enabled, and a retransmission marker is appended. The receiving end prioritizes reassembly upon receiving these fragments. Simultaneously, the link quality analysis unit reads the real-time link quality data from step 401. If a link error rate greater than 3% or a packet loss rate greater than 5% is detected, it is determined to be a high error rate environment, and the forward error correction mechanism is immediately activated in parallel.
[0093] The forward error correction mechanism uses the RS coding algorithm and dynamically adjusts the redundancy according to the bit error rate: the redundancy is set to 20% when the bit error rate is 3% to 5%, 30% when the bit error rate is 5% to 8%, and 50% when the bit error rate is greater than 8%. By attaching redundant data blocks to the transmitted data packets, the receiver can recover lost or erroneous data through the redundant information. The retransmission and error correction process is executed in a loop of request, processing, and confirmation, with each iteration cycle being 100ms, until the confirmation frame fed back by the receiver shows that all data packets with sequence identifiers have been successfully received, and the verification is error-free and the order is correct. At this time, the transmission control unit marks the data stream as having reached a reliable delivery state, stops the abnormal handling mechanism, and records the transmission log.
[0094] In this embodiment of the invention, the data stream after synchronous reception and scheduling is combined with the device decoding capability, screen resolution, and real-time link quality data of the requesting terminal. This achieves comprehensive aggregation of multi-dimensional information from both the transmitting and receiving ends, providing complete and accurate input support for subsequent encoding parameter formulation and avoiding encoding mismatch issues caused by missing information. Adaptive encoding parameters are generated by calculating the balance point between encoding complexity and bandwidth usage, ensuring that the parameter configuration aligns with both the terminal's decoding capability and display requirements, while also adapting to the real-time link transmission limit. This achieves optimal matching between encoding performance and transmission conditions, improving the rationality and applicability of the encoding parameters. Real-time transcoding and protocol encapsulation are performed based on the adaptive parameters to ensure that the encoded data stream is compatible with the terminal. The end-receiver standard, with its complete transmission metadata header and sequence identifier, ensures a standardized data packet structure, providing clear traceability for subsequent transmission integrity monitoring and improving data packet manageability. Sliding window checksum-based end-to-end monitoring of the transmission process, combined with sequence identifiers and timestamps, enables real-time awareness of data packet transmission status, quickly locating lost, erroneous, and out-of-order data packets, improving the efficiency and accuracy of transmission anomaly detection. Selective retransmission is triggered for transmission anomalies, avoiding bandwidth waste caused by full retransmission. In high error rate environments, forward error correction is used in parallel to supplement redundancy, forming a dual reliability guarantee mechanism. Continuous iteration ensures complete data packet delivery, strengthening data transmission reliability in complex transmission scenarios.
[0095] like Figure 2 As shown, a control method for a subway security monitoring video fast retrieval and multi-channel transmission optimization system is disclosed. The control method includes:
[0096] The feature set of multi-source heterogeneous metadata in the subway station is extracted and matched with the abnormal event template to obtain the matching confidence. If the matching confidence exceeds the preset threshold, the abnormal event is determined to have occurred and the event feature identifier is output. Based on the event feature identifier and combined with the spatial and scene information in the metadata, the scope of influence and the association path of the event are determined. Based on the scope of influence and the association path, a target device retrieval list containing device identifier, spatiotemporal weight and initial priority is obtained.
[0097] The target device retrieval list is parsed to obtain the spatiotemporal weight and initial priority of the device. Based on the spatiotemporal weight and initial priority, the target video resources are retrieved concurrently. The target video resources are divided into real-time command stream and process backtracking stream according to real-time performance. I / O and transmission resources are pre-allocated to them based on the initial priority to build corresponding logical channels, complete video stream binding, and obtain channelized video streams.
[0098] Receive channelized video streams and obtain their channel attributes, stream priority, and real-time network status; based on the channel attributes, stream priority, and real-time network status, perform differentiated bandwidth control strategies and strategic shaping on the channelized video streams to obtain the scheduled data streams;
[0099] The system receives the scheduled data stream and generates adaptive encoding parameters based on the device capability metadata and real-time link quality of the requesting terminal. It then dynamically encodes and encapsulates the scheduled data stream according to the adaptive encoding parameters to generate data packets to be transmitted. When transmitting the data packets to be transmitted, it monitors the integrity based on their metadata sequence identifier and triggers the corresponding retransmission mechanism to ensure reliable delivery.
[0100] Embodiments of the present invention also provide a computing device, including: a processor and a memory storing a computer program, wherein the computer program, when executed by the processor, performs the system as described above. All implementations in the above method embodiments are applicable to this embodiment and can achieve the same technical effects.
[0101] Embodiments of the present invention also provide a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the system as described above. All implementations in the above method embodiments are applicable to this embodiment and can achieve the same technical effects.
[0102] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A system for rapid retrieval and multi-channel transmission optimization of subway security monitoring videos, characterized in that, include: The analysis module is used to extract the feature set of multi-source heterogeneous metadata in the subway station and match it with the abnormal event template to obtain the matching confidence score. If the matching confidence exceeds the preset threshold, an abnormal event is determined to have occurred and an event feature identifier is output. Based on event feature identifiers and combined with spatial and scene information in metadata, the scope of influence and associated paths of the event are determined; based on the scope of influence and associated paths, a target device retrieval list containing device identifiers, spatiotemporal weights, and initial priorities is obtained; The processing module is used to parse the target device retrieval list to obtain the spatiotemporal weight and initial priority of the device, and to concurrently retrieve the target video resources based on the spatiotemporal weight and initial priority; The target video resources are divided into real-time command stream and process backtracking stream according to real-time requirements, and I / O and transmission resources are pre-allocated for them based on initial priority to build corresponding logical channels, complete video stream binding, and obtain channelized video streams. The allocation module is used to receive channelized video streams and obtain their channel attributes, stream priority, and real-time network status. Based on channel attributes, stream priority, and real-time network status, a differentiated bandwidth control strategy and strategic shaping are performed on the channelized video stream to obtain the scheduled data stream; The transmission module is used to receive the scheduled data stream and generate adaptive encoding parameters based on the device capability metadata and real-time link quality of the requesting terminal; it dynamically encodes and encapsulates the scheduled data stream according to the adaptive encoding parameters to generate a data packet to be transmitted. When transmitting data packets, integrity is monitored based on their metadata sequence identifiers, and corresponding retransmission mechanisms are triggered to ensure reliable delivery.
2. The subway security monitoring video rapid retrieval and multi-channel transmission optimization system according to claim 1, characterized in that, The analysis module includes: Extract feature sets from the multi-source heterogeneous metadata, which includes at least video content description metadata, camera metadata, passenger flow monitoring metadata and equipment alarm metadata, and the feature sets include at least semantic tag features, spatial coordinate features and numerical statistical features. Based on the feature set, its semantic label features, spatial coordinate features and numerical statistical features are calculated respectively, and the similarity between them and the corresponding category feature vectors in the predefined abnormal event template is obtained to obtain the similarity value of each category feature. Based on preset category weights, the similarity values of the features of each category are weighted and calculated to obtain the matching confidence score; The matching confidence level is compared with a preset threshold. If the threshold is exceeded, an abnormal event is determined to have occurred, and the event type and key feature identifier corresponding to the template are obtained as event feature identifiers.
3. The subway security monitoring video rapid retrieval and multi-channel transmission optimization system according to claim 2, characterized in that, The analysis module also includes: Based on the event feature identifier, the corresponding camera spatial location coordinates and video content geographic scene polygon information are retrieved from the multi-source heterogeneous metadata, and spatial reference unification and fusion are performed to construct a unified spatial data layer. Perform spatial topology analysis on the unified spatial data layer to calculate the topological inclusion, adjacency, and connectivity relationships between the event location and the view areas of each camera and scene polygons; Based on the topological inclusion, adjacency, and connectivity relationships, as well as the situation represented by event feature identifiers, a buffer analysis is performed to calculate and delineate the influence area of the event. Based on the affected area and the spatial connectivity obtained through spatial topology analysis, the event association paths are analyzed and determined. Based on the scope of influence and the associated path, a target device retrieval list is obtained by calculating the spatiotemporal proximity of each monitoring device to the event core. The target device retrieval list includes device identifier, spatiotemporal weight, and initial priority.
4. The subway security monitoring video rapid retrieval and multi-channel transmission optimization system according to claim 3, characterized in that, The processing module includes: Parse the target device retrieval list to obtain the device identifier, spatiotemporal weight, and initial priority of each target device; Based on the spatiotemporal weights and initial priorities, a comprehensive retrieval priority value is generated for each target device through weighted calculation; Based on the comprehensive retrieval priority value, concurrent priority retrieval requests are initiated to the video storage system to obtain the target video resources corresponding to each target device; The target video resources are analyzed in real time, and classified and labeled as real-time command streams and historical process backtracking streams based on the difference between their recording time and the current time and the stream status.
5. The subway security monitoring video rapid retrieval and multi-channel transmission optimization system according to claim 4, characterized in that, The processing module further includes: Based on the initial priority, differentiated resource allocation algorithms are executed for the real-time command stream and the process backtracking stream, respectively. The differentiated resource allocation algorithm determines the basic resource allocation boundary by constructing and analyzing a multi-dimensional resource demand vector set for various video streams, and adjusts the basic resource allocation boundary with weights based on the initial priority, generating and outputting the exclusive resource quota for each type of video stream. The resource quota includes the storage I / O access queue depth and the network transmission bandwidth quota. Based on the resource quota instantiation corresponding to the logical channel control structure, independent logical channels are constructed for the real-time command flow and the process backtracking flow, and their initialization is completed. The real-time command stream and the process backtracking stream are injected and bound to the corresponding logical channels constructed for the real-time command stream and the process backtracking stream according to their categories, and the association mapping is completed to obtain the channelized video stream and its channel attribute metadata.
6. The subway security monitoring video rapid retrieval and multi-channel transmission optimization system according to claim 5, characterized in that, The allocation module includes: The system receives the channelized video stream and its channel attribute metadata, and collects network status data in real time. The channel attribute metadata includes channel attributes and stream priority. Based on the channel attributes, flow priority, and the collected real-time network status data, the bandwidth allocation weight and congestion control parameters are dynamically calculated for each logical channel. Based on the bandwidth allocation weights, a minimum bandwidth guarantee strategy is executed for the logical channel binding the real-time command flow, and an elastic allocation strategy based on available network bandwidth is executed for the logical channel binding the process backtracking flow, thus completing the initial bandwidth resource allocation. Based on the congestion control parameters and real-time network status data, priority-based hierarchical smooth rate limiting control is implemented on the output flow of the process backtracking flow channel to obtain the data flow of each logical channel after rate limiting control. Based on the initial bandwidth resource allocation and the data streams of each logical channel that have undergone rate limiting control, integration and strategic shaping are performed to obtain the scheduled data streams.
7. The subway security monitoring video rapid retrieval and multi-channel transmission optimization system according to claim 6, characterized in that, The transmission module includes: Receive the scheduled data stream and obtain the device decoding capability metadata, screen resolution parameters, and real-time link quality data of the requesting terminal; Based on the device's decoding capability metadata, screen resolution parameters, and real-time link quality data, adaptive encoding parameters are obtained by calculating the final balance point between encoding complexity and bandwidth usage. Based on the adaptive encoding parameters, real-time transcoding and protocol encapsulation are performed on the scheduled data stream to obtain a data packet to be transmitted with a complete transmission metadata header and a sequence identifier. During the transmission of the data packet to be transmitted, end-to-end transmission integrity monitoring based on sliding window verification is performed according to the sequence identifier and timestamp in its metadata header to obtain a verification status report; When the verification status report indicates that there are data packet loss, verification error, or out-of-order timing events, a selective retransmission request based on sequence identifier is triggered. At the same time, based on the real-time link quality data, if it indicates that the current environment is a high bit error rate environment, a forward error correction mechanism is activated in parallel to supplement redundant data. This retransmission and error correction process continues to iterate until all data packets are confirmed by the receiving end and a reliable delivery state is achieved.
8. A control method for a subway security monitoring video rapid retrieval and multi-channel transmission optimization system, characterized in that, Applied to the system as described in any one of claims 1 to 7, the method comprises: The feature set of multi-source heterogeneous metadata in the subway station is extracted and matched with the abnormal event template to obtain the matching confidence. If the matching confidence exceeds the preset threshold, the abnormal event is determined to have occurred and the event feature identifier is output. Based on the event feature identifier and combined with the spatial and scene information in the metadata, the scope of influence and the association path of the event are determined. Based on the scope of influence and the association path, a target device retrieval list containing device identifier, spatiotemporal weight and initial priority is obtained. The target device retrieval list is parsed to obtain the spatiotemporal weight and initial priority of the device. Based on the spatiotemporal weight and initial priority, the target video resources are retrieved concurrently. The target video resources are divided into real-time command stream and process backtracking stream according to real-time performance. I / O and transmission resources are pre-allocated to them based on the initial priority to build corresponding logical channels, complete video stream binding, and obtain channelized video streams. Receive channelized video streams and obtain their channel attributes, stream priority, and real-time network status; based on the channel attributes, stream priority, and real-time network status, perform differentiated bandwidth control strategies and strategic shaping on the channelized video streams to obtain the scheduled data streams; The system receives the scheduled data stream and generates adaptive encoding parameters based on the device capability metadata and real-time link quality of the requesting terminal. It then dynamically encodes and encapsulates the scheduled data stream according to the adaptive encoding parameters to generate data packets to be transmitted. When transmitting the data packets to be transmitted, it monitors the integrity based on their metadata sequence identifier and triggers the corresponding retransmission mechanism to ensure reliable delivery.
9. A computing device, characterized in that, include: One or more processors; A storage device for storing one or more programs, which, when executed by one or more processors, cause the one or more processors to implement the system as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a program that, when executed by a processor, implements the system as described in any one of claims 1 to 7.