A surveillance video character retrieval method and system based on vector database

Through the monitoring video character retrieval method based on vector database, the problem of storing and retrieval of massive video image vector data is solved, fast retrieval and efficient storage are achieved, and second-level response capabilities are provided, filling the technical gap in video character detection and vector retrieval.

CN114461854BActive Publication Date: 2024-12-24CHINA TELECOM CLOUD TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111578453.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-22
Publication Date
2024-12-24
Estimated Expiration
2041-12-22

AI Technical Summary

Technical Problem

The prior art is difficult to efficiently store and retrieve massive video image vector data, traditional databases are difficult to meet the needs of second-level response, and lack mature video character detection and vector retrieval solutions.

Method used

Using a monitoring video character search method based on vector database, time domain segmentation and aggregation is performed through face detection and clustering, vector database and Mysql database are established, and the searched character pictures are vectorized, and videos are obtained using vector database and Mysql database. Fragment.

Benefits of technology

It realizes rapid retrieval and effective storage of face features, reduces retrieval costs, improves performance, and supports fast and efficient retrieval of massive face feature libraries.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114461854B_ABST
    Figure CN114461854B_ABST
Patent Text Reader

Abstract

The present invention discloses a surveillance video character retrieval method and system based on a vector database, including: performing face detection and clustering on key frames of the retrieved video, and performing time domain segmentation and aggregation processing on all key picture frames of the retrieved video, establishing a vector database and a Mysql database; performing vectorization processing on the acquired character picture to be retrieved, and obtaining the video clip corresponding to the character picture based on the vectorization processing result and the vector database and the Mysql database. The present invention is an overall solution for surveillance video time domain segmentation, portrait feature extraction and retrieval analysis, which can extract face features from a large number of surveillance videos, build a video portrait feature database (vector database), quickly retrieve which video clips the target person appears in and display them intuitively, and can be effectively applied to a variety of actual scenarios of portrait video retrieval analysis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of big data AI video image retrieval, and in particular to a surveillance video character retrieval method and system based on a vector database. Background Art

[0002] In the context of the widespread development of intelligent data services, data intelligence faces challenges. Due to the popularity of intelligent edge devices, unstructured data (such as pictures, videos, voice and text) has shown an explosive growth trend, which has posed a huge challenge to unstructured data mining tasks based on AI algorithms. In application scenarios such as video intelligent retrieval, intelligent customer service, person-vehicle ReID, and image search, unstructured data will be vectorized after being processed by deep learning models.

[0003] One of the current mainstream directions of video retrieval analysis is video structured query analysis for structured data, which can be applied to text search for video and text search for image. However, traditional structured storage databases cannot meet the needs of rapid retrieval of massive unstructured data. Video vectorized retrieval analysis for unstructured data can be applied to image search and image search for video. However, there are several pain points in the current storage and processing of video vector data: (1) The amount of video and image vector data is large, and the traditional relational database storage structure makes it difficult to efficiently store vector arrays. (2) Traditional vector retrieval uses a brute force retrieval method, which is difficult to meet the second-level response requirements in application scenarios. (3) Compared with the industry's mature image recognition and video processing technologies, the industry currently lacks a mature overall solution for video character detection and vector retrieval. Summary of the invention

[0004] Therefore, the technical problem to be solved by the present invention is to overcome the defects in the prior art that it is difficult to efficiently store vector arrays and vector retrieval is difficult to meet the second-level response in application scenarios, thereby providing a surveillance video character retrieval method and system based on a vector database.

[0005] In order to achieve the above object, the present invention provides the following technical solutions:

[0006] In the first aspect, an embodiment of the present invention provides a surveillance video character retrieval method based on a vector database, including: performing face detection and clustering on key frames of the retrieved video, and performing time domain segmentation and aggregation processing on all key image frames of the retrieved video, and establishing a vector database and a Mysql database; performing vectorization processing on the image of the person to be retrieved, and obtaining a video clip corresponding to the image of the person based on the vectorization processing result and the vector database and the Mysql database.

[0007] In one embodiment, the process of performing face detection and clustering on key frames of the retrieved video includes: extracting key frames in the retrieved video based on the inter-frame difference method; performing face detection and clustering based on the key frames to obtain a key vector of each face and its corresponding unique identification ID.

[0008] In one embodiment, the process of extracting key frames in the retrieved video based on the inter-frame difference method includes: calculating the difference in grayscale values ​​of corresponding pixels of each two adjacent frames in the retrieved video; when the difference is greater than a preset threshold, selecting the next frame as the key frame.

[0009] In one embodiment, a process of performing face detection and clustering based on key frames to obtain a key vector of each face and its corresponding unique identification ID includes: using a CNN detector algorithm to extract key frames containing face images from key frames; detecting faces in key frames containing face images, and mapping each face to the key frame containing the face image to obtain multiple face vectors for each face; using a clustering algorithm to cluster all face vectors to obtain a face vector cluster for each face; selecting at least one key vector in each face vector cluster to obtain a unique identification ID for each key vector.

[0010] In one embodiment, the process of performing time domain segmentation and aggregation processing on all key picture frames of the retrieved video includes: for each face, using a preset interval difference threshold, grouping all key picture frames containing the face to obtain multiple frame groups and video time periods for each face.

[0011] In one embodiment, the process of establishing the vector database and the Mysql database includes: storing the face vector and its corresponding unique identification ID in the vector database;

[0012] The unique identification ID of the face vector and the video information data are stored in the Mysql database, wherein the video information data includes: each frame group based on each face and its video time period and video path.

[0013] In one embodiment, a process of performing vectorization processing on a picture of a person to be retrieved, and obtaining a video clip corresponding to the picture of the person based on the vectorization processing result and a vector database and a Mysql database includes: performing vectorization processing on the picture of the person to be retrieved to obtain a face vector of the person to be retrieved; retrieving an identification ID corresponding to the face vector of the person to be retrieved based on information stored in the vector database; querying the Mysql database for all time domain ranges in which the person to be retrieved appears continuously in the retrieved video based on the identification ID corresponding to the face vector of the person to be retrieved; and cutting the retrieved video based on the time domain range to obtain a video clip corresponding to the picture of the person.

[0014] In the second aspect, an embodiment of the present invention provides a surveillance video character retrieval system based on a vector database, including: establishing a database module, used to perform face detection and clustering on the key frames of the retrieved video, and perform time domain segmentation and aggregation processing on all key image frames of the retrieved video to establish a vector database; a retrieval module, used to perform vectorization processing on the acquired character images, and obtain video clips corresponding to the character images based on the vectorization processing results and the vector database and MySQL database.

[0015] In a third aspect, an embodiment of the present invention provides a computer device, comprising: at least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor executes the surveillance video character retrieval method of the vector database of the first aspect of the embodiment of the present invention.

[0016] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable a computer to execute the surveillance video character retrieval method of the vector database of the first aspect of the embodiment of the present invention.

[0017] The technical solution of the present invention has the following advantages:

[0018] 1. The surveillance video character retrieval method and system of the vector database provided by the present invention performs face detection and clustering on the key frames of the retrieved video, and performs time domain segmentation and aggregation processing on all key picture frames of the retrieved video to establish a vector database and a Mysql database; vectorization processing is performed on the acquired character pictures to be retrieved, and based on the vectorization processing results and the vector database and the Mysql database, the video clips corresponding to the character pictures are obtained. The present invention is an overall solution for surveillance video time domain segmentation, portrait feature extraction and retrieval analysis. It can extract facial features from a large number of surveillance videos, build a video portrait feature database (vector database), quickly retrieve which video clips the target person appears in and display them intuitively, and can be effectively applied to a variety of actual scenarios of portrait video retrieval analysis.

[0019] 2. The surveillance video character retrieval method and system of the vector database provided by the present invention groups and aggregates the image frames according to a suitable threshold through an aggregation algorithm, and then converts them into video time periods. This avoids storing all the frames in the database, but directly stores the time periods for query and display, greatly reducing the number of result records and the amount of invalid stored data. At the same time, it reduces the data processing steps in the query process and improves the result retrieval efficiency.

[0020] 3. The surveillance video character retrieval method and system of the vector database provided by the present invention adopts vector feature efficient retrieval including: using the vector database to perform similarity search for massive feature vectors, processing feature vectors through heterogeneous many-core computing, so that the cost of face vector retrieval is lower and the performance is better. At the same time, the database supports multiple indexing methods. With the increasing expansion of video libraries and face feature libraries, the closest face vector can be retrieved quickly and efficiently in the massive face feature library. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0022] Figure 1 A flowchart of a specific example of a retrieval method provided by an embodiment of the present invention;

[0023] Figure 2 A flowchart of another specific example of the retrieval method provided by an embodiment of the present invention;

[0024] Figure 3 A flowchart of another specific example of the retrieval method provided by an embodiment of the present invention;

[0025] Figure 4 A time domain segmentation algorithm rule effect diagram provided by an embodiment of the present invention;

[0026] Figure 5 A flowchart of another specific example of the retrieval method provided by an embodiment of the present invention;

[0027] Figure 6 A system flow architecture diagram provided for an embodiment of the present invention;

[0028] Figure 7 A composition diagram of a specific example of a retrieval system provided by an embodiment of the present invention;

[0029] Figure 8 A composition diagram of a specific example of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0030] The technical solution of the present invention will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0031] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, it can also be the internal connection of two components, it can be a wireless connection, or it can be a wired connection. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0032] In addition, the technical features involved in the different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0033] Example 1

[0034] The embodiment of the present invention provides a surveillance video character retrieval method based on a vector database, such as Figure 1 As shown, including:

[0035] Step S11: perform face detection and clustering on the key frames of the retrieved video, perform time domain segmentation and aggregation processing on all key picture frames of the retrieved video, and establish a vector database and a Mysql database.

[0036] Specifically, since the retrieved video contains a large number of repeated frames, in order to simplify the calculation process, the embodiment of the present invention first extracts the key frames (valid frames) of the retrieved video and removes a large number of repeated frames. For the remaining key frames, since each frame may have zero or at least one face image, it is also necessary to perform face detection on all key frames to obtain multiple face vectors. However, all face vectors are not for only one face, so the face vectors need to be clustered.

[0037] Specifically, Figure 2 As shown, the process of performing face detection and clustering on the key frames of the retrieved video includes steps S21 to S22, as follows:

[0038] Step S21: extract key frames in the retrieved video based on the inter-frame difference method.

[0039] Specifically, the present invention implements the inter-frame difference method, extracts valid frames by detecting the difference between picture frames, and removes a large number of repeated frames. For example: a surveillance video with a duration of 2 minutes and 25 frames per second, adopts the two-frame difference method (inter-frame difference method), and calculates whether the difference between every two frames exceeds the threshold T to obtain the number of valid frames in 1-3000 frames, that is, the number of repeated picture frames is filtered out.

[0040] Specifically, the inter-frame difference method includes: calculating the difference in the grayscale values ​​of the corresponding pixels of each two adjacent frames in the retrieved video; when the difference is greater than a preset threshold, selecting the next frame as the key frame, for example: the nth frame and the n-1th frame image in the video sequence are recorded as f n and f n-1 , the grayscale value of the corresponding pixel in the two frames is recorded as f n (x,y) and f n-1 (x, y), subtract the grayscale values ​​of the corresponding pixels of the two frames of images, and take their absolute values ​​to obtain the difference image D n :

[0041] D n (x,y)=|f n (x,y)-f n-1 (x,y)| (1)

[0042] When D n When it is greater than the preset threshold T, the nth frame of the picture is selected, that is, the latter frame with a larger difference between the two frames is selected as the valid picture frame.

[0043] Step S22: Perform face detection and clustering based on the key frames to obtain the key vector of each face and its corresponding unique identification ID.

[0044] Specifically, Figure 3 As shown, step S22 specifically includes steps S31 to S34, as follows:

[0045] Step S31: using the CNN detector algorithm, extracting key frames containing face images from the key frames.

[0046] Step S32: Detect faces in key frames containing face images, and map each face to the key frame containing the face image to obtain multiple face vectors for each face.

[0047] Specifically, the embodiment of the present invention adopts a CNN detector algorithm to extract key frames containing faces from the key frames obtained in step S21, and performs face detection on the key frames containing faces to obtain multiple faces, and maps each face with the key frame containing the face to obtain multiple face vectors for each face. For example: step S21 obtains key frame #1, key frame #2, and key frame #3, and the CNN face detector performs face detection on key frame #1, key frame #2, and key frame #3 to obtain that key frame #1 contains face A and face B, no person appears in key frame #2, and face A appears in key frame #3, then key frame #1 and key frame #3 are mapped to face A respectively, and key frame #1 is mapped to face B, thereby obtaining two face vectors (Face_vec_1 and Face_vec_2) of person A and one face vector (Face_vec_3) of person B.

[0048] Step S33: clustering all face vectors using a clustering algorithm to obtain a face vector cluster for each face.

[0049] Specifically, in the face detection of step S32, since a large number of repeated face vectors (such as two face vectors of person A: Face_vec_1 and Face_vec_2) will be generated in the face detection stage, it is necessary to remove duplicates to obtain the unique face result of the person appearing in the video. The embodiment of the present invention uses the HDBSCAN clustering algorithm, firstly specifies the size of the minimum generated cluster as M, puts the face vectors of the same person with the closest distance into the same cluster, and automatically recommends the optimal clustering result to obtain the face vector cluster of each face.

[0050] Step S34: Select at least one key vector from each face vector cluster and obtain a unique identification ID for each key vector.

[0051] Specifically, one or more key vectors are selected from the aggregated multiple clusters to obtain a unique identification ID corresponding to each key vector, and the key vector information and the corresponding unique identification ID are stored in the vector database, for example: (345001, Face_vec1), (345002, Face_vec2) are stored in the vector database, as shown in Table 1.

[0052] Table 1

[0053] face_id face_vector 345001 Face_vec1 345002 Face_vec2 …… ……

[0054] Specifically, if all the picture frames are directly put into MySQL storage, it will cause increased pressure and inefficient query when the video library data continues to increase. Therefore, the embodiment of the present invention optimizes the table structure, performs time domain segmentation and aggregation processing on all key picture frames of the retrieved video (i.e., adopts the method of aggregating the frame numbers and converting them into video time periods) and then stores them in the vector database to reduce the amount of data effectively stored. The process of performing time domain segmentation and aggregation processing includes: for each face, using a preset interval difference threshold, all key picture frames containing the face are grouped to obtain multiple frame groups and video time periods for each face.

[0055] Specifically, there is an interval difference between each two adjacent key video frames, and the smaller the interval, the more coherent the key video frames are. Therefore, the embodiment of the present invention sets a preset interval difference threshold to merge the key picture frames into multiple groups, and obtain a relatively coherent video time period corresponding to each frame group. For example: Figure 4 As shown, the left side shows the number of frames of all key images. According to the preset interval difference thresholds of 30, 50, and 100, the corresponding frame groups on the right side are obtained respectively, and then the frames in the same group are converted into video time periods. Assuming that there are 25 frames per second, the video time is obtained by dividing the number of frames by 25, and the video time period corresponding to the frame grouping is obtained accordingly.

[0056] Specifically, taking the faces and their IDs shown in Table 1 as an example, the embodiment of the present invention uses the time domain segmentation aggregation algorithm to calculate all the key frames of the two face images with IDs 345001 and 345002 appearing in the video, and sets the preset interval difference threshold to 25. That is, if the face 345001 appears again within an interval of 25 frames in the video, it is considered to be continuous, and the corresponding video time period is obtained and stored in the Mysql database, as shown in Table 2.

[0057] face_id video_path video_frame 345001 / home / video / video_test001.mp4 (4,8) 345001 / home / video / video_test001.mp4 (15,20) 345002 / home / video / video_test001.mp4 (1,3) 345002 / home / video / video_test001.mp4 (10,12) 345002 / home / video / video_test002.mp4 (80,90) …… …… ……

[0058] Specifically, the pseudo code of the time domain segmentation aggregation algorithm implemented in the embodiment of the present invention is shown in Table 3.

[0059]

[0060] Specifically, the embodiment of the present invention establishes a vector database and a Mysql database based on each frame group of each face and its video time period, video path, number of picture frames, and each key vector information and unique identification ID of each face appearing in each frame of the picture, wherein the face vector and its corresponding unique identification ID are stored in the vector database; the unique identification ID of the face vector and video information data are stored in the Mysql database, and the video information data includes: each frame group based on each face and its video time period, and video path.

[0061] Step S12: vectorize the acquired person picture to be retrieved, and acquire the video clip corresponding to the person picture based on the vectorization processing result and the vector database and the MySQL database.

[0062] Specifically, Figure 5 As shown, step S12 includes steps S41 to S44, as follows:

[0063] Step S41: vectorize the image of the person to be searched to obtain a face vector of the person to be searched.

[0064] Specifically, the vector database of the embodiment of the present invention already contains the mapping relationship between face-ID-picture frame-video time period, so the person retrieval is realized based on the face vector.

[0065] Step S42: According to the information stored in the vector database, retrieve the identification ID corresponding to the face vector of the person to be retrieved.

[0066] Specifically, the embodiment of the present invention performs similarity search on the face vector obtained in step S41 based on the vector database to obtain the identification ID corresponding to the closest face.

[0067] Step S43: According to the identification ID corresponding to the face vector of the person to be retrieved, query the Mysql database for all time domain ranges in which the person to be retrieved appears continuously in the retrieved video.

[0068] Specifically, after the embodiment of the present invention performs time domain segmentation and aggregation processing on all key picture frames of the retrieved video, the face ID is mapped with all key picture frames containing the face and the video time period. Therefore, according to the identification ID corresponding to the face vector of the person to be retrieved, all time domain ranges in which the person to be retrieved appears continuously in the retrieved video can be queried in the Mysql database.

[0069] Step S44: cutting the retrieved video according to the time domain range to obtain video clips corresponding to the person pictures.

[0070] Specifically, the present invention implements the proposed surveillance video character retrieval method based on vector database. Figure 6 As shown. Figure 6 It can be seen that the process of establishing the vector database and Mysql database implemented by the present invention includes: video face feature extraction and video time domain segmentation, and the target person feature extraction method is also used for the picture of the person to be retrieved, and then the face feature vector of the face to be retrieved is matched with the information in the vector database for similarity to obtain the face ID, and then the video time period is obtained from the Mysql database according to the face ID, and finally the video is cut according to the video time period to obtain the video in which the face to be retrieved appears.

[0071] Example 2

[0072] The embodiment of the present invention provides a surveillance video character retrieval system based on a vector database, such as Figure 7 As shown, including:

[0073] A database module 1 is established to perform face detection and clustering on the key frames of the retrieved video, and to perform time domain segmentation and aggregation processing on all key picture frames of the retrieved video, and to establish a vector database and a Mysql database; this module executes the method described in step S11 of Example 1, which will not be repeated here.

[0074] Retrieval module 2 is used to vectorize the acquired character pictures, and obtain the video clips corresponding to the character pictures based on the vectorization processing results and the vector database and MySQL database; this module executes the method described in step S12 of embodiment 1, which will not be repeated here.

[0075] Example 3

[0076] An embodiment of the present invention provides a computer device, such as Figure 8 As shown, it includes: at least one processor 401, such as a CPU (Central Processing Unit) or a GPU (Graphics Processing Unit), at least one communication interface 403, a memory 404, and at least one communication bus 402. Among them, the communication bus 402 is used to realize the connection and communication between these components. Among them, the communication interface 403 may include a display screen (Display), a keyboard (Keyboard), and the optional communication interface 403 may also include a standard wired interface and a wireless interface. The memory 404 may be a high-speed RAM memory (Ramdom Access Memory, volatile random access memory) or a non-volatile memory (non-volatile memory), such as at least one disk memory. The memory 404 may also be at least one storage device located away from the aforementioned processor 401. Among them, the processor 401 can execute the surveillance video character retrieval method based on the vector database of Example 1. A set of program codes are stored in the memory 404, and the processor 401 calls the program code stored in the memory 404 to execute the surveillance video character retrieval method based on the vector database of Example 1.

[0077] The communication bus 402 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The communication bus 402 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 8 The fact that only one line is used in the diagram does not mean that there is only one bus or only one type of bus.

[0078] Among them, the memory 404 may include a volatile memory (English: volatile memory), such as a random access memory (English: random-access memory, abbreviated: RAM); the memory may also include a non-volatile memory (English: non-volatile memory), such as a flash memory (English: flash memory), a hard disk drive (English: hard disk drive, abbreviated: HDD) or a solid-state drive (English: solid-state drive, abbreviated: SSD); the memory 404 may also include a combination of the above types of memory.

[0079] The processor 401 may be a central processing unit (CPU), a network processor (NP), or a combination of a CPU and a NP.

[0080] The processor 401 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.

[0081] Optionally, the memory 404 is also used to store program instructions. The processor 401 can call the program instructions to implement the surveillance video person retrieval method based on the vector database in the implementation example 1 of the present application.

[0082] The embodiment of the present invention also provides a computer-readable storage medium, on which computer-executable instructions are stored, and the computer-executable instructions can execute the surveillance video person retrieval method based on the vector database of embodiment 1. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory, a hard disk (HDD) or a solid-state drive (SSD), etc.; the storage medium can also include a combination of the above-mentioned types of memory.

[0083] Obviously, the above embodiments are merely examples for the purpose of clear explanation, and are not intended to limit the implementation methods. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the implementation methods here. The obvious changes or modifications derived from these are still within the scope of protection of the invention.

Claims

1. A surveillance video person retrieval method based on a vector database, characterized in that: include: Perform face detection and clustering on the key frames of the retrieved video, perform time domain segmentation and aggregation processing on all key picture frames of the retrieved video, and establish a vector database and MySQL database; Performing vectorization processing on the image of the person to be retrieved, and obtaining a video clip corresponding to the image of the person based on the vectorization processing result and the vector database and the MySQL database; The process of performing face detection and clustering on the key frames of the retrieved video includes: extracting the key frames in the retrieved video based on the inter-frame difference method; performing face detection and clustering based on the key frames to obtain the key vector of each face and its corresponding unique identification ID; The process of performing face detection and clustering based on the key frames to obtain the key vector of each face and its corresponding unique identification ID includes: using a CNN detector algorithm to extract the key frames containing face pictures from the key frames; detecting the faces in the key frames containing face pictures, and mapping each face with the key frames containing the face pictures to obtain multiple face vectors for each face; using a clustering algorithm to cluster all face vectors to obtain a face vector cluster for each face; selecting at least one key vector in each face vector cluster to obtain a unique identification ID for each key vector.

2. The surveillance video character retrieval method based on vector database according to claim 1 is characterized in that: The process of extracting key frames in the retrieved video based on the inter-frame difference method includes: Calculate the difference in grayscale values ​​of corresponding pixels of each two adjacent frames in the retrieved video; When the difference is greater than a preset threshold, the next frame is selected as a key frame.

3. The surveillance video character retrieval method based on vector database according to claim 1 is characterized in that: The process of performing time domain segmentation and aggregation processing on all key picture frames of the retrieved video includes: For each face, all key picture frames containing the face are grouped using a preset interval difference threshold to obtain multiple frame groups and video time periods for each face.

4. The surveillance video character retrieval method based on vector database according to claim 3 is characterized in that: The process of establishing the vector database and the Mysql database includes: Store the face vector and its corresponding unique identification ID in the vector database; The unique identification ID of the face vector and the video information data are stored in the Mysql database, wherein the video information data includes: each frame group based on each face and its video time period and video path.

5. The surveillance video character retrieval method based on vector database according to claim 4 is characterized in that: The process of performing vectorization processing on the person picture to be retrieved, and obtaining the video clip corresponding to the person picture based on the vectorization processing result and the vector database and the MySQL database includes: Perform vectorization processing on the image of the person to be retrieved to obtain the face vector of the person to be retrieved; Retrieving an identification ID corresponding to a face vector of a person to be retrieved according to the information stored in the vector database; According to the identification ID corresponding to the face vector of the person to be retrieved, querying the Mysql database for all time domain ranges in which the person to be retrieved appears continuously in the retrieved video; The retrieved video is cut according to the time domain range to obtain video clips corresponding to the character pictures.

6. A surveillance video character retrieval system based on a vector database, characterized in that: Based on the surveillance video person retrieval method based on a vector database according to any one of claims 1 to 5, the system comprises: Establish a database module for performing face detection and clustering on the key frames of the retrieved video, and perform time domain segmentation and aggregation processing on all key picture frames of the retrieved video to establish a vector database; A retrieval module is used to perform vectorization processing on the acquired person picture, and obtain a video clip corresponding to the person picture based on the vectorization processing result and the vector database and the MySQL database; The process of performing face detection and clustering on the key frames of the retrieved video includes: extracting the key frames in the retrieved video based on the inter-frame difference method; performing face detection and clustering based on the key frames to obtain the key vector of each face and its corresponding unique identification ID; The process of performing face detection and clustering based on the key frames to obtain the key vector of each face and its corresponding unique identification ID includes: using a CNN detector algorithm to extract the key frames containing face pictures from the key frames; detecting the faces in the key frames containing face pictures, and mapping each face with the key frames containing the face pictures to obtain multiple face vectors for each face; using a clustering algorithm to cluster all face vectors to obtain a face vector cluster for each face; selecting at least one key vector in each face vector cluster to obtain a unique identification ID for each key vector.

7. A computer device, characterized in that: include: At least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor executes the surveillance video character retrieval method based on a vector database as described in any one of claims 1-5.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the surveillance video person retrieval method based on a vector database as described in any one of claims 1-5.