Method and system for storing video file
By uploading video conference recording files to object storage, the problem that local file storage capacity limit cannot meet the massive video storage needs is solved, and the efficiency and scalability of video storage is achieved.
Patent Information
- Application Number
- CN202510541634.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-27
- Publication Date
- 2025-06-13
AI Technical Summary
In the prior art, local file storage capacity limitations cannot meet the massive demands of video conference recording storage.
The video conference is recorded and broadcasted through the recording and broadcasting service, and the resulting video files are written to the file storage, and the video files in the file storage are uploaded to the object storage through the object storage operation service. When the total upload time is less than the first time threshold, wait for the target retention time and delete the video file in the file storage; when the total upload time is greater than or equal to the first time threshold, directly delete the video file in the file storage.
The massive storage space of object storage meets the needs of video storage, and the file storage space is cleaned in a timely manner, solving the problem of local file storage capacity limitation.
Smart Images

Figure CN120151469A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of communications, and more particularly, to a method and system for storing video recording files. Background Art
[0002] A video conferencing system includes various participating devices such as a Multipoint Control Unit (MCU), software and hardware terminals, and a recording and broadcasting server. The terminal captures images and sounds, encodes them, and sends them to the MCU. The MCU then fuses or does not fuse the images sent by multiple terminals according to the meeting requirements, and sends the mixed or unmixed sounds to each participating terminal, thereby realizing audio and video calls for multiple participants.
[0003] In some video conferencing application fields, basically the content of each meeting needs to be recorded and saved as evidence for a certain period of time for subsequent verification. With the continuous popularization of video conferencing applications, the amount of meeting video data to be stored is increasing, which greatly increases the demand for video storage.
[0004] In response to the above problems, there is currently no effective solution. Summary of the Invention
[0005] Embodiments of the present invention provide a method and system for storing video recording files to at least solve the problem in the related art that the local file storage capacity limit cannot meet the huge demand for video storage.
[0006] According to an embodiment of the present invention, a method for storing video recording files is provided, including: writing the video recording obtained by recording and broadcasting a video conference through a recording and broadcasting service into a file storage to obtain a video recording file; uploading the video recording file in the file storage to an object storage through an object storage operation service; in the case where the total upload duration is less than a first duration threshold, the object storage operation service waits for a target retention duration and then deletes the video recording file in the file storage, where the total upload duration is the duration between the time when the upload task of the video recording file is submitted and the time when the upload is completed; in the case where the total upload duration is greater than or equal to the first duration threshold, deleting the video recording file in the file storage through the object storage operation service.
[0007] In an exemplary embodiment, the method further includes: determining the difference between the first duration threshold and the total upload duration; in the case where the difference is greater than zero, determining the difference as the target retention duration.
[0008] In an exemplary embodiment, writing the video recorded by the recording service for the video conference into a file storage includes: after the recording service finishes recording the video conference, generating a main video file in the main format through the recording service; writing the video recorded by the recording service for the video conference into the file storage to obtain a backup video file; wherein, the video file includes the main video file and the backup video file.
[0009] In an exemplary embodiment, the method further includes: in response to an end instruction, determining the recording end moment through a recording fusion task; the recording fusion task waits for a second duration threshold from the recording end moment, and obtains the file information of the main video file, wherein the recording service generates the main video file within the second duration threshold, and the second duration threshold is less than the first duration threshold; generating a video record of the video conference by the recording fusion task based on the file information.
[0010] In an exemplary embodiment, after writing the video recorded by the recording service for the video conference into the file storage to obtain a backup video file, the method includes: determining the file information of the video file and the submission moment of the upload task through an upload task; when the time difference between the current system moment and the submission moment of the upload task is less than a third duration threshold, and the file information carried in the upload task is the backup video file, the object storage operation service waits for the third duration threshold, wherein the backup video file in the file storage is deleted by the recording fusion task within the third duration threshold, and the third duration threshold is greater than the first duration threshold; after the object storage operation service waits for the third duration threshold, if the backup video file still exists in the file storage, the object storage operation service uploads the backup video file.
[0011] In an exemplary embodiment, uploading the video file in the file storage to an object storage through an object storage operation service includes: uploading the main video file in the file storage to the object storage through the object storage operation service; deleting the video file in the file storage through the object storage operation service includes: deleting the main video file in the file storage through the object storage operation service.
[0012] In an exemplary embodiment, after uploading the video file in the file storage to the object storage through the object storage operation service, the method further includes: creating a hidden directory, wherein the key value of the video file to be deleted is recorded in the hidden directory; based on the key value, deleting the video file corresponding to the key value in the object storage; deleting the key value in the hidden directory.
[0013] According to another embodiment of the present invention, a video conference recording and broadcasting system is provided, including: a recording and broadcasting service for writing the video recorded by the video conference into a file storage to obtain a video file; an object storage operation service for uploading the video file in the file storage to an object storage; and deleting the video file in the file storage after waiting for a target retention duration when the total upload duration is less than a first duration threshold, where the total upload duration is the duration between the submission time and the completion time of the upload task of the video file; and deleting the video file in the file storage when the total upload duration is greater than or equal to the first duration threshold.
[0014] According to still another embodiment of the present invention, a computer-readable storage medium is further provided, in which a computer program is stored, and when the computer program is executed by a processor, the steps of the method described in any one of the above are implemented.
[0015] According to still another embodiment of the present invention, an electronic device is further provided, including a memory and a processor, where a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0016] According to still another embodiment of the present invention, a computer program product is further provided, including a computer program, and when the computer program is executed by a processor, the steps of the method described in any one of the above are implemented.
[0017] Through the present invention, the video recorded by the video conference is written into a file storage by the recording and broadcasting service to obtain a video file; and the video file in the file storage is uploaded to an object storage by the object storage operation service. Since the object storage has a large storage space, it can meet the needs of video storage. Therefore, the problem that the local file storage capacity limit cannot meet the huge demand for video storage can be solved.
[0018] Moreover, when the total upload duration is less than the first duration threshold, after the target retention duration ends, the video file in the file storage is deleted by the object storage operation service, and the total upload duration is the duration between the submission time and the completion time of the upload task of the video file; when the total upload duration is greater than or equal to the first duration threshold, the video file in the file storage is deleted by the object storage operation service. In this way, the space of the file storage can be cleaned up in time, and then the effect of meeting the needs of video storage can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 is a hardware structure block diagram of a mobile terminal for a method of storing video files according to an embodiment of the present invention;
[0020] Figure 2 is a flowchart of a method for storing video recording files according to an embodiment of the present invention;
[0021] Figure 3 is a schematic structural diagram of a video conferencing recording and broadcasting system according to an embodiment of the present invention. Detailed implementation manners
[0022] Embodiments of the present invention will be described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
[0023] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily need to be used to describe a specific order or sequence.
[0024] The method embodiments provided in the embodiments of the present application can be executed on a mobile terminal, a computer terminal, or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 is a hardware structure block diagram of a mobile terminal of a method for storing video recording files according to an embodiment of the present invention. As Figure 1 shown, the mobile terminal may include one or more ( Figure 1 only one is shown in Figure 1 a processor 102 (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. Among them, the above-mentioned mobile terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those of ordinary skill in the art can understand that Figure 1 the structure shown in Figure 1 is only schematic and does not limit the structure of the above-mentioned mobile terminal. For example, the mobile terminal may further include more or fewer components than
[0025] shown in
[0026] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0027] In this embodiment, a method for storing video files running on the mobile terminal is provided. Figure 2 is a flow chart of a method for storing video files according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:
[0028] Step S202, recording and broadcasting the video conference through the recording and broadcasting service, and writing the video recording into a file storage to obtain a video recording file;
[0029] The video file includes a main video file and a backup video file. The main video file may be an MP4 file, and the backup video file may be a DAV file. The backup video file can play a backup role in case the main file is damaged.
[0030] Specifically, after the recording and broadcasting service finishes recording and broadcasting the video conference, a main video file in a main format is generated by the recording and broadcasting service; the video obtained by recording and broadcasting the video conference by the recording and broadcasting service is written into the file storage to obtain a backup video file.
[0031] Step S204, uploading the video file in the file storage to the object storage through the object storage operation service;
[0032] The above-mentioned object storage is also called cloud storage. The object storage operation service has the advantages of ultra-low price, ultra-large capacity, high availability and high reliability, which can meet the large-capacity requirements of video storage.
[0033] Step S206, when the total upload duration is less than the first duration threshold, after the target retention duration ends, the video file in the file storage is deleted through the object storage operation service, wherein the total upload duration is the duration between the upload task submission time of the video file and the upload completion time;
[0034] Start the Linux file system event monitoring interface (such as inotify) to listen for close_write events in the target directory, scan the video files in the target directory, generate upload tasks with the paths of the video files (including the paths of the main video file and / or the backup video file), the submission time of the upload task (timestamp submitTS), and the PUT operation function, and submit the upload tasks to the task queue (for example, OosOpsQueue).
[0035] Set the operation concurrency of the upload task according to the configuration parameters, for example, 3 concurrencies, start the corresponding process pool to execute the upload tasks, and listen to the task queue OosOpsQueue in parallel; implement the first-in, first-out task queue OosOpsQueue;
[0036] Since the recording and live broadcast fusion task needs to generate a recording of the video conference based on the file information of the video files in the file storage (such as the file size of the video files). If the object storage operation service deletes the video files immediately after uploading them to the object storage, the recording and live broadcast fusion task may not be able to obtain the file information, and thus may not be able to generate a recording of the video conference. Therefore, a waiting duration (target retention duration) needs to be set so that after the recording and live broadcast fusion task generates the recording, the object storage operation service deletes the video files in the file storage.
[0037] The above first duration threshold is B milliseconds (the actual value of B can be determined according to the actual situation, for example, a common value of B is 3000 milliseconds). Specifically, the calculation method of the above target retention duration is as follows:
[0038] Determine the difference between the first duration threshold and the total upload duration; in the case where the difference is greater than zero, determine the difference as the target retention duration.
[0039] The formula is as follows:
[0040] First duration threshold (B milliseconds) - total upload duration = target retention duration (remained). If remained is greater than 0, after the object storage operation service uploads the video file, it waits for the target retention duration (remained) and then deletes the video file in the file storage, so that the recording and live broadcast fusion task can generate a recording.
[0041] Total upload duration = upload completion time uploadedTS - upload task submission time submitTS;
[0042] Step S208, in the case where the total upload duration is greater than or equal to the first duration threshold, delete the video file in the file storage through the object storage operation service.
[0043] In the above embodiments, if the remained is less than or equal to 0, it indicates that the recording integration task has generated a video recording within the total upload duration, and the object storage operation service can directly delete the video file in the file storage.
[0044] Optionally, the execution subject of the above steps may be a background processor, or other devices with similar processing capabilities, or may also be a machine integrated with at least an image acquisition device and a data processing device. Among them, the image acquisition device may include a graphic acquisition module such as a camera, and the data processing device may include terminals such as a computer and a mobile phone, but is not limited thereto.
[0045] Through the above steps, the video recording obtained by the recording service for the video conference is written into the file storage to obtain a video file; the video file in the file storage is uploaded to the object storage through the object storage operation service. Since the storage space of the object storage is large, it can meet the requirements of video recording storage. Therefore, the problem that the local file storage capacity limit cannot meet the huge demand of video recording storage can be solved.
[0046] Moreover, in the case where the total upload duration is less than the first duration threshold, after the target retention duration ends, the object storage operation service deletes the video file in the file storage. The total upload duration is the duration between the time when the upload task of the video file is submitted and the time when the upload is completed; in the case where the total upload duration is greater than or equal to the first duration threshold, the object storage operation service deletes the video file in the file storage. This can timely clean up the space of the file storage, and then achieve the effect of meeting the requirements of video recording storage.
[0047] In addition, there are multiple technical problems in using object storage in a video conference recording system. For example, the files in the object storage cannot be modified. If a video file is uploaded during the life cycle of a conference recording task, the upload process occupies the computing resources of the recording encoding task, resulting in a reduction in the utilization rate of the recording encoding resources. At the same time, since the upload of the video to the object storage takes a long time, the time-consuming of the recording end operation is also lengthened or even timed out, resulting in the inability to restart the recording of the conference.
[0048] In this application, the video file is written into the file storage, and the video file in the file storage can be modified. After the video file in the file storage is uploaded to the object storage, the video file in the file storage is deleted, which can save the resources of the file storage.
[0049] Moreover, in this application, the video file is uploaded after the recording ends, which does not occupy the computing resources of the recording encoding task, and the utilization rate of the recording encoding resources is relatively high. Since the video file is uploaded after the recording ends, the long time-consuming of uploading the video file to the object storage does not affect the time-consuming of the recording end operation.
[0050] In an exemplary embodiment, the method further includes: in response to an end instruction, determining an end time of the recorded broadcast through a recorded broadcast fusion task; the recorded broadcast fusion task waits for a second duration threshold starting from the end time of the recorded broadcast, and obtains file information of the main video recording file, wherein within the second duration threshold, the recorded broadcast service generates the main video recording file, and the second duration threshold is less than the first duration threshold; generating a recording of the video conference based on the file information through the recorded broadcast fusion task.
[0051] In the above embodiment, the second duration threshold is C milliseconds (the value of C can be determined according to actual situations. For example, a commonly used value is 1500 milliseconds).
[0052] The end instruction is an end instruction of a user operation in the system, and the recorded broadcast fusion task determines the end time of the recorded broadcast according to the end instruction of the user operation.
[0053] Since the recorded broadcast service needs to write information such as a file index when generating the main video recording file, after the recorded broadcast ends, the recorded broadcast fusion task needs to wait for the second duration threshold (C milliseconds) for the recorded broadcast service to complete the writing of the file index. After the recorded broadcast fusion task waits to complete, it obtains information such as the size and duration of the main video recording file from the download service HTTP HEAD, and reports information such as the final size of the video recording file to the conference registration service to generate a recording.
[0054] In an exemplary embodiment, after the video recording obtained by the recorded broadcast service for the video conference is written into the file storage to obtain a backup video recording file, the method includes: determining file information of the video recording file and the submission time of the upload task through an upload task; when the time difference between the current system time and the submission time of the upload task is less than a third duration threshold, and the file information carried in the upload task is the backup video recording file, the object storage operation service waits for the third duration threshold, wherein within the third duration threshold, the recorded broadcast fusion task deletes the backup video recording file in the file storage, and the third duration threshold is greater than the first duration threshold; after the object storage operation service waits for the third duration threshold, if the backup video recording file still exists in the file storage, the object storage operation service uploads the backup video recording file.
[0055] As in the above embodiment, an upload task is obtained from the task queue through a concurrent process. The upload task includes file information of the video recording file (for example, the path of the video recording file (such as the path of the main video recording file, the path of the backup video recording file)) and the submission time of the upload task (timestamp submitTS).
[0056] The above third duration threshold is A milliseconds (the value of A can be determined according to the actual situation, and usually takes 5000 milliseconds). By the path of the video file in the upload task, it can be determined whether the upload task indicates to upload the main video file or the backup video file.
[0057] Obtain the current system time as curTS, and the submission time of the upload task as submitTS. The time difference between the two is curTS - submitTS. If it is less than the third duration threshold of A milliseconds, and the upload task indicates to upload the backup video file, the object storage operation service waits for the third duration threshold from the current system time, so that the recording and live broadcast fusion task deletes the video backup file, preventing the object storage operation service from uploading the backup video file, and enabling the object storage to only store the main video file, thus avoiding the problem of low resource utilization caused by repeated storage of backup video files.
[0058] However, there may be abnormal situations. That is, if the recording and live broadcast fusion task fails to delete the video backup file due to an exception, after the object storage operation service waits for the third duration threshold, if the backup video file still exists in the object storage, the object storage operation service uploads the backup video file.
[0059] For the upload of video files (including the upload of the main video file and the backup video file), the Content-Type can be configured as the type corresponding to the file suffix, and the object key value is the relative path after the file storage mount path STORAGE_MOUNT_DIR. Read the file content from the file storage and call the object storage operation service to upload the video file; if the upload fails, retry in an infinite loop until the file is uploaded successfully; if the upload is successful, record the upload completion time (the timestamp uploadedTS when the upload is successful), and obtain the total upload duration through the upload completion time uploadedTS and the submission time of the upload task submitTS, that is:
[0060] Total upload duration = upload completion time uploadedTS - submission time of the upload task submitTS;
[0061] In an exemplary embodiment, uploading the video file in the file storage to the object storage through the object storage operation service includes: uploading the main video file in the file storage to the object storage through the object storage operation service; deleting the video file in the file storage through the object storage operation service includes: deleting the main video file in the file storage through the object storage operation service.
[0062] In an exemplary embodiment, after uploading the video file in the file storage to the object storage through the object storage operation service, the method further includes: creating a hidden directory, where the key values of the video files to be deleted are recorded in the hidden directory; based on the key values, deleting the video files corresponding to the key values in the object storage; and deleting the key values in the hidden directory.
[0063] For the deletion of video files, it can be achieved in the following manner:
[0064] Create a hidden directory.e to store the key value key of the video file to be deleted;
[0065] Start the Linux file system event monitoring interface inotify to monitor the close_write event under.e, and form a deletion task with the file name of the video file corresponding to the trigger timestamp submitTS event as the KEY value, the DELETE operation function, and the deletion task submission time (timestamp submitTS_1), and add it to the task execution queue OosOpsQueue;
[0066] If the video file corresponding to the KEY value plus the prefix path STORAGE_MOUNT_DIR exists in the file system of the file storage, then delete the corresponding video file in the file storage;
[0067] Call the object storage operation service to delete the video file corresponding to the KEY value in the object storage;
[0068] If the deletion is successful, delete the key file in the hidden directory.e at the same time; if the deletion fails, wait for a few seconds and retry the deletion.
[0069] For the sharing of video files, it can be achieved through the following steps:
[0070] Implement SHARE Object to generate a sharing link for the video file:
[0071] Globally start an object storage operation service dedicated to generating sharing links for object storage files;
[0072] Receive a request for batch generating sharing links, and add parameters such as a specified allowed access duration, download speed limit, and download rename.
[0073] If the requested video file exists in the file system of the file storage, generate an access token for the video file and piece together the sharing link address using the download service entry address;
[0074] Otherwise, call the object storage operation service to generate a sharing link, that is, piece together the sharing link address using the object storage endpoint entry address.
[0075] The magnitude relationship among the above-mentioned first duration threshold B, second duration threshold C, and third duration threshold A is C < B < A.
[0076] Such as Figure 3 It is a schematic diagram of the structure of a video conferencing recording and playback system. The key points of system deployment are as follows: The object storage operation service oosops, the recording and playback service, and the download service run on the same recording and playback server; The recording and playback server installs the Linux operating system; The recording and playback server mounts a file system dedicated to recording and playback, which can be a local hard disk formatted as an EXT4 file system or an NFS network file system.
[0077] Recording and playback fusion task logic:
[0078] When starting the task, use the storage bucket endpoint entry address of the object storage, add the video recording file name to generate the video recording file access address, and report it to the conference registration service.
[0079] Initiate a simulated terminal to join the conference for services such as conference signaling and media, and obtain the recording and playback layout and the audio and video streams in the recording and playback layout. After video fusion and audio mixing, generate one video stream and one audio stream, and use push stream protocols such as HTTPDH to push them to the recording and playback service for video recording storage;
[0080] Obtain information such as the current video recording file size and file duration by sending an HTTP HEAD request to the download service, and report the intermediate state of the recording and playback to the conference registration service;
[0081] Before ending the task, wait for the set video recording index writing duration of C milliseconds to enable the recording and playback service to complete writing information such as the video recording file index. After waiting for completion, send an HTTP HEAD to the download service to obtain the final video recording file size, file duration and other information, and report the final video recording file size and other information to the conference registration service.
[0082] After the reporting is completed, call the video recording deletion interface of the download service to delete the backup video recording file, and one recording task ends.
[0083] Recording and playback service logic:
[0084] Receive the audio and video streams pushed by the recording and playback fusion task, write them into the MP4 file container for online playback of the video recording on the browser side via HTML5, and at the same time write them into a streaming backup file container (such as a DAV file) for handling abnormal situations. The recording and playback service only writes the video recording file into the file storage.
[0085] Download service logic:
[0086] Provide interface services such as video file download, video playback, file deletion, and HTTP HEAD to obtain file size in the file storage path. Among them, the file download interface supports functions such as setting URL timeliness, speed limit, and download renaming according to parameters such as tokens.
[0087] Signaling service logic:
[0088] Receive a video address query request from the browser side, call the sharing link interface of the object storage operation service oosops to generate a sharing link and return it to the user. The sharing link can be provided by the download service or the object storage.
[0089] Receive a recorded broadcast record deletion request from the browser side, call the object deletion interface of the object storage operation service oosops to complete the deletion of one or more files.
[0090] Browser-side logic:
[0091] Before selecting a recorded broadcast record for online playback, first call the video address query interface of the signaling service, obtain the dynamic sharing link, and then perform playback or download. If the access fails, the video address will be automatically retried several times.
[0092] Example:
[0093] The export IP address of the recorded broadcast server is 211.83.183.98, and the download service port is 8383. At this time, the entry address of the download service is http: / / 211.83.183.98:8383.
[0094] The storage bucket name used by the system for object storage is test123, and the object storage endpoint address is http: / / test123.htyuncunchu.com / .
[0095] A meeting was recorded for 1.2 hours, generating a 1.1GB MP4 video file 13838191_83819919.mp4 and a 1.1GB DAV video backup file 13838191_83819919.dav. At the end of the recording, the DAV file will be automatically deleted without being uploaded to the object storage, and the 1.1GB MP4 file 13838191_83819919.mp4 will be uploaded to the object storage.
[0096] After the recording task of the meeting ends, after waiting for the set video index writing duration of C milliseconds, the recording task submits a recording record corresponding to the video file, and at this time the video can be accessed. Before the video file is uploaded to the object storage, the browser obtains the video sharing link address, such as: http: / / 211.83.183.98:8383 / 13838191_83819919.mp4?tk=823892808108038&name=record_test. Once the video file is uploaded to the object storage, the browser obtains the video sharing link address, such as: http: / / test123.htyuncunchu.com / 13838191_83819919.mp4?sign=89237927390179797197942318080&name=record_test.
[0097] After the recording task of the meeting ends, the browser initiates a deletion operation, and the video files in both the file storage and the object storage will be deleted.
[0098] The following effects can be achieved through the above embodiments:
[0099] Implement one video record corresponding to one volume file in the object storage, simplify the operation complexity during video playback and download, and improve the user experience;
[0100] Implement a video access method that combines file storage and object storage. When the video is not fully uploaded, file storage is used to provide services, making full use of the asynchronous file deletion mechanism of the Linux file system. After the video upload is completed, object storage is used to provide services, reducing the waiting time for the video to be available brought by using object storage;
[0101] Implement the asynchronous upload and asynchronous deletion of video files, so that the video conference recording system can quickly operate the recording on and off, and can quickly delete in batches without freezing the system user operation interface, improving the system response speed;
[0102] The hardware configuration of this solution only requires a small-capacity file storage device (such as a 200GB virtual hard disk) to cache the video files during recording. Once the recording is completed and uploaded, the video files and video backup files in the file storage are deleted, saving file storage capacity and making full use of the advantages of the object storage in terms of large capacity and low price.
[0103] This solution can also achieve a smooth upgrade of the system from traditional NFS file storage to object storage, be compatible with old data, and the old data can still use file storage to provide access.
[0104] Without relying on the sharding interface provided by the object storage system, it only needs the object storage to provide the simplest functions such as object uploading and deletion, which improves the compatibility when the video conferencing recording system docks with the object storage of different cloud service providers.
[0105] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, in essence, or the part that makes a contribution to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions for causing a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in various embodiments of the present invention.
[0106] An embodiment of the present invention also provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the steps of the method described in any one of the above are implemented.
[0107] In an exemplary embodiment, the above computer-readable storage medium may include, but is not limited to: USB flash drive, read-only memory (ROM for short), random access memory (RAM for short), mobile hard disk, magnetic disk, or optical disk, etc., various media that can store computer programs.
[0108] An embodiment of the present invention also provides an electronic device, including a memory and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0109] In an exemplary embodiment, the above electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the above processor, and the input / output device is connected to the above processor.
[0110] The specific examples in this embodiment may refer to the examples described in the above embodiments and exemplary embodiments, and will not be repeated here.
[0111] An embodiment of the present invention also provides a computer program product, including a computer program, and when the computer program is executed by a processor, the steps of the methods described in various embodiments of the present application are implemented.
[0112] Obviously, those skilled in the art should understand that the above-mentioned modules or steps of the present invention can be implemented by a general-purpose computing device. They can be concentrated on a single computing device or distributed on a network composed of multiple computing devices. They can be implemented by program code executable by the computing device. Thus, they can be stored in a storage device and executed by the computing device. And in some cases, the steps shown or described can be executed in a sequence different from that here, or they can be separately fabricated into individual integrated circuit modules, or multiple modules or steps among them can be fabricated into a single integrated circuit module for implementation. In this way, the present invention is not limited to any specific combination of hardware and software.
[0113] The above are only the preferred embodiments of the present invention and are not used to limit the present invention. For those skilled in the art, the present invention can have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for storing video files, characterized in that: include: The video conference is recorded and broadcasted by the recording and broadcasting service, and the video is written into the file storage to obtain the video file; Uploading the video file in the file storage to the object storage through the object storage operation service; When the total upload duration is less than the first duration threshold, the object storage operation service deletes the video file in the file storage after waiting for the target retention duration, wherein the total upload duration is the duration between the upload task submission time and the upload completion time of the video file; When the total upload duration is greater than or equal to the first duration threshold, the video file in the file storage is deleted through the object storage operation service.
2. The method according to claim 1, characterized in that The method further comprises: Determine a difference between the first duration threshold and the total upload duration; When the difference is greater than zero, the difference is determined as the target retention duration.
3. The method according to claim 1, characterized in that The video recording obtained by recording and broadcasting a video conference through the recording and broadcasting service is written into the file storage, including: After the recording and broadcasting service finishes recording and broadcasting the video conference, generating a main video file in a main format through the recording and broadcasting service; The video conference is recorded and broadcasted by the recording and broadcasting service, and the video is written into the file storage to obtain a backup video file; The video file includes the main video file and the backup video file.
4. The method according to claim 3, characterized in that: The method further comprises: In response to the end instruction, determining the end time of recording and broadcasting through the recording and broadcasting fusion task; The recording and broadcasting fusion task waits for a second duration threshold from the recording and broadcasting end time to obtain file information of the main video file, wherein the recording and broadcasting service generates the main video file within the second duration threshold range, and the second duration threshold is less than the first duration threshold; The video recording of the video conference is generated based on the file information through the recording and broadcasting fusion task.
5. The method according to claim 3, characterized in that: After the video recording obtained by recording and broadcasting the video conference through the recording and broadcasting service is written into the file storage to obtain the backup video file, the method includes: Determine the file information of the video file and the time to submit the upload task through the upload task; When the time difference between the current system time and the upload task submission time is less than a third duration threshold, and the file information carried in the upload task is the backup video file, the object storage operation service waits for a third duration threshold, wherein the backup video file in the file storage is deleted by the recording and broadcasting fusion task within the third duration threshold, and the third duration threshold is greater than the first duration threshold; After the object storage operation service waits for the third time threshold, if the backup video file still exists in the file storage, the backup video file is uploaded through the object storage operation service.
6. The method according to claim 3, characterized in that Uploading the video file in the file storage to the object storage through the object storage operation service includes: uploading the main video file in the file storage to the object storage through the object storage operation service; Deleting the video file in the file storage through the object storage operation service includes: deleting the main video file in the file storage through the object storage operation service.
7. The method according to claim 1, characterized in that After uploading the video file in the file storage to the object storage through the object storage operation service, the method further includes: Creating a hidden directory, wherein the hidden directory records the key value of the video file to be deleted; Based on the key value, deleting the video file corresponding to the key value in the object storage; Delete the key value in the hidden directory.
8. A video conference recording and broadcasting system, characterized in that: include: Recording service, used to write the video recording obtained from the video conference into file storage to obtain the video file; The object storage operation service is used to upload the video file in the file storage to the object storage; if the total upload time is less than a first time threshold, delete the video file in the file storage after waiting for a target retention time, wherein the total upload time is the time between the upload task submission time of the video file and the upload completion time; When the total upload duration is greater than or equal to the first duration threshold, the video file in the file storage is deleted.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method described in any one of claims 1 to 7 when executed by a processor.
10. 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 run the computer program to perform the method according to any one of claims 1 to 7.
11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method described in any one of claims 1 to 7 are implemented.