Video injection method, system, electronic device and storage medium
By introducing data hiding methods into the IPTV broadcast control injection platform, using injection services, download services, and slicing services to process video files according to video work order types, the problem of low video injection efficiency and diverse work order type requirements is solved, and high efficiency is achieved. Video injection and resource utilization.
Patent Information
- Application Number
- CN202210846501.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-19
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2042-07-19
AI Technical Summary
The current IPTV broadcast control injection platform is inefficient during the video injection process and cannot meet the diverse video work order types requirements, resulting in the storage center disk reading becoming a bottleneck.
By introducing the data hiding method into the IPTV broadcast control injection platform, using the injection service, download service and slicing service, the corresponding processing method is matched according to the video work order type, the target storage path is allocated, and evenly distributed among multiple storage buckets video files.
It improves the efficiency of video injection, meets the injection requirements of diverse video work order types, avoids the bottleneck of disk reading in the storage center, and achieves more efficient utilization of storage and network resources.
Smart Images

Figure CN115174560B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of Internet technology, and more specifically, to a video injection method, system, electronic device and storage medium. Background Art
[0002] At present, with the rapid development of IPTV (interactive network television) services, the gradual increase in long video content and the sharp increase in short videos, and with the continuous maturity of 4K\8K technology, the quality of video content continues to improve, while requiring a large amount of storage space and a large amount of network resources, resulting in the storage center disk reading becoming a bottleneck. In addition, the storage resources of the current IPTV broadcast control injection platform cannot be expanded and recycled in real time like public network cloud services, resulting in a long time for video files to be injected from the source storage center to the content delivery network (Content Delivery Network, CDN), and low video injection efficiency.
[0003] In addition, the current IPTV broadcast control injection platform has a single video injection method, while the work order types of CP (content provider) video media are becoming more and more diverse, resulting in the current IPTV broadcast control injection platform being unable to meet the video injection requirements of various work order types.
[0004] Therefore, how to provide a video injection method to improve the video injection efficiency and meet the video injection requirements of various work order types is a problem that urgently needs to be solved in this application. Summary of the invention
[0005] In view of this, the present invention provides a data hiding method, system, electronic device and storage medium, aiming to improve the efficiency of video injection and meet the injection requirements of videos of various work order types.
[0006] A first aspect of the present invention discloses a video injection method, which is applied to an IPTV broadcast control injection platform, wherein the IPTV broadcast control injection platform at least includes an injection service, a download service, a slicing service, a plurality of storage buckets and a CDN, each of the storage buckets corresponding to a storage path, and the method includes:
[0007] When video information sent by the content operation platform is detected, the injection service is called to generate a corresponding video medium work order according to the video work order in the video file, and a target storage path is allocated to the video medium work order according to the mounting order of each storage bucket;
[0008] Calling the download service, and downloading the target video file corresponding to the video media work order according to the download method matched with the work order type of the video media work order;
[0009] According to the storage method matched with the work order type of the video media work order, the target video file is stored in the storage bucket corresponding to the target storage path, so as to inject the target video file in the storage bucket into the CDN.
[0010] Optionally, the method further includes:
[0011] Real-time detection of whether there are multiple video information sent by the content operation platform in the message queue; wherein the message queue contains multiple video information transmitted by the content operation platform; the video information includes the video work order and the work order level of the video work order;
[0012] When a video file transmitted by a content operation platform is detected, calling the injection service to obtain a video medium work order in the video file includes:
[0013] When it is detected that there are multiple video information issued by the content operation platform in the message queue, the injection service is called to obtain the video work order of the video information with the highest work order level from each video information in the message queue, and generate a corresponding video medium work order based on the video work order.
[0014] Optionally, if the work order type of the video medium work order is a slice type, storing the target video file in the storage bucket corresponding to the target storage path according to the storage method matched with the work order type of the video medium work order, so as to inject the target video file in the storage bucket into the CDN, includes:
[0015] Calling the injection service to send a slicing message to the slicing server, so as to call the slicing service to slice the target video file into multiple sub-videos and generate corresponding index files according to the slicing message; wherein the slicing message carries a work order ID;
[0016] Call the slicing service to store the multiple sub-videos and the index file in the storage bucket corresponding to the FTP path, so as to inject the target video file in the storage bucket into the CDN; wherein, the FTP path is generated based on the target storage path and the work order ID, and the storage bucket corresponding to the FTP path is the same as the storage bucket corresponding to the target storage path.
[0017] Optionally, if the work order type of the video media work order is a fragment type, calling the download service to download a target video file corresponding to the video media work order according to a download method matched with the work order type of the video media work order includes:
[0018] The download service is called to obtain the index file of the video media work order, and the index file of the video media work order is parsed to obtain multiple segments, and the video corresponding to each segment is downloaded; wherein the videos corresponding to each segment constitute the target video file.
[0019] Optionally, the method further includes storing the target video file in the storage bucket corresponding to the target storage path according to the storage mode matched with the work order type of the video medium work order, so as to inject the target video file in the storage bucket into the CDN before injecting the target video file into the CDN:
[0020] Verifying the target video file;
[0021] The step of storing the target video file in the storage bucket corresponding to the target storage path according to the storage method matched with the work order type of the video medium work order, so as to inject the target video file in the storage bucket into the CDN, includes:
[0022] If the target video file passes the verification, the target video file is stored in the storage bucket corresponding to the target storage path according to the storage method matching the work order type of the video media work order, so as to inject the target video file in the storage bucket into the CDN.
[0023] A second aspect of the present invention discloses a video injection system, which is applied to an IPTV broadcast control injection platform. The IPTV broadcast control injection platform at least includes an injection service, a download service, a slicing service, a plurality of storage buckets and a CDN, each of the storage buckets corresponds to a storage path, and the system includes:
[0024] The target storage path allocation unit is used to call the video work order in the video information of the injection service to generate a corresponding video medium work order when the video information issued by the content operation platform is detected, and allocate a target storage path to the video medium work order according to the mounting order of each storage bucket;
[0025] A downloading unit, configured to call the download service and download a target video file corresponding to the video media work order according to a downloading method matched with a work order type of the video media work order;
[0026] A video injection unit is used to store the target video file in the storage bucket corresponding to the target storage path according to the storage method matched with the work order type of the video medium work order, so as to inject the target video file in the storage bucket into the CDN.
[0027] Optionally, the system further includes:
[0028] A real-time detection unit is used to detect in real time whether there are multiple video information transmitted by the content operation platform in the message queue; wherein the message queue contains multiple video information transmitted by the content operation platform; the video information includes the video medium work order and the work order level of the video medium work order;
[0029] The target storage path allocation unit is also used to call the injection service to obtain the video work order of the video information with the highest work order level from each of the video information in the message queue when it is detected that there are multiple video information transmitted by the content operation platform in the message queue, and generate a corresponding video medium work order based on the video work order.
[0030] Optionally, if the work order type of the video medium work order is a slice type, the video injection unit includes:
[0031] A slicing unit, configured to call the injection service to send a slicing message to the slicing server, so as to call the slicing service to slice the target video file into a plurality of sub-videos and generate a corresponding index file according to the slicing message; wherein the slicing message carries a work order ID;
[0032] A video injection sub-unit is used to call the slicing service to store the multiple sub-videos and the index file in the storage bucket corresponding to the FTP path, so as to inject the target video file in the storage bucket into the CDN; wherein, the FTP path is generated based on the target storage path and the work order ID, and the storage bucket corresponding to the FTP path is the same as the storage bucket corresponding to the target storage path.
[0033] The third aspect of the present invention discloses an electronic device, comprising: a processor and a memory, wherein the processor and the memory are connected via a communication bus; wherein the processor is used to call and execute a program stored in the memory; and the memory is used to store a program, wherein the program is used to implement the video injection method disclosed in the first aspect of the present invention.
[0034] A fourth aspect of the present invention discloses a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to execute the video injection method disclosed in the first aspect of the present invention.
[0035] The present invention provides a video injection method, system, electronic device and storage medium, which are applied to an IPTV broadcast control injection platform. The IPTV broadcast control injection platform at least comprises an injection service, a download service, a slicing service, a plurality of storage buckets and a CDN, wherein each storage bucket corresponds to a storage path. The method comprises: when video information transmitted by a content operation platform is detected, the injection service is called to generate a corresponding video medium work order according to a video work order in the video information, and a target storage path is allocated to the video medium work order according to the mounting order of each storage bucket; the download service is called to download a target video file corresponding to the video medium work order according to a download mode matched with a work order type of the video medium work order; and the target video file is stored in a storage bucket corresponding to the target storage path according to a storage mode matched with a work order type of the video medium work order, so as to inject the target video file in the storage bucket into the CDN. The IPTV broadcast control injection platform provided by the present invention is pre-set with multiple storage buckets, and each storage bucket is mounted in order. When a video file transmitted by a content operation platform is detected, the injection service is called to generate a corresponding video medium work order according to the video work order in the video information, and the target storage path is allocated to the video medium work order according to the mounting order of each storage bucket, so that each storage bucket can be evenly allocated to the video, thereby solving the problem in the prior art that due to the improvement of video content quality, a large amount of storage is required, a large amount of network resources are occupied, and the disk reading of the storage center becomes a bottleneck, thereby improving the video injection efficiency. In addition, the present invention can also download the target video file corresponding to the video medium work order according to the download method matched by the work order type of the video medium work order, and store the target video file according to the storage method matched by the work order type of the video medium work order, thereby meeting the injection requirements of videos of various work order types. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the embodiments of the present invention 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.
[0037] Figure 1 An architectural diagram of an IPTV broadcast control injection platform provided by an embodiment of the present invention;
[0038] Figure 2 A schematic diagram of a flow chart of a video injection method provided by an embodiment of the present invention;
[0039] Figure 3 A schematic diagram of the structure of a video injection system provided by an embodiment of the present invention;
[0040] Figure 4 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0041] 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.
[0042] In this application, relational terms such as first and second, etc. are used only 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 "comprise", "include" 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, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.
[0043] See also Figure 1 , showing an architecture diagram of an IPTV broadcast control injection platform provided by an embodiment of the present invention, the IPTV broadcast control injection platform at least includes an injection service, a download service, a slicing service, at least one storage bucket and a CDN.
[0044] In the embodiment of the present application, the injection service is implemented by the PTV broadcast control injection platform using (Java + Spring + RabbitMQ + Redis) technology; the download service is implemented based on Python + Pika + Http technology; the slicing service can be a slicing service that references a public technology platform. The specific implementation method of the slicing service can be set according to the actual application, and the embodiment of the present application is not limited.
[0045] In the embodiment of the present application, the IPTV broadcast control injection platform may include four storage buckets, namely storage bucket A, storage bucket B, storage bucket C and storage bucket D, each storage bucket has the same content space, and each storage bucket corresponds to a storage path.
[0046] See also Figure 2, shows a flow chart of a video injection method provided by an embodiment of the present invention, the video injection method is applied to an IPTV broadcast control injection platform, and the video injection method specifically includes the following steps:
[0047] S201: When video information sent by the content operation platform is detected, the injection service is called to generate a corresponding video medium work order according to the video work order in the video file, and a target storage path is allocated to the video medium work order according to the mounting order of each storage bucket.
[0048] The target storage path is a storage path corresponding to a storage bucket in which no video is currently stored in at least one storage bucket.
[0049] In an embodiment of the present application, the data between the IPTV broadcast control injection platform and the content operation platform can be connected in series through a message queue. In other words, the content operation platform can send the video information to the message queue in the form of a work order of an XLM data structure. Among them, accessing the video work order based on the message queue method can ensure that the video work order is not lost. The video information at least includes the original video ID, video name, file size, video duration, original storage path of the video, video work order, and video type.
[0050] When the IPTV broadcast control injection platform detects that there is video information sent by the content operation platform in the message queue, it can call the injection service to determine whether the video type in the video information is an out-of-stock type. If it is an out-of-stock type, the corresponding video work order is obtained from the message queue, and the corresponding video injection work order is generated according to the obtained video work order to complete the warehousing of the video information. At the same time, the video injection work order is pre-downloaded, the corresponding video medium work order is generated, and the corresponding target storage path is allocated to the video medium work order.
[0051] It should be noted that after the injection service obtains the corresponding video injection work order, it can further verify whether the video indicated by the video injection work order is its own content. If so, the corresponding splicing path is obtained from the configuration file pre-set in the injection service, and the original storage path of the video is spliced with the splicing path to obtain the global path; if not, it means that the video is a third-party video, and the original storage path of the video can be used as the global path. After determining the global path, find the video corresponding to the video name according to the global path, and determine whether the video is currently being sliced. If so, end the current video injection process. If not, transfer the video medium work order and the target storage path to the download queue.
[0052] As a preferred method of the embodiment of the present application, after calling the injection service to generate the corresponding video medium work order, the storage bucket whose turn it is currently can be determined according to the mounting order of each storage bucket on the IPTV broadcast control injection platform, and the storage path corresponding to the storage bucket can be determined as the target storage path. This can ensure that each storage bucket can be evenly allocated to the video, thereby solving the problem in the prior art that due to the improvement of video content quality, a large amount of storage is required, a large amount of network resources are occupied, and the storage center disk reading becomes a bottleneck.
[0053] For example, the mounting order of each storage bucket on the IPTV broadcast control injection platform is storage bucket A, storage bucket B, storage bucket C, and storage bucket D. If storage bucket B currently stores videos, it means that it is now the turn of storage bucket C. At this time, the storage path corresponding to storage bucket C can be determined as the target storage path.
[0054] Furthermore, in an embodiment of the present application, the content operation platform transmits multiple video files to the message queue, that is, when the IPTV broadcast control injection platform detects that there are multiple video information issued by the content operation platform in the message queue, each video information also includes the work order level corresponding to the video work order in the video information.
[0055] The IPTV broadcast control injection platform can call the injection service to obtain the video work order of the video information with the highest work order level from each video information in the message queue, that is, according to the work order level corresponding to the video work order in each video information, the video work order in each video information is obtained in order from high to low.
[0056] It should be noted that the work order level can be divided into three levels: high, medium and low. It can be set according to actual application and is not limited in the embodiment of the present application.
[0057] S202: calling the download service, and downloading the target video file corresponding to the video media work order according to the download method matched with the work order type of the video media work order.
[0058] During the specific execution of step S202, the corresponding video media work order and target storage path can be obtained from the download queue by calling the download service; the download method corresponding to the work order type of the video media work order is determined, and then the target video file corresponding to the video media work order can be downloaded according to the download method and the global path.
[0059] In the embodiment of the present application, the work order type can be a slice work order, a whole work order, and a slice work order. The download method corresponding to the work order type of the slice work order and the whole work order can be direct download, and the download method of the work order type of the slice work order can be to parse the corresponding index file to obtain multiple slices, and then download the video corresponding to each slice. The download method corresponding to each work order type can be set according to the actual application, and the embodiment of the present application is not limited.
[0060] Optionally, if the work order type of the video media work order is a slice work order or a whole piece work order, after calling the download service to obtain the corresponding video media work order from the download queue, the video corresponding to the video media work order can be directly downloaded.
[0061] If the work order type of the video media work order is a fragment type, after calling the download service to obtain the corresponding video media work order from the download queue, obtain the index file of the video media work order, parse the index file of the video media work order, obtain multiple fragments, and download the video corresponding to each fragment; wherein the videos corresponding to each fragment constitute the target video file. The index file may be an M3U8 index file.
[0062] For example, if the work order type of a video media work order is a fragmented type, after calling the download service to obtain the corresponding video media work order from the download queue, the M3U8 index file of the video media work order is obtained, and the M3U8 index file of the video media work order is parsed to obtain multiple fragments. The stream mode of Python Request is applied, and the block traversal method (iter_content) is used to download the video corresponding to each fragment. For fragmented video media work orders, this download method can reduce the server's memory requirements and directly download the entire video. If the video file is too large, it will cause insufficient memory.
[0063] It should also be noted that in the process of downloading videos, you can apply Python Request's stream=true mode and use the (iter_content) block traversal method to download very large streaming media files. The download supports a network jitter retry mechanism and real-time acquisition of the amount of downloaded files. The retry process uses a breakpoint-resume download mechanism based on the amount of downloaded files.
[0064] It should also be noted that before downloading the corresponding video, you can also create a download storage directory based on the work order ID of the video media work order and the source media path to store the downloaded target video. After the download is completed, check whether the target video size is equal to the original target video to ensure the integrity of the downloaded target video. According to the verification result, return whether the current download work order processing status is successful, and feedback the download result through the MQ message. The message is a JSON data structure. The feedback message contains: download work order source message, increase download status, and file storage path after download. The feedback message is sent to the injection service.
[0065] S203: Verify the target video file; if the target video file passes the verification, execute step S204.
[0066] During the specific execution of step S203, after downloading the target video file corresponding to the video medium work order, the target video file can be further verified to determine whether the downloaded target video file is a complete video; if the target video file passes the verification, it can be determined that the target video file is a complete video.
[0067] In an embodiment of the present application, it is possible to determine whether the size of the target video file is the same as the standard size of the target video file, calculate the hash value of the target video file, and compare the hash value of the target video file with the standard hash value. If the size of the target video file is the same as the standard size, and the hash value of the target video file is consistent with the standard hash value, it is determined that the target video file has passed the verification, that is, the target video file is a complete video.
[0068] S204: According to the storage method matched with the work order type of the video medium work order, the target video file is stored in the storage bucket corresponding to the target storage path, so as to inject the target video file in the storage bucket into the CDN.
[0069] In the embodiment of the present application, the work order type can be a slice work order, a whole work order, and a slice work order. The storage method corresponding to the work order type of the slice work order and the whole work order can be direct storage, and the storage method of the work order type of the slice work order can divide the target video file and use the slice service to complete the storage. The storage method corresponding to each work order type can be set according to the actual application, and the embodiment of the present application is not limited.
[0070] Optionally, if the work order type of the video media work order is a fragmented work order or a whole work order, the download service is called to download the target video file corresponding to the video media work order, and after the target video file passes the verification, the download service can directly store the target video file in the storage bucket corresponding to the target storage path to inject the target video file in the storage bucket into the CDN.
[0071] If the work order type of the video media work order is a slice type, the download service is called to download the target video file corresponding to the video media work order, and after the target video file passes the verification, the corresponding slice work order processing result can be fed back to the injection service, so as to call the injection service to send a slice message to the slice server, so as to call the slice service according to the slice message, to slice the target video file into multiple sub-videos and generate corresponding index files; store the multiple sub-videos and index files in the storage bucket corresponding to the FTP path, so as to inject the target video file in the storage bucket into the CDN; wherein, the FTP path is generated based on the target storage path and the work order ID, and the storage bucket corresponding to the FTP path is the same as the storage bucket corresponding to the target storage path. wherein, the slice message carries the work order ID, and the work order ID can be a specific directory name.
[0072] It should be noted that after the injection service receives the corresponding slicing work order processing result, the injection service verifies the video media work order to determine whether the video media work order exists, whether the video media work order is a slicing type, and whether the target video corresponding to the video media work order is downloaded successfully. If all conditions are met, a slicing message is initiated to the MQ slicing queue. After the slicing service listens to the slicing message, it slices the target video into small TS files (sub-videos) according to the pre-configured 8-second slice, and stores the small TS files in the pre-set file storage bucket directory (in the storage bucket corresponding to the FTP path). It verifies whether the deviation between the file time after slicing and the source file time is less than 2 seconds to feedback whether the slicing is successful. After slicing is completed, the slicing message is fed back to the injection service. The feedback message includes: slicing source message, added slicing status, M3U8 after slicing, and small TS storage bucket path (FTP path).
[0073] It should also be noted that after the video is stored, the injection service can also be called to generate a CDN injection work order file, specify file information and FTP path based on the video media work order, and upload the CDN injection work order file according to the FTP path to the FTP public directory in the specified file information agreed upon by the operator, and then notify the CDN party to obtain the CDN injection work order file and parse the CDN injection work order file to complete the entire process of injecting the target video file.
[0074] The present invention provides a video injection method, which is applied to an IPTV broadcast control injection platform. The IPTV broadcast control injection platform at least comprises an injection service, a download service, a slicing service, a plurality of storage buckets and a CDN, wherein each storage bucket corresponds to a storage path. The method comprises: when a video file transmitted by a content operation platform is detected, the injection service is called to obtain a video medium work order in the video file, and a target storage path is allocated to the video medium work order according to the mounting order of each storage bucket; the download service is called, and a target video file corresponding to the video medium work order is downloaded according to a download mode matched with a work order type of the video medium work order; and the target video file is stored in a storage bucket corresponding to the target storage path according to a storage mode matched with a work order type of the video medium work order, so as to inject the target video file in the storage bucket into the CDN. The PTV broadcast control injection platform provided by the present invention pre-sets multiple storage buckets, and each storage bucket is mounted in order. When a video file transmitted by a content operation platform is detected, the injection service is called to obtain a video medium work order in the video file, and a target storage path is allocated to the video medium work order according to the mounting order of each storage bucket, so that each storage bucket can be evenly allocated to the video, thereby solving the problem in the prior art that due to the improvement of video content quality, a large amount of storage is required, a large amount of network resources are occupied, and the disk reading of the storage center becomes a bottleneck, thereby improving the video injection efficiency. In addition, the present invention can also download the target video file corresponding to the video medium work order according to the download method matched by the work order type of the video medium work order, and store the target video file according to the storage method matched by the work order type of the video medium work order, thereby meeting the injection requirements of videos of various work order types.
[0075] Corresponding to the video injection method disclosed in the above embodiment of the present invention, the embodiment of the present invention also provides a video injection system, such as Figure 3 As shown, the video injection system is applied to the IPTV broadcast control injection platform, which includes at least an injection service, a download service, a slice service, multiple storage buckets and a CDN, each storage bucket corresponds to a storage path, and the video injection system includes:
[0076] The target storage path allocation unit 31 is used to call the injection service to generate a corresponding video medium work order according to the video work order in the video file when the video information issued by the content operation platform is detected, and allocate a target storage path for the video medium work order according to the mounting order of each storage bucket;
[0077] The download unit 32 is used to call the download service and download the target video file corresponding to the video medium work order according to the download mode matched with the work order type of the video medium work order;
[0078] The video injection unit 33 is used to store the target video file in the storage bucket corresponding to the target storage path according to the storage mode matched with the work order type of the video medium work order, so as to inject the target video file in the storage bucket into the CDN.
[0079] The specific principles and execution processes of each unit in the video injection system disclosed in the above embodiment of the present invention are similar to those in the above embodiment of the present invention. Figure 2 The public video injection method is the same, and can refer to the above embodiment of the present invention Figure 2 The corresponding parts of the disclosed video injection method will not be described in detail here.
[0080] The invention provides a video injection system, which is applied to an IPTV broadcast control injection platform. The IPTV broadcast control injection platform at least comprises an injection service, a download service, a slicing service, a plurality of storage buckets and a CDN. Each storage bucket corresponds to a storage path. The method comprises: when video information sent by a content operation platform is detected, the injection service is called according to a video work order in the video information, and a corresponding video medium work order is generated according to the video work order, and a target storage path is allocated to the video medium work order according to the mounting sequence of each storage bucket; the download service is called, and a target video file corresponding to the video medium work order is downloaded according to a download mode matched with a work order type of the video medium work order; and the target video file is stored in a storage bucket corresponding to the target storage path according to a storage mode matched with a work order type of the video medium work order, so as to inject the target video file in the storage bucket into the CDN. The PTV broadcast control injection platform provided by the present invention pre-sets a plurality of storage buckets, and each storage bucket is mounted in order. When a video file transmitted by a content operation platform is detected, the injection service is called to generate a corresponding video medium work order according to the video work order in the video information, and the target storage path is allocated to the video medium work order according to the mounting order of each storage bucket, so that each storage bucket can be evenly allocated to the video, thereby solving the problem in the prior art that due to the improvement of the quality of video content, a large amount of storage is required, a large amount of network resources are occupied, and the disk reading of the storage center becomes a bottleneck, thereby improving the video injection efficiency. In addition, the present invention can also download the target video file corresponding to the video medium work order according to the download method matched by the work order type of the video medium work order, and store the target video file according to the storage method matched by the work order type of the video medium work order, thereby meeting the injection requirements of videos of various work order types.
[0081] Furthermore, the video injection system provided by the embodiment of the present invention further includes:
[0082] A real-time detection unit is used to detect in real time whether there are multiple video files issued by the content operation platform in the message queue; wherein the message queue contains video information transmitted by multiple content operation platforms; the video information includes a video work order and a work order level of the video work order;
[0083] The target storage path allocation unit is also used to call the injection service to obtain the video medium work order of the video information with the highest work order level from the various video information in the message queue when it detects that there are multiple video files issued by the content operation platform in the message queue, and generate a corresponding video media work order based on the video work order.
[0084] Optionally, if the work order type of the video medium work order is a slice type, the video injection unit includes:
[0085] The slicing unit is used to call the injection service to send a slicing message to the slicing server, so as to call the slicing service to slice the target video file into multiple sub-videos and generate corresponding index files according to the slicing message; wherein the slicing message carries a work order ID;
[0086] The video injection sub-unit is used to call the slicing service to store multiple sub-videos and index files in the storage bucket corresponding to the FTP path, so as to inject the target video file in the storage bucket into the CDN; wherein, the FTP path is generated based on the target storage path and the work order ID, and the storage bucket corresponding to the FTP path is the same as the storage bucket corresponding to the target storage path.
[0087] Optionally, if the work order type of the video medium work order is a fragment type, the download unit includes:
[0088] The download subunit is used to call the download service to obtain the index file of the video media work order, parse the index file of the video media work order, obtain multiple fragments, and download the video corresponding to each fragment; wherein the videos corresponding to each fragment constitute the target video file.
[0089] Furthermore, the video injection system provided by the embodiment of the present invention further includes:
[0090] A verification unit, used for verifying the target video file;
[0091] The video injection unit is also used to store the target video file in the storage bucket corresponding to the target storage path if the target video file is verified, according to the storage method matched with the work order type of the video medium work order, so as to inject the target video file in the storage bucket into the CDN.
[0092] The present application embodiment provides an electronic device, such as Figure 4As shown, the electronic device includes a processor 401 and a memory 402, the memory 402 is used to store program codes and data for video injection, and the processor 401 is used to call program instructions in the memory to execute the steps shown in the video injection method in the above embodiment.
[0093] An embodiment of the present application provides a storage medium, which includes a storage program, wherein when the program is running, the device where the storage medium is located is controlled to execute the video injection method shown in the above embodiment.
[0094] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, in which the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0095] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0096] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one 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.
[0097] The above are only preferred embodiments of the present invention. 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 invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A video injection method, characterized in that: Applied to an IPTV broadcast control injection platform, the IPTV broadcast control injection platform at least includes an injection service, a download service, a slicing service, a plurality of storage buckets and a CDN, each of the storage buckets corresponds to a storage path, and the method includes: When video information sent by the content operation platform is detected, the injection service is called to generate a corresponding video medium work order according to the video work order in the video information, and a target storage path is allocated to the video medium work order according to the mounting order of each storage bucket; Calling the download service, and downloading the target video file corresponding to the video media work order according to the download method matched with the work order type of the video media work order; According to the storage method matched with the work order type of the video media work order, the target video file is stored in the storage bucket corresponding to the target storage path, so as to inject the target video file in the storage bucket into the CDN.
2. The method according to claim 1, characterized in that The method further comprises: Real-time detection of whether there are multiple video information sent by the content operation platform in the message queue; wherein the video information includes the video work order and the work order level of the video work order; When the video information sent by the content operation platform is detected, the injection service is called to generate a corresponding video medium work order according to the video work order in the video information, including: When it is detected that there are multiple video information issued by the content operation platform in the message queue, the injection service is called to obtain the video work order of the video information with the highest work order level from each video information in the message queue, and generate a corresponding video medium work order based on the video work order.
3. The method according to claim 1, characterized in that: If the work order type of the video medium work order is a slice type, storing the target video file in the storage bucket corresponding to the target storage path according to the storage method matched with the work order type of the video medium work order, so as to inject the target video file in the storage bucket into the CDN, includes: Calling the injection service to send a slicing message to the slicing server, so as to call the slicing service to slice the target video file into multiple sub-videos and generate corresponding index files according to the slicing message; wherein the slicing message carries a work order ID; Call the slicing service to store the multiple sub-videos and the index file in the storage bucket corresponding to the FTP path, so as to inject the target video file in the storage bucket into the CDN; wherein, the FTP path is generated based on the target storage path and the work order ID, and the storage bucket corresponding to the FTP path is the same as the storage bucket corresponding to the target storage path.
4. The method according to claim 1, characterized in that If the work order type of the video medium work order is a fragment type, the download service is called to download a target video file corresponding to the video medium work order according to a download method matched with the work order type of the video medium work order, including: The download service is called to obtain the index file of the video media work order, and the index file of the video media work order is parsed to obtain multiple segments, and the video corresponding to each segment is downloaded; wherein the videos corresponding to each segment constitute the target video file.
5. The method according to claim 1, characterized in that According to the storage mode matched with the work order type of the video medium work order, the target video file is stored in the storage bucket corresponding to the target storage path, so as to inject the target video file in the storage bucket into the CDN, the method further includes: Verifying the target video file; The step of storing the target video file in the storage bucket corresponding to the target storage path according to the storage method matched with the work order type of the video medium work order, so as to inject the target video file in the storage bucket into the CDN, includes: If the target video file passes the verification, the target video file is stored in the storage bucket corresponding to the target storage path according to the storage method matching the work order type of the video media work order, so as to inject the target video file in the storage bucket into the CDN.
6. A video injection system, characterized in that: Applied to an IPTV broadcast control injection platform, the IPTV broadcast control injection platform at least includes an injection service, a download service, a slicing service, a plurality of storage buckets and a CDN, each of the storage buckets corresponds to a storage path, and the system includes: The target storage path allocation unit is used to call the video work order in the video information of the injection service to generate a corresponding video medium work order when the video information issued by the content operation platform is detected, and allocate a target storage path to the video medium work order according to the mounting order of each storage bucket; A downloading unit, configured to call the download service and download a target video file corresponding to the video media work order according to a downloading method matched with a work order type of the video media work order; A video injection unit is used to store the target video file in the storage bucket corresponding to the target storage path according to the storage method matched with the work order type of the video medium work order, so as to inject the target video file in the storage bucket into the CDN.
7. The system according to claim 6, characterized in that The system further comprises: A real-time detection unit, used for detecting in real time whether there are multiple video information issued by the content operation platform in the message queue; wherein the video information includes the video medium work order and the work order level of the video medium work order; The target storage path allocation unit is also used to call the injection service to obtain the video work order of the video information with the highest work order level from each of the video information in the message queue when it is detected that there are multiple video information issued by the content operation platform in the message queue, and generate a corresponding video medium work order based on the video work order.
8. The system according to claim 6, characterized in that If the work order type of the video medium work order is a slice type, the video injection unit includes: A slicing unit, configured to call the injection service to send a slicing message to the slicing server, so as to call the slicing service to slice the target video file into a plurality of sub-videos and generate corresponding index files according to the slicing message; wherein the slicing message carries a work order ID; A video injection sub-unit is used to call the slicing service to store the multiple sub-videos and the index file in the storage bucket corresponding to the FTP path, so as to inject the target video file in the storage bucket into the CDN; wherein, the FTP path is generated based on the target storage path and the work order ID, and the storage bucket corresponding to the FTP path is the same as the storage bucket corresponding to the target storage path.
9. An electronic device, characterized in that: include: A processor and a memory, wherein the processor and the memory are connected via a communication bus; wherein the processor is used to call and execute a program stored in the memory; The memory is used to store a program, and the program is used to implement the video injection method as described in any one of claims 1-5.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to execute the video injection method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Multibusiness integrated CDN (Content Distribute Network) system and device and integration method
CN108449613A
Content delivery method and apparatus
CN108668145A