A visual large model security identification method based on an MCP protocol

By using the MCP protocol and spatiotemporal attention mechanism, the problems of high computational resource consumption and difficulty in information fusion of large visual models in security equipment are solved, realizing efficient multi-model collaborative recognition and improving the recognition accuracy and response speed of security systems.

CN122156704APending Publication Date: 2026-06-05BEIJING AEROSPACE WANYUAN TECH CO LTD +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING AEROSPACE WANYUAN TECH CO LTD
Filing Date
2025-07-02
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Large visual models consume significant computational resources and suffer from high inference latency in security equipment. Furthermore, it is difficult to achieve effective information fusion and task division between different models, which limits the level of intelligence.

Method used

The MCP protocol is used to achieve cross-model context alignment and information sharing. By combining two-stream feature extraction, spatiotemporal attention mechanism and contrastive learning loss function, the model output priority and feature space consistency are dynamically adjusted. Multi-model collaborative recognition improves recognition accuracy and response speed.

Benefits of technology

It significantly improves recognition accuracy and response speed under multiple cameras, multiple tasks, and multiple scenarios, reduces computing resource requirements, and enhances the robustness and engineering feasibility of the system, making it suitable for complex security scenarios such as smart cities, airports, and train stations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122156704A_ABST
    Figure CN122156704A_ABST
Patent Text Reader

Abstract

The application discloses a visual large model security and protection identification method based on an MCP protocol, and systematically constructs a multi-model cooperative identification framework for complex security and protection scenes. Compared with a traditional security and protection identification system, the application not only significantly improves the identification precision and response speed in a multi-camera, multi-task and multi-scene environment, but also effectively solves key problems such as model redundant calculation, context island and cooperation bottleneck. On the basis of ensuring the precision of original models, the application realizes the modular deployment and low-resource adaptation of a visual system, and significantly reduces the engineering complexity and maintenance cost of constructing a multi-model security and protection system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a visual large-scale model security identification method based on the MCP protocol. Background Technology

[0002] With the rapid development of artificial intelligence technology, computer vision has been widely applied in the field of security monitoring, especially demonstrating significant performance in key tasks such as video structured analysis, behavior recognition, face recognition, and anomaly detection. In recent years, the development of large-scale visual models has led to a significant leap in visual understanding capabilities, surpassing traditional lightweight models in performance across multiple scenarios and tasks, exhibiting extremely strong representational capabilities and transfer learning potential. However, large-scale visual models consume large computational resources and have high inference latency, making it difficult to meet the practical requirements of high concurrency and low latency when directly applied to edge security devices. Furthermore, differences in architecture and semantic understanding methods among different visual models make it difficult to achieve effective information fusion and task division in multi-model collaboration, severely restricting the intelligence level of visual systems. Summary of the Invention

[0003] In view of the many shortcomings and deficiencies of existing security vision systems in terms of multi-model collaborative processing, context information sharing, and dynamic task scheduling, the purpose of this invention is to provide a large-model visual security recognition method based on the MCP protocol.

[0004] To achieve the above objectives, the solution of the present invention is as follows:

[0005] A visual large-scale model security identification method based on the MCP protocol, the method comprising the following steps:

[0006] Step S1: Acquire raw video or image data from different visual sensors;

[0007] 1.1 Preprocess the raw video or image data to form a unified image size and color standard;

[0008] 1.2. Set an input image as I∈R H×W×C Where: H is the height of the image, W is the width, and C is the number of channels;

[0009] 1.3 The preprocessed image is represented as I′∈R H′×W′×C′ , where H′ and W′ are the adjusted image height and width dimensions, and C′ is the number of channels after normalization or enhancement;

[0010] Step S2: Use a two-stream feature extraction network to extract local and global features from the input image. Local features are the details in the image, and global features are the entire scene. Use a convolutional neural network to extract local features from the image. The local features are represented as F. local ∈Rdlocal ,in: dlocal This refers to the dimension of local features. Let I′ pass through a convolutional neural network C. The local features are represented by Equation 1. A global feature extraction network is used to capture overall visual information, and the resulting global features are represented by Equation 2. Concatenating the local and global features yields the visual features represented by Equation 3.

[0011] Flocal=Clocal(I′) Formula 1

[0012] Fglobal=Cglobal(I′) Formula 2

[0013] Fvisual=Concat(Flocal,Fglobal) Formula 3

[0014] Step S3: Use the MCP protocol to align the context across models, realize the acquisition of multiple camera data sources, connect the visual information of multiple visual models or multiple cameras, and enable information sharing and alignment between different models; through the adaptive projection mechanism, make the geometry consistent between different feature spaces, thereby promoting multi-model collaborative recognition.

[0015] Step S4: Introduce a spatiotemporal attention mechanism to dynamically adjust the attention area of ​​the visual model across multiple cameras and spatial scales. Through the spatiotemporal attention mechanism, the attention to important areas is automatically adjusted according to the dynamic changes of the scene, thereby improving the recognition accuracy of target objects or events. The output priority of each model is dynamically adjusted according to the needs of the current monitoring task through the MCP protocol.

[0016] Step S5: Based on the above steps, the outputs of multiple visual models are integrated and optimized to make the visual features and language embedding spaces geometrically consistent. The visual and language feature spaces are simultaneously optimized using a contrastive learning loss function to enhance the overall robustness.

[0017] The solution is further as follows: In step S3, let model M... i The extracted feature is F Mi ∈R di Then, the cross-model context alignment process can be achieved by calculating an adaptive projection function P from Equation 4. i accomplish:

[0018] FMi′=Pi(FMi)Pi:Rdi→Rd′ Formula 4

[0019] Where: d′ is the dimension of the feature space after target alignment, and the aligned feature FMi′ is used for subsequent feature fusion.

[0020] The solution further includes: In step S4, let the visual features at the current moment be represented as F. t∈R dt The goal of the spatiotemporal attention mechanism is to assign a weight coefficient α∈R to each camera and the visual features at the spatial scale. H×W This represents the level of attention given to each spatial location at the current moment. The spatiotemporal attention weight is calculated using the attention mechanism formula 5:

[0021] α t =Softmax(Attention(F t )) Formula 5

[0022] Where: Attention(F t ) is based on input features F t The calculated attention score, and the final weighted feature, are calculated using Formula 6:

[0023]

[0024] The solution further includes: In step S5, the simultaneous optimization of the visual and linguistic feature spaces using a contrastive learning loss function to enhance overall robustness involves optimizing the final decision result through a multi-granularity alignment loss function to ensure accurate event detection and behavior recognition; let the visual feature space be F. visual ∈R dvisual The language embedding space is F language ∈R dlanguage The joint optimization objective is to maximize the contrast consistency between the visual and linguistic feature spaces, and the contrast loss function is expressed by Equation 7:

[0025]

[0026] Where sim(x, y) represents the similarity between two feature vectors, the final decision is achieved through a weighted loss function, as shown in formula 8:

[0027] L final =λ1L contrastive +λ2L alignment +λ3L task Formula 8;

[0028] Where λ1, λ2, and λ3 are hyperparameters, which are the weights controlling the contrast loss, alignment loss, and task loss, respectively.

[0029] The beneficial effects of this invention are:

[0030] This method systematically constructs a multi-model collaborative recognition framework for complex security scenarios. Compared with traditional security recognition systems, this invention not only significantly improves recognition accuracy and response speed in multi-camera, multi-task, and multi-scenario environments, but also effectively solves key problems such as redundant model computation, context silos, and collaborative bottlenecks. While ensuring the accuracy of the original model, it achieves modular deployment and low-resource adaptation of the vision system, significantly reducing the engineering complexity and maintenance cost of building a multi-model security system.

[0031] The invention will be further explained in detail below with reference to the accompanying drawings and specific embodiments. Attached Figure Description

[0032] Figure 1 This is a schematic diagram of the method flow of the present invention;

[0033] Figure 2 This is a schematic diagram of visual feature extraction in step S2;

[0034] Figure 3 This is a schematic diagram of MCP protocol alignment in step S3;

[0035] Figure 4 This is a schematic diagram of dynamically adjusting the visual model based on the spatiotemporal attention mechanism in step S4;

[0036] Figure 5 This is a flowchart of the data acquisition process for multiple camera data sources based on the MCP protocol. Detailed Implementation

[0037] MCP (Model Context Protocol) can help us build complex workflows. The MCP protocol features integrated datasets, decoupling, and the ability to prevent data and tools from being uploaded to remote locations, while protecting data privacy. Therefore, a large-scale visual model-based security identification method based on the MCP protocol, such as... Figure 1 As shown, the method includes the following steps:

[0038] Step S1: Acquire raw video or image data from different visual sensors (such as cameras, infrared sensors, etc.);

[0039] 1.1 Perform preliminary preprocessing on the original video or image data. The goal of preprocessing is to sharpen the image, remove noise, unify the image size, and standardize the colors, so as to improve the computational efficiency and accuracy of the subsequent feature extraction process.

[0040] 1.2. Set the input image to I∈R H×W×C Where H is the height of the image, W is the width, and C is the number of channels;

[0041] 1.3 The preprocessed image is represented as I′∈R H′×W′×C′ , where H′ and W′ are the adjusted image sizes, and C′ is the number of channels after normalization or enhancement;

[0042] Step S2, as follows Figure 2 As shown, a two-stream feature extraction network is used to extract local and global features from the input image. Local features are details in the image (e.g., faces, object outlines, etc.), while global features are the entire scene (e.g., the layout of the entire room or the relative positions of multiple objects). These features can provide richer semantic information for subsequent cross-modal alignment. A convolutional neural network is used to extract local features from the image, and the local features are represented as F. local ∈R dlocal ,in dlocal This refers to the dimension of local features. Let I′ pass through a convolutional neural network C. The local features can then be represented by formula 1. A global feature extraction network is used to capture overall visual information, and the resulting global features are represented by formula 2. Based on this, the final visual feature representation can be obtained by concatenating local and global features, as represented by formula 3.

[0043] Flocal=Clocal(I′) Formula 1

[0044] Fglobal=Cglobal(I′) Formula 2

[0045] Fvisual=Concat(Flocal,Fglobal) Formula 3

[0046] Step S3, as follows Figure 3 As shown, the MCP protocol is used to achieve cross-model context alignment. It can also acquire data from multiple camera sources. This layer interfaces visual information from multiple visual models or multiple cameras, ensuring information sharing and alignment between different models. Through an adaptive projection mechanism, it ensures geometric consistency between different feature spaces, promoting multi-model collaborative recognition.

[0047] The core objective of this layer is to align the features extracted by each model, thereby improving the correlation between visual features and the language model; assuming model M... i The extracted feature is F Mi ∈R di The cross-model alignment process can be achieved by calculating an adaptive projection function P from Equation 4. i accomplish:

[0048] FMi′=Pi(FMi)Pi:Rdi→Rd′ Formula 4

[0049] Where d′ represents the dimension of the feature space after target alignment. The aligned features FMi′ are used for subsequent feature fusion;

[0050] Step S4, as follows Figure 4 As shown, a spatiotemporal attention mechanism is introduced to dynamically adjust the visual model's region of interest across multiple cameras and spatial scales. Through this mechanism, the system can automatically adjust its attention to important regions based on dynamic changes in the scene, improving the accuracy of target object or event recognition. Furthermore, the output priority of each model is dynamically adjusted according to the needs of the current monitoring task using the MCP protocol.

[0051] To adapt to different security scenarios, let the visual features at the current moment be represented by F. t ∈R dt The goal of the spatiotemporal attention mechanism is to assign a weight coefficient α∈R to each camera and the visual features at the spatial scale. H×W This represents the level of attention given to each spatial location at the current moment. The spatiotemporal attention weight is calculated using the attention mechanism formula 5:

[0052] α t =Softmax(Attention(F t )) Formula 5

[0053] Where: Attention(F t ) is based on input features F t The calculated attention score, and the final weighted feature, are calculated using Formula 6:

[0054]

[0055] Step S5, as follows Figure 5 As shown, the outputs of multiple visual models are integrated and optimized based on the above steps to improve overall recognition accuracy. A joint optimization strategy is used to achieve geometric consistency between visual features and language embedding spaces. A contrastive learning loss function is used to simultaneously optimize the visual and language feature spaces, enhancing overall robustness.

[0056] Contrastive learning loss functions are used to simultaneously optimize visual and linguistic feature spaces, enhancing overall robustness. The final decision result is optimized using a multi-granularity alignment loss function to ensure accurate event detection and behavior recognition. Let the visual feature space be F. visual ∈R dvisual The language embedding space is F language ∈R dlanguage The joint optimization objective is to maximize the contrastive consistency between the visual and linguistic feature spaces. The contrastive loss function is expressed by Equation 7:

[0057]

[0058] Where sim(x, y) represents the similarity between two feature vectors, the final decision is made through a weighted loss function, and the implementation method is expressed by the calculation formula 8 as follows.

[0059] L final =λ1L contrastive +λ2L alignment +λ3L task Formula 8;

[0060] Where λ1, λ2, and λ3 are hyperparameters, which are the weights controlling the contrast loss, alignment loss, and task loss, respectively.

[0061] As can be seen from the above technical solutions, the visual large-model security recognition method provided in this embodiment defines a standardized interface through the MCP protocol, enabling visual models to share key contextual information (such as behavioral patterns, human characteristics, scene changes, etc.) and dynamically adjust model output according to the actual monitoring scenario. Based on this architecture, the system can significantly improve the accuracy and real-time performance of security recognition in multi-camera and complex scenarios through collaborative optimization between models. Furthermore, this technology innovatively introduces a cross-model alignment strategy and task priority scheduling mechanism, effectively reducing information loss between models and improving emergency response capabilities in security scenarios. The multi-model collaboration and dynamic adjustment achieved through the MCP protocol enable the system to adapt to different environments, improving its robustness and stability. Validation in public datasets and real-world security deployment scenarios shows that the Top-1 accuracy is improved to 91.7% in multi-camera human re-identification tasks, and the F1 score reaches 87.2% in video anomaly detection tasks. Simultaneously, the average inference latency is reduced by 32%, and the overall model parameter count is reduced by 38%, demonstrating superior engineering feasibility and task generalization ability. This technology can be widely applied to various security monitoring scenarios such as smart cities, airports, train stations, industrial parks, and communities. It is particularly suitable for complex tasks such as multi-point deployment, high-risk identification, and dynamic scheduling, significantly improving the intelligent identification, event prediction, and rapid response capabilities of security systems.

[0062] The above embodiments are merely preferred embodiments of the present invention and descriptions of the technical principles employed, and are not intended to limit the scope of the claimed invention, but merely to illustrate preferred embodiments. Those skilled in the art should understand that the scope of the invention is not limited to the specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the inventive concept. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.

Claims

1. A visual large-scale model security identification method based on the MCP protocol, characterized in that, The steps of the method include: Step S1: Acquire raw video or image data from different visual sensors; 1.1 Preprocess the raw video or image data to form a unified image size and color standard; 1.

2. Set an input image as I∈R H×W×C Where: H is the height of the image, W is the width, and C is the number of channels; 1.3 The preprocessed image is represented as I′∈R H′×W′×C′ , where H′ and W′ are the adjusted image height and width dimensions, and C′ is the number of channels after normalization or enhancement; Step S2: Use a two-stream feature extraction network to extract local and global features from the input image. Local features are the details in the image, and global features are the entire scene. Use a convolutional neural network to extract local features from the image. The local features are represented as F. local ∈R dlocal ,in: dlocal This refers to the dimension of local features. Let I′ pass through a convolutional neural network C. The local features are represented by Equation 1. A global feature extraction network is used to capture overall visual information, and the resulting global features are represented by Equation 2. Concatenating the local and global features yields the visual features represented by Equation 3. Flocal=Clocal(I′) Formula 1 Fglobal=Cglobal(I′) Formula 2 Fvisual=COncat(Flocal,Fglobal) Formula 3 Step S3: Use the MCP protocol to align the context across models, realize the acquisition of multiple camera data sources, connect the visual information of multiple visual models or multiple cameras, and enable information sharing and alignment between different models; through the adaptive projection mechanism, make the geometry consistent between different feature spaces, thereby promoting multi-model collaborative recognition. Step S4: Introduce a spatiotemporal attention mechanism to dynamically adjust the attention area of ​​the visual model across multiple cameras and spatial scales. Through the spatiotemporal attention mechanism, the attention to important areas is automatically adjusted according to the dynamic changes of the scene, thereby improving the recognition accuracy of target objects or events. The output priority of each model is dynamically adjusted according to the needs of the current monitoring task through the MCP protocol. Step S5: Based on the above steps, the outputs of multiple visual models are integrated and optimized to make the visual features and language embedding spaces geometrically consistent. The visual and language feature spaces are simultaneously optimized using a contrastive learning loss function to enhance the overall robustness.

2. The visual large-scale model security identification method based on the MCP protocol according to claim 1, characterized in that, In step S3, let model M i The extracted feature is F Mi ∈R di Then, the cross-model context alignment process can be achieved by calculating an adaptive projection function P from Equation 4. i accomplish: FMi′=Pi(FMi)Pi:Rdi→Rd′ Formula 4 Where: d′ is the dimension of the feature space after target alignment, and the aligned feature FMi′ is used for subsequent feature fusion.

3. The visual large-scale model security identification method based on the MCP protocol according to claim 1, characterized in that, In step S4, let the visual features at the current moment be represented as F. t ∈R dt The goal of the spatiotemporal attention mechanism is to assign a weight coefficient α∈R to each camera and the visual features at the spatial scale. H×W This represents the level of attention given to each spatial location at the current moment. The spatiotemporal attention weight is calculated using the attention mechanism formula 5: α t = Softmax(Attention(F t )) Equation 5 Where: Attention(F t ) is based on input features F t The calculated attention score, and the final weighted feature, are calculated using Formula 6:

4. The visual large-scale model security identification method based on the MCP protocol according to claim 1, characterized in that, In step S5, the simultaneous optimization of the visual and linguistic feature spaces using a contrastive learning loss function to enhance overall robustness involves optimizing the final decision result through a multi-granularity alignment loss function to ensure accurate event detection and behavior recognition; let the visual feature space be F. visual ∈R dvisual The language embedding space is F language ∈R dlanguage The joint optimization objective is to maximize the contrast consistency between the visual and linguistic feature spaces, and the contrast loss function is expressed by Equation 7: Where sim(x, y) represents the similarity between two feature vectors, the final decision is achieved through a weighted loss function, as shown in formula 8: L final =λ1L contrastive +λ2K alignment +λ3L task Formula 8; Where λ1, λ2, and λ3 are hyperparameters, which are the weights controlling the contrast loss, alignment loss, and task loss, respectively.