Method and System for Cleaning Video Files in an Internet Video Server
By analyzing the video server status information and content correlation, the invalid video files in the Internet video server are automatically cleaned up, which solves the problem of wasted storage resources and realizes efficient utilization of resources.
Patent Information
- Application Number
- CN201910786874.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-08-24
- Publication Date
- 2025-06-10
- Estimated Expiration
- 2039-08-24
AI Technical Summary
The problem of wasting storage resources of video files in Internet video servers has led to the need for continuous expansion of servers to cope with the increasing number of video files.
By analyzing the status information of the video server, select the video server that needs to be cleaned, and set the survival time for the video files to be deleted. Determine whether the video file to be deleted exists in the target video server based on the file information item and the content correlation degree, and delete it if it does not exist.
Effectively clean up invalid video files, save storage resources, and avoid the cost and management complexity caused by server expansion.
Smart Images

Figure CN110381335B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of Internet information processing, and more particularly, to a method and system for cleaning video files in an Internet video server. Background Art
[0002] With the development of the Internet, the number of video files transmitted based on the Internet has increased in a geometric progression. For this reason, each provider of video files needs to continuously increase servers to store more video files. Since the timeliness of video files is getting stronger, some video files may have no access volume or extremely low access volume after a period of time. Therefore, it is necessary to clean the video files in the Internet video server to save valuable storage resources. Summary of the Invention
[0003] The present invention provides a method for cleaning video files in an Internet video server, the method comprising:
[0004] Determine the current status information of each video server in all video servers within a target area in the Internet, and parse the current status information of each video server to determine the remaining storage capacity, total storage capacity, access statistics information, and file size information of each video server;
[0005] Select video servers to be processed from multiple video servers based on the remaining storage capacity, total storage capacity, access statistics information, and file size information, determine each video server other than the video servers to be processed in all video servers within the target area as a video server to be tested, select multiple video files to be deleted from all video files stored in the video servers to be processed, and set a survival time for each video file to be deleted;
[0006] The video servers to be processed generate a file information item for each of the multiple video files to be deleted, form an information set with the file information items of each video file to be deleted, and send the information set to each video server to be tested;
[0007] Each video server to be tested obtains the file information item of each video file to be deleted from the received information set, and determines the content association degree between each video file to be deleted and each video server to be tested among the multiple video servers to be tested based on the file information item;
[0008] When the survival time of a specific video file to be deleted among multiple video files to be deleted expires, determine whether the specific video file to be deleted exists in the target video server based on the content correlation degree between the specific video file to be deleted and each video server to be tested. If not, delete the specific video file to be deleted.
[0009] Selecting a video server to be processed from multiple video servers based on the remaining storage capacity, total storage capacity, access statistical information, and file size information includes:
[0010] Determine the fragmentation index of each video server among multiple video servers based on the remaining storage capacity, total storage capacity, access statistical information, and file size information, and select the video server with the largest fragmentation index as the video server to be processed;
[0011] Selecting multiple video files to be deleted from all video files stored in the video server to be processed includes:
[0012] Determine the deletion coefficient of each video file among all video files stored in the video server to be processed:
[0013] Select multiple video files to be deleted from all video files stored in the video server to be processed based on the deletion coefficient;
[0014] Selecting multiple video files to be deleted from all video files stored in the video server to be processed based on the deletion coefficient includes:
[0015] Select multiple video files with a deletion coefficient less than the coefficient threshold among all video files stored in the video server to be processed as multiple video files to be deleted.
[0016] Setting the survival time for each video file to be deleted among multiple video files to be deleted includes:
[0017] Set the survival time of each video file to be deleted among multiple video files to be deleted as the time length of the sub - time period.
[0018] The present invention also provides a system for cleaning video files in an Internet video server, and the system includes:
[0019] An analysis device, which determines the current status information of each video server among all video servers in the target area of the Internet, and analyzes the current status information of each video server to determine the remaining storage capacity, total storage capacity, access statistical information, and file size information of each video server;
[0020] A selection device selects a video server to be processed from multiple video servers based on the remaining storage capacity, total storage capacity, access statistics information, and file size information, determines each video server among all the video servers in the target area except the video server to be processed as a video server to be tested, selects multiple video files to be deleted from all the video files stored in the video server to be processed, and sets a survival time for each video file to be deleted;
[0021] A sending device generates a file information item for each of the multiple video files to be deleted by the video server to be processed, forms an information set with the file information items of each video file to be deleted, and sends the information set to each video server to be tested;
[0022] A determination device each video server to be tested obtains the file information item of each video file to be deleted from the received information set, and determines the content relevance degree of each video file to be deleted with each video server to be tested among the multiple video servers to be tested based on the file information item;
[0023] A processing device when the survival time of a specific video file to be deleted among the multiple video files to be deleted expires, determines whether the specific video file to be deleted exists in the target video server based on the content relevance degree of the specific video file to be deleted with each video server to be tested, and if not, deletes the specific video file to be deleted.
[0024] Selecting a video server to be processed from multiple video servers based on the remaining storage capacity, total storage capacity, access statistics information, and file size information includes:
[0025] Determining the fragmentation index of each video server among the multiple video servers based on the remaining storage capacity, total storage capacity, access statistics information, and file size information, and selecting the video server with the largest fragmentation index as the video server to be processed;
[0026] Selecting multiple video files to be deleted from all the video files stored in the video server to be processed includes:
[0027] Determining the deletion coefficient of each video file among all the video files stored in the video server to be processed:
[0028] Selecting multiple video files to be deleted from all the video files stored in the video server to be processed based on the deletion coefficient;
[0029] Selecting multiple video files to be deleted from all the video files stored in the video server to be processed based on the deletion coefficient includes:
[0030] Select, as multiple video files to be deleted, multiple video files with a coefficient less than a coefficient threshold from all the video files stored in the video server to be processed and delete them.
[0031] Set a survival time for each video file to be deleted among the multiple video files to be deleted, including:
[0032] Set the survival time of each video file to be deleted among the multiple video files to be deleted to the time length of a sub - time period. Description of the Drawings
[0033] By referring to the following drawings, the exemplary embodiments of the present invention can be more fully understood:
[0034] Figure 1 A flowchart of a method for cleaning video files in an Internet video server;
[0035] Figure 2 A logical schematic diagram for cleaning video files according to the present invention; and
[0036] Figure 3 A structural schematic diagram of a system for cleaning video files in an Internet video server. Detailed Embodiments
[0037] Figure 1 A flowchart of a method 100 for cleaning video files in an Internet video server.
[0038] The method includes: Step 101, determine the current status information of each video server among all the video servers in the target area in the Internet, and analyze the current status information of each video server to determine the remaining storage capacity, total storage capacity, access statistics information, and file size information of each video server.
[0039] The Internet includes multiple areas, and each area includes multiple video servers. Each video server is used to store multiple video files. Each video server can receive an access request for one or more of the multiple video files stored therein from a requester, and provide one or more video files to the requester according to the access request. Each area among the multiple areas can be an internal network or an internal network area of an Internet video service operator. Select one area as the target area from the multiple areas of the Internet according to a predetermined rule. Select one area as the target area from the multiple areas of the Internet according to user input, or randomly select one area from the multiple areas of the Internet as the target area.
[0040] The current status information includes: remaining storage capacity, total storage capacity, access statistics information, and file size information. The current status information of each video server includes: the remaining storage capacity, total storage capacity, access statistics information, and file size information of each video server. Among them, the total storage capacity is the capacity of the total storage space that the video server can use to store video files. The remaining storage capacity is the capacity of the storage space that the video server can use to store new video files at the current moment. The access statistics information includes multiple access items, and each access item includes: access time, file identifier, and requester identifier. Each of these access items is used to record the accessed information of the video file. The file size information includes multiple size records, and each size record includes a file identifier and a file size.
[0041] Step 102, select the video server to be processed from multiple video servers based on the remaining storage capacity, total storage capacity, access statistics information, and file size information. Determine each video server other than the video server to be processed among all the video servers in the target area as the video server to be tested. Select multiple video files to be deleted from all the video files stored in the video server to be processed, and set a survival time for each video file to be deleted.
[0042] Selecting the video server to be processed from multiple video servers based on the remaining storage capacity, total storage capacity, access statistics information, and file size information includes: determining the fragmentation index of each video server among the multiple video servers based on the remaining storage capacity, total storage capacity, access statistics information, and file size information, and selecting the video server with the largest fragmentation index as the video server to be processed.
[0043] Determining the fragmentation coefficient of each video server among the multiple video servers based on the remaining storage capacity, total storage capacity, access statistics information, and file size information includes: counting all the access items in the access statistics information of each video server to determine the total number of accesses A of all the video files stored in each video server within a predetermined time period T i within i ,
[0044] That is, obtain multiple access items in all the access items in the access statistics information of each video server whose access time is within the predetermined time period T i within, and use the number of multiple access items within the predetermined time period T i as the total number of accesses A of all the video files stored in each video server within the predetermined time period T i within i ; where the predetermined time period T iGreater than or equal to 5 days, 10 days, 15 days, 20 days, 30 days, etc. For example, the predetermined time period T i is a 10-day period starting from the day before the current time (yesterday) to a specific date in the past.
[0045] Statistically analyze all access items in the access statistics information of each video server to determine the total number of accesses A of all video files stored in each video server during the recent time period t i within. i
[0046] That is, obtain multiple access items within the recent time period t among all access items in the access statistics information of each video server, and use the number of multiple access items within the recent time period t as the total number of accesses A of all video files stored in each video server during the recent time period t i within. i within. i-recent ; where the recent time period t i is less than the predetermined time period T i , for example, 2 days, 3 days, 5 days, 8 days, 10 days, etc. For example, in the above example, the predetermined time period T i is a 10-day time period starting from the day before the current time (yesterday) to a specific date in the past, and the recent time period t i is a 2-day time period starting from the day before the current time (yesterday) to a specific date in the past. The above term "day" refers to a natural day. t i is a subset of T i .
[0047] Divide the predetermined time period T i into multiple sub-time periods of the same time length. For example, divide the predetermined time period T i into j sub-time periods of the same time length. Specifically, each sub-time period can be 1 day, 0.5 day, 0.25 day, etc.
[0048] Statistically analyze all access items in the access statistics information of each video server to determine the number of accesses A of all video files stored in each video server within each sub-time period ij , that is, group all access items within the predetermined time period T according to each sub-time period and the access time among all access items in the access statistics information of each video server, and use the number of access items within each sub-time period as the number of accesses A of all video files stored in each video server within each sub-time period within the predetermined time period T i within. i within. ij ; for example, the predetermined time period Ti If it is 10 days and the sub - time period is 1 day, then the number of accesses A within each sub - time period ij is the number of accesses to all the video files stored in each video server within each day of the 10 days; where the predetermined time period T of each video server i includes n i sub - time periods.
[0049] Calculate the average value of the number of accesses A of all the video files stored in each video server within each sub - time period ij and use the average value as A iavg .
[0050] Statistically analyze the size records in the file size information of each video server to determine the file size Q of each video file among all the video files stored in each video server ik , where q i is the number of all the video files stored in each video server.
[0051] According to the file size Q of each video file among all the video files stored in each video server ik , calculate the average file size Q of all the video files stored in each video server iavg .
[0052] Statistically analyze the size records in the file size information of each video server to determine the median of the file sizes of all the video files stored in each video server, that is, sort all the video files stored in each video server in descending order of file size.
[0053] Take the file size of the video file located at or as the median Z of the file sizes of all the video files stored in each video server;
[0054] Determine the first size threshold K 1 and the second size threshold K 2 :
[0055] k 1 =Z×(1 + α)
[0056] k 2 =Z×(1 - α)
[0057] Wherein, in this application, α can be preset and / or dynamically adjusted. α>0, and α is any reasonable value such as 0.2, 0.3, 0.4, 0.5, 0.55, 0.6, etc. Or α>0 and α<1.
[0058] Statistically analyze the size records in the file size information of each video server, and select video files with file sizes greater than the first size threshold K 1 as large-size video files, and determine the number C of large-size video files among all the video files stored in each video server il . For example, the first size threshold is 100MB, and the second size threshold is 50MB.
[0059] Statistically analyze the size records in the file size information of each video server, and select video files with file sizes less than or equal to the first size threshold K 1 and greater than or equal to the second size threshold K 2 as medium-size video files, and determine the number C of medium-size video files among all the video files stored in each video server im . Statistically analyze the size records in the file size information of each video server, and select video files with file sizes less than the second size threshold K 2 as small-size video files, and determine the number C of small-size video files among all the video files stored in each video server is .
[0060] Calculate the fragmentation coefficient S of each video server among multiple video servers based on the following formula i :
[0061]
[0062] where S i is the fragmentation coefficient of the i-th video server among (all) multiple video servers in the target area; R i is the remaining storage capacity of the i-th video server; G i is the total storage capacity of the i-th video server; A i is the total number of access times of (all) multiple video files stored in the i-th video server within a predetermined time period T i ; A i-recent is the total number of access times of all (multiple) video files stored in the i-th video server within the most recent time period t i .
[0063] where the predetermined time period T of each video server i is the same, and the most recent time period t of each video server i is the same. 1 ≤ i ≤ N, where N is the number of video servers in the target area; 10 ≤ N, 5 ≤ N, 20 ≤ N or 15 ≤ N, and i is a natural number.
[0064] A i,j The total number of access times of (all) multiple video files stored in the i-th video server within the j-th sub-time period; A iavg For all video files stored in the i-th video server in n i The average value of the access times A within each of the n sub-time periods; where 1 ≤ j ≤ n i,j ; where 1 ≤ j ≤ n i , n i Is the number of sub-time periods; the number of sub-time periods n of each video server i Are all the same; 10 ≤ n i , 5 ≤ n i , 20 ≤ n i Or 15 ≤ n i
[0065] Q i,k Is the file size of the k-th video file among (all) multiple video files stored in the i-th video server; Q iavg Is the average file size of all video files stored in the i-th video server; q i Is the number of video files stored in the i-th video server; where 1 ≤ k ≤ q i , 100 ≤ q i , 1000 ≤ q i , 10000 ≤ q i Or 100000 ≤ q i , where k is a natural number.
[0066] C is Is the number of small-sized video files among (all) multiple video files stored in the i-th video server; C im Is the number of medium-sized video files among (all) multiple video files stored in the i-th video server; C il Is the number of large-sized video files among (all) multiple video files stored in the i-th video server.
[0067] C is + C im + C il = q i ;
[0068] Determine the video server with the largest value of S among multiple video servers in the target area as the video server to be processed. i Determine the video server with the largest value of S among multiple video servers in the target area as the video server to be processed.
[0069] Selecting multiple video files to be deleted from all video files stored in the video server to be processed includes: counting all access items in the access statistics of the video server to be processed to determine the total number of accesses f of all video files stored in the video server to be processed within a predetermined time period T i-to counting all access items in the access statistics of the video server to be processed to determine the total number of accesses f of all video files stored in the video server to be processed within the most recent time period t i-re counting all access items in the access statistics of the video server to be processed to determine the number of accesses f of each video file in each sub-time period among all video files stored in the video server to be processed i,j 。
[0070] Determine the deletion coefficient of each video file among all video files stored in the video server to be processed:
[0071]
[0072] D i is the deletion coefficient of the i-th video file among all video files stored in the video server to be processed, f i-to is the number of accesses of the i-th video file in the video server to be processed within the predetermined time period T, f i-re is the number of accesses of the i-th video file in the video server to be processed within the most recent time period t. 1 ≤ i ≤ m, where m is the number of video files in the video server to be processed, 100 ≤ m, 50 ≤ m, 200 ≤ m or 500 ≤ m
[0073] Divide the predetermined time period T into multiple sub-time periods of the same time length. For example, divide the predetermined time period T into j sub-time periods of the same time length. f i,j is the number of accesses of the i-th video file among all video files stored in the video server to be processed within the j-th sub-time period. 2 ≤ j ≤ n - 1, where n is the number of sub-time periods, and both i and j are natural numbers
[0074] Among them, the number of accesses of any video file in the video server to be processed in two adjacent sub-time periods is different. Select multiple video files to be deleted from all video files stored in the video server to be processed based on the deletion coefficient
[0075] Selecting multiple video files to be deleted from all video files stored in the video server to be processed based on the deletion coefficient includes: selecting multiple video files whose deletion coefficients are less than the coefficient threshold from all video files stored in the video server to be processed as multiple video files to be deleted. Alternatively, all video files stored in the video server to be processed are sorted in ascending order based on the deletion coefficient, and multiple video files ranked in the top 1%, 2%, 3%, 5%, 10% or 15% are selected as multiple video files to be deleted. The coefficient threshold is, for example, 0.75, 1.25, 1.8, 2.9, etc. or other reasonable values.
[0076] Selecting a plurality of video files to be deleted from all video files stored in the video server to be processed includes: randomly selecting a plurality of video files from all video files stored in the video server to be processed as the plurality of video files to be deleted.
[0077] All video files stored in the video server to be processed are sorted in ascending order based on file size, and multiple video files ranked in the top 1%, 2%, 3%, 5%, 10% or 15% are selected as multiple video files to be deleted.
[0078] Setting a survival time for each of the multiple video files to be deleted includes: sorting the multiple video files to be deleted in descending order of file size to generate a sorted list; in the sorted list, except for the video file to be deleted sorted at the first or last position, the next video file to be deleted adjacent to any video file to be deleted is a video file to be deleted whose file size is closest to the file size of the any video file to be deleted and is smaller than the file size of the any video file to be deleted; the previous video file to be deleted adjacent to any video file to be deleted is a video file to be deleted whose file size is closest to the file size of the any video file to be deleted and is larger than the file size of the any video file to be deleted.
[0079] All access items in the access statistics information of the video server to be processed are counted to determine the number of times f each of the multiple video files to be deleted is accessed within a predetermined time period T. k . Calculate the number of times f each of the multiple video files to be deleted is accessed within a predetermined time period T k The average value f avg The size records in the file size information of the video server to be processed are counted to determine the file size of each of the multiple video files to be deleted.
[0080] Calculate the average value h of the file sizes of each video file to be deleted among multiple video files to be deleted avg Calculate the average value f of the access times of each video file to be deleted among multiple video files to be deleted within a predetermined time period T avg .
[0081]
[0082] where t k-live is the survival time of the k-th video file to be deleted among multiple video files to be deleted, and t sub is the time length of the sub-time period; f k is the access times of the k-th video file to be deleted among multiple video files to be deleted within the predetermined time period T, and f avg is the average value of the access times of each video file to be deleted among multiple video files to be deleted within the predetermined time period T; h k-s is the file size of the adjacent video file to be deleted whose file size in the sorted list is smaller than that of the k-th video file to be deleted, and h k-l is the file size of the adjacent video file to be deleted whose file size in the sorted list is larger than that of the k-th video file to be deleted, and h avg is the average value of the file sizes of each video file to be deleted among multiple video files to be deleted.
[0083] Setting the survival time for each video file to be deleted among multiple video files to be deleted includes: setting the survival time of each video file to be deleted among multiple video files to be deleted as the time length of the sub-time period; or setting the survival time of each video file to be deleted among multiple video files to be deleted as 1 day, 2 days, 3 days, 5 days, 10 days, or 20 days, etc.
[0084] Step 103: The video server to be processed generates a file information item for each of the multiple video files to be deleted, forms an information set with the file information items of each video file to be deleted, and sends the information set to each video server to be tested. The video server to be processed generating a file information item for each of the multiple video files to be deleted includes: obtaining the digest information of each video file to be deleted among the multiple video files to be processed, where the digest information includes: file name, file category, and introduction information; generating a file information item for each video file to be deleted based on the file name, file category, and introduction information. The file name is the name of the video file or the video file to be deleted. The file category is the category to which the video file or the video file to be deleted belongs, for example, sports, entertainment, or music, etc. The introduction information is the information used to introduce or describe the content involved in the video file or the video file to be deleted. For example, the introduction information of video file A includes: in the XXX Basketball League / Basketball Cup / Basketball Warm-up Tournament, etc., the basketball game between Team A and Team B on February 21, 2019, the starting players of both sides are respectively..., the game result is..., the score of each player is..., and other content that needs to be introduced.
[0085] Generating a file information item for each video file to be deleted based on the file name, file category, and introduction information includes: taking the file name, file category, and introduction information of each video file to be deleted as three information sub-items respectively, and constructing a file information item from the three information sub-items. Forming an information set with the file information items of each video file to be deleted includes: merging the file information items of each video file to be deleted in a single set to form an information set.
[0086] Step 104: Each video server to be tested obtains the file information item of each video file to be deleted from the received information set, and determines the content relevance of each video file to be deleted with each video server to be tested among the multiple video servers to be tested based on the file information item.
[0087] After each video server to be tested obtains the file information item of each video file to be deleted from the received information set, it further includes that each video server to be tested parses the file information item of each video file to be deleted to determine the file name, file category, and content information of each video file to be deleted.
[0088] Before determining the content relevance between each video file to be deleted and each video server to be tested among multiple video servers to be tested based on file information items, it further includes: Each video server to be tested obtains its own server information and parses the server information to determine its respective theme category and theme content. The theme category is at least one pre-set category of the video server or the video server to be tested, that is, when using the video server or the video server to be tested to store video files, it is a pre-set category for the video server or the video server to be tested to store at least one category of video files; usually, it is set by the controller or control system of the area within the Internet; for example, the theme categories of the video server or the video server to be tested are sports and entertainment.
[0089] The theme content is an information set of the respective theme contents involved in all the video files stored in the video server or the video server to be tested. The theme content information includes multiple theme items, and each theme item includes: a theme description item and a quantity ratio. For example, the theme item is: game videos of the XXX Basketball League from January 1, 2019 to May 5, 2019, 2.5%. The theme description item is a brief description information of video files of the same theme, and the quantity ratio is the ratio of the number of video files of the same theme to the number of all video files stored in the video server or the video server to be tested.
[0090] Determining the content relevance between each video file to be deleted and each video server to be tested among multiple video servers to be tested based on file information items includes: calculating the matching degree between the file category of each video file to be deleted and the theme category of each video server to be tested as the category matching degree. Calculating the matching degree between the file category of each video file to be deleted and the theme category of each video server to be tested as the category matching degree includes: determining the semantic relevance between the file category of each video file to be deleted and each category in at least one category of the theme category of each video server to be tested. When there is one category in the theme category of the video server to be tested, the semantic relevance is used as the category matching degree between the file category of each video file to be deleted and the theme category of each video server to be tested. When there are multiple categories in the theme category of the video server to be tested, the average value of the semantic relevance between the file category and each category is used as the category matching degree between the file category of each video file to be deleted and the theme category of each video server to be tested.
[0091] Calculate the matching degree between the content information of each video file to be deleted and the theme content of each video server to be tested as the content matching degree. Calculate the matching degree between the content information of each video file to be deleted and the theme description items in each theme item of the theme content of each video server to be tested, and use the quantity ratio corresponding to the theme description item with the largest matching degree (the quantity ratio in the theme item where the theme description item with the largest matching degree is located) as the content matching degree between the content information of each video file to be deleted and the theme content of each video server to be tested.
[0092] Determining the content association degree between each video file to be deleted and each video server to be tested among multiple video servers to be tested based on the category matching degree and the content matching degree includes: using the sum of the category matching degree and the content matching degree between each video file to be deleted and each video server to be tested among multiple video servers to be tested as the content association degree between each video file to be deleted and each video server to be tested among multiple video servers to be tested.
[0093] After each video server to be tested obtains the file information item of each video file to be deleted from the received information set, it further includes that each video server to be tested parses the file information item of each video file to be deleted to determine the file category of each video file to be deleted.
[0094] Before determining the content association degree between each video file to be deleted and each video server to be tested among multiple video servers to be tested based on the file information item, it further includes: each video server to be tested obtains its own server information and parses the server information to determine its own theme category; where the theme category is a preset category of the video server or the video server to be tested, that is, when using the video server or the video server to be tested to store video files, a category for storing a certain type of video files is preset for the video server or the video server to be tested; usually, it is set by the controller or control system in the Internet area; for example, the theme category of the video server or the video server to be tested is sports and entertainment.
[0095] Determining the content relevance of each video file to be deleted and each video server to be tested among multiple video servers based on file information items includes: calculating the matching degree between the file category of each video file to be deleted and the theme category of each video server to be tested as the content relevance. Calculating the matching degree between the file category of each video file to be deleted and the theme category of each video server to be tested as the content relevance includes: determining the semantic relevance between the file category of each video file to be deleted and the theme category of each video server to be tested, and taking the semantic relevance as the content relevance of each video file to be deleted and each video server to be tested among multiple video servers.
[0096] The semantic relevance is the relevance between two pre-set words. To determine the semantic relevance between two words, for example, the file category and the theme category, the two words (file category and theme category) are used as inputs to query in the matching library of semantic relevance, and the semantic relevance between the two words (file category and theme category) can be obtained. That is, the matching library of semantic relevance includes multiple matching pairs, such as (word A, word B, relevance). When word A is equal to word B, the semantic relevance is 100%, and when word A and word B are antonyms, the semantic relevance is 0%.
[0097] Step 105, when the survival time of a specific video file to be deleted among multiple video files to be deleted expires, determine whether the specific video file to be deleted exists in the target video server based on the content relevance between the specific video file to be deleted and each video server to be tested. If not, delete the specific video file to be deleted.
[0098] When the survival time of a specific video file to be deleted among multiple video files to be deleted expires, determine whether the specific video file to be deleted exists in the target video server based on the content relevance between the specific video file to be deleted and each video server to be tested. If not, delete the specific video file to be deleted. Since the survival times of each video file to be deleted among multiple video files to be deleted may be the same or different, the moments when the survival times of each video file to be deleted expire may also be the same or different.
[0099] Determining whether there is a target video server for a specific video file to be deleted based on the content correlation degree between the specific video file to be deleted and each video server to be tested includes: determining the maximum value among the content correlation degrees between the specific video file to be deleted and each video server to be tested, that is, determining the maximum content correlation degree. Determine whether the maximum value in the content correlation degrees or the maximum content correlation degree is less than the correlation degree threshold. If it is less than, then there is no target video server for the specific video file to be deleted, and the specific video file to be deleted is deleted. If the maximum value in the content correlation degrees or the maximum content correlation degree is greater than or equal to the correlation degree threshold, then the video server to be tested corresponding to the maximum value in the content correlation degrees or the maximum content correlation degree is determined as the target video server, and the specific video file to be deleted is moved to the target video server. The correlation degree threshold is, for example, 40%, 50%, 60%, 70%, 80%.
[0100] Figure 2 is a logical schematic diagram for cleaning video files according to the present invention. As Figure 2 shown, the present application first determines the current status information of each video server among all video servers in the target area of the Internet, and parses the current status information of each video server to determine the remaining storage capacity, total storage capacity, access statistics information, and file size information of each video server. The present application selects the video servers to be processed from multiple video servers based on the remaining storage capacity, total storage capacity, access statistics information, and file size information. Each video server other than the video servers to be processed among all video servers in the target area is determined as a video server to be tested. As Figure 2 shown, the video server to be tested 1, the video server to be tested 2,..., the video server to be tested n. Among them, the video server to be tested 1, the video server to be tested 2,..., the video server to be tested n and the video server to be processed are all video servers in the target area.
[0101] Select multiple video files to be deleted from all video files stored in the video server to be processed, and set a survival time for each video file to be deleted. As Figure 2It is shown within the elliptical region. The video server to be processed generates a file information item for each of multiple video files to be deleted, forms an information set with the file information items of each video file to be deleted, and sends the information set to each of the video servers to be tested, namely, the video server to be tested 1, the video server to be tested 2, ……, the video server to be tested n. Each of the video servers to be tested, i.e., the video server to be tested 1, the video server to be tested 2, ……, the video server to be tested n, obtains the file information item of each video file to be deleted from the received information set, and determines the content correlation degree between each video file to be deleted and each of the video servers to be tested, i.e., the video server to be tested 1, the video server to be tested 2, ……, the video server to be tested n, based on the file information item.
[0102] When the survival time of a specific video file to be deleted among multiple video files to be deleted expires, it is determined whether the specific video file to be deleted exists in the target video server based on the content correlation degree between the specific video file to be deleted and each of the video servers to be tested, i.e., the video server to be tested 1, the video server to be tested 2, ……, the video server to be tested n. If not, the specific video file to be deleted is deleted. If so, the specific video file to be deleted is moved to the target video server. The target video server is one of the video servers to be tested, i.e., the video server to be tested 1, the video server to be tested 2, ……, the video server to be tested n.
[0103] Figure 3 It is a schematic structural diagram of a system for cleaning video files in an Internet video server. The system includes: a parsing device 301, a selection device 302, a sending device 303, a determining device 304, and a processing device 305.
[0104] The parsing device 301 determines the current status information of each video server among all video servers in the target area of the Internet, and parses the current status information of each video server to determine the remaining storage capacity, total storage capacity, access statistical information, and file size information of each video server.
[0105] The Internet includes multiple regions, and each region includes multiple video servers. Each video server is used to store multiple video files. Each video server can receive an access request for one or more of the stored video files from a requester, and provide one or more video files to the requester according to the access request. Each of the multiple regions can be an internal network or an internal network area of an Internet video service operator. One region is selected from the multiple regions of the Internet as the target region according to a predetermined rule. One region is selected from the multiple regions of the Internet as the target region according to user input, or one region is randomly selected from the multiple regions of the Internet as the target region.
[0106] The current status information includes: remaining storage capacity, total storage capacity, access statistical information, and file size information. The current status information of each video server includes: the remaining storage capacity, total storage capacity, access statistical information, and file size information of each video server. Among them, the total storage capacity is the capacity of the total storage space that the video server can use to store video files. The remaining storage capacity is the capacity of the storage space that the video server can use to store new video files at the current moment. The access statistical information includes multiple access items, and each access item includes: access time, file identifier, and requester identifier. Each of the access items is used to record the accessed information of the video file. The file size information includes multiple size records, and each size record includes a file identifier and a file size.
[0107] The selection device 302 selects a video server to be processed from multiple video servers based on the remaining storage capacity, total storage capacity, access statistical information, and file size information, determines each video server other than the video server to be processed among all the video servers in the target region as a video server to be tested, selects multiple video files to be deleted from all the video files stored in the video server to be processed, and sets a survival time for each video file to be deleted.
[0108] Selecting a video server to be processed from multiple video servers based on the remaining storage capacity, total storage capacity, access statistical information, and file size information includes: determining the fragmentation index of each video server among the multiple video servers based on the remaining storage capacity, total storage capacity, access statistical information, and file size information, and selecting the video server with the largest fragmentation index as the video server to be processed.
[0109] Determining the fragmentation coefficient of each video server among the multiple video servers based on the remaining storage capacity, total storage capacity, access statistical information, and file size information includes: counting all the access items in the access statistical information of each video server to determine all the video files stored in each video server within a predetermined time period Ti Total number of accesses A within i ,
[0110] that is, obtain multiple access items within a predetermined time period T for the access time in all access items in the access statistics of each video server i and use the number of multiple access items within the predetermined time period T i as the total number of accesses A within the predetermined time period T for all video files stored in each video server i ; where the predetermined time period T i is greater than or equal to 5 days, 10 days, 15 days, 20 days, 30 days, etc. For example, the predetermined time period T i is a 10-day period starting from the day before the current time (yesterday) to a specific date in the past. i
[0111] Statistically analyze all access items in the access statistics of each video server to determine the total number of accesses A within the most recent time period t for all video files stored in each video server i ; i
[0112] that is, obtain multiple access items within the most recent time period t for the access time in all access items in the access statistics of each video server i and use the number of multiple access items within the most recent time period t as the total number of accesses A within the most recent time period t for all video files stored in each video server i ; where the most recent time period t i-recent is less than the predetermined time period T i , for example, 2 days, 3 days, 5 days, 8 days, 10 days, etc. For example, in the above example, the predetermined time period T i is a 10-day time period starting from the day before the current time (yesterday) to a specific date in the past, and the most recent time period t i is a 2-day time period starting from the day before the current time (yesterday) to a specific date in the past. The above term "day" is a natural day. t i is a subset of T i is T i 's subset.
[0113] Divide the predetermined time period T i into multiple sub-time periods of the same time length. For example, divide the predetermined time period T i into j sub-time periods of the same time length. Specifically, each sub-time period can be 1 day, 0.5 day, or 0.25 day, etc.
[0114] Statistically analyze all access items in the access statistics information of each video server to determine the number of accesses A of all video files stored in each video server within each sub - time period ij , that is, group all access items within the predetermined time period T i according to the access time in all access items in the access statistics information of each sub - time period and each video server. The number of access items within each sub - time period is used as the number of accesses A of all video files stored in each video server within each sub - time period i within the predetermined time period T ij ; for example, if the predetermined time period T i is 10 days and the sub - time period is 1 day, then the number of accesses A ij is the number of accesses of all video files stored in each video server every day within 10 days; where the predetermined time period T i of each video server includes n i sub - time periods
[0115] Calculate the average value of the number of accesses A of all video files stored in each video server within each sub - time period ij and use the average value as A iavg .
[0116] Statistically analyze the size records in the file size information of each video server to determine the file size Q of each video file among all video files stored in each video server ik , where q i is the number of all video files stored in each video server
[0117] According to the file size Q of each video file among all video files stored in each video server ik , calculate the average file size Q of all video files stored in each video server iavg .
[0118] Statistically analyze the size records in the file size information of each video server to determine the median of the file sizes of all video files stored in each video server, that is, sort all video files stored in each video server in descending order of file size
[0119] Take the file size of the video file located at or as the median Z of the file sizes of all video files stored in each video server;
[0120] Determine the first size threshold K based on the median Z and the adjustment coefficient α1 and the second size threshold K 2 :
[0121] k 1 = Z × (1 + α)
[0122] k 2 = Z × (1 - α)
[0123] Wherein, α can be preset in this application, and / or α can be dynamically adjusted. α is any reasonable value such as 0.2, 0.3, 0.4, 0.5, 0.55, 0.6, etc.
[0124] Statistically analyze the size records in the file size information of each video server, and select the video files with file sizes greater than the first size threshold K 1 as large-size video files, and determine the number C of large-size video files among all the video files stored in each video server il .
[0125] Statistically analyze the size records in the file size information of each video server, and select the video files with file sizes less than or equal to the first size threshold K 1 and greater than or equal to the second size threshold K 2 as medium-size video files, and determine the number C of medium-size video files among all the video files stored in each video server. Statistically analyze the size records in the file size information of each video server, and select the video files with file sizes less than the second size threshold K im as small-size video files, and determine the number C of small-size video files among all the video files stored in each video server 2 . is .
[0126] Calculate the fragmentation coefficient S of each video server among multiple video servers based on the following formula i :
[0127]
[0128] Wherein, S i is the fragmentation coefficient of the i-th video server among (all) multiple video servers in the target area; R i is the remaining storage capacity of the i-th video server; G i is the total storage capacity of the i-th video server; A i is the total number of access times of (all) multiple video files stored in the i-th video server within a predetermined time period T i ; A i-recentThe total number of access times of all (multiple) video files stored in the i-th video server during the most recent time period t i within;
[0129] where the predetermined time period T of each video server i is the same, and the most recent time period t of each video server i is the same. 1 ≤ i ≤ N, where N is the number of video servers in the target area; 10 ≤ N, 5 ≤ N, 20 ≤ N or 15 ≤ N, and i is a natural number.
[0130] A i,j is the total number of access times of all (multiple) video files stored in the i-th video server during the j-th sub-time period; A iavg is the average value of the access times A i of all video files stored in the i-th video server within each of the n i,j sub-time periods; where 1 ≤ j ≤ n i , n i is the number of sub-time periods; the number of sub-time periods n of each video server i is the same; 10 ≤ n i , 5 ≤ n i , 20 ≤ n i or 15 ≤ n i
[0131] Q i,k is the file size of the k-th video file among all (multiple) video files stored in the i-th video server; Q iavg is the average file size of all video files stored in the i-th video server; q i is the number of video files stored in the i-th video server; where 1 ≤ k ≤ q i , 100 ≤ q i , 1000 ≤ q i , 10000 ≤ q i or 100000 ≤ q i , where k is a natural number.
[0132] C is is the number of small-sized video files among all (multiple) video files stored in the i-th video server; C im is the number of medium-sized video files among all (multiple) video files stored in the i-th video server; C il is the number of large-sized video files among all (multiple) video files stored in the i-th video server.
[0133] C is + Cim +C il =q i ;
[0134] Determine the video server with the largest value of S among multiple video servers in the target area as the video server to be processed. i Selecting multiple video files to be deleted from all the video files stored in the video server to be processed includes: counting all access items in the access statistics information of the video server to be processed to determine the total number of accesses f of all the video files stored in the video server to be processed within a predetermined time period T.
[0135] Count all access items in the access statistics information of the video server to be processed to determine the total number of accesses f of all the video files stored in the video server to be processed within the most recent time period t. i-to Count all access items in the access statistics information of the video server to be processed to determine the number of accesses f of each video file in each sub - time period among all the video files stored in the video server to be processed. i-re i,j .
[0136] Determine the deletion coefficient of each video file among all the video files stored in the video server to be processed:
[0137]
[0138] D i is the deletion coefficient of the i - th video file among all the video files stored in the video server to be processed, f i-to is the number of accesses of the i - th video file in the video server to be processed within the predetermined time period T, f i-re is the number of accesses of the i - th video file in the video server to be processed within the most recent time period t. 1 ≤ i ≤ m, where m is the number of video files in the video server to be processed, 100 ≤ m, 50 ≤ m, 200 ≤ m or 500 ≤ m.
[0139] Divide the predetermined time period T into multiple sub - time periods of the same time length. For example, divide the predetermined time period T into j sub - time periods of the same time length. f i,j is the number of accesses of the i - th video file among all the video files stored in the video server to be processed in the j - th sub - time period. 2 ≤ j ≤ n - 1, where n is the number of sub - time periods, and both i and j are natural numbers.
[0140] Among them, the access times of any video file in the video server to be processed are different in two adjacent sub-time periods. Multiple video files to be deleted are selected from all the video files stored in the video server to be processed based on a deletion coefficient.
[0141] Selecting multiple video files to be deleted from all the video files stored in the video server to be processed based on a deletion coefficient includes: selecting multiple video files with deletion coefficients less than a coefficient threshold from all the video files stored in the video server to be processed as multiple video files to be deleted. Or, sorting all the video files stored in the video server to be processed in ascending order of the deletion coefficient, and selecting multiple video files ranked in the top 1%, 2%, 3%, 5%, 10% or 15% etc. as multiple video files to be deleted.
[0142] Selecting multiple video files to be deleted from all the video files stored in the video server to be processed includes: randomly selecting multiple video files from all the video files stored in the video server to be processed as multiple video files to be deleted.
[0143] Sorting all the video files stored in the video server to be processed in ascending order of file size, and selecting multiple video files ranked in the top 1%, 2%, 3%, 5%, 10% or 15% etc. as multiple video files to be deleted.
[0144] Setting a survival time for each video file to be deleted among multiple video files to be deleted includes: sorting the multiple video files to be deleted in descending order of file size to generate a sorted list; in the sorted list, except for the video file to be deleted ranked first or last, the adjacent next video file to be deleted of any video file to be deleted is the video file to be deleted whose file size is closest to and less than the file size of the any video file to be deleted; the adjacent previous video file to be deleted of any video file to be deleted is the video file to be deleted whose file size is closest to and greater than the file size of the any video file to be deleted.
[0145] Statistically analyzing all access items in the access statistical information of the video server to be processed to determine the number of access times f of each video file to be deleted among multiple video files to be deleted within a predetermined time period T k Calculate the number of access times f of each video file to be deleted among multiple video files to be deleted within a predetermined time period T k The average value f of avgStatistically analyze the size records in the file size information of the video server to be processed to determine the file size of each video file to be deleted among the multiple video files to be deleted.
[0146] Calculate the average value h of the file size of each video file to be deleted among the multiple video files to be deleted. avg Calculate the average value f of the number of accesses of each video file to be deleted among the multiple video files to be deleted within a predetermined time period T. avg 。
[0147]
[0148] Where, t k-live is the survival time of the k-th video file to be deleted among the multiple video files to be deleted, and t sub is the time length of the sub-time period; f k is the number of accesses of the k-th video file to be deleted among the multiple video files to be deleted within the predetermined time period T, and f avg is the average value of the number of accesses of each video file to be deleted among the multiple video files to be deleted within the predetermined time period T; h k-s is the file size of the adjacent video file to be deleted whose file size in the sorted list is smaller than that of the k-th video file to be deleted, and h k-l is the file size of the adjacent video file to be deleted whose file size in the sorted list is larger than that of the k-th video file to be deleted, and h avg is the average value of the file size of each video file to be deleted among the multiple video files to be deleted.
[0149] Setting the survival time for each video file to be deleted among the multiple video files to be deleted includes: setting the survival time of each video file to be deleted among the multiple video files to be deleted as the time length of the sub-time period; or, setting the survival time of each video file to be deleted among the multiple video files to be deleted as 1 day, 2 days, 3 days, 5 days, 10 days or 20 days, etc.
[0150] The video server to be processed by the sending device 303 generates a file information item for each of the multiple video files to be deleted, forms an information set with the file information items of each video file to be deleted, and sends the information set to each video server to be tested. Among them, the video server to be processed generates a file information item for each of the multiple video files to be deleted, including: obtaining the digest information of each video file to be deleted among the multiple video files to be processed by the video server to be processed, where the digest information includes: file name, file category, and introduction information; generating a file information item for each video file to be deleted based on the file name, file category, and introduction information. Among them, the file name is the name of the video file or the video file to be deleted. The file category is the category to which the video file or the video file to be deleted belongs, for example, sports, entertainment, or music, etc. The introduction information is the information used to introduce or describe the content involved in the video file or the video file to be deleted. For example, the introduction information of video file A includes: in the XXX basketball league / basketball cup / basketball warm-up game, etc., the basketball game between Team A and Team B on February 21, 2019, the starting players of both sides are... respectively, the game result is..., the score of each player is..., and other content that needs to be introduced.
[0151] Generating a file information item for each video file to be deleted based on the file name, file category, and introduction information includes: taking the file name, file category, and introduction information of each video file to be deleted as three information sub-items respectively, and constructing a file information item from the three information sub-items. Forming an information set with the file information items of each video file to be deleted includes: merging the file information items of each video file to be deleted in a single set to form an information set.
[0152] The determination device 304 each video server to be tested obtains the file information item of each video file to be deleted from the received information set, and determines the content relevance degree of each video file to be deleted with each video server to be tested among the multiple video servers to be tested based on the file information item.
[0153] After each video server to be tested obtains the file information item of each video file to be deleted from the received information set, it further includes that each video server to be tested parses the file information item of each video file to be deleted to determine the file name, file category, and content information of each video file to be deleted.
[0154] Before determining the content relevance between each video file to be deleted and each video server to be tested among multiple video servers to be tested based on file information items, it further includes: Each video server to be tested obtains its own server information, and parses the server information to determine its own theme category and theme content. The theme category is at least one pre-set category of the video server or the video server to be tested, that is, when using the video server or the video server to be tested to store video files, it is pre-set for the video server or the video server to be tested for storing at least one category of video files; usually, it is set by the controller or control system of the area within the Internet; for example, the theme categories of the video server or the video server to be tested are sports and entertainment.
[0155] The theme content is an information set of the respective theme contents involved in all the video files stored in the video server or the video server to be tested. The theme content information includes multiple theme items, and each theme item includes: a theme description item and a quantity ratio. For example, the theme item is: game videos of the XXX Basketball League from January 1, 2019 to May 5, 2019, 2.5%. The theme description item is a brief description information of the video files of the same theme, and the quantity ratio is the ratio of the number of video files of the same theme to the number of all video files stored in the video server or the video server to be tested.
[0156] Determining the content relevance between each video file to be deleted and each video server to be tested among multiple video servers to be tested based on file information items includes: calculating the matching degree between the file category of each video file to be deleted and the theme category of each video server to be tested as the category matching degree. Calculating the matching degree between the file category of each video file to be deleted and the theme category of each video server to be tested as the category matching degree includes: determining the semantic relevance between the file category of each video file to be deleted and each category in at least one category of the theme category of each video server to be tested. When there is one category in the theme category of the video server to be tested, the semantic relevance is used as the category matching degree between the file category of each video file to be deleted and the theme category of each video server to be tested. When there are multiple categories in the theme category of the video server to be tested, the average value of the semantic relevance between the file category and each category is used as the category matching degree between the file category of each video file to be deleted and the theme category of each video server to be tested.
[0157] Calculate the matching degree between the content information of each video file to be deleted and the theme content of each video server to be tested as the content matching degree. Calculate the matching degree between the content information of each video file to be deleted and the theme description items in each theme item of the theme content of each video server to be tested, and use the quantity ratio corresponding to the theme description item with the largest matching degree (the quantity ratio in the theme item where the theme description item with the largest matching degree is located) as the content matching degree between the content information of each video file to be deleted and the theme content of each video server to be tested.
[0158] Determining the content association degree between each video file to be deleted and each video server to be tested among multiple video servers to be tested based on the category matching degree and the content matching degree includes: using the sum of the category matching degree and the content matching degree between each video file to be deleted and each video server to be tested among multiple video servers to be tested as the content association degree between each video file to be deleted and each video server to be tested among multiple video servers to be tested.
[0159] After each video server to be tested obtains the file information item of each video file to be deleted from the received information set, it further includes that each video server to be tested parses the file information item of each video file to be deleted to determine the file category of each video file to be deleted.
[0160] Before determining the content association degree between each video file to be deleted and each video server to be tested among multiple video servers to be tested based on the file information item, it further includes: each video server to be tested obtains its own server information and parses the server information to determine its own theme category; where the theme category is a pre-set category of the video server or the video server to be tested, that is, when using the video server or the video server to be tested to store video files, a category for storing a certain type of video files is pre-set for the video server or the video server to be tested; usually, it is set by the controller or control system in the Internet area; for example, the theme category of the video server or the video server to be tested is sports and entertainment.
[0161] Determining the content relevance between each video file to be deleted and each video server to be tested based on file information items includes: calculating the matching degree between the file category of each video file to be deleted and the theme category of each video server to be tested as the content relevance. Calculating the matching degree between the file category of each video file to be deleted and the theme category of each video server to be tested as the content relevance includes: determining the semantic relevance between the file category of each video file to be deleted and the theme category of each video server to be tested, and taking the semantic relevance as the content relevance between each video file to be deleted and each video server to be tested among multiple video servers to be tested.
[0162] The semantic relevance is the relevance between two preset words. To determine the semantic relevance between two words, for example, the file category and the theme category, the two words (file category and theme category) are used as inputs to query in the matching library of semantic relevance, and the semantic relevance between the two words (file category and theme category) can be obtained. That is, the matching library of semantic relevance includes multiple matching pairs, such as (word A, word B, relevance). When word A is equal to word B, the semantic relevance is 100%, and when word A and word B are antonyms, the semantic relevance is 0%.
[0163] When the survival time of a specific video file to be deleted among multiple video files to be deleted expires, the processing device 305 determines whether the specific video file to be deleted exists in the target video server based on the content relevance between the specific video file to be deleted and each video server to be tested. If not, the specific video file to be deleted is deleted.
[0164] When the survival time of a specific video file to be deleted among multiple video files to be deleted expires, the processing device 305 determines whether the specific video file to be deleted exists in the target video server based on the content relevance between the specific video file to be deleted and each video server to be tested. If not, the specific video file to be deleted is deleted. Since the survival times of each video file to be deleted among multiple video files to be deleted may be the same or different, the moments when the survival times of each video file to be deleted expire may also be the same or different.
[0165] Determining whether there is a target video server for a specific video file to be deleted based on the content correlation degree between the specific video file to be deleted and each video server to be tested includes: determining the maximum value among the content correlation degrees between the specific video file to be deleted and each video server to be tested, that is, determining the maximum content correlation degree. Determining whether the maximum value in the content correlation degrees or the maximum content correlation degree is less than the correlation degree threshold. If it is less than, then there is no target video server for the specific video file to be deleted, and the specific video file to be deleted is deleted. If the maximum value in the content correlation degrees or the maximum content correlation degree is greater than or equal to the correlation degree threshold, then the video server to be tested corresponding to the maximum value in the content correlation degrees or the maximum content correlation degree is determined as the target video server, and the specific video file to be deleted is moved to the target video server.
Claims
1. A method for cleaning video files in an Internet video server, the method comprises: Determine the current status information of each video server among all video servers in the target area on the Internet, and parse the current status information of each video server to determine the remaining storage capacity, total storage capacity, access statistics information, and file size information of each video server; Select the video servers to be processed from multiple video servers based on the remaining storage capacity, total storage capacity, access statistics information, and file size information, determine each video server other than the video servers to be processed among all video servers in the target area as the video servers to be tested, select multiple video files to be deleted from all video files stored in the video servers to be processed, and set a survival time for each video file to be deleted; The video server to be processed generates a file information item for each of the multiple video files to be deleted, forms an information set from the file information items of each video file to be deleted, and sends the information set to each video server to be tested; Each video server to be tested obtains the file information item of each video file to be deleted from the received information set, and determines the content association degree between each video file to be deleted and each video server to be tested among the multiple video servers to be tested; wherein, determining the content association degree between each video file to be deleted and each video server to be tested among the multiple video servers to be tested based on the file information item includes: determining the semantic association degree between the file category of each video file to be deleted and the theme category of each video server to be tested, and using the semantic association degree as the content association degree between each video file to be deleted and each video server to be tested among the multiple video servers to be tested; When the survival time of a specific video file to be deleted among the multiple video files to be deleted expires, determine the maximum value among the content association degrees between the specific video file to be deleted and each video server to be tested, that is, determine the maximum content association degree; Determine whether the maximum value among the content association degrees or the maximum content association degree is less than the association degree threshold. If it is less, it means that the specific video file to be deleted does not have a target video server, and then delete the specific video file to be deleted; If the maximum value among the content association degrees or the maximum content association degree is greater than or equal to the association degree threshold, determine the video server to be tested corresponding to the maximum value among the content association degrees or the maximum content association degree as the target video server, and move the specific video file to be deleted to the target video server.
2. The method according to claim 1, selecting the video servers to be processed from multiple video servers based on the remaining storage capacity, total storage capacity, access statistics information, and file size information comprises: Determine the fragmentation index of each video server among the multiple video servers based on the remaining storage capacity, total storage capacity, access statistics information, and file size information, and select the video server with the largest fragmentation index as the video server to be processed.
3. The method according to claim 2, selecting a plurality of video files to be deleted from all the video files stored in the video server to be processed comprises: determining a deletion coefficient for each video file among all the video files stored in the video server to be processed; selecting a plurality of video files to be deleted from all the video files stored in the video server to be processed based on the deletion coefficient.
4. The method according to claim 3, selecting a plurality of video files to be deleted from all the video files stored in the video server to be processed based on the deletion coefficient comprises: selecting, as the plurality of video files to be deleted, a plurality of video files among all the video files stored in the video server to be processed whose deletion coefficients are less than a coefficient threshold.
5. The method according to claim 4, setting a survival time for each video file to be deleted among the plurality of video files to be deleted comprises: setting the survival time of each video file to be deleted among the plurality of video files to be deleted to the time length of a sub - time period.
6. A system for cleaning video files in an Internet video server, the system comprises: a parsing device, determining the current status information of each video server among all the video servers in a target area of the Internet, and parsing the current status information of each video server to determine the remaining storage capacity, total storage capacity, access statistics information, and file size information of each video server; a selection device, selecting a video server to be processed from a plurality of video servers based on the remaining storage capacity, total storage capacity, access statistics information, and file size information, determining each video server other than the video server to be processed among all the video servers in the target area as a video server to be tested, selecting a plurality of video files to be deleted from all the video files stored in the video server to be processed, and setting a survival time for each video file to be deleted; a sending device, the video server to be processed generating a file information item for each of the plurality of video files to be deleted, forming an information set from the file information items of each video file to be deleted, and sending the information set to each video server to be tested; a determining device, each video server to be tested obtaining the file information item of each video file to be deleted from the received information set, and determining the content relevance degree of each video file to be deleted with each video server to be tested among the plurality of video servers to be tested; wherein, determining the content relevance degree of each video file to be deleted with each video server to be tested among the plurality of video servers to be tested based on the file information item includes: determining the semantic relevance degree between the file category of each video file to be deleted and the theme category of each video server to be tested, and using the semantic relevance degree as the content relevance degree of each video file to be deleted with each video server to be tested among the plurality of video servers to be tested; The processing device, when the survival time of a specific video file to be deleted among multiple video files to be deleted expires, determines the maximum value among the content association degrees of the specific video file to be deleted with each video server to be tested, that is, determines the maximum content association degree. Determines whether the maximum value among the content association degrees or the maximum content association degree is less than the association degree threshold. If it is less, it means that there is no target video server for the specific video file to be deleted, and then deletes the specific video file to be deleted. If the maximum value among the content association degrees or the maximum content association degree is greater than or equal to the association degree threshold, determines the video server to be tested corresponding to the maximum value among the content association degrees or the maximum content association degree as the target video server, and moves the specific video file to be deleted to the target video server.
7. The system according to claim 6 Selects the video servers to be processed from multiple video servers based on the remaining storage capacity, total storage capacity, access statistics information, and file size information including: Determines the fragmentation index of each video server among multiple video servers based on the remaining storage capacity, total storage capacity, access statistics information, and file size information, and selects the video server with the largest fragmentation index as the video server to be processed.
8. The system according to claim 7, selects multiple video files to be deleted from all the video files stored in the video server to be processed including: Determines the deletion coefficient of each video file among all the video files stored in the video server to be processed: Selects multiple video files to be deleted from all the video files stored in the video server to be processed based on the deletion coefficient.
9. The system according to claim 8, selects multiple video files to be deleted from all the video files stored in the video server to be processed based on the deletion coefficient including: Selects multiple video files with deletion coefficients less than the coefficient threshold among all the video files stored in the video server to be processed as multiple video files to be deleted.
10. The system according to claim 9, sets the survival time for each video file to be deleted among multiple video files to be deleted including: Sets the survival time of each video file to be deleted among multiple video files to be deleted as the time length of the sub - time period.
Citation Information
Patent Citations
Storage space reclaiming method and device
CN106446044A
Data storage, reading, and cleansing method and device, and cloud storage system
WO2018072576A1