A video recycling method, device, equipment and medium

By generating video attribute data in the fiber optic remote self-healing system and performing video recycling operations during off-peak periods, the problems of storage space pressure and high costs caused by remote monitoring are solved, and efficient storage management of media servers is achieved.

CN115665380BActive Publication Date: 2025-01-14GUANGDONG POWER GRID CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211312173.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-25
Publication Date
2025-01-14
Estimated Expiration
2042-10-25

AI Technical Summary

Technical Problem

The addition of remote monitoring functionality to existing fiber optic remote self-healing systems has led to a large amount of surveillance video being stored on media servers, resulting in high disk storage space pressure and storage costs.

Method used

By generating video attribute data and adding status tags in the media server, when the remaining storage space reaches a threshold, the tag with the highest proportion is selected as the target tag, and video recycling operations, including data compression and encoding encapsulation, are performed within the threshold during off-peak periods to reduce storage requirements.

Benefits of technology

It effectively reduced the storage burden on media servers, lowered storage costs, and solved the storage space pressure problem caused by long-term monitoring.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115665380B_ABST
    Figure CN115665380B_ABST
Patent Text Reader

Abstract

The present invention discloses a video recovery method, device, equipment and medium. When the duration of a surveillance video received by a media server is greater than a preset time threshold, video attribute data is generated and a status tag is added to the video attribute data; when it is detected that the remaining storage space of the media server reaches the preset storage threshold, the status tag with the highest number of all status tags is selected as the target tag; the operation status data of the media server is obtained and compared with the preset low-peak threshold; when the activity data is lower than the preset low-peak threshold within a preset time, the corresponding video recovery operation is performed on the video attribute data associated with the target tag. The present invention solves the technical problem that even if the existing optical fiber remote self-healing system adds a remote monitoring function, the media server will store a large amount of surveillance videos due to the need for long-term monitoring, resulting in high disk storage space pressure and high storage cost.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of video compression technology, and in particular to a video recovery method, device, equipment and medium. Background Art

[0002] The optical fiber remote self-healing system is a device that automatically plugs and unplugs the remote optical fiber flange head based on a robot. The robot can move vertically and horizontally, and plugs and unplugs the optical fiber flange head through the optical fiber clamp at the front end of the robot to switch the optical fiber routing line.

[0003] The existing optical fiber remote self-healing system generally does not have a camera device and cannot remotely monitor unexpected situations and emergencies occurring outside the system. Even if the existing optical fiber remote self-healing system adds a remote monitoring function, the need for long-term monitoring will cause the media server to store a large amount of monitoring video, resulting in high disk storage space pressure and high storage costs. When the video needs to be called and viewed, the query and transmission from a large number of videos will increase the burden on the media server. Summary of the invention

[0004] The present invention provides a video recovery method, device, equipment and medium, which are applied to a media server. The optical fiber remote self-healing system is communicatively connected to the media server, solving the technical problem that even if the existing optical fiber remote self-healing system adds a remote monitoring function, the media server will store a large amount of monitoring video due to the need for long-term monitoring, resulting in high disk storage space pressure and high storage cost.

[0005] The present invention provides a video recovery method, comprising:

[0006] When the duration of the received surveillance video is greater than a preset time threshold, generating video attribute data and adding a status tag to the video attribute data;

[0007] When it is detected that the remaining storage space of the media server reaches a preset storage threshold, the state tag with the highest proportion is selected as the target tag;

[0008] Obtaining activity data of the media server and comparing it with a preset low-peak period threshold;

[0009] When the activity data is lower than the preset low-peak threshold within a preset time, a corresponding video recycling operation is performed on the video attribute data associated with the target tag.

[0010] Optionally, the target tag includes an initialized tag, a tag that has been recycled once, or a tag that has been recycled twice. When the activity data is lower than the preset low-peak threshold within a preset time, the step of performing a corresponding video recycling phase operation on the video attribute data associated with the target tag includes:

[0011] When the activity data is lower than the preset low peak period threshold within a preset time and the target tag is an initialization tag, performing a corresponding first recycling operation on the video attribute data associated with the initialization tag according to a video compression rule set;

[0012] or when the activity data is lower than the preset low peak threshold within a preset time and the target tag is a tag that has been recycled once, performing a corresponding second recycling operation on the video attribute data associated with the tag that has been recycled once according to the video compression rule set;

[0013] Or when the activity data is lower than the preset low-peak threshold within a preset time and the target tag is a second-recycled tag, a corresponding third recycling operation is performed on the video attribute data associated with the second-recycled tag.

[0014] Optionally, when the activity data is lower than the preset low peak threshold within a preset time and the target tag is an initialization tag, the step of performing a corresponding first recycling operation on the video attribute data associated with the initialization tag according to a video compression rule set includes:

[0015] When the activity data is lower than the preset low peak period threshold within a preset time, the video attribute data associated with all the initialization tags are retrieved to obtain the first attribute data that has not been accessed within a preset recycling time;

[0016] Using first preset rules associated with various types of video sub-attributes in the first attribute data to perform judgment, to obtain a first judgment result;

[0017] According to the first judgment result, at least one corresponding video compression rule is selected from the video compression rule set to compress the first attribute data and update the initialization tag to a once-recycled tag to obtain first attribute compressed data that meets the first compression requirement;

[0018] The first attribute compressed data is re-encoded and format-encapsulated to overwrite the video attribute data at the current moment.

[0019] Optionally, when the activity data is lower than the preset low peak threshold within a preset time and the target tag is a tag that has been recycled once, the step of performing a corresponding second recycling operation on the video attribute data associated with the tag that has been recycled once according to the video compression rule set includes:

[0020] When the activity data is lower than the preset low-peak threshold within a preset time, searching the video attribute data associated with all the tags that have been recycled once, and obtaining the second attribute data that has not been accessed and recycled within the preset recycling time;

[0021] Using the second preset rules associated with each type of video sub-attribute in the second attribute data to perform judgment, to obtain a second judgment result;

[0022] According to the second judgment result, at least one corresponding video compression rule is selected from the video compression rule set to compress the second attribute data and update the once recycled label to a twice recycled label to obtain second attribute compressed data that meets the second compression requirement;

[0023] The second attribute compressed data is re-encoded and format-encapsulated to overwrite the video attribute data at the current moment.

[0024] Optionally, when the activity data is lower than the preset low-peak threshold within a preset time and the target tag is a second-recycled tag, the step of performing a corresponding third recycling operation on the video attribute data associated with the second-recycled tag includes:

[0025] When the activity data is lower than the preset low-peak threshold within a preset time, searching the video attribute data associated with all the secondarily recycled tags to obtain the third attribute data that has not been accessed and recycled within the preset recycling time;

[0026] The third attribute data is deleted and the secondarily recycled tag is updated to a recycled tag.

[0027] Optionally, performing an information extraction operation on the video attribute data to obtain the video information and the status tag and add them to a record table;

[0028] When the video recycling operation is completed, the status label in the record table is updated to the status label at the current moment.

[0029] Optionally, the video compression rule set includes a bit rate processing rule, a frame number processing rule, a resolution processing rule, a video length processing rule, a video format processing rule and a vector quantization rule;

[0030] The video attribute data includes bit rate, frame number, resolution, video length and video format.

[0031] A second aspect of the present invention provides a video recovery device, comprising:

[0032] A data processing module, used for generating video attribute data and adding a status tag to the video attribute data when the duration of the received surveillance video is greater than a preset time threshold;

[0033] A data acquisition module, configured to acquire the state tag with the highest proportion among all the state tags as a target tag when it is detected that the remaining storage space of the media server reaches a preset storage threshold;

[0034] A data comparison module, used for obtaining the activity data of the media server and comparing it with a preset low-peak period threshold;

[0035] The data recycling module is used to execute a corresponding video recycling phase for the video attribute data associated with the target tag when the activity data is lower than the preset low-peak threshold within a preset time.

[0036] A third aspect of the present invention provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the video recovery method as described in any one of the above items.

[0037] A fourth aspect of the present invention provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed, the video recovery method as described in any one of the above items is implemented.

[0038] It can be seen from the above technical solutions that the present invention has the following advantages:

[0039] When the duration of the surveillance video received by the media server is greater than the preset time threshold, video attribute data is generated and a status tag is added to the video attribute data; when it is detected that the remaining storage space of the media server has reached the preset storage threshold, the status tag with the highest proportion of all status tags is selected as the target tag; the operating status data of the media server is obtained and compared with the preset low-peak threshold; when the activity data is lower than the preset low-peak threshold within the preset time, the corresponding video recovery operation is performed on the video attribute data associated with the target tag. This solves the technical problem that even if the existing optical fiber remote self-healing system adds a remote monitoring function, the media server will store a large amount of surveillance videos due to the need for long-term monitoring, resulting in high disk storage space pressure and high storage costs. It effectively reduces the burden on the media server and reduces storage costs. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0041] Figure 1 A flowchart of a video recycling method provided in Embodiment 1 of the present invention;

[0042] Figure 2 A flowchart of a video recycling method provided in Embodiment 2 of the present invention;

[0043] Figure 3 This is a structural block diagram of a video recovery device provided in Embodiment 3 of the present invention. DETAILED DESCRIPTION

[0044] The embodiments of the present invention provide a video recovery method, device, equipment and medium, which are used to solve the technical problem that even if the existing optical fiber remote self-healing system adds a remote monitoring function, due to the need for long-term monitoring, the media server will store a large amount of monitoring video, resulting in high disk storage space pressure and high storage cost.

[0045] In order to make the purpose, features and advantages of the present invention more obvious and easy to understand, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described below 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.

[0046] See also Figure 1 , Figure 1 A flowchart of the steps of a video recycling method provided in Embodiment 1 of the present invention.

[0047] The present invention provides a video recovery method, comprising:

[0048] Step 101: When the duration of the received surveillance video is greater than a preset time threshold, video attribute data is generated and a status tag is added to the video attribute data.

[0049] It should be noted that a video recovery method protected by the present application is applied to a media server, and a camera on a manipulator on a fiber optic remote self-healing system obtains surveillance video (the surveillance mode can be set, including continuously turning on the camera, turning on the camera after the manipulator receives a moving instruction, and turning on the camera only when there is abnormal vibration or obstruction in the movement of the manipulator). After the surveillance video is generated, the fiber optic remote self-healing system continuously transmits the surveillance video to the media server through a communication connection with the media server.

[0050] In an embodiment of the present invention, the optical fiber remote self-healing system is communicatively connected to the media server, and the optical fiber remote self-healing system continuously transmits the monitoring video to the media server. When the duration of the media server receiving the monitoring video is greater than a preset time threshold, video attribute data is generated and a status tag is added to the video attribute data.

[0051] Step 102: When it is detected that the remaining storage space of the media server reaches a preset storage threshold, the state tag with the highest proportion is selected as the target tag.

[0052] The target tag refers to the state tag with the highest proportion among all state tags as the target tag.

[0053] It should be noted that the target tag will be selected only when it is detected that the remaining storage space of the media server reaches the preset storage threshold. The preset storage threshold can be set as needed, such as 30TB, 20TB or 10TB, and is not specifically limited here. In this embodiment, the preset storage threshold is set to 30TB.

[0054] In the embodiment of the present invention, when it is detected that the remaining storage space of the media server reaches a preset storage threshold, the state tag with the highest proportion in the number of all state tags is selected as the target tag.

[0055] Step 103: Acquire activity data of the media server and compare it with a preset low-peak period threshold.

[0056] Activity data refers to media server load utilization.

[0057] It should be noted that after obtaining the activity data of the media server, it is necessary to compare it with the preset off-peak threshold. The setting of the off-peak threshold can be set as needed, such as a load utilization rate of 40%, 30% or 20%. There is no specific limitation here. In this embodiment, the off-peak threshold is set to 40%.

[0058] In the embodiment of the present invention, the operating status data of the media server is obtained and compared with a preset low-peak period threshold.

[0059] Step 104: When the activity data is lower than a preset low-peak threshold within a preset time, a corresponding video recycling operation is performed on the video attribute data associated with the target tag.

[0060] Video recycling operations refer to performing associated data compression operations on video attribute data.

[0061] It should be noted that the activity data of the media server needs to be lower than the preset off-peak threshold within the preset time before the corresponding video recovery operation is performed on the video attribute data associated with the target tag. The preset time can be set as needed, such as 10 minutes, 8 minutes or 5 minutes. There is no specific limitation here. In this embodiment, the preset time is set to 10 minutes.

[0062] In the embodiment of the present invention, when the activity data is lower than a preset low-peak threshold within a preset time, a corresponding data compression operation is performed on the video attribute data associated with the target tag.

[0063] In an embodiment of the present invention, the optical fiber remote self-healing system is connected to the media server for communication, and the optical fiber remote self-healing system continuously transmits the monitoring video to the media server. When the duration of the monitoring video received by the media server is greater than the preset time threshold, video attribute data is generated, and a status tag is added to the video attribute data; when it is detected that the remaining storage space of the media server reaches the preset storage threshold, the status tag with the highest proportion of all status tags is selected as the target tag; the operating status data of the media server is obtained and compared with the preset low-peak threshold; when the activity data is lower than the preset low-peak threshold within the preset time, the corresponding data compression operation is performed on the video attribute data associated with the target tag. This solves the technical problem that even if the existing optical fiber remote self-healing system adds a remote monitoring function, the media server will store a large amount of monitoring videos due to the need for long-term monitoring, resulting in high disk storage space pressure and high storage costs. It effectively reduces the burden on the media server and reduces storage costs.

[0064] See also Figure 2 , Figure 2 A flowchart of the steps of a video recovery method provided in Embodiment 2 of the present invention.

[0065] The present invention provides a video recovery method, comprising:

[0066] Step 201: When the duration of the received surveillance video is greater than a preset time threshold, video attribute data is generated and a status tag is added to the video attribute data.

[0067] Video attribute data refers to bit rate, frame rate, resolution, video length and video format.

[0068] It should be noted that video attribute data will only be generated and a status label will be added to the video attribute data when the duration of the received surveillance video is greater than the preset time threshold. The preset time threshold can be set as needed, such as 15 minutes, 10 minutes or 8 minutes. There is no specific limitation here. In this embodiment, the preset time threshold is set to 15 minutes.

[0069] In an embodiment of the present invention, the optical fiber remote self-healing system is communicatively connected to the media server, and the optical fiber remote self-healing system continuously transmits the monitoring video to the media server. When the duration of the media server receiving the monitoring video is greater than a preset time threshold, video attribute data is generated and a status tag is added to the video attribute data.

[0070] Step 202: When it is detected that the remaining storage space of the media server reaches a preset storage threshold, the state tag with the highest proportion is selected as the target tag.

[0071] The specific content of step 202 is consistent with the specific content of the aforementioned step 102, and will not be repeated here.

[0072] Step 203: Acquire activity data of the media server and compare it with a preset low-peak period threshold.

[0073] In the embodiment of the present invention, the activity data of the media server is obtained and compared with a preset low-peak period threshold.

[0074] Step 204: When the activity data is lower than a preset low-peak threshold within a preset time, a corresponding video recycling operation is performed on the video attribute data associated with the target tag.

[0075] It should be noted that based on the disk life of the media server, the number of executions of the video recovery operation will be set. The number of executions of the video recovery operation can be set as needed, such as 100 times, 150 times or 200 times. No specific limitation is made here. In this embodiment, the number of executions of the video recovery operation is set to 100 times.

[0076] Further, step 204 may include the following sub-steps:

[0077] Step S2041: When the activity data is lower than a preset low-peak threshold within a preset time and the target tag is an initialization tag, a corresponding first recycling operation is performed on the video attribute data associated with the initialization tag according to the video compression rule set.

[0078] It should be noted that the target tag includes an initialization tag, a tag that has been recycled once, or a tag that has been recycled twice. The state tag with the highest proportion in number among these three state tags is used as the target tag, and the target tag can only be one of these three state tags. When the initialization tag has the highest proportion in number among all state tags, the initialization tag is the target tag, and then the corresponding first recycling operation is performed on the video attribute data associated with the initialization tag according to the video compression rule set. The video compression rule set includes a bit rate processing rule, a frame number processing rule, a resolution processing rule, a video length processing rule, a video format processing rule and a vector quantization rule. The priority of the compression rule is set based on the impact of image quality loss. Among them, the bit rate processing rule is used to compress the bit rate when the bit rate is greater than a preset bit rate threshold, the frame number processing rule is used to compress the frame number when the frame number is greater than a preset frame number threshold, the resolution processing rule is used to compress the resolution when the resolution is greater than a preset resolution threshold, the video length processing rule is used to compress the video length when the video length is greater than a preset video length threshold, the video format processing rule is used to convert the video format into the RMVB format when the video format does not belong to the RMVB format, and the vector quantization rule is used to perform vector quantization when a code book exists in the surveillance video, and to determine whether the coding rate and distortion rate after vector quantization are still within a preset range. If not within the preset range, the vector quantization processing rule is not executed. The preset range can be set as needed, such as whether the coding rate is within 25%, 30% or 35% and whether the distortion rate is within 5%, 6% or 8%. Without making any specific limitation here, in the embodiment of the present invention, the preset range is set to whether the coding rate is within 25% and whether the distortion rate is within 5%.

[0079] Or when the activity data is lower than a preset low-peak threshold within a preset time and the target tag is a tag that has been recycled once, a corresponding second recycling operation is performed on the video attribute data associated with the tag that has been recycled once according to the video compression rule set.

[0080] It should be noted that the target tag can only be one of the three status tags. When the number of tags that have been recycled once accounts for the highest proportion among all status tags, the tag that has been recycled once is the target tag, and then the corresponding second recycling operation is performed on the video attribute data associated with the tag that has been recycled once according to the video compression rule set.

[0081] Or when the activity data is lower than a preset low-peak threshold within a preset time and the target tag is a second-recycled tag, a corresponding third recycling operation is performed on the video attribute data associated with the second-recycled tag.

[0082] It should be noted that the target tag can only be one of the three status tags. When the number of tags that have been recycled twice accounts for the highest proportion among all status tags, the tag that has been recycled twice is the target tag.

[0083] Further, step 2041 may include the following sub-steps:

[0084] Step S11: When the activity data is lower than a preset low-peak threshold within a preset time, the video attribute data associated with all the initialization tags are retrieved to obtain the first attribute data that has not been accessed within a preset recycling time.

[0085] The first attribute data refers to the video attribute data including bit rate, frame number, resolution, video length and video format, that is, the video attribute data associated with the initialization tag that has not been accessed within the preset recycling time.

[0086] It should be noted that, for surveillance videos recorded recently, video recycling operations will not be performed on them before the preset recycling time. When the target tag is an initialization tag, video attribute data associated with all initialization tags will be retrieved, and only the video attribute data associated with the initialization tag that has not been accessed within the preset recycling time, that is, the first attribute data, will be obtained. The preset recycling time can be set as needed, such as 3 days, 4 days or 5 days, which is not specifically limited here. In this embodiment, the preset recycling time is set to 3 days.

[0087] In an embodiment of the present invention, when the activity data is lower than a preset off-peak threshold within a preset time, video attribute data associated with all initialization tags are retrieved, and only video attribute data associated with the initialization tags that have not been accessed within the preset recovery time are obtained, and the obtained video attribute data associated with the initialization tags that have not been accessed within the preset recovery time are used as the first attribute data.

[0088] Step S12: using the first preset rules associated with each type of video sub-attribute in the first attribute data to perform judgment, and obtain a first judgment result.

[0089] It should be noted that each type of video sub-attribute in the first attribute data is judged respectively with the associated first preset rule, that is, the bit rate, frame number, resolution, video length and video format are judged respectively with the associated first preset rule. The various preset thresholds and parameter conditions in the first preset rule can be set as needed, and are not specifically limited here. In this embodiment, the preset thresholds in the first preset rule are set to whether the bit rate is greater than 15000, whether the frame number is greater than 60 frames, whether the resolution is greater than 720P, whether the video length is greater than 5 minutes, whether the video format is RMVB format, or whether there is a code book for the surveillance video. When at least one type of video sub-attribute is greater than the preset threshold, is not in RMVB format, or there is a code book for the surveillance video, it is classified into the first judgment result.

[0090] In an embodiment of the present invention, each type of video sub-attribute in the first attribute data is judged respectively with the associated first preset rule, that is, the bit rate, frame number, resolution, video length and video format are judged respectively with the associated first preset rule to obtain a first judgment result.

[0091] Step S13: According to the first judgment result, at least one corresponding video compression rule is selected from the video compression rule set to compress the first attribute data and the initialization tag is updated to a once-recycled tag to obtain first attribute compressed data that meets the first compression requirement.

[0092] The video compression rule set refers to bit rate processing rules, frame number processing rules, resolution processing rules, video length processing rules, video format processing rules and vector quantization rules. The priority of the compression rules is set based on the impact of image quality loss to minimize image quality loss.

[0093] It should be noted that the monitoring video size needs to be compressed to a compressed video size that meets the first compression requirement. According to the first judgment result, the video compression rules corresponding to one or more compression means with the smallest image quality loss are preferentially selected. When the monitoring video size meets the first compression requirement, the first attribute compressed data is output. The setting of the first compression requirement can be set as needed, such as compressing to 50%, 75% or 80% of the original monitoring video size. No specific limitation is made here. In this embodiment, the first compression requirement is set to that the monitoring video size after the first recovery operation needs to be compressed to 80% of the monitoring video size at the current moment.

[0094] In an embodiment of the present invention, based on the first judgment result, at least one rule corresponding to the compression processing means with the least loss in image quality is preferentially selected from the video compression rule set to compress the first attribute data and update the initialization label to a once recycled label until the first compression requirement is met, thereby obtaining the first attribute compressed data.

[0095] Step S14: re-encode and format-encapsulate the first attribute compressed data and overwrite the video attribute data at the current moment.

[0096] Format encapsulation refers to putting the encoded and compressed video tracks into a file according to a certain format.

[0097] It should be noted that after the first attribute compressed data is re-encoded and format-encapsulated, the original video attribute data needs to be overwritten.

[0098] In the embodiment of the present invention, the first attribute compressed data is re-encoded and format-encapsulated to cover the video attribute data at the current moment.

[0099] Furthermore, step 2041 also includes the following sub-steps:

[0100] Step S21: When the activity data is lower than a preset low-peak threshold within a preset time, all video attribute data associated with tags that have been recycled once are retrieved to obtain second attribute data that has not been accessed and recycled within the preset recycling time.

[0101] The second attribute data refers to bit rate, frame number, resolution, video length and video format, that is, video attribute data associated with a recycled tag that has not been accessed and recycled within a preset recycling time.

[0102] It should be noted that, for the recovered surveillance video, the video recovery operation will not be performed on it before the preset recovery time. When the target tag is a tag that has been recovered once, the video attribute data associated with all the tags that have been recovered once are retrieved, and only the video attribute data associated with the tags that have been recovered once and have not been accessed and recovered within the preset recovery time, that is, the second attribute data, are obtained. The preset recovery time can be set as needed, such as 3 days, 4 days or 5 days, which is not specifically limited here. In this embodiment, the preset recovery time is set to 3 days.

[0103] In an embodiment of the present invention, when the activity data is lower than a preset off-peak threshold within a preset time, all video attribute data associated with the once-recycled tags are retrieved, and only the video attribute data associated with the once-recycled tags that have not been accessed and recycled within the preset recycling time are obtained, and the obtained video attribute data associated with the once-recycled tags that have not been accessed and recycled within the preset recycling time are used as the second attribute data.

[0104] Step S22: using the second preset rules associated with each type of video sub-attribute in the second attribute data to perform judgment, and obtain a second judgment result.

[0105] It should be noted that each type of video sub-attribute in the second attribute data is judged respectively with the associated second preset rule, that is, the bit rate, frame number, resolution, video length and video format are judged respectively with the associated second preset rule. The various preset thresholds in the second preset rule can be set as needed, and are not specifically limited here. In this embodiment, the preset thresholds in the second preset rule are set to whether the bit rate is greater than 13000, whether the frame number is greater than 30 frames, whether the resolution is greater than 480P, whether the video length is greater than 4 minutes, whether the video format is RMVB format, or whether there is a code book for the surveillance video. When at least one type of video sub-attribute is greater than the preset threshold, is not in RMVB format, or there is a code book for the surveillance video, it is classified into the second judgment result.

[0106] In an embodiment of the present invention, each type of video sub-attribute in the second attribute data is judged respectively with the associated second preset rules, that is, the bit rate, frame number, resolution, video length and video format are judged respectively with the associated second preset rules to obtain a second judgment result.

[0107] The video compression rule set refers to bit rate processing rules, frame number processing rules, resolution processing rules, video length processing rules, video format processing rules and vector quantization rules. The priority of the compression rules is set based on the impact of image quality loss to minimize image quality loss.

[0108] It should be noted that the monitoring video size needs to be compressed to a compressed video size that meets the second compression requirement. According to the second judgment result, the video compression rules corresponding to one or more compression means with the smallest image quality loss are preferentially selected. When the monitoring video size meets the second compression requirement, the second attribute compressed data is output. The second compression requirement can be set as needed, such as compressing to 50%, 75% or 80% of the original monitoring video size. No specific limitation is made here. In this embodiment, the second compression requirement is set to that the monitoring video size after the second recovery operation needs to be compressed to 80% of the monitoring video size at the current moment.

[0109] In an embodiment of the present invention, based on the second judgment result, at least one rule corresponding to the compression processing means with the least loss in image quality is preferentially selected from the video compression rule set to compress the second attribute data and update the initialization label to a second recycled label until the second compression requirement is met, thereby obtaining the second attribute compressed data.

[0110] Step S24: re-encode and format-encapsulate the second attribute compressed data and overwrite the video attribute data at the current moment.

[0111] It should be noted that after the second attribute compressed data is re-encoded and format-encapsulated, the original video attribute data needs to be overwritten.

[0112] In the embodiment of the present invention, the second attribute compressed data is re-encoded and format-encapsulated to cover the video attribute data at the current moment.

[0113] Furthermore, step 2041 also includes the following sub-steps:

[0114] Step S31: When the activity data is lower than a preset low-peak threshold within a preset time, all video attribute data associated with the secondarily recycled tags are retrieved to obtain third attribute data that has not been accessed and recycled within the preset recycling time.

[0115] The third attribute data refers to bit rate, frame number, resolution, video length and video format, that is, video attribute data associated with the secondary recycled tag that has not been accessed and recycled within the preset recycling time.

[0116] It should be noted that for the recycled surveillance video, the video recycling operation will not be performed on it before the preset recycling time. When the target tag is a tag that has been recycled twice, the video attribute data associated with all the tags that have been recycled twice will be retrieved, and only the video attribute data associated with the tags that have been recycled twice that have not been accessed and recycled within the preset recycling time, that is, the third attribute data, will be obtained.

[0117] In an embodiment of the present invention, when the activity data is lower than a preset off-peak threshold within a preset time, all video attribute data associated with the secondarily recycled tags are retrieved, and only the video attribute data associated with the secondarily recycled tags that have not been accessed and recycled within the preset recycling time are obtained, and the obtained video attribute data associated with the secondarily recycled tags that have not been accessed and recycled within the preset recycling time are used as the third attribute data.

[0118] Step S32: Delete the third attribute data and update the secondarily recycled tag to a recycled tag.

[0119] It should be noted that after obtaining the third attribute data, that is, after obtaining the surveillance video associated with the second recycled tag, it can also be set to automatically send the list of proposed deletions to the operator, waiting for the operator to make the final manual confirmation.

[0120] In the embodiment of the present invention, the third attribute data is deleted and the secondarily recycled tag is updated to a recycled tag.

[0121] Step 205: Perform an information extraction operation on the video attribute data to obtain video information and status tags and add them to the record table.

[0122] It should be noted that the media server performs an information extraction operation on the video attribute data to obtain video information such as video time, video region, device number, etc., and adds the obtained video information and status tag to the corresponding record table.

[0123] In the embodiment of the present invention, the media server performs an information extraction operation on the video attribute data, and adds the obtained video information and status tag to the corresponding record table.

[0124] Step 206: When the video recovery operation is completed, the status label in the record table is updated to the status label at the current moment.

[0125] It should be noted that when the first recycling operation is completed, the initialization tag in the record table is updated to the recycled once tag; when the second recycling operation is completed, the recycled once tag in the record table is updated to the recycled twice tag; when the third recycling operation is completed, the recycled twice tag in the record table is updated to the recycled tag and the recycling time is recorded.

[0126] In the embodiment of the present invention, when the video recycling operation at any stage is completed, the state label in the record table is updated to the state label at the current moment.

[0127] In an embodiment of the present invention, when the duration of the surveillance video received by the media server is greater than a preset time threshold, video attribute data is generated and a status tag is added to the video attribute data; when it is detected that the remaining storage space of the media server reaches the preset storage threshold, the status tag with the highest number among all status tags is selected as the target tag; the running status data of the media server is obtained and compared with the preset off-peak threshold; when the target tag is an initialization tag, the video attribute data associated with all initialization tags are retrieved, and only the video attribute data associated with the initialization tags that have not been accessed within the preset recycling time are obtained, and the video attribute data associated with the initialization tags that have not been accessed within the preset recycling time are obtained as the first attribute data, and each type of video sub-attribute in the first attribute data is judged with the associated first preset rule, that is, the bit rate, frame number, resolution, video length and video format are judged with the associated first preset rule respectively, to obtain a first judgment result, According to the first judgment result, at least one rule corresponding to the compression processing means with the smallest image quality loss is preferentially selected from the video compression rule set to compress the first attribute data and update the initialization tag to a tag that has been recycled once, until the first compression requirement is met, to obtain the first attribute compressed data, re-encode and format-encapsulate the first attribute compressed data and overwrite the video attribute data at the current moment; or when the target tag is a tag that has been recycled once, retrieve all video attribute data associated with the tags that have been recycled once, obtain the second attribute data that has not been accessed and recycled within the preset recycling time, and judge each type of video sub-attribute in the second attribute data with the associated second preset rules, that is, judge the bit rate, frame number, resolution, video length and video format with the associated second preset rules respectively, A second judgment result is obtained, and according to the second judgment result, at least one rule corresponding to the compression processing means with the smallest image quality loss is preferentially selected from the video compression rule set to compress the second attribute data and update the initialization tag to a second-recycled tag, until the second compression requirement is met, and the second attribute compressed data is obtained, and the second attribute compressed data is re-encoded and format-encapsulated to cover the video attribute data at the current moment; or when the target tag is a second-recycled tag, only the video attribute data associated with the second-recycled tag that has not been accessed and recycled within the preset recycling time is obtained, and the obtained video attribute data associated with the second-recycled tag that has not been accessed and recycled within the preset recycling time is used as the third attribute data, the third attribute data is deleted, and the second-recycled tag is updated to a recycled tag; the media server performs an information extraction operation on the video attribute data, adds the obtained video information and status tag to the corresponding record table, and when any stage of the video recycling operation is completed, the status tag in the record table is updated to the status tag at the current moment.This solves the technical problem that even if the existing optical fiber remote self-healing system adds remote monitoring function, the media server will store a large amount of monitoring video due to the need for long-term monitoring, resulting in high disk storage space pressure and high storage cost. It effectively reduces the burden on the media server and reduces storage costs.

[0128] See also Figure 3 , Figure 3 This is a structural block diagram of a video recovery device provided in Embodiment 3 of the present invention.

[0129] The present invention provides a video recovery device, comprising:

[0130] The data processing module 301 is used to generate video attribute data and add a status tag to the video attribute data when the duration of receiving the surveillance video is greater than a preset time threshold.

[0131] The data acquisition module 302 is used to acquire the state tag with the highest proportion among all the state tags as the target tag when it is detected that the remaining storage space of the media server reaches a preset storage threshold.

[0132] The data comparison module 303 is used to obtain the activity data of the media server and compare it with a preset low-peak period threshold.

[0133] The data recycling module 304 is used to execute a corresponding video recycling phase for the video attribute data associated with the target tag when the activity data is lower than a preset low-peak threshold within a preset time.

[0134] Further, the data recovery module 304 includes:

[0135] The recycling submodule is used to perform a corresponding first recycling operation on the video attribute data associated with the initialization tag according to the video compression rule set when the activity data is lower than a preset low-peak threshold within a preset time and the target tag is an initialization tag.

[0136] Or it is used to perform a corresponding second recycling operation on the video attribute data associated with the once recycled tag according to the video compression rule set when the activity data is lower than a preset low-peak threshold within a preset time and the target tag is a once recycled tag.

[0137] Or it is used to perform a corresponding third recycling operation on the video attribute data associated with the secondarily recycled tag when the activity data is lower than a preset low-peak threshold within a preset time and the target tag is a secondarily recycled tag.

[0138] Furthermore, the recycling submodule includes:

[0139] The first retrieval unit is used to retrieve the video attribute data associated with all the initialization tags when the activity data is lower than a preset low-peak threshold within a preset time, and obtain the first attribute data that has not been accessed within a preset recycling time.

[0140] The first judgment unit is used to perform judgment using first preset rules associated with various types of video sub-attributes in the first attribute data to obtain a first judgment result.

[0141] The first compression unit is used to select at least one corresponding video compression rule from the video compression rule set according to the first judgment result to compress the first attribute data and update the initialization tag to a once-recycled tag to obtain first attribute compressed data that meets the first compression requirement.

[0142] The first overwriting unit is used to re-encode and format-encapsulate the first attribute compressed data and overwrite the video attribute data at the current moment.

[0143] Furthermore, the recovery submodule also includes:

[0144] The second retrieval unit is used to retrieve all video attribute data associated with tags that have been recycled once, when the activity data is lower than a preset low-peak threshold within a preset time, to obtain second attribute data that has not been accessed and recycled within the preset recycling time.

[0145] The second judgment unit is used to perform judgment by using second preset rules associated with each type of video sub-attribute in the second attribute data to obtain a second judgment result.

[0146] The second compression unit is used to select at least one corresponding video compression rule in the video compression rule set according to the second judgment result to compress the second attribute data and update the once recycled label to the twice recycled label to obtain the second attribute compressed data that meets the second compression requirement.

[0147] The second overwriting unit is used to re-encode and format-encapsulate the second attribute compressed data and overwrite the video attribute data at the current moment.

[0148] Furthermore, the recovery submodule also includes:

[0149] The third retrieval unit is used to retrieve all video attribute data associated with the secondarily recycled tags when the activity data is lower than a preset low-peak threshold within a preset time, and obtain the third attribute data that has not been accessed and recycled within the preset recycling time.

[0150] The third deleting unit is used to delete the third attribute data and update the secondarily recycled tag to a recycled tag.

[0151] Furthermore, it also includes:

[0152] The video compression rule set includes bit rate processing rules, frame number processing rules, resolution processing rules, video length processing rules, video format processing rules and vector quantization rules.

[0153] Video attribute data includes bit rate, frame rate, resolution, video length and video format.

[0154] Furthermore, the data recovery module 304 also includes:

[0155] The information extraction submodule is used to perform information extraction operations on video attribute data, obtain video information and status tags, and add them to the record table.

[0156] The label update submodule is used to update the status label in the record table to the status label at the current moment after the video recycling operation is completed.

[0157] In an embodiment of the present invention, when the duration of the surveillance video received by the media server is greater than a preset time threshold, video attribute data is generated and a status tag is added to the video attribute data; when it is detected that the remaining storage space of the media server reaches the preset storage threshold, the status tag with the highest number of all status tags is selected as the target tag; the operating status data of the media server is obtained and compared with the preset low-peak threshold; when the activity data is lower than the preset low-peak threshold within a preset time, the corresponding video recovery operation is performed on the video attribute data associated with the target tag. This solves the technical problem that even if the existing optical fiber remote self-healing system adds a remote monitoring function, the media server will store a large amount of surveillance videos due to the need for long-term monitoring, resulting in high disk storage space pressure and high storage costs. It effectively reduces the burden on the media server and reduces storage costs.

[0158] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices, modules, sub-modules and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0159] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0160] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0161] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0162] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0163] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A video recycling method, characterized in that: Applied to a media server, the media server is communicatively connected to an optical fiber remote self-healing system, and the method comprises: When the duration of the received surveillance video is greater than a preset time threshold, generating video attribute data and adding a status tag to the video attribute data; When it is detected that the remaining storage space of the media server reaches a preset storage threshold, the state tag with the highest proportion is selected as the target tag; Obtaining activity data of the media server and comparing it with a preset low-peak period threshold; When the activity data is lower than the preset low-peak threshold within a preset time, performing a corresponding video recycling operation on the video attribute data associated with the target tag; The target tag includes an initialized tag, a tag that has been recycled once, or a tag that has been recycled twice. When the activity data is lower than the preset low-peak threshold within a preset time, the step of performing a corresponding video recycling phase operation on the video attribute data associated with the target tag includes: When the activity data is lower than the preset low peak period threshold within a preset time and the target tag is an initialization tag, performing a corresponding first recycling operation on the video attribute data associated with the initialization tag according to a video compression rule set; or when the activity data is lower than the preset low peak threshold within a preset time and the target tag is a tag that has been recycled once, performing a corresponding second recycling operation on the video attribute data associated with the tag that has been recycled once according to the video compression rule set; Or when the activity data is lower than the preset low-peak threshold within a preset time and the target tag is a second-recycled tag, a corresponding third recycling operation is performed on the video attribute data associated with the second-recycled tag.

2. The video recycling method according to claim 1, characterized in that: When the activity data is lower than the preset low peak threshold within a preset time and the target tag is an initialization tag, the step of performing a corresponding first recycling operation on the video attribute data associated with the initialization tag according to a video compression rule set includes: When the activity data is lower than the preset low peak period threshold within a preset time, the video attribute data associated with all the initialization tags are retrieved to obtain the first attribute data that has not been accessed within a preset recycling time; Using first preset rules associated with various types of video sub-attributes in the first attribute data to perform judgment, to obtain a first judgment result; According to the first judgment result, at least one corresponding video compression rule is selected from the video compression rule set to compress the first attribute data and update the initialization tag to a once-recycled tag to obtain first attribute compressed data that meets the first compression requirement; The first attribute compressed data is re-encoded and format-encapsulated to overwrite the video attribute data at the current moment.

3. The video recycling method according to claim 1, characterized in that: The step of performing a corresponding second recycling operation on the video attribute data associated with the once recycled tag according to the video compression rule set when the activity data is lower than the preset low peak threshold within a preset time and the target tag is a once recycled tag, comprises: When the activity data is lower than the preset low-peak threshold within a preset time, searching the video attribute data associated with all the tags that have been recycled once, and obtaining the second attribute data that has not been accessed and recycled within the preset recycling time; Using the second preset rules associated with each type of video sub-attribute in the second attribute data to perform judgment, to obtain a second judgment result; According to the second judgment result, at least one corresponding video compression rule is selected from the video compression rule set to compress the second attribute data and update the once recycled label to a twice recycled label to obtain second attribute compressed data that meets the second compression requirement; The second attribute compressed data is re-encoded and format-encapsulated to overwrite the video attribute data at the current moment.

4. The video recycling method according to claim 1, characterized in that: The step of performing a corresponding third recycling operation on the video attribute data associated with the secondarily recycled tag when the activity data is lower than the preset low-peak threshold within a preset time and the target tag is a secondarily recycled tag comprises: When the activity data is lower than the preset low-peak threshold within a preset time, searching the video attribute data associated with all the secondarily recycled tags to obtain the third attribute data that has not been accessed and recycled within the preset recycling time; The third attribute data is deleted and the secondarily recycled tag is updated to a recycled tag.

5. The video recycling method according to claim 1, characterized in that: Also includes: Performing an information extraction operation on the video attribute data to obtain the video information and the status tag and adding them to a record table; When the video recycling operation is completed, the status label in the record table is updated to the status label at the current moment.

6. The video recycling method according to claim 1, characterized in that: Also includes: The video compression rule set includes a bit rate processing rule, a frame number processing rule, a resolution processing rule, a video length processing rule, a video format processing rule and a vector quantization rule; The video attribute data includes bit rate, frame number, resolution, video length and video format.

7. A video recovery device applied to the video recovery method according to claim 1, characterized in that: Applied to a media server, the optical fiber remote self-healing system is communicatively connected with the media server, and the device comprises: A data processing module, used for generating video attribute data and adding a status tag to the video attribute data when the duration of the received surveillance video is greater than a preset time threshold; A data acquisition module, configured to acquire the state tag with the highest proportion among all the state tags as a target tag when it is detected that the remaining storage space of the media server reaches a preset storage threshold; A data comparison module, used for obtaining the activity data of the media server and comparing it with a preset low-peak period threshold; The data recycling module is used to execute a corresponding video recycling phase for the video attribute data associated with the target tag when the activity data is lower than the preset low-peak threshold within a preset time.

8. An electronic device, characterized in that: It comprises a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the steps of the video recovery method as described in any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed, the video recovery method as described in any one of claims 1-6 is implemented.

Citation Information

Patent Citations

  • Dynamic balancing processing method and device for disk spaces and disk system

    CN102799395A