Video coding method and system based on sliding window

By using sliding window technology to adjust video encoding and decoding strategies in real time, the latency and storage space issues of video downloads under the HTTP protocol are resolved, improving the smoothness of video playback and user experience.

CN119255016BActive Publication Date: 2026-02-10SHENZHEN LINGDECHUANG TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411262298.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-10
Publication Date
2026-02-10
Estimated Expiration
2044-09-10

AI Technical Summary

Technical Problem

Existing video download technologies based on the HTTP protocol suffer from problems such as high latency, lack of real-time adaptability, and large storage space requirements, resulting in a poor user experience.

Method used

A sliding window-based video encoding and decoding method is adopted. Through the collaborative work of the client and the video server, the network status and user behavior are monitored in real time, and the size and position of the TS file are dynamically adjusted to achieve the continuity and stability of the video stream.

Benefits of technology

It reduces latency, decreases storage space requirements, and improves video playback smoothness and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119255016B_ABST
    Figure CN119255016B_ABST
Patent Text Reader

Abstract

The embodiment of the application provides a video coding method and system based on a sliding window, the method comprising: a client determining a first video to be played, receiving frame file index information and a sliding window TS file generated by a video server according to video information of the first video; the client obtaining the frame file index information, requesting TS files one by one based on the frame file index information and playing the video; when the client plays the first video, the video server adjusts the TS size in real time according to the playing progress of the first video, a network state or a user operation, pauses transcoding of subsequent TS when the number of TS caches reaches a first threshold, and resumes the transcoding of the subsequent TS when the number of TS caches is lower than a second threshold.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of communication and video technology, specifically relating to a video encoding and decoding method and system based on a sliding window. Background Technology

[0002] The Hypertext Transfer Protocol (HTTP) is a simple request-response protocol that typically runs on top of TCP. It specifies what messages a client might send to a server and what responses it might receive. Request and response message headers are given in ASCII format, while the message content has a MIME-like format.

[0003] Issues with HTTP-based file download technology:

[0004] High latency: Users must wait for the entire file to download completely or for a certain portion of the file to download before they can start playing it, especially for large files where the latency will be relatively high.

[0005] No real-time adaptation: The video quality cannot be adjusted in real time according to network conditions. Once the download starts, the video quality is fixed, which may cause stuttering or reduced image quality when the network conditions are unstable.

[0006] High storage space requirements: The client needs sufficient storage space to save the downloaded complete video file, making it unsuitable for devices with limited storage space. Summary of the Invention

[0007] This application provides a video encoding and decoding method and system based on a sliding window, which can reduce latency and storage space requirements and improve user experience.

[0008] In a first aspect, this application provides a video encoding and decoding method based on a sliding window, the method comprising the following steps:

[0009] The client determines the first video to be played and receives the frame file index information and the sliding window TS file generated by the video server based on the video information of the first video.

[0010] The client obtains the frame file index information, and based on the frame file index information, requests TS files one by one and plays the video.

[0011] When the client plays the first video, the video server adjusts the TS size in real time based on the playback progress of the first video, network status, or user operation. When the number of TS cached reaches the first threshold, transcoding of subsequent TS is paused. When the number of TS cached is lower than the second threshold, transcoding of subsequent TS resumes.

[0012] Secondly, a video encoding and decoding system based on a sliding window is provided, wherein the video encoding and decoding system based on a sliding window comprises a client and a video server;

[0013] The client is used to determine the first video to be played, receive frame file index information and sliding window TS file generated by the video server based on the video information of the first video; obtain the frame file index information, and request TS files one by one based on the frame file index information and play the video.

[0014] The video server is used to adjust the TS size in real time based on the playback progress of the first video, network status, or user operation when the client plays the first video. When the number of TS cached reaches a first threshold, the transcoding of subsequent TS is paused. When the number of TS cached is lower than a second threshold, the transcoding of subsequent TS is resumed.

[0015] Thirdly, this application provides a computer storage medium storing a computer program for electronic data interchange, wherein the computer program causes a computer to perform some or all of the steps described in the first aspect of this application.

[0016] The embodiments of this application have the following beneficial effects:

[0017] The technical solution provided in this application allows the video server to dynamically adjust the size and position of the sliding window by real-time monitoring of network status, playback devices, and user behavior. This enables the video server to quickly respond and adjust the corresponding transcoding strategy when the user drags the playback progress bar or switches resolutions. For example, when the system detects that a user has jumped to the latter half of the video, it immediately adjusts the position of the sliding window and recalculates the transcoding strategy within the current window to ensure the continuity and stability of the video stream. Furthermore, if the current network condition is good, the resolution of the TS window transcoding can be increased by one level; conversely, if the current network condition is poor, the resolution of the TS window transcoding can be decreased by one level. This dynamic adjustment of the TS window transcoding strategy based on network conditions improves playback smoothness. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;

[0020] Figure 2 This is a flowchart illustrating a video encoding / decoding method based on a sliding window, as provided in an embodiment of this application.

[0021] Figure 3 This is a flowchart illustrating a video encoding / decoding method based on a sliding window, as provided in Embodiment 1 of this application.

[0022] Figure 4 This is a schematic diagram of a video encoding and decoding system based on a sliding window, provided in an embodiment of this application. Detailed Implementation

[0023] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present application.

[0024] The terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, systems, products, or apparatuses.

[0025] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0026] The following is a schematic diagram of the structure of the electronic device involved in the embodiments of this application.

[0027] This application also provides a video server, such as Figure 1As shown, the video server includes a server and multiple clients connected to the server. These clients communicate with the server via wired or wireless connections. The server includes at least one processor 11 and memory 12, and may also include a communications interface 14, a display screen 16, and a bus 13. The processor 11, memory 12, display screen 16, and communications interface 14 can communicate with each other via the bus 13. The communications interface 14 can transmit information and may have wireless communication capabilities, such as short-range or long-range wireless communication (e.g., LTE or NR). The processor 11 can invoke logical instructions in the memory 12 to execute or support the methods described in this embodiment.

[0028] The memory 12, as a computer-readable storage medium, can be configured to store software programs, computer-executable programs, such as program instructions or modules corresponding to the methods in the embodiments of this disclosure. The processor 11 executes functional applications and data processing by running the software programs, instructions, or modules stored in the memory 12, that is, implements or supports the methods in the embodiments of this application.

[0029] The main technical application scenarios of the embodiments of this application are described below.

[0030] Video playback is a common user solution. However, video playback has a certain delay because the transcoding resolution of video playback is preset to a fixed resolution, such as 1280P or 720P. However, users may scroll through the video, causing subsequent videos to not be decoded in time using the above-mentioned preset fixed resolution. This results in playback delay due to untimely video decoding, which reduces the user experience.

[0031] The specific methods will be described in detail below.

[0032] This application provides a video encoding / decoding method based on a sliding window, wherein the above method, as in... Figure 1 The video server shown is executing, Figure 2 This is a flowchart illustrating a video encoding / decoding method based on a sliding window, as provided in Embodiment 1 of this application. Figure 2 As shown, the above method includes the following steps:

[0033] Step S201: The client determines the first video to be played and receives the frame file index information (i.e., M3U8) and TS (sliding window) file generated by the video server based on the video information of the first video.

[0034] For example, the specific methods for obtaining the above frame file index information and TS (sliding window) file may include: calculating the keyframe interval based on the video information, constructing frame file index information (i.e., M3U8), enabling asynchronous HLS transcoding, and generating TS files in real time.

[0035] Step S202: The client obtains the frame file index information (i.e., M3U8), and requests TS files one by one and plays the video based on the frame file index information;

[0036] Step S203: When the client plays the first video, the video server adjusts the TS size in real time according to the playback progress of the first video, network status, or user operation. When the number of TS cached reaches the first threshold, the transcoding of subsequent TS is paused. When the number of TS cached is lower than the second threshold, the transcoding of subsequent TS is resumed.

[0037] The technical solution provided in this application allows the video server to dynamically adjust the size and position of the sliding window by real-time monitoring of network status, playback devices, and user behavior. This enables the video server to quickly respond and adjust the corresponding transcoding strategy when the user drags the playback progress bar or switches resolutions. For example, when the system detects that a user has jumped to the latter half of the video, it immediately adjusts the position of the sliding window and recalculates the transcoding strategy within the current window to ensure the continuity and stability of the video stream. Furthermore, if the current network condition is good, the resolution of the TS window transcoding can be increased by one level; conversely, if the current network condition is poor, the resolution of the TS window transcoding can be decreased by one level. This dynamic adjustment of the TS window transcoding strategy based on network conditions improves playback smoothness.

[0038] For example, the video server adjusting the TS size in real time according to the playback progress of the first video may specifically include:

[0039] When the video server determines that the playback progress of the first video exceeds half of the overall progress, it dynamically adjusts the position of the TS based on the video information of the unplayed part of the first video and recalculates the transcoding strategy within the adjusted TS.

[0040] Each of the above TS can be configured with a different transcoding strategy. For example, odd-numbered TS can be configured with a 1280p transcoding strategy, even-numbered TS can be configured with a 720p transcoding strategy, etc. This application does not limit the specific form of the above transcoding strategy.

[0041] For example, the above method also includes: dynamically adjusting the TS transcoding strategy based on the video information of the unplayed portion of the first video, specifically including:

[0042] The video server determines the current network speed, the total duration of the unplayed portion of the video, and the first resolution of the first half of the playback progress. Based on the first resolution and the network speed, it calculates the current network saturation. If the saturation is less than the saturation threshold, the TS of the unplayed portion of the video information is adjusted by one level based on the first resolution, while keeping the first time constant. If the saturation is greater than the saturation threshold, the TS of the unplayed portion of the video information is adjusted down by one level based on the first resolution.

[0043] The formula for calculating the saturation mentioned above can specifically include:

[0044] B = F * b / S * 100%, where F is the value of the first resolution, S is the value of the network speed, b is the frame rate per second of the first video, such as 60 frames / second, etc., and the network speed is the network speed per second.

[0045] The above scheme can dynamically adjust the transcoding strategy of TS, and the method can also be adjusted periodically, which can better match the current network speed and video resolution and improve smoothness.

[0046] Based on different playback progress, the position of TS in the video information can be dynamically adjusted in real time, and different transcoding strategies are provided to improve the continuity and stability of the video stream.

[0047] To illustrate this with a technical scenario, suppose that after the first video has played halfway through, the video server can adjust the TS size of the second half of the video to 2 / 3 of the original size and increase the decoding resolution of the TS window by one level. Although the decoded video file is larger, the decoding time is not significantly affected because the TS interval is smaller. This way, the resolution of the first video can be increased without affecting the smoothness of the video.

[0048] The resolution levels mentioned above include, but are not limited to: 1280p, 720p, 480p, and 360p. The higher the resolution, the higher the level. For example, the next level after 1280p is 720p, and vice versa.

[0049] For example, the above methods may also include:

[0050] When the playback progress of the first video changes, the identifier of the current TS is obtained, the data in the current TS is decoded and then the video is played.

[0051] This situation occurs when the playback progress changes, typically after the user slides the progress bar and the playback progress is significantly accelerated. If the previous transcoding strategy is still used, a certain delay will occur. Therefore, the TS corresponding to the current TS identifier is transcoded and played first to improve the smoothness of video playback.

[0052] For example, the above methods may also include:

[0053] The video server extracts the identifier of the next TS from the current TS, obtains the first playback time of the current TS, extracts the transcoding strategy of the next TS, and calculates the transcoding time of the next TS based on the transcoding strategy and the current network speed. If the transcoding time is less than the first playback time, the transcoding strategy of the next TS is not adjusted. If the transcoding time is greater than the first playback time, the resolution level in the transcoding strategy is reduced by one level, and the transcoding time is calculated again to obtain the second transcoding time. If the second transcoding time is less than the first playback time, the resolution level of the transcoding strategy of the next TS is reduced by one level.

[0054] For example, the above methods may also include:

[0055] The client caches and releases TS (Time Series) caches and resources before the current TS (Time Series) identifier. This facilitates caching of TSs after the current TS identifier, improving the smoothness of subsequent video playback.

[0056] For example, the above methods may also include:

[0057] When the client stops or times out, the video server promptly clears the TS cache and releases resources.

[0058] For example, the above methods may also include:

[0059] After the video server obtains the user's progress of swiping through the first video, it detects the first time the swiping stops and the second time the user starts swiping again. The first and second times are combined to form a short video. Text information is extracted from the subtitles of this short video. Correlation analysis is performed on the text information to identify multiple related sentences. The start and end times of these sentences are extracted. From a portion of the short video within the time interval between these start and end times, "enjoyment point" feature data is extracted. Based on this feature data, characteristic attributes of this portion of the video are determined and added to the user profile. This facilitates recommendations for subsequent episodes for the user.

[0060] For example, the extraction of "pleasure point" feature data from this part of the video may specifically include:

[0061] Obtain multiple video segments from a portion of the video, and extract the subtitle content and image information for each video segment. Use the subtitle content and image information of each video segment as a feature data point for satisfying viewing.

[0062] The above-mentioned storyboard video clips can be based on a single sentence in the subtitles, meaning each sentence corresponds to one storyboard video clip.

[0063] For example, the phrase "This kind of thing can't be left unattended; if everyone else is ignoring it, I can," consists of two sentences: "This kind of thing can't be left unattended" and "If everyone else is ignoring it, I can," with corresponding captions and images serving as two separate video clips.

[0064] For example, determining the feature attributes of a portion of the video based on the aforementioned "enjoyment point" feature data may specifically include:

[0065] Extract a "satisfaction point" feature data, perform plot analysis on the "satisfaction point" feature data to obtain a type attribute of the "satisfaction point" feature data, traverse all "satisfaction point" feature data to obtain multiple type attributes, count the number of the same type attribute among the multiple type attributes, and take the attribute type with the value of the number greater than the threshold as the feature attribute of the part of the video.

[0066] For example, the type attribute of the aforementioned "pleasure point" feature data obtained by performing plot analysis may specifically include:

[0067] The subtitle content is segmented to obtain multiple keywords. Type matching is performed on the multiple keywords to obtain multiple corresponding subtitle type attributes. Scene recognition is performed on the image information to determine the corresponding scene type attribute. Clothing recognition is performed on the image information to determine the corresponding clothing type attribute. From the multiple subtitle type attributes, a subtitle type attribute that matches both the scene type attribute and the clothing type attribute is selected. The scene type attribute, clothing type attribute and subtitle type attribute are superimposed to obtain a type attribute.

[0068] The above classification and recognition methods can be implemented using established recognition models, which will not be elaborated upon here. The clothing type attributes mentioned above can include: ancient costume, court costume, urban costume, military costume, sports costume, etc. The scene type attributes mentioned above can include: family costume, transportation costume, outdoor costume, garden costume, etc. The subtitle type attributes mentioned above can include: suspense, espionage, romance, etc.

[0069] For example, if the subtitle type attribute analysis shows "spy war" and "emotion", the scene type attribute analysis shows "family type", and the clothing type attribute analysis shows "urban type", then it can be determined that "spy war" and "urban type" do not match, and "emotion" matches both "family type" and "urban type". Therefore, the type attribute corresponding to the "satisfaction point" feature data is determined to be "emotional urban family type".

[0070] Because users are more interested in the plot between when they can swipe through the progress bar and when they swipe again to watch, analyzing this interval can better capture user preferences and allow for targeted improvements to user profiles, which in turn improves the accuracy of subsequent video recommendations.

[0071] See Figure 3 , Figure 3 A flowchart of a video encoding / decoding method based on a sliding window provided in Embodiment 1 of this application is shown below. Figure 3 As shown, the above method may include the following steps:

[0072] Step S301: The client determines the first video to be played and receives the frame file index information and TS file generated by the video server based on the video information of the first video.

[0073] The aforementioned TS file may specifically include: the time of each TS, such as 3 seconds, the transcoding resolution of each TS, such as 1280p, etc., and the frame file index information may include the frame ID (i.e., frame number) of the key frame in the TS conversion, indicating from which frames to convert to the next TS.

[0074] Step S302: The client plays the first video. The user slides the window to half of the first video. The video server extracts the current TS at half the position, processes the current TS according to the transcoding strategy of the current TS, and then plays it.

[0075] Step S303: The video server obtains the first network speed, the first resolution value of the first video, and the frame rate, calculates the saturation, and when the saturation is less than the saturation threshold, increases the first resolution value by one level to play the second half of the video.

[0076] The technical solution provided in this application prioritizes transcoding the current TS after determining the position of the sliding window, ensuring the smoothness of subsequent videos. Furthermore, it dynamically adjusts the resolution of subsequent TS videos based on the current network speed, thereby improving video clarity and user experience while ensuring video smoothness.

[0077] See Figure 4 , Figure 4 A video encoding and decoding system based on a sliding window is provided, the system comprising a client and a video server;

[0078] Client 401 is used to determine the first video to be played, receive frame file index information and sliding window TS file generated by the video server based on the video information of the first video; obtain frame file index information, and request TS files one by one based on the frame file index information and play the video.

[0079] Video server 402 is used to adjust the TS size in real time according to the playback progress of the first video, network status or user operation when the client plays the first video. When the number of TS buffers reaches the first threshold, the transcoding of subsequent TS is paused. When the number of TS buffers is lower than the second threshold, the transcoding of subsequent TS is resumed.

[0080] Example,

[0081] Video server 402 is specifically used to dynamically adjust the position of TS based on the video information of the unplayed part of the first video when the playback progress of the first video exceeds half of the overall progress, and to recalculate the transcoding strategy in the adjusted TS.

[0082] The video server 402 is also used to determine the current network speed, the total duration of the unplayed portion of the video, and the first resolution of the first half of the playback progress. Based on the first resolution and the network speed, the current network saturation is calculated. If the saturation is less than the saturation threshold, the TS of the unplayed portion of the video information is adjusted by one level based on the first resolution, while keeping the first time unchanged. If the saturation is greater than the saturation threshold, the TS of the unplayed portion of the video information is adjusted down by one level based on the first resolution.

[0083] The specific formula for calculating the above saturation includes:

[0084] B = F * b / S * 100%, where F is the value of the first resolution, S is the value of the network speed, b is the frame rate per second of the first video, such as 60 frames / second, etc., and the network speed is the network speed per second.

[0085] The video server 402 is also used to obtain the identifier of the current TS when the playback progress of the first video changes, and to decode the data in the current TS before playing the video.

[0086] The video server 402 is also used to extract the identifier of the next TS from the current TS, obtain the first playback time of the current TS, extract the transcoding strategy of the next TS, calculate the transcoding time of the transcoding strategy of the next TS based on the transcoding strategy and the current network speed. If the transcoding time is less than the first playback time, the transcoding strategy of the next TS is not adjusted. If the transcoding time is greater than the first playback time, the resolution level in the transcoding strategy is reduced by one level, and the transcoding time is calculated again to obtain the second transcoding time. If the second transcoding time is less than the first playback time, the resolution level of the transcoding strategy of the next TS is reduced by one level.

[0087] This application also provides a computer storage medium storing a computer program for electronic data interchange, which causes a computer to perform some or all of the steps of any of the methods described in the above method embodiments, wherein the computer includes an electronic device.

[0088] This application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps of any of the methods described in the above method embodiments. The computer program product may be a software installation package, and the computer may include an electronic device.

[0089] It should be understood that in the various embodiments of this application, the order of the above-mentioned processes does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0090] In the several embodiments provided in this application, it should be understood that the disclosed methods, apparatuses, and systems can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for example, the division of units is merely a logical functional division, and other division methods may exist in actual implementation; for example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0091] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0092] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can be physically comprised separately, or two or more units can be integrated into one unit. The integrated unit described above can be implemented in hardware or in the form of hardware plus software functional units.

[0093] The integrated units implemented as software functional units described above can be stored in a computer-readable storage medium. These software functional units, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute some steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes: a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, volatile memory, or non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous DRAM (DDR SDRAM), enhanced synchronous DRAM (ESDRAM), synchronous linked DRAM (SLDRAM), and direct rambus RAM (DR RAM), etc., various media capable of storing program code.

[0094] While the present invention has been disclosed above, it is not limited thereto. Any person skilled in the art can easily conceive of variations or substitutions without departing from the spirit and scope of the present invention, and various modifications and alterations can be made, including combinations of the different functions and implementation steps described above, as well as software and hardware implementation methods, all of which are within the protection scope of the present invention.

Claims

1. A video encoding and decoding method based on a sliding window, characterized in that, The method includes the following steps: The client determines the first video to be played and receives the frame file index information and the sliding window TS file generated by the video server based on the video information of the first video. The client obtains the frame file index information, and based on the frame file index information, requests TS files one by one and plays the video. The specific methods for obtaining frame file index information and TS files include: calculating keyframe intervals based on the video information, constructing frame file index information, enabling asynchronous HLS transcoding, and generating TS files in real time; When the client plays the first video, the video server adjusts the TS size in real time according to the playback progress of the first video, network status, or user operation. When the number of TS cached reaches the first threshold, the transcoding of subsequent TS is paused. When the number of TS cached is lower than the second threshold, the transcoding of subsequent TS is resumed. After the video server obtains the user's progress of swiping the first video, it obtains the first time when the swiping stops and detects the second time when the user starts swiping again. The first time and the second time are combined to form a short video. The subtitle information of the short video is extracted to obtain text information. The text information is then used to identify multiple related sentences. The start and end times of the multiple sentences are extracted. A portion of the video from the time period between the start and end times is extracted. The "enjoyment point" feature data of the portion of the video is extracted. The feature attributes of the portion of the video are determined based on the "enjoyment point" feature data. The feature attributes are then added to the user profile. The determination of the feature attributes of the portion of the video based on the "enjoyment point" feature data specifically includes: Extract a "satisfaction point" feature data, perform plot analysis on the "satisfaction point" feature data to obtain a type attribute of the "satisfaction point" feature data, traverse all "satisfaction point" feature data to obtain multiple type attributes, count the number of the same type attribute among the multiple type attributes, and take the attribute type with a value greater than a threshold as the feature attribute of the part of the video. The specific type attribute obtained by performing plot analysis on a "satisfaction point" feature data includes: The subtitle content is segmented to obtain multiple keywords. Type matching is performed on the multiple keywords to obtain multiple corresponding subtitle type attributes. Scene recognition is performed on the image information to determine the corresponding scene type attribute. Clothing recognition is performed on the image information to determine the corresponding clothing type attribute. From the multiple subtitle type attributes, a subtitle type attribute that matches both the scene type attribute and the clothing type attribute is selected. The scene type attribute, clothing type attribute and subtitle type attribute are superimposed to obtain a type attribute.

2. The video encoding and decoding method based on a sliding window according to claim 1, characterized in that, The video server adjusts the TS size in real time according to the playback progress of the first video, specifically including: When the video server determines that the playback progress of the first video exceeds half of the overall progress, it dynamically adjusts the position of the TS based on the video information of the unplayed part of the first video and recalculates the transcoding strategy within the adjusted TS.

3. The video encoding and decoding method based on a sliding window according to claim 1, characterized in that, The method further includes: dynamically adjusting the transcoding strategy of TS based on the video information of the unplayed portion of the first video, including: The video server determines the current network speed, the total duration of the unplayed portion of the video, and the first resolution of the first half of the playback progress. Based on the first resolution and the network speed, it calculates the current network saturation. If the saturation is less than the saturation threshold, the TS of the unplayed portion of the video information is adjusted by one level based on the first resolution, while keeping the first time unchanged. If the saturation is greater than the saturation threshold, the TS of the unplayed portion of the video information is adjusted down by one level based on the first resolution. The specific formula for calculating the above saturation includes: B = F*b / S*100%, where F is the value of the first resolution, S is the value of the network speed, b is the frame rate per second of the first video, and the network speed is the network speed per second.

4. The video encoding and decoding method based on a sliding window according to claim 1, characterized in that, The method further includes: When the playback progress of the first video changes, the identifier of the current TS is obtained, the data in the current TS is decoded and then the video is played.

5. The video encoding and decoding method based on a sliding window according to claim 4, characterized in that, The method further includes: The video server extracts the identifier of the next TS from the current TS, obtains the first playback time of the current TS, extracts the transcoding strategy of the next TS, and calculates the transcoding time of the next TS based on the transcoding strategy and the current network speed. If the transcoding time is less than the first playback time, the transcoding strategy of the next TS is not adjusted. If the transcoding time is greater than the first playback time, the resolution level in the transcoding strategy is reduced by one level, and the transcoding time is calculated again to obtain the second transcoding time. If the second transcoding time is less than the first playback time, the resolution level of the transcoding strategy of the next TS is reduced by one level.

6. A video encoding and decoding system based on a sliding window, characterized in that, The video encoding / decoding system based on a sliding window consists of a client and a video server. The client is used to determine the first video to be played and to receive frame file index information and sliding window TS file generated by the video server based on the video information of the first video. Obtain frame file index information, and based on the frame file index information, request TS files one by one and play the video; The specific methods for obtaining frame file index information and TS files include: calculating keyframe intervals based on the video information, constructing frame file index information, enabling asynchronous HLS transcoding, and generating TS files in real time; The video server is used to adjust the TS size in real time based on the playback progress of the first video, network status, or user operation when the client plays the first video. When the number of TS cached reaches a first threshold, the transcoding of subsequent TS is paused. When the number of TS cached is lower than a second threshold, the transcoding of subsequent TS is resumed. The video server is also used to obtain the first time when the user stops swiping the progress of the first video, detect the second time when the user starts swiping the progress again, construct a short video from the first time and the second time, extract text information from the subtitle information of the short video, identify multiple related sentences by performing correlation identification on the text information, extract the start time and end time of the multiple sentences, extract the "satisfaction point" feature data from a portion of the video from the time period between the start time and the end time in the short video, determine the feature attributes of the portion of the video based on the "satisfaction point" feature data, and add the feature attributes to the user profile. The determination of the feature attributes of the portion of the video based on the "enjoyment point" feature data specifically includes: Extract a "satisfaction point" feature data, perform plot analysis on the "satisfaction point" feature data to obtain a type attribute of the "satisfaction point" feature data, traverse all "satisfaction point" feature data to obtain multiple type attributes, count the number of the same type attribute among the multiple type attributes, and take the attribute type with a value greater than a threshold as the feature attribute of the part of the video. The specific type attribute obtained by performing plot analysis on a "satisfaction point" feature data includes: The subtitle content is segmented to obtain multiple keywords. Type matching is performed on the multiple keywords to obtain multiple corresponding subtitle type attributes. Scene recognition is performed on the image information to determine the corresponding scene type attribute. Clothing recognition is performed on the image information to determine the corresponding clothing type attribute. From the multiple subtitle type attributes, a subtitle type attribute that matches both the scene type attribute and the clothing type attribute is selected. The scene type attribute, clothing type attribute and subtitle type attribute are superimposed to obtain a type attribute.

7. The video encoding and decoding system based on a sliding window according to claim 6, characterized in that, The video server is specifically used to determine that when the playback progress of the first video exceeds half of the overall progress, dynamically adjust the position of the TS based on the video information of the unplayed part of the first video, and recalculate the transcoding strategy in the adjusted TS.

8. The video encoding and decoding system based on a sliding window according to claim 6, characterized in that, The video server is also used to determine the current network speed, the total duration of the unplayed portion of the video, and the first resolution of the first half of the playback progress. Based on the first resolution and the network speed, the current network saturation is calculated. If the saturation is less than the saturation threshold, the TS of the unplayed portion of the video information is adjusted by one level based on the first resolution, while keeping the first time unchanged. If the saturation is greater than the saturation threshold, the TS of the unplayed portion of the video information is adjusted down by one level based on the first resolution. The specific formula for calculating the above saturation includes: B = F*b / S*100%, where F is the value of the first resolution, S is the value of the network speed, b is the frame rate per second of the first video, and the network speed is the network speed per second.

9. The video encoding and decoding system based on a sliding window according to claim 6, characterized in that, The video server is also used to obtain the identifier of the current TS when the playback progress of the first video changes, and to decode the data in the current TS before playing the video.

10. The video encoding and decoding system based on a sliding window according to claim 9, characterized in that, The video server is also used to extract the identifier of the next TS from the current TS, obtain the first playback time of the current TS, extract the transcoding strategy of the next TS, calculate the transcoding time of the transcoding strategy of the next TS based on the transcoding strategy and the current network speed, if the transcoding time is less than the first playback time, the transcoding strategy of the next TS is not adjusted, if the transcoding time is greater than the first playback time, the resolution level in the transcoding strategy is reduced by one level, and the transcoding time is recalculated to obtain the second transcoding time, if the second transcoding time is less than the first playback time, the resolution level of the transcoding strategy of the next TS is reduced by one level.

Citation Information

Patent Citations

  • Self-adapting streaming media displaying method and self-adapting streaming media displaying system

    CN103036889A

  • Video transcoding method and servers

    CN106899858A

  • Method and device for switching video code rate, electronic equipment and medium

    CN111417000A