A video file backup method and system
By evaluating the importance of video files and adopting the maze backup method, the problems of insufficient security and uneven backup in traditional backup methods are solved, efficient and safe backup of video files is achieved, and distributed backup and accurate data blocks are ensured. recover.
Patent Information
- Application Number
- CN202311822623.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-27
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2043-12-27
AI Technical Summary
Traditional video file backup methods lack an assessment of file importance, resulting in insufficient security, uneven backup and poor tracking, making it difficult to ensure the security of sensitive data and the accurate recovery of data blocks.
By evaluating the importance of the video file, if the importance is high, the maze backup method is used to split the data blocks and randomly select paths in the backup maze for backup and masking. The backup path information is recorded to ensure the distributed backup and security of the data blocks. .
It improves the backup security and attack resistance of video files, ensures accurate recovery of data blocks, reduces the impact on system performance, and improves backup efficiency and parallelism.
Smart Images

Figure CN117692332B
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of data processing, and in particular relates to a method and system for backing up video files. Background Art
[0002] Backup of video files refers to copying existing video data to another storage medium or location to prevent the loss, damage or unavailability of the original data. Backup is one of the key steps in data management and protection to deal with various risks such as hardware failure, accidental deletion, malicious attacks, natural disasters, etc.
[0003] Traditional video file backup methods may have the following defects: 1. Usually, the importance of files is not evaluated, and they are all backed up according to unified standards. However, many existing backup methods lack additional security enhancements for backup data, which may result in the security requirements of some important video files not being guaranteed. In some sensitive data scenarios, they are vulnerable to attacks or leaks. 2. Traditional backup methods are prone to uneven distribution of backup data blocks, resulting in overly dense backups in some areas and sparse backups in other areas. 3. Traditional backup methods have defects in the traceability of the backup process, making it difficult to accurately track the backup path and key information in the backup process. Summary of the invention
[0004] The present invention provides a method and system for backing up video files, aiming to solve the problems mentioned in the above background technology.
[0005] The present invention is implemented in this way, providing a method for backing up a video file, the steps comprising:
[0006] After receiving the backup request for the video file, the legality of the video file is authenticated and the importance of the video file is evaluated;
[0007] If the importance of the video file is greater than the preset importance threshold, the video file is divided into multiple data blocks and a maze backup is performed, specifically:
[0008] Create a backup maze and use the data blocks of the video file to build the basic structure of the backup maze. Each data block corresponds to a unit of the backup maze. The backup maze is represented by a two-dimensional array data structure. The initial path in the backup maze is empty, indicating that the data block has not been backed up.
[0009] Randomly select some data blocks in the backup maze for masking,
[0010] Define backup path selection rules,
[0011] Select a starting point in the backup maze as the starting position of the backup path,
[0012] Select a backup path in the backup maze according to the predefined backup path selection rule.
[0013] Mark the selected backup path and record the backup path information. The marked backup path indicates that the data blocks on the corresponding backup path have been backed up. The backup path information includes the starting point, end point, sequence of the backup path, and information about the data blocks on the path.
[0014] Back up all data blocks to the corresponding locations according to the selected backup path.
[0015] Furthermore, the step of randomly selecting some data blocks in the backup maze for masking includes:
[0016] According to the preset masking ratio, some data blocks are randomly selected in the backup maze, and special marks are added to the randomly selected data block paths;
[0017] For the specially marked data block path, replace it with false data according to the defined false video data generation strategy, where the false video data generation strategy includes but is not limited to inserting a false image on the path or applying a blur effect on the path;
[0018] During backup transmission, the masking information during the replacement process is recorded. The masking information includes the masked data block path and the adopted masking method. The masking information will be used to correctly handle the masking during restoration.
[0019] Furthermore, after the step of backing up the non-shielded data blocks to corresponding locations according to the selected backup path, the step further includes:
[0020] Obtain backup path information and masking information. The backup path information includes the starting point, end point, sequence, and data block information of the backup path. The masking information includes the masked data block path and the adopted masking method.
[0021] According to the backup path information, the data blocks on the backup path and the processing path are restored in the newly constructed maze structure, and the restored backup path is merged with the processed data blocks to obtain complete restored data. Among them, for the obscured data blocks on the path, they are restored to the original data content according to the obscuration information and the corresponding unobscuration rules.
[0022] Furthermore, the steps of restoring the backup path and the data blocks on the processing path in the newly constructed maze structure according to the backup path information, and merging the restored backup path with the processed data blocks to obtain complete restored data include:
[0023] Create a blank maze with the same size and data structure as the backup maze, which is called the restoration maze. It is used to record the path information during the restoration process. Initially, all grids in the restoration maze are marked as unvisited.
[0024] According to the backup path information, starting from the starting point of the backup path, in the order of the backup path, the data blocks on the backup path are filled into the restoration maze, and the grids at the corresponding positions in the restoration maze are marked as paths;
[0025] During the restoration process, as the path is restored, the data in the restored maze is continuously updated and filled, and for each restoration step, the grid at the corresponding position in the restored maze is marked as a path;
[0026] After the restoration is completed, the restoration maze is checked to ensure that the restoration path information is consistent with the backup path information. The restoration path information includes the starting point, end point, sequence of the restoration path, and information of data blocks on the restoration path.
[0027] By filling the processed data blocks, a data structure containing a complete restoration path is obtained, which is the final restored video file data.
[0028] Furthermore, the step of defining the backup path selection rule includes:
[0029] Select a starting point in the backup maze as the starting position of the backup path;
[0030] The backup path is selected by performing a random walk in the backup maze, where the random walk means randomly selecting a direction from the feasible directions at each step. This ensures the randomness of the path, so that data blocks in different areas have a chance to be covered.
[0031] Mark the selected backup path in the backup maze to ensure that the same path will not be repeatedly selected during the next backup.
[0032] The steps of randomly walking to select a backup path and marking the selected backup path are repeated until all data blocks in the backup maze are covered.
[0033] Furthermore, the step of evaluating the importance of the current video file includes:
[0034] Define indicators for evaluating the importance of video files, set them as importance indicators, and assign weights to each importance indicator, where the importance indicators include but are not limited to business needs, privacy sensitivity, and change frequency;
[0035] Collect data related to current video files and importance indicators;
[0036] Extract features from the collected data related to the importance index and generate a feature set for evaluating the importance of the current video file;
[0037] The feature set used to evaluate the importance of the current video file and the weights of each importance index are weighted and calculated to obtain a comprehensive score of the importance of the current video file. The formula is:
[0038] TotalScore=w1×F1+w2×F2+…+w n ×F n , where TotalScore is the comprehensive score of the importance of the current video file, F1, F2, ..., F n are the characteristic values of the importance indicators of the current video file, w1, w2, ..., w n are the weights of each importance index.
[0039] Furthermore, after the step of evaluating the importance of the current video file, the following steps may be further performed:
[0040] If the assessed importance of the video file is less than the preset importance threshold, a normal backup is performed.
[0041] The present invention also provides a video file backup system for executing a video file backup method, comprising:
[0042] Importance evaluation module: used to authenticate the legitimacy of video files and evaluate the importance of video files after receiving a backup request for video files;
[0043] Backup operation module: if the importance of the video file is greater than the preset importance threshold, the video file is divided into multiple data blocks and a maze backup is performed, specifically:
[0044] Create a backup maze and use the data blocks of the video file to build the basic structure of the backup maze. Each data block corresponds to a unit of the backup maze. The backup maze is represented by a two-dimensional array data structure. The initial path in the backup maze is empty, indicating that the data block has not been backed up.
[0045] Randomly select some data blocks in the backup maze for masking,
[0046] Define backup path selection rules,
[0047] Select a starting point in the backup maze as the starting position of the backup path,
[0048] Select a backup path in the backup maze according to the predefined backup path selection rule.
[0049] Mark the selected backup path and record the backup path information. The marked backup path indicates that the data blocks on the corresponding backup path have been backed up. The backup path information includes the starting point, end point, sequence of the backup path, and information about the data blocks on the path.
[0050] Back up all data blocks to the corresponding locations according to the selected backup path.
[0051] The beneficial effect of the present invention is that, compared with the prior art, the backup method and system of the video files of the present invention evaluates the importance of the video files, determines the backup level according to the importance threshold, and selects the corresponding backup method. For the video files of high importance, the maze backup is performed to ensure the backup security of the video files of high importance. However, since the maze backup is relatively complex, using it exclusively for high backup levels helps to reduce the impact on system performance. For the video files of low importance, the ordinary backup method can be used, thereby avoiding the execution of the complex maze backup process, which can reduce the complexity of the overall system, reduce the possibility of errors, save resources, and improve the backup efficiency.
[0052] Among them, the present invention performs maze backup for high-importance video files, wherein randomness and maze path selection rules are introduced, making the backup process difficult to predict, thereby enhancing the security of the backup, while shielding some data blocks and random path selection further enhance the backup's anti-attack ability. The design of the backup maze also makes the backup process distributed, and each data block of the video file can be backed up through an independent path. Even if some data blocks are lost, accurate data block restoration can be performed through the backup path information. The backup path is marked and the backup path information is recorded for backup tracking and management, which enables accurate data restoration based on the path information during recovery. Since the distributed backup of data blocks and random path selection can improve the parallelism and efficiency of the backup, the introduction of the backup maze of the present invention will not significantly reduce system performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 It is a first flow chart of the method for backing up video files provided by the present invention;
[0054] Figure 2 It is a second flow chart of the method for backing up video files provided by the present invention;
[0055] Figure 3 The system block diagram of the video file backup system provided by the present invention. DETAILED DESCRIPTION
[0056] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. Embodiment 1
[0057] refer to Figure 1 and Figure 2 Embodiment 1 provides a method for backing up a video file, including steps S101-S102:
[0058] S101, after receiving a backup request for a video file, the video file is authenticated for legitimacy and the importance of the video file is evaluated.
[0059] It should be noted that, in order to ensure that the backup operation is reasonable, safe and efficient, this embodiment authenticates the legitimacy of the video file backup request and evaluates the importance of the file.
[0060] After receiving the backup request for the video file, the video file is authenticated to ensure that the backup request comes from a legitimate source, preventing unauthorized access and potential security threats. The specific operation is: verify the identity authentication information of the request, then check the source IP address of the request to ensure that it is a permitted backup source, and then use digital signatures or other identity authentication mechanisms to ensure the integrity and authenticity of the request.
[0061] Then evaluate the importance of the video files to determine whether special backup operations are required, such as the subsequent advanced backup strategy: maze backup.
[0062] If the assessed importance of the video file is less than the preset importance threshold, a normal backup is performed.
[0063] The step of evaluating the importance of the current video file includes:
[0064] Define indicators for evaluating the importance of video files, set them as importance indicators, and assign weights to each importance indicator, where the importance indicators include but are not limited to business needs, privacy sensitivity, and change frequency;
[0065] Collect data related to current video files and importance indicators;
[0066] Extract features from the collected data related to the importance index and generate a feature set for evaluating the importance of the current video file;
[0067] The feature set used to evaluate the importance of the current video file and the weights of each importance index are weighted and calculated to obtain a comprehensive score of the importance of the current video file. The formula is:
[0068] TotalScore=w1×F1+w2×F2+…+w n ×F n , where TotalScore is the comprehensive score of the importance of the current video file, F1, F2, ..., F n are the characteristic values of the importance indicators of the current video file, w1, w2, ..., w n are the weights of each importance index.
[0069] It should be noted that the importance of video files is quantitatively evaluated through the definition of importance indicators, weight allocation, data collection, feature extraction and weighted calculation. This evaluation method is highly practical and can be applied to the backup of various files. By defining multiple importance indicators, a multi-dimensional evaluation of file importance is achieved, and weights are assigned to each importance indicator to reflect the relative importance of different importance indicators to the final evaluation results. Through comprehensive weighted calculation, the characteristic values of each importance indicator are combined to obtain a comprehensive score, thereby reducing the impact of a single factor and improving the overall and accuracy of the evaluation.
[0070] S102: If the importance of the video file is greater than a preset importance threshold, the video file is divided into multiple data blocks, and a maze backup is performed, specifically:
[0071] S201, create a backup maze, and use the data blocks of the video file to build the basic structure of the backup maze, each data block corresponds to a unit of the backup maze, wherein the backup maze is represented by a two-dimensional array data structure, and the initial path in the backup maze is empty, indicating that the data block has not been backed up.
[0072] S202, randomly select some data blocks in the backup maze for masking,
[0073] S203, defining backup path selection rules,
[0074] S204, selecting a starting point in the backup maze as the starting position of the backup path,
[0075] S205, selecting a backup path in the backup maze according to the predefined backup path selection rule. The path can be a straight line, a curve, or other more complex forms, depending on the design definition of the backup path selection rule.
[0076] S206, marking the selected backup path and recording the backup path information, the marked backup path indicates that the data blocks on the corresponding backup path have been backed up, the backup path information includes the starting point, end point, sequence of the backup path and the information of the data blocks on the path,
[0077] S207: Back up all data blocks to corresponding locations according to the selected backup path.
[0078] It should be noted that by creating a backup maze, a data structure based on a two-dimensional array is formed, which provides an operational basis for backup. Each data block corresponds to a unit of the backup maze. This basic structure allows the relationship between the backup path and the data block to be clearly expressed. Then randomly selecting data blocks for masking increases the randomness of the backup. Such randomness makes it impossible for attackers to know in advance which data blocks will be masked, thereby improving the security of the backup. Defining the backup path selection rule provides the possibility of customization for the backup. Different path selection rules can be designed according to actual conditions to meet the backup requirements of different files, thereby improving the flexibility and adaptability of the backup. When selecting a backup path in the backup maze, the form of the path can be designed according to actual needs, such as a straight line, a curve, etc. This is designed when defining the backup path selection rule. Marking the selected backup path and recording the backup path information is to facilitate tracking and management of the backup. Backing up the data blocks to the corresponding locations according to the selected backup path realizes an orderly and regular backup process, and also facilitates accurate data restoration according to the backup path during recovery.
[0079] The step of randomly selecting some data blocks in the backup maze for masking includes:
[0080] According to the preset masking ratio, some data blocks are randomly selected in the backup maze, and special marks are added to the randomly selected data block paths;
[0081] For the specially marked data block path, replace it with false data according to the defined false video data generation strategy, where the false video data generation strategy includes but is not limited to inserting a false image on the path or applying a blur effect on the path;
[0082] During backup transmission, the masking information during the replacement process is recorded. The masking information includes the masked data block path and the adopted masking method. The masking information will be used to correctly handle the masking during restoration.
[0083] It should be noted that the masking method in this step improves the security of backup and the accuracy of restoration by introducing randomness, configurable masking ratios, special markers, false data generation strategies, and recording masking information, making this method suitable for backup scenarios with high requirements for data security.
[0084] Randomly selecting data blocks for masking introduces randomness and enhances the security of backup. It is difficult for attackers to predict which data blocks will be masked, making it much more difficult to attack backup. Through the preset masking ratio, the system can control the degree of masking according to demand. This configurability allows a balance between security and backup performance. Special marks are added to the masked data block paths to facilitate the distinction between real data and false data during backup transmission, and also provide key information for correctly handling masking during restoration. Replacing the real data on the specially marked data block path with false data introduces confusion, making it impossible for attackers to accurately restore the masked data. During backup transmission, the masking information during the replacement process is recorded, including the masked data block path and the masking method used, to facilitate the correct handling of masking during restoration, thereby improving the accuracy and traceability of restoration.
[0085] Furthermore, after the step of backing up the non-shielded data blocks to corresponding locations according to the selected backup path, the step further includes:
[0086] Obtain backup path information and masking information. The backup path information includes the starting point, end point, sequence, and data block information of the backup path. The masking information includes the masked data block path and the adopted masking method.
[0087] According to the backup path information, the data blocks on the backup path and the processing path are restored in the newly constructed maze structure, and the restored backup path is merged with the processed data blocks to obtain complete restored data. Among them, for the obscured data blocks on the path, they are restored to the original data content according to the obscuration information and the corresponding unobscuration rules.
[0088] It should be noted that this step is a process of restoring the backup file. This restoration method is based on the backup path information and the masking information, and restores the data blocks on the backup path and the processing path by constructing a new maze structure.
[0089] According to the backup path information, the starting point, end point, sequence of the backup path and the information of the data blocks on the path can be accurately restored. For the data blocks on the processing path, the restoration method can restore their positions in the newly constructed maze structure according to the backup path information, thereby ensuring that the data blocks on the backup path can be correctly placed after restoration. The restored backup path is merged with the processed data blocks to construct complete restored data, so that the restored data obtained can accurately reflect the data blocks on the original backup path and the processing path. According to the masking information and the corresponding unmasking rules, the masked data blocks can be restored to the original data content. This restoration method can adapt to a variety of masking methods because it depends on the masking information and the corresponding unmasking rules. This flexibility makes the restoration method suitable for different masking scenarios. The recorded backup path information and masking information make the backup process traceable, and the data blocks on the backup path and the processing path can be accurately restored and the masking can be unmasked during restoration.
[0090] Further, the step of restoring the backup path and the data blocks on the processing path in the newly constructed maze structure according to the backup path information, and merging the restored backup path with the processed data blocks to obtain complete restored data includes:
[0091] Create a blank maze with the same size and data structure as the backup maze, which is called the restoration maze. It is used to record the path information during the restoration process. Initially, all grids in the restoration maze are marked as unvisited.
[0092] According to the backup path information, starting from the starting point of the backup path, in the order of the backup path, the data blocks on the backup path are filled into the restoration maze, and the grids at the corresponding positions in the restoration maze are marked as paths;
[0093] During the restoration process, as the path is restored, the data in the restored maze is continuously updated and filled, and for each restoration step, the grid at the corresponding position in the restored maze is marked as a path;
[0094] After the restoration is completed, check the restoration maze to ensure that the restoration path information is consistent with the backup path information. The restoration path information includes the starting point, end point, sequence of the restoration path, and information of the data blocks on the restoration path;
[0095] By filling the processed data blocks, a data structure containing a complete restoration path is obtained, which is the final restored video file data.
[0096] It should be noted that this step is based on the backup path information, by creating a new restoration maze and filling the path, and finally obtaining complete restoration data.
[0097] By creating a blank maze with the same size and data structure as the backup maze, we ensure that each step of the restoration can be carried out in the order of the backup path, and mark the path in the restored maze to ensure the integrity and correctness of the restoration. During the restoration process, the data in the restored maze is continuously updated and filled. After the restoration is completed, the restored maze is checked to ensure that the restored path information is consistent with the backup path information. This consistency check ensures the correctness and integrity of the restoration process. When checking the restored maze, we must ensure that the end point is reachable, the path is continuous, and there are no omissions or errors.
[0098] Further, the step of defining a backup path selection rule includes:
[0099] Select a starting point in the backup maze as the starting position of the backup path;
[0100] The backup path is selected by performing a random walk in the backup maze, where the random walk means randomly selecting a direction from the feasible directions at each step. This ensures the randomness of the path, so that data blocks in different areas have a chance to be covered.
[0101] Mark the selected backup path in the backup maze to ensure that the same path will not be repeatedly selected during the next backup.
[0102] The steps of randomly walking to select a backup path and marking the selected backup path are repeated until all data blocks in the backup maze are covered.
[0103] It should be noted that in the defined backup path selection rules, the backup path is selected by randomly walking in the backup maze, which ensures the randomness of the backup path, avoids the patterned backup of data blocks, and increases the security of the backup. The random walk method can also give data blocks in different areas a chance to be covered, so as to achieve uniform backup of data blocks and avoid situations where some areas are too dense and other areas are sparse. Marking the selected backup path in the backup maze ensures that the same path will not be repeatedly selected for the next backup, avoiding repeated coverage of the same data blocks in the backup. By repeatedly randomly walking to select the backup path until all data blocks in the backup maze are covered, comprehensive coverage of data blocks is ensured, thereby ensuring the comprehensiveness of the backup and data integrity.
[0104] The backup method of the video file of the present invention evaluates the importance of the video file, determines the backup level according to the importance threshold, and selects the corresponding backup method. For the video files of high importance, the maze backup is performed to ensure the backup security of the video files of high importance. However, since the maze backup is relatively complex, it is specially used for high backup levels to help reduce the impact on system performance. For the video files of low importance, the ordinary backup method can be used, thereby avoiding the execution of the complex maze backup process, which can reduce the complexity of the overall system, reduce the possibility of errors, save resources, and improve the backup efficiency.
[0105] Among them, the present invention performs maze backup for high-importance video files, wherein randomness and maze path selection rules are introduced, making the backup process difficult to predict, thereby enhancing the security of the backup, while shielding some data blocks and random path selection further enhance the backup's anti-attack ability. The design of the backup maze also makes the backup process distributed, and each data block of the video file can be backed up through an independent path. Even if some data blocks are lost, accurate data block restoration can be performed through the backup path information. The backup path is marked and the backup path information is recorded for backup tracking and management, which enables accurate data restoration based on the path information during recovery. Since the distributed backup of data blocks and random path selection can improve the parallelism and efficiency of the backup, the introduction of the backup maze of the present invention will not significantly reduce system performance. Embodiment 2
[0106] refer to Figure 2 Embodiment 2 provides a video file backup system, which is used to execute the video file backup method of embodiment 1, including:
[0107] Importance assessment module: used to authenticate the legitimacy of video files and assess the importance of video files after receiving a backup request for the video files.
[0108] Importance evaluation module: It is also used to perform normal backup if the importance of the video file is evaluated to be less than a preset importance threshold.
[0109] The materiality assessment module is also used to:
[0110] Define indicators for evaluating the importance of video files, set them as importance indicators, and assign weights to each importance indicator, where the importance indicators include but are not limited to business needs, privacy sensitivity, and change frequency;
[0111] Collect data related to current video files and importance indicators;
[0112] Extract features from the collected data related to the importance index and generate a feature set for evaluating the importance of the current video file;
[0113] The feature set used to evaluate the importance of the current video file and the weights of each importance index are weighted and calculated to obtain a comprehensive score of the importance of the current video file. The formula is:
[0114] TotalScore=w1×F1+w2×F2+…+w n ×F n , where TotalScore is the comprehensive score of the importance of the current video file, F1, F2, ..., F n are the characteristic values of the importance indicators of the current video file, w1, w2, ..., w n are the weights of each importance index.
[0115] Backup operation module: if the importance of the video file is greater than the preset importance threshold, the video file is divided into multiple data blocks and a maze backup is performed, specifically:
[0116] Create a backup maze and use the data blocks of the video file to build the basic structure of the backup maze. Each data block corresponds to a unit of the backup maze. The backup maze is represented by a two-dimensional array data structure. The initial path in the backup maze is empty, indicating that the data block has not been backed up.
[0117] Randomly select some data blocks in the backup maze for masking, which can be achieved by adding flags or special marks in the data blocks.
[0118] Define backup path selection rules,
[0119] Select a starting point in the backup maze as the starting position of the backup path,
[0120] For selecting a backup path in the backup maze according to the predefined backup path selection rule, the path can be a straight line, a curve, or other more complex forms, depending on the design definition of the backup path selection rule.
[0121] Mark the selected backup path and record the backup path information. The marked backup path indicates that the data blocks on the corresponding backup path have been backed up. The backup path information includes the starting point, end point, sequence of the backup path, and information about the data blocks on the path.
[0122] Back up all data blocks to the corresponding locations according to the selected backup path.
[0123] The backup operation module is also used to:
[0124] According to the preset masking ratio, some data blocks are randomly selected in the backup maze, and special marks are added to the randomly selected data block paths;
[0125] For the specially marked data block path, replace it with false data according to the defined false video data generation strategy, where the false video data generation strategy includes but is not limited to inserting a false image on the path or applying a blur effect on the path;
[0126] During backup transmission, the masking information during the replacement process is recorded. The masking information includes the masked data block path and the adopted masking method. The masking information will be used to correctly handle the masking during restoration.
[0127] The backup operation module is also used to:
[0128] Obtain backup path information and masking information. The backup path information includes the starting point, end point, sequence, and data block information of the backup path. The masking information includes the masked data block path and the adopted masking method.
[0129] According to the backup path information, the data blocks on the backup path and the processing path are restored in the newly constructed maze structure, and the restored backup path is merged with the processed data blocks to obtain complete restored data. Among them, for the obscured data blocks on the path, they are restored to the original data content according to the obscuration information and the corresponding unobscuration rules.
[0130] The backup operation module is also used to:
[0131] Create a blank maze with the same size and data structure as the backup maze, which is called the restoration maze. It is used to record the path information during the restoration process. Initially, all grids in the restoration maze are marked as unvisited.
[0132] According to the backup path information, starting from the starting point of the backup path, in the order of the backup path, the data blocks on the backup path are filled into the restoration maze, and the grids at the corresponding positions in the restoration maze are marked as paths;
[0133] During the restoration process, as the path is restored, the data in the restored maze is continuously updated and filled, and for each restoration step, the grid at the corresponding position in the restored maze is marked as a path;
[0134] After the restoration is completed, check the restoration maze to ensure that the restoration path information is consistent with the backup path information. The restoration path information includes the starting point, end point, sequence of the restoration path, and information of the data blocks on the restoration path;
[0135] By filling the processed data blocks, a data structure containing a complete restoration path is obtained, which is the final restored video file data.
[0136] The backup operation module is also used to:
[0137] Select a starting point in the backup maze as the starting position of the backup path;
[0138] The backup path is selected by performing a random walk in the backup maze, where the random walk means randomly selecting a direction from the feasible directions at each step. This ensures the randomness of the path, so that data blocks in different areas have a chance to be covered.
[0139] Mark the selected backup path in the backup maze to ensure that the same path will not be repeatedly selected during the next backup.
[0140] The steps of randomly walking to select a backup path and marking the selected backup path are repeated until all data blocks in the backup maze are covered.
[0141] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for backing up video files, characterized in that the steps include: After receiving the backup request for the video file, the legality of the video file is authenticated and the importance of the video file is evaluated; If the importance of the video file is greater than the preset importance threshold, the video file is divided into multiple data blocks and a maze backup is performed, specifically: Create a backup maze and use the data blocks of the video file to build the basic structure of the backup maze. Each data block corresponds to a unit of the backup maze. The backup maze is represented by a two-dimensional array data structure. The initial path in the backup maze is empty, indicating that the data block has not been backed up. Randomly select some data blocks in the backup maze for masking, Define backup path selection rules, Select a starting point in the backup maze as the starting position of the backup path, Select a backup path in the backup maze according to the predefined backup path selection rule. Mark the selected backup path and record the backup path information. The marked backup path indicates that the data blocks on the corresponding backup path have been backed up. The backup path information includes the starting point, end point, sequence of the backup path, and information about the data blocks on the path. Back up all data blocks to the corresponding locations according to the selected backup path; The step of randomly selecting some data blocks in the backup maze for masking includes: According to the preset masking ratio, some data blocks are randomly selected in the backup maze, and special marks are added to the randomly selected data block paths; For the specially marked data block path, replace it with false data according to the defined false video data generation strategy, where the false video data generation strategy includes but is not limited to inserting a false image on the path or applying a blur effect on the path; During backup transmission, the masking information during the replacement process is recorded. The masking information includes the masked data block path and the adopted masking method. The masking information will be used to correctly handle the masking during restoration.
2. The method for backing up video files according to claim 1, characterized in that: After the step of backing up the non-shielded data blocks to the corresponding positions according to the selected backup path, the following step further comprises: Obtain backup path information and masking information. The backup path information includes the starting point, end point, sequence, and data block information of the backup path. The masking information includes the masked data block path and the adopted masking method. According to the backup path information, the data blocks on the backup path and the processing path are restored in the newly constructed maze structure, and the restored backup path is merged with the processed data blocks to obtain complete restored data. Among them, for the obscured data blocks on the path, they are restored to the original data content according to the obscuration information and the corresponding unobscuration rules.
3. The method for backing up video files according to claim 2, characterized in that: The steps of restoring the backup path and the data blocks on the processing path in the newly constructed maze structure according to the backup path information, and merging the restored backup path with the processed data blocks to obtain complete restored data include: Create a blank maze with the same size and data structure as the backup maze, which is called the restoration maze. It is used to record the path information during the restoration process. Initially, all grids in the restoration maze are marked as unvisited. According to the backup path information, starting from the starting point of the backup path, in the order of the backup path, the data blocks on the backup path are filled into the restoration maze, and the grids at the corresponding positions in the restoration maze are marked as paths; During the restoration process, as the path is restored, the data in the restored maze is continuously updated and filled, and for each restoration step, the grid at the corresponding position in the restored maze is marked as a path; After the restoration is completed, check the restoration maze to ensure that the restoration path information is consistent with the backup path information. The restoration path information includes the starting point, end point, sequence of the restoration path, and information of the data blocks on the restoration path; By filling the processed data blocks, a data structure containing a complete restoration path is obtained, which is the final restored video file data.
4. The method for backing up video files according to claim 1, characterized in that: The step of defining a backup path selection rule comprises: Select a starting point in the backup maze as the starting position of the backup path; The backup path is selected by performing a random walk in the backup maze, where the random walk means randomly selecting a direction from the feasible directions at each step. This ensures the randomness of the path, so that data blocks in different areas have a chance to be covered; Mark the selected backup path in the backup maze to ensure that the same path will not be selected repeatedly during the next backup; The steps of randomly walking to select a backup path and marking the selected backup path are repeated until all data blocks in the backup maze are covered.
5. The method for backing up video files according to claim 1, characterized in that: The steps of evaluating the importance of the video file include: Define indicators for evaluating the importance of video files, set them as importance indicators, and assign weights to each importance indicator, where the importance indicators include but are not limited to business needs, privacy sensitivity, and change frequency; Collect data related to current video files and importance indicators; Extract features from the collected data related to the importance index and generate a feature set for evaluating the importance of the current video file; The feature set used to evaluate the importance of the current video file and the weights of each importance index are weighted and calculated to obtain a comprehensive score of the importance of the current video file. The formula is: TotalScore=w1×F1+w2×F2+…+w n ×F n , where TotalScore is the comprehensive score of the importance of the current video file, F1, F2, ..., F n are the characteristic values of the importance indicators of the current video file, w1, w2, ..., w n are the weights of each importance index.
6. The method for backing up video files according to claim 1, characterized in that: The step of evaluating the importance of the video file also includes: If the assessed importance of the video file is less than the preset importance threshold, a normal backup is performed.
7. A video file backup system, characterized in that: include: Importance evaluation module: used to authenticate the legitimacy of video files and evaluate the importance of video files after receiving a backup request for video files; Backup operation module: if the importance of the video file is greater than the preset importance threshold, the video file is divided into multiple data blocks and a maze backup is performed, specifically: Create a backup maze and use the data blocks of the video file to build the basic structure of the backup maze. Each data block corresponds to a unit of the backup maze. The backup maze is represented by a two-dimensional array data structure. The initial path in the backup maze is empty, indicating that the data block has not been backed up. Randomly select some data blocks in the backup maze for masking, Define backup path selection rules, Select a starting point in the backup maze as the starting position of the backup path, Select a backup path in the backup maze according to the predefined backup path selection rule. Mark the selected backup path and record the backup path information. The marked backup path indicates that the data blocks on the corresponding backup path have been backed up. The backup path information includes the starting point, end point, sequence of the backup path, and information about the data blocks on the path. Back up all data blocks to the corresponding locations according to the selected backup path; Wherein, the backup operation module is also used for: According to the preset masking ratio, some data blocks are randomly selected in the backup maze, and special marks are added to the randomly selected data block paths; For the specially marked data block path, replace it with false data according to the defined false video data generation strategy, where the false video data generation strategy includes but is not limited to inserting a false image on the path or applying a blur effect on the path; During backup transmission, the masking information during the replacement process is recorded. The masking information includes the masked data block path and the adopted masking method. The masking information will be used to correctly handle the masking during restoration.
