File processing method and device, storage medium and electronic equipment

By combining the online status, ID and timestamp of the video file, the files to be archived are filtered out from the historical transcoded files, which solves the problem of wasted storage space after video files are replaced and the accuracy of file processing in the media management system, and achieves more accurate file archiving and storage optimization.

CN120029973APending Publication Date: 2025-05-23HUNAN HAPPLY SUNSHINE INTERACTIVE ENTERTAINMENT MEDIA CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510031540.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-08
Publication Date
2025-05-23

AI Technical Summary

Technical Problem

In the media management system, video files generate a large number of unnecessary transcoding files due to multiple film replacements, resulting in wasted storage space. Due to different transcoding times, the sequence of file IDs may be chaotic and the file processing results may be misjudged.

Method used

By obtaining the online status, video ID and timestamp of the video file on the target video platform, filter out the files to be archived from the historical transcoding file, avoiding identification based on the file ID only, and ensuring the accuracy of file processing.

Benefits of technology

It effectively avoids the problem of low accuracy during file processing, ensures that online files are not deleted by mistake, improves the accuracy of file archive results, and reduces waste of storage space.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120029973A_ABST
    Figure CN120029973A_ABST
Patent Text Reader

Abstract

The invention discloses a file processing method and device, a storage medium and electronic equipment. The method comprises the steps that first state information of a first video on a target video platform is acquired, and the first state information represents whether the first video is online on the target video platform or not; under the condition that the first state information shows that the first video is online on the target video platform, a first group of files are determined from a group of historical transcoding files based on the first video ID and the timestamp of the video file, the group of historical transcoding files are files generated by transcoding when the first video is replaced in a historical period, and the first group of files are stored in the target video platform; the group of historical transcoding files comprises a video file; and determining the to-be-archived file by traversing the first group of files. According to the method and the device, the technical problem of relatively low accuracy in a file processing process in related technologies is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computers, and in particular to a file processing method and device, a storage medium, and an electronic device. Background Art

[0002] In the media asset management system, video files may be replaced multiple times due to content optimization, sensitive information, etc. In each replacement process, a new transcoded file is generated and the original file is retained, resulting in a large waste of storage space.

[0003] For example, in a video on demand system, after a video is replaced multiple times, multiple file versions with different clarity and transcoding time will be generated. In order to clear the files that are no longer needed, in the related technology, the files to be processed are usually identified according to the file version of the transcoded file or according to the clarity of the transcoded file.

[0004] However, since the time spent on multiple file transcodings is different, it is possible that the completion time of the next transcoding is earlier than the completion time of the previous transcoding when the previous transcoding is not completed, which means that the file ID of the next transcoded file is earlier than the file ID of the previous transcoded file. Therefore, the file generated by the next transcoding may be mistakenly judged as a file to be processed or archived, resulting in a technical problem of low accuracy in the file processing process.

[0005] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0006] The embodiments of the present application provide a file processing method and device, a storage medium, and an electronic device to at least solve the technical problem of low accuracy that occurs during the file processing process.

[0007] According to one aspect of an embodiment of the present application, a file processing method is provided, including: obtaining first status information of a first video on a target video platform, wherein the first status information indicates whether the first video is online on the target video platform; in a case where the first status information indicates that the first video has been online on the target video platform, based on the first video ID and the timestamp of the video file, determining a first group of files from a group of historical transcoded files, wherein the group of historical transcoded files are files generated by transcoding when the first video is replaced within a historical period, and the group of historical transcoded files includes video files; by traversing the first group of files, determining the files to be archived.

[0008] Optionally, in the above-mentioned case where the first status information indicates that the first video has been online on the target video platform, based on the first video ID and the timestamp of the first video file, a first group of files is determined from a group of historical transcoded files, including: when the first status information indicates that the first video is online on the target video platform at the current moment, based on the first video ID and the timestamp of the video file, a second group of files in a published state is determined from a group of historical transcoded files; based on a group of timestamps of each file in the second group of files, the second group of files is sorted to obtain the minimum timestamp; files with timestamps less than the minimum timestamp are filtered out from the group of historical transcoded files to obtain a third group of files; and the first group of files is determined from the third group of files.

[0009] Optionally, the above-mentioned determining the first group of files from the third group of files includes: determining a first cumulative transcoding time of each file in the third group of files, wherein the first cumulative transcoding time is the cumulative time from the time when each file is transcoded to the current moment; screening out a first subgroup of files whose first cumulative transcoding time is greater than a preset threshold from the third group of files; and determining the first subgroup of files as the first group of files.

[0010] Optionally, in the above-mentioned case where the first status information indicates that the first video has been online on the target video platform, based on the first video ID and the timestamp of the first video file, a first group of files is determined from a group of historical transcoded files, including: when the first status information indicates that the first video is offline on the target video platform at the current moment and was online in a historical time period, based on the first video ID and the platform ID of the target video platform, a second cumulative transcoding time of each file in a group of historical transcoded files is obtained; a second subgroup of files whose second cumulative transcoding time is greater than a preset threshold are screened out from a group of historical transcoded files; and the second subgroup of files are determined as the first group of files.

[0011] Optionally, the above-mentioned determining the file to be archived by traversing the first group of files includes: obtaining one file in turn from the first group of files as the current file; when the current file is not shared by the first video and the second video, querying the second status information of the current file on the business side based on the file ID of the current file; when the second status information indicates that the business side is currently using the current file, determining the current file as the file to be archived.

[0012] Optionally, the method further includes: when the current file is shared by the first video and the second video, recording the current file into an archive exception list.

[0013] Optionally, the method further includes: obtaining a first timestamp and a first transcoded file ID of a first transcoded file obtained after performing a first transcoding on a target source file of the first video; obtaining a second timestamp and a second transcoded file ID of a second transcoded file obtained after performing a second transcoding on the target source file, wherein the file ID of the second transcoded file is smaller than the file ID of the first transcoded file; and determining the first transcoded file as a file to be archived based on the first timestamp and the second timestamp, wherein the second time indicated by the second timestamp is later than the first time indicated by the first timestamp.

[0014] Optionally, after determining the files to be archived by traversing the first group of files, the method further includes: distributing a file list including the files to be archived to a content distribution network; determining a fifth group of files that have not been accessed within a first preset time period from the files to be archived; and deleting a group of source files corresponding to a third subgroup of files in the fifth group of files for which no log request has been initiated within a second preset time period by querying the request log.

[0015] According to another aspect of the embodiment of the present application, a file processing device is also provided, including: a first acquisition unit, used to obtain first status information of a first video on a target video platform, wherein the first status information indicates whether the first video is online on the target video platform; a first processing unit, used to determine a first group of files from a group of historical transcoded files based on the first video ID and the timestamp of the video file when the first status information indicates that the first video has been online on the target video platform, wherein the group of historical transcoded files are files generated by transcoding when the first video is replaced during a historical period, and the group of historical transcoded files includes video files; a second processing unit, used to determine the files to be archived by traversing the first group of files.

[0016] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is used to execute the above-mentioned file processing method when run by an electronic device.

[0017] According to another aspect of the embodiments of the present application, a computer program product is also provided, including a computer program that implements the steps of the above method when the computer program is executed by a processor.

[0018] According to another aspect of the embodiments of the present application, there is further provided an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the file processing method through the computer program.

[0019] By adopting the above-mentioned embodiment provided by the present application, the first group of files is preliminarily screened out from the historical transcoded files through the online status of the first video, the video ID and the timestamp of the video file, and then the first group of files is traversed to finally determine the files to be archived. In other words, by screening the historical transcoded files according to the usage status of the video and the file, and combining the timestamp of the transcoded file in the film replacement process, and traversing the preliminarily screened first group of files, the files to be archived are determined, thus avoiding the technical problem of low accuracy caused by identifying the files to be archived only based on the file ID of the video file, ensuring that the online files are not deleted by mistake, and achieving the technical effect of improving the accuracy of the file archiving results. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The drawings described herein are used to provide further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute improper limitations on the present application.

[0021] Figure 1 is a schematic diagram of an application scenario of an optional file processing method according to an embodiment of the present application;

[0022] Figure 2 is a flowchart of an optional file processing method according to an embodiment of the present application;

[0023] Figure 3 This is an optional flow chart for determining files to be archived in a video online state according to an embodiment of the present application;

[0024] Figure 4 This is an optional flow chart for determining files to be archived when a video is not online according to an embodiment of the present application;

[0025] Figure 5 This is an optional flowchart of determining to traverse files according to whether the files are shared according to an embodiment of the present application;

[0026] Figure 6 is an optional CDN side processing flow chart of files to be archived according to an embodiment of the present application;

[0027] Figure 7 is a schematic structural diagram of an optional file processing device according to an embodiment of the present application;

[0028] Figure 8 It is a schematic diagram of the structure of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0029] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0030] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0031] The technical solutions in the embodiments of the present application will comply with legal provisions during implementation. When performing operations according to the technical solutions in the embodiments, the data used will not involve user privacy. While ensuring that the operation process is compliant and legal, the security of the data is guaranteed.

[0032] In addition, when the above embodiments of the present application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data need to comply with relevant regulations and standards of the relevant country or region.

[0033] According to one aspect of the embodiments of the present application, a file processing method is provided. As an optional implementation, the file processing method can be but is not limited to being applied to Figure 1 The application scenario shown in Figure 1In the application scenario shown, the target terminal 102 may, but is not limited to, communicate with the server 106 via the network 104, and the server 106 may, but is not limited to, perform operations on the database 108, such as write data operations or read data operations. The above-mentioned target terminal 102 may, but is not limited to, include a human-computer interaction screen, a processor, and a memory. The above-mentioned human-computer interaction screen may, but is not limited to, be used to display a video playback screen and a user operation screen on the target video platform on the target terminal 102. The above-mentioned processor may, but is not limited to, be used to respond to the above-mentioned human-computer interaction operation, perform a corresponding operation, or generate a corresponding instruction, and send the generated instruction to the server 106. The above-mentioned memory is used to store relevant processing data, such as the first state information, the first video ID, and the timestamp of the video file.

[0034] Optionally, in this embodiment, the target terminal may be a terminal configured with a target client, which may include but is not limited to at least one of the following: a mobile phone (such as an Android phone, an iOS phone, etc.), a laptop, a tablet computer, a PDA, a MID (Mobile Internet Devices), a PAD, a desktop computer, a smart TV, etc. The target client may be a video client, an instant messaging client, a browser client, an education client, etc. The network may include but is not limited to: a wired network, a wireless network, wherein the wired network includes: a local area network, a metropolitan area network and a wide area network, and the wireless network includes: Bluetooth, WIFI and other networks that realize wireless communication. The server may be a single server, or a server cluster consisting of multiple servers, or a cloud server.

[0035] In order to solve the problem of low accuracy in the above-mentioned file processing process, a file processing method is proposed in an embodiment of the present application. Figure 2 It is a flowchart of a file processing method according to an embodiment of the present application, and the process includes the following steps S202 to S206.

[0036] It should be noted that the file processing method shown in step S202 to step S206 can be but is not limited to being executed by an electronic device, wherein the electronic device can be but is not limited to being a target terminal or server as shown in FIG. 1 .

[0037] Step S202, obtaining first status information of the first video on the target video platform, wherein the first status information indicates whether the first video is online on the target video platform;

[0038] Step S204, when the first status information indicates that the first video has been launched on the target video platform, based on the first video ID and the timestamp of the video file, a first group of files is determined from a group of historical transcoded files, wherein the group of historical transcoded files is files generated by transcoding when the first video is replaced within a historical period, and the group of historical transcoded files includes video files;

[0039] Step S206, determining the files to be archived by traversing the first group of files.

[0040] It is easy to understand that before or during video playback, operations such as optimization of video content or special processing of sensitive information may occur. Therefore, multiple backup versions of video files that are basically similar to the video images to be played are usually prepared in advance. The backup video files may not include sensitive terms or may delete some images.

[0041] In a specific example, the replacement process may refer to, but is not limited to, replacing a currently playing video file also having a duration of 40 minutes with a spare video file having a duration of 40 minutes.

[0042] With the iterative use of the video platform, there may be multiple replacement processes, and in each replacement process, a transcoded file with a file ID and timestamp will be generated. That is, there will be multiple forms of historical replacement files in the storage system, consuming a lot of storage space.

[0043] In addition, it is necessary to store various forms of substitute film files on a server closer to the user through CDN (Content Delivery Network), which also requires more CDN storage space.

[0044] Among them, CDN is a distributed server network interconnected by the Internet, which is designed to improve the speed and reliability of content delivery for websites and applications. The main goal of CDN is to cache content on servers closer to users, thereby reducing latency and increasing loading speeds, thereby providing a better user experience.

[0045] In order to solve the above problems, the embodiment of the present application proposes to search for a group of historical transcoded files based on the online status of the video file on the target video platform, the video ID, and the timestamp of the historical transcoded file, and preliminarily determine the first group of files to be archived or cleaned up.

[0046] During this process, the status of the first video in the target video platform may be that it is currently online, or it may have been online on the target video platform in history. In the embodiments of the present application, the processing process of the historical replacement file (which can also be understood as a group of historical transcoding files) of the first video in the above two states will be explained in combination with specific embodiments.

[0047] It should be noted that in the process of replacing films, there may be replacement film files generated by multiple transcodings. In theory, the file ID of the replacement film file with an earlier time is smaller than the file ID of the replacement film file with a later time. In this case, if the file to be archived is determined only by the size of the file ID, the replacement film file with a later time may be determined as the file to be archived, thereby causing the accidental deletion of historical transcoded files.

[0048] In response to the above problems, the embodiments of the present application introduce the timestamp (which can also be understood as the timing) of the historical transcoded files generated by transcoding during the film replacement process. Based on the video ID and the timestamp, a group of historical transcoded files are screened to accurately identify the transcoded files that are at an earlier time point and do not need to be used again.

[0049] Then, by traversing the first group of files that have been initially screened, check whether each historical transcoded file is shared by other video or business systems. Then, for the shared files, do not perform archiving operations for the time being, and record them in the archiving exception record table; for the files that are not shared, further check their usage status on the business side, and determine whether they are determined as files to be archived based on their usage status on the business side.

[0050] In this embodiment, the target video platform includes but is not limited to an MPP video platform and an OTT video platform. For example, the MPP video platform includes but is not limited to a platform for playing video images through a mobile phone or tablet computer, and the OTT video platform includes but is not limited to a platform for playing video images through a computer or other display device.

[0051] The technical solution of this application realizes accurate archiving and storage optimization of video files by introducing the timestamp, video ID and status information of the transcoded video files on the target video platform. Compared with the prior art, the technical solution of this application can significantly reduce file storage space, storage costs and CDN bandwidth costs, while ensuring the integrity of video content and the smoothness of online playback, achieving the purpose of reducing overall costs and improving data processing efficiency, and has significant economic benefits and practical application value.

[0052] As an optional example, in the case where the first status information indicates that the first video has been launched on the target video platform, based on the first video ID and the timestamp of the first video file, a first group of files is determined from a group of historical transcoded files, including:

[0053] When the first status information indicates that the first video is in an online state on the target video platform at the current moment, based on the first video ID and the timestamp of the video file, a second group of files in a published state is determined from a group of historical transcoded files;

[0054] Based on a set of timestamps of each file in the second set of files, sort the second set of files to obtain a minimum timestamp;

[0055] Filter out files with timestamps smaller than a minimum timestamp from a group of historical transcoded files to obtain a third group of files;

[0056] The first set of files is determined from the third set of files.

[0057] like Figure 3 As shown, when it is determined that the first video is currently online on the target video platform, the first group of files can be preliminarily screened out through but not limited to the following steps.

[0058] S302, detecting status information of a first video on a target video platform;

[0059] In this embodiment, the target video platform can be one or more, and the historical transcoding files of each video platform can be distinguished by the spID (platform ID) of the video platform, and the same file archiving processing flow can be used to process the historical transcoding files of each video platform.

[0060] S304, starting to archive files on the video platform;

[0061] S306, determining whether the target video platform is an IPTV platform;

[0062] Among them, the IPTV platform can be understood as an interactive network television platform, which is a technology that uses broadband Internet Protocol (IP) networks to provide a variety of digital media services including television programs.

[0063] Among them, the video platform belonging to the IPTV platform needs to distribute the historical transcoding files to the CDN, while the video platform not belonging to the IPTV platform does not need to distribute the historical transcoding files to the CDN.

[0064] When it is determined that the target video platform does not belong to the IPTV platform, step S308 is executed.

[0065] S308, determining whether the first video is currently online on the video platform;

[0066] If it is online, execute step S310; otherwise, determine whether the first video has been online on the video platform. The following will explain the situations of having been online and not being online respectively in conjunction with specific embodiments.

[0067] S310, determining the minimum timestamp among the timestamps of the historical transcoded files in the published state according to the partID (first video ID), the spID (platform ID of the file platform) and the timestamps of each video file;

[0068] For example, suppose a group of historical transcoded files includes file 1 to file 5, where file 1 to file 5 are files transcoded at five historical times, and a corresponding timestamp is generated according to each transcoding time, such as t 1 ,t 2 ,t 3 ,t 4 ,t 5 , and then determine the files in the published state among the 5 files. Assuming that files 4 and 5 are in the published state, then t 4 ,t 5 The smallest value among them is determined as the minimum timestamp. 4 Determine the minimum timestamp, and then execute step S312.

[0069] S312, determining a second group of files in a published state from a group of historical transcoded files according to the minimum timestamp;

[0070] As in the above embodiment, the time is earlier than t 4 t 1 ,t 2 and t 3 File 1 to file 3 corresponding to these three timestamps are determined to be the third group of files.

[0071] S314, filtering and obtaining historical transcoded files that have been transcoded for n days to obtain a first group of files.

[0072] For example, n=180 days means filtering files whose transcoding time reaches 180 days or more.

[0073] This embodiment fully considers the life cycle and usage status of video files, and accurately searches for historical transcoded files that are not in the published state and have been offline for more than n days through timestamps, ensuring that early transcoded files that can be archived can be accurately identified, reducing storage space and bandwidth costs without causing negative impacts on current online video services and user experience.

[0074] As an optional implementation, the above-mentioned determining the first group of files from the third group of files includes:

[0075] Determine a first accumulated transcoding time of each file in the third group of files, wherein the first accumulated transcoding time is the accumulated time from the time when each file is transcoded to the current moment;

[0076] Filter out a first subgroup of files whose first accumulated transcoding time is greater than a preset threshold from the third group of files;

[0077] A first subset of files is determined as a first group of files.

[0078] In video media systems, especially the common video on demand platforms, the replacement operation of video content may involve a large number of historical transcoding files. These files are stored according to different resolutions, transcoding times and business status, forming a complex historical transcoding file library.

[0079] The accumulated transcoding time may refer to, but is not limited to, the accumulated time of each file from its transcoding generation to the current moment. The accumulated transcoding time can be used to determine the length of time the transcoded file stays in the system, thereby identifying file versions that have not been updated by transcoding operations for a long time, providing a reference for subsequent screening and archiving operations.

[0080] Obviously, it is easy to understand that n=180 days in the above embodiment is only an example and is not limited thereto. For example, it can also be set to 90 days or 60 days.

[0081] By introducing the cumulative transcoding time and combining it with a preset threshold (e.g. n=180 days), in-depth screening of historical transcoding files is achieved. By calculating the first cumulative transcoding time and setting the threshold, the system can more accurately identify transcoding files that have not been used for a long time without affecting the current video service, thereby effectively archiving and optimizing costs.

[0082] As an optional example, in the case where the first status information indicates that the first video has been launched on the target video platform, based on the first video ID and the timestamp of the first video file, a first group of files is determined from a group of historical transcoded files, including:

[0083] When the first status information indicates that the first video is offline on the target video platform at the current moment and was online in the historical time period, obtaining the second accumulated transcoding time of each file in a set of historical transcoding files based on the first video ID and the platform ID of the target video platform;

[0084] Filter out a second subgroup of files whose second accumulated transcoding time is greater than a preset threshold from a group of historical transcoding files;

[0085] The second subset of files is determined as the first set of files.

[0086] Specifically, combined Figure 4 The processing flow of the above video files when they are not currently online is explained.

[0087] S402, video platform file archiving starts;

[0088] S404, determining whether the target video platform is an IPTV platform;

[0089] The IPTV platform has been explained in the above embodiments and will not be described in detail here.

[0090] S406, whether the video platform has currently launched the first video;

[0091] If the first video is not online at the current moment, execute step S408; if the first video is online at the current moment, execute Figure 3 The processing flow shown.

[0092] S408, determining whether the first video has been online on the video platform;

[0093] If yes, execute step S410; otherwise, execute step S412.

[0094] S410, determining whether the first video has been offline for n days;

[0095] If n days have been reached, execute step S412; otherwise, jump to Figure 3 Step S310 is shown.

[0096] S412, query all historical transcoded files according to partID (first video ID) and spID (platform ID of the file platform);

[0097] Among them, according to the first video ID and the platform ID of the file platform, the timestamp of each video file can be queried, and the time represented by the timestamp is used as the start time, and the cumulative time from the start time to the current time is calculated to obtain the cumulative transcoding time.

[0098] S414, filtering and obtaining historical transcoded files that have been transcoded for n days.

[0099] The filtered historical transcoding files with a cumulative transcoding time of n days are determined as the first group of files.

[0100] In this embodiment, by introducing the screening strategy of cumulative transcoding time, a more refined and secure solution is provided for the archive management of offline videos. It not only reduces the consumption of storage and CDN resources, but also ensures the integrity of data and the continuity of playback records under emergency recovery needs. The introduction of this strategy enables the system to intelligently identify and process files at different stages of the video life cycle, providing a new and efficient way for media asset management, which helps the video platform achieve the dual goals of cost control and data security.

[0101] In addition, the video platform can manage the historical transcoded files of offline videos in a more refined and secure manner, avoiding excessive occupation of resources. It also provides sufficient buffer for content recovery in emergency situations, reflecting the beneficial effects of intelligent and automated video management processes.

[0102] As an optional example, the above method of traversing the first group of files to determine the files to be archived includes:

[0103] Get one file from the first set of files in turn as the current file;

[0104] When the current file is not shared by the first video and the second video, query the second status information of the current file on the service side based on the file ID of the current file;

[0105] When the second status information indicates that the business side is currently using the current file, the current file is determined as a file to be archived.

[0106] After the first set of files are screened, the system will select one of them as the current file in turn for the subsequent inspection process. This operation ensures that each file that is initially determined to be archiveable will be checked one by one to ensure the accuracy of the archiving operation. For details, please refer to Figure 5 Steps shown:

[0107] S502, obtaining a first group of files screened by the above embodiment;

[0108] S504, traversing each file in the first group of files;

[0109] S506, determining whether the current file is shared by other videos;

[0110] If it is not shared by other videos, execute step S808; otherwise, execute step S524.

[0111] Exemplarily, when it is determined that the current file is being shared by the first video and other videos, the following processing is performed:

[0112] When the current file is shared by the first video and the second video, the current file is recorded in the archive exception list.

[0113] In the embodiment of the present application, it is possible but not limited to using whether the file Hash is the same to check whether the first video is shared by other videos. If it is shared, no archiving operation is performed and the first video is recorded in the archiving exception list.

[0114] In other words, although the historical transcoding file is not used in the current first video, the historical transcoding file may still be used in other videos, so the historical transcoding file cannot be directly deleted.

[0115] Through the above method, the accidental deletion of files is reduced, the normal playback of videos is ensured, and the stability of the video platform is improved.

[0116] S508, determining whether the current video platform is an IPTV platform;

[0117] If not, execute step S510; otherwise, execute step S526.

[0118] S510, querying the file status of the downstream database according to the file ID;

[0119] When the file is not shared by other videos and has been sent to the business side, query the file status on the business side based on the fileID.

[0120] S512, query whether there is a file record in the database of the business side;

[0121] The business side may include but is not limited to the user side, and the downstream database includes but is not limited to the database of the server being used by the user side.

[0122] If the file record exists in the downstream database, execute step S514; otherwise, execute step S524.

[0123] S514, determining whether the isUse field of the downstream database is 0;

[0124] If it is 0, execute step S516; otherwise, execute step S524.

[0125] Among them, if the field isUse is 0, it means that the file is not used by the business side; if the field isUse is 1, it means that the file is being used by the business side.

[0126] S516, migrating the file to a finished product file related table in the video platform side database;

[0127] S518, migrating the file to a downstream database finished product file related table;

[0128] The downstream database may be, but is not limited to, a database on a server used by the user when watching a video.

[0129] S520, determining whether the file in the video platform database has been distributed;

[0130] If it has been distributed, execute step S528; otherwise, execute step S522.

[0131] S522, file traversal ends;

[0132] S524, inserting the file ID of the file into the file exception record;

[0133] S526, notifying the IPTV secondary media asset management system to delete the file;

[0134] S528, determining whether the clarity of the video file needs to be retained during the archiving operation;

[0135] If necessary, execute step S522; otherwise, execute step S530.

[0136] S530, after archiving for n days, notify the CDN to delete the file;

[0137] S532, the video platform archiving process ends.

[0138] Through the above method, the strategy of video file archiving management is further improved, ensuring that even in a complex business environment, archiving operations can be performed accurately and without any impact on the playback of other videos or the operation of the business system.

[0139] In addition, by checking file sharing and business-side usage status, the system can manage video files more intelligently and securely, which not only helps optimize costs but also ensures data security and business continuity.

[0140] As an optional example, the above method further includes:

[0141] Obtain a first timestamp and a first transcoded file ID of a first transcoded file obtained after performing a first transcoding on a target source file of the first video;

[0142] Obtaining a second timestamp and a second transcoded file ID of a second transcoded file obtained after performing a second transcoding on the target source file, wherein the file ID of the second transcoded file is smaller than the file ID of the first transcoded file;

[0143] The first transcoded file is determined as a file to be archived based on the first timestamp and the second timestamp, wherein the second time indicated by the second timestamp is later than the first time indicated by the first timestamp.

[0144] In a specific embodiment, it is assumed that during a film replacement process, for the target source file in the first video, two transcoding operations are performed successively to generate a first transcoded file and a second transcoded file respectively. However, the completion time of the second transcoding is earlier than that of the first transcoding, resulting in the file ID of the second transcoded file being smaller than that of the first transcoded file.

[0145] However, since the timestamp of the transcoded file depends on the transcoding start time, the time represented by the second timestamp of the second transcoded file is later than the time represented by the first timestamp of the first transcoded file.

[0146] In this case, if determined according to the file ID, the second transcoded file may be mistakenly identified as the file to be archived, while the first transcoded file is retained.

[0147] If the timestamp of the transcoded file proposed in this embodiment is used, it can accurately identify that the second transcoded file is the newly generated file, and the first transcoded file is the file that should actually be archived.

[0148] By adopting the above method, through the introduction of the comparison strategy of timestamp and file ID, a more accurate and secure file version identification method is provided for video archiving management. It can not only effectively avoid the mis-archiving of the latest version file, but also promote the optimized utilization of storage resources, reduce unnecessary storage costs and CDN bandwidth consumption by automatically identifying and marking the files to be archived.

[0149] More importantly, the introduction of this strategy ensures the continuity of video services and the stability of user experience, reflecting the intelligent and refined level of the video media asset management system in data management.

[0150] As an optional example, after determining the files to be archived by traversing the first group of files, the above method further includes:

[0151] Distributing the file list containing the files to be archived to the content delivery network;

[0152] Determining a fifth group of files that have not been accessed within the first preset time period from the files to be archived;

[0153] Deleting a group of source files corresponding to the third subgroup of files that have not initiated log requests within the second preset time period in the fifth group of files by querying the request log.

[0154] The following combines Figure 6 the flowchart shown below to explain the file processing process of the CDN policy.

[0155] S602, the media resource management system provides a list of files to be taken offline;

[0156] The file list is a file list consisting of files to be archived determined by the above file identification method.

[0157] S604, the CDN obtains a file list from the media resource management system;

[0158] S606, executing the judgment logic of the source station;

[0159] For example, it is determined whether each file in the file list has been accessed in the last 6 months. If the file has been accessed, the file is not processed temporarily; if the file has not been accessed in the last 6 months, step S608 is executed.

[0160] S608, rename the source site file;

[0161] S610 processes the file on the off-CDN service node;

[0162] CDN is a distributed server network that aims to reduce network congestion and improve access response speed by caching content on edge servers around the world, so that users can obtain the required content nearby. Service nodes are key components of the CDN network. They are server nodes deployed in various locations around the world, responsible for providing content distribution and acceleration, and providing users with the closest server nodes.

[0163] S612, observe the request log of the service node file;

[0164] For example, observe whether the file on the service node is accessed within one month. If so, execute step S614; otherwise, execute step S616.

[0165] S614, restore the source site file and restore the regenerated name to the original name;

[0166] S616, delete the source file on the source site.

[0167] In this embodiment, after receiving the file list consisting of the files to be archived, the CDN starts to check the access records of these files in the first preset time period. For files that have not been accessed in the last 6 months (just an example), that is, the fifth group of files, the system will enter a more detailed access log analysis phase.

[0168] By querying the CDN request log, the system further selects the third subgroup files that have not been accessed in the past month. For these third subgroup files, the system will delete their corresponding source files from the source site to achieve optimal resource allocation. Through this process, the system can ensure that files that may still be accessed by users will not be accidentally deleted during archiving and cleaning operations, while effectively reducing the consumption of storage space and CDN bandwidth, achieving refined and intelligent resource management.

[0169] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0170] According to another aspect of the embodiment of the present application, there is also provided Figure 7 A file processing device as shown, the device comprising:

[0171] A first acquisition unit 702 is used to acquire first status information of the first video on the target video platform, wherein the first status information indicates whether the first video is online on the target video platform;

[0172] The first processing unit 704 is configured to determine, when the first status information indicates that the first video has been launched on the target video platform, a first group of files from a group of historical transcoded files based on the first video ID and the timestamp of the video file, wherein the group of historical transcoded files is files generated by transcoding when the first video is replaced within a historical period, and the group of historical transcoded files includes video files;

[0173] The second processing unit 706 is configured to determine the files to be archived by traversing the first group of files.

[0174] Optionally, the first processing unit 704 includes:

[0175] A first processing module is used to determine a second group of files in a published state from a group of historical transcoded files based on the first video ID and the timestamp of the video file when the first state information indicates that the first video is in an online state on the target video platform at the current moment;

[0176] A sorting module, used for sorting the second group of files based on a set of timestamps of each file in the second group of files to obtain a minimum timestamp;

[0177] A first screening module is used to screen out files with timestamps smaller than a minimum timestamp from a group of historical transcoded files to obtain a third group of files;

[0178] The second processing module is used to determine the first group of files from the third group of files.

[0179] Optionally, the second processing module includes:

[0180] A first processing submodule is used to determine a first cumulative transcoding time of each file in the third group of files, wherein the first cumulative transcoding time is the cumulative time from the time when each file is transcoded to the current moment;

[0181] A screening submodule, used to screen out a first subgroup of files whose first cumulative transcoding time is greater than a preset threshold from the third group of files;

[0182] The second processing submodule is used to determine the first subgroup files as the first group files.

[0183] Optionally, the first processing unit 704 includes:

[0184] A first acquisition module is used to acquire, based on the first video ID and the platform ID of the target video platform, a second accumulated transcoding time of each file in a set of historical transcoding files when the first status information indicates that the first video is offline on the target video platform at the current moment and was online in the historical time period;

[0185] A second screening module, used to screen out a second subgroup of files whose second accumulated transcoding time is greater than a preset threshold from a group of historical transcoding files;

[0186] The third processing module is used to determine the second subgroup files as the first group files.

[0187] Optionally, the second processing unit 708 includes:

[0188] A second acquisition module is used to sequentially acquire one file from the first group of files as the current file;

[0189] A query module, used for querying the second status information of the current file on the service side based on the file ID of the current file when the current file is not shared by the first video and the second video;

[0190] The fourth processing module is used to determine the current file as a file to be archived when the second status information indicates that the business side is currently using the current file.

[0191] Optionally, the above device further includes:

[0192] The recording unit is used to record the current file into the archive exception list when the current file is shared by the first video and the second video.

[0193] Optionally, the above device further includes:

[0194] A second acquisition unit is used to acquire a first timestamp and a first transcoded file ID of a first transcoded file obtained after performing a first transcoding on a target source file of the first video;

[0195] A third acquisition unit is used to acquire a second timestamp and a second transcoded file ID of a second transcoded file obtained after performing a second transcoding on the target source file, wherein the file ID of the second transcoded file is smaller than the file ID of the first transcoded file;

[0196] The third processing unit is configured to determine the first transcoded file as a file to be archived based on the first timestamp and the second timestamp, wherein the second time indicated by the second timestamp is later than the first time indicated by the first timestamp.

[0197] Optionally, the above device further includes:

[0198] A distribution unit, configured to distribute a file list including the files to be archived to a content distribution network after determining the files to be archived by traversing the first group of files;

[0199] a fourth processing unit, configured to determine, from the files to be archived, a fifth group of files that have not been accessed within a first preset time period;

[0200] The deleting unit is used to delete a group of source files corresponding to the third sub-group files for which no log request has been initiated within a second preset time period in the fifth group of files by querying the request log.

[0201] By applying the above device to the online status of the first video, the video ID and the timestamp of the video file, the first group of files is preliminarily screened out from the historical transcoded files, and then the first group of files is traversed to finally determine the files to be archived. In other words, by screening the historical transcoded files according to the usage status of the video and the file, and combining the timestamp of the transcoded file in the replacement process, and traversing the preliminarily screened first group of files, the files to be archived are determined, thus avoiding the technical problem of low accuracy caused by identifying the files to be archived only based on the file ID of the video file, ensuring that the online files are not deleted by mistake, and achieving the technical effect of improving the accuracy of the file archiving results.

[0202] It should be noted that the embodiments of the file processing device here can refer to the embodiments of the above-mentioned file processing method, which will not be repeated here.

[0203] According to another aspect of the embodiment of the present application, an electronic device for implementing the above-mentioned file processing method is also provided. The electronic device may be Figure 1 The target terminal or server shown in FIG. This embodiment is described by taking the electronic device as the target terminal as an example. Figure 8 As shown, the electronic device includes a memory 802 and a processor 804. The memory 802 stores a computer program, and the processor 804 is configured to execute the steps in any of the above method embodiments through the computer program.

[0204] Optionally, in this embodiment, the electronic device may be located in at least one network device among a plurality of network devices of a computer network.

[0205] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:

[0206] S1, obtaining first status information of a first video on a target video platform, wherein the first status information indicates whether the first video is online on the target video platform;

[0207] S2, when the first state information indicates that the first video has been launched on the target video platform, based on the first video ID and the timestamp of the video file, determining a first group of files from a group of historical transcoded files, wherein the group of historical transcoded files is files generated by transcoding when the first video is replaced within a historical period, and the group of historical transcoded files includes video files;

[0208] S3, determining the files to be archived by traversing the first group of files.

[0209] Alternatively, a person skilled in the art may understand that: Figure 8 The structure shown is for illustration only. Figure 8 The electronic device and the electronic equipment described above are not limited in structure. Figure 8 More or fewer components (such as network interfaces, etc.) as shown in, or with Figure 8 Different configurations are shown.

[0210] Among them, the memory 802 can be used to store software programs and modules, such as the program instructions / modules corresponding to the file processing method and device in the embodiments of the present application. The processor 804 executes various functional applications and data processing by running the software programs and modules stored in the memory 802, that is, implements the above-mentioned file processing method. The memory 802 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memories. In some instances, the memory 802 may further include a memory remotely disposed relative to the processor 804, and these remote memories can be connected to the terminal through a network. Examples of the above network include but are not limited to the Internet, enterprise intranet, local area network, mobile communication network, and combinations thereof. Among them, the memory 802 can specifically but not limitedly be used to store the first status information, the first video, and the first set of files, etc. As an example, as Figure 8 shown, the above-mentioned memory 802 may include but not limited to the first acquisition unit 702, the first processing unit 704, and the second processing unit 706 in the above-mentioned file processing device. In addition, it may also include but not limited to other module units in the above-mentioned file processing device, which will not be elaborated in this example.

[0211] Optionally, the above-mentioned transmission device 806 is used to receive or send data via a network. Specific examples of the above-mentioned network may include a wired network and a wireless network. In one instance, the transmission device 806 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices and routers through a network cable, thereby enabling communication with the Internet or a local area network. In one instance, the transmission device 806 is a radio frequency (Radio Frequency, RF) module, which is used to communicate with the Internet wirelessly.

[0212] In addition, the above-mentioned electronic device further includes: a display 808, which is used to display the above-mentioned first video and video pictures; and a connection bus 810, which is used to connect each module component in the above-mentioned electronic device.

[0213] In other embodiments, the above-mentioned target terminal or server can be a node in a distributed system. Among them, the distributed system can be a blockchain system, and the blockchain system can be a distributed system formed by connecting multiple nodes through network communication. Among them, the nodes can form a point-to-point network, and any form of computing device, such as an electronic device like a server or a target terminal, can become a node in the blockchain system by joining the point-to-point network.

[0214] According to another aspect of the present application, a computer program product or computer program is provided, the computer program product or computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the file processing method provided in various optional implementations of the above-mentioned server verification processing and other aspects, wherein the computer program is configured to execute the steps of any of the above-mentioned method embodiments when running.

[0215] Optionally, in this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:

[0216] S1, obtaining first status information of a first video on a target video platform, wherein the first status information indicates whether the first video is online on the target video platform;

[0217] S2, when the first state information indicates that the first video has been launched on the target video platform, based on the first video ID and the timestamp of the video file, determining a first group of files from a group of historical transcoded files, wherein the group of historical transcoded files is files generated by transcoding when the first video is replaced within a historical period, and the group of historical transcoded files includes video files;

[0218] S3, determining the files to be archived by traversing the first group of files.

[0219] Optionally, in the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program that has a predetermined function and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories), or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.

[0220] Optionally, in this embodiment, a person of ordinary skill in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by instructing hardware related to the target terminal through a program, and the program may be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc.

[0221] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0222] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling one or more computer devices (which can be personal computers, servers or network devices, etc.) to execute all or part of the steps of the methods of each embodiment of the present application.

[0223] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

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

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

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

[0227] The above are only preferred implementations of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A file processing method, characterized in that: include: Acquire first status information of a first video on a target video platform, wherein the first status information indicates whether the first video is online on the target video platform; In the case where the first status information indicates that the first video has been launched on the target video platform, based on the first video ID and the timestamp of the video file, determining a first group of files from a group of historical transcoded files, wherein the group of historical transcoded files is files generated by transcoding when the first video is replaced within a historical period, and the group of historical transcoded files includes the video file; By traversing the first group of files, the files to be archived are determined.

2. The method according to claim 1, characterized in that In a case where the first state information indicates that the first video has been launched on the target video platform, based on the first video ID and the timestamp of the first video file, determining a first group of files from a group of historical transcoded files includes: When the first status information indicates that the first video is in an online state on the target video platform at the current moment, based on the first video ID and the timestamp of the video file, determining a second group of files in a published state from the group of historical transcoded files; sorting the second group of files based on a set of timestamps of each file in the second group of files to obtain a minimum timestamp; Filter out files with timestamps smaller than the minimum timestamp from the group of historical transcoded files to obtain a third group of files; The first set of files is determined from the third set of files.

3. The method according to claim 2, characterized in that The step of determining the first group of files from the third group of files comprises: Determine a first accumulated transcoding time of each file in the third group of files, wherein the first accumulated transcoding time is the accumulated time from the time when each file is obtained by transcoding to the current moment; Filter out a first subgroup of files whose first accumulated transcoding time is greater than a preset threshold from the third group of files; The first subset of files is determined as the first group of files.

4. The method according to claim 1, characterized in that: In a case where the first state information indicates that the first video has been launched on the target video platform, based on the first video ID and the timestamp of the first video file, determining a first group of files from a group of historical transcoded files includes: When the first status information indicates that the first video is offline on the target video platform at the current moment and was online in a historical time period, obtaining a second accumulated transcoding time of each file in the set of historical transcoding files based on the first video ID and the platform ID of the target video platform; Filtering out, from the group of historical transcoding files, a second subgroup of files whose second accumulated transcoding time is greater than a preset threshold; The second subset of files is determined as the first set of files.

5. The method according to claim 1, characterized in that The step of determining the files to be archived by traversing the first group of files includes: Obtain one file from the first group of files in turn as the current file; In a case where the current file is not shared by the first video and the second video, querying second status information of the current file on the service side based on the file ID of the current file; When the second status information indicates that the business side is currently using the current file, the current file is determined as the file to be archived.

6. The method according to claim 5, characterized in that The method further comprises: In the case where the current file is shared by the first video and the second video, the current file is recorded in an archive exception list.

7. The method according to any one of claims 1 to 6, characterized in that The method further comprises: Obtaining a first timestamp and a first transcoded file ID of a first transcoded file obtained after performing a first transcoding on the target source file of the first video; Obtaining a second timestamp and a second transcoded file ID of a second transcoded file obtained after performing a second transcoding on the target source file, wherein the file ID of the second transcoded file is smaller than the file ID of the first transcoded file; The first transcoded file is determined as a file to be archived based on the first timestamp and the second timestamp, wherein a second time indicated by the second timestamp is later than a first time indicated by the first timestamp.

8. The method according to any one of claims 1 to 6, characterized in that After determining the files to be archived by traversing the first group of files, the method further includes: Distributing the file list containing the to-be-archived files to a content distribution network; Determining a fifth group of files that have not been accessed within a first preset time period from the files to be archived; By querying the request log, a group of source files corresponding to the third sub-group files for which no log request has been initiated within the second preset time period in the fifth group of files are deleted.

9. A file processing device, characterized in that: include: A first acquisition unit, configured to acquire first status information of a first video on a target video platform, wherein the first status information indicates whether the first video is online on the target video platform; A first processing unit is configured to determine, when the first status information indicates that the first video has been launched on the target video platform, a first group of files from a group of historical transcoded files based on the first video ID and the timestamp of the video file, wherein the group of historical transcoded files is files generated by transcoding when the first video is replaced within a historical period, and the group of historical transcoded files includes the video file; The second processing unit is used to determine the files to be archived by traversing the first group of files.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program can be executed by a terminal device or a computer to execute the method described in any one of claims 1 to 8.

11. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method described in any one of claims 1 to 8 are implemented.

12. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 8 through the computer program.

Citation Information

Cited By

  • Video physical resource deletion method and related device

    CN121743288A