Classroom fragment-based video fragment preloading method, playing device and storage medium
By setting a cache target in the video player to the beginning of the classroom shard and continuously cache it, the problem of incoherent classroom shard playback in the existing technology is solved, achieving a smoother playback experience and more effective data use.
Patent Information
- Application Number
- CN202311421571.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-30
- Publication Date
- 2025-05-02
AI Technical Summary
Existing video players cannot play class shards coherently, resulting in poor playback experience and need to be reloaded when jumping to the next class shard, resulting in wasted traffic.
By setting the cache target at the current moment of video clip playback, class shard is determined in the current video clip playback, and the cache target is updated to the beginning of the classroom shard, cache the classroom shard. After cache is cached to the end of the class shard, update the cache target to the beginning of the next class shard and continue to cache until the preset load limit is reached.
It realizes the coherent playback of video players between classroom shards, reduces unnecessary data loading and video player lag, and optimizes the playback experience.
Smart Images

Figure CN119922389A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of video preloading, and in particular to a method for preloading video segments based on classroom segmentation, a playback device and a storage medium. Background Art
[0002] With the application of network technology and video technology in the field of education, education has shown diversified development, and smart classrooms are one of the very important development directions.
[0003] After the teacher has finished teaching in the smart classroom, he can get an electronic report of classroom data through algorithm analysis. The electronic report includes many time segments of teacher-student interaction in this class. These time segments are represented by a set of array objects with a data structure of {startTime:number,duration:number}, where startTime represents the start time of the time segment and duration represents the duration of the time segment. These time segments are called classroom segments. On the electronic report page of classroom data, these classroom segments will be displayed on the progress bar of the video player of the current classroom playback. Since these classroom segments are video segments obtained from the recorded classroom videos through algorithm analysis, these classroom segments are not coherent, and there may be other video data between these classroom segments.
[0004] like Figure 1 As shown in FIG. 1 , it is a schematic diagram of an existing video player updating cache targets in chronological order according to normal logic. Figure 1 In the normal logic, the video player caches in chronological order by default. When playing to the end of a class segment, the video data after the class segment will be cached. If the cached video data is not the next class segment, it will cause the next class segment to be reloaded every time it jumps to the next class segment. The default sequential caching of general players during playback cannot be enjoyed, resulting in discontinuous playback of class segments and affecting the playback experience. In addition, the cached video clips before the next class segment do not optimize the user's playback experience and cause a waste of traffic. Summary of the invention
[0005] The embodiments of the present invention aim to provide a method, a playback device and a storage medium for preloading video clips based on classroom segmentation, which can solve the problem that the existing video player cannot play the classroom segmentation coherently, affecting the playback experience.
[0006] In order to solve the above technical problems, the first aspect of the present invention provides a method for preloading video segments based on classroom segmentation, and the method for preloading video segments based on classroom segmentation includes:
[0007] Set the cache target to the current moment of the video clip playback;
[0008] Determine the classroom segment in the current video clip playback, update the cache target to the beginning of the classroom segment, and cache the classroom segment;
[0009] When the cache target is cached to the end of the classroom slice, the cache target is updated to the beginning of the next classroom slice, and the next classroom slice is cached until the cache meets the preset loading limit conditions, where the preset loading limit conditions include reaching the cache limit or all classroom slices have been cached.
[0010] After caching the end of the current class segment to the cache target, the cache target is updated to the beginning of the next class segment, and the next class segment is cached, so that the video player can play the class segments coherently, reduce unnecessary data loading, reduce video player freezes, and optimize the playback experience. This can break through the logic of the existing traditional video player that caches in chronological order by default, and can set the required cache target content according to the logic of specific scenarios to improve user experience. 。
[0011] Correspondingly, the second aspect of the present invention provides a playback device, comprising: a memory, a processor, and a computer program stored on the memory and running on the processor. When the computer program is executed by the processor, it implements the classroom segmented video clip preloading method described in the first aspect of the present invention.
[0012] Correspondingly, the third aspect embodiment of the present invention provides a computer storage medium, on which is stored a program for the method for preloading video clips based on classroom segmentation. When the program for the method for preloading video clips based on classroom segmentation is executed by a processor, the method for preloading video clips based on classroom segmentation described in the first aspect embodiment of the present invention is implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0014] Figure 1 It is a schematic diagram of an existing video player updating cache targets in chronological order according to normal logic;
[0015] Figure 2 It is a flow chart of a method for preloading video segments based on classroom segmentation provided by the present invention;
[0016] Figure 3 It is a schematic diagram of a video player updating a cache target based on a classroom segmented video clip preloading method provided by the present invention;
[0017] Figure 4 It is another flow chart of a method for preloading classroom video segments provided by the present invention;
[0018] Figure 5 It is a structural schematic diagram of a playback device provided by the present invention. DETAILED DESCRIPTION
[0019] In order to facilitate the understanding of the present invention, the present invention is described in more detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that when an element is described as "fixed to" another element, it can be directly on another element or there can be one or more centered elements therebetween. When an element is described as "connected" to another element, it can be directly connected to another element or there can be one or more centered elements therebetween. The orientation or positional relationship indicated by the terms "upper", "lower", "inner", "outer", "bottom" etc. used in this specification is based on the orientation or positional relationship shown in the accompanying drawings, only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation of the present invention. In addition, the terms "first", "second", "third", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.
[0020] Unless otherwise defined, all technical and scientific terms used in this specification have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in this specification and in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used in this specification includes any and all combinations of one or more of the related listed items.
[0021] In addition, the technical features involved in different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0022] In one embodiment, Figure 2 As shown, the present invention provides a method for preloading video segments based on classroom segmentation, and the method for preloading video segments based on classroom segmentation includes:
[0023] S1, setting the cache target to the current moment of the video clip playback;
[0024] S2, determining the classroom segment in the current video clip playback, updating the cache target to the beginning of the classroom segment, and caching the classroom segment;
[0025] S3. When the cache target is cached to the end of the class slice, the cache target is updated to the beginning of the next class slice, and the next class slice is cached until the cache meets the preset loading limit condition, where the preset loading limit condition includes reaching the cache limit or all class slices have been cached.
[0026] In this embodiment, a method for preloading video segments based on classroom segments is provided, including: setting a cache target at the current moment of video segment playback; determining a classroom segment during the current video segment playback, updating the cache target to the beginning of the classroom segment, and caching the classroom segment; when the cache target is cached to the end of the classroom segment, updating the cache target to the beginning of the next classroom segment, and continuing to cache the next classroom segment until the cache meets a preset loading restriction condition, wherein the preset loading restriction condition includes reaching the cache limit, or all classroom segments have been loaded. Thus, after caching the end of the current classroom segment to the cache target, the cache target is updated to the beginning of the next classroom segment, and the next classroom segment is continued to be cached, so that the video player can play the classroom segments coherently, reduce the loading of unnecessary data, reduce the freeze of the video player, and optimize the playback experience, thereby breaking through the logic of the existing traditional video player caching in chronological order by default, and the required cache target content can be set according to the logic of specific scenarios to improve the user experience. 。 This can solve the problem that existing video players cannot play class segments coherently, affecting the playback experience.
[0027] In one embodiment, in step S1, setting the cache target at the current moment of video clip playback includes:
[0028] S11. Play the video clip on a video player.
[0029] When recording classroom videos, they are divided into multiple video clips for storage, and each video clip is stored according to the agreed video recording time or the agreed video size. For example, if the agreed video recording is 10 minutes, a video clip is stored after the recording time reaches 10 minutes, or if the agreed video size is 200M, it is stored as a video clip after the recorded video size reaches 200M.
[0030] Classroom slices are represented by a set of array objects with a data structure of {startTime:number,duration:number}, where startTime represents the start time of the time slice and duration represents the duration of the time slice.
[0031] When analyzing classroom videos, the algorithm will obtain multiple classroom segments from the classroom videos to form a classroom segment set, which is sorted from small to large according to the time segment start time startTime of the classroom segment. Among them, a classroom segment may exist in the same video clip, or it may be divided into multiple parts and exist in multiple different video clips.
[0032] For example, the agreed video recording time is 10 minutes, and a video segment is stored after the recording time reaches 10 minutes. At this time, for example, a class segment is {startTime:4:15,duration:5}, that is, the class segment starts at 4:15 in the class video and lasts for 5 minutes (that is, ends at 9:15). At this time, the class segment is in the first video segment.
[0033] For another example, a class segment is {startTime:4:15,duration:8}, which means that the class segment starts from 4:15 in the class video and lasts for 8 minutes (that is, ends at 12:15). At this time, since the start time of the class segment is in the first video segment and the end time is in the second video segment, the class segment will be divided into two cache moments. The first cache moment includes 4:15 to 10:00, and the first cache moment is in the first video segment; the second cache moment includes 10:01 to 12:15, and the second cache moment is in the second video segment.
[0034] Therefore, when a video clip is played on a video player, the video clip is displayed on the progress bar of the video player, wherein the played video clip may contain certain classroom segments or parts of classroom segments obtained after algorithm analysis.
[0035] S12: Setting the cache target at the current moment of video clip playback.
[0036] When a video clip is played on a video player, the video player sets the cache target to the current moment of the video clip playback and starts caching the video data. Figure 3 shown.
[0037] In one embodiment, in step S2, the classroom segment is determined in the current video clip playback, the cache target is updated to the beginning of the classroom segment, and the classroom segment is cached; including:
[0038] S21. Determine whether the video clip currently being played is classroom segment content. If the video clip currently being played is classroom segment content, proceed to step S22; if the video clip currently being played is not classroom segment content, proceed to step S23.
[0039] When the algorithm analyzes the classroom video, it will get multiple classroom segments from the classroom video to form a classroom segment set, which is sorted from small to large according to the time segment start time of the classroom segment. The classroom segment is represented by a set of array objects with a data structure of {startTime: number, duration: number}, where startTime represents the time segment start time and duration represents the time segment duration.
[0040] Therefore, the current time of playing the video clip can be compared with the start time startTime of the time slice in the classroom slice in the classroom slice set. If the current time of playing the video clip is after the start time startTime of the time slice of the nth classroom slice and before the start time startTime of the time slice of the n+1th classroom slice, it can be determined that the video clip played at the current time is the content of the nth classroom slice.
[0041] If the current time of playing the video clip is not within the time range of the duration of all class slices in the class slice set (the sum of the time slice start time startTime and the time slice duration duration), it can be determined that the video clip played at the current time is not the class slice content.
[0042] For example, the class segment set includes three class segment sets, namely: the first class segment {startTime:4:15,duration:5}, the second class segment {startTime:12:25,duration:6}, and the third class segment {startTime:24:10,duration:8}.
[0043] If the current time of playing the video clip is 5:15, compare the current time of playing the video clip with the start time startTime of the time slice in the classroom slice in the classroom slice set, and it is concluded that the current time of playing the video clip is 5:15, which is after the start time of the time slice of 4:15 of the first classroom slice and before the start time of the time slice of 12:25 of the second classroom slice. It can be determined that the video clip currently playing is the content of the first classroom slice.
[0044] If the current time of playing the video clip is 3:15, it can be concluded that the current time of playing the video clip is not within the time range of the sum of the time slice start time and the time slice duration in all classroom slices in the classroom slice set, then it can be determined that the video clip played at the current time is not the classroom slice content.
[0045] S22. If the video clip currently being played is a classroom segment, the cache target is updated to the beginning of the classroom segment, and the video data of the classroom segment is cached.
[0046] When it is determined that the video clip currently being played is the content of the classroom segment, the video player updates the cache target to the beginning of the classroom segment, re-caches the video data of the classroom segment, and starts to re-play the classroom segment.
[0047] S23. If the video clip currently being played is not the classroom segment content, then directly skip the video clip, play the next video clip, and repeat step S1.
[0048] S24. Further determine whether the cache target has been cached to the end of the class slice; if the cache target has been cached to the end of the class slice, go to step S3, update the cache target to the beginning of the next class slice, and continue to cache the next class slice.
[0049] If the cache target is not cached to the end of the class segment, it is further determined whether the class segment has the next cache time. If the class segment still has the next cache time, the cache target is updated to the beginning of the next cache time of the class segment, and the video clip corresponding to the next cache time of the class segment is cached.
[0050] If the class segment does not have a next cache time, go to step S3, update the cache target to the beginning of the next class segment, and continue to cache the next class segment.
[0051] Specifically, based on the time slice start time startTime and the time slice duration duration of the classroom slice and the current time of playing the video clip, determine whether the classroom slice has the next cache time, determine the status of the classroom slice covering the video clip, and load the corresponding video clip according to the status of covering the video clip.
[0052] For example, the agreed video recording time is 10 minutes, and a video clip is stored when the recording time reaches 10 minutes. A class segment is {startTime:4:15,duration:8}, that is, the class segment starts from 4:15 in the class video and lasts for 8 minutes (that is, ends at 12:15). The time range of the first video segment is [0:00-10:00] minutes, and the time range of the second video segment is [10:01-20:00] minutes. If the current time of playing the video segment is 5:15, the start time of the class segment is in the first video segment, and the end time is in the second video segment. Therefore, the class segment will be divided into two cache moments. The first cache moment includes 4:15 to 10:00, and the first cache moment is in the first video segment; the second cache moment includes 10:01 to 12:15, and the second cache moment is in the second video segment. Therefore, it can be determined that the classroom segment covers the first video segment and the second video segment. At this time, the cache target is updated to the beginning of the second cache moment of the classroom segment, and the second video segment corresponding to the second cache moment of the classroom segment is cached.
[0053] In this embodiment, by determining the classroom segment in the current video clip playback, the cache target is updated to the beginning of the classroom segment, and the classroom segment is cached. Therefore, the required cache target content can be set according to the logic of a specific scene, and the playback experience in a special scene can be optimized. This can break through the logic of the existing traditional video player caching in chronological order by default, and improve the user experience. 。
[0054] In one embodiment, Figure 3 As shown, in step S3, after the cache target is cached to the end of the classroom slice, the cache target is updated to the beginning of the next classroom slice, and the next classroom slice is cached continuously until the cache meets the preset loading restriction condition and stops caching, wherein the preset loading restriction condition includes reaching the cache limit, or all classroom slices have been cached; including:
[0055] S31, after determining that the cache target has been cached to the end of the classroom segment, continue to determine whether there is a next classroom segment in the current video segment playback;
[0056] S32, if there is a next classroom segment in the current video clip playback, then update the cache target to the beginning of the next classroom segment, and continue to cache the next classroom segment; repeat each specific processing sub-step in step S2;
[0057] If the next classroom segment does not exist in the current video segment playback, go to step S33;
[0058] S33. Determine whether the cache has reached the cache limit. If so, stop caching the video clips. If not, return to step S2 and continue to determine the next classroom segment in the current video segment playback until all classroom segments are cached or the cache limit is reached.
[0059] In this embodiment, after the cache target is cached to the end of the class segment, the cache target is updated to the beginning of the next class segment, and the next class segment is cached continuously until the cache meets the preset loading restriction condition. This allows the video player to play the class segments coherently, reduces unnecessary data loading, reduces video player freezes, and optimizes the playback experience, thereby breaking through the logic of the existing traditional video player caching in chronological order by default, and can set the required cache target content according to the logic of a specific scene, thereby improving the user experience. 。
[0060] In order to facilitate understanding of the above inventive concept of the present invention, the above inventive concept of the present invention is described in more detail below with reference to a specific embodiment and in conjunction with the accompanying drawings.
[0061] like Figure 4 As shown, an embodiment of the present invention provides a method for preloading video segments based on classroom segmentation, and the method for preloading video segments based on classroom segmentation includes:
[0062] S501: Play the video clip on the video player.
[0063] S502: Set the cache target at the current moment of playing the video clip.
[0064] When a video clip is played on a video player, the video player sets the cache target to the current moment of the video clip playback and starts caching the video data. Figure 3 shown.
[0065] S503, determine whether the video clip currently being played is the classroom segment content. If the video clip currently being played is the classroom segment content, go to step S504; if the video clip currently being played is not the classroom segment content, go to step S505.
[0066] Among them, the current time of playing the video clip can be compared with the start time startTime of the time slice in the classroom slice in the classroom slice set. If the current time of playing the video clip is after the start time startTime of the time slice of the nth classroom slice and before the start time startTime of the time slice of the n+1th classroom slice, it can be judged that the video clip played at the current time is the content of the nth classroom slice.
[0067] If the current time of playing the video clip is not within the time range of the duration of all class slices in the class slice set (the sum of the time slice start time startTime and the time slice duration duration), it can be determined that the video clip played at the current time is not the class slice content.
[0068] S504: The video clip currently being played is the content of the classroom segment, and the cache target is updated to the beginning of the classroom segment, and the video data of the classroom segment is cached.
[0069] When it is determined that the video clip currently being played is the content of the classroom segment, the video player updates the cache target to the beginning of the classroom segment, re-caches the video data of the classroom segment, and starts to re-play the classroom segment.
[0070] S505. If the video clip currently being played is not part of the classroom segment, then the video clip is directly skipped, the next video clip is played, and the process returns to step S501.
[0071] S506. Further determine whether the cache target has been cached to the end of the class segment. If the cache target has been cached to the end of the class segment, go to step S509; if the cache target has not been cached to the end of the class segment, go to step S507.
[0072] S507. The cache target is not cached to the end of the classroom segment, and further determine whether the classroom segment has a next cache time. If the classroom segment still has a next cache time, go to step S508; if the classroom segment does not have a next cache time, go to step S509.
[0073] S508. If the classroom segment has a next cache time, the cache target is updated to the beginning of the next cache time of the classroom segment, and the video clip corresponding to the next cache time of the classroom segment is cached.
[0074] S509. Continue to determine whether there is a next classroom segment in the current video clip. If there is a next classroom segment in the current video clip, go to step S510; if there is no next classroom segment in the current video clip, go to step S511.
[0075] S510: If there is a next classroom segment in the current video clip, the cache target is updated to the beginning of the next classroom segment, and the next classroom segment is cached continuously; then the process goes to step S503. Figure 3 shown.
[0076] S511: If the next classroom segment does not exist in the current video segment playback, determine whether the cache reaches the cache limit. If so, proceed to step S512; if not, return to step S503 and continue to determine the next classroom segment in the current video segment playback until all classroom segments are cached or the cache limit is reached. Figure 3 shown.
[0077] S512: Stop loading the video clip.
[0078] In this embodiment, a method for preloading video clips based on classroom segments is provided. After the cache target is cached to the end of the classroom segment, the cache target is updated to the beginning of the next classroom segment, and the next classroom segment is cached until the cache meets the preset loading restriction condition. This allows the video player to play the classroom segments coherently, reduces unnecessary data loading, reduces video player freezes, and optimizes the playback experience. This can break through the logic of the existing traditional video player caching in chronological order by default, and can set the required cache target content according to the logic of a specific scene, thereby improving the user experience. 。 This can solve the problem that existing video players cannot play class segments coherently, affecting the playback experience.
[0079] Based on the same concept, in one embodiment, the present invention also provides a playback device, such as Figure 5 As shown, the playback device 900 includes: a memory 902, a processor 901, and one or more computer programs stored in the memory 902 and executable on the processor 901. The memory 902 and the processor 901 are coupled together via a bus system 903. When the one or more computer programs are executed by the processor 901, the following steps of a method for preloading classroom video segments based on segmentation are implemented in an embodiment of the present invention:
[0080] S1, setting the cache target to the current moment of the video clip playback;
[0081] S2, determining the classroom segment in the current video clip playback, updating the cache target to the beginning of the classroom segment, and caching the classroom segment;
[0082] S3. When the cache target is cached to the end of the class slice, the cache target is updated to the beginning of the next class slice, and the next class slice is cached until the cache meets the preset loading limit condition, where the preset loading limit condition includes reaching the cache limit or all class slices have been cached.
[0083] The method disclosed in the above embodiment of the present invention can be applied to the processor 901, or implemented by the processor 901. The processor 901 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware or software instructions in the processor 901. The processor 901 may be a general-purpose processor, a DSP, or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The processor 901 can implement or execute the methods, steps and logic block diagrams disclosed in the embodiments of the present invention. A general-purpose processor may be a microprocessor or any conventional processor, etc. In combination with the steps of the method disclosed in the embodiment of the present invention, it can be directly embodied as a hardware decoding processor to execute, or it can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium, which is located in the memory 902. The processor 901 reads the information in the memory 902 and completes the steps of the above method in combination with its hardware.
[0084] It can be understood that the memory 902 in the embodiment of the present invention may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory or other memory technology, a compact disk read-only memory (CD-ROM), a digital versatile disk (DVD) or other optical disk storage, a magnetic cassette, a magnetic tape, a magnetic disk storage or other magnetic storage device; the volatile memory can be a random access memory (RAM), and by way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), synchronous static random access memory (SSRAM Memory), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM), SyncLink Dynamic Random Access Memory (SLDRAM), Direct Rambus Random Access Memory (DRRAM).The memories described in the embodiments of the present invention are intended to include, but are not limited to, these and any other suitable types of memories.
[0085] It should be noted that the above-mentioned playback device embodiment and method embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, and the technical features in the method embodiment are correspondingly applicable in the playback device embodiment, which will not be repeated here.
[0086] In addition, in an exemplary embodiment, an embodiment of the present invention further provides a computer storage medium, specifically a computer-readable storage medium, for example, including a memory 902 storing a computer program, wherein the computer storage medium stores one or more programs supporting a third-party cloud platform two-way certificate authentication method, and when the one or more programs supporting a third-party cloud platform two-way certificate authentication method are executed by the processor 901, the following steps of a method for preloading video segments based on classroom segmentation provided in an embodiment of the present invention are implemented:
[0087] S1, setting the cache target to the current moment of the video clip playback;
[0088] S2, determining the classroom segment in the current video clip playback, updating the cache target to the beginning of the classroom segment, and caching the classroom segment;
[0089] S3. When the cache target is cached to the end of the class slice, the cache target is updated to the beginning of the next class slice, and the next class slice is cached until the cache meets the preset loading limit condition, where the preset loading limit condition includes reaching the cache limit or all class slices have been cached.
[0090] It should be noted that the program embodiment of the method for preloading classroom video clips based on the above-mentioned computer-readable storage medium and the method embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, and the technical features in the method embodiment are correspondingly applicable in the embodiment of the above-mentioned computer-readable storage medium, which will not be repeated here.
[0091] It should be noted that, in this article, the terms "include", "comprises" or any other variations 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 sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0092] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them. Under the concept of the present invention, the technical features in the above embodiments or different embodiments may also be combined, the steps may be implemented in any order, and there are many other changes in different aspects of the present invention as described above, which are not provided in detail for the sake of simplicity. Although the present invention has been described in detail with reference to the above embodiments, a person of ordinary skill in the art should understand that the technical solutions described in the above embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for preloading video clips based on classroom segmentation, characterized in that: The classroom segmentation-based video segment preloading method comprises: Set the cache target to the current moment of the video clip playback; Determine the classroom segment in the current video clip playback, update the cache target to the beginning of the classroom segment, and cache the classroom segment; When the cache target is cached to the end of the classroom slice, the cache target is updated to the beginning of the next classroom slice, and the next classroom slice is cached until the cache meets the preset loading limit conditions, where the preset loading limit conditions include reaching the cache limit or all classroom slices have been cached.
2. The method for preloading video clips based on classroom segmentation according to claim 1 is characterized in that: The step of setting the cache target at the current moment of playing the video segment includes: Play the video clip on the video player; Sets the cache target to the current moment in the video clip's playback.
3. The method for preloading video clips based on classroom segmentation according to claim 1 is characterized in that: The step of determining a classroom segment in the current video clip playback, updating the cache target to the beginning of the classroom segment, and caching the classroom segment comprises: Determine whether the video clip currently being played is the content of the classroom segment; If the video clip currently being played is the content of a classroom segment, the cache target is updated to the beginning of the classroom segment, and the video data of the classroom segment is cached.
4. The method for preloading video clips based on classroom segmentation according to claim 3 is characterized in that: The step of judging whether the video clip currently being played is classroom segment content includes: Compare the current time of playing the video clip with the start time of the time slice in the classroom slice in the classroom slice set. If the current time of playing the video clip is after the start time of the time slice of the nth classroom slice and before the start time of the time slice of the n+1th classroom slice, then it is determined that the video clip played at the current time is the content of the nth classroom slice.
5. The method for preloading video clips based on classroom segmentation according to claim 4 is characterized in that: The step of determining a classroom segment in the current video clip playback, updating the cache target to the beginning of the classroom segment, and caching the classroom segment also includes: Further determine whether the cache target has been cached to the end of the class segment; if the cache target has been cached to the end of the class segment, update the cache target to the beginning of the next class segment, and continue to cache the next class segment; If the cache target is not cached to the end of the classroom segment, it is further determined whether the classroom segment has a next cache time.
6. The method for preloading video clips based on classroom segmentation according to claim 5 is characterized in that: The further determining whether the classroom segment has a next cache time includes: According to the time slice start time and time slice duration of the classroom slice and the current time of playing the video clip, determine whether the classroom slice has a next cache time.
7. The method for preloading video clips based on classroom segmentation according to claim 6 is characterized in that: The further determining whether the classroom segment has a next cache time includes: If the classroom segment still has a next cache time, the cache target is updated to the beginning of the next cache time of the classroom segment, and the video clip corresponding to the next cache time of the classroom segment is cached; If the classroom segment does not have a next cache time, the cache target is updated to the beginning of the next classroom segment, and the next classroom segment is cached.
8. The method for preloading video clips based on classroom segmentation according to claim 7 is characterized in that: The method of updating the cache target to the beginning of the next classroom segment and continuing to cache the next classroom segment until the cache meets the preset loading restriction condition and stops caching; includes: After determining that the cache target has been cached to the end of the classroom segment, continue to determine whether there is a next classroom segment in the current video segment playback; If there is a next classroom segment, the cache target is updated to the beginning of the next classroom segment, and the next classroom segment is cached continuously; If the next classroom segment does not exist, determine whether the cache has reached the cache limit. If so, stop caching the video clip. If not, continue to determine the next classroom segment during the current video segment playback until all classroom segments are cached or the cache limit is reached.
9. A playback device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and running on the processor, wherein when the computer program is executed by the processor, the method for preloading classroom video segments based on segmentation is implemented as described in any one of claims 1 to 8.
10. A computer storage medium, characterized in that: The computer storage medium stores a program of a method for preloading video clips based on classroom segmentation, and when the program of a method for preloading video clips based on classroom segmentation is executed by a processor, the method for preloading video clips based on classroom segmentation as described in any one of claims 1 to 8 is implemented.