A method, device, equipment and readable storage medium for determining a replacement file
By determining whether the initial and intermediate files of the video file are the same, the problem of server resource waste caused by the video platform to process duplicate files is solved, and the resource utilization rate is improved.
Patent Information
- Application Number
- CN202310186619.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-01
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2043-03-01
AI Technical Summary
Existing video platforms are prone to processing the same files when processing online video files, resulting in a large amount of server resources being wasted because video files issued by the media asset management system are sometimes duplicated.
By obtaining the identification information of the finished video file and the current video file, it is determined whether the corresponding initial file and intermediate file are the same. If it is different, it is determined as a replacement file, thereby avoiding the processing of non-replacement files. The specific method includes obtaining the hash value of the video file for comparison. If the hash value is different, it is judged that the file is different.
Accurate judgment of replacement files is achieved, avoiding the processing of non-replacement files by the video platform, thereby improving the utilization rate of server resources.
Smart Images

Figure CN116170615B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of video processing, and more specifically, to a method, device, equipment and readable storage medium for determining a replacement file. Background Art
[0002] Most existing video platforms have requirements for production analysis of online video files, such as video stripping, secondary creation, algorithm frame extraction, subtitle analysis, masking, etc. These requirements require a large amount of server resources to support them, and video platforms usually obtain online video files through media asset management systems.
[0003] However, the online video files sent by the media asset management system to the video platform may be duplicated, that is, the media asset management system will send the same multiple online video files to the video platform at different time periods. If the video platform directly processes each received online video file for production analysis and other needs, it will inevitably process the same online video files, resulting in a large amount of server resources of the video platform being wasted. Summary of the invention
[0004] The embodiments of the present application provide a method, device, equipment and readable storage medium for determining a replacement file, which can accurately determine whether a finished video file is a replacement file, thereby avoiding the video platform from processing the demand for non-replacement files, thereby improving the video platform's utilization of server resources.
[0005] In view of this, an embodiment of the present application provides a method for determining a replacement file, including:
[0006] Obtaining a finished video file and a current video file, wherein the current video file is the video file to be replaced;
[0007] Acquire a first initial file and a first intermediate file corresponding to the finished video file according to the identification information of the finished video file;
[0008] Acquire a second initial file and a second intermediate file corresponding to the current video file according to the identification information of the current video file;
[0009] Determining whether the first initial file and the second initial file are the same;
[0010] If the first initial file and the second initial file are different, determining that the finished video file is a substitute file;
[0011] If the first initial file is the same as the second initial file, determining whether the first intermediate file is the same as the second intermediate file;
[0012] If the first intermediate file is different from the second intermediate file, the finished video file is determined to be a substitute file.
[0013] Optionally, the determining whether the first initial file and the second initial file are the same includes:
[0014] Obtaining a hash value of the first initial file and a hash value of the second initial file;
[0015] Determining whether the hash value of the first initial file is the same as the hash value of the second initial file;
[0016] If the hash value of the first initial file is the same as the hash value of the second initial file, determining that the first initial file is the same as the second initial file;
[0017] If the hash value of the first initial file is different from the hash value of the second initial file, it is determined that the first initial file is different from the second initial file.
[0018] Optionally, the determining whether the first intermediate file is identical to the second intermediate file includes:
[0019] Obtaining a hash value of the first intermediate file and a hash value of a first source file, where the first source file is a file required to generate the first intermediate file;
[0020] Obtaining a hash value of the second intermediate file and a hash value of a second source file, where the second source file is a file required to generate the second intermediate file;
[0021] Determining whether the hash value of the first intermediate file is the same as the hash value of the second intermediate file;
[0022] If the hash value of the first intermediate file is different from the hash value of the second intermediate file, determining that the first intermediate file is different from the second intermediate file;
[0023] If the hash value of the first intermediate file is the same as the hash value of the second intermediate file, determining whether the hash value of the first source file is the same as the hash value of the second source file;
[0024] If the hash value of the first material file is the same as the hash value of the second material file, determining that the first intermediate file is the same as the second intermediate file;
[0025] If the hash value of the first material file is different from the hash value of the second material file, it is determined that the first intermediate file is different from the second intermediate file.
[0026] Optionally, before obtaining the finished video file and the current video file, the method further includes:
[0027] receiving the first initial file;
[0028] Processing the first initial file according to the first source file to obtain the first intermediate file;
[0029] Transcoding the first intermediate file according to the transcoding task to obtain the finished video file;
[0030] The corresponding relationship between the identification information of the finished video file and the first initial file and the first material file is stored.
[0031] Optionally, the method further comprises:
[0032] Performing a hash operation on the first initial file to obtain a hash value of the first initial file;
[0033] Performing a hash operation on the first intermediate file to obtain a hash value of the first intermediate file;
[0034] A hash operation is performed on the first material file to obtain a hash value of the first material file.
[0035] Optionally, after determining that the finished video file is a substitute file, the method further includes:
[0036] Generate a replacement film message;
[0037] The replacement film message is returned to the user, where the replacement film message is used to prompt that the finished video file is a replacement film file.
[0038] The embodiment of the present application also provides a device for determining a replacement file, including:
[0039] An acquisition unit, used to acquire a finished video file and a current video file, wherein the current video file is a video file to be replaced;
[0040] The acquisition unit is further used to acquire a first initial file and a first intermediate file corresponding to the finished video file according to the identification information of the finished video file;
[0041] The acquisition unit is further configured to acquire a second initial file and a second intermediate file corresponding to the current video file according to the identification information of the current video file;
[0042] A judging unit, configured to judge whether the first initial file and the second initial file are the same;
[0043] a determining unit, configured to determine that the finished video file is a substitute file if the first initial file and the second initial file are different;
[0044] The judging unit is further configured to judge whether the first intermediate file is the same as the second intermediate file if the first initial file is the same as the second initial file;
[0045] The determining unit is further configured to determine that the finished video file is a substitute file if the first intermediate file is different from the second intermediate file.
[0046] Optionally, the judging unit is specifically configured to:
[0047] Obtaining a hash value of the first initial file and a hash value of the second initial file;
[0048] Determining whether the hash value of the first initial file is the same as the hash value of the second initial file;
[0049] If the hash value of the first initial file is the same as the hash value of the second initial file, determining that the first initial file is the same as the second initial file;
[0050] If the hash value of the first initial file is different from the hash value of the second initial file, it is determined that the first initial file is different from the second initial file.
[0051] The embodiment of the present application also provides a computer device, including: a memory, a processor, and a bus system;
[0052] Wherein, the memory is used to store programs;
[0053] The processor is used to execute the program in the memory to implement any one of the above-mentioned methods for determining the replacement file;
[0054] The bus system is used to connect the memory and the processor so that the memory and the processor can communicate with each other.
[0055] The embodiment of the present application further provides a computer-readable storage medium storing instructions, which, when executed on a computer, enables the computer to execute any one of the above-described methods for determining a replacement film file.
[0056] The embodiment of the present application provides a method for determining a replacement file, including: obtaining a finished video file and a current video file, wherein the current video file is a video file to be replaced; obtaining a first initial file and a first intermediate file corresponding to the finished video file according to the identification information of the finished video file; obtaining a second initial file and a second intermediate file corresponding to the current video file according to the identification information of the current video file; determining whether the first initial file and the second initial file are the same; if the first initial file and the second initial file are different, determining that the finished video file is a replacement file; if the first initial file and the second initial file are the same, determining whether the first intermediate file and the second intermediate file are the same; if the first intermediate file and the second intermediate file are different, determining that the finished video file is a replacement file. It can be seen that the present application can accurately determine whether the finished video file is a replacement file by respectively determining whether the first initial file and the first intermediate file corresponding to the finished video file and the second initial file and the second intermediate file corresponding to the current video file are the same, thereby avoiding the video platform from processing the demand for non-replacement files, thereby improving the utilization rate of the video platform for server resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0058] Figure 1 A flowchart of a method for determining a replacement file provided in an embodiment of the present application;
[0059] Figure 2 A schematic diagram of a production process of a finished video file provided in an embodiment of the present application;
[0060] Figure 3 A schematic diagram of a process of inserting a pressure screen in an embodiment of the present application;
[0061] Figure 4 A schematic diagram of the structure of a device for determining a replacement file provided in an embodiment of the present application. DETAILED DESCRIPTION
[0062] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0063] The terms "first", "second", "third", "fourth", etc. (if any) 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 described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes 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.
[0064] First of all, it should be understood that when the finished video file for replacement is different from the current video file to be replaced, the finished video file can be called a replacement file, and the replacement process can be called a video replacement.
[0065] Most existing video platforms have requirements for production analysis of online video files, such as video stripping, secondary creation, algorithm frame extraction, subtitle analysis, masking, etc. These requirements require a large amount of server resources to support them, and video platforms usually obtain online video files through media asset management systems.
[0066] However, the online video files sent by the media asset management system to the video platform may be duplicated, that is, the media asset management system will send the same multiple online video files to the video platform at different time periods. If the video platform directly processes each received online video file for production analysis and other needs, it will inevitably process the same online video files, resulting in a large amount of server resources of the video platform being wasted.
[0067] Therefore, in response to the above problems, the embodiments of the present application provide a method, device, equipment and readable storage medium for determining a replacement file, which can accurately determine whether a finished video file is a replacement file, thereby avoiding the video platform's demand processing for non-replacement files, thereby improving the video platform's utilization of server resources.
[0068] See also Figure 1A method for determining a replacement file provided in an embodiment of the present application includes the following steps.
[0069] S101, obtaining a finished video file and a current video file.
[0070] In this embodiment, the finished video file and the current video file that need to be judged as a replacement file can be obtained first, wherein the current video file is the video file to be replaced. It can be understood that after the media asset management system obtains the finished video file according to the first initial file and the first intermediate file, it will send the finished video file to the video platform, and the video platform will replace the current video file with the finished video file, thereby completing the video file update process, so that the latest video file can be processed by production analysis and other needs. The current video file can be a video file that is sent to the video platform by the media asset management system before the finished video file is generated, and has the same subject or name as the finished video file. Specifically, the pre-stored backup finished video file and the current video file can be obtained from the media asset management system, or the finished video file and the current video file can be obtained from the video platform.
[0071] In a possible implementation, before obtaining the finished video file and the current video file, a first initial file may be received; the first initial file may be processed according to the first source file to obtain a first intermediate file; the first intermediate file may be transcoded according to the transcoding task to obtain the finished video file; and the corresponding relationship between the identification information of the finished video file and the first initial file and the first source file may be stored. It is understandable that, if Figure 2 As shown, after receiving the first initial file sent by the upload client, the first source file to be inserted into the first initial file can be obtained, and then the first initial file is processed by the first source file such as the middle insertion and screen compression to obtain the first intermediate file. Figure 3 . After obtaining the first intermediate file, it is necessary to transcode the first intermediate file according to the transcoding tasks sent by different video platforms, that is, the transcoding requirements, to obtain the finished video file required by the video platform, wherein the finished video file may include multiple video files with different definition, such as standard definition, high definition, Blu-ray, etc. Then, the correspondence between the identification information of the finished video file and the first initial file can be stored, as well as the correspondence between the identification information of the finished video file and the first intermediate file. Finally, the generated finished video file is sent to the video platform according to the request of the video platform. In addition, when transcoding the first intermediate file, the material batch number can also be recorded on the transcoding task, indicating that the transcoding tasks of different platforms belong to the same batch. At the same time, a file sequence will be generated, indicating that the files generated by this task are from the same batch. At the same time, an audit work order will be generated in the process, and the task id will be recorded in the work order.
[0072] In a possible implementation, a hash operation can be performed on the first initial file to obtain a hash value of the first file; a hash operation can be performed on the first intermediate file to obtain a hash value of the first intermediate file; and a hash operation can be performed on the first material file to obtain a hash value of the first material file. It can be understood that in the process of generating a finished video file, hash operations can be performed on the first initial file, the first intermediate file, and the first material file respectively to obtain a hash value of the first initial file, a hash value of the first intermediate file, and a hash value of the first material file, and the records are stored so as to be used later to accurately determine whether the finished video file is a substitute file. The hash value of the first material file can include a hash value of a starting point, a hash value of an end point, and a hash value of the material.
[0073] S102, acquiring a first initial file and a first intermediate file corresponding to the finished video file according to the identification information of the finished video file; acquiring a second initial file and a second intermediate file corresponding to the current video file according to the identification information of the current video file.
[0074] In this embodiment, after obtaining the finished video file and the current video file, the first initial file and the first intermediate file corresponding to the finished video file, and the second initial file and the second intermediate file corresponding to the current video file can be obtained according to the identification information of the finished video file and the identification information of the current video file. It can be understood that both the finished video file and the current video file contain identification information that uniquely identifies themselves, and the first initial file, the first intermediate file, the second initial file, and the second intermediate file can be obtained according to the identification information of the finished video file, the identification information of the current video file, and the corresponding relationship stored in the media resource management system. The first initial file and the first intermediate file are used to generate the finished video file; the second initial file and the second intermediate file are used to generate the current video file.
[0075] S103: Determine whether the first initial file and the second initial file are the same.
[0076] In this embodiment, after obtaining the first initial file and the second initial file, it can be determined whether the first initial file and the second initial file are the same. It can be understood that since the first initial file is used to generate the finished video file and the second initial file is used to generate the current video file, it is possible to determine whether the finished video file and the current video file are the same by determining whether the first initial file and the second initial file are the same, that is, it can be determined whether the finished video file is a substitute file.
[0077] In a possible implementation, the hash value of the first initial file and the hash value of the second initial file can be obtained; it is determined whether the hash value of the first initial file and the hash value of the second initial file are the same; if the hash value of the first initial file and the hash value of the second initial file are the same, it is determined that the first initial file and the second initial file are the same; if the hash value of the first initial file and the hash value of the second initial file are different, it is determined that the first initial file and the second initial file are different. It can be understood that whether the first initial file and the second initial file are the same can be determined by judging whether the hash value of the first initial file and the hash value of the second initial file are the same. In addition, the first initial file and the second initial file can be temporarily hashed to obtain the hash value of the first initial file and the hash value of the second initial file; the pre-stored hash value of the first initial file and the hash value of the second initial file can also be directly obtained.
[0078] S104: If the first initial file and the second initial file are different, determine that the finished video file is a substitute file.
[0079] In this embodiment, if the first initial file and the second initial file are different, it means that the generated finished video file and the current video file are different. In this case, the finished video file can be directly determined as a substitute file.
[0080] S105: If the first initial file is the same as the second initial file, determine whether the first intermediate file is the same as the second intermediate file.
[0081] In this embodiment, if the first initial file and the second initial file are the same, it is possible to continue to determine whether the first intermediate file and the second intermediate file are the same. It is understandable that in order to accurately determine whether the finished video file is a replacement file, when it is determined that the first initial file and the second initial file are the same, it is possible to continue to determine whether the first intermediate file and the second intermediate file are the same.
[0082] In a possible implementation, a hash value of a first intermediate file and a hash value of a first source file are obtained, the first source file being a file required to generate the first intermediate file; a hash value of a second intermediate file and a hash value of a second source file are obtained, the second source file being a file required to generate the second intermediate file; it is determined whether the hash value of the first intermediate file and the hash value of the second intermediate file are the same; if the hash value of the first intermediate file and the hash value of the second intermediate file are different, it is determined that the first intermediate file and the second intermediate file are different; if the hash value of the first intermediate file and the hash value of the second intermediate file are the same, it is determined whether the hash value of the first source file and the hash value of the second source file are the same; if the hash value of the first source file and the hash value of the second source file are the same, it is determined that the first intermediate file and the second intermediate file are the same; if the hash value of the first source file and the hash value of the second source file are different, it is determined that the first intermediate file and the second intermediate file are different. It can be understood that the hash values of the first intermediate file, the first material file, the second intermediate file, and the second material file can be obtained respectively, and by judging whether the hash value of the first intermediate file is the same as the hash value of the second intermediate file, and judging whether the hash value of the first material file is the same as the hash value of the second material file, it is judged whether the first intermediate file and the second intermediate file are the same, and then it is accurately judged whether the finished video file is a substitute file.
[0083] S106: If the first intermediate file is different from the second intermediate file, determine that the finished video file is a substitute file.
[0084] In this embodiment, if the first intermediate file and the second intermediate file are different, it can be determined that the finished video file is a replacement file. It can be understood that if the first initial file and the second initial file are the same, and the first intermediate file and the second intermediate file are different, it can be determined that the final generated finished video file and the current video file are different, that is, the finished video file is a replacement file relative to the current video file that needs to be replaced. If the first initial file and the second initial file are the same, and the first intermediate file and the second intermediate file are also the same, it can be determined that the final generated finished video file and the current video file are the same, that is, the finished video file is not a replacement file.
[0085] In a possible implementation, after determining that the finished video file is a replacement file, a replacement message can be generated; the replacement message is returned to the user, wherein the replacement message is used to prompt the finished video file to be a replacement file. It is understandable that after determining that the finished video file is a replacement file, a replacement message can be generated and sent to the video platform to remind the video platform to avoid the video platform from processing the demand for non-replacement files, thereby improving the video platform's utilization of server resources.
[0086] It can be seen that a method for determining a replacement file is provided in an embodiment of the application. By respectively determining whether the first initial file and the first intermediate file corresponding to the finished video file and the second initial file and the second intermediate file corresponding to the current video file are the same, it is possible to accurately determine whether the finished video file is a replacement file, thereby avoiding the video platform from requiring processing of non-replacement files, thereby improving the utilization rate of server resources by the video platform.
[0087] See also Figure 4 The embodiment of the present application also provides a device for determining a replacement file, including:
[0088] An acquisition unit 401 is used to acquire a finished video file and a current video file, where the current video file is a video file to be replaced;
[0089] The acquisition unit 401 is further configured to acquire a first initial file and a first intermediate file corresponding to the finished video file according to the identification information of the finished video file;
[0090] The acquisition unit 401 is further configured to acquire a second initial file and a second intermediate file corresponding to the current video file according to the identification information of the current video file;
[0091] A judging unit 402 is used to judge whether the first initial file and the second initial file are the same;
[0092] A determination unit 403, configured to determine that the finished video file is a replacement file if the first initial file and the second initial file are different;
[0093] The judging unit 402 is further configured to judge whether the first intermediate file is the same as the second intermediate file if the first initial file is the same as the second initial file;
[0094] The determining unit 403 is further configured to determine that the finished video file is a substitute file if the first intermediate file is different from the second intermediate file.
[0095] Optionally, the determining unit 402 is specifically configured to:
[0096] Obtaining a hash value of the first initial file and a hash value of the second initial file;
[0097] Determining whether the hash value of the first initial file is the same as the hash value of the second initial file;
[0098] If the hash value of the first initial file is the same as the hash value of the second initial file, determining that the first initial file is the same as the second initial file;
[0099] If the hash value of the first initial file is different from the hash value of the second initial file, it is determined that the first initial file is different from the second initial file.
[0100] Optionally, the determining unit 402 is specifically configured to:
[0101] Obtaining a hash value of the first intermediate file and a hash value of a first source file, where the first source file is a file required to generate the first intermediate file;
[0102] Obtaining a hash value of the second intermediate file and a hash value of a second source file, where the second source file is a file required to generate the second intermediate file;
[0103] Determining whether the hash value of the first intermediate file is the same as the hash value of the second intermediate file;
[0104] If the hash value of the first intermediate file is different from the hash value of the second intermediate file, determining that the first intermediate file is different from the second intermediate file;
[0105] If the hash value of the first intermediate file is the same as the hash value of the second intermediate file, determining whether the hash value of the first source file is the same as the hash value of the second source file;
[0106] If the hash value of the first material file is the same as the hash value of the second material file, determining that the first intermediate file is the same as the second intermediate file;
[0107] If the hash value of the first material file is different from the hash value of the second material file, it is determined that the first intermediate file is different from the second intermediate file.
[0108] Optionally, the device further comprises:
[0109] A receiving unit, configured to receive the first initial file;
[0110] A processing unit, configured to process the first initial file according to the first source file to obtain the first intermediate file;
[0111] A transcoding unit, configured to transcode the first intermediate file according to the transcoding task to obtain the finished video file;
[0112] The storage unit is used to store the corresponding relationship between the identification information of the finished video file and the first initial file and the first material file.
[0113] Optionally, the device further comprises:
[0114] The hash operation unit is used to perform a hash operation on the first initial file to obtain a hash value of the first initial file; perform a hash operation on the first intermediate file to obtain a hash value of the first intermediate file; and perform a hash operation on the first source file to obtain a hash value of the first source file.
[0115] Optionally, the device further comprises:
[0116] A generating unit, used for generating a replacement message;
[0117] The returning unit is used to return the replacement image message to the user, wherein the replacement image message is used to prompt that the finished video file is a replacement image file.
[0118] The embodiment of the present application also provides a computer device, including: a memory, a processor, and a bus system;
[0119] Wherein, the memory is used to store programs;
[0120] The processor is used to execute the program in the memory to implement any one of the above-mentioned methods for determining the replacement file;
[0121] The bus system is used to connect the memory and the processor so that the memory and the processor can communicate with each other.
[0122] The embodiment of the present application further provides a computer-readable storage medium storing instructions, which, when executed on a computer, enables the computer to execute any one of the above-described methods for determining a replacement file.
[0123] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0124] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for determining a replacement file, characterized in that: The method comprises: Obtaining a finished video file and a current video file, wherein the current video file is the video file to be replaced; Acquire a first initial file and a first intermediate file corresponding to the finished video file according to the identification information of the finished video file; Acquire a second initial file and a second intermediate file corresponding to the current video file according to the identification information of the current video file; Determining whether the first initial file and the second initial file are the same; If the first initial file and the second initial file are different, determining that the finished video file is a substitute file; If the first initial file is the same as the second initial file, determining whether the first intermediate file is the same as the second intermediate file; If the first intermediate file is different from the second intermediate file, the finished video file is determined to be a substitute file.
2. The method according to claim 1, characterized in that The determining whether the first initial file and the second initial file are the same includes: Obtaining a hash value of the first initial file and a hash value of the second initial file; Determining whether the hash value of the first initial file is the same as the hash value of the second initial file; If the hash value of the first initial file is the same as the hash value of the second initial file, determining that the first initial file is the same as the second initial file; If the hash value of the first initial file is different from the hash value of the second initial file, it is determined that the first initial file is different from the second initial file.
3. The method according to claim 1, characterized in that The determining whether the first intermediate file is identical to the second intermediate file includes: Obtaining a hash value of the first intermediate file and a hash value of a first source file, where the first source file is a file required to generate the first intermediate file; Obtaining a hash value of the second intermediate file and a hash value of a second source file, where the second source file is a file required to generate the second intermediate file; Determining whether the hash value of the first intermediate file is the same as the hash value of the second intermediate file; If the hash value of the first intermediate file is different from the hash value of the second intermediate file, determining that the first intermediate file is different from the second intermediate file; If the hash value of the first intermediate file is the same as the hash value of the second intermediate file, determining whether the hash value of the first source file is the same as the hash value of the second source file; If the hash value of the first material file is the same as the hash value of the second material file, determining that the first intermediate file is the same as the second intermediate file; If the hash value of the first material file is different from the hash value of the second material file, it is determined that the first intermediate file is different from the second intermediate file.
4. The method according to claim 1, characterized in that: Before obtaining the finished video file and the current video file, the method further includes: receiving the first initial file; Processing the first initial file according to the first source file to obtain the first intermediate file; Transcoding the first intermediate file according to the transcoding task to obtain the finished video file; The corresponding relationship between the identification information of the finished video file and the first initial file and the first material file is stored.
5. The method according to claim 4, characterized in that The method further comprises: Performing a hash operation on the first initial file to obtain a hash value of the first initial file; Performing a hash operation on the first intermediate file to obtain a hash value of the first intermediate file; A hash operation is performed on the first material file to obtain a hash value of the first material file.
6. The method according to claim 1, characterized in that After determining that the finished video file is a substitute file, the method further includes: Generate a replacement film message; The replacement film message is returned to the user, where the replacement film message is used to prompt that the finished video file is a replacement film file.
7. A device for determining a replacement file, characterized in that: The device comprises: An acquisition unit, used to acquire a finished video file and a current video file, wherein the current video file is a video file to be replaced; The acquisition unit is further used to acquire a first initial file and a first intermediate file corresponding to the finished video file according to the identification information of the finished video file; The acquisition unit is further used to acquire a second initial file and a second intermediate file corresponding to the current video file according to the identification information of the current video file; A judging unit, configured to judge whether the first initial file and the second initial file are the same; a determining unit, configured to determine that the finished video file is a substitute file if the first initial file and the second initial file are different; The judging unit is further configured to judge whether the first intermediate file is the same as the second intermediate file if the first initial file is the same as the second initial file; The determining unit is further configured to determine that the finished video file is a substitute file if the first intermediate file is different from the second intermediate file.
8. The device according to claim 7, characterized in that The judging unit is specifically used for: Obtaining a hash value of the first initial file and a hash value of the second initial file; Determining whether the hash value of the first initial file is the same as the hash value of the second initial file; If the hash value of the first initial file is the same as the hash value of the second initial file, determining that the first initial file is the same as the second initial file; If the hash value of the first initial file is different from the hash value of the second initial file, it is determined that the first initial file is different from the second initial file.
9. A computer device, characterized in that: include: Memory, processor, and bus system; Wherein, the memory is used to store programs; The processor is used to execute the program in the memory to implement the method according to any one of claims 1 to 6; The bus system is used to connect the memory and the processor so that the memory and the processor can communicate with each other.
10. A computer-readable storage medium, characterized in that: The device stores instructions which, when executed on a computer, cause the computer to execute the method according to any one of claims 1 to 6.
