Video storage method and device, electronic equipment, storage medium and program product

By splitting video files and using CDN to store them, the problem of stuttering video playback in the online training system is solved, the video transmission efficiency and user experience are improved, and the operation and maintenance costs and user access pressure are reduced.

CN119182872APending Publication Date: 2024-12-24BEIJING CHINA POWER INFORMATION TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411064641.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-05
Publication Date
2024-12-24

AI Technical Summary

Technical Problem

The large-capacity storage and uploading of video files in the online training system leads to a bottleneck in network bandwidth, resulting in lag and unsmooth video playback, and reducing users' enthusiasm for learning.

Method used

By dividing video files into sub-video files and using the content distribution network (CDN) to allocate storage space according to file size, improving the efficiency and speed of video data transmission, cloud storage and CDN accelerated access mechanisms are adopted.

Benefits of technology

It improves video data transmission efficiency and user experience, reduces the cost investment and operation and maintenance work of a single user, and supports more users to access simultaneously.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119182872A_ABST
    Figure CN119182872A_ABST
Patent Text Reader

Abstract

The invention provides a video storage method and device, electronic equipment, a storage medium and a program product, and the method comprises the steps: determining a to-be-stored video file; segmenting the to-be-stored video file, and determining a to-be-stored video file set; and determining the file size of any sub-video file in the to-be-stored video file set, and distributing a storage space for any sub-video file fragment through a content distribution network according to the file size for file storage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of multimedia intelligent processing technology, and in particular to a video storage method, device, electronic device, storage medium and program product. Background Art

[0002] With the rapid development of Internet technology, the training business of various companies has also shifted from traditional offline training to online training in recent years. Online training allows employees to learn more freely and flexibly, without being limited by time, place and venue. Employees can participate in training anytime and anywhere, and training organizers can also provide users with targeted training courses, so that the training business can develop rapidly and efficiently. Usually, online training systems will provide a large number of video courses for employees to learn, which requires a large disk for storage. However, large-capacity disks are difficult to operate and maintain. Video files are large, and upload and download are prone to breakpoints. A stable and continuous network is required to ensure normal upload and download and maintain smooth playback. However, the general server resource network bandwidth is not high, resulting in bandwidth being a major performance bottleneck when a large number of system users access the system, which will cause video playback to be stuck and not smooth.

[0003] When users encounter slow access and video playback is jittery, they will not want to learn, which reduces their enthusiasm for learning and reduces their initiative to use the system, thus greatly weakening the advantages of online training and learning. Summary of the invention

[0004] In view of this, the purpose of the present application is to provide a video storage method, device, electronic device, storage medium and program product.

[0005] Based on the above purpose, the present application provides a video storage method, including:

[0006] Determine the video file to be stored;

[0007] Splitting the video files to be stored to determine a set of video files to be stored;

[0008] The file size of any sub-video file in the set of video files to be stored is determined, and storage space is allocated to any sub-video file fragment for file storage according to the file size through a content distribution network.

[0009] Optionally, the segmenting the video files to be stored to determine the video file set to be stored includes:

[0010] The video files to be stored are segmented by FFmpeg to determine the video file set to be stored.

[0011] Optionally, the video file set to be stored includes a plurality of sub-video files;

[0012] Any sub-video file in the video file set is an M3U8 file.

[0013] Optionally, determining the file size of any sub-video file in the set of video files to be stored, and allocating storage space for any sub-video file fragment according to the file size through a content distribution network for file storage, includes:

[0014] Taking the sub video file to be allocated as the target sub video file, obtaining the available space of the space to be stored, and comparing the available space of the space to be stored with the file size of the target sub video file through a content distribution network;

[0015] In response to determining that the available space of the space to be stored is larger than the file size of the target sub video file, and the difference between the available space of the space to be stored and the file size of the target sub video file is smaller than a preset threshold, storing the target sub video file in the space to be stored, determining a storage address, and generating a storage identifier according to the storage address;

[0016] In response to determining that the available space of the space to be stored is not greater than the file size of the target sub-video file, the available space of an adjacent space to be stored is obtained, the available space of the adjacent space to be stored is judged, and the target sub-video file is stored according to the judgment result.

[0017] Optionally, the storing the video file to be stored in segments through a content distribution network includes:

[0018] The content distribution network determines the storage status and connection status of any space to be stored, and partitions and stores several sub-video files in the video file to be stored according to the storage status and connection status.

[0019] Optionally, in response to determining that the available space of the space to be stored is larger than the file size of the sub video file, and the difference between the available space of the space to be stored and the file size of the sub video file is smaller than a preset threshold, storing the sub video file in the space to be stored includes:

[0020] In response to determining that the available space of the space to be stored is larger than the file size of the sub-video file, and the difference between the available space of the space to be stored and the file size of the sub-video file is smaller than a preset threshold, determining a storage state and a connection state of the space to be stored;

[0021] In response to determining that the storage state and connection state of the space to be stored meet preset conditions, the sub-video file is stored in the space to be stored; wherein the space to be stored is a cloud storage space.

[0022] Based on the same inventive concept, the embodiment of the present application further provides a video storage device, including:

[0023] A file determination module, configured to determine a video file to be stored;

[0024] A file segmentation module is configured to segment the video file to be stored and determine a set of video files to be stored;

[0025] The file storage module is configured to determine the file size of any sub-video file in the video file set to be stored, and allocate storage space for any sub-video file segment according to the file size through a content distribution network for file storage.

[0026] Based on the same inventive concept, an embodiment of the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a video storage method as described in any one of the above is implemented.

[0027] Based on the same inventive concept, an embodiment of the present application further provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute any of the above-mentioned video storage methods.

[0028] Based on the same inventive concept, an embodiment of the present application further provides a computer program product, including computer program instructions. When the computer program instructions are executed on a computer, the computer executes any of the above-mentioned video storage methods.

[0029] From the above, it can be seen that the video storage method, device, electronic device, storage medium and program product provided by the present application include: determining the video file to be stored; segmenting the video file to be stored to determine the video file set to be stored; determining the file size of any sub-video file in the video file set to be stored, and allocating storage space for any of the sub-video file segments according to the file size through the content distribution network for file storage. By slicing the original video and using the content distribution network to accelerate the access mechanism, the efficiency and rate of video data transmission are improved, so that the system can support more users, the user experience is greatly improved, and the overall solution reduces the cost investment of a single user and effectively reduces the operation and maintenance workload. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] In order to more clearly illustrate the technical solutions in the present application or related technologies, the drawings required for use in the embodiments or related technical descriptions are briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0031] Figure 1 A schematic diagram of a video storage method according to an embodiment of the present application;

[0032] Figure 2 This is a schematic diagram of an application of the video storage method according to an embodiment of the present application;

[0033] Figure 3 A schematic diagram of a video storage device according to an embodiment of the present application;

[0034] Figure 4 A schematic diagram of the structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0035] In order to make the objectives, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.

[0036] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present application should be the usual meanings understood by people with ordinary skills in the field to which the present application belongs. The "first", "second" and similar words used in the embodiments of the present application do not represent any order, quantity or importance, but are only used to distinguish different components. "Including" or "comprising" and similar words mean that the elements or objects appearing in front of the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0037] In order to facilitate understanding of the technical solutions of the present disclosure, some technical terms involved in the present disclosure are introduced below.

[0038] OSS storage: Object Storage Service, a service for storing unstructured data. OSS storage provides users with a highly reliable, highly scalable and low-cost data storage solution by storing data objects on physical storage devices in the cloud. This storage method is based on cloud computing technology and can help users effectively store and manage a large number of data objects, such as pictures, videos, documents, etc. The principle of OSS storage is to divide data into multiple objects, each of which contains metadata, and store these objects on distributed physical devices. This distributed storage architecture enables OSS to easily cope with the growing amount of data and provide efficient data access and management capabilities. At the same time, OSS also efficiently manages and accesses stored objects through a central management system to ensure data reliability and security.

[0039] CDN technology: Content Delivery Network, content distribution network, CDN technology is a content distribution service system built on the IP network, which is a layer of intelligent virtual network on the existing Internet by placing node servers in various places on the network. Its core is to use cache servers (also called proxy caches) to cache content on the server closest to the user, so that users can get the required content nearby, thereby solving the problem of Internet network congestion and improving the response speed of users visiting websites.

[0040] In order to make the technical solution of the present disclosure clearer and easier to understand, the video storage method provided by the embodiment of the present disclosure is described in detail below with reference to the accompanying drawings.

[0041] As described in the background technology section, with the rapid development of Internet technology, the training business of various companies has also shifted from traditional offline training to online training in recent years. Online training allows employees to learn more freely and flexibly, without being limited by time, place and venue. Employees can participate in training anytime and anywhere, and training organizers can also provide users with targeted training courses, so that the training business can be developed rapidly and efficiently. Usually, online training systems will provide a large number of video courses for employees to learn, which requires a larger disk for storage. However, large-capacity disks are difficult to operate and maintain. Video files are large, and breakpoints are prone to occur during upload and download. A stable and continuous network is required to ensure normal upload and download and maintain smooth playback. However, the general server resource network bandwidth is not high, resulting in a large performance bottleneck when system users access the system in large numbers, which will cause the video playback to be stuck and not smooth.

[0042] When users encounter slow access and video playback is jittery, they will not want to learn, which reduces their enthusiasm for learning and reduces their initiative to use the system, thus greatly weakening the advantages of online training and learning.

[0043] In view of this, the embodiment of the present application provides a video storage method, device, electronic device, storage medium and program product, including: determining a video file to be stored; segmenting the video file to be stored to determine a video file set to be stored; determining the file size of any sub-video file in the video file set to be stored, and allocating storage space for any sub-video file segment according to the file size through a content distribution network for file storage. By segmenting the original video and using a content distribution network to accelerate access mechanism, the efficiency and rate of video data transmission are improved, so that the system can support more users, the user experience is greatly improved, the overall solution reduces the cost investment of a single user, and effectively reduces the operation and maintenance workload.

[0044] like Figure 1 As shown, the video storage method includes:

[0045] Step S102, determining the video file to be stored;

[0046] Step S104: segmenting the video file to be stored to determine a set of video files to be stored;

[0047] Step S106: determining the file size of any sub-video file in the set of video files to be stored, and allocating storage space for any sub-video file fragment according to the file size through a content distribution network for file storage.

[0048] In step S102, corresponding to different application scenarios, the video files to be stored may be personal entertainment and sharing video files, education and learning video files, corporate publicity and marketing video files, monitoring and security video files, professional production and publishing video files, and video files in other application scenarios.

[0049] Among them, personal entertainment and sharing video files can be social media and short videos: such as short video platforms such as Douyin, Kuaishou, and Meipai, where users upload and share life clips, talent shows, creative videos, etc.; or online video platforms: such as iQiyi, Tencent Video, Youku, etc., where users watch movies, TV series, variety shows, etc. Education and learning video files can be online education: online courses, teaching videos, lecture recordings, etc., for distance education and knowledge sharing; or academic materials: experimental records, teaching demonstrations, research reports and other video materials for students and researchers to learn and refer to. Corporate publicity and marketing video files can be product displays: corporate promotional videos, product advertisements, usage tutorials, etc., for displaying product features and brand image; or meeting and event records: video records of corporate annual meetings, product launches, industry seminars and other activities, for internal communication and external publicity. Monitoring and security video files can be video surveillance: video surveillance recordings in public places, corporate parks, home security and other fields, for security monitoring and event tracing; or intelligent transportation: traffic monitoring videos, for traffic flow analysis, violation records, etc. Professionally produced and released video files can be film and television production: the shooting and post-production of films, TV series, documentaries and other film and television works, including material management, editing, special effects production and other links; or news and media: news reports, interview records, live broadcasts, etc., used for information dissemination and public opinion guidance. Other application scenario video files can be virtual reality and augmented reality: video materials in VR / AR content creation, used to build an immersive experience. Game development: in-game animations, cutscene videos, etc., used to enhance the visual effects of the game and the player experience.

[0050] In some optional implementations, the video file to be stored may also be a video file used for internal employee training of an enterprise.

[0051] In some optional implementations, the segmenting of the video file to be stored to determine the video file set to be stored includes: segmenting the video file to be stored through a video stream segmentation service, such as FFmpeg, to determine the video file set to be stored. The video file set to be stored includes a plurality of sub-video files; any sub-video file in the video file set is an M3U8 file.

[0052] It should be noted that the M3U8 file is a streaming media playlist file based on the HTTP Live Streaming (HLS) protocol, which is mainly used to support the streaming transmission of network video content. The M3U8 file uses the UTF-8 encoding format and is a text file. The M3U8 file does not directly contain audio and video data, but records the URL address of the audio and video clips. The playback software parses these addresses, downloads and plays the corresponding audio and video clips in sequence, thereby realizing streaming media playback. The M3U8 file has the characteristics of adaptive bit rate, index file function, multi-bit rate adaptation and efficient streaming transmission. And M3U8 files can be widely used in a variety of application scenarios, such as: online video playback scenarios, distance education scenarios, corporate publicity and marketing scenarios, and monitoring and security scenarios.

[0053] In addition, the M3U8 file contains a series of tags to describe the information and segmentation of the video stream. These tags include basic tags (such as EXTM3U, EXT-X-VERSION, etc.), media segment type tags (such as EXTINF, EXT-X-BYTERANGE, etc.), and media playlist and master list type tags. Through these tags, the player can accurately parse and play the content in the M3U8 file.

[0054] In some optional implementations, a video stream segmentation service, such as FFmpeg, is used to segment the video file to be stored in MP4 format, convert it into multiple small m3u8 files, and store them, so that subsequent users can prepare basic data through client access, and the loading rate can be improved by changing the loading of a large video file to multiple small files.

[0055] In some optional embodiments, determining the file size of any sub-video file in the set of video files to be stored, and allocating storage space for any of the sub-video file fragments according to the file size for file storage through a content distribution network, includes: taking the sub-video file to be allocated as a target sub-video file, obtaining the available space of the space to be stored, and comparing the available space of the space to be stored with the file size of the target sub-video file through a content distribution network; in response to determining that the available space of the space to be stored is larger than the file size of the target sub-video file, and the difference between the available space of the space to be stored and the file size of the target sub-video file is smaller than a preset threshold, storing the target sub-video file in the space to be stored, determining a storage address, and generating a storage identifier according to the storage address; in response to determining that the available space of the space to be stored is not larger than the file size of the target sub-video file, obtaining the available space of an adjacent space to be stored, judging the available space of the adjacent space to be stored, and storing the target sub-video file according to the judgment result.

[0056] In some optional implementations, the segmented storage of the video file to be stored through a content distribution network includes: the content distribution network determines the storage status and connection status of any space to be stored, and partitions and stores several sub-video files in the video file to be stored according to the storage status and connection status.

[0057] In some embodiments, the split files are cached and accelerated by using CDN technology. In this way, when users access the video, they do not read from the disk or OSS service, but quickly obtain the required video resources from the nearest network through the CDN service, and load small video stream files multiple times to achieve smooth video playback, thereby improving the user's viewing experience.

[0058] In some optional implementations, in response to determining that the available space of the space to be stored is larger than the file size of the sub video file, and the difference between the available space of the space to be stored and the file size of the sub video file is smaller than a preset threshold, storing the sub video file in the space to be stored includes:

[0059] In response to determining that the available space of the space to be stored is larger than the file size of the sub-video file, and the difference between the available space of the space to be stored and the file size of the sub-video file is smaller than a preset threshold, determining a storage state and a connection state of the space to be stored;

[0060] In response to determining that the storage state and the connection state of the space to be stored meet the preset conditions, the sub-video file is stored in the space to be stored.

[0061] In some optional implementations, in order to improve the video storage medium, the storage of large video files is changed from local disk storage to OSS storage on the cloud, and OSS is used as the storage medium. Therefore, the storage space for storing the video to be stored is the cloud storage space. The OSS service supports elastic expansion of storage capacity and processing power, supports breakpoint continuation for uploading and downloading, and provides multiple storage types for selection, which comprehensively optimizes storage stability and operation and maintenance costs, and improves user uploading and downloading efficiency.

[0062] In some optional implementations, CDN (Content Distribution Network) builds a virtual network on the existing Internet, which can redirect user requests to the network service node closest to the user in real time based on comprehensive information such as network traffic and the connection and load of each network node, as well as the distance to the user terminal and response time, and avoids the links on the network that may affect the data transmission speed and stability as much as possible. Figure 2As shown in the figure, through forwarding operations, users can obtain the required content nearby, solve the network congestion problem, and improve the response speed of user access to the system. We configure the data source of the data that users need to access in OSS at the CDN layer. When users access data, they first obtain resources from CDN. If CDN finds that the accessed resources do not exist, it will search for the corresponding resources in OSS and cache them for subsequent user access. In this way, when users access resources, they obtain resources from the network point closest to them, shortening the access path. The requested data is directly returned by CDN. This request path does not consume network traffic on the application server, reducing the network bandwidth pressure on the application server.

[0063] As can be seen from the above, the video storage method provided by the present application includes: determining the video files to be stored; segmenting the video files to be stored to determine the video file set to be stored; determining the file size of any sub-video file in the video file set to be stored, and allocating storage space for any of the sub-video file segments according to the file size through the content distribution network for file storage. By segmenting the original video and using the content distribution network to accelerate the access mechanism, the efficiency and rate of video data transmission are improved, so that the system can support more users, the user experience is greatly improved, and the overall solution reduces the cost investment of a single user and effectively reduces the operation and maintenance workload.

[0064] It should be noted that the method of the embodiment of the present application can be performed by a single device, such as a computer or server. The method of this embodiment can also be applied to a distributed scenario and completed by multiple devices cooperating with each other. In the case of such a distributed scenario, one of the multiple devices can only perform one or more steps in the method of the embodiment of the present application, and the multiple devices will interact with each other to complete the described method.

[0065] It should be noted that the above describes some embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the above embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0066] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides a video storage device.

[0067] refer to Figure 3 , the video storage device comprises:

[0068] A file determination module 302, configured to determine a video file to be stored;

[0069] The file segmentation module 304 is configured to segment the video file to be stored and determine a set of video files to be stored;

[0070] The file storage module 306 is configured to determine the file size of any sub-video file in the video file set to be stored, and allocate storage space for any sub-video file segment according to the file size through a content distribution network for file storage.

[0071] For the convenience of description, the above device is described in terms of functions divided into various modules. Of course, when implementing the present application, the functions of each module can be implemented in the same or multiple software and / or hardware.

[0072] The device of the above embodiment is used to implement the corresponding video storage method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.

[0073] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments and methods, the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the video storage method described in any of the above embodiments is implemented.

[0074] Figure 4 A more specific schematic diagram of the hardware structure of an electronic device provided in this embodiment is shown, and the device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are connected to each other through the bus 1050 in the device.

[0075] The processor 1010 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.

[0076] The memory 1020 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 may store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 1020 and are called and executed by the processor 1010.

[0077] The input / output interface 1030 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.

[0078] The communication interface 1040 is used to connect a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).

[0079] The bus 1050 includes a path that transmits information between the various components of the device (eg, the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040).

[0080] It should be noted that, although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040 and the bus 1050, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include the components necessary for implementing the embodiments of the present specification, and does not necessarily include all the components shown in the figure.

[0081] The electronic device of the above embodiment is used to implement the corresponding video storage method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.

[0082] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the video storage method described in any of the above embodiments.

[0083] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.

[0084] The computer instructions stored in the storage medium of the above embodiment are used to enable the computer to execute the video storage method described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0085] Based on the same inventive concept, corresponding to the video storage method described in any of the above embodiments, the present disclosure also provides a computer program product, which includes computer program instructions. In some embodiments, the computer program instructions can be executed by one or more processors of a computer so that the computer and / or the processor execute the video storage method. Corresponding to the execution subject corresponding to each step in each embodiment of the video storage method, the processor that executes the corresponding step can belong to the corresponding execution subject.

[0086] The computer program product of the above embodiment is used to enable the computer and / or the processor to execute the video storage method described in any of the above embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0087] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present application (including the claims) is limited to these examples. In line with the concept of the present application, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present application as described above, which are not provided in detail for the sake of simplicity.

[0088] In addition, to simplify the description and discussion, and in order not to make the embodiments of the present application difficult to understand, the known power supply / ground connection with the integrated circuit (IC) chip and other components may or may not be shown in the provided drawings. In addition, the device can be shown in the form of a block diagram to avoid making the embodiments of the present application difficult to understand, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform to be implemented in the embodiments of the present application (that is, these details should be fully within the scope of understanding of those skilled in the art). In the case of elaborating specific details (e.g., circuits) to describe exemplary embodiments of the present application, it is obvious to those skilled in the art that the embodiments of the present application can be implemented without these specific details or when these specific details are changed. Therefore, these descriptions should be considered to be illustrative rather than restrictive.

[0089] Although the present application has been described in conjunction with specific embodiments of the present application, many replacements, modifications and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed.

[0090] The embodiments of the present application are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application should be included in the scope of protection of the present application.

Claims

1. A video storage method, characterized in that: include: Determine the video file to be stored; Segmenting the video files to be stored to determine a set of video files to be stored; The file size of any sub-video file in the set of video files to be stored is determined, and storage space is allocated to any sub-video file fragment for file storage according to the file size through a content distribution network.

2. The method according to claim 1, characterized in that The step of segmenting the video files to be stored to determine a set of video files to be stored includes: The video files to be stored are segmented by FFmpeg to determine the video file set to be stored.

3. The method according to claim 2, characterized in that The video file set to be stored includes a plurality of sub-video files; Any sub-video file in the video file set is an M3U8 file.

4. The method according to claim 1, characterized in that: The determining the file size of any sub-video file in the set of video files to be stored, and allocating storage space for any sub-video file fragment according to the file size through a content distribution network for file storage, comprises: Taking the sub video file to be allocated as the target sub video file, obtaining the available space of the space to be stored, and comparing the available space of the space to be stored with the file size of the target sub video file through a content distribution network; In response to determining that the available space of the space to be stored is larger than the file size of the target sub video file, and the difference between the available space of the space to be stored and the file size of the target sub video file is smaller than a preset threshold, storing the target sub video file in the space to be stored, determining a storage address, and generating a storage identifier according to the storage address; In response to determining that the available space of the space to be stored is not greater than the file size of the target sub-video file, the available space of an adjacent space to be stored is obtained, the available space of the adjacent space to be stored is judged, and the target sub-video file is stored according to the judgment result.

5. The method according to claim 4, characterized in that The step of storing the video file to be stored in segments through a content distribution network includes: The content distribution network determines the storage status and connection status of any space to be stored, and partitions and stores several sub-video files in the video file to be stored according to the storage status and connection status.

6. The method according to claim 4, characterized in that In response to determining that the available space of the space to be stored is larger than the file size of the sub video file, and the difference between the available space of the space to be stored and the file size of the sub video file is smaller than a preset threshold, storing the sub video file in the space to be stored includes: In response to determining that the available space of the space to be stored is larger than the file size of the sub-video file, and the difference between the available space of the space to be stored and the file size of the sub-video file is smaller than a preset threshold, determining a storage state and a connection state of the space to be stored; In response to determining that the storage state and connection state of the space to be stored meet preset conditions, the sub-video file is stored in the space to be stored; wherein the space to be stored is a cloud storage space.

7. A video storage device, characterized in that: include: A file determination module, configured to determine a video file to be stored; A file segmentation module is configured to segment the video file to be stored and determine a set of video files to be stored; The file storage module is configured to determine the file size of any sub-video file in the video file set to be stored, and allocate storage space for any sub-video file segment according to the file size through a content distribution network for file storage.

8. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable by the processor, wherein the processor implements the method according to any one of claims 1 to 6 when executing the computer program.

9. A non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute the method according to any one of claims 1 to 6.

10. A computer program product, comprising computer program instructions, which, when executed on a computer, cause the computer to execute the method according to any one of claims 1 to 6.