Video data collaborative management method and system integrating card storage and cloud storage
By combining device-side and cloud storage in video data management, keyframes are extracted and marked, and feature matching is used to solve the problem of low efficiency in video data storage and query, and efficient and flexible video data management and users are achieved Improved experience.
Patent Information
- Application Number
- CN202411474373.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-22
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2044-10-22
AI Technical Summary
In the prior art, video data is divided and stored according to time periods, resulting in the user's smooth switching and viewing of data on different storage ends when querying feature monitoring videos, which affects the efficiency of users to obtain effective information.
Through the device control platform, the card storage and cloud storage configuration of the monitoring device is detected and encoded, audio and video data is collected and encoded, saved to the memory card and uploaded to cloud storage, divided high-speed and low-speed partitions, extracted keyframes and marked video segments, and used ResNet and BERT The model performs feature extraction and matching to achieve rapid retrieval and playback of keyframes and video segments.
It improves the device response speed and processing capabilities, ensures flexible allocation and efficient utilization of storage resources, realizes seamless switching between different devices and platforms and access video data, and improves user experience.
Smart Images

Figure CN118984400A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data management, and in particular to a video data collaborative management method and system integrating card storage and cloud storage. Background Art
[0002] With the widespread deployment of surveillance cameras and the continuous advancement of HD and UHD video technology, the amount of video data is growing at an alarming rate. Traditional storage methods, such as relying solely on device cards for storage, face significant limitations such as limited capacity, easy damage, and easy data loss, and are no longer able to meet the needs of large capacity and long-term storage.
[0003] In order to effectively meet this challenge and meet the needs of different users for small capacity and short-term storage, we designed a video data collaborative management method and system that integrates card storage and cloud storage. The system aims to achieve efficient, secure and flexible management of video data by combining the immediacy and flexibility of local device cards with the unlimited scalability and high reliability of cloud storage.
[0004] In this method, video data can be uploaded to the cloud in real time for long-term storage and backup, while the local device card is used to temporarily store recent video data, thus taking into account the storage needs in different scenarios.
[0005] At present, a relatively similar solution to achieve the coordinated management of video data in device card storage and cloud storage is to implement the card storage function and cloud storage function separately on the device side. In this solution, the storage of video data is clearly divided into two independent parts: one is the local device card storage, and the other is the cloud storage; however, video data is usually divided and stored according to time periods. When it is necessary to query a surveillance video of a certain feature, it is still necessary to traverse the data of the storage card and cloud storage at the same time. However, due to the different reading speeds and capacities of the storage card and cloud storage, it is impossible for users to smoothly switch and view data on different storage ends, which affects the efficiency of users in obtaining effective information. Summary of the invention
[0006] The purpose of the present invention is to provide a video data collaborative management method and system integrating card storage and cloud storage to solve the following technical problems: However, video data is usually stored according to time periods. When a surveillance video with a certain feature needs to be queried, users cannot smoothly switch and view data from different storage ends, which affects the efficiency of users in obtaining effective information.
[0007] The purpose of the present invention can be achieved through the following technical solutions: A video data collaborative management method integrating card storage and cloud storage includes the following steps: Use the device control platform to detect whether card storage and cloud storage are enabled on any monitoring device, and set the corresponding card storage configuration and cloud storage configuration; Encode the audio and video collected by the monitoring equipment and synthesize them into video files. First, save the video files to the memory card. When the storage capacity of the memory card reaches the preset capacity, divide the current video file into several video frames, and extract key frames from the video frames according to the set keywords; The key frame is saved to the memory card, the current video file is uploaded to the cloud storage and deleted locally; In the cloud storage, a video segment where a key frame is located in the current video file is selected and marked as a key video segment, wherein the duration of the key video segment is t, and the key frame is an intermediate frame of the key video segment; the cloud storage is divided into a high-speed partition and a low-speed partition, the entire video file is stored in the low-speed partition, and the key video segment is stored in the high-speed partition; According to the query keywords entered by the user on the platform query page, the corresponding key frames and key video segments are retrieved in the storage card and high-speed partition through a private protocol, and the corresponding key frames and links to the key video segments are displayed. According to the user's choice, playback instructions or download instructions are sent to the storage card device and cloud storage server.
[0008] As a further solution of the present invention: the specific process of extracting key frames is: Obtain the compression code of each video frame, exclude the video frames with inter-frame compression code, retain the video frames with intra-frame compression code, mark them as pending frames, encode the pending frames into the common vector space based on the pre-trained ResNet model, output the image feature vector, index the image feature vector, associate the indexed image feature vector with the video frame ID and store it in the constructed video feature database; encode the set keywords into the common vector space based on the pre-trained BERT model, output the text feature vector, for any text feature vector, search the video feature database for the index corresponding to the image feature vector that is closest to the text feature vector, then the pending frame corresponding to the index matches the keyword, and the pending frame is marked as a key frame.
[0009] As a further solution of the present invention: the specific process of storing the video file in the memory card is: Use the SDK provided by the chip to encode the audio and video, and synthesize the video file according to a specific private protocol. When the platform sends the card storage configuration, the monitoring device will check whether the memory card has been mounted to the Linux directory and confirm its normal availability. If the memory card status meets the requirements, the monitoring device will save the synthesized video file to the memory card.
[0010] As a further solution of the present invention: the training process of the ResNet model and the BERT model is: S1: Collect a sample data set, wherein the sample data set includes pre-paired keywords and corresponding key images, and collect n pairs of paired sample pairs; S2: The key images and keywords in all sample pairs are input into the ResNet model and the BERT model respectively, and the ResNet model outputs the image feature vector I n , the BERT model outputs the text feature vector T n , pair each image feature vector with all text feature vectors in turn to obtain several sample pairs, and mark the pre-corresponding sample pairs as I i T i , as positive sample pairs, and mark the sample pairs that are not pre-paired as I i T g , as a negative sample pair, i=1,2,...,n, g=1,2,...,n, i≠g; S3: Calculate the similarity S of the sample pair and the model loss function L by the following formula: ; ; In the similarity formula, A j and B j Represent the components of vectors I and T, i∈1,...,n, respectively. In the model loss function, the coefficient is a set hyperparameter, e is a natural constant, q and k represent text feature vectors and image feature vectors respectively, where k+ represents a positive sample, k j represents the jth sample; the numerator of the model loss function L represents the similarity between positive examples, and the denominator represents the similarity between positive examples and negative examples; S4: Calculate the similarity of samples and the loss function, and adjust the model parameters according to the calculation results so that the similarity of positive samples approaches 1 and the similarity of negative samples approaches 0. When the output value of the loss function L is less than or equal to the preset threshold, the model converges and the trained ResNet model and BERT model are obtained.
[0011] As a further solution of the present invention: when the capacity of the key frames stored in the memory card reaches a second preset capacity, the key frames are sorted from recent to far in chronological order, and half of the key frames in the back column are uploaded to the high-speed partition of the cloud storage.
[0012] As a further solution of the present invention: the reading and writing speed of the high-speed partition is faster than that of the low-speed partition.
[0013] As a further solution of the present invention: the audio data collected by the monitoring device mic is encoded based on g711a, and the video data collected by the monitoring device sensor is encoded based on H264 / H265.
[0014] The present invention also includes a video data collaborative management system integrating card storage and cloud storage, which is used to implement the above-mentioned video data collaborative management method integrating card storage and cloud storage, including: The initialization module is used to detect whether the card storage and cloud storage are turned on for any monitoring device through the device control platform, and set the corresponding card storage configuration and cloud storage configuration; The video analysis module is used to encode the audio and video collected by the monitoring equipment and synthesize them into a video file. The video file is first saved to the memory card. When the storage capacity of the memory card reaches the preset capacity, the current video file is divided into several video frames, and key frames are extracted from the video frames according to the set keywords; A data transmission module, used to save the key frame to a memory card, upload the current video file to a cloud storage and delete it locally; The data management module is used to select the video segment where the key frame is located in the current video file in the cloud storage, mark it as the key video segment, the duration of the key video segment is t, and the key frame is the middle frame of the key video segment; divide the cloud storage into a high-speed partition and a low-speed partition, save the entire video file in the low-speed partition, and store the key video segment in the high-speed partition; The query and download module is used to retrieve the corresponding key frames and key video segments in the storage card and high-speed partition through a private protocol according to the query keywords entered by the user on the platform query page, and display the corresponding key frames and links to the key video segments, and send playback instructions or download instructions to the storage card device and cloud storage server according to the user's selection.
[0015] Beneficial effects of the present invention: (1) By storing part of the video data on the device card, the pressure on cloud storage can be reduced and the response speed and processing capacity of the device can be improved. At the same time, the read and write speed of the device card is fast, which can meet the needs of real-time video stream recording and key information viewing, thereby improving the overall performance of the device; (2) Device card storage has limitations such as limited capacity and susceptibility to physical damage, while cloud storage has the characteristics of large capacity, high reliability and scalability. By integrating the two, storage resources can be flexibly allocated according to actual needs, avoiding waste and redundancy of storage resources and improving storage efficiency; (3) Preliminary processing and uploading of video data on the device side can ensure the consistency and synchronization of local data and cloud data. This helps users seamlessly switch and access video data between different devices and platforms, improving user experience; (4) The present invention combines natural language processing and computer vision technology to fully explore the information contained in each frame from the perspective of video frame image content, including the content appearing in the frame image, the relationship between the contents, and the overall description of the frame image. It also establishes a massive video retrieval feature library based on the keyword database, so that users can quickly find the video information they need. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The present invention will be further described below in conjunction with the accompanying drawings.
[0017] Figure 1 It is a module schematic diagram of a video data collaborative management system integrating card storage and cloud storage according to the present invention; Figure 2 It is a schematic diagram of the platform side configuration device side storage process of the present invention; Figure 3 It is a schematic diagram of the device side storage process of the present invention; Figure 4 It is a schematic diagram of the video query, download and play process of the present invention. DETAILED DESCRIPTION
[0018] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. 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.
[0019] See also Figure 1-4 As shown, the present invention is a video data collaborative management method integrating card storage and cloud storage. The detailed design scheme is: through the platform side, the device function is configured to support card storage recording and cloud storage recording, and the relevant parameters are sent to the device side. The device side realizes the extraction of key frames of card storage recording and video file according to the parameters configured by the platform, and realizes the partition storage of video file in cloud storage. The platform side can query the cloud storage recording and card storage recording of the corresponding device according to the device node, and can download or play them.
[0020] The platform side configures the device side storage function: Storage plan settings: The storage plan is configured on a weekly basis. Users can select which days of the week and which time periods of each day to record according to their needs. After completing the configuration, users can save the configuration as a template and name it for quick application or modification later.
[0021] Cloud bucket settings: Users need to set a name for the cloud bucket and specify its address, which usually involves selecting a cloud service provider and a specific data center location. To ensure data security, users need to configure encryption parameters, such as setting access keys and key management policies.
[0022] Storage configuration selection: Based on customer needs, users can choose card storage, cloud storage, or both. Set cloud storage bucket upload parameters: S3 bucket name, whether to enable S3 function, specify prefix directory, configure encryption and compression parameters, set endpoint address, enable SSL encrypted communication, specify region, and set access key and secret key. Through these configurations, efficient and secure video data management can be achieved.
[0023] Device-side storage function: On the device side, the SDK provided by the chip is used to encode the audio and video, and the video files are synthesized according to a specific private protocol. When the platform side sends the card storage configuration, the device checks whether the card storage device has been mounted to the Linux directory and confirms its normal availability. If everything is normal, the device saves the synthesized video to the card storage device. When the storage capacity of the card storage device reaches the upper limit, the system automatically overwrites the old video files in a loop. In addition, when the platform side sends the cloud storage configuration, the device configures the cloud storage related settings according to these parameters and transmits the video data securely to the cloud.
[0024] Video query, download and playback function On the platform side, users can query and download video files by following the steps below: 1. Check the video stored in the card: Select a device and enter the video query interface: After the user selects a specific device on the platform, he can enter the video query interface of the device.
[0025] Select Card Recording: In the query interface, users can select the "Card Recording" option to view the local recording data stored on the device.
[0026] Send query command: The platform sends a command to query the video stored in the card to the device side, requiring the device to return the names of all video files currently stored in the card.
[0027] Get and display video information: After receiving the command, the device returns the list of video files in the card to the platform, and the user can view the information of these video files on the platform.
[0028] 2. Download or play video stored on the card Select and play / download video: Users select the video file stored in the card that needs to be downloaded or played on the platform.
[0029] Send play / download instructions: The platform sends corresponding play or download instructions to the device side based on the user's selection.
[0030] Data interaction: After receiving the instruction, the device side sends the corresponding video data back to the platform for users to watch or download according to the requirements of the instruction.
[0031] 3. Query cloud-stored videos Select a device and enter the video query interface: Same as the above steps, the user first needs to select a specific device on the platform.
[0032] Select cloud-stored recordings: In the query interface, users can select the "cloud-stored recordings" option to view the cloud-stored recording data stored on the device.
[0033] Send query command: The platform sends a request to the cloud storage server, requesting a list of cloud storage videos on the device.
[0034] Obtain and display cloud-stored video information: The cloud-stored server responds to the platform's request and returns a list of cloud-stored videos to the platform. Users can view the information of these video files on the platform.
[0035] 4. Download or play cloud-stored videos Select and play / download video: Users select the cloud-stored video file that needs to be downloaded or played on the platform.
[0036] Send play / download instructions: The platform sends corresponding play or download instructions to the cloud storage server based on the user's selection.
[0037] Data interaction: After receiving the instruction, the cloud storage server sends the corresponding video data back to the platform for users to watch or download according to the requirements of the instruction.
[0038] Through these steps, users can easily query, play and download audio and video recording files on the platform and in cloud storage.
[0039] In another preferred embodiment of the present invention, the specific process of extracting key frames is: Get the compression code of the video frame: First, extract the compression code of each frame from the video. These codes usually contain the basic information of the frame image.
[0040] Exclude video frames encoded with inter-frame compression: In video coding, some frames are compressed by referring to previous and next frames (i.e., inter-frame prediction), while others are encoded independently (i.e., intra-frame compression). Here, we exclude frames compressed by inter-frame prediction because they may not contain complete information.
[0041] Keep and mark intra-compressed video frames as pending frames: Only those independently encoded frames are kept and marked as "pending frames" for subsequent processing.
[0042] Encode the pending frames using the ResNet model: Use the pre-trained ResNet model to encode each pending frame into a common vector space. ResNet is a deep convolutional neural network that is very suitable for extracting image features.
[0043] Output image feature vector and index: Output the encoded image feature vector and index each vector.
[0044] Associating image feature vectors with video frame IDs: Associating the indexed image feature vectors with their corresponding video frame IDs, and storing this information in the constructed video feature database.
[0045] Encode keywords using the BERT model: Similarly, using the pre-trained BERT model, the set keywords are also encoded into the same common vector space and the text feature vector is output. BERT is a powerful natural language processing model that can effectively process and understand text data.
[0046] Matching text feature vectors with image feature vectors: For any text feature vector, find the index of the image feature vector that is closest to it in the video feature database. This "distance" is usually determined by calculating the cosine similarity or other similarity measure between the two vectors.
[0047] Mark the matching pending frame as a key frame: Once the closest image feature vector is found, it can be determined that the corresponding pending frame matches the keyword. Then, this pending frame is marked as a "key frame".
[0048] In another preferred embodiment of the present invention, the specific process of storing the video file in the memory card is as follows: Use the SDK provided by the chip to encode the audio and video, and synthesize the video file according to a specific private protocol. When the platform sends the card storage configuration, the monitoring device will check whether the memory card has been mounted to the Linux directory and confirm its normal availability. If the memory card status meets the requirements, the monitoring device will save the synthesized video file to the memory card.
[0049] In another preferred embodiment of the present invention, the training process of the ResNet model and the BERT model is: S1: Collect a sample data set, wherein the sample data set includes pre-paired keywords and corresponding key images, and collect n pairs of paired sample pairs; S2: The key images and keywords in all sample pairs are input into the ResNet model and the BERT model respectively, and the ResNet model outputs the image feature vector I n , the BERT model outputs the text feature vector T n , pair each image feature vector with all text feature vectors in turn to obtain several sample pairs, and mark the pre-corresponding sample pairs as I i T i , as positive sample pairs, and mark the sample pairs that are not pre-paired as I i T g , as a negative sample pair, i=1,2,...,n, g=1,2,...,n, i≠g; S3: Calculate the similarity S of the sample pair and the model loss function L by the following formula: ; ; In the similarity formula, A j and B j Represent the components of vectors I and T, i∈1,...,n, respectively. In the model loss function, the coefficient is a set hyperparameter, e is a natural constant, q and k represent text feature vectors and image feature vectors respectively, where k+ represents a positive sample, k j represents the jth sample; the numerator of the model loss function L represents the similarity between positive examples, and the denominator represents the similarity between positive examples and negative examples; S4: Calculate the similarity of samples and the loss function, and adjust the model parameters according to the calculation results so that the similarity of positive samples approaches 1 and the similarity of negative samples approaches 0. When the output value of the loss function L is less than or equal to the preset threshold, the model converges and the trained ResNet model and BERT model are obtained.
[0050] In another preferred embodiment of the present invention, when the capacity of the key frames stored in the memory card reaches a second preset capacity, the key frames are sorted in chronological order from near to far, and half of the key frames in the back column are uploaded to the high-speed partition of the cloud storage.
[0051] In another preferred embodiment of the present invention, an innovative storage architecture is used, which is particularly suitable for application environments that require efficient data processing and fast access. In this embodiment, the storage device is divided into two main parts: a high-speed partition and a low-speed partition.
[0052] High-speed partitions use advanced storage technologies, such as solid-state drives (SSDs) or non-volatile memory (NVM), which provide extremely high data read and write speeds. The main advantages of high-speed partitions are their low latency and high throughput, making them ideal for performing frequent read and write operations. For example, in video processing applications, high-speed partitions can be used to store temporary video frame buffers, key frame data, or frequently accessed index information, ensuring fast data retrieval and processing speeds.
[0053] Low-speed partitions use traditional mechanical hard disk drives (HDDs) or other cost-effective but slower storage media. Although these devices do not read and write as fast as high-speed partitions, they offer greater storage capacity and lower costs, and are suitable for storing infrequently accessed data such as historical records, backup files, or large amounts of uncompressed video data.
[0054] In another preferred embodiment of the present invention, the audio data collected by the microphone (mic) in the monitoring device is first sent to an encoder, which is compressed based on the A-law algorithm in the G.711 standard. G.711 is a widely used pulse code modulation (PCM) speech coding standard, which provides two compression algorithms: A-law and μ-law. In this embodiment, the A-law algorithm is selected because it is more common in Europe and some other regions and can provide good voice quality and a lower bit rate (64 kbps). In this way, the original audio data is effectively compressed, reducing the required storage space and bandwidth while maintaining an acceptable level of sound quality.
[0055] The video data captured by the image sensor in the monitoring device is processed by another encoder that supports the H.264 or H.265 video compression standard. Both standards are among the most advanced technologies in the field of video coding. They can significantly reduce the amount of data while maintaining high video quality. H.264 is a relatively mature standard and is widely used in various network video transmission and storage scenarios. As its successor, H.265 provides higher compression efficiency and can reduce the file size by about half under the same conditions, but it also requires more powerful processing capabilities. In this embodiment, according to actual needs and system resources, you can choose to encode the video data using one or both methods.
[0056] The present invention also includes a video data collaborative management system integrating card storage and cloud storage, which is used to implement the above-mentioned video data collaborative management method integrating card storage and cloud storage, including: The initialization module is used to detect whether the card storage and cloud storage are turned on for any monitoring device through the device control platform, and set the corresponding card storage configuration and cloud storage configuration; The video analysis module is used to encode the audio and video collected by the monitoring equipment and synthesize them into a video file. The video file is first saved to the memory card. When the storage capacity of the memory card reaches the preset capacity, the current video file is divided into several video frames, and key frames are extracted from the video frames according to the set keywords; A data transmission module, used to save the key frame to a memory card, upload the current video file to a cloud storage and delete it locally; The data management module is used to select the video segment where the key frame is located in the current video file in the cloud storage, mark it as the key video segment, the duration of the key video segment is t, and the key frame is the middle frame of the key video segment; divide the cloud storage into a high-speed partition and a low-speed partition, save the entire video file in the low-speed partition, and store the key video segment in the high-speed partition; The query and download module is used to retrieve the corresponding key frames and key video segments in the storage card and high-speed partition through a private protocol according to the query keywords entered by the user on the platform query page, and display the corresponding key frames and links to the key video segments, and send playback instructions or download instructions to the storage card device and cloud storage server according to the user's selection.
[0057] The above is a detailed description of an embodiment of the present invention, but the content is only a preferred embodiment of the present invention and cannot be considered to limit the scope of implementation of the present invention. All equivalent changes and improvements made within the scope of the present invention should still fall within the scope of the patent coverage of the present invention.
Claims
1. A video data collaborative management method integrating card storage and cloud storage, characterized in that: The following steps are involved: Use the device control platform to detect whether card storage and cloud storage are enabled on any monitoring device, and set the corresponding card storage configuration and cloud storage configuration; Encode the audio and video collected by the monitoring equipment and synthesize them into video files. First, save the video files to the memory card. When the storage capacity of the memory card reaches the preset capacity, divide the current video file into several video frames, and extract key frames from the video frames according to the set keywords; The key frame is saved to the memory card, the current video file is uploaded to the cloud storage and deleted locally; In the cloud storage, a video segment where a key frame is located in the current video file is selected and marked as a key video segment, wherein the duration of the key video segment is t, and the key frame is an intermediate frame of the key video segment; the cloud storage is divided into a high-speed partition and a low-speed partition, the entire video file is stored in the low-speed partition, and the key video segment is stored in the high-speed partition; According to the query keywords entered by the user on the platform query page, the corresponding key frames and key video segments are retrieved in the storage card and high-speed partition through a private protocol, and the corresponding key frames and links to the key video segments are displayed. According to the user's choice, playback instructions or download instructions are sent to the storage card device and cloud storage server.
2. The video data collaborative management method integrating card storage and cloud storage according to claim 1 is characterized in that: The specific process of extracting key frames is: Obtain the compression code of each video frame, exclude the video frames with inter-frame compression code, retain the video frames with intra-frame compression code, mark them as pending frames, encode the pending frames into the common vector space based on the pre-trained ResNet model, output the image feature vector, index the image feature vector, associate the indexed image feature vector with the video frame ID and store it in the constructed video feature database; encode the set keywords into the common vector space based on the pre-trained BERT model, output the text feature vector, for any text feature vector, search the video feature database for the index corresponding to the image feature vector that is closest to the text feature vector, then the pending frame corresponding to the index matches the keyword, and the pending frame is marked as a key frame.
3. The video data collaborative management method integrating card storage and cloud storage according to claim 1 is characterized in that: The specific process of saving video files in the memory card is as follows: Use the SDK provided by the chip to encode the audio and video, and synthesize the video file according to a specific private protocol. When the platform sends the card storage configuration, the monitoring device will check whether the memory card has been mounted to the Linux directory and confirm its normal availability. If the memory card status meets the requirements, the monitoring device will save the synthesized video file to the memory card.
4. The video data collaborative management method integrating card storage and cloud storage according to claim 1, characterized in that: The training process of ResNet model and BERT model is as follows: S1: Collect a sample data set, wherein the sample data set includes pre-paired keywords and corresponding key images, and collect n pairs of paired sample pairs; S2: The key images and keywords in all sample pairs are input into the ResNet model and the BERT model respectively, and the ResNet model outputs the image feature vector I n , the BERT model outputs the text feature vector T n , pair each image feature vector with all text feature vectors in turn to obtain several sample pairs, and mark the pre-corresponding sample pairs as I i T i , as positive sample pairs, and mark the sample pairs that are not pre-paired as I i T g , as a negative sample pair, i=1,2,...,n, g=1,2,...,n, i≠g; S3: Calculate the similarity S of the sample pair and the model loss function L by the following formula: ; ; In the similarity formula, A j and B j Represent the components of vectors I and T, i∈1,...,n, respectively. In the model loss function, the coefficient is a set hyperparameter, e is a natural constant, q and k represent text feature vectors and image feature vectors respectively, where k+ represents a positive sample, k j represents the jth sample; the numerator of the model loss function L represents the similarity between positive examples, and the denominator represents the similarity between positive examples and negative examples; S4: Calculate the similarity of samples and the loss function, and adjust the model parameters according to the calculation results so that the similarity of positive samples approaches 1 and the similarity of negative samples approaches 0. When the output value of the loss function L is less than or equal to the preset threshold, the model converges and the trained ResNet model and BERT model are obtained.
5. The video data collaborative management method integrating card storage and cloud storage according to claim 1 is characterized in that: When the capacity of the key frames stored in the memory card reaches a second preset capacity, the key frames are sorted from recent to far in chronological order, and half of the key frames in the last column are uploaded to the high-speed partition of the cloud storage.
6. The video data collaborative management method integrating card storage and cloud storage according to claim 1, characterized in that: The reading and writing speed of the high-speed partition is faster than that of the low-speed partition.
7. The video data collaborative management method integrating card storage and cloud storage according to claim 1, characterized in that: The audio data collected by the monitoring device mic is encoded based on g711a, and the video data collected by the monitoring device sensor is encoded based on H264 / H265.
8. A video data collaborative management system integrating card storage and cloud storage, used to implement a video data collaborative management method integrating card storage and cloud storage as claimed in any one of claims 1 to 7, characterized in that: include: The initialization module is used to detect whether the card storage and cloud storage are turned on for any monitoring device through the device control platform, and set the corresponding card storage configuration and cloud storage configuration; The video analysis module is used to encode the audio and video collected by the monitoring equipment and synthesize them into a video file. The video file is first saved to the memory card. When the storage capacity of the memory card reaches the preset capacity, the current video file is divided into several video frames, and key frames are extracted from the video frames according to the set keywords; A data transmission module, used to save the key frame to a memory card, upload the current video file to a cloud storage and delete it locally; The data management module is used to select the video segment where the key frame is located in the current video file in the cloud storage, mark it as the key video segment, the duration of the key video segment is t, and the key frame is the middle frame of the key video segment; divide the cloud storage into a high-speed partition and a low-speed partition, save the entire video file in the low-speed partition, and store the key video segment in the high-speed partition; The query and download module is used to retrieve the corresponding key frames and key video segments in the storage card and high-speed partition through a private protocol according to the query keywords entered by the user on the platform query page, and display the corresponding key frames and links to the key video segments, and send playback instructions or download instructions to the storage card device and cloud storage server according to the user's selection.
Citation Information
Patent Citations
Method and device for preventing message from being lost in video playback
CN105430506A
Submarine missile launch system
KR102929371B1
Locally biased cache replacement for clustered cache architecture
US20240220420A1
