The invention provides a
port security and protection management method and
system based on target detection and a large
language model, and the method comprises the steps: obtaining real-time and historical video streams, carrying out the framing
processing, generating a to-be-detected image and a historical training image, training a YOLOv5x
network model through employing the marked historical image to construct a security and protection alarm event detection model, and carrying out the detection of the security and protection alarm event. The method comprises the following steps: acquiring a to-be-detected image, inputting the to-be-detected image into a model for target detection, outputting a target detection result for triggering alarm, screening out effective alarm data by using a DeepSeek VL large
language model, converting the effective alarm data into a
structured document, segmenting the document into a plurality of different semantic data blocks by using a DeepSeek R1 large
language model, and performing target detection on the segmented semantic data blocks. The method comprises the following steps: firstly, extracting a data block, converting the data block into a
semantic vector by utilizing an Embedding model, storing the
semantic vector into a vector
database, finally receiving a
natural language query request of a user, vectorizing a
query statement, retrieving the matched
semantic vector from the vector
database, generating a cue word based on a
retrieval result in combination with the query request, and further generating a response report through a large language model. And port intelligent
security alarm and disposal are completed.